cygwin-1.7.28 getpwent header declaration changes ?
Corinna Vinschen
corinna-cygwin@cygwin.com
Thu Feb 6 09:01:00 GMT 2014
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
The default settings per the sys/cdefs.h header are:
#define __POSIX_VISIBLE 200809
#define __XSI_VISIBLE 700
#define __BSD_VISIBLE 1
#define __ISO_C_VISIBLE 2011
unless your environment defines one of
_XOPEN_SOURCE
_POSIX_C_SOURCE
_ANSI_SOURCE
_C99_SOURCE
_C11_SOURCE
_GNU_SOURCE
Have a look at the end of /usr/include/sys/cdefs.h, it explains things.
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/2b8c969f/attachment.sig>
More information about the Cygwin
mailing list