summaryrefslogtreecommitdiff
path: root/m4/nanosleep.m4
diff options
context:
space:
mode:
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"