aboutsummaryrefslogtreecommitdiffstats
path: root/m4/dirfd.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/dirfd.m4')
-rw-r--r--m4/dirfd.m49
1 files changed, 5 insertions, 4 deletions
diff --git a/m4/dirfd.m4 b/m4/dirfd.m4
index b4ec3d1910b..d472c38549d 100644
--- a/m4/dirfd.m4
+++ b/m4/dirfd.m4
@@ -1,4 +1,4 @@
1# serial 24 -*- Autoconf -*- 1# serial 26 -*- Autoconf -*-
2 2
3dnl Find out how to get the file descriptor associated with an open DIR*. 3dnl Find out how to get the file descriptor associated with an open DIR*.
4 4
@@ -12,6 +12,7 @@ dnl From Jim Meyering
12AC_DEFUN([gl_FUNC_DIRFD], 12AC_DEFUN([gl_FUNC_DIRFD],
13[ 13[
14 AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) 14 AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
15 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
15 16
16 dnl Persuade glibc <dirent.h> to declare dirfd(). 17 dnl Persuade glibc <dirent.h> to declare dirfd().
17 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) 18 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
@@ -25,15 +26,15 @@ AC_DEFUN([gl_FUNC_DIRFD],
25 fi 26 fi
26 27
27 AC_CACHE_CHECK([whether dirfd is a macro], 28 AC_CACHE_CHECK([whether dirfd is a macro],
28 gl_cv_func_dirfd_macro, 29 [gl_cv_func_dirfd_macro],
29 [AC_EGREP_CPP([dirent_header_defines_dirfd], [ 30 [AC_EGREP_CPP([dirent_header_defines_dirfd], [
30#include <sys/types.h> 31#include <sys/types.h>
31#include <dirent.h> 32#include <dirent.h>
32#ifdef dirfd 33#ifdef dirfd
33 dirent_header_defines_dirfd 34 dirent_header_defines_dirfd
34#endif], 35#endif],
35 gl_cv_func_dirfd_macro=yes, 36 [gl_cv_func_dirfd_macro=yes],
36 gl_cv_func_dirfd_macro=no)]) 37 [gl_cv_func_dirfd_macro=no])])
37 38
38 # Use the replacement if we have no function or macro with that name, 39 # Use the replacement if we have no function or macro with that name,
39 # or if OS/2 kLIBC whose dirfd() does not work. 40 # or if OS/2 kLIBC whose dirfd() does not work.