summaryrefslogtreecommitdiffstats
path: root/m4/nanosleep.m4
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 08:56:01 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 08:56:01 +0000
commit502c540485a1626fce474639d572904a4e3c55fe (patch)
treec8bb1ed8bda9ce49697a30eaab650191e9462e2a /m4/nanosleep.m4
parentAdding debian version 1.21.4-1. (diff)
downloadwget-502c540485a1626fce474639d572904a4e3c55fe.tar.xz
wget-502c540485a1626fce474639d572904a4e3c55fe.zip
Merging upstream version 1.24.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--m4/nanosleep.m425
1 files changed, 15 insertions, 10 deletions
diff --git a/m4/nanosleep.m4 b/m4/nanosleep.m4
index e21a3e3..ff730b6 100644
--- a/m4/nanosleep.m4
+++ b/m4/nanosleep.m4
@@ -1,11 +1,11 @@
-# serial 43
+# serial 47
dnl From Jim Meyering.
dnl Check for the nanosleep function.
dnl If not found, use the supplied replacement.
dnl
-# Copyright (C) 1999-2001, 2003-2023 Free Software Foundation, Inc.
+# Copyright (C) 1999-2001, 2003-2024 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -21,7 +21,7 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
AC_CHECK_DECLS_ONCE([alarm])
- nanosleep_save_libs=$LIBS
+ gl_saved_LIBS=$LIBS
# Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
# Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
@@ -116,19 +116,24 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
*) gl_cv_func_nanosleep=no ;;
esac],
[case "$host_os" in
- linux*) # Guess it halfway works when the kernel is Linux.
+ # Guess it halfway works when the kernel is Linux.
+ linux*)
gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
- mingw*) # Guess no on native Windows.
+ # Midipix generally emulates the Linux system calls,
+ # but here it handles large arguments correctly.
+ midipix*)
+ gl_cv_func_nanosleep='guessing yes' ;;
+ # Guess no on native Windows.
+ mingw* | windows*)
gl_cv_func_nanosleep='guessing no' ;;
- *) # If we don't know, obey --enable-cross-guesses.
+ # If we don't know, obey --enable-cross-guesses.
+ *)
gl_cv_func_nanosleep="$gl_cross_guess_normal" ;;
esac
])
])
case "$gl_cv_func_nanosleep" in
- *yes)
- REPLACE_NANOSLEEP=0
- ;;
+ *yes) ;;
*)
REPLACE_NANOSLEEP=1
case "$gl_cv_func_nanosleep" in
@@ -142,7 +147,7 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
else
HAVE_NANOSLEEP=0
fi
- LIBS=$nanosleep_save_libs
+ LIBS=$gl_saved_LIBS
# For backward compatibility.
LIB_NANOSLEEP="$NANOSLEEP_LIB"