From b088d58bdcbdbd7e58cd9609e2f0ceedb9f5ea57 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 23 Mar 1998 17:11:11 +0000 Subject: [PATCH] new mktime.m4 --- ChangeLog | 2 ++ m4/mktime.m4 | 31 ++++++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ca61199d..db5a4c2b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ Mon Mar 23 07:55:04 1998 Tom Tromey + * m4/mktime.m4: New version from Jim Meyering. + * aclocal.in (usage): Document --print-ac-dir. (parse_arguments): Added --print-ac-dir. diff --git a/m4/mktime.m4 b/m4/mktime.m4 index 8f9a8d92..ad937b74 100644 --- a/m4/mktime.m4 +++ b/m4/mktime.m4 @@ -1,4 +1,4 @@ -#serial 3 +#serial 4 dnl From Jim Meyering. dnl FIXME: this should migrate into libit. @@ -23,6 +23,17 @@ changequote(<<, >>)dnl # endif #endif +#if HAVE_UNISTD_H +# include +#endif + +#if !HAVE_ALARM +# define alarm(X) /* empty */ +#endif + +/* Work around redefinition to rpl_putenv by other config tests. */ +#undef putenv + static time_t time_t_max; /* Values we'll use to set the TZ environment variable. */ @@ -44,6 +55,23 @@ mktime_test (now) exit (1); } +static void +irix_6_4_bug () +{ + /* Based on code from Ariel Faigon. */ + struct tm tm; + tm.tm_year = 96; + tm.tm_mon = 3; + tm.tm_mday = 0; + tm.tm_hour = 0; + tm.tm_min = 0; + tm.tm_sec = 0; + tm.tm_isdst = -1; + mktime (&tm); + if (tm.tm_mon != 2 || tm.tm_mday != 31) + exit (1); +} + static void bigtime_test (j) int j; @@ -98,6 +126,7 @@ main () bigtime_test (j); bigtime_test (j - 1); } + irix_6_4_bug (); exit (0); } >>, -- 2.43.5