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 3c4b1e91c0642e302b37278b40c123d1ee9b23be..1f3b79865bbc4e130aa1f275186767d38d507abb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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.
index 5d6f1b2e7f5336aa76cbea2c8479cf7ff8165191..077ef8113ec69c951e2a04d1c149d0ac1211d24b 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
 ])