aboutsummaryrefslogtreecommitdiff
path: root/libf2c
diff options
context:
space:
mode:
authorMumit Khan <khan@xraylith.wisc.edu>1999-04-11 22:35:17 +0000
committerJeff Law <law@gcc.gnu.org>1999-04-11 16:35:17 -0600
commit2bcf042cce2f484a0e7ba385b597a6bfb4af8005 (patch)
treedd16fac232282ee1ffae2ddc2ed25b4eaec02499 /libf2c
parent36eb4217ac1176310c53f97c252c55054cfe0722 (diff)
downloadgcc-2bcf042cce2f484a0e7ba385b597a6bfb4af8005.zip
gcc-2bcf042cce2f484a0e7ba385b597a6bfb4af8005.tar.gz
gcc-2bcf042cce2f484a0e7ba385b597a6bfb4af8005.tar.bz2
aclocal.m4: New file.
* 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
Diffstat (limited to 'libf2c')
-rw-r--r--libf2c/ChangeLog9
-rw-r--r--libf2c/libU77/acconfig.h4
-rw-r--r--libf2c/libU77/config.hin3
-rwxr-xr-xlibf2c/libU77/configure35
-rw-r--r--libf2c/libU77/configure.in1
-rw-r--r--libf2c/libU77/datetime_.c10
6 files changed, 61 insertions, 1 deletions
diff --git a/libf2c/ChangeLog b/libf2c/ChangeLog
index 6e4a1f2..a899f27 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 12bba85..1400ba5 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 8c3ba6b..27a89c0 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 61b05fc..fc8a490 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 58b8de3..1262645 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 35f0d1c..faf773a 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