This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygwin-1.7.28 getpwent header declaration changes ?


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

Attachment: pgplXCW4Tcp86.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]