Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/gawk/files: autoconf-mktime-2.61.patch
Date: Mon, 05 May 2008 05:54:04
Message-Id: E1JsteD-0000j7-Dj@stork.gentoo.org
1 vapier 08/05/05 05:54:01
2
3 Added: autoconf-mktime-2.61.patch
4 Log:
5 Update mktime test #220040.
6 (Portage version: 2.2_pre5)
7
8 Revision Changes Path
9 1.1 sys-apps/gawk/files/autoconf-mktime-2.61.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/gawk/files/autoconf-mktime-2.61.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/gawk/files/autoconf-mktime-2.61.patch?rev=1.1&content-type=text/plain
13
14 Index: autoconf-mktime-2.61.patch
15 ===================================================================
16 --- configure
17 +++ configure
18 @@ -10518,6 +10791,7 @@
19 # endif
20 #endif
21
22 +#include <limits.h>
23 #include <stdlib.h>
24
25 #ifdef HAVE_UNISTD_H
26 @@ -10666,12 +10940,15 @@
27 isn't worth using anyway. */
28 alarm (60);
29
30 - for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
31 - continue;
32 - time_t_max--;
33 - if ((time_t) -1 < 0)
34 - for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
35 - continue;
36 + for (;;)
37 + {
38 + t = (time_t_max << 1) + 1;
39 + if (t <= time_t_max)
40 + break;
41 + time_t_max = t;
42 + }
43 + time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
44 +
45 delta = time_t_max / 997; /* a suitable prime number */
46 for (i = 0; i < N_STRINGS; i++)
47 {
48 @@ -10686,10 +10963,12 @@
49 && mktime_test ((time_t) (60 * 60 * 24))))
50 return 1;
51
52 - for (j = 1; 0 < j; j *= 2)
53 + for (j = 1; ; j <<= 1)
54 if (! bigtime_test (j))
55 return 1;
56 - if (! bigtime_test (j - 1))
57 + else if (INT_MAX / 2 < j)
58 + break;
59 + if (! bigtime_test (INT_MAX))
60 return 1;
61 }
62 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
63
64
65
66 --
67 gentoo-commits@l.g.o mailing list