comparison configure @ 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 de1050b88068
children dafd1efe2d45
comparison
equal deleted inserted replaced
97611:1a5fb350d1e5 97612:92ac38fd997e
16658 # else 16658 # else
16659 # include <time.h> 16659 # include <time.h>
16660 # endif 16660 # endif
16661 #endif 16661 #endif
16662 16662
16663 #include <limits.h>
16663 #include <stdlib.h> 16664 #include <stdlib.h>
16664 16665
16665 #ifdef HAVE_UNISTD_H 16666 #ifdef HAVE_UNISTD_H
16666 # include <unistd.h> 16667 # include <unistd.h>
16667 #endif 16668 #endif
16806 /* This test makes some buggy mktime implementations loop. 16807 /* This test makes some buggy mktime implementations loop.
16807 Give up after 60 seconds; a mktime slower than that 16808 Give up after 60 seconds; a mktime slower than that
16808 isn't worth using anyway. */ 16809 isn't worth using anyway. */
16809 alarm (60); 16810 alarm (60);
16810 16811
16811 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2) 16812 for (;;)
16812 continue; 16813 {
16813 time_t_max--; 16814 t = (time_t_max << 1) + 1;
16814 if ((time_t) -1 < 0) 16815 if (t <= time_t_max)
16815 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2) 16816 break;
16816 continue; 16817 time_t_max = t;
16818 }
16819 time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
16820
16817 delta = time_t_max / 997; /* a suitable prime number */ 16821 delta = time_t_max / 997; /* a suitable prime number */
16818 for (i = 0; i < N_STRINGS; i++) 16822 for (i = 0; i < N_STRINGS; i++)
16819 { 16823 {
16820 if (tz_strings[i]) 16824 if (tz_strings[i])
16821 putenv (tz_strings[i]); 16825 putenv (tz_strings[i]);
16826 if (! (mktime_test ((time_t) 1) 16830 if (! (mktime_test ((time_t) 1)
16827 && mktime_test ((time_t) (60 * 60)) 16831 && mktime_test ((time_t) (60 * 60))
16828 && mktime_test ((time_t) (60 * 60 * 24)))) 16832 && mktime_test ((time_t) (60 * 60 * 24))))
16829 return 1; 16833 return 1;
16830 16834
16831 for (j = 1; 0 < j; j *= 2) 16835 for (j = 1; ; j <<= 1)
16832 if (! bigtime_test (j)) 16836 if (! bigtime_test (j))
16833 return 1; 16837 return 1;
16834 if (! bigtime_test (j - 1)) 16838 else if (INT_MAX / 2 < j)
16839 break;
16840 if (! bigtime_test (INT_MAX))
16835 return 1; 16841 return 1;
16836 } 16842 }
16837 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); 16843 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
16838 } 16844 }
16839 _ACEOF 16845 _ACEOF