From 1ded63c22e766cd6532988e86e2983127c2219e7 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 22 Apr 1999 21:50:44 +0000 Subject: [PATCH] * automake.texi: Don't mention AM_FUNC_MKTIME. * aclocal.in (obsolete_macros): Mention AM_FUNC_MKTIME. * automake.in (scan_one_configure_file): Recognize AC_FUNC_MKTIME, not AM_FUNC_MKTIME. (obsolete_macros): Mention AM_FUNC_MKTIME. * m4/Makefile.am (m4data_DATA): Removed mktime.m4. * m4/mktime.m4: Removed. --- ChangeLog | 10 +++ aclocal.in | 1 + automake.in | 3 +- automake.texi | 7 +-- m4/Makefile.am | 4 +- m4/Makefile.in | 4 +- m4/mktime.m4 | 168 ------------------------------------------------- stamp-vti | 2 +- version.texi | 2 +- 9 files changed, 21 insertions(+), 180 deletions(-) delete mode 100644 m4/mktime.m4 diff --git a/ChangeLog b/ChangeLog index 4dfa30c7..c64b0d36 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +1999-04-22 Tom Tromey + + * automake.texi: Don't mention AM_FUNC_MKTIME. + * aclocal.in (obsolete_macros): Mention AM_FUNC_MKTIME. + * automake.in (scan_one_configure_file): Recognize + AC_FUNC_MKTIME, not AM_FUNC_MKTIME. + (obsolete_macros): Mention AM_FUNC_MKTIME. + * m4/Makefile.am (m4data_DATA): Removed mktime.m4. + * m4/mktime.m4: Removed. + 1999-04-20 Tom Tromey * automake.texi (Top level): Don't recommend substing SUBDIRS. diff --git a/aclocal.in b/aclocal.in index 715ccb2c..ce7a1a23 100644 --- a/aclocal.in +++ b/aclocal.in @@ -93,6 +93,7 @@ $verbosity = 0; 'AM_EXEEXT', "use \`AC_EXEEXT'", 'AM_CYGWIN32', "use \`AC_CYGWIN32'", 'AM_MINGW32', "use \`AC_MINGW32'", + 'AM_FUNC_MKTIME', "use \`AC_FUNC_MKTIME'", # These aren't quite obsolete. # 'md_PATH_PROG', diff --git a/automake.in b/automake.in index 8be24fe9..b46d6944 100755 --- a/automake.in +++ b/automake.in @@ -297,6 +297,7 @@ $cygnus_mode = 0; 'AM_EXEEXT', "use \`AC_EXEEXT'", 'AM_CYGWIN32', "use \`AC_CYGWIN32'", 'AM_MINGW32', "use \`AC_MINGW32'", + 'AM_FUNC_MKTIME', "use \`AC_FUNC_MKTIME'", # These aren't quite obsolete. # 'md_PATH_PROG', @@ -4165,7 +4166,7 @@ sub scan_one_configure_file $omit_dependencies{'rx.h'} = 1; $omit_dependencies{'regex.h'} = 1; } - elsif (/AM_FUNC_MKTIME/) + elsif (/AC_FUNC_MKTIME/) { $libsources{'mktime.c'} = 1; } diff --git a/automake.texi b/automake.texi index 3c8ba671..dc37d164 100644 --- a/automake.texi +++ b/automake.texi @@ -1059,6 +1059,7 @@ Autoconf Manual}. @itemx AC_FUNC_MEMCMP @itemx AC_STRUCT_ST_BLOCKS @itemx AC_FUNC_FNMATCH +@itemx AC_FUNC_MKTIME @itemx AM_FUNC_STRTOD @itemx AC_REPLACE_FUNCS @itemx AC_REPLACE_GNU_GETOPT @@ -1080,6 +1081,7 @@ Functions, , Particular Function Checks, autoconf, The Autoconf Manual}. @cvindex AC_REPLACE_GNU_GETOPT @cvindex AM_FUNC_STRTOD @cvindex AM_WITH_REGEX +@cvindex AC_FUNC_MKTIME @item LIBOBJS Automake will detect statements which put @file{.o} files into @@ -1282,11 +1284,6 @@ If the function @code{error_at_line} is not found, then add @file{error.o} to @code{LIBOBJS}. @cvindex AM_FUNC_ERROR_AT_LINE -@item AM_FUNC_MKTIME -Check for a working @code{mktime} function. If not found, add -@file{mktime.o} to @samp{LIBOBJS}. -@cvindex AM_FUNC_MKTIME - @item AM_FUNC_OBSTACK Check for the GNU obstacks code; if not found, add @file{obstack.o} to @samp{LIBOBJS}. diff --git a/m4/Makefile.am b/m4/Makefile.am index 050c75a9..ecdcabeb 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -5,8 +5,8 @@ MAINT_CHARSET = latin1 m4datadir = $(datadir)/aclocal m4data_DATA = ccstdc.m4 cond.m4 dmalloc.m4 error.m4 gcj.m4 header.m4 \ -init.m4 lex.m4 lispdir.m4 maintainer.m4 minuso.m4 missing.m4 mktime.m4 \ -multi.m4 obstack.m4 protos.m4 ptrdiff.m4 regex.m4 sanity.m4 strtod.m4 \ +init.m4 lex.m4 lispdir.m4 maintainer.m4 minuso.m4 missing.m4 multi.m4 \ +obstack.m4 protos.m4 ptrdiff.m4 regex.m4 sanity.m4 strtod.m4 \ termios.m4 winsz.m4 EXTRA_DIST = $(m4data_DATA) diff --git a/m4/Makefile.in b/m4/Makefile.in index ec335502..fb08215d 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -70,8 +70,8 @@ MAINT_CHARSET = latin1 m4datadir = $(datadir)/aclocal m4data_DATA = ccstdc.m4 cond.m4 dmalloc.m4 error.m4 gcj.m4 header.m4 \ -init.m4 lex.m4 lispdir.m4 maintainer.m4 minuso.m4 missing.m4 mktime.m4 \ -multi.m4 obstack.m4 protos.m4 ptrdiff.m4 regex.m4 sanity.m4 strtod.m4 \ +init.m4 lex.m4 lispdir.m4 maintainer.m4 minuso.m4 missing.m4 multi.m4 \ +obstack.m4 protos.m4 ptrdiff.m4 regex.m4 sanity.m4 strtod.m4 \ termios.m4 winsz.m4 diff --git a/m4/mktime.m4 b/m4/mktime.m4 deleted file mode 100644 index c7434aba..00000000 --- a/m4/mktime.m4 +++ /dev/null @@ -1,168 +0,0 @@ -#serial 5 - -dnl From Jim Meyering. -dnl FIXME: this should migrate into libit. - -AC_DEFUN(AM_FUNC_MKTIME, -[AC_REQUIRE([AC_HEADER_TIME])dnl - AC_CHECK_HEADERS(sys/time.h unistd.h) - AC_CHECK_FUNCS(alarm) - AC_CACHE_CHECK([for working mktime], am_cv_func_working_mktime, - [AC_TRY_RUN( -changequote(<<, >>)dnl -< -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# 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. */ -static const char *const tz_strings[] = { - (const char *) 0, "TZ=GMT0", "TZ=JST-9", - "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" -}; -#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) - -/* Fail if mktime fails to convert a date in the spring-forward gap. - Based on a problem report from Andreas Jaeger. */ -static void -spring_forward_gap () -{ - /* glibc (up to about 1998-10-07) failed this test) */ - struct tm tm; - - /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" - instead of "TZ=America/Vancouver" in order to detect the bug even - on systems that don't support the Olson extension, or don't have the - full zoneinfo tables installed. */ - putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); - - tm.tm_year = 98; - tm.tm_mon = 3; - tm.tm_mday = 5; - tm.tm_hour = 2; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_isdst = -1; - if (mktime (&tm) == (time_t)-1) - exit (1); -} - -static void -mktime_test (now) - time_t now; -{ - struct tm *lt; - if ((lt = localtime (&now)) && mktime (lt) != now) - exit (1); - now = time_t_max - now; - if ((lt = localtime (&now)) && mktime (lt) != 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; -{ - struct tm tm; - time_t now; - tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; - now = mktime (&tm); - if (now != (time_t) -1) - { - struct tm *lt = localtime (&now); - if (! (lt - && lt->tm_year == tm.tm_year - && lt->tm_mon == tm.tm_mon - && lt->tm_mday == tm.tm_mday - && lt->tm_hour == tm.tm_hour - && lt->tm_min == tm.tm_min - && lt->tm_sec == tm.tm_sec - && lt->tm_yday == tm.tm_yday - && lt->tm_wday == tm.tm_wday - && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) - == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) - exit (1); - } -} - -int -main () -{ - time_t t, delta; - int i, j; - - /* This test makes some buggy mktime implementations loop. - Give up after 60 seconds; a mktime slower than that - isn't worth using anyway. */ - alarm (60); - - for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2) - continue; - time_t_max--; - delta = time_t_max / 997; /* a suitable prime number */ - for (i = 0; i < N_STRINGS; i++) - { - if (tz_strings[i]) - putenv (tz_strings[i]); - - for (t = 0; t <= time_t_max - delta; t += delta) - mktime_test (t); - mktime_test ((time_t) 60 * 60); - mktime_test ((time_t) 60 * 60 * 24); - - for (j = 1; 0 < j; j *= 2) - bigtime_test (j); - bigtime_test (j - 1); - } - irix_6_4_bug (); - spring_forward_gap (); - exit (0); -} - >>, -changequote([, ])dnl - am_cv_func_working_mktime=yes, am_cv_func_working_mktime=no, - dnl When crosscompiling, assume mktime is missing or broken. - am_cv_func_working_mktime=no) - ]) - if test $am_cv_func_working_mktime = no; then - LIBOBJS="$LIBOBJS mktime.$ac_objext" - fi -]) diff --git a/stamp-vti b/stamp-vti index 947c4ce6..3bbba983 100644 --- a/stamp-vti +++ b/stamp-vti @@ -1,3 +1,3 @@ -@set UPDATED 13 April 1999 +@set UPDATED 22 April 1999 @set EDITION 1.4a @set VERSION 1.4a diff --git a/version.texi b/version.texi index 947c4ce6..3bbba983 100644 --- a/version.texi +++ b/version.texi @@ -1,3 +1,3 @@ -@set UPDATED 13 April 1999 +@set UPDATED 22 April 1999 @set EDITION 1.4a @set VERSION 1.4a -- 2.43.5