Mercurial > emacs
comparison configure @ 95519:0f9033e19d18
Regenerate with fixed AC_FUNC_MKTIME.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Tue, 03 Jun 2008 16:09:01 +0000 |
parents | e3b30a09b861 |
children | ac3d7f9c33d5 |
comparison
equal
deleted
inserted
replaced
95518:2613c36cf971 | 95519:0f9033e19d18 |
---|---|
16891 # else | 16891 # else |
16892 # include <time.h> | 16892 # include <time.h> |
16893 # endif | 16893 # endif |
16894 #endif | 16894 #endif |
16895 | 16895 |
16896 #include <limits.h> | |
16896 #include <stdlib.h> | 16897 #include <stdlib.h> |
16897 | 16898 |
16898 #ifdef HAVE_UNISTD_H | 16899 #ifdef HAVE_UNISTD_H |
16899 # include <unistd.h> | 16900 # include <unistd.h> |
16900 #endif | 16901 #endif |
17039 /* This test makes some buggy mktime implementations loop. | 17040 /* This test makes some buggy mktime implementations loop. |
17040 Give up after 60 seconds; a mktime slower than that | 17041 Give up after 60 seconds; a mktime slower than that |
17041 isn't worth using anyway. */ | 17042 isn't worth using anyway. */ |
17042 alarm (60); | 17043 alarm (60); |
17043 | 17044 |
17044 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2) | 17045 for (;;) |
17045 continue; | 17046 { |
17046 time_t_max--; | 17047 t = (time_t_max << 1) + 1; |
17047 if ((time_t) -1 < 0) | 17048 if (t <= time_t_max) |
17048 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2) | 17049 break; |
17049 continue; | 17050 time_t_max = t; |
17051 } | |
17052 time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max; | |
17053 | |
17050 delta = time_t_max / 997; /* a suitable prime number */ | 17054 delta = time_t_max / 997; /* a suitable prime number */ |
17051 for (i = 0; i < N_STRINGS; i++) | 17055 for (i = 0; i < N_STRINGS; i++) |
17052 { | 17056 { |
17053 if (tz_strings[i]) | 17057 if (tz_strings[i]) |
17054 putenv (tz_strings[i]); | 17058 putenv (tz_strings[i]); |
17059 if (! (mktime_test ((time_t) 1) | 17063 if (! (mktime_test ((time_t) 1) |
17060 && mktime_test ((time_t) (60 * 60)) | 17064 && mktime_test ((time_t) (60 * 60)) |
17061 && mktime_test ((time_t) (60 * 60 * 24)))) | 17065 && mktime_test ((time_t) (60 * 60 * 24)))) |
17062 return 1; | 17066 return 1; |
17063 | 17067 |
17064 for (j = 1; 0 < j; j *= 2) | 17068 for (j = 1; ; j <<= 1) |
17065 if (! bigtime_test (j)) | 17069 if (! bigtime_test (j)) |
17066 return 1; | 17070 return 1; |
17067 if (! bigtime_test (j - 1)) | 17071 else if (INT_MAX / 2 < j) |
17072 break; | |
17073 if (! bigtime_test (INT_MAX)) | |
17068 return 1; | 17074 return 1; |
17069 } | 17075 } |
17070 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); | 17076 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); |
17071 } | 17077 } |
17072 _ACEOF | 17078 _ACEOF |