cygwin-1.7.28 getpwent header declaration changes ?
Corinna Vinschen
corinna-cygwin@cygwin.com
Thu Feb 6 14:13:00 GMT 2014
On Feb 6 11:19, Marco Atzeri wrote:
>
>
> On 06/02/2014 10:01, Corinna Vinschen wrote:
> >On Feb 6 08:29, Marco Atzeri wrote:
> >>on cygwin-1.7.28 64 bit but not on cygwin-1.7.27,
> >>(only system difference) compiling octave I see:
> >>
> >>----------------------------------------------------------------
> >>/pub/devel/octave/octave-3.8.0-2/src/octave-3.8.0/liboctave/system/oct-passwd.cc
> >>:114:25: error: '::getpwent' has not been declared
> >> return octave_passwd (::getpwent (), msg);
> >> ^
> >>[...]
> >>Is something slightly changed in the relative system headers ?
> >
> >I don't know anything about octave, but what has changed is that newlib
> >is finally introducing BSD-like visibility macros. The pwd.h header now
> >contains this:
> >
> > #if __XSI_VISIBLE >= 500
> > struct passwd *getpwent (void);
> > void setpwent (void);
> > void endpwent (void);
> > #endif
> > [...]
>
> thanks for the hints
>
> for what I can see "_GNU_SOURCE" is defined in both cases at
> configure stage and reported in config.status and config.h
>
> I will look to compare the preprocessor output to see why building
> on 1.7.28 the "/* Everything and the kitchen sink. */" is not pulled in
Btw., it would be a good idea to get rid of calls to getpwent/getgrent
in future. They *probably* won't do anymore what they were supposed to
do if you don't have passwd/group files. A full implementation would
require to enumerate the local SAM and, at least, the primary domain
accounts at runtime. That would be possible, but it comes at a hefty
price in terms of performance.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20140206/ed6921d1/attachment.sig>
More information about the Cygwin
mailing list