summaryrefslogtreecommitdiff
path: root/m4/nanosleep.m4
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2024-04-01 17:58:04 +0800
committerSean Whitton <spwhitton@spwhitton.name>2024-04-01 17:58:04 +0800
commit3af419ed0f0bf23320f8a7ac3479e2c50c353cde (patch)
treefa45f6aee9812f8684ca888823c89cdcc89e6ddb /m4/nanosleep.m4
parent101801ca13632ae17b486f690701b9cb36868676 (diff)
parent87be53846bfbf5a6387cb5a40105bd0fc5b48b38 (diff)
downloademacs-3af419ed0f0bf23320f8a7ac3479e2c50c353cde.tar.gz
Merge upstream Git snapshot into athena/unstable
Diffstat (limited to 'm4/nanosleep.m4')
-rw-r--r--m4/nanosleep.m419
1 files changed, 13 insertions, 6 deletions
diff --git a/m4/nanosleep.m4 b/m4/nanosleep.m4
index ad3f68cb75b..ff730b676cd 100644
--- a/m4/nanosleep.m4
+++ b/m4/nanosleep.m4
@@ -1,4 +1,4 @@
-# serial 44
+# serial 47
dnl From Jim Meyering.
dnl Check for the nanosleep function.
@@ -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,11 +116,18 @@ 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
])
@@ -140,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"