diff options
Diffstat (limited to 'm4/dirfd.m4')
-rw-r--r-- | m4/dirfd.m4 | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/m4/dirfd.m4 b/m4/dirfd.m4 index 7968b12..e58582e 100644 --- a/m4/dirfd.m4 +++ b/m4/dirfd.m4 @@ -1,8 +1,8 @@ -# serial 28 -*- Autoconf -*- +# serial 30 -*- Autoconf -*- dnl Find out how to get the file descriptor associated with an open DIR*. -# Copyright (C) 2001-2006, 2008-2023 Free Software Foundation, Inc. +# Copyright (C) 2001-2006, 2008-2024 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -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 |