[packages] php5: fix compilation without CONFIG_PHP5_SYSTEMTZDATA selected
Fixes #11917. git-svn-id: svn://svn.openwrt.org/openwrt/packages@32900 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
5c9ed461c3
commit
e900ebe95a
@ -3,6 +3,7 @@ Add support for use of the system timezone database, rather
|
|||||||
than embedding a copy. Discussed upstream but was not desired.
|
than embedding a copy. Discussed upstream but was not desired.
|
||||||
|
|
||||||
History:
|
History:
|
||||||
|
r9: fix another compile error without --with-system-tzdata configured
|
||||||
r8: fix compile error without --with-system-tzdata configured
|
r8: fix compile error without --with-system-tzdata configured
|
||||||
r7: improve check for valid timezone id to exclude directories
|
r7: improve check for valid timezone id to exclude directories
|
||||||
r6: fix fd leak in r5, fix country code/BC flag use in
|
r6: fix fd leak in r5, fix country code/BC flag use in
|
||||||
@ -66,7 +67,7 @@ r1: initial revision
|
|||||||
/* read BC flag */
|
/* read BC flag */
|
||||||
tz->bc = (**tzf == '\1');
|
tz->bc = (**tzf == '\1');
|
||||||
*tzf += 1;
|
*tzf += 1;
|
||||||
@@ -256,7 +276,397 @@ void timelib_dump_tzinfo(timelib_tzinfo
|
@@ -256,7 +276,397 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -465,7 +466,7 @@ r1: initial revision
|
|||||||
{
|
{
|
||||||
int left = 0, right = tzdb->index_size - 1;
|
int left = 0, right = tzdb->index_size - 1;
|
||||||
#ifdef HAVE_SETLOCALE
|
#ifdef HAVE_SETLOCALE
|
||||||
@@ -295,36 +705,125 @@ static int seek_to_tz_position(const uns
|
@@ -295,36 +705,128 @@
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -473,6 +474,7 @@ r1: initial revision
|
|||||||
+ char **map, size_t *maplen,
|
+ char **map, size_t *maplen,
|
||||||
+ const timelib_tzdb *tzdb)
|
+ const timelib_tzdb *tzdb)
|
||||||
+{
|
+{
|
||||||
|
+#ifdef HAVE_SYSTEM_TZDATA
|
||||||
+ if (tzdb == timezonedb_system) {
|
+ if (tzdb == timezonedb_system) {
|
||||||
+ char *orig;
|
+ char *orig;
|
||||||
+
|
+
|
||||||
@ -486,7 +488,9 @@ r1: initial revision
|
|||||||
+
|
+
|
||||||
+ return 1;
|
+ return 1;
|
||||||
+ }
|
+ }
|
||||||
+ else {
|
+ else
|
||||||
|
+#endif
|
||||||
|
+ {
|
||||||
+ return inmem_seek_to_tz_position(tzf, timezone, tzdb);
|
+ return inmem_seek_to_tz_position(tzf, timezone, tzdb);
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
@ -596,7 +600,7 @@ r1: initial revision
|
|||||||
}
|
}
|
||||||
--- a/ext/date/lib/timelib.m4
|
--- a/ext/date/lib/timelib.m4
|
||||||
+++ b/ext/date/lib/timelib.m4
|
+++ b/ext/date/lib/timelib.m4
|
||||||
@@ -78,3 +78,17 @@ stdlib.h
|
@@ -78,3 +78,17 @@
|
||||||
|
|
||||||
dnl Check for strtoll, atoll
|
dnl Check for strtoll, atoll
|
||||||
AC_CHECK_FUNCS(strtoll atoll strftime)
|
AC_CHECK_FUNCS(strtoll atoll strftime)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user