+2010-03-19 Bruno Haible <bruno@clisp.org>
+
+ getusershell: Provide declaration, missing on Solaris 9.
+ * lib/unistd.in.h (getusershell, setusershell, endusershell): Declare
+ also if HAVE_GETUSERSHELL && !HAVE_DECL_GETUSERSHELL.
+ * m4/getusershell.m4 (gl_FUNC_GETUSERSHELL): When the function exists,
+ check whether it is declared. Set HAVE_DECL_GETUSERSHELL.
+ * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
+ HAVE_DECL_GETUSERSHELL, not HAVE_GETUSERSHELL.
+ * modules/unistd (Makefile.am): Substitute HAVE_DECL_GETUSERSHELL, not
+ HAVE_GETUSERSHELL.
+ * doc/glibc-functions/getusershell.texi: Mention the Solaris problem.
+
2010-03-19 Bruno Haible <bruno@clisp.org>
wctype: Provide iswblank function.
@item
This function is missing on some platforms:
AIX 4.3.2, IRIX 6.5, mingw, Interix 3.5, BeOS.
+@item
+This function is missing a declaration on some platforms:
+Solaris 9.
@end itemize
Portability problems not fixed by Gnulib:
#if @GNULIB_GETUSERSHELL@
/* Return the next valid login shell on the system, or NULL when the end of
the list has been reached. */
-# if !@HAVE_GETUSERSHELL@
+# if !@HAVE_DECL_GETUSERSHELL@
_GL_FUNCDECL_SYS (getusershell, char *, (void));
# endif
_GL_CXXALIAS_SYS (getusershell, char *, (void));
#if @GNULIB_GETUSERSHELL@
/* Rewind to pointer that is advanced at each getusershell() call. */
-# if !@HAVE_GETUSERSHELL@
+# if !@HAVE_DECL_GETUSERSHELL@
_GL_FUNCDECL_SYS (setusershell, void, (void));
# endif
_GL_CXXALIAS_SYS (setusershell, void, (void));
#if @GNULIB_GETUSERSHELL@
/* Free the pointer that is advanced at each getusershell() call and
associated resources. */
-# if !@HAVE_GETUSERSHELL@
+# if !@HAVE_DECL_GETUSERSHELL@
_GL_FUNCDECL_SYS (endusershell, void, (void));
# endif
_GL_CXXALIAS_SYS (endusershell, void, (void));
-# getusershell.m4 serial 5
+# getusershell.m4 serial 6
dnl Copyright (C) 2002-2003, 2006, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl Persuade glibc <unistd.h> to declare {get,set,end}usershell().
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
- AC_REPLACE_FUNCS([getusershell])
- if test $ac_cv_func_getusershell = no; then
- HAVE_GETUSERSHELL=0
+ dnl Check whether the getusershell function exists.
+ AC_CHECK_FUNCS_ONCE([getusershell])
+ if test $ac_cv_func_getusershell = yes; then
+ dnl Check whether getusershell is declared.
+ AC_CHECK_DECLS([getusershell])
+ if test $ac_cv_have_decl_getusershell = no; then
+ HAVE_DECL_GETUSERSHELL=0
+ fi
+ else
+ AC_LIBOBJ([getusershell])
+ dnl Assume that on platforms which declare it, the function exists.
+ HAVE_DECL_GETUSERSHELL=0
fi
])
-# unistd_h.m4 serial 40
+# unistd_h.m4 serial 41
dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME])
HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN])
HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE])
- HAVE_GETUSERSHELL=1; AC_SUBST([HAVE_GETUSERSHELL])
HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN])
HAVE_LINK=1; AC_SUBST([HAVE_LINK])
HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT])
HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT])
HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON])
HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
+ HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL])
HAVE_OS_H=0; AC_SUBST([HAVE_OS_H])
HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H])
HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT])
-e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
-e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \
-e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
- -e 's|@''HAVE_GETUSERSHELL''@|$(HAVE_GETUSERSHELL)|g' \
-e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
-e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
-e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \
-e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
-e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
-e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
+ -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
-e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
-e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
-e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \