From 758f820bcc0f68aeebac1717e537ca13a320b909 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 18:11:47 +0200 Subject: Adding upstream version 9.1. Signed-off-by: Daniel Baumann --- m4/mkfifoat.m4 | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 m4/mkfifoat.m4 (limited to 'm4/mkfifoat.m4') diff --git a/m4/mkfifoat.m4 b/m4/mkfifoat.m4 new file mode 100644 index 0000000..d7ce212 --- /dev/null +++ b/m4/mkfifoat.m4 @@ -0,0 +1,66 @@ +# serial 5 +# See if we need to provide mkfifoat/mknodat replacement. + +dnl Copyright (C) 2009-2022 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. + +# Written by Eric Blake. + +AC_DEFUN([gl_FUNC_MKFIFOAT], +[ + AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + dnl Persuade glibc to declare mkfifoat() and mknodat(). + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + + AC_REQUIRE([gl_FUNC_OPENAT]) + + AC_CHECK_FUNCS_ONCE([mkfifoat mknodat]) + if test $ac_cv_func_mkfifoat = yes; then + dnl Check for AIX 7.2 bug with trailing slash. + AC_CACHE_CHECK([whether mkfifoat rejects trailing slashes], + [gl_cv_func_mkfifoat_works], + [rm -f conftest.tmp + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + ]], + [[int result = 0; + if (!mkfifoat (AT_FDCWD, "conftest.tmp/", 0600)) + result |= 1; + return result; + ]]) + ], + [gl_cv_func_mkfifoat_works=yes], + [gl_cv_func_mkfifoat_works=no], + [case "$host_os" in + # Guess yes on Linux systems. + linux-* | linux) gl_cv_func_mkfifoat_works="guessing yes" ;; + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_mkfifoat_works="guessing yes" ;; + # Guess no on AIX systems. + aix*) gl_cv_func_mkfifoat_works="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_mkfifoat_works="$gl_cross_guess_normal" ;; + esac + ]) + rm -f conftest.tmp + ]) + case "$gl_cv_func_mkfifoat_works" in + *yes) ;; + *) + REPLACE_MKFIFOAT=1 + dnl mknodat() has the same bug as mkfifoat(). + REPLACE_MKNODAT=1 + ;; + esac + else + # No known system has mkfifoat but not mknodat + HAVE_MKFIFOAT=0 + HAVE_MKNODAT=0 + fi +]) -- cgit v1.2.3