|
|
@ -18,9 +18,8 @@ r3: fix a crash if /usr/share/zoneinfo doesn't exist (Raphael Geissert) |
|
|
|
r2: add filesystem trawl to set up name alias index |
|
|
|
r1: initial revision |
|
|
|
|
|
|
|
diff -Naur php-5.6.9.orig/ext/date/lib/parse_tz.c php-5.6.9/ext/date/lib/parse_tz.c
|
|
|
|
--- php-5.6.9.orig/ext/date/lib/parse_tz.c 2015-05-14 01:13:33.000000000 +0200
|
|
|
|
+++ php-5.6.9/ext/date/lib/parse_tz.c 2015-05-18 22:40:55.000000000 +0200
|
|
|
|
--- a/ext/date/lib/parse_tz.c
|
|
|
|
+++ b/ext/date/lib/parse_tz.c
|
|
|
|
@@ -18,8 +18,22 @@
|
|
|
|
|
|
|
|
/* $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 |
|
|
|
#include <stdio.h> |
|
|
|
|
|
|
|
#ifdef HAVE_LOCALE_H |
|
|
|
@@ -31,7 +45,12 @@
|
|
|
|
#else |
|
|
|
@@ -32,8 +46,12 @@
|
|
|
|
#include <strings.h> |
|
|
|
#endif |
|
|
|
+
|
|
|
|
|
|
|
|
+#ifndef HAVE_SYSTEM_TZDATA
|
|
|
|
#define TIMELIB_SUPPORTS_V2DATA |
|
|
|
#include "timezonedb.h" |
|
|
|
+#endif
|
|
|
|
+
|
|
|
@ -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 |
|
|
|
|
|
|
|
#if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__)) |
|
|
|
# if defined(__LITTLE_ENDIAN__) |
|
|
|
@@ -53,6 +72,11 @@
|
|
|
|
@@ -55,6 +73,11 @@ static int read_preamble(const unsigned
|
|
|
|
{ |
|
|
|
uint32_t version; |
|
|
|
|
|
|
@ -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 |
|
|
|
/* read ID */ |
|
|
|
version = (*tzf)[3] - '0'; |
|
|
|
*tzf += 4; |
|
|
|
@@ -296,7 +320,406 @@
|
|
|
|
@@ -298,7 +321,406 @@ void timelib_dump_tzinfo(timelib_tzinfo
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -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 |
|
|
|
{ |
|
|
|
int left = 0, right = tzdb->index_size - 1; |
|
|
|
#ifdef HAVE_SETLOCALE |
|
|
|
@@ -335,21 +758,90 @@
|
|
|
|
@@ -337,21 +759,90 @@ static int seek_to_tz_position(const uns
|
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
@ -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 |
|
|
|
} |
|
|
|
|
|
|
|
static void skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz) |
|
|
|
@@ -374,10 +866,12 @@
|
|
|
|
@@ -376,10 +867,12 @@ static void read_64bit_header(const unsi
|
|
|
|
timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb) |
|
|
|
{ |
|
|
|
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 |
|
|
|
tmp = timelib_tzinfo_ctor(timezone); |
|
|
|
|
|
|
|
version = read_preamble(&tzf, tmp); |
|
|
|
@@ -391,7 +885,34 @@
|
|
|
|
@@ -393,7 +886,34 @@ timelib_tzinfo *timelib_parse_tzfile(cha
|
|
|
|
skip_64bit_types(&tzf, tmp); |
|
|
|
skip_posix_string(&tzf, tmp); |
|
|
|
} |
|
|
@ -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 |
|
|
|
} else { |
|
|
|
tmp = NULL; |
|
|
|
} |
|
|
|
diff -Naur php-5.6.9.orig/ext/date/lib/timelib.m4 php-5.6.9/ext/date/lib/timelib.m4
|
|
|
|
--- php-5.6.9.orig/ext/date/lib/timelib.m4 2015-05-14 01:13:33.000000000 +0200
|
|
|
|
+++ php-5.6.9/ext/date/lib/timelib.m4 2015-05-18 22:31:36.000000000 +0200
|
|
|
|
@@ -78,3 +78,17 @@
|
|
|
|
--- a/ext/date/lib/timelib.m4
|
|
|
|
+++ b/ext/date/lib/timelib.m4
|
|
|
|
@@ -78,3 +78,17 @@ stdlib.h
|
|
|
|
|
|
|
|
dnl Check for strtoll, atoll |
|
|
|
AC_CHECK_FUNCS(strtoll atoll strftime) |
|
|
|