Mercurial > hg > octave-kai > gnulib-hg
changeset 2160:72cc32066c5d
(jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
Use AC_HEADER_TIME. Volker Borchert reported that OpenBSD-2.3/sparc
defines `struct timespec' in <sys/time.h>
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Wed, 19 Jan 2000 20:40:51 +0000 |
parents | 27039521fde0 |
children | ed7e808dc3f9 |
files | m4/nanosleep.m4 |
diffstat | 1 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/m4/nanosleep.m4 +++ b/m4/nanosleep.m4 @@ -13,8 +13,19 @@ 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 ()