summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2010-07-30 23:54:44 +0200
committerBruno Haible <bruno@clisp.org>2010-07-31 00:42:36 +0200
commitd614713a565235b36338496fe3b67a7932a8c78a (patch)
treeb96385812e4a3fa1c451d6d87a4848f07e8b7dcc /m4
parente95ae6d7e8f2627cf450649daf30071f1971f404 (diff)
downloadgnulib-d614713a565235b36338496fe3b67a7932a8c78a.tar.gz
dirfd: Avoid link error on AIX 7.1.
Diffstat (limited to 'm4')
-rw-r--r--m4/dirent_h.m43
-rw-r--r--m4/dirfd.m414
2 files changed, 10 insertions, 7 deletions
diff --git a/m4/dirent_h.m4 b/m4/dirent_h.m4
index 361296a6c2..8d9d565479 100644
--- a/m4/dirent_h.m4
+++ b/m4/dirent_h.m4
@@ -1,4 +1,4 @@
-# dirent_h.m4 serial 12
+# dirent_h.m4 serial 13
dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -51,6 +51,7 @@ AC_DEFUN([gl_DIRENT_H_DEFAULTS],
HAVE_SCANDIR=1; AC_SUBST([HAVE_SCANDIR])
HAVE_ALPHASORT=1; AC_SUBST([HAVE_ALPHASORT])
REPLACE_CLOSEDIR=0; AC_SUBST([REPLACE_CLOSEDIR])
+ REPLACE_DIRFD=0; AC_SUBST([REPLACE_DIRFD])
REPLACE_FDOPENDIR=0; AC_SUBST([REPLACE_FDOPENDIR])
REPLACE_OPENDIR=0; AC_SUBST([REPLACE_OPENDIR])
])
diff --git a/m4/dirfd.m4 b/m4/dirfd.m4
index 7fefa2e483..48b7bae1a8 100644
--- a/m4/dirfd.m4
+++ b/m4/dirfd.m4
@@ -1,4 +1,4 @@
-# serial 17 -*- Autoconf -*-
+# serial 18 -*- Autoconf -*-
dnl Find out how to get the file descriptor associated with an open DIR*.
@@ -40,11 +40,13 @@ AC_DEFUN([gl_FUNC_DIRFD],
gl_cv_func_dirfd_macro=yes,
gl_cv_func_dirfd_macro=no)])
- # Use the replacement only if we have no function, macro,
- # or declaration with that name.
- if test $ac_cv_func_dirfd,$ac_cv_have_decl_dirfd,$gl_cv_func_dirfd_macro \
- = no,no,no; then
- AC_REPLACE_FUNCS([dirfd])
+ # Use the replacement only if we have no function or macro with that name.
+ if test $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro = no,no; then
+ if test $ac_cv_have_decl_dirfd = yes; then
+ # If the system declares dirfd already, let's declare rpl_dirfd instead.
+ REPLACE_DIRFD=1
+ fi
+ AC_LIBOBJ([dirfd])
AC_CACHE_CHECK(
[how to get the file descriptor associated with an open DIR*],
gl_cv_sys_dir_fd_member_name,