summaryrefslogtreecommitdiffstats
path: root/gl/m4/mktime.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/mktime.m4')
-rw-r--r--gl/m4/mktime.m428
1 files changed, 6 insertions, 22 deletions
diff --git a/gl/m4/mktime.m4 b/gl/m4/mktime.m4
index 85c52454..fa32d138 100644
--- a/gl/m4/mktime.m4
+++ b/gl/m4/mktime.m4
@@ -1,9 +1,11 @@
1# mktime.m4 1# mktime.m4
2# serial 39 2# serial 43
3dnl Copyright (C) 2002-2003, 2005-2007, 2009-2024 Free Software Foundation, Inc. 3dnl Copyright (C) 2002-2003, 2005-2007, 2009-2026 Free Software Foundation,
4dnl Inc.
4dnl This file is free software; the Free Software Foundation 5dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 6dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved. 7dnl with or without modifications, as long as this notice is preserved.
8dnl This file is offered as-is, without any warranty.
7 9
8dnl From Jim Meyering. 10dnl From Jim Meyering.
9 11
@@ -111,22 +113,6 @@ mktime_test (time_t now)
111} 113}
112 114
113static int 115static int
114irix_6_4_bug ()
115{
116 /* Based on code from Ariel Faigon. */
117 struct tm tm;
118 tm.tm_year = 96;
119 tm.tm_mon = 3;
120 tm.tm_mday = 0;
121 tm.tm_hour = 0;
122 tm.tm_min = 0;
123 tm.tm_sec = 0;
124 tm.tm_isdst = -1;
125 mktime (&tm);
126 return tm.tm_mon == 2 && tm.tm_mday == 31;
127}
128
129static int
130bigtime_test (int j) 116bigtime_test (int j)
131{ 117{
132 struct tm tm; 118 struct tm tm;
@@ -253,12 +239,10 @@ main ()
253 if ((result & 8) == 0 && ! bigtime_test (INT_MAX)) 239 if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
254 result |= 8; 240 result |= 8;
255 } 241 }
256 if (! irix_6_4_bug ())
257 result |= 16;
258 if (! spring_forward_gap ()) 242 if (! spring_forward_gap ())
259 result |= 32; 243 result |= 16;
260 if (! year_2050_test () || ! indiana_test ()) 244 if (! year_2050_test () || ! indiana_test ())
261 result |= 64; 245 result |= 32;
262 return result; 246 return result;
263}]])], 247}]])],
264 [gl_cv_func_working_mktime=yes], 248 [gl_cv_func_working_mktime=yes],