From 5be04ec2ceb1df77afbca4fcbf9e92a712612d6f Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Thu, 31 Oct 2024 16:27:12 +0100 Subject: Sync with the latest Gnulib code (d4ec02b3cc) --- gl/m4/fopen.m4 | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'gl/m4/fopen.m4') diff --git a/gl/m4/fopen.m4 b/gl/m4/fopen.m4 index 9c39ff72..f3b7aadd 100644 --- a/gl/m4/fopen.m4 +++ b/gl/m4/fopen.m4 @@ -1,15 +1,16 @@ -# fopen.m4 serial 13 -dnl Copyright (C) 2007-2023 Free Software Foundation, Inc. +# fopen.m4 +# serial 16 +dnl Copyright (C) 2007-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. -AC_DEFUN([gl_FUNC_FOPEN], +AC_DEFUN([gl_FUNC_FOPEN_ITSELF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) case "$host_os" in - mingw* | pw*) + mingw* | windows* | pw*) dnl Replace fopen, for handling of "/dev/null". REPLACE_FOPEN=1 dnl fopen on mingw also has the trailing slash bug. @@ -58,6 +59,15 @@ changequote([,])dnl esac ]) +AC_DEFUN([gl_FUNC_FOPEN], +[ + AC_REQUIRE([gl_FUNC_FOPEN_ITSELF]) + AC_REQUIRE([gl_FUNC_FCLOSE]) + if test $REPLACE_FCLOSE = 1; then + REPLACE_FOPEN=1 + fi +]) + AC_DEFUN([gl_FUNC_FOPEN_GNU], [ AC_REQUIRE([gl_FUNC_FOPEN]) @@ -87,7 +97,7 @@ int main () [gl_cv_func_fopen_mode_x=no], [case "$host_os" in # Guess yes on glibc and musl systems. - linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*) + linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl* | midipix*) gl_cv_func_fopen_mode_x="guessing yes" ;; # If we don't know, obey --enable-cross-guesses. *) @@ -124,10 +134,10 @@ int main () [gl_cv_func_fopen_mode_e=no], [case "$host_os" in # Guess yes on glibc and musl systems. - linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*) + linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl* | midipix*) gl_cv_func_fopen_mode_e="guessing yes" ;; # Guess no on native Windows. - mingw*) + mingw* | windows*) gl_cv_func_fopen_mode_e="guessing no" ;; # If we don't know, obey --enable-cross-guesses. *) -- cgit v1.2.3-74-g34f1