summaryrefslogtreecommitdiffstats
path: root/gl/m4/fchdir.m4
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:38:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:38:57 +0000
commitf5b6b735a731901f09d7f3cc153c1d869269ee83 (patch)
tree565a1b0f3c6a4094a5f2198879fb239053549f1e /gl/m4/fchdir.m4
parentAdding upstream version 2.12.0. (diff)
downloadman-db-4f7a434e7e8e6c9e616306e3c452a812bc4b6019.tar.xz
man-db-4f7a434e7e8e6c9e616306e3c452a812bc4b6019.zip
Adding upstream version 2.12.1.upstream/2.12.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gl/m4/fchdir.m4')
-rw-r--r--gl/m4/fchdir.m434
1 files changed, 21 insertions, 13 deletions
diff --git a/gl/m4/fchdir.m4 b/gl/m4/fchdir.m4
index b587e0e..fc0ed33 100644
--- a/gl/m4/fchdir.m4
+++ b/gl/m4/fchdir.m4
@@ -1,5 +1,5 @@
-# fchdir.m4 serial 28
-dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
+# fchdir.m4 serial 32
+dnl Copyright (C) 2006-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -16,7 +16,15 @@ AC_DEFUN([gl_FUNC_FCHDIR],
fi
AC_REQUIRE([gl_TEST_FCHDIR])
- if test $HAVE_FCHDIR = 0; then
+ if test $HAVE_FCHDIR = 1; then
+ AC_REQUIRE([gl_DIRENT_DIR])
+ if test $DIR_HAS_FD_MEMBER = 0; then
+ dnl fchdir() should be replaced if dirfd() does not work.
+ REPLACE_FCHDIR=1
+ fi
+ fi
+
+ if test $HAVE_FCHDIR = 0 || test $REPLACE_FCHDIR = 1; then
AC_DEFINE([REPLACE_FCHDIR], [1],
[Define to 1 if gnulib's fchdir() replacement is used.])
dnl We must also replace anything that can manipulate a directory fd,
@@ -32,16 +40,16 @@ AC_DEFUN([gl_FUNC_FCHDIR],
[gl_cv_func_open_directory_works=yes],
[gl_cv_func_open_directory_works=no],
[case "$host_os" in
- # Guess yes on Linux systems.
- linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
- # Guess yes on systems that emulate the Linux system calls.
- midipix*) gl_cv_func_open_directory_works="guessing yes" ;;
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
- # Guess no on native Windows.
- mingw*) gl_cv_func_open_directory_works="guessing no" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_open_directory_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw* | windows*) gl_cv_func_open_directory_works="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;;
esac
])])
case "$gl_cv_func_open_directory_works" in