diff options
author | Dave Love <fx@gnu.org> | 2000-06-19 10:54:29 +0000 |
---|---|---|
committer | Dave Love <fx@gnu.org> | 2000-06-19 10:54:29 +0000 |
commit | 290c1191d03a6cc4a3e9b91124e639c57a133fc9 (patch) | |
tree | 6db3a9e4142ecd5b28cd7a4f84c92024f81902c5 /configure.in | |
parent | 6922f2087493b09b57797124f08f6a8ae9679232 (diff) | |
download | emacs-290c1191d03a6cc4a3e9b91124e639c57a133fc9.tar.gz |
(GETTIMEOFDAY_ONE_ARGUMENT): Fix in case _XOPEN_SOURCE is defined.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/configure.in b/configure.in index d7c7af312b5..91700caaf8a 100644 --- a/configure.in +++ b/configure.in @@ -1867,7 +1867,7 @@ AC_CHECK_FUNCS(gettimeofday gethostname getdomainname dup2 \ rename closedir mkdir rmdir sysinfo \ random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \ strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \ -utimes setrlimit setpgid getcwd shutdown strftime getaddrinfo \ +utimes setrlimit setpgid getcwd getwd shutdown strftime getaddrinfo \ __fpending getloadavg mblen mbrlen strsignal setitimer ualarm) AC_FUNC_MKTIME @@ -1978,15 +1978,30 @@ AC_TRY_LINK([ #else #include <time.h> #endif -#endif - ], - [ - struct timeval time; - struct timezone dummy; - gettimeofday (&time, &dummy); -], +#endif], + [struct timeval time; + struct timezone dummy; + gettimeofday (&time, &dummy);], emacs_cv_gettimeofday_two_arguments=yes, - emacs_cv_gettimeofday_two_arguments=no)) +dnl The above test loses, e.g. on OSF 5.0 with _XOPEN_SOURCE defined by +dnl AC_SYS_LARGEFILE, because struct timezone is hidden. +dnl Try again assuming a void * second arg. + AC_TRY_LINK([ +#ifdef TIME_WITH_SYS_TIME +#include <sys/time.h> +#include <time.h> +#else +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#else +#include <time.h> +#endif +#endif], + [struct timeval time; + int dummy; + gettimeofday (&time, &dummy);], + emacs_cv_gettimeofday_two_arguments=yes, + emacs_cv_gettimeofday_two_arguments=no))) if test $emacs_cv_gettimeofday_two_arguments = no; then AC_DEFINE(GETTIMEOFDAY_ONE_ARGUMENT) fi |