|
@@ -18,9 +18,8 @@ r3: fix a crash if /usr/share/zoneinfo doesn't exist (Raphael Geissert)
|
18
|
18
|
r2: add filesystem trawl to set up name alias index
|
19
|
19
|
r1: initial revision
|
20
|
20
|
|
21
|
|
-diff -Naur php-5.6.9.orig/ext/date/lib/parse_tz.c php-5.6.9/ext/date/lib/parse_tz.c
|
22
|
|
---- php-5.6.9.orig/ext/date/lib/parse_tz.c 2015-05-14 01:13:33.000000000 +0200
|
23
|
|
-+++ php-5.6.9/ext/date/lib/parse_tz.c 2015-05-18 22:40:55.000000000 +0200
|
|
21
|
+--- a/ext/date/lib/parse_tz.c
|
|
22
|
++++ b/ext/date/lib/parse_tz.c
|
24
|
23
|
@@ -18,8 +18,22 @@
|
25
|
24
|
|
26
|
25
|
/* $Id$ */
|
|
@@ -44,12 +43,12 @@ diff -Naur php-5.6.9.orig/ext/date/lib/parse_tz.c php-5.6.9/ext/date/lib/parse_t
|
44
|
43
|
#include <stdio.h>
|
45
|
44
|
|
46
|
45
|
#ifdef HAVE_LOCALE_H
|
47
|
|
-@@ -31,7 +45,12 @@
|
48
|
|
- #else
|
|
46
|
+@@ -32,8 +46,12 @@
|
49
|
47
|
#include <strings.h>
|
50
|
48
|
#endif
|
51
|
|
-+
|
|
49
|
+
|
52
|
50
|
+#ifndef HAVE_SYSTEM_TZDATA
|
|
51
|
+ #define TIMELIB_SUPPORTS_V2DATA
|
53
|
52
|
#include "timezonedb.h"
|
54
|
53
|
+#endif
|
55
|
54
|
+
|
|
@@ -57,7 +56,7 @@ diff -Naur php-5.6.9.orig/ext/date/lib/parse_tz.c php-5.6.9/ext/date/lib/parse_t
|
57
|
56
|
|
58
|
57
|
#if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__))
|
59
|
58
|
# if defined(__LITTLE_ENDIAN__)
|
60
|
|
-@@ -53,6 +72,11 @@
|
|
59
|
+@@ -55,6 +73,11 @@ static int read_preamble(const unsigned
|
61
|
60
|
{
|
62
|
61
|
uint32_t version;
|
63
|
62
|
|
|
@@ -69,7 +68,7 @@ diff -Naur php-5.6.9.orig/ext/date/lib/parse_tz.c php-5.6.9/ext/date/lib/parse_t
|
69
|
68
|
/* read ID */
|
70
|
69
|
version = (*tzf)[3] - '0';
|
71
|
70
|
*tzf += 4;
|
72
|
|
-@@ -296,7 +320,406 @@
|
|
71
|
+@@ -298,7 +321,406 @@ void timelib_dump_tzinfo(timelib_tzinfo
|
73
|
72
|
}
|
74
|
73
|
}
|
75
|
74
|
|
|
@@ -477,7 +476,7 @@ diff -Naur php-5.6.9.orig/ext/date/lib/parse_tz.c php-5.6.9/ext/date/lib/parse_t
|
477
|
476
|
{
|
478
|
477
|
int left = 0, right = tzdb->index_size - 1;
|
479
|
478
|
#ifdef HAVE_SETLOCALE
|
480
|
|
-@@ -335,21 +758,90 @@
|
|
479
|
+@@ -337,21 +759,90 @@ static int seek_to_tz_position(const uns
|
481
|
480
|
return 0;
|
482
|
481
|
}
|
483
|
482
|
|
|
@@ -569,7 +568,7 @@ diff -Naur php-5.6.9.orig/ext/date/lib/parse_tz.c php-5.6.9/ext/date/lib/parse_t
|
569
|
568
|
}
|
570
|
569
|
|
571
|
570
|
static void skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
|
572
|
|
-@@ -374,10 +866,12 @@
|
|
571
|
+@@ -376,10 +867,12 @@ static void read_64bit_header(const unsi
|
573
|
572
|
timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb)
|
574
|
573
|
{
|
575
|
574
|
const unsigned char *tzf;
|
|
@@ -583,7 +582,7 @@ diff -Naur php-5.6.9.orig/ext/date/lib/parse_tz.c php-5.6.9/ext/date/lib/parse_t
|
583
|
582
|
tmp = timelib_tzinfo_ctor(timezone);
|
584
|
583
|
|
585
|
584
|
version = read_preamble(&tzf, tmp);
|
586
|
|
-@@ -391,7 +885,34 @@
|
|
585
|
+@@ -393,7 +886,34 @@ timelib_tzinfo *timelib_parse_tzfile(cha
|
587
|
586
|
skip_64bit_types(&tzf, tmp);
|
588
|
587
|
skip_posix_string(&tzf, tmp);
|
589
|
588
|
}
|
|
@@ -619,10 +618,9 @@ diff -Naur php-5.6.9.orig/ext/date/lib/parse_tz.c php-5.6.9/ext/date/lib/parse_t
|
619
|
618
|
} else {
|
620
|
619
|
tmp = NULL;
|
621
|
620
|
}
|
622
|
|
-diff -Naur php-5.6.9.orig/ext/date/lib/timelib.m4 php-5.6.9/ext/date/lib/timelib.m4
|
623
|
|
---- php-5.6.9.orig/ext/date/lib/timelib.m4 2015-05-14 01:13:33.000000000 +0200
|
624
|
|
-+++ php-5.6.9/ext/date/lib/timelib.m4 2015-05-18 22:31:36.000000000 +0200
|
625
|
|
-@@ -78,3 +78,17 @@
|
|
621
|
+--- a/ext/date/lib/timelib.m4
|
|
622
|
++++ b/ext/date/lib/timelib.m4
|
|
623
|
+@@ -78,3 +78,17 @@ stdlib.h
|
626
|
624
|
|
627
|
625
|
dnl Check for strtoll, atoll
|
628
|
626
|
AC_CHECK_FUNCS(strtoll atoll strftime)
|