* 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.
From-SVN: r26353
+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
/* 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 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
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
+
test $ac_cv_func_clock = yes && MAYBES="$MAYBES mclock_.o"
AC_SUBST(MAYBES)
+LIBU77_HAVE_STRUCT_TIMEZONE
AC_SUBST(CROSS)
AC_SUBST(RANLIB)
-/* 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
#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