diff options
Diffstat (limited to 'libf2c')
-rw-r--r-- | libf2c/ChangeLog | 9 | ||||
-rw-r--r-- | libf2c/libU77/acconfig.h | 4 | ||||
-rw-r--r-- | libf2c/libU77/config.hin | 3 | ||||
-rwxr-xr-x | libf2c/libU77/configure | 35 | ||||
-rw-r--r-- | libf2c/libU77/configure.in | 1 | ||||
-rw-r--r-- | libf2c/libU77/datetime_.c | 10 |
6 files changed, 61 insertions, 1 deletions
diff --git a/libf2c/ChangeLog b/libf2c/ChangeLog index 6e4a1f2e202..a899f27348d 100644 --- a/libf2c/ChangeLog +++ b/libf2c/ChangeLog @@ -1,3 +1,12 @@ +Sun Apr 11 23:30:42 1999 Mumit Khan <khan@xraylith.wisc.edu> + + * libU77/aclocal.m4: New file. + * libU77/configure.in (LIBU77_HAVE_STRUCT_TIMEZONE): Add test. + * libU77/acconfig.h (HAVE_STRUCT_TIMEZONE): Add macro. + * libU77/datetime_c.c (G77_date_and_time_0): Use. + * libU77/config.hin: Regenerate. + * libU77/configure: Likewise. + Wed Mar 31 13:50:24 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * configure.in (extra_includes): Don't attempt to calculate the diff --git a/libf2c/libU77/acconfig.h b/libf2c/libU77/acconfig.h index 12bba85b869..1400ba589b2 100644 --- a/libf2c/libU77/acconfig.h +++ b/libf2c/libU77/acconfig.h @@ -1,2 +1,6 @@ /* Define as the path of the `chmod' program. */ #undef CHMOD_PATH + +/* Define if your sys/time.h defines struct timezone. */ +#undef HAVE_STRUCT_TIMEZONE + diff --git a/libf2c/libU77/config.hin b/libf2c/libU77/config.hin index 8c3ba6baf57..27a89c05bb9 100644 --- a/libf2c/libU77/config.hin +++ b/libf2c/libU77/config.hin @@ -33,6 +33,9 @@ /* Define as the path of the `chmod' program. */ #undef CHMOD_PATH +/* Define if your sys/time.h defines struct timezone. */ +#undef HAVE_STRUCT_TIMEZONE + /* Define if you have the alarm function. */ #undef HAVE_ALARM diff --git a/libf2c/libU77/configure b/libf2c/libU77/configure index 61b05fc5387..fc8a4908c9f 100755 --- a/libf2c/libU77/configure +++ b/libf2c/libU77/configure @@ -1510,6 +1510,41 @@ test $ac_cv_func_gethostname = yes && MAYBES="$MAYBES hostnm_.o" test $ac_cv_func_clock = yes && MAYBES="$MAYBES mclock_.o" +echo $ac_n "checking whether struct timezone exists""... $ac_c" 1>&6 +echo "configure:1515: checking whether struct timezone exists" >&5 +if eval "test \"`echo '$''{'libu77_cv_have_struct_timezone'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1520 "configure" +#include "confdefs.h" +#include <sys/time.h> +int main() { +struct timezone tz; +; return 0; } +EOF +if { (eval echo configure:1527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + libu77_ac_have_struct_timezone=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + libu77_ac_have_struct_timezone=no +fi +rm -f conftest* +fi + +if test $libu77_ac_have_struct_timezone = yes; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<EOF +#define HAVE_STRUCT_TIMEZONE 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + diff --git a/libf2c/libU77/configure.in b/libf2c/libU77/configure.in index 58b8de31586..1262645c932 100644 --- a/libf2c/libU77/configure.in +++ b/libf2c/libU77/configure.in @@ -94,6 +94,7 @@ test $ac_cv_func_gethostname = yes && MAYBES="$MAYBES hostnm_.o" test $ac_cv_func_clock = yes && MAYBES="$MAYBES mclock_.o" AC_SUBST(MAYBES) +LIBU77_HAVE_STRUCT_TIMEZONE AC_SUBST(CROSS) AC_SUBST(RANLIB) diff --git a/libf2c/libU77/datetime_.c b/libf2c/libU77/datetime_.c index 35f0d1cdf74..faf773a944c 100644 --- a/libf2c/libU77/datetime_.c +++ b/libf2c/libU77/datetime_.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of GNU Fortran libU77 library. This library is free software; you can redistribute it and/or modify it @@ -62,8 +62,16 @@ int G77_date_and_time_0 (char *date, char *fftime, char *zone, #if HAVE_GETTIMEOFDAY { struct timeval tp; +#if HAVE_STRUCT_TIMEZONE struct timezone tzp; + /* This is still not strictly correct on some systems such as HPUX, + which does have struct timezone, but gettimeofday takes void* as + the 2nd arg. However, the effect of passing anything other than a null + pointer is unspecified on HPUX. */ if (! gettimeofday (&tp, &tzp)) +#else + if (! gettimeofday (&tp, (void *) 0)) +#endif vals[7] = tp.tv_usec/1000; } #endif |