changeset 1928:699033d79ee6

* systime.h [_AIX]: Move test outside of previous #if. (EMACS_GET_TZ_OFFSET) [USG]: Don't declare twice. Prefer tzset.
author Jim Blandy <jimb@redhat.com>
date Mon, 22 Feb 1993 14:51:13 +0000
parents c6dc1a37aeb4
children 8ca19160362b
files src/systime.h
diffstat 1 files changed, 12 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/systime.h	Mon Feb 22 14:50:42 1993 +0000
+++ b/src/systime.h	Mon Feb 22 14:51:13 1993 +0000
@@ -33,13 +33,13 @@
 #include <time.h>
 #endif /* _h_BSDTYPES */
 
+#endif
+
 /* AIX needs both <sys/time.h> and <time.h>.  */
 #ifdef _AIX
 #include <time.h>
 #endif
 
-#endif
-
 
 /* EMACS_TIME is the type to use to represent temporal intervals -
    struct timeval on some systems, int on others.  It can be passed as
@@ -184,8 +184,17 @@
 
 #ifndef EMACS_CURRENT_TIME_ZONE
 
+/* System V derivatives have a timezone global variable.  */
+#ifdef USG
+#define EMACS_GET_TZ_OFFSET(offset)					\
+  do {									\
+    tzset ();								\
+    *(offset) = timezone;						\
+  } while (0)
+#endif
+
 /* If we have timeval, then we have gettimeofday; that's half the battle.  */
-#ifdef HAVE_TIMEVAL
+#if defined (HAVE_TIMEVAL) && !defined (EMACS_GET_TZ_OFFSET)
 #define EMACS_GET_TZ_OFFSET(offset)					\
   do {									\
     struct timeval dummy;						\
@@ -196,15 +205,6 @@
   } while (0)
 #endif /* ! defined (HAVE_TIMEVAL) */
 
-/* System V derivatives have a timezone global variable.  */
-#ifdef USG
-#define EMACS_GET_TZ_OFFSET(offset)					\
-  do {									\
-    tzset ();								\
-    *(offset) = timezone;						\
-  } while (0)
-#endif
-
 /* The following sane systems have a tzname array.  The timezone() function
    is a stupid idea; timezone names can only be determined geographically,
    not by Greenwich offset.  */