projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix some portability problems in the previous change.
[gnulib.git]
/
m4
/
getlogin_r.m4
diff --git
a/m4/getlogin_r.m4
b/m4/getlogin_r.m4
index
71148bd
..
8e5a2a3
100644
(file)
--- a/
m4/getlogin_r.m4
+++ b/
m4/getlogin_r.m4
@@
-1,6
+1,6
@@
-#serial
1
+#serial
4
-# Copyright (C) 2005 Free Software Foundation, Inc.
+# Copyright (C) 2005
, 2006, 2007
Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@
-11,23
+11,23
@@
dnl
dnl Provide getlogin_r when the system lacks it.
dnl
dnl Provide getlogin_r when the system lacks it.
dnl
-AC_DEFUN([gl_GETLOGIN_R_SUBSTITUTE],
-[
- gl_PREREQ_GETLOGIN_R
- AC_LIBSOURCE([getlogin_r.h])
- AC_LIBOBJ([getlogin_r])
-])
-
AC_DEFUN([gl_GETLOGIN_R],
[
AC_DEFUN([gl_GETLOGIN_R],
[
- AC_REPLACE_FUNCS([getlogin_r])
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([getlogin_r])
if test $ac_cv_func_getlogin_r = no; then
if test $ac_cv_func_getlogin_r = no; then
- gl_GETLOGIN_R_SUBSTITUTE
+ AC_LIBOBJ([getlogin_r])
+ gl_PREREQ_GETLOGIN_R
+ if test $ac_cv_have_decl_getlogin_r = yes; then
+ HAVE_DECL_GETLOGIN_R=1
+ else
+ HAVE_DECL_GETLOGIN_R=0
+ fi
fi
])
AC_DEFUN([gl_PREREQ_GETLOGIN_R],
[
fi
])
AC_DEFUN([gl_PREREQ_GETLOGIN_R],
[
- AC_CHECK_
HEADERS_ONCE([unistd.h
])
- AC_CHECK_DECLS_ONCE([getlogin
getlogin
_r])
+ AC_CHECK_
DECLS_ONCE([getlogin
])
+ AC_CHECK_DECLS_ONCE([getlogin_r])
])
])