- If the operating system cannot provide all this information, then
- this macro will not be defined. */
-
-
-/* The operating system configuration file can define
- EMACS_CURRENT_TIME_ZONE. If not, we'll take a shot at it here. */
-
-#ifndef EMACS_CURRENT_TIME_ZONE
-
-/* If we have timeval, then we have gettimeofday; that's half the battle. */
-#ifdef HAVE_TIMEVAL
-#define EMACS_GET_TZ_OFFSET_AND_SAVINGS(offset, savings_flag) \
- do { \
- struct timeval dummy; \
- struct timezone zoneinfo; \
- \
- gettimeofday (&dummy, &zoneinfo); \
- *(offset) = zoneinfo.tz_minuteswest; \
- *(savings_flag) = zoneinfo.tz_dsttime; \
- } while (0)
-#endif /* ! defined (HAVE_TIMEVAL) */
-
-
-/* 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. */
-#if defined (ultrix) || defined (hpux) || defined (_AIX)
-
-#define EMACS_GET_TZ_NAMES(standard, savings) \
- do { \
- extern char *tzname[2]; \
- strcpy ((standard), tzname[0]); \
- strcpy ((savings), tzname[1]); \
- } while (0)
-
-#else /* ! defined (ultrix) || defined (hpux) || defined (_AIX) */
-/* If we are running SunOS, Mt. Xinu BSD, or MACH 2.5, these systems have a
- timezone() function. */
-#if (defined (hp9000) && ! defined (hpux) && defined (unix)) || defined (MACH) || defined (sun)
-
-#define EMACS_GET_TZ_NAMES(standard, savings) \
- do { \
- struct timeval dummy; \
- struct timezone zoneinfo; \
- extern char *timezone (); \
- \
- gettimeofday (&dummy, &zoneinfo); \
- strcpy ((standard), timezone (zoneinfo.tz_minuteswest, 0)); \
- strcpy ((savings), timezone (zoneinfo.tz_minuteswest, 1)); \
- } while (0)
-
-#endif /* ! (defined (hp9000) && ! defined (hpux) && defined (unix)) || defined (MACH) || defined (sun) */
-#endif /* ! defined (ultrix) || defined (hpux) || defined (_AIX) */
-
-/* If we can get all the information we need, let's define the macro! */
-#if defined (EMACS_GET_TZ_OFFSET_AND_SAVINGS) && defined (EMACS_GET_TZ_NAMES)
-
-#define EMACS_CURRENT_TIME_ZONE(offset, savings_flag, standard, savings)\
- do { \
- EMACS_GET_TZ_OFFSET_AND_SAVINGS (offset, savings_flag); \
- EMACS_GET_TZ_NAMES (standard, savings); \
- } while (0)
+#define EMACS_TIME_EQ(T1, T2) (EMACS_TIME_CMP (T1, T2) == 0)
+#define EMACS_TIME_NE(T1, T2) (EMACS_TIME_CMP (T1, T2) != 0)
+#define EMACS_TIME_GT(T1, T2) (EMACS_TIME_CMP (T1, T2) > 0)
+#define EMACS_TIME_GE(T1, T2) (EMACS_TIME_CMP (T1, T2) >= 0)
+#define EMACS_TIME_LT(T1, T2) (EMACS_TIME_CMP (T1, T2) < 0)
+#define EMACS_TIME_LE(T1, T2) (EMACS_TIME_CMP (T1, T2) <= 0)