projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
*** empty log message ***
[gnulib.git]
/
m4
/
nanosleep.m4
diff --git
a/m4/nanosleep.m4
b/m4/nanosleep.m4
index
c73a3ff
..
0395804
100644
(file)
--- a/
m4/nanosleep.m4
+++ b/
m4/nanosleep.m4
@@
-1,7
+1,8
@@
#serial 2
dnl From Jim Meyering.
#serial 2
dnl From Jim Meyering.
-dnl Check for the nanosleep function
+dnl Check for the nanosleep function.
+dnl If not found, use the supplied replacement.
dnl
AC_DEFUN(jm_FUNC_NANOSLEEP,
dnl
AC_DEFUN(jm_FUNC_NANOSLEEP,
@@
-12,8
+13,19
@@
AC_DEFUN(jm_FUNC_NANOSLEEP,
AC_CACHE_CHECK([whether nanosleep works],
jm_cv_func_nanosleep_works,
AC_CACHE_CHECK([whether nanosleep works],
jm_cv_func_nanosleep_works,
- [AC_TRY_RUN([
-# include <time.h>
+ [
+ AC_HEADER_TIME
+ AC_TRY_RUN([
+# if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+# else
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+# endif
int
main ()
int
main ()