From 3016e65a933d98cbffc985d1330b29f9c1454340 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 20 Dec 2010 12:22:17 +0100 Subject: [PATCH] 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. --- ChangeLog | 6 ++++++ m4/getlogin_r.m4 | 11 ++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3c4b1e91c..1f3b79865 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2010-12-20 Bruno Haible + 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 + wcsrtombs: Don't confuse mbstate_t with rpl_mbstate_t. * lib/wcsrtombs.c: If gnulib overrides mbstate_t, define wcsrtombs through wcrtomb. diff --git a/m4/getlogin_r.m4 b/m4/getlogin_r.m4 index 5d6f1b2e7..077ef8113 100644 --- a/m4/getlogin_r.m4 +++ b/m4/getlogin_r.m4 @@ -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 ]) -- 2.11.0