From: Tom Tromey Date: Mon, 23 Mar 1998 17:11:16 +0000 (+0000) Subject: new mktime.m4 X-Git-Tag: Release-1-2h~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=20fd4e26f16e03af518dc69ef45e6d66a635e167;p=thirdparty%2Fautomake.git new mktime.m4 --- diff --git a/ChangeLog b/ChangeLog index ca61199d6..db5a4c2b0 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 8f9a8d92a..ad937b74f 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); } >>,