diff options
Diffstat (limited to 'm4/dirfd.m4')
-rw-r--r-- | m4/dirfd.m4 | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/m4/dirfd.m4 b/m4/dirfd.m4 index 6578dc0232b..e58582e6145 100644 --- a/m4/dirfd.m4 +++ b/m4/dirfd.m4 @@ -1,4 +1,4 @@ -# serial 28 -*- Autoconf -*- +# serial 30 -*- Autoconf -*- dnl Find out how to get the file descriptor associated with an open DIR*. @@ -40,15 +40,12 @@ AC_DEFUN([gl_FUNC_DIRFD], HAVE_DIRFD=0 else HAVE_DIRFD=1 - dnl Replace dirfd() on native Windows, to support fdopendir(). + dnl Replace dirfd() on native Windows and OS/2 kLIBC, + dnl to support fdopendir(). AC_REQUIRE([gl_DIRENT_DIR]) if test $DIR_HAS_FD_MEMBER = 0; then REPLACE_DIRFD=1 fi - dnl OS/2 kLIBC dirfd() does not work. - case "$host_os" in - os2*) REPLACE_DIRFD=1 ;; - esac fi ]) @@ -58,7 +55,7 @@ AC_DEFUN([gl_PREREQ_DIRFD], AC_CACHE_CHECK([how to get the file descriptor associated with an open DIR*], [gl_cv_sys_dir_fd_member_name], [ - dirfd_save_CFLAGS=$CFLAGS + gl_saved_CFLAGS=$CFLAGS for ac_expr in d_fd dd_fd; do CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr" @@ -68,7 +65,7 @@ AC_DEFUN([gl_PREREQ_DIRFD], [[DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;]])], [dir_fd_found=yes] ) - CFLAGS=$dirfd_save_CFLAGS + CFLAGS=$gl_saved_CFLAGS test "$dir_fd_found" = yes && break done test "$dir_fd_found" = yes || ac_expr=no_such_member |