> 2008-10-18 Bruno Haible <[EMAIL PROTECTED]> > > * lib/unistd.in.h (getusershell, setusershell, endusershell): New > declarations. > * lib/getusershell.c: Include unistd.h. > * m4/getusershell.m4 (gl_FUNC_GETUSERSHELL): Require > gl_UNISTD_H_DEFAULTS and AC_USE_SYSTEM_EXTENSIONS. Set > HAVE_GETUSERSHELL. > * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_GETUSERSHELL > and HAVE_GETUSERSHELL. > * modules/getusershell (Depends-on): Add unistd, extensions. > (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR. > (Include): Specify <unistd.h>. > * modules/unistd (Makefile.am): Substitute GNULIB_GETUSERSHELL and > HAVE_GETUSERSHELL.
Applied. I now see that coreutils/src/su.c has this: /* Hide any system prototype for getusershell. This is necessary because some Cray systems have a conflicting prototype (returning `int') in <unistd.h>. */ #define getusershell _getusershell_sys_proto_ #include "system.h" #include "getpass.h" #undef getusershell If Cray systems are still a portability target, the current idiom for this kind of problem is to add #define getusershell rpl_getusershell in unistd.in.h. Bruno