getlogin_r: Add missing declaration on HP-UX 11.
authorBruno Haible <bruno@clisp.org>
Mon, 20 Dec 2010 11:22:17 +0000 (12:22 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 20 Dec 2010 11:22:17 +0000 (12:22 +0100)
* m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Test whether getlogin_r is
declared also when it exists as a function.

ChangeLog
m4/getlogin_r.m4

index 3c4b1e9..1f3b798 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2010-12-20  Bruno Haible  <bruno@clisp.org>
 
+       getlogin_r: Add missing declaration on HP-UX 11.
+       * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Test whether getlogin_r is
+       declared also when it exists as a function.
+
+2010-12-20  Bruno Haible  <bruno@clisp.org>
+
        wcsrtombs: Don't confuse mbstate_t with rpl_mbstate_t.
        * lib/wcsrtombs.c: If gnulib overrides mbstate_t, define wcsrtombs
        through wcrtomb.
index 5d6f1b2..077ef81 100644 (file)
@@ -1,4 +1,4 @@
-#serial 7
+#serial 8
 
 # Copyright (C) 2005-2007, 2009-2010 Free Software Foundation, Inc.
 #
@@ -20,14 +20,15 @@ AC_DEFUN([gl_FUNC_GETLOGIN_R],
   dnl getlogin_r().
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
 
+  AC_CHECK_DECLS_ONCE([getlogin_r])
+  if test $ac_cv_have_decl_getlogin_r = no; then
+    HAVE_DECL_GETLOGIN_R=0
+  fi
+
   AC_CHECK_FUNCS_ONCE([getlogin_r])
   if test $ac_cv_func_getlogin_r = no; then
     AC_LIBOBJ([getlogin_r])
     gl_PREREQ_GETLOGIN_R
-    AC_CHECK_DECLS_ONCE([getlogin_r])
-    if test $ac_cv_have_decl_getlogin_r = no; then
-      HAVE_DECL_GETLOGIN_R=0
-    fi
   fi
 ])