Branch: Tag:

1996-07-02

1996-07-02 13:08:52 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

gettimeofday should now work with linux

Rev: src/configure.in:1.14
Rev: src/machine.h.in:1.10
Rev: src/port.h:1.3

304:    AC_DEFINE(HAVE_EXTERNAL_TIMEZONE)   fi    + # No test for this yet... + AC_DEFINE(HAVE_STRUCT_TIMEVAL) +    AC_MSG_RESULT($lpc_cv_has_external_timezone)    -  + AC_MSG_CHECKING(if gettimeofday takes two arguments) + AC_CACHE_VAL(lpc_cv_func_gettimeofday_has_two_args, + [ + 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 + # if HAVE_TIME_H + # include <time.h> + # endif + # endif + #endif    -  + #ifndef HAVE_STRUCT_TIMEVAL + struct timeval + { +  long tv_sec; +  long tv_usec; + }; + #endif +  + int main() { +  struct timeval tv; +  gettimeofday(&tv,(void *)0); +  exit(0); + } + ], + lpc_cv_func_gettimeofday_has_two_args=yes, + lpc_cv_func_gettimeofday_has_two_args=no)]) +  + if test $lpc_cv_func_gettimeofday_has_two_args = yes; then +  AC_DEFINE(GETTIMEOFDAY_TAKES_TWO_ARGS) + fi +  + AC_MSG_RESULT($lpc_cv_func_gettimeofday_has_two_args) +    AC_MSG_CHECKING(if struct tm has tm_gmtoff)      AC_CACHE_VAL(lpc_cv_struct_tm_has_gmtoff,[
354:   MY_CHECK_HEADERS(getenv,unistd.h stdlib.h)   MY_CHECK_HEADERS(gethostname,unistd.h)    - # No test for this yet... - AC_DEFINE(HAVE_STRUCT_TIMEVAL) +       AC_MSG_CHECKING(return type of free)   AC_CACHE_VAL(lpc_cv_sys_free_return,