changeset 97612:92ac38fd997e

Regenerate configure to get fixed autoconf mktime test Debian's autoconf package 2.61-7 includes a fix for the autoconf bug which caused AC_FUNC_MKTIME to hang for a long time when configuring. Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1387
author Miles Bader <miles@gnu.org>
date Fri, 22 Aug 2008 08:32:49 +0000
parents 1a5fb350d1e5
children d78633cfcc28
files configure
diffstat 1 files changed, 14 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Thu Aug 21 22:54:48 2008 +0000
+++ b/configure	Fri Aug 22 08:32:49 2008 +0000
@@ -16660,6 +16660,7 @@
 # endif
 #endif
 
+#include <limits.h>
 #include <stdlib.h>
 
 #ifdef HAVE_UNISTD_H
@@ -16808,12 +16809,15 @@
      isn't worth using anyway.  */
   alarm (60);
 
-  for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
-    continue;
-  time_t_max--;
-  if ((time_t) -1 < 0)
-    for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
-      continue;
+  for (;;)
+    {
+      t = (time_t_max << 1) + 1;
+      if (t <= time_t_max)
+	break;
+      time_t_max = t;
+    }
+  time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
+
   delta = time_t_max / 997; /* a suitable prime number */
   for (i = 0; i < N_STRINGS; i++)
     {
@@ -16828,10 +16832,12 @@
 	     && mktime_test ((time_t) (60 * 60 * 24))))
 	return 1;
 
-      for (j = 1; 0 < j; j *= 2)
+      for (j = 1; ; j <<= 1)
 	if (! bigtime_test (j))
 	  return 1;
-      if (! bigtime_test (j - 1))
+	else if (INT_MAX / 2 < j)
+	  break;
+      if (! bigtime_test (INT_MAX))
 	return 1;
     }
   return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());