summaryrefslogtreecommitdiff
blob: 948fa4d7144e61a1bafb6f9d9fe0076208b3d2ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
back port changes from upstream gnulib to make this work on x32

https://bugs.gentoo.org/395641

--- cvs-1.12.12/lib/mktime.c
+++ cvs-1.12.12/lib/mktime.c
@@ -115,6 +115,13 @@
 #define TM_YEAR_BASE 1900
 verify (base_year_is_a_multiple_of_100, TM_YEAR_BASE % 100 == 0);
 
+#if INT_MAX <= LONG_MAX / 2
+typedef long int long_int;
+#else
+typedef long long int long_int;
+#endif
+verify (long_int_is_wide_enough, INT_MAX == INT_MAX * (long_int) 2 / 2);
+
 /* Return 1 if YEAR + TM_YEAR_BASE is a leap year.  */
 static inline int
 leapyear (long int year)
@@ -167,8 +174,6 @@
 	    int year0, int yday0, int hour0, int min0, int sec0)
 {
   verify (C99_integer_division, -1 / 2 == 0);
-  verify (long_int_year_and_yday_are_wide_enough,
-	  INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= UINT_MAX);
 
   /* Compute intervening leap days correctly even if year is negative.
      Take care to avoid integer overflow here.  */