X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fgetlogin_r.m4;h=236872c96ed8bae09a901f0a74e2a28f42adf36e;hb=5510d3df6c49b73ed41fd3243c276f96a3c3f9d4;hp=d30b2e7c744af3c4318c9e784cf9233e4d3fcd0a;hpb=8d8eda4eab3d2801251daf4eb31756c3595e2fc6;p=gnulib.git diff --git a/m4/getlogin_r.m4 b/m4/getlogin_r.m4 index d30b2e7c7..236872c96 100644 --- a/m4/getlogin_r.m4 +++ b/m4/getlogin_r.m4 @@ -1,6 +1,6 @@ -#serial 4 +#serial 6 -# Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc. +# Copyright (C) 2005-2007, 2009-2010 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -11,16 +11,19 @@ dnl dnl Provide getlogin_r when the system lacks it. dnl -AC_DEFUN([gl_GETLOGIN_R], +AC_DEFUN([gl_FUNC_GETLOGIN_R], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + + dnl Persuade glibc to declare getlogin_r(). + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_FUNCS_ONCE([getlogin_r]) if test $ac_cv_func_getlogin_r = no; then AC_LIBOBJ([getlogin_r]) gl_PREREQ_GETLOGIN_R - if test $ac_cv_have_decl_getlogin_r = yes; then - HAVE_DECL_GETLOGIN_R=1 - else + AC_CHECK_DECLS_ONCE([getlogin_r]) + if test $ac_cv_have_decl_getlogin_r = no; then HAVE_DECL_GETLOGIN_R=0 fi fi @@ -29,5 +32,4 @@ AC_DEFUN([gl_GETLOGIN_R], AC_DEFUN([gl_PREREQ_GETLOGIN_R], [ AC_CHECK_DECLS_ONCE([getlogin]) - AC_CHECK_DECLS_ONCE([getlogin_r]) ])