diff options
author | Yasuo Ohgaki <yohgaki@php.net> | 2013-10-22 12:27:47 +0900 |
---|---|---|
committer | Yasuo Ohgaki <yohgaki@php.net> | 2013-10-22 12:27:47 +0900 |
commit | 6410f6ff68ebd1e0fdd27ba4870900967d569926 (patch) | |
tree | 3ed49efc15f24063a49ad64e1939c957b2b4f850 | |
parent | 7be3c743392fbf1837760393403c7b703e502d3a (diff) | |
parent | b6ceea4a25f667bfed6c26899dd55a274a3270d3 (diff) | |
download | php-git-6410f6ff68ebd1e0fdd27ba4870900967d569926.tar.gz |
Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src: (178 commits)
Fixed bug #65939 (Space before ";" breaks php.ini parsing). (brainstorm at nopcode dot org)
exif NEWS
add tests for bug #62523
Merged PR #293 (Exif crash on unknown encoding was fixed) By: Draal Conflicts: configure.in main/php_version.h
fix bug #65936 (dangling context pointer causes crash)
remove TRAVIS check in test source
Fixed compilation warning
Just SKIP that test on travis
Fixed issue #115 (path issue when using phar).
fix memory leak on error (from Coverity scan)
Fix coverity issue with -1 returned by findOffset not being handled by getPreferredTag
5.4.21 release date
fix argument type & remove warning
fix const warnings in intl methods
When src->src is null this doesn't get initialized but it is still used, so the passed in *ze will point to unitialized memory. Hopefully src->src is never null, but just in case this initialization doesn't hurt.
Fix coverity issue with -1 returned by findOffset not being handled by getPreferredTag
fix possibility of access to *storedType without initialization
5.4.21 release date
Fix typo
These getpwnam('') tests are silly and not portable
...
222 files changed, 6784 insertions, 1708 deletions
diff --git a/.travis.yml b/.travis.yml index 4d127fe020..07653040dd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,15 @@ notifications: email: false env: - - REPORT_EXIT_STATUS=1 + global: + - MYSQL_TEST_HOST=127.0.0.1 + - MYSQL_TEST_USER=travis + - PDO_MYSQL_TEST_DSN="mysql:host=127.0.0.1;dbname=test" + - PDO_MYSQL_TEST_USER=travis + - PDO_MYSQL_TEST_PASS= + - PDO_MYSQL_TEST_HOST=127.0.0.1 + matrix: + - REPORT_EXIT_STATUS=1 before_script: # Compile PHP @@ -21,4 +29,4 @@ before_script: - . ./travis/ext/pdo_pgsql/setup.sh # Run PHPs run-tests.php -script: ./sapi/cli/php run-tests.php -p `pwd`/sapi/cli/php -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --show-diff +script: ./sapi/cli/php run-tests.php -p `pwd`/sapi/cli/php -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --show-diff --set-timeout 120 diff --git a/CODING_STANDARDS b/CODING_STANDARDS index 7413be453c..5ceacdc4dc 100644 --- a/CODING_STANDARDS +++ b/CODING_STANDARDS @@ -151,7 +151,7 @@ Naming Conventions 7. Classes should be given descriptive names. Avoid using abbreviations where possible. Each word in the class name should start with a capital letter, - without underscore delimiters (CampelCaps starting with a capital letter). + without underscore delimiters (CamelCaps starting with a capital letter). The class name should be prefixed with the name of the 'parent set' (e.g. the name of the extension):: @@ -1,26 +1,149 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? 2013, PHP 5.5.4 +?? ??? 2013, PHP 5.5.6 - Core: + . Fixed bug #65939 (Space before ";" breaks php.ini parsing). + (brainstorm at nopcode dot org) + . Fixed bug #65911 (scope resolution operator - strange behavior with $this). + (Bob Weinand) + +17 Oct 2013, PHP 5.5.5 + +- Core: + . Fixed bug #64979 (Wrong behavior of static variables in closure generators). + (Nikita) + . Fixed bug #65322 (compile time errors won't trigger auto loading). (Nikita) + . Fixed bug #65821 (By-ref foreach on property access of string offset + segfaults). (Nikita) + . Fixed bug #65936 (dangling context pointer causes crash). (Tony) + +- CLI server: + . Fixed bug #65633 (built-in server treat some http headers as + case-sensitive). (Adam) + . Fixed bug #65818 (Segfault with built-in webserver and chunked transfer + encoding). (Felipe) + . Added application/pdf to PHP CLI Web Server mime types (Chris Jones) + +- Datetime: + . Fixed bug #64157 (DateTime::createFromFormat() reports confusing error + message). (Boro Sitnikovski) + . Fixed bug #65502 (DateTimeImmutable::createFromFormat returns DateTime). + (Boro Sitnikovski) + . Fixed bug #65548 (Comparison for DateTimeImmutable doesn't work). + (Boro Sitnikovski) + +- DBA extension: + . Fixed bug #65708 (dba functions cast $key param to string in-place, + bypassing copy on write). (Adam) + +- Filter: + . Add RFC 6598 IPs to reserved addresses. (Sebastian Nohn) + . Fixed bug #64441 (FILTER_VALIDATE_URL rejects fully qualified domain names). + (Syra) + +- FTP: + . Fixed bug #65667 (ftp_nb_continue produces segfault). (Philip Hofstetter) + +- GD + . Ensure that the defined interpolation method is used with the generic + scaling methods. (Pierre) + +- IMAP: + . Fixed bug #65721 (configure script broken in 5.5.4 and 5.4.20 when enabling + imap). (ryotakatsuki at gmail dot com) + +- OPcache: + . Fixed issue #115 (path issue when using phar). (Laruence) + . Added support for GNU Hurd. (Svante Signell) + . Added function opcache_compile_file() to load PHP scripts into cache + without execution. (Julien) + . Fixed bug #65845 (Error when Zend Opcache Optimizer is fully enabled). + (Dmitry) + . Fixed bug #65665 (Exception not properly caught when opcache enabled). + (Laruence) + . Fixed bug #65510 (5.5.2 crashes in _get_zval_ptr_ptr_var). (Dmitry) + . Fixed issue #135 (segfault in interned strings if initial memory is too + low). (Julien) + +- Sockets: + . Fixed bug #65808 (the socket_connect() won't work with IPv6 address). + (Mike) + +- SPL: + . Fix bug #64782 (SplFileObject constructor make $context optional / give it + a default value). (Nikita) + +- Standard: + . Fixed bug #61548 (content-type must appear at the end of headers for 201 + Location to work in http). (Mike) + +- XMLReader: + . Fixed bug #51936 (Crash with clone XMLReader). (Mike) + . Fixed bug #64230 (XMLReader does not suppress errors). (Mike) + +- Build system: + . Fixed bug #51076 (race condition in shtool's mkdir -p implementation). + (Mike, Raphael Geissert) + . Fixed bug #62396 ('make test' crashes starting with 5.3.14 (missing + gzencode())). (Mike) + + +19 Sep 2013, PHP 5.5.4 + +- Core: + . Fixed bug #60598 (cli/apache sapi segfault on objects manipulation). + (Laruence) + . Improved fputcsv() to allow specifying escape character. + . Fixed bug #65490 (Duplicate calls to get lineno & filename for + DTRACE_FUNCTION_*). (Chris Jones) + . Fixed bug #65483 (quoted-printable encode stream filter incorrectly encoding + spaces). (Michael M Slusarz) + . Fixed bug #65481 (shutdown segfault due to serialize) (Mike) . Fixed bug #65470 (Segmentation fault in zend_error() with --enable-dtrace). (Chris Jones, Kris Van Hees) . Fixed bug #65225 (PHP_BINARY incorrectly set). (Patrick Allaert) . Fixed bug #62692 (PHP fails to build with DTrace). (Chris Jones, Kris Van Hees) + . Fixed bug #61759 (class_alias() should accept classes with leading + backslashes). (Julien) + . Fixed bug #46311 (Pointer aliasing issue results in miscompile on gcc4.4). + (Nikita Popov) - cURL: . Fixed bug #65458 (curl memory leak). (Adam) +- Datetime: + . Fixed bug #65554 (createFromFormat broken when weekday name is followed + by some delimiters). (Valentin Logvinskiy, Stas). + . Fixed bug #65564 (stack-buffer-overflow in DateTimeZone stuff caught + by AddressSanitizer). (Remi). + +- OPCache: + . Fixed bug #65561 (Zend Opcache on Solaris 11 x86 needs ZEND_MM_ALIGNMENT=4). + (Terry Ellison) + - Openssl: . Fixed bug #64802 (openssl_x509_parse fails to parse subject properly in some cases). (Mark Jones) +- PDO: + . Fixed bug #64953 (Postgres prepared statement positional parameter + casting). (Mike) + - Session: . Fixed bug #65475 (Session ID is not initialized properly when strict session is enabled). (Yasuo) . Fixed bug #51127/#65359 Request #25630/#43980/#54383 (Added php_serialize session serialize handler that uses plain serialize()). (Yasuo) +- Standard: + . Fix issue with return types of password API helper functions. Found via + static analysis by cjones. (Anthony Ferrara) + +- Zlib: + . Fixed bug #65391 (Unable to send vary header user-agent when + ob_start('ob_gzhandler') is called) (Mike) + 22 Aug 2013, PHP 5.5.3 - Openssl: diff --git a/README.EXTENSIONS b/README.EXTENSIONS index 51e3b730e7..06d6cdd85f 100644 --- a/README.EXTENSIONS +++ b/README.EXTENSIONS @@ -30,7 +30,7 @@ zend_module_entry foo_module_entry = { PHP_RSHUTDOWN(foo), /* per-request shutdown function */ PHP_MINFO(foo), /* information function */ #if ZEND_MODULE_API_NO >= 20010901 - FOO_VERSION, /* extension version number (string) */ + PHP_FOO_VERSION, /* extension version number (string) */ #endif STANDARD_MODULE_PROPERTIES }; diff --git a/README.EXT_SKEL b/README.EXT_SKEL index b0db843a42..d44fcc5c6a 100644 --- a/README.EXT_SKEL +++ b/README.EXT_SKEL @@ -31,6 +31,11 @@ HOW TO USE IT ./buildconf; ./configure --enable-module_name; make + The definition of PHP_MODULE_NAME_VERSION will be present in the + php_module_name.h and injected into the zend_module_entry definition. This + is required by the PECL website for the version string conformity checks + against package.xml + But if you already have planned the overall scheme of your module, what functions it will contain, their return types and the arguments they take (a very good idea) and don't want to bother yourself with creating function diff --git a/README.SELF-CONTAINED-EXTENSIONS b/README.SELF-CONTAINED-EXTENSIONS index e6a375331b..5287230e1a 100644 --- a/README.SELF-CONTAINED-EXTENSIONS +++ b/README.SELF-CONTAINED-EXTENSIONS @@ -153,3 +153,18 @@ ADDING SHARED MODULE SUPPORT TO A MODULE #ifdef COMPILE_DL_FOO ZEND_GET_MODULE(foo) #endif + +PECL SITE CONFORMITY + + If you plan to release an extension to the PECL website, there are several + points to be regarded. + + 1. Add LICENSE or COPYING to the package.xml + + 2. The following should be defined in one of the extension header files + + #define PHP_FOO_VERSION "1.2.3" + + This macros has to be used within your foo_module_entry to indicate the + extension version. + @@ -186,6 +186,9 @@ PHP 5.5 UPGRADE NOTES DOMDocument::schemaValidate() accept flag parameter. Only flag available now is LIBXML_SCHEMA_CREATE. Default is 0. +- Since 5.5.4, fputcsv() has fifth parameter escape_char, allowing to + specify escape char. + ======================================== 5. New Functions ======================================== @@ -340,6 +343,8 @@ None - Intl: - This extension now requires ICU 4.0+. +- Phar: + - Added ability of resolving alias created by Phar::map ======================================== 9. New Global Constants diff --git a/Zend/acinclude.m4 b/Zend/acinclude.m4 index 454513f68c..5a521dc98c 100644 --- a/Zend/acinclude.m4 +++ b/Zend/acinclude.m4 @@ -12,7 +12,7 @@ AC_DEFUN([LIBZEND_BISON_CHECK],[ bison_version=none if test "$YACC"; then AC_CACHE_CHECK([for bison version], php_cv_bison_version, [ - bison_version_vars=`bison --version 2> /dev/null | grep 'GNU Bison' | cut -d ' ' -f 4 | $SED -e 's/\./ /' | tr -d a-z` + bison_version_vars=`$YACC --version 2> /dev/null | grep 'GNU Bison' | cut -d ' ' -f 4 | $SED -e 's/\./ /g' | tr -d a-z` php_cv_bison_version=invalid if test -n "$bison_version_vars"; then set $bison_version_vars diff --git a/Zend/tests/bug60598.phpt b/Zend/tests/bug60598.phpt new file mode 100644 index 0000000000..eeee75a19d --- /dev/null +++ b/Zend/tests/bug60598.phpt @@ -0,0 +1,30 @@ +--TEST-- +Bug #60598 (cli/apache sapi segfault on objects manipulation) +--FILE-- +<?php +define('OBJECT_COUNT', 10000); + +$containers = array(); + +class Object { + protected $_guid = 0; + public function __construct() { + global $containers; + $this->guid = 1; + $containers[spl_object_hash($this)] = $this; + } + public function __destruct() { + global $containers; + $containers[spl_object_hash($this)] = NULL; + } +} + +for ($i = 0; $i < OBJECT_COUNT; ++$i) { + new Object(); +} + +// You probably won't see this because of the "zend_mm_heap corrupted" +?> +If you see this, try to increase OBJECT_COUNT to 100,000 +--EXPECT-- +If you see this, try to increase OBJECT_COUNT to 100,000 diff --git a/Zend/tests/bug64896.phpt b/Zend/tests/bug64896.phpt new file mode 100644 index 0000000000..3e955bbece --- /dev/null +++ b/Zend/tests/bug64896.phpt @@ -0,0 +1,47 @@ +--TEST-- +Bug #64896 (Segfault with gc_collect_cycles using unserialize on certain objects) +--XFAIL-- +We can not fix this bug without a significant (performace slow down) change to gc +--FILE-- +<?php +$bar = NULL; +class bad +{ + private $_private = array(); + + public function __construct() + { + $this->_private[] = 'php'; + } + + public function __destruct() + { + global $bar; + $bar = $this; + } +} + +$foo = new stdclass; +$foo->foo = $foo; +$foo->bad = new bad; + +gc_disable(); + +unserialize(serialize($foo)); +gc_collect_cycles(); +var_dump($bar); +/* will output: +object(bad)#4 (1) { + ["_private":"bad":private]=> + &UNKNOWN:0 +} +*/ +?> +--EXPECTF-- +bject(bad)#%d (1) { + ["_private":"bad":private]=> + array(1) { + [0]=> + string(3) "php" + } +} diff --git a/Zend/tests/bug64979.phpt b/Zend/tests/bug64979.phpt index 09de555546..5bc8e5a6ab 100644 --- a/Zend/tests/bug64979.phpt +++ b/Zend/tests/bug64979.phpt @@ -1,15 +1,13 @@ --TEST--
-Bug #64578 (Closures with static variables can be generators)
---XFAIL--
-Bug #64979 not fixed yet.
+Bug #64979 (Wrong behavior of static variables in closure generators)
--FILE--
<?php
function new_closure_gen() {
- return function() {
- static $foo = 0;
- yield ++$foo;
- };
+ return function() {
+ static $foo = 0;
+ yield ++$foo;
+ };
}
$closure1 = new_closure_gen();
@@ -20,9 +18,9 @@ $gen2 = $closure1(); $gen3 = $closure2();
foreach (array($gen1, $gen2, $gen3) as $gen) {
- foreach ($gen as $val) {
- print "$val\n";
- }
+ foreach ($gen as $val) {
+ var_dump($val);
+ }
}
?>
diff --git a/Zend/tests/bug65322.phpt b/Zend/tests/bug65322.phpt new file mode 100644 index 0000000000..aab163d915 --- /dev/null +++ b/Zend/tests/bug65322.phpt @@ -0,0 +1,22 @@ +--TEST-- +Bug #65322: compile time errors won't trigger auto loading +--FILE-- +<?php + +spl_autoload_register(function($class) { + var_dump($class); + class B {} +}); + +set_error_handler(function($_, $msg, $file) { + var_dump($msg, $file); + new B; +}); + +eval('class A { function a() {} function __construct() {} }'); + +?> +--EXPECTF-- +string(50) "Redefining already defined constructor for class A" +string(%d) "%s(%d) : eval()'d code" +string(1) "B" diff --git a/Zend/tests/bug65579.phpt b/Zend/tests/bug65579.phpt new file mode 100644 index 0000000000..25d74ed4f5 --- /dev/null +++ b/Zend/tests/bug65579.phpt @@ -0,0 +1,29 @@ +--TEST-- +Bug #65579 (Using traits with get_class_methods causes segfault) +--FILE-- +<?php +trait ParentTrait { + public function testMethod() { } +} + +trait ChildTrait { + use ParentTrait { + testMethod as testMethodFromParentTrait; + } + public function testMethod() { } +} + +class TestClass { + use ChildTrait; +} + +$obj = new TestClass(); +var_dump(get_class_methods($obj)); +?> +--EXPECT-- +array(2) { + [0]=> + string(10) "testMethod" + [1]=> + string(25) "testmethodfromparenttrait" +} diff --git a/Zend/tests/bug65911.phpt b/Zend/tests/bug65911.phpt new file mode 100644 index 0000000000..b9f37b7bd6 --- /dev/null +++ b/Zend/tests/bug65911.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #65911 (scope resolution operator - strange behavior with $this) +--FILE-- +<?php +class A {} + +class B +{ + public function go() + { + $this->foo = 'bar'; + echo A::$this->foo; // should not output 'bar' + } +} + +$obj = new B(); +$obj->go(); +?> +--EXPECTF-- +Fatal error: Access to undeclared static property: A::$this in %s on line %d diff --git a/Zend/tests/errmsg_045.phpt b/Zend/tests/errmsg_045.phpt new file mode 100644 index 0000000000..b27f67ade4 --- /dev/null +++ b/Zend/tests/errmsg_045.phpt @@ -0,0 +1,18 @@ +--TEST-- +Error message in error handler during compilation +--FILE-- +<?php + +set_error_handler(function($_, $msg, $file) { + var_dump($msg, $file); + echo $undefined; +}); + +eval('class A { function a() {} function __construct() {} }'); + +?> +--EXPECTF-- +string(50) "Redefining already defined constructor for class A" +string(%d) "%s(%d) : eval()'d code" + +Notice: Undefined variable: undefined in %s on line %d diff --git a/Zend/zend.c b/Zend/zend.c index f9069c8e1b..11baf34c93 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -1184,7 +1184,7 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */ * such scripts recursivly, but some CG() variables may be * inconsistent. */ - in_compilation = zend_is_compiling(TSRMLS_C); + in_compilation = CG(in_compilation); if (in_compilation) { saved_class_entry = CG(active_class_entry); CG(active_class_entry) = NULL; @@ -1196,6 +1196,7 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */ SAVE_STACK(declare_stack); SAVE_STACK(list_stack); SAVE_STACK(context_stack); + CG(in_compilation) = 0; } if (call_user_function_ex(CG(function_table), NULL, orig_user_error_handler, &retval, 5, params, 1, NULL TSRMLS_CC) == SUCCESS) { @@ -1220,6 +1221,7 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */ RESTORE_STACK(declare_stack); RESTORE_STACK(list_stack); RESTORE_STACK(context_stack); + CG(in_compilation) = 1; } if (!EG(user_error_handler)) { diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 23ad158b17..b59faab284 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2577,7 +2577,12 @@ ZEND_API int zend_register_class_alias_ex(const char *name, int name_len, zend_c char *lcname = zend_str_tolower_dup(name, name_len); int ret; - ret = zend_hash_add(CG(class_table), lcname, name_len+1, &ce, sizeof(zend_class_entry *), NULL); + if (lcname[0] == '\\') { + ret = zend_hash_add(CG(class_table), lcname+1, name_len, &ce, sizeof(zend_class_entry *), NULL); + } else { + ret = zend_hash_add(CG(class_table), lcname, name_len+1, &ce, sizeof(zend_class_entry *), NULL); + } + efree(lcname); if (ret == SUCCESS) { ce->refcount++; @@ -3980,15 +3985,16 @@ ZEND_API const char* zend_find_alias_name(zend_class_entry *ce, const char *name { zend_trait_alias *alias, **alias_ptr; - alias_ptr = ce->trait_aliases; - alias = *alias_ptr; - while (alias) { - if (alias->alias_len == len && - !strncasecmp(name, alias->alias, alias->alias_len)) { - return alias->alias; - } - alias_ptr++; + if ((alias_ptr = ce->trait_aliases)) { alias = *alias_ptr; + while (alias) { + if (alias->alias_len == len && + !strncasecmp(name, alias->alias, alias->alias_len)) { + return alias->alias; + } + alias_ptr++; + alias = *alias_ptr; + } } return name; diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 44a480f2a1..1ad64e74ea 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1399,15 +1399,8 @@ ZEND_FUNCTION(class_alias) return; } - if (!autoload) { - lc_name = do_alloca(class_name_len + 1, use_heap); - zend_str_tolower_copy(lc_name, class_name, class_name_len); + found = zend_lookup_class_ex(class_name, class_name_len, NULL, autoload, &ce TSRMLS_CC); - found = zend_hash_find(EG(class_table), lc_name, class_name_len+1, (void **) &ce); - free_alloca(lc_name, use_heap); - } else { - found = zend_lookup_class(class_name, class_name_len, &ce TSRMLS_CC); - } if (found == SUCCESS) { if ((*ce)->type == ZEND_USER_CLASS) { if (zend_register_class_alias_ex(alias_name, alias_name_len, *ce TSRMLS_CC) == SUCCESS) { diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index f250b2be20..60b9e3e653 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -908,6 +908,7 @@ static zend_bool opline_is_fetch_this(const zend_op *opline TSRMLS_DC) /* {{{ */ { if ((opline->opcode == ZEND_FETCH_W) && (opline->op1_type == IS_CONST) && (Z_TYPE(CONSTANT(opline->op1.constant)) == IS_STRING) + && ((opline->extended_value & ZEND_FETCH_STATIC_MEMBER) != ZEND_FETCH_STATIC_MEMBER) && (Z_HASH_P(&CONSTANT(opline->op1.constant)) == THIS_HASHVAL) && (Z_STRLEN(CONSTANT(opline->op1.constant)) == (sizeof("this")-1)) && !memcmp(Z_STRVAL(CONSTANT(opline->op1.constant)), "this", sizeof("this"))) { @@ -1749,7 +1750,6 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n zend_op dummy_opline; dummy_opline.result_type = IS_UNUSED; - dummy_opline.op1_type = IS_UNUSED; zend_stack_push(&CG(foreach_copy_stack), (void *) &dummy_opline, sizeof(zend_op)); } @@ -2662,7 +2662,7 @@ static int generate_free_switch_expr(const zend_switch_entry *switch_entry TSRML opline->opcode = (switch_entry->cond.op_type == IS_TMP_VAR) ? ZEND_FREE : ZEND_SWITCH_FREE; SET_NODE(opline->op1, &switch_entry->cond); SET_UNUSED(opline->op2); - opline->extended_value = 0; + return 0; } /* }}} */ @@ -2672,7 +2672,7 @@ static int generate_free_foreach_copy(const zend_op *foreach_copy TSRMLS_DC) /* zend_op *opline; /* If we reach the separator then stop applying the stack */ - if (foreach_copy->result_type == IS_UNUSED && foreach_copy->op1_type == IS_UNUSED) { + if (foreach_copy->result_type == IS_UNUSED) { return 1; } @@ -2681,16 +2681,6 @@ static int generate_free_foreach_copy(const zend_op *foreach_copy TSRMLS_DC) /* opline->opcode = (foreach_copy->result_type == IS_TMP_VAR) ? ZEND_FREE : ZEND_SWITCH_FREE; COPY_NODE(opline->op1, foreach_copy->result); SET_UNUSED(opline->op2); - opline->extended_value = 1; - - if (foreach_copy->op1_type != IS_UNUSED) { - opline = get_next_op(CG(active_op_array) TSRMLS_CC); - - opline->opcode = (foreach_copy->op1_type == IS_TMP_VAR) ? ZEND_FREE : ZEND_SWITCH_FREE; - COPY_NODE(opline->op1, foreach_copy->op1); - SET_UNUSED(opline->op2); - opline->extended_value = 0; - } return 0; } @@ -6227,7 +6217,6 @@ void zend_do_foreach_begin(znode *foreach_token, znode *open_brackets_token, zno { zend_op *opline; zend_bool is_variable; - zend_bool push_container = 0; zend_op dummy_opline; if (variable) { @@ -6239,14 +6228,6 @@ void zend_do_foreach_begin(znode *foreach_token, znode *open_brackets_token, zno /* save the location of FETCH_W instruction(s) */ open_brackets_token->u.op.opline_num = get_next_op_number(CG(active_op_array)); zend_do_end_variable_parse(array, BP_VAR_W, 0 TSRMLS_CC); - if (CG(active_op_array)->last > 0 && - CG(active_op_array)->opcodes[CG(active_op_array)->last-1].opcode == ZEND_FETCH_OBJ_W) { - /* Only lock the container if we are fetching from a real container and not $this */ - if (CG(active_op_array)->opcodes[CG(active_op_array)->last-1].op1_type == IS_VAR) { - CG(active_op_array)->opcodes[CG(active_op_array)->last-1].extended_value |= ZEND_FETCH_ADD_LOCK; - push_container = 1; - } - } } else { is_variable = 0; open_brackets_token->u.op.opline_num = get_next_op_number(CG(active_op_array)); @@ -6266,11 +6247,6 @@ void zend_do_foreach_begin(znode *foreach_token, znode *open_brackets_token, zno opline->extended_value = is_variable ? ZEND_FE_RESET_VARIABLE : 0; COPY_NODE(dummy_opline.result, opline->result); - if (push_container) { - COPY_NODE(dummy_opline.op1, CG(active_op_array)->opcodes[CG(active_op_array)->last-2].op1); - } else { - dummy_opline.op1_type = IS_UNUSED; - } zend_stack_push(&CG(foreach_copy_stack), (void *) &dummy_opline, sizeof(zend_op)); /* save the location of FE_FETCH */ @@ -6327,7 +6303,6 @@ void zend_do_foreach_cont(znode *foreach_token, const znode *open_brackets_token opline->extended_value |= ZEND_FE_FETCH_BYREF; CG(active_op_array)->opcodes[foreach_token->u.op.opline_num].extended_value |= ZEND_FE_RESET_REFERENCE; } else { - zend_op *foreach_copy; zend_op *fetch = &CG(active_op_array)->opcodes[foreach_token->u.op.opline_num]; zend_op *end = &CG(active_op_array)->opcodes[open_brackets_token->u.op.opline_num]; @@ -6344,9 +6319,6 @@ void zend_do_foreach_cont(znode *foreach_token, const znode *open_brackets_token fetch->opcode -= 3; /* FETCH_W -> FETCH_R */ } } - /* prevent double SWITCH_FREE */ - zend_stack_top(&CG(foreach_copy_stack), (void **) &foreach_copy); - foreach_copy->op1_type = IS_UNUSED; } GET_NODE(&value_node, opline->result); diff --git a/Zend/zend_dtrace.c b/Zend/zend_dtrace.c index a07edd646e..51bd1f421c 100644 --- a/Zend/zend_dtrace.c +++ b/Zend/zend_dtrace.c @@ -58,10 +58,8 @@ ZEND_API void dtrace_execute_ex(zend_execute_data *execute_data TSRMLS_DC) } if (DTRACE_FUNCTION_ENTRY_ENABLED() || DTRACE_FUNCTION_RETURN_ENABLED()) { - filename = dtrace_get_executed_filename(TSRMLS_C); classname = get_active_class_name(&scope TSRMLS_CC); funcname = get_active_function_name(TSRMLS_C); - lineno = zend_get_executed_lineno(TSRMLS_C); } if (DTRACE_EXECUTE_ENTRY_ENABLED()) { diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 14ae75e38d..c7f157c4d5 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -560,7 +560,7 @@ ZEND_METHOD(exception, getPrevious) RETURN_ZVAL(previous, 1, 0); } -int zend_spprintf(char **message, int max_len, char *format, ...) /* {{{ */ +int zend_spprintf(char **message, int max_len, const char *format, ...) /* {{{ */ { va_list arg; int len; @@ -732,7 +732,7 @@ ZEND_API zend_class_entry *zend_get_error_exception(TSRMLS_D) /* {{{ */ } /* }}} */ -ZEND_API zval * zend_throw_exception(zend_class_entry *exception_ce, char *message, long code TSRMLS_DC) /* {{{ */ +ZEND_API zval * zend_throw_exception(zend_class_entry *exception_ce, const char *message, long code TSRMLS_DC) /* {{{ */ { zval *ex; @@ -760,7 +760,7 @@ ZEND_API zval * zend_throw_exception(zend_class_entry *exception_ce, char *messa } /* }}} */ -ZEND_API zval * zend_throw_exception_ex(zend_class_entry *exception_ce, long code TSRMLS_DC, char *format, ...) /* {{{ */ +ZEND_API zval * zend_throw_exception_ex(zend_class_entry *exception_ce, long code TSRMLS_DC, const char *format, ...) /* {{{ */ { va_list arg; char *message; @@ -775,7 +775,7 @@ ZEND_API zval * zend_throw_exception_ex(zend_class_entry *exception_ce, long cod } /* }}} */ -ZEND_API zval * zend_throw_error_exception(zend_class_entry *exception_ce, char *message, long code, int severity TSRMLS_DC) /* {{{ */ +ZEND_API zval * zend_throw_error_exception(zend_class_entry *exception_ce, const char *message, long code, int severity TSRMLS_DC) /* {{{ */ { zval *ex = zend_throw_exception(exception_ce, message, code TSRMLS_CC); zend_update_property_long(default_exception_ce, ex, "severity", sizeof("severity")-1, severity TSRMLS_CC); diff --git a/Zend/zend_exceptions.h b/Zend/zend_exceptions.h index 82633530d6..81c8a1f213 100644 --- a/Zend/zend_exceptions.h +++ b/Zend/zend_exceptions.h @@ -40,12 +40,12 @@ ZEND_API void zend_register_default_classes(TSRMLS_D); /* exception_ce NULL or zend_exception_get_default() or a derived class * message NULL or the message of the exception */ -ZEND_API zval * zend_throw_exception(zend_class_entry *exception_ce, char *message, long code TSRMLS_DC); -ZEND_API zval * zend_throw_exception_ex(zend_class_entry *exception_ce, long code TSRMLS_DC, char *format, ...); +ZEND_API zval * zend_throw_exception(zend_class_entry *exception_ce, const char *message, long code TSRMLS_DC); +ZEND_API zval * zend_throw_exception_ex(zend_class_entry *exception_ce, long code TSRMLS_DC, const char *format, ...); ZEND_API void zend_throw_exception_object(zval *exception TSRMLS_DC); ZEND_API void zend_clear_exception(TSRMLS_D); -ZEND_API zval * zend_throw_error_exception(zend_class_entry *exception_ce, char *message, long code, int severity TSRMLS_DC); +ZEND_API zval * zend_throw_error_exception(zend_class_entry *exception_ce, const char *message, long code, int severity TSRMLS_DC); extern ZEND_API void (*zend_throw_exception_hook)(zval *ex TSRMLS_DC); @@ -53,7 +53,7 @@ extern ZEND_API void (*zend_throw_exception_hook)(zval *ex TSRMLS_DC); ZEND_API void zend_exception_error(zval *exception, int severity TSRMLS_DC); /* do not export, in php it's available thru spprintf directly */ -int zend_spprintf(char **message, int max_len, char *format, ...); +int zend_spprintf(char **message, int max_len, const char *format, ...); END_EXTERN_C() diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index a17f10b312..ff0758772e 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -293,7 +293,7 @@ static zend_always_inline void zend_vm_stack_clear_multiple(int nested TSRMLS_DC void **end = p - (int)(zend_uintptr_t)*p; while (p != end) { - zval *q = *(zval **)(--p); + zval *q = (zval *) *(--p); *p = NULL; i_zval_ptr_dtor(q ZEND_FILE_LINE_CC); } diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c index 1a805bbd6d..0af20f4593 100644 --- a/Zend/zend_generators.c +++ b/Zend/zend_generators.c @@ -226,6 +226,16 @@ static zend_object_value zend_generator_create(zend_class_entry *class_type TSRM } /* }}} */ +static void copy_closure_static_var(zval **var TSRMLS_DC, int num_args, va_list args, zend_hash_key *key) /* {{{ */ +{ + HashTable *target = va_arg(args, HashTable *); + + SEPARATE_ZVAL_TO_MAKE_IS_REF(var); + Z_ADDREF_PP(var); + zend_hash_quick_update(target, key->arKey, key->nKeyLength, key->h, var, sizeof(zval *), NULL); +} +/* }}} */ + /* Requires globals EG(scope), EG(current_scope), EG(This), * EG(active_symbol_table) and EG(current_execute_data). */ ZEND_API zval *zend_generator_create_zval(zend_op_array *op_array TSRMLS_DC) /* {{{ */ @@ -242,7 +252,23 @@ ZEND_API zval *zend_generator_create_zval(zend_op_array *op_array TSRMLS_DC) /* if (op_array->fn_flags & ZEND_ACC_CLOSURE) { zend_op_array *op_array_copy = (zend_op_array*)emalloc(sizeof(zend_op_array)); *op_array_copy = *op_array; - function_add_ref((zend_function *) op_array_copy); + + (*op_array->refcount)++; + op_array->run_time_cache = NULL; + if (op_array->static_variables) { + ALLOC_HASHTABLE(op_array_copy->static_variables); + zend_hash_init( + op_array_copy->static_variables, + zend_hash_num_elements(op_array->static_variables), + NULL, ZVAL_PTR_DTOR, 0 + ); + zend_hash_apply_with_arguments( + op_array->static_variables TSRMLS_CC, + (apply_func_args_t) copy_closure_static_var, + 1, op_array_copy->static_variables + ); + } + op_array = op_array_copy; } diff --git a/Zend/zend_objects_API.c b/Zend/zend_objects_API.c index 1fe5d0c199..b5dd48f798 100644 --- a/Zend/zend_objects_API.c +++ b/Zend/zend_objects_API.c @@ -57,6 +57,11 @@ ZEND_API void zend_objects_store_call_destructors(zend_objects_store *objects TS obj->dtor(obj->object, i TSRMLS_CC); obj = &objects->object_buckets[i].bucket.obj; obj->refcount--; + + if (obj->refcount == 0) { + /* in case gc_collect_cycle is triggered before free_storage */ + GC_REMOVE_ZOBJ_FROM_BUFFER(obj); + } } } } diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 88995c46b6..5c84deb268 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -2138,8 +2138,8 @@ ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2) /* {{{ */ { int ret1, ret2; int oflow1, oflow2; - long lval1, lval2; - double dval1, dval2; + long lval1 = 0, lval2 = 0; + double dval1 = 0.0, dval2 = 0.0; if ((ret1=is_numeric_string_ex(Z_STRVAL_P(s1), Z_STRLEN_P(s1), &lval1, &dval1, 0, &oflow1)) && (ret2=is_numeric_string_ex(Z_STRVAL_P(s2), Z_STRLEN_P(s2), &lval2, &dval2, 0, &oflow2))) { diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index 0b890ff48c..6e7c1c01df 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -132,7 +132,7 @@ static inline zend_uchar is_numeric_string_ex(const char *str, int length, long { const char *ptr; int base = 10, digits = 0, dp_or_e = 0; - double local_dval; + double local_dval = 0.0; zend_uchar type; if (!length) { diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index ada20ca308..201ae49e05 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -1392,11 +1392,6 @@ ZEND_VM_HANDLER(85, ZEND_FETCH_OBJ_W, VAR|UNUSED|CV, CONST|TMP|VAR|CV) SAVE_OPLINE(); property = GET_OP2_ZVAL_PTR(BP_VAR_R); - if (OP1_TYPE == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) { - PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr); - EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr; - } - if (IS_OP2_TMP_FREE()) { MAKE_REAL_ZVAL_PTR(property); } diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index a80d9a453b..74a8c12d40 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -20,6 +20,13 @@ #ifdef ZEND_WIN32 # pragma warning(once : 4101) +# pragma warning(once : 6235) +# pragma warning(once : 6237) +# pragma warning(once : 6239) +# pragma warning(once : 6240) +# pragma warning(once : 6285) +# pragma warning(once : 6286) +# pragma warning(once : 6326) #endif static user_opcode_handler_t zend_user_opcode_handlers[256] = { (user_opcode_handler_t)NULL, @@ -14990,11 +14997,6 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HA SAVE_OPLINE(); property = opline->op2.zv; - if (IS_VAR == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) { - PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr); - EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr; - } - if (0) { MAKE_REAL_ZVAL_PTR(property); } @@ -17346,11 +17348,6 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HAND SAVE_OPLINE(); property = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC); - if (IS_VAR == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) { - PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr); - EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr; - } - if (1) { MAKE_REAL_ZVAL_PTR(property); } @@ -19609,11 +19606,6 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HAND SAVE_OPLINE(); property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC); - if (IS_VAR == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) { - PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr); - EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr; - } - if (0) { MAKE_REAL_ZVAL_PTR(property); } @@ -23074,11 +23066,6 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDL SAVE_OPLINE(); property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC); - if (IS_VAR == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) { - PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr); - EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr; - } - if (0) { MAKE_REAL_ZVAL_PTR(property); } @@ -24860,11 +24847,6 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE SAVE_OPLINE(); property = opline->op2.zv; - if (IS_UNUSED == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) { - PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr); - EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr; - } - if (0) { MAKE_REAL_ZVAL_PTR(property); } @@ -26278,11 +26260,6 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_H SAVE_OPLINE(); property = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC); - if (IS_UNUSED == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) { - PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr); - EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr; - } - if (1) { MAKE_REAL_ZVAL_PTR(property); } @@ -27599,11 +27576,6 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_H SAVE_OPLINE(); property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC); - if (IS_UNUSED == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) { - PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr); - EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr; - } - if (0) { MAKE_REAL_ZVAL_PTR(property); } @@ -29342,11 +29314,6 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HA SAVE_OPLINE(); property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC); - if (IS_UNUSED == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) { - PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr); - EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr; - } - if (0) { MAKE_REAL_ZVAL_PTR(property); } @@ -32486,11 +32453,6 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HAN SAVE_OPLINE(); property = opline->op2.zv; - if (IS_CV == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) { - PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr); - EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr; - } - if (0) { MAKE_REAL_ZVAL_PTR(property); } @@ -34607,11 +34569,6 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDL SAVE_OPLINE(); property = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC); - if (IS_CV == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) { - PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr); - EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr; - } - if (1) { MAKE_REAL_ZVAL_PTR(property); } @@ -36732,11 +36689,6 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDL SAVE_OPLINE(); property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC); - if (IS_CV == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) { - PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr); - EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr; - } - if (0) { MAKE_REAL_ZVAL_PTR(property); } @@ -39910,11 +39862,6 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLE SAVE_OPLINE(); property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC); - if (IS_CV == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) { - PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr); - EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr; - } - if (0) { MAKE_REAL_ZVAL_PTR(property); } diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php index 9a75711478..9b2877b996 100644 --- a/Zend/zend_vm_gen.php +++ b/Zend/zend_vm_gen.php @@ -1189,8 +1189,26 @@ function gen_vm($def, $skel) { // Insert header out($f, $GLOBALS['header_text']); + out($f, "#ifdef ZEND_WIN32\n"); // Suppress free_op1 warnings on Windows - out($f, "#ifdef ZEND_WIN32\n# pragma warning(once : 4101)\n#endif\n"); + out($f, "# pragma warning(once : 4101)\n"); + if (ZEND_VM_SPEC) { + // Suppress (<non-zero constant> || <expression>) warnings on windows + out($f, "# pragma warning(once : 6235)\n"); + // Suppress (<zero> && <expression>) warnings on windows + out($f, "# pragma warning(once : 6237)\n"); + // Suppress (<non-zero constant> && <expression>) warnings on windows + out($f, "# pragma warning(once : 6239)\n"); + // Suppress (<expression> && <non-zero constant>) warnings on windows + out($f, "# pragma warning(once : 6240)\n"); + // Suppress (<non-zero constant> || <non-zero constant>) warnings on windows + out($f, "# pragma warning(once : 6285)\n"); + // Suppress (<non-zero constant> || <expression>) warnings on windows + out($f, "# pragma warning(once : 6286)\n"); + // Suppress constant with constant comparsion warnings on windows + out($f, "# pragma warning(once : 6326)\n"); + } + out($f, "#endif\n"); // Support for ZEND_USER_OPCODE out($f, "static user_opcode_handler_t zend_user_opcode_handlers[256] = {\n"); diff --git a/build/shtool b/build/shtool index 684a01f5df..fc6ae1e6ef 100755 --- a/build/shtool +++ b/build/shtool @@ -1003,7 +1003,14 @@ mkdir ) if [ ".$opt_t" = .yes ]; then echo "mkdir $pathcomp" 1>&2 fi - mkdir $pathcomp || errstatus=$? + # See https://bugs.php.net/51076 + # The fix is from Debian who have sent it + # upstream, too; but upstream seems dead. + mkdir $pathcomp || { + _errstatus=$? + [ -d "$pathcomp" ] || errstatus=${_errstatus} + unset _errstatus + } if [ ".$opt_o" != . ]; then if [ ".$opt_t" = .yes ]; then echo "chown $opt_o $pathcomp" 1>&2 diff --git a/configure.in b/configure.in index 47ce23c520..40130626cb 100644 --- a/configure.in +++ b/configure.in @@ -119,7 +119,7 @@ int zend_sprintf(char *buffer, const char *format, ...); PHP_MAJOR_VERSION=5 PHP_MINOR_VERSION=5 -PHP_RELEASE_VERSION=4 +PHP_RELEASE_VERSION=5 PHP_EXTRA_VERSION="-dev" PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION" PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION` diff --git a/ext/bcmath/libbcmath/src/recmul.c b/ext/bcmath/libbcmath/src/recmul.c index c31d09dc72..64014f3a6e 100644 --- a/ext/bcmath/libbcmath/src/recmul.c +++ b/ext/bcmath/libbcmath/src/recmul.c @@ -183,7 +183,6 @@ _bc_rec_mul (bc_num u, int ulen, bc_num v, int vlen, bc_num *prod, int full_scale TSRMLS_DC) { bc_num u0, u1, v0, v1; - int u0len, v0len; bc_num m1, m2, m3, d1, d2; int n, prodlen, m1zero; int d1len, d2len; @@ -216,10 +215,8 @@ _bc_rec_mul (bc_num u, int ulen, bc_num v, int vlen, bc_num *prod, } _bc_rm_leading_zeros (u1); _bc_rm_leading_zeros (u0); - u0len = u0->n_len; _bc_rm_leading_zeros (v1); _bc_rm_leading_zeros (v0); - v0len = v0->n_len; m1zero = bc_is_zero(u1 TSRMLS_CC) || bc_is_zero(v1 TSRMLS_CC); diff --git a/ext/bz2/bz2_filter.c b/ext/bz2/bz2_filter.c index 335600232b..1e7837b098 100644 --- a/ext/bz2/bz2_filter.c +++ b/ext/bz2/bz2_filter.c @@ -97,6 +97,7 @@ static php_stream_filter_status_t php_bz2_decompress_filter( status = BZ2_bzDecompressInit(streamp, 0, data->small_footprint); if (BZ_OK != status) { + php_stream_bucket_delref(bucket TSRMLS_CC); return PSFS_ERR_FATAL; } diff --git a/ext/date/lib/parse_date.c b/ext/date/lib/parse_date.c index 8f70748267..0e99e231d6 100644 --- a/ext/date/lib/parse_date.c +++ b/ext/date/lib/parse_date.c @@ -1,4 +1,4 @@ -/* Generated by re2c 0.13.5 on Fri Apr 26 11:10:28 2013 */ +/* Generated by re2c 0.13.5 on Sun Aug 25 15:12:48 2013 */ #line 1 "ext/date/lib/parse_date.re" /* +----------------------------------------------------------------------+ @@ -616,7 +616,8 @@ static const timelib_relunit* timelib_lookup_relunit(char **ptr) char *begin = *ptr, *end; const timelib_relunit *tp, *value = NULL; - while (**ptr != '\0' && **ptr != ' ' && **ptr != ',' && **ptr != '\t') { + while (**ptr != '\0' && **ptr != ' ' && **ptr != ',' && **ptr != '\t' && **ptr != ';' && **ptr != ':' && + **ptr != '/' && **ptr != '.' && **ptr != '-' && **ptr != '(' && **ptr != ')' ) { ++*ptr; } end = *ptr; @@ -836,11 +837,11 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) std: s->tok = cursor; s->len = 0; -#line 962 "ext/date/lib/parse_date.re" +#line 963 "ext/date/lib/parse_date.re" -#line 844 "ext/date/lib/parse_date.c" +#line 845 "ext/date/lib/parse_date.c" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -960,7 +961,7 @@ std: } yy2: YYDEBUG(2, *YYCURSOR); -#line 1048 "ext/date/lib/parse_date.re" +#line 1049 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("firstdayof | lastdayof"); TIMELIB_INIT; @@ -976,7 +977,7 @@ yy2: TIMELIB_DEINIT; return TIMELIB_LF_DAY_OF_MONTH; } -#line 980 "ext/date/lib/parse_date.c" +#line 981 "ext/date/lib/parse_date.c" yy3: YYDEBUG(3, *YYCURSOR); ++YYCURSOR; @@ -999,7 +1000,7 @@ yy3: } yy4: YYDEBUG(4, *YYCURSOR); -#line 1642 "ext/date/lib/parse_date.re" +#line 1643 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("tzcorrection | tz"); @@ -1012,7 +1013,7 @@ yy4: TIMELIB_DEINIT; return TIMELIB_TIMEZONE; } -#line 1016 "ext/date/lib/parse_date.c" +#line 1017 "ext/date/lib/parse_date.c" yy5: YYDEBUG(5, *YYCURSOR); yych = *++YYCURSOR; @@ -1323,12 +1324,12 @@ yy12: if (yych <= '9') goto yy1385; yy13: YYDEBUG(13, *YYCURSOR); -#line 1737 "ext/date/lib/parse_date.re" +#line 1738 "ext/date/lib/parse_date.re" { add_error(s, "Unexpected character"); goto std; } -#line 1332 "ext/date/lib/parse_date.c" +#line 1333 "ext/date/lib/parse_date.c" yy14: YYDEBUG(14, *YYCURSOR); yych = *++YYCURSOR; @@ -2385,11 +2386,11 @@ yy49: if (yych <= '9') goto yy55; yy50: YYDEBUG(50, *YYCURSOR); -#line 1726 "ext/date/lib/parse_date.re" +#line 1727 "ext/date/lib/parse_date.re" { goto std; } -#line 2393 "ext/date/lib/parse_date.c" +#line 2394 "ext/date/lib/parse_date.c" yy51: YYDEBUG(51, *YYCURSOR); yych = *++YYCURSOR; @@ -2398,12 +2399,12 @@ yy52: YYDEBUG(52, *YYCURSOR); ++YYCURSOR; YYDEBUG(53, *YYCURSOR); -#line 1731 "ext/date/lib/parse_date.re" +#line 1732 "ext/date/lib/parse_date.re" { s->pos = cursor; s->line++; goto std; } -#line 2407 "ext/date/lib/parse_date.c" +#line 2408 "ext/date/lib/parse_date.c" yy54: YYDEBUG(54, *YYCURSOR); yych = *++YYCURSOR; @@ -2790,7 +2791,7 @@ yy72: if (yych == 's') goto yy74; yy73: YYDEBUG(73, *YYCURSOR); -#line 1710 "ext/date/lib/parse_date.re" +#line 1711 "ext/date/lib/parse_date.re" { timelib_ull i; DEBUG_OUTPUT("relative"); @@ -2805,7 +2806,7 @@ yy73: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 2809 "ext/date/lib/parse_date.c" +#line 2810 "ext/date/lib/parse_date.c" yy74: YYDEBUG(74, *YYCURSOR); yych = *++YYCURSOR; @@ -3567,7 +3568,7 @@ yy166: } yy167: YYDEBUG(167, *YYCURSOR); -#line 1573 "ext/date/lib/parse_date.re" +#line 1574 "ext/date/lib/parse_date.re" { const timelib_relunit* relunit; DEBUG_OUTPUT("daytext"); @@ -3584,7 +3585,7 @@ yy167: TIMELIB_DEINIT; return TIMELIB_WEEKDAY; } -#line 3588 "ext/date/lib/parse_date.c" +#line 3589 "ext/date/lib/parse_date.c" yy168: YYDEBUG(168, *YYCURSOR); yych = *++YYCURSOR; @@ -4104,7 +4105,7 @@ yy193: } yy194: YYDEBUG(194, *YYCURSOR); -#line 1632 "ext/date/lib/parse_date.re" +#line 1633 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("monthtext"); TIMELIB_INIT; @@ -4113,7 +4114,7 @@ yy194: TIMELIB_DEINIT; return TIMELIB_DATE_TEXT; } -#line 4117 "ext/date/lib/parse_date.c" +#line 4118 "ext/date/lib/parse_date.c" yy195: YYDEBUG(195, *YYCURSOR); ++YYCURSOR; @@ -4164,7 +4165,7 @@ yy198: } yy199: YYDEBUG(199, *YYCURSOR); -#line 1378 "ext/date/lib/parse_date.re" +#line 1379 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("datetextual | datenoyear"); @@ -4177,7 +4178,7 @@ yy199: TIMELIB_DEINIT; return TIMELIB_DATE_TEXT; } -#line 4181 "ext/date/lib/parse_date.c" +#line 4182 "ext/date/lib/parse_date.c" yy200: YYDEBUG(200, *YYCURSOR); yyaccept = 6; @@ -4446,7 +4447,7 @@ yy222: } yy223: YYDEBUG(223, *YYCURSOR); -#line 1680 "ext/date/lib/parse_date.re" +#line 1681 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz"); @@ -4475,7 +4476,7 @@ yy223: TIMELIB_DEINIT; return TIMELIB_SHORTDATE_WITH_TIME; } -#line 4479 "ext/date/lib/parse_date.c" +#line 4480 "ext/date/lib/parse_date.c" yy224: YYDEBUG(224, *YYCURSOR); yyaccept = 7; @@ -5173,7 +5174,7 @@ yy278: YYDEBUG(278, *YYCURSOR); ++YYCURSOR; YYDEBUG(279, *YYCURSOR); -#line 1656 "ext/date/lib/parse_date.re" +#line 1657 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("dateshortwithtimeshort12 | dateshortwithtimelong12"); TIMELIB_INIT; @@ -5196,7 +5197,7 @@ yy278: TIMELIB_DEINIT; return TIMELIB_SHORTDATE_WITH_TIME; } -#line 5200 "ext/date/lib/parse_date.c" +#line 5201 "ext/date/lib/parse_date.c" yy280: YYDEBUG(280, *YYCURSOR); yych = *++YYCURSOR; @@ -5374,7 +5375,7 @@ yy294: ++YYCURSOR; yy295: YYDEBUG(295, *YYCURSOR); -#line 1350 "ext/date/lib/parse_date.re" +#line 1351 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("datenoday"); @@ -5387,7 +5388,7 @@ yy295: TIMELIB_DEINIT; return TIMELIB_DATE_NO_DAY; } -#line 5391 "ext/date/lib/parse_date.c" +#line 5392 "ext/date/lib/parse_date.c" yy296: YYDEBUG(296, *YYCURSOR); yych = *++YYCURSOR; @@ -6607,7 +6608,7 @@ yy362: if (yych <= '9') goto yy365; yy364: YYDEBUG(364, *YYCURSOR); -#line 1494 "ext/date/lib/parse_date.re" +#line 1495 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("pgtextshort"); @@ -6620,7 +6621,7 @@ yy364: TIMELIB_DEINIT; return TIMELIB_PG_TEXT; } -#line 6624 "ext/date/lib/parse_date.c" +#line 6625 "ext/date/lib/parse_date.c" yy365: YYDEBUG(365, *YYCURSOR); yych = *++YYCURSOR; @@ -7258,7 +7259,7 @@ yy392: } yy393: YYDEBUG(393, *YYCURSOR); -#line 1552 "ext/date/lib/parse_date.re" +#line 1553 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("ago"); TIMELIB_INIT; @@ -7278,7 +7279,7 @@ yy393: TIMELIB_DEINIT; return TIMELIB_AGO; } -#line 7282 "ext/date/lib/parse_date.c" +#line 7283 "ext/date/lib/parse_date.c" yy394: YYDEBUG(394, *YYCURSOR); yyaccept = 5; @@ -9028,7 +9029,7 @@ yy454: ++YYCURSOR; yy455: YYDEBUG(455, *YYCURSOR); -#line 1255 "ext/date/lib/parse_date.re" +#line 1256 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("iso8601date4 | iso8601date2 | iso8601dateslash | dateslash"); TIMELIB_INIT; @@ -9039,7 +9040,7 @@ yy455: TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -#line 9043 "ext/date/lib/parse_date.c" +#line 9044 "ext/date/lib/parse_date.c" yy456: YYDEBUG(456, *YYCURSOR); yyaccept = 0; @@ -9599,7 +9600,7 @@ yy475: } yy476: YYDEBUG(476, *YYCURSOR); -#line 1392 "ext/date/lib/parse_date.re" +#line 1393 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("datenoyearrev"); TIMELIB_INIT; @@ -9610,7 +9611,7 @@ yy476: TIMELIB_DEINIT; return TIMELIB_DATE_TEXT; } -#line 9614 "ext/date/lib/parse_date.c" +#line 9615 "ext/date/lib/parse_date.c" yy477: YYDEBUG(477, *YYCURSOR); yyaccept = 10; @@ -9751,7 +9752,7 @@ yy488: YYDEBUG(488, *YYCURSOR); ++YYCURSOR; YYDEBUG(489, *YYCURSOR); -#line 1110 "ext/date/lib/parse_date.re" +#line 1111 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12"); TIMELIB_INIT; @@ -9767,7 +9768,7 @@ yy488: TIMELIB_DEINIT; return TIMELIB_TIME12; } -#line 9771 "ext/date/lib/parse_date.c" +#line 9772 "ext/date/lib/parse_date.c" yy490: YYDEBUG(490, *YYCURSOR); yyaccept = 11; @@ -9780,7 +9781,7 @@ yy490: } yy491: YYDEBUG(491, *YYCURSOR); -#line 1147 "ext/date/lib/parse_date.re" +#line 1148 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long"); @@ -9805,7 +9806,7 @@ yy491: TIMELIB_DEINIT; return TIMELIB_TIME24_WITH_ZONE; } -#line 9809 "ext/date/lib/parse_date.c" +#line 9810 "ext/date/lib/parse_date.c" yy492: YYDEBUG(492, *YYCURSOR); yyaccept = 11; @@ -10115,7 +10116,7 @@ yy523: YYDEBUG(523, *YYCURSOR); ++YYCURSOR; YYDEBUG(524, *YYCURSOR); -#line 1127 "ext/date/lib/parse_date.re" +#line 1128 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("mssqltime"); TIMELIB_INIT; @@ -10134,7 +10135,7 @@ yy523: TIMELIB_DEINIT; return TIMELIB_TIME24_WITH_ZONE; } -#line 10138 "ext/date/lib/parse_date.c" +#line 10139 "ext/date/lib/parse_date.c" yy525: YYDEBUG(525, *YYCURSOR); yyaccept = 11; @@ -10240,7 +10241,7 @@ yy534: if (yych <= '9') goto yy541; yy535: YYDEBUG(535, *YYCURSOR); -#line 1309 "ext/date/lib/parse_date.re" +#line 1310 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("datefull"); @@ -10254,7 +10255,7 @@ yy535: TIMELIB_DEINIT; return TIMELIB_DATE_FULL; } -#line 10258 "ext/date/lib/parse_date.c" +#line 10259 "ext/date/lib/parse_date.c" yy536: YYDEBUG(536, *YYCURSOR); yych = *++YYCURSOR; @@ -10991,7 +10992,7 @@ yy605: YYDEBUG(606, *YYCURSOR); ++YYCURSOR; YYDEBUG(607, *YYCURSOR); -#line 1324 "ext/date/lib/parse_date.re" +#line 1325 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("pointed date YYYY"); TIMELIB_INIT; @@ -11002,7 +11003,7 @@ yy605: TIMELIB_DEINIT; return TIMELIB_DATE_FULL_POINTED; } -#line 11006 "ext/date/lib/parse_date.c" +#line 11007 "ext/date/lib/parse_date.c" yy608: YYDEBUG(608, *YYCURSOR); yyaccept = 11; @@ -11038,7 +11039,7 @@ yy611: if (yych <= '9') goto yy605; yy612: YYDEBUG(612, *YYCURSOR); -#line 1336 "ext/date/lib/parse_date.re" +#line 1337 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("pointed date YY"); @@ -11051,7 +11052,7 @@ yy612: TIMELIB_DEINIT; return TIMELIB_DATE_FULL_POINTED; } -#line 11055 "ext/date/lib/parse_date.c" +#line 11056 "ext/date/lib/parse_date.c" yy613: YYDEBUG(613, *YYCURSOR); yyaccept = 11; @@ -11692,7 +11693,7 @@ yy656: } yy657: YYDEBUG(657, *YYCURSOR); -#line 1295 "ext/date/lib/parse_date.re" +#line 1296 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("gnudateshort"); @@ -11705,7 +11706,7 @@ yy657: TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -#line 11709 "ext/date/lib/parse_date.c" +#line 11710 "ext/date/lib/parse_date.c" yy658: YYDEBUG(658, *YYCURSOR); yyaccept = 13; @@ -11811,7 +11812,7 @@ yy666: } yy667: YYDEBUG(667, *YYCURSOR); -#line 1239 "ext/date/lib/parse_date.re" +#line 1240 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("americanshort | american"); @@ -11826,7 +11827,7 @@ yy667: TIMELIB_DEINIT; return TIMELIB_AMERICAN; } -#line 11830 "ext/date/lib/parse_date.c" +#line 11831 "ext/date/lib/parse_date.c" yy668: YYDEBUG(668, *YYCURSOR); yyaccept = 14; @@ -12059,7 +12060,7 @@ yy700: if (yych <= ':') goto yy704; yy701: YYDEBUG(701, *YYCURSOR); -#line 1522 "ext/date/lib/parse_date.re" +#line 1523 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("clf"); @@ -12079,7 +12080,7 @@ yy701: TIMELIB_DEINIT; return TIMELIB_CLF; } -#line 12083 "ext/date/lib/parse_date.c" +#line 12084 "ext/date/lib/parse_date.c" yy702: YYDEBUG(702, *YYCURSOR); yych = *++YYCURSOR; @@ -12631,7 +12632,7 @@ yy763: } yy764: YYDEBUG(764, *YYCURSOR); -#line 1267 "ext/date/lib/parse_date.re" +#line 1268 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("iso8601date2"); @@ -12644,7 +12645,7 @@ yy764: TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -#line 12648 "ext/date/lib/parse_date.c" +#line 12649 "ext/date/lib/parse_date.c" yy765: YYDEBUG(765, *YYCURSOR); yych = *++YYCURSOR; @@ -12683,7 +12684,7 @@ yy771: YYDEBUG(771, *YYCURSOR); ++YYCURSOR; YYDEBUG(772, *YYCURSOR); -#line 1508 "ext/date/lib/parse_date.re" +#line 1509 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("pgtextreverse"); @@ -12696,7 +12697,7 @@ yy771: TIMELIB_DEINIT; return TIMELIB_PG_TEXT; } -#line 12700 "ext/date/lib/parse_date.c" +#line 12701 "ext/date/lib/parse_date.c" yy773: YYDEBUG(773, *YYCURSOR); yych = *++YYCURSOR; @@ -12834,7 +12835,7 @@ yy783: } yy784: YYDEBUG(784, *YYCURSOR); -#line 1543 "ext/date/lib/parse_date.re" +#line 1544 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("year4"); TIMELIB_INIT; @@ -12842,7 +12843,7 @@ yy784: TIMELIB_DEINIT; return TIMELIB_CLF; } -#line 12846 "ext/date/lib/parse_date.c" +#line 12847 "ext/date/lib/parse_date.c" yy785: YYDEBUG(785, *YYCURSOR); yych = *++YYCURSOR; @@ -12993,7 +12994,7 @@ yy793: } yy794: YYDEBUG(794, *YYCURSOR); -#line 1364 "ext/date/lib/parse_date.re" +#line 1365 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("datenodayrev"); @@ -13006,7 +13007,7 @@ yy794: TIMELIB_DEINIT; return TIMELIB_DATE_NO_DAY; } -#line 13010 "ext/date/lib/parse_date.c" +#line 13011 "ext/date/lib/parse_date.c" yy795: YYDEBUG(795, *YYCURSOR); yych = *++YYCURSOR; @@ -13221,7 +13222,7 @@ yy814: if (yych <= '7') goto yy817; yy815: YYDEBUG(815, *YYCURSOR); -#line 1475 "ext/date/lib/parse_date.re" +#line 1476 "ext/date/lib/parse_date.re" { timelib_sll w, d; DEBUG_OUTPUT("isoweek"); @@ -13239,7 +13240,7 @@ yy815: TIMELIB_DEINIT; return TIMELIB_ISO_WEEK; } -#line 13243 "ext/date/lib/parse_date.c" +#line 13244 "ext/date/lib/parse_date.c" yy816: YYDEBUG(816, *YYCURSOR); yych = *++YYCURSOR; @@ -13249,7 +13250,7 @@ yy817: YYDEBUG(817, *YYCURSOR); ++YYCURSOR; YYDEBUG(818, *YYCURSOR); -#line 1456 "ext/date/lib/parse_date.re" +#line 1457 "ext/date/lib/parse_date.re" { timelib_sll w, d; DEBUG_OUTPUT("isoweekday"); @@ -13267,7 +13268,7 @@ yy817: TIMELIB_DEINIT; return TIMELIB_ISO_WEEK; } -#line 13271 "ext/date/lib/parse_date.c" +#line 13272 "ext/date/lib/parse_date.c" yy819: YYDEBUG(819, *YYCURSOR); yych = *++YYCURSOR; @@ -13331,7 +13332,7 @@ yy821: } yy822: YYDEBUG(822, *YYCURSOR); -#line 1442 "ext/date/lib/parse_date.re" +#line 1443 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("pgydotd"); @@ -13344,7 +13345,7 @@ yy822: TIMELIB_DEINIT; return TIMELIB_PG_YEARDAY; } -#line 13348 "ext/date/lib/parse_date.c" +#line 13349 "ext/date/lib/parse_date.c" yy823: YYDEBUG(823, *YYCURSOR); yych = *++YYCURSOR; @@ -13447,7 +13448,7 @@ yy842: ++YYCURSOR; yy843: YYDEBUG(843, *YYCURSOR); -#line 1416 "ext/date/lib/parse_date.re" +#line 1417 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx | exif"); @@ -13472,7 +13473,7 @@ yy843: TIMELIB_DEINIT; return TIMELIB_XMLRPC_SOAP; } -#line 13476 "ext/date/lib/parse_date.c" +#line 13477 "ext/date/lib/parse_date.c" yy844: YYDEBUG(844, *YYCURSOR); yych = *++YYCURSOR; @@ -13734,7 +13735,7 @@ yy848: } yy849: YYDEBUG(849, *YYCURSOR); -#line 1404 "ext/date/lib/parse_date.re" +#line 1405 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("datenocolon"); TIMELIB_INIT; @@ -13745,7 +13746,7 @@ yy849: TIMELIB_DEINIT; return TIMELIB_DATE_NOCOLON; } -#line 13749 "ext/date/lib/parse_date.c" +#line 13750 "ext/date/lib/parse_date.c" yy850: YYDEBUG(850, *YYCURSOR); yych = *++YYCURSOR; @@ -14665,7 +14666,7 @@ yy973: if (yych <= '9') goto yy996; yy974: YYDEBUG(974, *YYCURSOR); -#line 1281 "ext/date/lib/parse_date.re" +#line 1282 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("gnudateshorter"); @@ -14678,7 +14679,7 @@ yy974: TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -#line 14682 "ext/date/lib/parse_date.c" +#line 14683 "ext/date/lib/parse_date.c" yy975: YYDEBUG(975, *YYCURSOR); yyaccept = 22; @@ -15687,7 +15688,7 @@ yy1066: } yy1068: YYDEBUG(1068, *YYCURSOR); -#line 1173 "ext/date/lib/parse_date.re" +#line 1174 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("gnunocolon"); TIMELIB_INIT; @@ -15709,7 +15710,7 @@ yy1068: TIMELIB_DEINIT; return TIMELIB_GNU_NOCOLON; } -#line 15713 "ext/date/lib/parse_date.c" +#line 15714 "ext/date/lib/parse_date.c" yy1069: YYDEBUG(1069, *YYCURSOR); yych = *++YYCURSOR; @@ -15801,7 +15802,7 @@ yy1075: } yy1076: YYDEBUG(1076, *YYCURSOR); -#line 1219 "ext/date/lib/parse_date.re" +#line 1220 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("iso8601nocolon"); @@ -15820,7 +15821,7 @@ yy1076: TIMELIB_DEINIT; return TIMELIB_ISO_NOCOLON; } -#line 15824 "ext/date/lib/parse_date.c" +#line 15825 "ext/date/lib/parse_date.c" yy1077: YYDEBUG(1077, *YYCURSOR); yyaccept = 25; @@ -16718,7 +16719,7 @@ yy1117: } yy1118: YYDEBUG(1118, *YYCURSOR); -#line 1615 "ext/date/lib/parse_date.re" +#line 1616 "ext/date/lib/parse_date.re" { timelib_sll i; int behavior = 0; @@ -16734,7 +16735,7 @@ yy1118: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 16738 "ext/date/lib/parse_date.c" +#line 16739 "ext/date/lib/parse_date.c" yy1119: YYDEBUG(1119, *YYCURSOR); ++YYCURSOR; @@ -16785,7 +16786,7 @@ yy1126: YYDEBUG(1126, *YYCURSOR); ++YYCURSOR; YYDEBUG(1127, *YYCURSOR); -#line 1088 "ext/date/lib/parse_date.re" +#line 1089 "ext/date/lib/parse_date.re" { timelib_sll i; int behavior = 0; @@ -16806,7 +16807,7 @@ yy1126: TIMELIB_DEINIT; return TIMELIB_WEEK_DAY_OF_MONTH; } -#line 16810 "ext/date/lib/parse_date.c" +#line 16811 "ext/date/lib/parse_date.c" yy1128: YYDEBUG(1128, *YYCURSOR); yyaccept = 26; @@ -16914,7 +16915,7 @@ yy1141: } yy1142: YYDEBUG(1142, *YYCURSOR); -#line 1591 "ext/date/lib/parse_date.re" +#line 1592 "ext/date/lib/parse_date.re" { timelib_sll i; int behavior = 0; @@ -16937,7 +16938,7 @@ yy1142: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 16941 "ext/date/lib/parse_date.c" +#line 16942 "ext/date/lib/parse_date.c" yy1143: YYDEBUG(1143, *YYCURSOR); yych = *++YYCURSOR; @@ -19614,7 +19615,7 @@ yy1294: goto yy1298; yy1295: YYDEBUG(1295, *YYCURSOR); -#line 1065 "ext/date/lib/parse_date.re" +#line 1066 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("backof | frontof"); TIMELIB_INIT; @@ -19636,7 +19637,7 @@ yy1295: TIMELIB_DEINIT; return TIMELIB_LF_DAY_OF_MONTH; } -#line 19640 "ext/date/lib/parse_date.c" +#line 19641 "ext/date/lib/parse_date.c" yy1296: YYDEBUG(1296, *YYCURSOR); yyaccept = 28; @@ -21327,7 +21328,7 @@ yy1385: if (yych <= '9') goto yy1385; yy1387: YYDEBUG(1387, *YYCURSOR); -#line 1022 "ext/date/lib/parse_date.re" +#line 1023 "ext/date/lib/parse_date.re" { timelib_ull i; @@ -21352,7 +21353,7 @@ yy1387: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 21356 "ext/date/lib/parse_date.c" +#line 21357 "ext/date/lib/parse_date.c" yy1388: YYDEBUG(1388, *YYCURSOR); yych = *++YYCURSOR; @@ -21788,7 +21789,7 @@ yy1416: ++YYCURSOR; yy1417: YYDEBUG(1417, *YYCURSOR); -#line 1010 "ext/date/lib/parse_date.re" +#line 1011 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("tomorrow"); TIMELIB_INIT; @@ -21799,7 +21800,7 @@ yy1417: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 21803 "ext/date/lib/parse_date.c" +#line 21804 "ext/date/lib/parse_date.c" yy1418: YYDEBUG(1418, *YYCURSOR); yych = *++YYCURSOR; @@ -21834,7 +21835,7 @@ yy1419: } yy1420: YYDEBUG(1420, *YYCURSOR); -#line 1000 "ext/date/lib/parse_date.re" +#line 1001 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("midnight | today"); TIMELIB_INIT; @@ -21843,7 +21844,7 @@ yy1420: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 21847 "ext/date/lib/parse_date.c" +#line 21848 "ext/date/lib/parse_date.c" yy1421: YYDEBUG(1421, *YYCURSOR); yych = *++YYCURSOR; @@ -23855,7 +23856,7 @@ yy1499: } yy1500: YYDEBUG(1500, *YYCURSOR); -#line 979 "ext/date/lib/parse_date.re" +#line 980 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("now"); TIMELIB_INIT; @@ -23863,7 +23864,7 @@ yy1500: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 23867 "ext/date/lib/parse_date.c" +#line 23868 "ext/date/lib/parse_date.c" yy1501: YYDEBUG(1501, *YYCURSOR); yych = *++YYCURSOR; @@ -24002,7 +24003,7 @@ yy1507: } yy1508: YYDEBUG(1508, *YYCURSOR); -#line 988 "ext/date/lib/parse_date.re" +#line 989 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("noon"); TIMELIB_INIT; @@ -24013,7 +24014,7 @@ yy1508: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 24017 "ext/date/lib/parse_date.c" +#line 24018 "ext/date/lib/parse_date.c" yy1509: YYDEBUG(1509, *YYCURSOR); yyaccept = 0; @@ -24546,7 +24547,7 @@ yy1530: ++YYCURSOR; yy1531: YYDEBUG(1531, *YYCURSOR); -#line 967 "ext/date/lib/parse_date.re" +#line 968 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("yesterday"); TIMELIB_INIT; @@ -24557,7 +24558,7 @@ yy1531: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 24561 "ext/date/lib/parse_date.c" +#line 24562 "ext/date/lib/parse_date.c" yy1532: YYDEBUG(1532, *YYCURSOR); yyaccept = 0; @@ -24730,7 +24731,7 @@ yy1537: goto yy1531; } } -#line 1741 "ext/date/lib/parse_date.re" +#line 1742 "ext/date/lib/parse_date.re" } @@ -25001,7 +25002,7 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim TIMELIB_CHECK_NUMBER; sec = timelib_get_nr_ex((char **) &ptr, 2, &length); if (sec == TIMELIB_UNSET || length != 2) { - add_pbf_error(s, "A two second minute could not be found", string, begin); + add_pbf_error(s, "A two digit second could not be found", string, begin); } else { s->time->s = sec; } diff --git a/ext/date/lib/parse_date.re b/ext/date/lib/parse_date.re index 014f6a09e2..6d91d9ada9 100644 --- a/ext/date/lib/parse_date.re +++ b/ext/date/lib/parse_date.re @@ -614,7 +614,8 @@ static const timelib_relunit* timelib_lookup_relunit(char **ptr) char *begin = *ptr, *end; const timelib_relunit *tp, *value = NULL; - while (**ptr != '\0' && **ptr != ' ' && **ptr != ',' && **ptr != '\t') { + while (**ptr != '\0' && **ptr != ' ' && **ptr != ',' && **ptr != '\t' && **ptr != ';' && **ptr != ':' && + **ptr != '/' && **ptr != '.' && **ptr != '-' && **ptr != '(' && **ptr != ')' ) { ++*ptr; } end = *ptr; @@ -2008,7 +2009,7 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim TIMELIB_CHECK_NUMBER; sec = timelib_get_nr_ex((char **) &ptr, 2, &length); if (sec == TIMELIB_UNSET || length != 2) { - add_pbf_error(s, "A two second minute could not be found", string, begin); + add_pbf_error(s, "A two digit second could not be found", string, begin); } else { s->time->s = sec; } diff --git a/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h index 1e5706cdcc..8142aab565 100644 --- a/ext/date/lib/timezonedb.h +++ b/ext/date/lib/timezonedb.h @@ -58,529 +58,529 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[579] = { { "America/Anguilla" , 0x002952 }, { "America/Antigua" , 0x0029A7 }, { "America/Araguaina" , 0x002A0D }, - { "America/Argentina/Buenos_Aires" , 0x002C67 }, - { "America/Argentina/Catamarca" , 0x002E15 }, - { "America/Argentina/ComodRivadavia" , 0x002FD6 }, - { "America/Argentina/Cordoba" , 0x00317C }, - { "America/Argentina/Jujuy" , 0x003351 }, - { "America/Argentina/La_Rioja" , 0x003505 }, - { "America/Argentina/Mendoza" , 0x0036BD }, - { "America/Argentina/Rio_Gallegos" , 0x00387D }, - { "America/Argentina/Salta" , 0x003A32 }, - { "America/Argentina/San_Juan" , 0x003BDE }, - { "America/Argentina/San_Luis" , 0x003D96 }, - { "America/Argentina/Tucuman" , 0x003F5C }, - { "America/Argentina/Ushuaia" , 0x004118 }, - { "America/Aruba" , 0x0042D3 }, - { "America/Asuncion" , 0x004339 }, - { "America/Atikokan" , 0x00461E }, - { "America/Atka" , 0x0046F4 }, - { "America/Bahia" , 0x004A5A }, - { "America/Bahia_Banderas" , 0x004BED }, - { "America/Barbados" , 0x004E66 }, - { "America/Belem" , 0x004F00 }, - { "America/Belize" , 0x004FFB }, - { "America/Blanc-Sablon" , 0x005177 }, - { "America/Boa_Vista" , 0x00522B }, - { "America/Bogota" , 0x005334 }, - { "America/Boise" , 0x0053A0 }, - { "America/Buenos_Aires" , 0x005737 }, - { "America/Cambridge_Bay" , 0x0058D0 }, - { "America/Campo_Grande" , 0x005BF8 }, - { "America/Cancun" , 0x005EE7 }, - { "America/Caracas" , 0x006129 }, - { "America/Catamarca" , 0x006190 }, - { "America/Cayenne" , 0x006336 }, - { "America/Cayman" , 0x006398 }, - { "America/Chicago" , 0x0063ED }, - { "America/Chihuahua" , 0x006904 }, - { "America/Coral_Harbour" , 0x006B6F }, - { "America/Cordoba" , 0x006C01 }, - { "America/Costa_Rica" , 0x006DA7 }, - { "America/Creston" , 0x006E31 }, - { "America/Cuiaba" , 0x006EBD }, - { "America/Curacao" , 0x00719B }, - { "America/Danmarkshavn" , 0x007201 }, - { "America/Dawson" , 0x007345 }, - { "America/Dawson_Creek" , 0x007662 }, - { "America/Denver" , 0x00783C }, - { "America/Detroit" , 0x007BC2 }, - { "America/Dominica" , 0x007F21 }, - { "America/Edmonton" , 0x007F76 }, - { "America/Eirunepe" , 0x00832E }, - { "America/El_Salvador" , 0x008441 }, - { "America/Ensenada" , 0x0084B6 }, - { "America/Fort_Wayne" , 0x00895D }, - { "America/Fortaleza" , 0x00881F }, - { "America/Glace_Bay" , 0x008BC7 }, - { "America/Godthab" , 0x008F3E }, - { "America/Goose_Bay" , 0x009202 }, - { "America/Grand_Turk" , 0x0096BF }, - { "America/Grenada" , 0x00996E }, - { "America/Guadeloupe" , 0x0099C3 }, - { "America/Guatemala" , 0x009A18 }, - { "America/Guayaquil" , 0x009AA1 }, - { "America/Guyana" , 0x009AFE }, - { "America/Halifax" , 0x009B7F }, - { "America/Havana" , 0x00A095 }, - { "America/Hermosillo" , 0x00A408 }, - { "America/Indiana/Indianapolis" , 0x00A4E6 }, - { "America/Indiana/Knox" , 0x00A777 }, - { "America/Indiana/Marengo" , 0x00AB0E }, - { "America/Indiana/Petersburg" , 0x00ADB4 }, - { "America/Indiana/Tell_City" , 0x00B301 }, - { "America/Indiana/Vevay" , 0x00B59A }, - { "America/Indiana/Vincennes" , 0x00B7D5 }, - { "America/Indiana/Winamac" , 0x00BA89 }, - { "America/Indianapolis" , 0x00B097 }, - { "America/Inuvik" , 0x00BD42 }, - { "America/Iqaluit" , 0x00C039 }, - { "America/Jamaica" , 0x00C35B }, - { "America/Jujuy" , 0x00C420 }, - { "America/Juneau" , 0x00C5CA }, - { "America/Kentucky/Louisville" , 0x00C948 }, - { "America/Kentucky/Monticello" , 0x00CD66 }, - { "America/Knox_IN" , 0x00D0EB }, - { "America/Kralendijk" , 0x00D45C }, - { "America/La_Paz" , 0x00D4C2 }, - { "America/Lima" , 0x00D529 }, - { "America/Los_Angeles" , 0x00D5D1 }, - { "America/Louisville" , 0x00D9E2 }, - { "America/Lower_Princes" , 0x00DDD7 }, - { "America/Maceio" , 0x00DE3D }, - { "America/Managua" , 0x00DF77 }, - { "America/Manaus" , 0x00E02A }, - { "America/Marigot" , 0x00E12C }, - { "America/Martinique" , 0x00E181 }, - { "America/Matamoros" , 0x00E1ED }, - { "America/Mazatlan" , 0x00E446 }, - { "America/Mendoza" , 0x00E6B3 }, - { "America/Menominee" , 0x00E867 }, - { "America/Merida" , 0x00EBE8 }, - { "America/Metlakatla" , 0x00EE23 }, - { "America/Mexico_City" , 0x00EF5D }, - { "America/Miquelon" , 0x00F1D8 }, - { "America/Moncton" , 0x00F44A }, - { "America/Monterrey" , 0x00F8E1 }, - { "America/Montevideo" , 0x00FB44 }, - { "America/Montreal" , 0x00FE56 }, - { "America/Montserrat" , 0x01036C }, - { "America/Nassau" , 0x0103C1 }, - { "America/New_York" , 0x010706 }, - { "America/Nipigon" , 0x010C11 }, - { "America/Nome" , 0x010F62 }, - { "America/Noronha" , 0x0112E0 }, - { "America/North_Dakota/Beulah" , 0x011410 }, - { "America/North_Dakota/Center" , 0x0117A4 }, - { "America/North_Dakota/New_Salem" , 0x011B38 }, - { "America/Ojinaga" , 0x011EE1 }, - { "America/Panama" , 0x012142 }, - { "America/Pangnirtung" , 0x012197 }, - { "America/Paramaribo" , 0x0124CD }, - { "America/Phoenix" , 0x01255F }, - { "America/Port-au-Prince" , 0x01260D }, - { "America/Port_of_Spain" , 0x01292C }, - { "America/Porto_Acre" , 0x01282D }, - { "America/Porto_Velho" , 0x012981 }, - { "America/Puerto_Rico" , 0x012A77 }, - { "America/Rainy_River" , 0x012AE2 }, - { "America/Rankin_Inlet" , 0x012E1A }, - { "America/Recife" , 0x013100 }, - { "America/Regina" , 0x01322A }, - { "America/Resolute" , 0x0133E8 }, - { "America/Rio_Branco" , 0x0136D9 }, - { "America/Rosario" , 0x0137DC }, - { "America/Santa_Isabel" , 0x013982 }, - { "America/Santarem" , 0x013D25 }, - { "America/Santiago" , 0x013E2A }, - { "America/Santo_Domingo" , 0x0141D3 }, - { "America/Sao_Paulo" , 0x014299 }, - { "America/Scoresbysund" , 0x0145A8 }, - { "America/Shiprock" , 0x014896 }, - { "America/Sitka" , 0x014C25 }, - { "America/St_Barthelemy" , 0x014FAD }, - { "America/St_Johns" , 0x015002 }, - { "America/St_Kitts" , 0x015555 }, - { "America/St_Lucia" , 0x0155AA }, - { "America/St_Thomas" , 0x0155FF }, - { "America/St_Vincent" , 0x015654 }, - { "America/Swift_Current" , 0x0156A9 }, - { "America/Tegucigalpa" , 0x0157CA }, - { "America/Thule" , 0x015849 }, - { "America/Thunder_Bay" , 0x015A90 }, - { "America/Tijuana" , 0x015DD9 }, - { "America/Toronto" , 0x016172 }, - { "America/Tortola" , 0x016689 }, - { "America/Vancouver" , 0x0166DE }, - { "America/Virgin" , 0x016B1B }, - { "America/Whitehorse" , 0x016B70 }, - { "America/Winnipeg" , 0x016E8D }, - { "America/Yakutat" , 0x0172CD }, - { "America/Yellowknife" , 0x017638 }, - { "Antarctica/Casey" , 0x017948 }, - { "Antarctica/Davis" , 0x0179E5 }, - { "Antarctica/DumontDUrville" , 0x017A86 }, - { "Antarctica/Macquarie" , 0x017B18 }, - { "Antarctica/Mawson" , 0x017D5F }, - { "Antarctica/McMurdo" , 0x017DDB }, - { "Antarctica/Palmer" , 0x0180DD }, - { "Antarctica/Rothera" , 0x0183F9 }, - { "Antarctica/South_Pole" , 0x01846F }, - { "Antarctica/Syowa" , 0x018777 }, - { "Antarctica/Vostok" , 0x0187E5 }, - { "Arctic/Longyearbyen" , 0x018856 }, - { "Asia/Aden" , 0x018B88 }, - { "Asia/Almaty" , 0x018BDD }, - { "Asia/Amman" , 0x018D5C }, - { "Asia/Anadyr" , 0x019012 }, - { "Asia/Aqtau" , 0x0191F7 }, - { "Asia/Aqtobe" , 0x0193F6 }, - { "Asia/Ashgabat" , 0x0195AE }, - { "Asia/Ashkhabad" , 0x0196CB }, - { "Asia/Baghdad" , 0x0197E8 }, - { "Asia/Bahrain" , 0x01995D }, - { "Asia/Baku" , 0x0199C3 }, - { "Asia/Bangkok" , 0x019CAB }, - { "Asia/Beirut" , 0x019D00 }, - { "Asia/Bishkek" , 0x01A00D }, - { "Asia/Brunei" , 0x01A1B9 }, - { "Asia/Calcutta" , 0x01A21B }, - { "Asia/Choibalsan" , 0x01A294 }, - { "Asia/Chongqing" , 0x01A40D }, - { "Asia/Chungking" , 0x01A4FC }, - { "Asia/Colombo" , 0x01A5AB }, - { "Asia/Dacca" , 0x01A647 }, - { "Asia/Damascus" , 0x01A6ED }, - { "Asia/Dhaka" , 0x01AA3D }, - { "Asia/Dili" , 0x01AAE3 }, - { "Asia/Dubai" , 0x01AB6C }, - { "Asia/Dushanbe" , 0x01ABC1 }, - { "Asia/Gaza" , 0x01ACC4 }, - { "Asia/Harbin" , 0x01B017 }, - { "Asia/Hebron" , 0x01B0FE }, - { "Asia/Ho_Chi_Minh" , 0x01B45A }, - { "Asia/Hong_Kong" , 0x01B4D2 }, - { "Asia/Hovd" , 0x01B694 }, - { "Asia/Irkutsk" , 0x01B80C }, - { "Asia/Istanbul" , 0x01B9F2 }, - { "Asia/Jakarta" , 0x01BDDF }, - { "Asia/Jayapura" , 0x01BE89 }, - { "Asia/Jerusalem" , 0x01BF25 }, - { "Asia/Kabul" , 0x01C254 }, - { "Asia/Kamchatka" , 0x01C2A5 }, - { "Asia/Karachi" , 0x01C481 }, - { "Asia/Kashgar" , 0x01C536 }, - { "Asia/Kathmandu" , 0x01C607 }, - { "Asia/Katmandu" , 0x01C66D }, - { "Asia/Khandyga" , 0x01C6D3 }, - { "Asia/Kolkata" , 0x01C8F8 }, - { "Asia/Krasnoyarsk" , 0x01C971 }, - { "Asia/Kuala_Lumpur" , 0x01CB59 }, - { "Asia/Kuching" , 0x01CC16 }, - { "Asia/Kuwait" , 0x01CD04 }, - { "Asia/Macao" , 0x01CD59 }, - { "Asia/Macau" , 0x01CE94 }, - { "Asia/Magadan" , 0x01CFCF }, - { "Asia/Makassar" , 0x01D1B1 }, - { "Asia/Manila" , 0x01D275 }, - { "Asia/Muscat" , 0x01D2FA }, - { "Asia/Nicosia" , 0x01D34F }, - { "Asia/Novokuznetsk" , 0x01D637 }, - { "Asia/Novosibirsk" , 0x01D839 }, - { "Asia/Omsk" , 0x01DA24 }, - { "Asia/Oral" , 0x01DC0B }, - { "Asia/Phnom_Penh" , 0x01DDDB }, - { "Asia/Pontianak" , 0x01DE53 }, - { "Asia/Pyongyang" , 0x01DF14 }, - { "Asia/Qatar" , 0x01DF81 }, - { "Asia/Qyzylorda" , 0x01DFE7 }, - { "Asia/Rangoon" , 0x01E1BD }, - { "Asia/Riyadh" , 0x01E235 }, - { "Asia/Saigon" , 0x01E28A }, - { "Asia/Sakhalin" , 0x01E302 }, - { "Asia/Samarkand" , 0x01E4F9 }, - { "Asia/Seoul" , 0x01E62F }, - { "Asia/Shanghai" , 0x01E6D3 }, - { "Asia/Singapore" , 0x01E7B3 }, - { "Asia/Taipei" , 0x01E86A }, - { "Asia/Tashkent" , 0x01E982 }, - { "Asia/Tbilisi" , 0x01EAB3 }, - { "Asia/Tehran" , 0x01EC6D }, - { "Asia/Tel_Aviv" , 0x01EEDB }, - { "Asia/Thimbu" , 0x01F20A }, - { "Asia/Thimphu" , 0x01F270 }, - { "Asia/Tokyo" , 0x01F2D6 }, - { "Asia/Ujung_Pandang" , 0x01F35F }, - { "Asia/Ulaanbaatar" , 0x01F3DB }, - { "Asia/Ulan_Bator" , 0x01F536 }, - { "Asia/Urumqi" , 0x01F683 }, - { "Asia/Ust-Nera" , 0x01F74A }, - { "Asia/Vientiane" , 0x01F94F }, - { "Asia/Vladivostok" , 0x01F9C7 }, - { "Asia/Yakutsk" , 0x01FBB3 }, - { "Asia/Yekaterinburg" , 0x01FD98 }, - { "Asia/Yerevan" , 0x01FFA3 }, - { "Atlantic/Azores" , 0x0201A3 }, - { "Atlantic/Bermuda" , 0x0206A6 }, - { "Atlantic/Canary" , 0x020987 }, - { "Atlantic/Cape_Verde" , 0x020C5D }, - { "Atlantic/Faeroe" , 0x020CD6 }, - { "Atlantic/Faroe" , 0x020F7A }, - { "Atlantic/Jan_Mayen" , 0x02121E }, - { "Atlantic/Madeira" , 0x021550 }, - { "Atlantic/Reykjavik" , 0x021A59 }, - { "Atlantic/South_Georgia" , 0x021C12 }, - { "Atlantic/St_Helena" , 0x021E24 }, - { "Atlantic/Stanley" , 0x021C56 }, - { "Australia/ACT" , 0x021E79 }, - { "Australia/Adelaide" , 0x022196 }, - { "Australia/Brisbane" , 0x0224C2 }, - { "Australia/Broken_Hill" , 0x022589 }, - { "Australia/Canberra" , 0x0228C7 }, - { "Australia/Currie" , 0x022BE4 }, - { "Australia/Darwin" , 0x022F17 }, - { "Australia/Eucla" , 0x022F9D }, - { "Australia/Hobart" , 0x023072 }, - { "Australia/LHI" , 0x0233D0 }, - { "Australia/Lindeman" , 0x02366B }, - { "Australia/Lord_Howe" , 0x02374C }, - { "Australia/Melbourne" , 0x0239F7 }, - { "Australia/North" , 0x023D1C }, - { "Australia/NSW" , 0x023D90 }, - { "Australia/Perth" , 0x0240AD }, - { "Australia/Queensland" , 0x024185 }, - { "Australia/South" , 0x024231 }, - { "Australia/Sydney" , 0x02454E }, - { "Australia/Tasmania" , 0x02488B }, - { "Australia/Victoria" , 0x024BD0 }, - { "Australia/West" , 0x024EED }, - { "Australia/Yancowinna" , 0x024FA3 }, - { "Brazil/Acre" , 0x0252C5 }, - { "Brazil/DeNoronha" , 0x0253C4 }, - { "Brazil/East" , 0x0254E4 }, - { "Brazil/West" , 0x0257C1 }, - { "Canada/Atlantic" , 0x0258B9 }, - { "Canada/Central" , 0x025DA1 }, - { "Canada/East-Saskatchewan" , 0x0266AB }, - { "Canada/Eastern" , 0x0261BB }, - { "Canada/Mountain" , 0x026834 }, - { "Canada/Newfoundland" , 0x026BAA }, - { "Canada/Pacific" , 0x0270D5 }, - { "Canada/Saskatchewan" , 0x0274EE }, - { "Canada/Yukon" , 0x027677 }, - { "CET" , 0x02797A }, - { "Chile/Continental" , 0x027C83 }, - { "Chile/EasterIsland" , 0x02801E }, - { "CST6CDT" , 0x028360 }, - { "Cuba" , 0x0286B1 }, - { "EET" , 0x028A24 }, - { "Egypt" , 0x028CD7 }, - { "Eire" , 0x028F9A }, - { "EST" , 0x0294AB }, - { "EST5EDT" , 0x0294EF }, - { "Etc/GMT" , 0x029840 }, - { "Etc/GMT+0" , 0x02990C }, - { "Etc/GMT+1" , 0x029996 }, - { "Etc/GMT+10" , 0x029A23 }, - { "Etc/GMT+11" , 0x029AB1 }, - { "Etc/GMT+12" , 0x029B3F }, - { "Etc/GMT+2" , 0x029C5A }, - { "Etc/GMT+3" , 0x029CE6 }, - { "Etc/GMT+4" , 0x029D72 }, - { "Etc/GMT+5" , 0x029DFE }, - { "Etc/GMT+6" , 0x029E8A }, - { "Etc/GMT+7" , 0x029F16 }, - { "Etc/GMT+8" , 0x029FA2 }, - { "Etc/GMT+9" , 0x02A02E }, - { "Etc/GMT-0" , 0x0298C8 }, - { "Etc/GMT-1" , 0x029950 }, - { "Etc/GMT-10" , 0x0299DC }, - { "Etc/GMT-11" , 0x029A6A }, - { "Etc/GMT-12" , 0x029AF8 }, - { "Etc/GMT-13" , 0x029B86 }, - { "Etc/GMT-14" , 0x029BCD }, - { "Etc/GMT-2" , 0x029C14 }, - { "Etc/GMT-3" , 0x029CA0 }, - { "Etc/GMT-4" , 0x029D2C }, - { "Etc/GMT-5" , 0x029DB8 }, - { "Etc/GMT-6" , 0x029E44 }, - { "Etc/GMT-7" , 0x029ED0 }, - { "Etc/GMT-8" , 0x029F5C }, - { "Etc/GMT-9" , 0x029FE8 }, - { "Etc/GMT0" , 0x029884 }, - { "Etc/Greenwich" , 0x02A074 }, - { "Etc/UCT" , 0x02A0B8 }, - { "Etc/Universal" , 0x02A0FC }, - { "Etc/UTC" , 0x02A140 }, - { "Etc/Zulu" , 0x02A184 }, - { "Europe/Amsterdam" , 0x02A1C8 }, - { "Europe/Andorra" , 0x02A606 }, - { "Europe/Athens" , 0x02A882 }, - { "Europe/Belfast" , 0x02ABC5 }, - { "Europe/Belgrade" , 0x02B0FC }, - { "Europe/Berlin" , 0x02B3C5 }, - { "Europe/Bratislava" , 0x02B729 }, - { "Europe/Brussels" , 0x02BA5B }, - { "Europe/Bucharest" , 0x02BE92 }, - { "Europe/Budapest" , 0x02C1BC }, - { "Europe/Busingen" , 0x02C52F }, - { "Europe/Chisinau" , 0x02C7E6 }, - { "Europe/Copenhagen" , 0x02CB74 }, - { "Europe/Dublin" , 0x02CE7E }, - { "Europe/Gibraltar" , 0x02D38F }, - { "Europe/Guernsey" , 0x02D7E6 }, - { "Europe/Helsinki" , 0x02DD1D }, - { "Europe/Isle_of_Man" , 0x02DFD3 }, - { "Europe/Istanbul" , 0x02E50A }, - { "Europe/Jersey" , 0x02E8F7 }, - { "Europe/Kaliningrad" , 0x02EE2E }, - { "Europe/Kiev" , 0x02F094 }, - { "Europe/Lisbon" , 0x02F3AB }, - { "Europe/Ljubljana" , 0x02F8AF }, - { "Europe/London" , 0x02FB78 }, - { "Europe/Luxembourg" , 0x0300AF }, - { "Europe/Madrid" , 0x030505 }, - { "Europe/Malta" , 0x0308CB }, - { "Europe/Mariehamn" , 0x030C84 }, - { "Europe/Minsk" , 0x030F3A }, - { "Europe/Monaco" , 0x031148 }, - { "Europe/Moscow" , 0x031583 }, - { "Europe/Nicosia" , 0x0317D4 }, - { "Europe/Oslo" , 0x031ABC }, - { "Europe/Paris" , 0x031DEE }, - { "Europe/Podgorica" , 0x032234 }, - { "Europe/Prague" , 0x0324FD }, - { "Europe/Riga" , 0x03282F }, - { "Europe/Rome" , 0x032B74 }, - { "Europe/Samara" , 0x032F37 }, - { "Europe/San_Marino" , 0x03316A }, - { "Europe/Sarajevo" , 0x03352D }, - { "Europe/Simferopol" , 0x0337F6 }, - { "Europe/Skopje" , 0x033B21 }, - { "Europe/Sofia" , 0x033DEA }, - { "Europe/Stockholm" , 0x0340F2 }, - { "Europe/Tallinn" , 0x0343A1 }, - { "Europe/Tirane" , 0x0346DB }, - { "Europe/Tiraspol" , 0x0349E1 }, - { "Europe/Uzhgorod" , 0x034D6F }, - { "Europe/Vaduz" , 0x035086 }, - { "Europe/Vatican" , 0x035319 }, - { "Europe/Vienna" , 0x0356DC }, - { "Europe/Vilnius" , 0x035A09 }, - { "Europe/Volgograd" , 0x035D48 }, - { "Europe/Warsaw" , 0x035F48 }, - { "Europe/Zagreb" , 0x036329 }, - { "Europe/Zaporozhye" , 0x0365F2 }, - { "Europe/Zurich" , 0x036933 }, - { "Factory" , 0x036BE2 }, - { "GB" , 0x036C53 }, - { "GB-Eire" , 0x03718A }, - { "GMT" , 0x0376C1 }, - { "GMT+0" , 0x03778D }, - { "GMT-0" , 0x037749 }, - { "GMT0" , 0x037705 }, - { "Greenwich" , 0x0377D1 }, - { "Hongkong" , 0x037815 }, - { "HST" , 0x0379D7 }, - { "Iceland" , 0x037A1B }, - { "Indian/Antananarivo" , 0x037BD4 }, - { "Indian/Chagos" , 0x037C48 }, - { "Indian/Christmas" , 0x037CAA }, - { "Indian/Cocos" , 0x037CEE }, - { "Indian/Comoro" , 0x037D32 }, - { "Indian/Kerguelen" , 0x037D87 }, - { "Indian/Mahe" , 0x037DDC }, - { "Indian/Maldives" , 0x037E31 }, - { "Indian/Mauritius" , 0x037E86 }, - { "Indian/Mayotte" , 0x037EFC }, - { "Indian/Reunion" , 0x037F51 }, - { "Iran" , 0x037FA6 }, - { "Israel" , 0x038214 }, - { "Jamaica" , 0x038543 }, - { "Japan" , 0x038608 }, - { "Kwajalein" , 0x038691 }, - { "Libya" , 0x0386F4 }, - { "MET" , 0x0388ED }, - { "Mexico/BajaNorte" , 0x038BF6 }, - { "Mexico/BajaSur" , 0x038F5F }, - { "Mexico/General" , 0x0391A4 }, - { "MST" , 0x039402 }, - { "MST7MDT" , 0x039446 }, - { "Navajo" , 0x039797 }, - { "NZ" , 0x039B10 }, - { "NZ-CHAT" , 0x039E8E }, - { "Pacific/Apia" , 0x03A176 }, - { "Pacific/Auckland" , 0x03A312 }, - { "Pacific/Chatham" , 0x03A69E }, - { "Pacific/Chuuk" , 0x03A995 }, - { "Pacific/Easter" , 0x03A9EE }, - { "Pacific/Efate" , 0x03AD4C }, - { "Pacific/Enderbury" , 0x03AE12 }, - { "Pacific/Fakaofo" , 0x03AE80 }, - { "Pacific/Fiji" , 0x03AED1 }, - { "Pacific/Funafuti" , 0x03B064 }, - { "Pacific/Galapagos" , 0x03B0A8 }, - { "Pacific/Gambier" , 0x03B120 }, - { "Pacific/Guadalcanal" , 0x03B185 }, - { "Pacific/Guam" , 0x03B1DA }, - { "Pacific/Honolulu" , 0x03B230 }, - { "Pacific/Johnston" , 0x03B2A7 }, - { "Pacific/Kiritimati" , 0x03B2F9 }, - { "Pacific/Kosrae" , 0x03B364 }, - { "Pacific/Kwajalein" , 0x03B3C1 }, - { "Pacific/Majuro" , 0x03B42D }, - { "Pacific/Marquesas" , 0x03B48C }, - { "Pacific/Midway" , 0x03B4F3 }, - { "Pacific/Nauru" , 0x03B57D }, - { "Pacific/Niue" , 0x03B5F5 }, - { "Pacific/Norfolk" , 0x03B653 }, - { "Pacific/Noumea" , 0x03B6A8 }, - { "Pacific/Pago_Pago" , 0x03B738 }, - { "Pacific/Palau" , 0x03B7C1 }, - { "Pacific/Pitcairn" , 0x03B805 }, - { "Pacific/Pohnpei" , 0x03B85A }, - { "Pacific/Ponape" , 0x03B8AF }, - { "Pacific/Port_Moresby" , 0x03B8F4 }, - { "Pacific/Rarotonga" , 0x03B938 }, - { "Pacific/Saipan" , 0x03BA14 }, - { "Pacific/Samoa" , 0x03BA77 }, - { "Pacific/Tahiti" , 0x03BB00 }, - { "Pacific/Tarawa" , 0x03BB65 }, - { "Pacific/Tongatapu" , 0x03BBB9 }, - { "Pacific/Truk" , 0x03BC45 }, - { "Pacific/Wake" , 0x03BC8A }, - { "Pacific/Wallis" , 0x03BCDA }, - { "Pacific/Yap" , 0x03BD1E }, - { "Poland" , 0x03BD63 }, - { "Portugal" , 0x03C144 }, - { "PRC" , 0x03C640 }, - { "PST8PDT" , 0x03C6F1 }, - { "ROC" , 0x03CA42 }, - { "ROK" , 0x03CB5A }, - { "Singapore" , 0x03CBFE }, - { "Turkey" , 0x03CCB5 }, - { "UCT" , 0x03D0A2 }, - { "Universal" , 0x03D0E6 }, - { "US/Alaska" , 0x03D12A }, - { "US/Aleutian" , 0x03D493 }, - { "US/Arizona" , 0x03D7F9 }, - { "US/Central" , 0x03D887 }, - { "US/East-Indiana" , 0x03E291 }, - { "US/Eastern" , 0x03DD92 }, - { "US/Hawaii" , 0x03E4FB }, - { "US/Indiana-Starke" , 0x03E56C }, - { "US/Michigan" , 0x03E8DD }, - { "US/Mountain" , 0x03EC14 }, - { "US/Pacific" , 0x03EF8D }, - { "US/Pacific-New" , 0x03F392 }, - { "US/Samoa" , 0x03F797 }, - { "UTC" , 0x03F820 }, - { "W-SU" , 0x03FB17 }, - { "WET" , 0x03F864 }, - { "Zulu" , 0x03FD51 }, + { "America/Argentina/Buenos_Aires" , 0x002B72 }, + { "America/Argentina/Catamarca" , 0x002D20 }, + { "America/Argentina/ComodRivadavia" , 0x002EE1 }, + { "America/Argentina/Cordoba" , 0x003087 }, + { "America/Argentina/Jujuy" , 0x00325C }, + { "America/Argentina/La_Rioja" , 0x003410 }, + { "America/Argentina/Mendoza" , 0x0035C8 }, + { "America/Argentina/Rio_Gallegos" , 0x003788 }, + { "America/Argentina/Salta" , 0x00393D }, + { "America/Argentina/San_Juan" , 0x003AE9 }, + { "America/Argentina/San_Luis" , 0x003CA1 }, + { "America/Argentina/Tucuman" , 0x003E67 }, + { "America/Argentina/Ushuaia" , 0x004023 }, + { "America/Aruba" , 0x0041DE }, + { "America/Asuncion" , 0x004244 }, + { "America/Atikokan" , 0x004529 }, + { "America/Atka" , 0x0045FF }, + { "America/Bahia" , 0x004965 }, + { "America/Bahia_Banderas" , 0x004AF8 }, + { "America/Barbados" , 0x004D71 }, + { "America/Belem" , 0x004E0B }, + { "America/Belize" , 0x004F06 }, + { "America/Blanc-Sablon" , 0x005082 }, + { "America/Boa_Vista" , 0x005136 }, + { "America/Bogota" , 0x00523F }, + { "America/Boise" , 0x0052AB }, + { "America/Buenos_Aires" , 0x005642 }, + { "America/Cambridge_Bay" , 0x0057DB }, + { "America/Campo_Grande" , 0x005B03 }, + { "America/Cancun" , 0x005DF2 }, + { "America/Caracas" , 0x006034 }, + { "America/Catamarca" , 0x00609B }, + { "America/Cayenne" , 0x006241 }, + { "America/Cayman" , 0x0062A3 }, + { "America/Chicago" , 0x0062F8 }, + { "America/Chihuahua" , 0x00680F }, + { "America/Coral_Harbour" , 0x006A7A }, + { "America/Cordoba" , 0x006B0C }, + { "America/Costa_Rica" , 0x006CB2 }, + { "America/Creston" , 0x006D3C }, + { "America/Cuiaba" , 0x006DC8 }, + { "America/Curacao" , 0x0070A6 }, + { "America/Danmarkshavn" , 0x00710C }, + { "America/Dawson" , 0x007250 }, + { "America/Dawson_Creek" , 0x00756D }, + { "America/Denver" , 0x007747 }, + { "America/Detroit" , 0x007ACD }, + { "America/Dominica" , 0x007E2C }, + { "America/Edmonton" , 0x007E81 }, + { "America/Eirunepe" , 0x008239 }, + { "America/El_Salvador" , 0x00834C }, + { "America/Ensenada" , 0x0083C1 }, + { "America/Fort_Wayne" , 0x008868 }, + { "America/Fortaleza" , 0x00872A }, + { "America/Glace_Bay" , 0x008AD2 }, + { "America/Godthab" , 0x008E49 }, + { "America/Goose_Bay" , 0x00910D }, + { "America/Grand_Turk" , 0x0095CA }, + { "America/Grenada" , 0x009879 }, + { "America/Guadeloupe" , 0x0098CE }, + { "America/Guatemala" , 0x009923 }, + { "America/Guayaquil" , 0x0099AC }, + { "America/Guyana" , 0x009A09 }, + { "America/Halifax" , 0x009A8A }, + { "America/Havana" , 0x009FA0 }, + { "America/Hermosillo" , 0x00A313 }, + { "America/Indiana/Indianapolis" , 0x00A3F1 }, + { "America/Indiana/Knox" , 0x00A682 }, + { "America/Indiana/Marengo" , 0x00AA19 }, + { "America/Indiana/Petersburg" , 0x00ACBF }, + { "America/Indiana/Tell_City" , 0x00B20C }, + { "America/Indiana/Vevay" , 0x00B4A5 }, + { "America/Indiana/Vincennes" , 0x00B6E0 }, + { "America/Indiana/Winamac" , 0x00B994 }, + { "America/Indianapolis" , 0x00AFA2 }, + { "America/Inuvik" , 0x00BC4D }, + { "America/Iqaluit" , 0x00BF44 }, + { "America/Jamaica" , 0x00C266 }, + { "America/Jujuy" , 0x00C32B }, + { "America/Juneau" , 0x00C4D5 }, + { "America/Kentucky/Louisville" , 0x00C853 }, + { "America/Kentucky/Monticello" , 0x00CC71 }, + { "America/Knox_IN" , 0x00CFF6 }, + { "America/Kralendijk" , 0x00D367 }, + { "America/La_Paz" , 0x00D3CD }, + { "America/Lima" , 0x00D434 }, + { "America/Los_Angeles" , 0x00D4DC }, + { "America/Louisville" , 0x00D8ED }, + { "America/Lower_Princes" , 0x00DCE2 }, + { "America/Maceio" , 0x00DD48 }, + { "America/Managua" , 0x00DE82 }, + { "America/Manaus" , 0x00DF35 }, + { "America/Marigot" , 0x00E037 }, + { "America/Martinique" , 0x00E08C }, + { "America/Matamoros" , 0x00E0F8 }, + { "America/Mazatlan" , 0x00E351 }, + { "America/Mendoza" , 0x00E5BE }, + { "America/Menominee" , 0x00E772 }, + { "America/Merida" , 0x00EAF3 }, + { "America/Metlakatla" , 0x00ED2E }, + { "America/Mexico_City" , 0x00EE68 }, + { "America/Miquelon" , 0x00F0E3 }, + { "America/Moncton" , 0x00F355 }, + { "America/Monterrey" , 0x00F7EC }, + { "America/Montevideo" , 0x00FA4F }, + { "America/Montreal" , 0x00FD61 }, + { "America/Montserrat" , 0x010251 }, + { "America/Nassau" , 0x0102A6 }, + { "America/New_York" , 0x0105EB }, + { "America/Nipigon" , 0x010AF6 }, + { "America/Nome" , 0x010E47 }, + { "America/Noronha" , 0x0111C5 }, + { "America/North_Dakota/Beulah" , 0x0112F5 }, + { "America/North_Dakota/Center" , 0x011689 }, + { "America/North_Dakota/New_Salem" , 0x011A1D }, + { "America/Ojinaga" , 0x011DC6 }, + { "America/Panama" , 0x012027 }, + { "America/Pangnirtung" , 0x01207C }, + { "America/Paramaribo" , 0x0123B2 }, + { "America/Phoenix" , 0x012444 }, + { "America/Port-au-Prince" , 0x012502 }, + { "America/Port_of_Spain" , 0x012821 }, + { "America/Porto_Acre" , 0x012722 }, + { "America/Porto_Velho" , 0x012876 }, + { "America/Puerto_Rico" , 0x01296C }, + { "America/Rainy_River" , 0x0129D7 }, + { "America/Rankin_Inlet" , 0x012D0F }, + { "America/Recife" , 0x012FF5 }, + { "America/Regina" , 0x01311F }, + { "America/Resolute" , 0x0132DD }, + { "America/Rio_Branco" , 0x0135CE }, + { "America/Rosario" , 0x0136D1 }, + { "America/Santa_Isabel" , 0x013877 }, + { "America/Santarem" , 0x013C1A }, + { "America/Santiago" , 0x013D1F }, + { "America/Santo_Domingo" , 0x0140C8 }, + { "America/Sao_Paulo" , 0x01418E }, + { "America/Scoresbysund" , 0x01449D }, + { "America/Shiprock" , 0x01478B }, + { "America/Sitka" , 0x014B04 }, + { "America/St_Barthelemy" , 0x014E8C }, + { "America/St_Johns" , 0x014EE1 }, + { "America/St_Kitts" , 0x015434 }, + { "America/St_Lucia" , 0x015489 }, + { "America/St_Thomas" , 0x0154DE }, + { "America/St_Vincent" , 0x015533 }, + { "America/Swift_Current" , 0x015588 }, + { "America/Tegucigalpa" , 0x0156A9 }, + { "America/Thule" , 0x015728 }, + { "America/Thunder_Bay" , 0x01596F }, + { "America/Tijuana" , 0x015CB8 }, + { "America/Toronto" , 0x016051 }, + { "America/Tortola" , 0x016571 }, + { "America/Vancouver" , 0x0165C6 }, + { "America/Virgin" , 0x016A03 }, + { "America/Whitehorse" , 0x016A58 }, + { "America/Winnipeg" , 0x016D75 }, + { "America/Yakutat" , 0x0171B5 }, + { "America/Yellowknife" , 0x017520 }, + { "Antarctica/Casey" , 0x017830 }, + { "Antarctica/Davis" , 0x0178CD }, + { "Antarctica/DumontDUrville" , 0x01796E }, + { "Antarctica/Macquarie" , 0x017A00 }, + { "Antarctica/Mawson" , 0x017C47 }, + { "Antarctica/McMurdo" , 0x017CC3 }, + { "Antarctica/Palmer" , 0x01806E }, + { "Antarctica/Rothera" , 0x01838A }, + { "Antarctica/South_Pole" , 0x018400 }, + { "Antarctica/Syowa" , 0x01877E }, + { "Antarctica/Vostok" , 0x0187EC }, + { "Arctic/Longyearbyen" , 0x01885D }, + { "Asia/Aden" , 0x018B8F }, + { "Asia/Almaty" , 0x018BE4 }, + { "Asia/Amman" , 0x018D63 }, + { "Asia/Anadyr" , 0x018F35 }, + { "Asia/Aqtau" , 0x01911A }, + { "Asia/Aqtobe" , 0x019319 }, + { "Asia/Ashgabat" , 0x0194D1 }, + { "Asia/Ashkhabad" , 0x0195EE }, + { "Asia/Baghdad" , 0x01970B }, + { "Asia/Bahrain" , 0x019880 }, + { "Asia/Baku" , 0x0198E6 }, + { "Asia/Bangkok" , 0x019BCE }, + { "Asia/Beirut" , 0x019C23 }, + { "Asia/Bishkek" , 0x019F30 }, + { "Asia/Brunei" , 0x01A0DC }, + { "Asia/Calcutta" , 0x01A13E }, + { "Asia/Choibalsan" , 0x01A1B7 }, + { "Asia/Chongqing" , 0x01A330 }, + { "Asia/Chungking" , 0x01A41F }, + { "Asia/Colombo" , 0x01A4CE }, + { "Asia/Dacca" , 0x01A56A }, + { "Asia/Damascus" , 0x01A610 }, + { "Asia/Dhaka" , 0x01A960 }, + { "Asia/Dili" , 0x01AA06 }, + { "Asia/Dubai" , 0x01AA90 }, + { "Asia/Dushanbe" , 0x01AAE5 }, + { "Asia/Gaza" , 0x01ABE8 }, + { "Asia/Harbin" , 0x01AF3B }, + { "Asia/Hebron" , 0x01B022 }, + { "Asia/Ho_Chi_Minh" , 0x01B37E }, + { "Asia/Hong_Kong" , 0x01B3F6 }, + { "Asia/Hovd" , 0x01B5B8 }, + { "Asia/Irkutsk" , 0x01B730 }, + { "Asia/Istanbul" , 0x01B916 }, + { "Asia/Jakarta" , 0x01BD03 }, + { "Asia/Jayapura" , 0x01BDAD }, + { "Asia/Jerusalem" , 0x01BE49 }, + { "Asia/Kabul" , 0x01C178 }, + { "Asia/Kamchatka" , 0x01C1C9 }, + { "Asia/Karachi" , 0x01C3A5 }, + { "Asia/Kashgar" , 0x01C45A }, + { "Asia/Kathmandu" , 0x01C52B }, + { "Asia/Katmandu" , 0x01C591 }, + { "Asia/Khandyga" , 0x01C5F7 }, + { "Asia/Kolkata" , 0x01C81C }, + { "Asia/Krasnoyarsk" , 0x01C895 }, + { "Asia/Kuala_Lumpur" , 0x01CA7D }, + { "Asia/Kuching" , 0x01CB3A }, + { "Asia/Kuwait" , 0x01CC28 }, + { "Asia/Macao" , 0x01CC7D }, + { "Asia/Macau" , 0x01CDB8 }, + { "Asia/Magadan" , 0x01CEF3 }, + { "Asia/Makassar" , 0x01D0D5 }, + { "Asia/Manila" , 0x01D19A }, + { "Asia/Muscat" , 0x01D21F }, + { "Asia/Nicosia" , 0x01D274 }, + { "Asia/Novokuznetsk" , 0x01D55C }, + { "Asia/Novosibirsk" , 0x01D75E }, + { "Asia/Omsk" , 0x01D949 }, + { "Asia/Oral" , 0x01DB30 }, + { "Asia/Phnom_Penh" , 0x01DD00 }, + { "Asia/Pontianak" , 0x01DD78 }, + { "Asia/Pyongyang" , 0x01DE3A }, + { "Asia/Qatar" , 0x01DEA7 }, + { "Asia/Qyzylorda" , 0x01DF0D }, + { "Asia/Rangoon" , 0x01E0E3 }, + { "Asia/Riyadh" , 0x01E15B }, + { "Asia/Saigon" , 0x01E1B0 }, + { "Asia/Sakhalin" , 0x01E228 }, + { "Asia/Samarkand" , 0x01E41F }, + { "Asia/Seoul" , 0x01E555 }, + { "Asia/Shanghai" , 0x01E5F9 }, + { "Asia/Singapore" , 0x01E6D9 }, + { "Asia/Taipei" , 0x01E790 }, + { "Asia/Tashkent" , 0x01E8A8 }, + { "Asia/Tbilisi" , 0x01E9D9 }, + { "Asia/Tehran" , 0x01EB93 }, + { "Asia/Tel_Aviv" , 0x01EE01 }, + { "Asia/Thimbu" , 0x01F130 }, + { "Asia/Thimphu" , 0x01F196 }, + { "Asia/Tokyo" , 0x01F1FC }, + { "Asia/Ujung_Pandang" , 0x01F285 }, + { "Asia/Ulaanbaatar" , 0x01F302 }, + { "Asia/Ulan_Bator" , 0x01F45D }, + { "Asia/Urumqi" , 0x01F5AA }, + { "Asia/Ust-Nera" , 0x01F671 }, + { "Asia/Vientiane" , 0x01F876 }, + { "Asia/Vladivostok" , 0x01F8EE }, + { "Asia/Yakutsk" , 0x01FADA }, + { "Asia/Yekaterinburg" , 0x01FCBF }, + { "Asia/Yerevan" , 0x01FECA }, + { "Atlantic/Azores" , 0x0200CA }, + { "Atlantic/Bermuda" , 0x0205CD }, + { "Atlantic/Canary" , 0x0208AE }, + { "Atlantic/Cape_Verde" , 0x020B84 }, + { "Atlantic/Faeroe" , 0x020BFD }, + { "Atlantic/Faroe" , 0x020EA1 }, + { "Atlantic/Jan_Mayen" , 0x021145 }, + { "Atlantic/Madeira" , 0x021477 }, + { "Atlantic/Reykjavik" , 0x021980 }, + { "Atlantic/South_Georgia" , 0x021B39 }, + { "Atlantic/St_Helena" , 0x021D4B }, + { "Atlantic/Stanley" , 0x021B7D }, + { "Australia/ACT" , 0x021DA0 }, + { "Australia/Adelaide" , 0x0220BD }, + { "Australia/Brisbane" , 0x0223E9 }, + { "Australia/Broken_Hill" , 0x0224B0 }, + { "Australia/Canberra" , 0x0227EE }, + { "Australia/Currie" , 0x022B0B }, + { "Australia/Darwin" , 0x022E3E }, + { "Australia/Eucla" , 0x022EC4 }, + { "Australia/Hobart" , 0x022F99 }, + { "Australia/LHI" , 0x0232F7 }, + { "Australia/Lindeman" , 0x023592 }, + { "Australia/Lord_Howe" , 0x023673 }, + { "Australia/Melbourne" , 0x02391E }, + { "Australia/North" , 0x023C43 }, + { "Australia/NSW" , 0x023CB7 }, + { "Australia/Perth" , 0x023FD4 }, + { "Australia/Queensland" , 0x0240AC }, + { "Australia/South" , 0x024158 }, + { "Australia/Sydney" , 0x024475 }, + { "Australia/Tasmania" , 0x0247B2 }, + { "Australia/Victoria" , 0x024AF7 }, + { "Australia/West" , 0x024E14 }, + { "Australia/Yancowinna" , 0x024ECA }, + { "Brazil/Acre" , 0x0251EC }, + { "Brazil/DeNoronha" , 0x0252EB }, + { "Brazil/East" , 0x02540B }, + { "Brazil/West" , 0x0256E8 }, + { "Canada/Atlantic" , 0x0257E0 }, + { "Canada/Central" , 0x025CC8 }, + { "Canada/East-Saskatchewan" , 0x0265D2 }, + { "Canada/Eastern" , 0x0260E2 }, + { "Canada/Mountain" , 0x02675B }, + { "Canada/Newfoundland" , 0x026AD1 }, + { "Canada/Pacific" , 0x026FFC }, + { "Canada/Saskatchewan" , 0x027415 }, + { "Canada/Yukon" , 0x02759E }, + { "CET" , 0x0278A1 }, + { "Chile/Continental" , 0x027BAA }, + { "Chile/EasterIsland" , 0x027F45 }, + { "CST6CDT" , 0x028287 }, + { "Cuba" , 0x0285D8 }, + { "EET" , 0x02894B }, + { "Egypt" , 0x028BFE }, + { "Eire" , 0x028EC1 }, + { "EST" , 0x0293D2 }, + { "EST5EDT" , 0x029416 }, + { "Etc/GMT" , 0x029767 }, + { "Etc/GMT+0" , 0x029833 }, + { "Etc/GMT+1" , 0x0298BD }, + { "Etc/GMT+10" , 0x02994A }, + { "Etc/GMT+11" , 0x0299D8 }, + { "Etc/GMT+12" , 0x029A66 }, + { "Etc/GMT+2" , 0x029B81 }, + { "Etc/GMT+3" , 0x029C0D }, + { "Etc/GMT+4" , 0x029C99 }, + { "Etc/GMT+5" , 0x029D25 }, + { "Etc/GMT+6" , 0x029DB1 }, + { "Etc/GMT+7" , 0x029E3D }, + { "Etc/GMT+8" , 0x029EC9 }, + { "Etc/GMT+9" , 0x029F55 }, + { "Etc/GMT-0" , 0x0297EF }, + { "Etc/GMT-1" , 0x029877 }, + { "Etc/GMT-10" , 0x029903 }, + { "Etc/GMT-11" , 0x029991 }, + { "Etc/GMT-12" , 0x029A1F }, + { "Etc/GMT-13" , 0x029AAD }, + { "Etc/GMT-14" , 0x029AF4 }, + { "Etc/GMT-2" , 0x029B3B }, + { "Etc/GMT-3" , 0x029BC7 }, + { "Etc/GMT-4" , 0x029C53 }, + { "Etc/GMT-5" , 0x029CDF }, + { "Etc/GMT-6" , 0x029D6B }, + { "Etc/GMT-7" , 0x029DF7 }, + { "Etc/GMT-8" , 0x029E83 }, + { "Etc/GMT-9" , 0x029F0F }, + { "Etc/GMT0" , 0x0297AB }, + { "Etc/Greenwich" , 0x029F9B }, + { "Etc/UCT" , 0x029FDF }, + { "Etc/Universal" , 0x02A023 }, + { "Etc/UTC" , 0x02A067 }, + { "Etc/Zulu" , 0x02A0AB }, + { "Europe/Amsterdam" , 0x02A0EF }, + { "Europe/Andorra" , 0x02A52D }, + { "Europe/Athens" , 0x02A7A9 }, + { "Europe/Belfast" , 0x02AAEC }, + { "Europe/Belgrade" , 0x02B023 }, + { "Europe/Berlin" , 0x02B2EC }, + { "Europe/Bratislava" , 0x02B650 }, + { "Europe/Brussels" , 0x02B982 }, + { "Europe/Bucharest" , 0x02BDB9 }, + { "Europe/Budapest" , 0x02C0E3 }, + { "Europe/Busingen" , 0x02C456 }, + { "Europe/Chisinau" , 0x02C70D }, + { "Europe/Copenhagen" , 0x02CA9B }, + { "Europe/Dublin" , 0x02CDA5 }, + { "Europe/Gibraltar" , 0x02D2B6 }, + { "Europe/Guernsey" , 0x02D70D }, + { "Europe/Helsinki" , 0x02DC44 }, + { "Europe/Isle_of_Man" , 0x02DEFA }, + { "Europe/Istanbul" , 0x02E431 }, + { "Europe/Jersey" , 0x02E81E }, + { "Europe/Kaliningrad" , 0x02ED55 }, + { "Europe/Kiev" , 0x02EFBB }, + { "Europe/Lisbon" , 0x02F2D2 }, + { "Europe/Ljubljana" , 0x02F7D6 }, + { "Europe/London" , 0x02FA9F }, + { "Europe/Luxembourg" , 0x02FFD6 }, + { "Europe/Madrid" , 0x03042C }, + { "Europe/Malta" , 0x0307F2 }, + { "Europe/Mariehamn" , 0x030BAB }, + { "Europe/Minsk" , 0x030E61 }, + { "Europe/Monaco" , 0x03106F }, + { "Europe/Moscow" , 0x0314AA }, + { "Europe/Nicosia" , 0x0316FB }, + { "Europe/Oslo" , 0x0319E3 }, + { "Europe/Paris" , 0x031D15 }, + { "Europe/Podgorica" , 0x03215B }, + { "Europe/Prague" , 0x032424 }, + { "Europe/Riga" , 0x032756 }, + { "Europe/Rome" , 0x032A9B }, + { "Europe/Samara" , 0x032E5E }, + { "Europe/San_Marino" , 0x033091 }, + { "Europe/Sarajevo" , 0x033454 }, + { "Europe/Simferopol" , 0x03371D }, + { "Europe/Skopje" , 0x033A48 }, + { "Europe/Sofia" , 0x033D11 }, + { "Europe/Stockholm" , 0x034019 }, + { "Europe/Tallinn" , 0x0342C8 }, + { "Europe/Tirane" , 0x034602 }, + { "Europe/Tiraspol" , 0x034908 }, + { "Europe/Uzhgorod" , 0x034C96 }, + { "Europe/Vaduz" , 0x034FAD }, + { "Europe/Vatican" , 0x03525C }, + { "Europe/Vienna" , 0x03561F }, + { "Europe/Vilnius" , 0x03594C }, + { "Europe/Volgograd" , 0x035C8B }, + { "Europe/Warsaw" , 0x035E8B }, + { "Europe/Zagreb" , 0x03626C }, + { "Europe/Zaporozhye" , 0x036535 }, + { "Europe/Zurich" , 0x036876 }, + { "Factory" , 0x036B25 }, + { "GB" , 0x036B96 }, + { "GB-Eire" , 0x0370CD }, + { "GMT" , 0x037604 }, + { "GMT+0" , 0x0376D0 }, + { "GMT-0" , 0x03768C }, + { "GMT0" , 0x037648 }, + { "Greenwich" , 0x037714 }, + { "Hongkong" , 0x037758 }, + { "HST" , 0x03791A }, + { "Iceland" , 0x03795E }, + { "Indian/Antananarivo" , 0x037B17 }, + { "Indian/Chagos" , 0x037B8B }, + { "Indian/Christmas" , 0x037BED }, + { "Indian/Cocos" , 0x037C31 }, + { "Indian/Comoro" , 0x037C75 }, + { "Indian/Kerguelen" , 0x037CCA }, + { "Indian/Mahe" , 0x037D1F }, + { "Indian/Maldives" , 0x037D74 }, + { "Indian/Mauritius" , 0x037DC9 }, + { "Indian/Mayotte" , 0x037E3F }, + { "Indian/Reunion" , 0x037E94 }, + { "Iran" , 0x037EE9 }, + { "Israel" , 0x038157 }, + { "Jamaica" , 0x038486 }, + { "Japan" , 0x03854B }, + { "Kwajalein" , 0x0385D4 }, + { "Libya" , 0x038637 }, + { "MET" , 0x038830 }, + { "Mexico/BajaNorte" , 0x038B39 }, + { "Mexico/BajaSur" , 0x038EA2 }, + { "Mexico/General" , 0x0390E7 }, + { "MST" , 0x039345 }, + { "MST7MDT" , 0x039389 }, + { "Navajo" , 0x0396DA }, + { "NZ" , 0x039A53 }, + { "NZ-CHAT" , 0x039DD1 }, + { "Pacific/Apia" , 0x03A0B9 }, + { "Pacific/Auckland" , 0x03A255 }, + { "Pacific/Chatham" , 0x03A5E1 }, + { "Pacific/Chuuk" , 0x03A8D8 }, + { "Pacific/Easter" , 0x03A931 }, + { "Pacific/Efate" , 0x03AC8F }, + { "Pacific/Enderbury" , 0x03AD55 }, + { "Pacific/Fakaofo" , 0x03ADC3 }, + { "Pacific/Fiji" , 0x03AE14 }, + { "Pacific/Funafuti" , 0x03AFA7 }, + { "Pacific/Galapagos" , 0x03AFEB }, + { "Pacific/Gambier" , 0x03B063 }, + { "Pacific/Guadalcanal" , 0x03B0C8 }, + { "Pacific/Guam" , 0x03B11D }, + { "Pacific/Honolulu" , 0x03B173 }, + { "Pacific/Johnston" , 0x03B1EA }, + { "Pacific/Kiritimati" , 0x03B269 }, + { "Pacific/Kosrae" , 0x03B2D4 }, + { "Pacific/Kwajalein" , 0x03B331 }, + { "Pacific/Majuro" , 0x03B39D }, + { "Pacific/Marquesas" , 0x03B3FC }, + { "Pacific/Midway" , 0x03B463 }, + { "Pacific/Nauru" , 0x03B4ED }, + { "Pacific/Niue" , 0x03B565 }, + { "Pacific/Norfolk" , 0x03B5C3 }, + { "Pacific/Noumea" , 0x03B618 }, + { "Pacific/Pago_Pago" , 0x03B6A8 }, + { "Pacific/Palau" , 0x03B731 }, + { "Pacific/Pitcairn" , 0x03B775 }, + { "Pacific/Pohnpei" , 0x03B7CA }, + { "Pacific/Ponape" , 0x03B81F }, + { "Pacific/Port_Moresby" , 0x03B864 }, + { "Pacific/Rarotonga" , 0x03B8A8 }, + { "Pacific/Saipan" , 0x03B984 }, + { "Pacific/Samoa" , 0x03B9E7 }, + { "Pacific/Tahiti" , 0x03BA70 }, + { "Pacific/Tarawa" , 0x03BAD5 }, + { "Pacific/Tongatapu" , 0x03BB29 }, + { "Pacific/Truk" , 0x03BBB5 }, + { "Pacific/Wake" , 0x03BBFA }, + { "Pacific/Wallis" , 0x03BC4A }, + { "Pacific/Yap" , 0x03BC8E }, + { "Poland" , 0x03BCD3 }, + { "Portugal" , 0x03C0B4 }, + { "PRC" , 0x03C5B0 }, + { "PST8PDT" , 0x03C661 }, + { "ROC" , 0x03C9B2 }, + { "ROK" , 0x03CACA }, + { "Singapore" , 0x03CB6E }, + { "Turkey" , 0x03CC25 }, + { "UCT" , 0x03D012 }, + { "Universal" , 0x03D056 }, + { "US/Alaska" , 0x03D09A }, + { "US/Aleutian" , 0x03D403 }, + { "US/Arizona" , 0x03D769 }, + { "US/Central" , 0x03D7F7 }, + { "US/East-Indiana" , 0x03E201 }, + { "US/Eastern" , 0x03DD02 }, + { "US/Hawaii" , 0x03E46B }, + { "US/Indiana-Starke" , 0x03E4DC }, + { "US/Michigan" , 0x03E84D }, + { "US/Mountain" , 0x03EB84 }, + { "US/Pacific" , 0x03EEFD }, + { "US/Pacific-New" , 0x03F302 }, + { "US/Samoa" , 0x03F707 }, + { "UTC" , 0x03F790 }, + { "W-SU" , 0x03FA87 }, + { "WET" , 0x03F7D4 }, + { "Zulu" , 0x03FCC1 }, }; /* This is a generated file, do not modify */ -const unsigned char timelib_timezone_db_data_builtin[261525] = { +const unsigned char timelib_timezone_db_data_builtin[261381] = { /* Africa/Abidjan */ @@ -945,7 +945,7 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { /* Africa/Juba */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x53, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xB6, 0xA3, 0xDA, 0xE0, +0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xB6, 0xA3, 0xDA, 0x00, 0x00, 0x9E, 0x17, 0xE0, 0x01, 0x7A, 0x34, 0x50, 0x02, 0x7D, 0xF9, 0xE0, 0x03, 0x5B, 0x67, 0xD0, 0x04, 0x60, 0x7E, 0xE0, 0x05, 0x3D, 0xEC, 0xD0, 0x06, 0x40, 0x60, 0xE0, 0x07, 0x1F, 0x20, 0x50, 0x08, 0x20, 0x42, 0xE0, 0x09, 0x00, 0x53, 0xD0, 0x0A, 0x00, 0x24, 0xE0, 0x0A, 0xE1, 0x87, 0x50, @@ -956,7 +956,7 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { 0x1A, 0xF1, 0x8B, 0xE0, 0x1B, 0xD0, 0x4B, 0x50, 0x1C, 0xD1, 0x6D, 0xE0, 0x1D, 0xB1, 0x7E, 0xD0, 0x38, 0x80, 0x45, 0x20, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x00, 0x00, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, +0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x00, 0x00, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x53, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0xBA, 0xC8, 0x01, 0x42, 0xE0, 0x40, 0x00, @@ -1390,8 +1390,8 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { /* America/Anguilla */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x41, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x93, 0x37, 0x35, 0x20, -0x01, 0xFF, 0xFF, 0xC4, 0xE0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, +0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x93, 0x37, 0x33, 0xAC, +0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA5, 0x19, 0xA0, 0x00, 0xB2, 0x6D, 0x15, 0x00, 0x00, 0x00, 0x00, @@ -1407,7 +1407,7 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { /* America/Araguaina */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0x96, 0xAA, 0x74, 0x30, +0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0x96, 0xAA, 0x74, 0x30, 0xB8, 0x0F, 0x49, 0xE0, 0xB8, 0xFD, 0x40, 0xA0, 0xB9, 0xF1, 0x34, 0x30, 0xBA, 0xDE, 0x74, 0x20, 0xDA, 0x38, 0xAE, 0x30, 0xDA, 0xEB, 0xFA, 0x30, 0xDC, 0x19, 0xE1, 0xB0, 0xDC, 0xB9, 0x59, 0x20, 0xDD, 0xFB, 0x15, 0x30, 0xDE, 0x9B, 0xDE, 0x20, 0xDF, 0xDD, 0x9A, 0x30, 0xE0, 0x54, 0x33, 0x20, @@ -1420,29 +1420,14 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { 0x34, 0x38, 0x54, 0x30, 0x34, 0xF8, 0xC1, 0x20, 0x36, 0x20, 0x1F, 0x30, 0x36, 0xCF, 0x68, 0xA0, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xB8, 0x85, 0x20, 0x39, 0xDF, 0xE3, 0x30, 0x3A, 0x8F, 0x2C, 0xA0, 0x3B, 0xC8, 0xFF, 0xB0, 0x3C, 0x6F, 0x0E, 0xA0, 0x3D, 0xC4, 0x91, 0x30, 0x3E, 0x4E, 0xF0, 0xA0, -0x50, 0x83, 0x65, 0x30, 0x51, 0x20, 0x39, 0xA0, 0x52, 0x63, 0x47, 0x30, 0x53, 0x00, 0x1B, 0xA0, -0x54, 0x43, 0x29, 0x30, 0x54, 0xE9, 0x38, 0x20, 0x56, 0x23, 0x0B, 0x30, 0x56, 0xC9, 0x1A, 0x20, -0x58, 0x02, 0xED, 0x30, 0x58, 0xA8, 0xFC, 0x20, 0x59, 0xE2, 0xCF, 0x30, 0x5A, 0x88, 0xDE, 0x20, -0x5B, 0xCB, 0xEB, 0xB0, 0x5C, 0x68, 0xC0, 0x20, 0x5D, 0xAB, 0xCD, 0xB0, 0x5E, 0x48, 0xA2, 0x20, -0x5F, 0x8B, 0xAF, 0xB0, 0x60, 0x31, 0xBE, 0xA0, 0x61, 0x6B, 0x91, 0xB0, 0x62, 0x11, 0xA0, 0xA0, -0x63, 0x4B, 0x73, 0xB0, 0x63, 0xFA, 0xBD, 0x20, 0x65, 0x2B, 0x55, 0xB0, 0x65, 0xD1, 0x64, 0xA0, -0x67, 0x14, 0x72, 0x30, 0x67, 0xB1, 0x46, 0xA0, 0x68, 0xF4, 0x54, 0x30, 0x69, 0x9A, 0x63, 0x20, -0x6A, 0xD4, 0x36, 0x30, 0x6B, 0x7A, 0x45, 0x20, 0x6C, 0xB4, 0x18, 0x30, 0x6D, 0x5A, 0x27, 0x20, -0x6E, 0x93, 0xFA, 0x30, 0x6F, 0x3A, 0x09, 0x20, 0x70, 0x7D, 0x16, 0xB0, 0x71, 0x19, 0xEB, 0x20, -0x72, 0x5C, 0xF8, 0xB0, 0x72, 0xF9, 0xCD, 0x20, 0x74, 0x3C, 0xDA, 0xB0, 0x74, 0xD9, 0xAF, 0x20, -0x76, 0x1C, 0xBC, 0xB0, 0x76, 0xC2, 0xCB, 0xA0, 0x77, 0xFC, 0x9E, 0xB0, 0x78, 0xAB, 0xE8, 0x20, -0x79, 0xDC, 0x80, 0xB0, 0x7A, 0x82, 0x8F, 0xA0, 0x7B, 0xC5, 0x9D, 0x30, 0x7C, 0x62, 0x71, 0xA0, -0x7D, 0xA5, 0x7F, 0x30, 0x7E, 0x4B, 0x8E, 0x20, 0x7F, 0x85, 0x61, 0x30, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x50, 0x83, 0x65, 0x30, 0x51, 0x20, 0x39, 0xA0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0xFF, 0xFF, 0xD2, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, -0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x52, 0x53, 0x54, 0x00, 0x42, 0x52, 0x54, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x57, 0xC0, 0x00, 0xC9, 0x1C, 0x60, 0x00, 0x00, 0x00, -0x09, 0x54, 0x6F, 0x63, 0x61, 0x6E, 0x74, 0x69, 0x6E, 0x73, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xD2, 0xD0, 0x00, +0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x09, 0x4C, 0x4D, 0x54, +0x00, 0x42, 0x52, 0x53, 0x54, 0x00, 0x42, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x7E, 0x57, 0xC0, 0x00, 0xC9, 0x1C, 0x60, 0x00, 0x00, 0x00, 0x09, 0x54, 0x6F, 0x63, 0x61, +0x6E, 0x74, 0x69, 0x6E, 0x73, /* America/Argentina/Buenos_Aires */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x41, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1767,7 +1752,7 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, -0x06, 0x05, 0x04, 0x06, 0x04, 0x05, 0x04, 0x03, 0x06, 0x05, 0x06, 0x05, 0x06, 0xFF, 0xFF, 0xC3, +0x06, 0x05, 0x04, 0x06, 0x04, 0x05, 0x04, 0x03, 0x06, 0x05, 0x06, 0x05, 0x04, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0D, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x12, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, @@ -1839,8 +1824,8 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { /* America/Aruba */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x41, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x93, 0x1E, 0x2F, 0x38, -0xF6, 0x98, 0xEC, 0x48, 0x01, 0x02, 0xFF, 0xFF, 0xBE, 0x48, 0x00, 0x00, 0xFF, 0xFF, 0xC0, 0xB8, +0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x93, 0x1E, 0x2E, 0x23, +0xF6, 0x98, 0xEC, 0x48, 0x01, 0x02, 0xFF, 0xFF, 0xBF, 0x5D, 0x00, 0x00, 0xFF, 0xFF, 0xC0, 0xB8, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4E, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9C, 0x67, 0x10, 0x00, 0xA7, 0xE5, 0xC5, 0x00, 0x00, 0x00, 0x00, @@ -2414,8 +2399,8 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { /* America/Cayman */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x4B, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x93, 0x0F, 0xB5, 0x00, -0x01, 0xFF, 0xFF, 0xB8, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x04, 0x4B, 0x4D, 0x54, +0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x93, 0x0F, 0xB4, 0xFF, +0x01, 0xFF, 0xFF, 0xB8, 0x01, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x04, 0x4B, 0x4D, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA6, 0xC7, 0x50, 0x00, 0x96, 0x7A, 0x22, 0x00, 0x00, 0x00, 0x00, @@ -2889,8 +2874,8 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { /* America/Dominica */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x44, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x91, 0xF4, 0x34, 0x4C, -0x01, 0xFF, 0xFF, 0xC6, 0x70, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, +0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x93, 0x37, 0x33, 0xAC, +0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xAC, 0xD0, 0x00, 0xB4, 0xF8, 0x20, 0x00, 0x00, 0x00, 0x00, @@ -3292,7 +3277,7 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { /* America/Grand_Turk */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x54, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x93, 0x0F, 0xB5, 0x00, +0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x93, 0x0F, 0xB4, 0xFF, 0x11, 0x89, 0x65, 0xF0, 0x12, 0x79, 0x48, 0xE0, 0x13, 0x69, 0x47, 0xF0, 0x14, 0x59, 0x2A, 0xE0, 0x15, 0x49, 0x29, 0xF0, 0x16, 0x39, 0x0C, 0xE0, 0x17, 0x29, 0x0B, 0xF0, 0x18, 0x22, 0x29, 0x60, 0x19, 0x08, 0xED, 0xF0, 0x1A, 0x02, 0x0B, 0x60, 0x1A, 0xF2, 0x0A, 0x70, 0x1B, 0xE1, 0xED, 0x60, @@ -3330,23 +3315,23 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, -0xFF, 0xB8, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, +0xFF, 0xB8, 0x01, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0x4B, 0x4D, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAA, 0x15, 0xAA, 0x00, 0xA6, 0x1E, 0x0A, 0x00, 0x00, 0x00, 0x00, /* America/Grenada */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x47, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x91, 0xF4, 0x34, 0x64, -0x01, 0xFF, 0xFF, 0xC6, 0x1C, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, +0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x93, 0x37, 0x33, 0xAC, +0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9B, 0xB7, 0x48, 0x00, 0xB4, 0x6F, 0x68, 0x00, 0x00, 0x00, 0x00, /* America/Guadeloupe */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x47, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x91, 0xD5, 0xE1, 0xB0, -0x01, 0xFF, 0xFF, 0xC6, 0x50, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, +0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x93, 0x37, 0x33, 0xAC, +0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x19, 0x65, 0x00, 0xB4, 0xC4, 0x0A, 0x00, 0x00, 0x00, 0x00, @@ -4057,17 +4042,17 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { /* America/Jamaica */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x4A, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x93, 0x0F, 0xB5, 0x00, +0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x93, 0x0F, 0xB4, 0xFF, 0x08, 0x20, 0xC1, 0x70, 0x09, 0x10, 0xA4, 0x60, 0x09, 0xAD, 0x94, 0xF0, 0x0A, 0xF0, 0x86, 0x60, 0x0B, 0xE0, 0x85, 0x70, 0x0C, 0xD9, 0xA2, 0xE0, 0x0D, 0xC0, 0x67, 0x70, 0x0E, 0xB9, 0x84, 0xE0, 0x0F, 0xA9, 0x83, 0xF0, 0x10, 0x99, 0x66, 0xE0, 0x11, 0x89, 0x65, 0xF0, 0x12, 0x79, 0x48, 0xE0, 0x13, 0x69, 0x47, 0xF0, 0x14, 0x59, 0x2A, 0xE0, 0x15, 0x49, 0x29, 0xF0, 0x16, 0x39, 0x0C, 0xE0, 0x17, 0x29, 0x0B, 0xF0, 0x18, 0x22, 0x29, 0x60, 0x19, 0x08, 0xED, 0xF0, 0x1A, 0x02, 0x0B, 0x60, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0xFF, 0xFF, 0xB8, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, +0x01, 0x02, 0x01, 0x02, 0x01, 0xFF, 0xFF, 0xB8, 0x01, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x08, 0x4B, 0x4D, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, -0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA4, 0xCB, 0x80, 0x00, 0x9D, 0x78, -0x80, 0x00, 0x00, 0x00, 0x00, +0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA4, 0xBF, 0x05, 0x00, 0x9D, 0x7B, +0x1A, 0x00, 0x00, 0x00, 0x00, /* America/Jujuy */ 0x50, 0x48, 0x50, 0x31, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -4573,8 +4558,8 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { /* America/Marigot */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x4D, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x91, 0xD5, 0xE1, 0xB0, -0x01, 0xFF, 0xFF, 0xC6, 0x50, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, +0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x93, 0x37, 0x33, 0xAC, +0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA4, 0xE5, 0x8A, 0x00, 0xB2, 0x66, 0x92, 0x00, 0x00, 0x00, 0x00, @@ -5071,7 +5056,7 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { 0x00, 0x00, /* America/Montreal */ -0x50, 0x48, 0x50, 0x31, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x50, 0x48, 0x50, 0x31, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x9C, 0xBD, 0x01, 0xF0, 0x9C, 0xE4, 0x64, 0xC0, 0x9E, 0xB8, 0x93, 0x70, 0x9F, 0xBA, 0xEB, 0x60, 0xA0, 0x87, 0x58, 0xF8, @@ -5149,16 +5134,14 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { 0x00, 0x01, 0x00, 0x01, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x45, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, -0x00, 0x00, 0x00, 0x01, 0x00, 0xCE, 0xC8, 0x32, 0x00, 0xA2, 0x67, 0x85, 0x00, 0x00, 0x00, 0x26, -0x45, 0x61, 0x73, 0x74, 0x65, 0x72, 0x6E, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x51, -0x75, 0x65, 0x62, 0x65, 0x63, 0x20, 0x2D, 0x20, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6C, 0x6F, 0x63, -0x61, 0x74, 0x69, 0x6F, 0x6E, 0x73, +0x00, 0x00, 0x00, 0x01, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, + /* America/Montserrat */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x4D, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x91, 0xF4, 0x35, 0x10, -0x01, 0xFF, 0xFF, 0xC5, 0xAC, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, +0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x93, 0x37, 0x33, 0xAC, +0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA2, 0xD6, 0x32, 0x00, 0xB3, 0xB9, 0x1D, 0x00, 0x00, 0x00, 0x00, @@ -5741,9 +5724,10 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { 0xFB, 0xE8, 0x58, 0x00, 0x00, 0x01, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, 0x01, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x08, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0xBC, 0x5E, 0x01, 0x00, 0x67, 0xA5, 0xDA, 0x00, 0x00, 0x00, 0x20, 0x4D, 0x6F, +0x00, 0x00, 0x00, 0xBC, 0x5E, 0x01, 0x00, 0x67, 0xA5, 0xDA, 0x00, 0x00, 0x00, 0x30, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, -0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x41, 0x72, 0x69, 0x7A, 0x6F, 0x6E, 0x61, +0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x41, 0x72, 0x69, 0x7A, 0x6F, 0x6E, 0x61, 0x20, 0x28, +0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x20, 0x4E, 0x61, 0x76, 0x61, 0x6A, 0x6F, 0x29, /* America/Port-au-Prince */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x48, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -6344,7 +6328,7 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { 0x74, 0x6F, 0x71, 0x71, 0x6F, 0x72, 0x74, 0x6F, 0x6F, 0x72, 0x6D, 0x69, 0x69, 0x74, /* America/Shiprock */ -0x50, 0x48, 0x50, 0x31, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x50, 0x48, 0x50, 0x31, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x9E, 0xA6, 0x3A, 0x90, 0x9F, 0xBB, 0x07, 0x80, 0xA0, 0x86, 0x1C, 0x90, 0xA1, 0x9A, 0xE9, 0x80, 0xA2, 0x65, 0xFE, 0x90, @@ -6398,9 +6382,8 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, -0x00, 0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xC1, 0x75, -0x9B, 0x00, 0x6C, 0xD0, 0xE1, 0x00, 0x00, 0x00, 0x16, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, -0x6E, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x4E, 0x61, 0x76, 0x61, 0x6A, 0x6F, +0x00, 0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x89, 0x54, +0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, /* America/Sitka */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -6464,8 +6447,8 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { /* America/St_Barthelemy */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x42, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x91, 0xD5, 0xE1, 0xB0, -0x01, 0xFF, 0xFF, 0xC6, 0x50, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, +0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x93, 0x37, 0x33, 0xAC, +0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA4, 0x9D, 0xED, 0x00, 0xB2, 0xC1, 0xB8, 0x00, 0x00, 0x00, 0x00, @@ -6560,32 +6543,32 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { /* America/St_Kitts */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x4B, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x93, 0x37, 0x34, 0xCC, -0x01, 0xFF, 0xFF, 0xC5, 0x34, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, +0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x93, 0x37, 0x33, 0xAC, +0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA3, 0xBA, 0x10, 0x00, 0xB2, 0xF5, 0xCD, 0x00, 0x00, 0x00, 0x00, /* America/St_Lucia */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x4C, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x92, 0xE6, 0xC7, 0xB0, -0x01, 0xFF, 0xFF, 0xC6, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x43, 0x4D, 0x54, +0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x93, 0x37, 0x33, 0xAC, +0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0xB7, 0x82, 0x00, 0xB5, 0x94, 0x60, 0x00, 0x00, 0x00, 0x00, /* America/St_Thomas */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x56, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x91, 0xF4, 0x37, 0x60, -0x01, 0xFF, 0xFF, 0xC3, 0x20, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, +0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x93, 0x37, 0x33, 0xAC, +0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA5, 0x54, 0x38, 0x00, 0xAF, 0x93, 0xEA, 0x00, 0x00, 0x00, 0x00, /* America/St_Vincent */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x56, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x92, 0xE6, 0xC7, 0xE8, -0x01, 0xFF, 0xFF, 0xC6, 0x98, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4B, 0x4D, 0x54, +0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x93, 0x37, 0x33, 0xAC, +0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9D, 0x64, 0xF8, 0x00, 0xB5, 0x39, 0x3A, 0x00, 0x00, 0x00, 0x00, @@ -6853,16 +6836,17 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { 0x00, 0x01, 0x00, 0x01, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x45, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, -0x00, 0x00, 0x00, 0x01, 0x00, 0xCB, 0xEF, 0x08, 0x00, 0x99, 0x87, 0x62, 0x00, 0x00, 0x00, 0x27, +0x00, 0x00, 0x00, 0x01, 0x00, 0xCB, 0xEF, 0x08, 0x00, 0x99, 0x87, 0x62, 0x00, 0x00, 0x00, 0x30, 0x45, 0x61, 0x73, 0x74, 0x65, 0x72, 0x6E, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x4F, -0x6E, 0x74, 0x61, 0x72, 0x69, 0x6F, 0x20, 0x2D, 0x20, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6C, 0x6F, -0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x73, +0x6E, 0x74, 0x61, 0x72, 0x69, 0x6F, 0x20, 0x26, 0x20, 0x51, 0x75, 0x65, 0x62, 0x65, 0x63, 0x20, +0x2D, 0x20, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6C, 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x73, + /* America/Tortola */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x56, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x91, 0xF4, 0x37, 0x14, -0x01, 0xFF, 0xFF, 0xC3, 0x6C, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, +0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x93, 0x37, 0x33, 0xAC, +0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA5, 0x7B, 0x48, 0x00, 0xB0, 0x0F, 0x9D, 0x00, 0x00, 0x00, 0x00, @@ -6939,8 +6923,8 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { /* America/Virgin */ 0x50, 0x48, 0x50, 0x31, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x91, 0xF4, 0x37, 0x60, -0x01, 0xFF, 0xFF, 0xC3, 0x20, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, +0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x93, 0x37, 0x33, 0xAC, +0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, @@ -7264,54 +7248,64 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { /* Antarctica/McMurdo */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x41, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0E, 0xE5, 0xA9, 0xE9, 0x00, -0x09, 0x18, 0xFD, 0xE0, 0x09, 0xAC, 0xA5, 0xE0, 0x0A, 0xEF, 0xA5, 0x60, 0x0B, 0x9E, 0xFC, 0xE0, -0x0C, 0xD8, 0xC1, 0xE0, 0x0D, 0x7E, 0xDE, 0xE0, 0x0E, 0xB8, 0xA3, 0xE0, 0x0F, 0x5E, 0xC0, 0xE0, -0x10, 0x98, 0x85, 0xE0, 0x11, 0x3E, 0xA2, 0xE0, 0x12, 0x78, 0x67, 0xE0, 0x13, 0x1E, 0x84, 0xE0, -0x14, 0x58, 0x49, 0xE0, 0x14, 0xFE, 0x66, 0xE0, 0x16, 0x38, 0x2B, 0xE0, 0x16, 0xE7, 0x83, 0x60, -0x18, 0x21, 0x48, 0x60, 0x18, 0xC7, 0x65, 0x60, 0x1A, 0x01, 0x2A, 0x60, 0x1A, 0xA7, 0x47, 0x60, -0x1B, 0xE1, 0x0C, 0x60, 0x1C, 0x87, 0x29, 0x60, 0x1D, 0xC0, 0xEE, 0x60, 0x1E, 0x67, 0x0B, 0x60, -0x1F, 0xA0, 0xD0, 0x60, 0x20, 0x46, 0xED, 0x60, 0x21, 0x80, 0xB2, 0x60, 0x22, 0x30, 0x09, 0xE0, -0x23, 0x69, 0xCE, 0xE0, 0x24, 0x0F, 0xEB, 0xE0, 0x25, 0x2E, 0x01, 0x60, 0x26, 0x02, 0x42, 0xE0, -0x27, 0x0D, 0xE3, 0x60, 0x27, 0xE2, 0x24, 0xE0, 0x28, 0xED, 0xC5, 0x60, 0x29, 0xC2, 0x06, 0xE0, -0x2A, 0xCD, 0xA7, 0x60, 0x2B, 0xAB, 0x23, 0x60, 0x2C, 0xAD, 0x89, 0x60, 0x2D, 0x8B, 0x05, 0x60, -0x2E, 0x8D, 0x6B, 0x60, 0x2F, 0x6A, 0xE7, 0x60, 0x30, 0x6D, 0x4D, 0x60, 0x31, 0x4A, 0xC9, 0x60, -0x32, 0x56, 0x69, 0xE0, 0x33, 0x2A, 0xAB, 0x60, 0x34, 0x36, 0x4B, 0xE0, 0x35, 0x0A, 0x8D, 0x60, -0x36, 0x16, 0x2D, 0xE0, 0x36, 0xF3, 0xA9, 0xE0, 0x37, 0xF6, 0x0F, 0xE0, 0x38, 0xD3, 0x8B, 0xE0, -0x39, 0xD5, 0xF1, 0xE0, 0x3A, 0xB3, 0x6D, 0xE0, 0x3B, 0xBF, 0x0E, 0x60, 0x3C, 0x93, 0x4F, 0xE0, -0x3D, 0x9E, 0xF0, 0x60, 0x3E, 0x73, 0x31, 0xE0, 0x3F, 0x7E, 0xD2, 0x60, 0x40, 0x5C, 0x4E, 0x60, -0x41, 0x5E, 0xB4, 0x60, 0x42, 0x3C, 0x30, 0x60, 0x43, 0x3E, 0x96, 0x60, 0x44, 0x1C, 0x12, 0x60, -0x45, 0x1E, 0x78, 0x60, 0x45, 0xFB, 0xF4, 0x60, 0x46, 0xFE, 0x5A, 0x60, 0x47, 0xF7, 0x85, 0xE0, -0x48, 0xDE, 0x3C, 0x60, 0x49, 0xD7, 0x67, 0xE0, 0x4A, 0xBE, 0x1E, 0x60, 0x4B, 0xB7, 0x49, 0xE0, -0x4C, 0x9E, 0x00, 0x60, 0x4D, 0x97, 0x2B, 0xE0, 0x4E, 0x7D, 0xE2, 0x60, 0x4F, 0x77, 0x0D, 0xE0, -0x50, 0x66, 0xFE, 0xE0, 0x51, 0x60, 0x2A, 0x60, 0x52, 0x46, 0xE0, 0xE0, 0x53, 0x40, 0x0C, 0x60, -0x54, 0x26, 0xC2, 0xE0, 0x55, 0x1F, 0xEE, 0x60, 0x56, 0x06, 0xA4, 0xE0, 0x56, 0xFF, 0xD0, 0x60, -0x57, 0xE6, 0x86, 0xE0, 0x58, 0xDF, 0xB2, 0x60, 0x59, 0xC6, 0x68, 0xE0, 0x5A, 0xBF, 0x94, 0x60, -0x5B, 0xAF, 0x85, 0x60, 0x5C, 0xA8, 0xB0, 0xE0, 0x5D, 0x8F, 0x67, 0x60, 0x5E, 0x88, 0x92, 0xE0, -0x5F, 0x6F, 0x49, 0x60, 0x60, 0x68, 0x74, 0xE0, 0x61, 0x4F, 0x2B, 0x60, 0x62, 0x48, 0x56, 0xE0, -0x63, 0x2F, 0x0D, 0x60, 0x64, 0x28, 0x38, 0xE0, 0x65, 0x0E, 0xEF, 0x60, 0x66, 0x11, 0x55, 0x60, -0x66, 0xF8, 0x0B, 0xE0, 0x67, 0xF1, 0x37, 0x60, 0x68, 0xD7, 0xED, 0xE0, 0x69, 0xD1, 0x19, 0x60, -0x6A, 0xB7, 0xCF, 0xE0, 0x6B, 0xB0, 0xFB, 0x60, 0x6C, 0x97, 0xB1, 0xE0, 0x6D, 0x90, 0xDD, 0x60, -0x6E, 0x77, 0x93, 0xE0, 0x6F, 0x70, 0xBF, 0x60, 0x70, 0x60, 0xB0, 0x60, 0x71, 0x59, 0xDB, 0xE0, -0x72, 0x40, 0x92, 0x60, 0x73, 0x39, 0xBD, 0xE0, 0x74, 0x20, 0x74, 0x60, 0x75, 0x19, 0x9F, 0xE0, -0x76, 0x00, 0x56, 0x60, 0x76, 0xF9, 0x81, 0xE0, 0x77, 0xE0, 0x38, 0x60, 0x78, 0xD9, 0x63, 0xE0, -0x79, 0xC0, 0x1A, 0x60, 0x7A, 0xB9, 0x45, 0xE0, 0x7B, 0xA9, 0x36, 0xE0, 0x7C, 0xA2, 0x62, 0x60, -0x7D, 0x89, 0x18, 0xE0, 0x7E, 0x82, 0x44, 0x60, 0x7F, 0x68, 0xFA, 0xE0, 0x03, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x9B, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0F, 0xB0, 0xB4, 0xB2, 0xE8, +0xB1, 0x51, 0x87, 0x58, 0xB2, 0x78, 0xE5, 0x68, 0xB3, 0x43, 0xE5, 0x60, 0xB4, 0x58, 0xC7, 0x68, +0xB5, 0x23, 0xC7, 0x60, 0xB6, 0x38, 0xA9, 0x68, 0xB7, 0x03, 0xA9, 0x60, 0xB8, 0x18, 0x8B, 0x68, +0xB8, 0xEC, 0xC5, 0xE0, 0xB9, 0xF8, 0x6D, 0x68, 0xBA, 0xCC, 0xA7, 0xE0, 0xBB, 0xD8, 0x4F, 0x68, +0xBC, 0xE3, 0xE8, 0xE0, 0xBD, 0xAE, 0xF6, 0xE8, 0xBE, 0xC3, 0xCA, 0xE0, 0xBF, 0x8E, 0xD8, 0xE8, +0xC0, 0xA3, 0xAC, 0xE0, 0xC1, 0x6E, 0xBA, 0xE8, 0xC2, 0x83, 0x8E, 0xE0, 0xC3, 0x4E, 0x9C, 0xE8, +0xC4, 0x63, 0x70, 0xE0, 0xC5, 0x2E, 0x7E, 0xE8, 0xC6, 0x4C, 0x8D, 0x60, 0xC7, 0x0E, 0x60, 0xE8, +0xC8, 0x2C, 0x6F, 0x60, 0xC8, 0xF7, 0x7D, 0x68, 0xD2, 0xDA, 0x9A, 0x40, 0x09, 0x18, 0xFD, 0xE0, +0x09, 0xAC, 0xA5, 0xE0, 0x0A, 0xEF, 0xA5, 0x60, 0x0B, 0x9E, 0xFC, 0xE0, 0x0C, 0xD8, 0xC1, 0xE0, +0x0D, 0x7E, 0xDE, 0xE0, 0x0E, 0xB8, 0xA3, 0xE0, 0x0F, 0x5E, 0xC0, 0xE0, 0x10, 0x98, 0x85, 0xE0, +0x11, 0x3E, 0xA2, 0xE0, 0x12, 0x78, 0x67, 0xE0, 0x13, 0x1E, 0x84, 0xE0, 0x14, 0x58, 0x49, 0xE0, +0x14, 0xFE, 0x66, 0xE0, 0x16, 0x38, 0x2B, 0xE0, 0x16, 0xE7, 0x83, 0x60, 0x18, 0x21, 0x48, 0x60, +0x18, 0xC7, 0x65, 0x60, 0x1A, 0x01, 0x2A, 0x60, 0x1A, 0xA7, 0x47, 0x60, 0x1B, 0xE1, 0x0C, 0x60, +0x1C, 0x87, 0x29, 0x60, 0x1D, 0xC0, 0xEE, 0x60, 0x1E, 0x67, 0x0B, 0x60, 0x1F, 0xA0, 0xD0, 0x60, +0x20, 0x46, 0xED, 0x60, 0x21, 0x80, 0xB2, 0x60, 0x22, 0x30, 0x09, 0xE0, 0x23, 0x69, 0xCE, 0xE0, +0x24, 0x0F, 0xEB, 0xE0, 0x25, 0x2E, 0x01, 0x60, 0x26, 0x02, 0x42, 0xE0, 0x27, 0x0D, 0xE3, 0x60, +0x27, 0xE2, 0x24, 0xE0, 0x28, 0xED, 0xC5, 0x60, 0x29, 0xC2, 0x06, 0xE0, 0x2A, 0xCD, 0xA7, 0x60, +0x2B, 0xAB, 0x23, 0x60, 0x2C, 0xAD, 0x89, 0x60, 0x2D, 0x8B, 0x05, 0x60, 0x2E, 0x8D, 0x6B, 0x60, +0x2F, 0x6A, 0xE7, 0x60, 0x30, 0x6D, 0x4D, 0x60, 0x31, 0x4A, 0xC9, 0x60, 0x32, 0x56, 0x69, 0xE0, +0x33, 0x2A, 0xAB, 0x60, 0x34, 0x36, 0x4B, 0xE0, 0x35, 0x0A, 0x8D, 0x60, 0x36, 0x16, 0x2D, 0xE0, +0x36, 0xF3, 0xA9, 0xE0, 0x37, 0xF6, 0x0F, 0xE0, 0x38, 0xD3, 0x8B, 0xE0, 0x39, 0xD5, 0xF1, 0xE0, +0x3A, 0xB3, 0x6D, 0xE0, 0x3B, 0xBF, 0x0E, 0x60, 0x3C, 0x93, 0x4F, 0xE0, 0x3D, 0x9E, 0xF0, 0x60, +0x3E, 0x73, 0x31, 0xE0, 0x3F, 0x7E, 0xD2, 0x60, 0x40, 0x5C, 0x4E, 0x60, 0x41, 0x5E, 0xB4, 0x60, +0x42, 0x3C, 0x30, 0x60, 0x43, 0x3E, 0x96, 0x60, 0x44, 0x1C, 0x12, 0x60, 0x45, 0x1E, 0x78, 0x60, +0x45, 0xFB, 0xF4, 0x60, 0x46, 0xFE, 0x5A, 0x60, 0x47, 0xF7, 0x85, 0xE0, 0x48, 0xDE, 0x3C, 0x60, +0x49, 0xD7, 0x67, 0xE0, 0x4A, 0xBE, 0x1E, 0x60, 0x4B, 0xB7, 0x49, 0xE0, 0x4C, 0x9E, 0x00, 0x60, +0x4D, 0x97, 0x2B, 0xE0, 0x4E, 0x7D, 0xE2, 0x60, 0x4F, 0x77, 0x0D, 0xE0, 0x50, 0x66, 0xFE, 0xE0, +0x51, 0x60, 0x2A, 0x60, 0x52, 0x46, 0xE0, 0xE0, 0x53, 0x40, 0x0C, 0x60, 0x54, 0x26, 0xC2, 0xE0, +0x55, 0x1F, 0xEE, 0x60, 0x56, 0x06, 0xA4, 0xE0, 0x56, 0xFF, 0xD0, 0x60, 0x57, 0xE6, 0x86, 0xE0, +0x58, 0xDF, 0xB2, 0x60, 0x59, 0xC6, 0x68, 0xE0, 0x5A, 0xBF, 0x94, 0x60, 0x5B, 0xAF, 0x85, 0x60, +0x5C, 0xA8, 0xB0, 0xE0, 0x5D, 0x8F, 0x67, 0x60, 0x5E, 0x88, 0x92, 0xE0, 0x5F, 0x6F, 0x49, 0x60, +0x60, 0x68, 0x74, 0xE0, 0x61, 0x4F, 0x2B, 0x60, 0x62, 0x48, 0x56, 0xE0, 0x63, 0x2F, 0x0D, 0x60, +0x64, 0x28, 0x38, 0xE0, 0x65, 0x0E, 0xEF, 0x60, 0x66, 0x11, 0x55, 0x60, 0x66, 0xF8, 0x0B, 0xE0, +0x67, 0xF1, 0x37, 0x60, 0x68, 0xD7, 0xED, 0xE0, 0x69, 0xD1, 0x19, 0x60, 0x6A, 0xB7, 0xCF, 0xE0, +0x6B, 0xB0, 0xFB, 0x60, 0x6C, 0x97, 0xB1, 0xE0, 0x6D, 0x90, 0xDD, 0x60, 0x6E, 0x77, 0x93, 0xE0, +0x6F, 0x70, 0xBF, 0x60, 0x70, 0x60, 0xB0, 0x60, 0x71, 0x59, 0xDB, 0xE0, 0x72, 0x40, 0x92, 0x60, +0x73, 0x39, 0xBD, 0xE0, 0x74, 0x20, 0x74, 0x60, 0x75, 0x19, 0x9F, 0xE0, 0x76, 0x00, 0x56, 0x60, +0x76, 0xF9, 0x81, 0xE0, 0x77, 0xE0, 0x38, 0x60, 0x78, 0xD9, 0x63, 0xE0, 0x79, 0xC0, 0x1A, 0x60, +0x7A, 0xB9, 0x45, 0xE0, 0x7B, 0xA9, 0x36, 0xE0, 0x7C, 0xA2, 0x62, 0x60, 0x7D, 0x89, 0x18, 0xE0, +0x7E, 0x82, 0x44, 0x60, 0x7F, 0x68, 0xFA, 0xE0, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0xB6, 0xD0, 0x01, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x09, 0x00, 0x00, -0xA8, 0xC0, 0x00, 0x09, 0x7A, 0x7A, 0x7A, 0x00, 0x4E, 0x5A, 0x44, 0x54, 0x00, 0x4E, 0x5A, 0x53, -0x54, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x90, 0x9A, 0x02, 0x10, -0xDE, 0xA0, 0x00, 0x00, 0x00, 0x1C, 0x4D, 0x63, 0x4D, 0x75, 0x72, 0x64, 0x6F, 0x20, 0x53, 0x74, -0x61, 0x74, 0x69, 0x6F, 0x6E, 0x2C, 0x20, 0x52, 0x6F, 0x73, 0x73, 0x20, 0x49, 0x73, 0x6C, 0x61, -0x6E, 0x64, +0x02, 0x01, 0x02, 0x05, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x00, 0x00, 0xAF, 0xC8, 0x01, 0x00, 0x00, 0x00, 0xA1, 0xB8, 0x00, 0x05, 0x00, +0x00, 0xA8, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xB6, 0xD0, 0x01, 0x0A, 0x00, 0x00, 0xA8, 0xC0, 0x00, +0x00, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x00, 0x4E, 0x5A, 0x53, 0x54, 0x00, 0x4E, 0x5A, 0x4D, 0x54, +0x00, 0x4E, 0x5A, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x12, 0x90, 0x9A, 0x02, 0x10, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x2D, 0x4D, 0x63, +0x4D, 0x75, 0x72, 0x64, 0x6F, 0x2C, 0x20, 0x53, 0x6F, 0x75, 0x74, 0x68, 0x20, 0x50, 0x6F, 0x6C, +0x65, 0x2C, 0x20, 0x53, 0x63, 0x6F, 0x74, 0x74, 0x20, 0x28, 0x4E, 0x65, 0x77, 0x20, 0x5A, 0x65, +0x61, 0x6C, 0x61, 0x6E, 0x64, 0x20, 0x74, 0x69, 0x6D, 0x65, 0x29, /* Antarctica/Palmer */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x41, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -7376,55 +7370,62 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, /* Antarctica/South_Pole */ -0x50, 0x48, 0x50, 0x31, 0x01, 0x41, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0E, 0xE5, 0xA9, 0xE9, 0x00, -0x09, 0x18, 0xFD, 0xE0, 0x09, 0xAC, 0xA5, 0xE0, 0x0A, 0xEF, 0xA5, 0x60, 0x0B, 0x9E, 0xFC, 0xE0, -0x0C, 0xD8, 0xC1, 0xE0, 0x0D, 0x7E, 0xDE, 0xE0, 0x0E, 0xB8, 0xA3, 0xE0, 0x0F, 0x5E, 0xC0, 0xE0, -0x10, 0x98, 0x85, 0xE0, 0x11, 0x3E, 0xA2, 0xE0, 0x12, 0x78, 0x67, 0xE0, 0x13, 0x1E, 0x84, 0xE0, -0x14, 0x58, 0x49, 0xE0, 0x14, 0xFE, 0x66, 0xE0, 0x16, 0x38, 0x2B, 0xE0, 0x16, 0xE7, 0x83, 0x60, -0x18, 0x21, 0x48, 0x60, 0x18, 0xC7, 0x65, 0x60, 0x1A, 0x01, 0x2A, 0x60, 0x1A, 0xA7, 0x47, 0x60, -0x1B, 0xE1, 0x0C, 0x60, 0x1C, 0x87, 0x29, 0x60, 0x1D, 0xC0, 0xEE, 0x60, 0x1E, 0x67, 0x0B, 0x60, -0x1F, 0xA0, 0xD0, 0x60, 0x20, 0x46, 0xED, 0x60, 0x21, 0x80, 0xB2, 0x60, 0x22, 0x30, 0x09, 0xE0, -0x23, 0x69, 0xCE, 0xE0, 0x24, 0x0F, 0xEB, 0xE0, 0x25, 0x2E, 0x01, 0x60, 0x26, 0x02, 0x42, 0xE0, -0x27, 0x0D, 0xE3, 0x60, 0x27, 0xE2, 0x24, 0xE0, 0x28, 0xED, 0xC5, 0x60, 0x29, 0xC2, 0x06, 0xE0, -0x2A, 0xCD, 0xA7, 0x60, 0x2B, 0xAB, 0x23, 0x60, 0x2C, 0xAD, 0x89, 0x60, 0x2D, 0x8B, 0x05, 0x60, -0x2E, 0x8D, 0x6B, 0x60, 0x2F, 0x6A, 0xE7, 0x60, 0x30, 0x6D, 0x4D, 0x60, 0x31, 0x4A, 0xC9, 0x60, -0x32, 0x56, 0x69, 0xE0, 0x33, 0x2A, 0xAB, 0x60, 0x34, 0x36, 0x4B, 0xE0, 0x35, 0x0A, 0x8D, 0x60, -0x36, 0x16, 0x2D, 0xE0, 0x36, 0xF3, 0xA9, 0xE0, 0x37, 0xF6, 0x0F, 0xE0, 0x38, 0xD3, 0x8B, 0xE0, -0x39, 0xD5, 0xF1, 0xE0, 0x3A, 0xB3, 0x6D, 0xE0, 0x3B, 0xBF, 0x0E, 0x60, 0x3C, 0x93, 0x4F, 0xE0, -0x3D, 0x9E, 0xF0, 0x60, 0x3E, 0x73, 0x31, 0xE0, 0x3F, 0x7E, 0xD2, 0x60, 0x40, 0x5C, 0x4E, 0x60, -0x41, 0x5E, 0xB4, 0x60, 0x42, 0x3C, 0x30, 0x60, 0x43, 0x3E, 0x96, 0x60, 0x44, 0x1C, 0x12, 0x60, -0x45, 0x1E, 0x78, 0x60, 0x45, 0xFB, 0xF4, 0x60, 0x46, 0xFE, 0x5A, 0x60, 0x47, 0xF7, 0x85, 0xE0, -0x48, 0xDE, 0x3C, 0x60, 0x49, 0xD7, 0x67, 0xE0, 0x4A, 0xBE, 0x1E, 0x60, 0x4B, 0xB7, 0x49, 0xE0, -0x4C, 0x9E, 0x00, 0x60, 0x4D, 0x97, 0x2B, 0xE0, 0x4E, 0x7D, 0xE2, 0x60, 0x4F, 0x77, 0x0D, 0xE0, -0x50, 0x66, 0xFE, 0xE0, 0x51, 0x60, 0x2A, 0x60, 0x52, 0x46, 0xE0, 0xE0, 0x53, 0x40, 0x0C, 0x60, -0x54, 0x26, 0xC2, 0xE0, 0x55, 0x1F, 0xEE, 0x60, 0x56, 0x06, 0xA4, 0xE0, 0x56, 0xFF, 0xD0, 0x60, -0x57, 0xE6, 0x86, 0xE0, 0x58, 0xDF, 0xB2, 0x60, 0x59, 0xC6, 0x68, 0xE0, 0x5A, 0xBF, 0x94, 0x60, -0x5B, 0xAF, 0x85, 0x60, 0x5C, 0xA8, 0xB0, 0xE0, 0x5D, 0x8F, 0x67, 0x60, 0x5E, 0x88, 0x92, 0xE0, -0x5F, 0x6F, 0x49, 0x60, 0x60, 0x68, 0x74, 0xE0, 0x61, 0x4F, 0x2B, 0x60, 0x62, 0x48, 0x56, 0xE0, -0x63, 0x2F, 0x0D, 0x60, 0x64, 0x28, 0x38, 0xE0, 0x65, 0x0E, 0xEF, 0x60, 0x66, 0x11, 0x55, 0x60, -0x66, 0xF8, 0x0B, 0xE0, 0x67, 0xF1, 0x37, 0x60, 0x68, 0xD7, 0xED, 0xE0, 0x69, 0xD1, 0x19, 0x60, -0x6A, 0xB7, 0xCF, 0xE0, 0x6B, 0xB0, 0xFB, 0x60, 0x6C, 0x97, 0xB1, 0xE0, 0x6D, 0x90, 0xDD, 0x60, -0x6E, 0x77, 0x93, 0xE0, 0x6F, 0x70, 0xBF, 0x60, 0x70, 0x60, 0xB0, 0x60, 0x71, 0x59, 0xDB, 0xE0, -0x72, 0x40, 0x92, 0x60, 0x73, 0x39, 0xBD, 0xE0, 0x74, 0x20, 0x74, 0x60, 0x75, 0x19, 0x9F, 0xE0, -0x76, 0x00, 0x56, 0x60, 0x76, 0xF9, 0x81, 0xE0, 0x77, 0xE0, 0x38, 0x60, 0x78, 0xD9, 0x63, 0xE0, -0x79, 0xC0, 0x1A, 0x60, 0x7A, 0xB9, 0x45, 0xE0, 0x7B, 0xA9, 0x36, 0xE0, 0x7C, 0xA2, 0x62, 0x60, -0x7D, 0x89, 0x18, 0xE0, 0x7E, 0x82, 0x44, 0x60, 0x7F, 0x68, 0xFA, 0xE0, 0x03, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x50, 0x48, 0x50, 0x31, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x9B, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0F, 0xB0, 0xB4, 0xB2, 0xE8, +0xB1, 0x51, 0x87, 0x58, 0xB2, 0x78, 0xE5, 0x68, 0xB3, 0x43, 0xE5, 0x60, 0xB4, 0x58, 0xC7, 0x68, +0xB5, 0x23, 0xC7, 0x60, 0xB6, 0x38, 0xA9, 0x68, 0xB7, 0x03, 0xA9, 0x60, 0xB8, 0x18, 0x8B, 0x68, +0xB8, 0xEC, 0xC5, 0xE0, 0xB9, 0xF8, 0x6D, 0x68, 0xBA, 0xCC, 0xA7, 0xE0, 0xBB, 0xD8, 0x4F, 0x68, +0xBC, 0xE3, 0xE8, 0xE0, 0xBD, 0xAE, 0xF6, 0xE8, 0xBE, 0xC3, 0xCA, 0xE0, 0xBF, 0x8E, 0xD8, 0xE8, +0xC0, 0xA3, 0xAC, 0xE0, 0xC1, 0x6E, 0xBA, 0xE8, 0xC2, 0x83, 0x8E, 0xE0, 0xC3, 0x4E, 0x9C, 0xE8, +0xC4, 0x63, 0x70, 0xE0, 0xC5, 0x2E, 0x7E, 0xE8, 0xC6, 0x4C, 0x8D, 0x60, 0xC7, 0x0E, 0x60, 0xE8, +0xC8, 0x2C, 0x6F, 0x60, 0xC8, 0xF7, 0x7D, 0x68, 0xD2, 0xDA, 0x9A, 0x40, 0x09, 0x18, 0xFD, 0xE0, +0x09, 0xAC, 0xA5, 0xE0, 0x0A, 0xEF, 0xA5, 0x60, 0x0B, 0x9E, 0xFC, 0xE0, 0x0C, 0xD8, 0xC1, 0xE0, +0x0D, 0x7E, 0xDE, 0xE0, 0x0E, 0xB8, 0xA3, 0xE0, 0x0F, 0x5E, 0xC0, 0xE0, 0x10, 0x98, 0x85, 0xE0, +0x11, 0x3E, 0xA2, 0xE0, 0x12, 0x78, 0x67, 0xE0, 0x13, 0x1E, 0x84, 0xE0, 0x14, 0x58, 0x49, 0xE0, +0x14, 0xFE, 0x66, 0xE0, 0x16, 0x38, 0x2B, 0xE0, 0x16, 0xE7, 0x83, 0x60, 0x18, 0x21, 0x48, 0x60, +0x18, 0xC7, 0x65, 0x60, 0x1A, 0x01, 0x2A, 0x60, 0x1A, 0xA7, 0x47, 0x60, 0x1B, 0xE1, 0x0C, 0x60, +0x1C, 0x87, 0x29, 0x60, 0x1D, 0xC0, 0xEE, 0x60, 0x1E, 0x67, 0x0B, 0x60, 0x1F, 0xA0, 0xD0, 0x60, +0x20, 0x46, 0xED, 0x60, 0x21, 0x80, 0xB2, 0x60, 0x22, 0x30, 0x09, 0xE0, 0x23, 0x69, 0xCE, 0xE0, +0x24, 0x0F, 0xEB, 0xE0, 0x25, 0x2E, 0x01, 0x60, 0x26, 0x02, 0x42, 0xE0, 0x27, 0x0D, 0xE3, 0x60, +0x27, 0xE2, 0x24, 0xE0, 0x28, 0xED, 0xC5, 0x60, 0x29, 0xC2, 0x06, 0xE0, 0x2A, 0xCD, 0xA7, 0x60, +0x2B, 0xAB, 0x23, 0x60, 0x2C, 0xAD, 0x89, 0x60, 0x2D, 0x8B, 0x05, 0x60, 0x2E, 0x8D, 0x6B, 0x60, +0x2F, 0x6A, 0xE7, 0x60, 0x30, 0x6D, 0x4D, 0x60, 0x31, 0x4A, 0xC9, 0x60, 0x32, 0x56, 0x69, 0xE0, +0x33, 0x2A, 0xAB, 0x60, 0x34, 0x36, 0x4B, 0xE0, 0x35, 0x0A, 0x8D, 0x60, 0x36, 0x16, 0x2D, 0xE0, +0x36, 0xF3, 0xA9, 0xE0, 0x37, 0xF6, 0x0F, 0xE0, 0x38, 0xD3, 0x8B, 0xE0, 0x39, 0xD5, 0xF1, 0xE0, +0x3A, 0xB3, 0x6D, 0xE0, 0x3B, 0xBF, 0x0E, 0x60, 0x3C, 0x93, 0x4F, 0xE0, 0x3D, 0x9E, 0xF0, 0x60, +0x3E, 0x73, 0x31, 0xE0, 0x3F, 0x7E, 0xD2, 0x60, 0x40, 0x5C, 0x4E, 0x60, 0x41, 0x5E, 0xB4, 0x60, +0x42, 0x3C, 0x30, 0x60, 0x43, 0x3E, 0x96, 0x60, 0x44, 0x1C, 0x12, 0x60, 0x45, 0x1E, 0x78, 0x60, +0x45, 0xFB, 0xF4, 0x60, 0x46, 0xFE, 0x5A, 0x60, 0x47, 0xF7, 0x85, 0xE0, 0x48, 0xDE, 0x3C, 0x60, +0x49, 0xD7, 0x67, 0xE0, 0x4A, 0xBE, 0x1E, 0x60, 0x4B, 0xB7, 0x49, 0xE0, 0x4C, 0x9E, 0x00, 0x60, +0x4D, 0x97, 0x2B, 0xE0, 0x4E, 0x7D, 0xE2, 0x60, 0x4F, 0x77, 0x0D, 0xE0, 0x50, 0x66, 0xFE, 0xE0, +0x51, 0x60, 0x2A, 0x60, 0x52, 0x46, 0xE0, 0xE0, 0x53, 0x40, 0x0C, 0x60, 0x54, 0x26, 0xC2, 0xE0, +0x55, 0x1F, 0xEE, 0x60, 0x56, 0x06, 0xA4, 0xE0, 0x56, 0xFF, 0xD0, 0x60, 0x57, 0xE6, 0x86, 0xE0, +0x58, 0xDF, 0xB2, 0x60, 0x59, 0xC6, 0x68, 0xE0, 0x5A, 0xBF, 0x94, 0x60, 0x5B, 0xAF, 0x85, 0x60, +0x5C, 0xA8, 0xB0, 0xE0, 0x5D, 0x8F, 0x67, 0x60, 0x5E, 0x88, 0x92, 0xE0, 0x5F, 0x6F, 0x49, 0x60, +0x60, 0x68, 0x74, 0xE0, 0x61, 0x4F, 0x2B, 0x60, 0x62, 0x48, 0x56, 0xE0, 0x63, 0x2F, 0x0D, 0x60, +0x64, 0x28, 0x38, 0xE0, 0x65, 0x0E, 0xEF, 0x60, 0x66, 0x11, 0x55, 0x60, 0x66, 0xF8, 0x0B, 0xE0, +0x67, 0xF1, 0x37, 0x60, 0x68, 0xD7, 0xED, 0xE0, 0x69, 0xD1, 0x19, 0x60, 0x6A, 0xB7, 0xCF, 0xE0, +0x6B, 0xB0, 0xFB, 0x60, 0x6C, 0x97, 0xB1, 0xE0, 0x6D, 0x90, 0xDD, 0x60, 0x6E, 0x77, 0x93, 0xE0, +0x6F, 0x70, 0xBF, 0x60, 0x70, 0x60, 0xB0, 0x60, 0x71, 0x59, 0xDB, 0xE0, 0x72, 0x40, 0x92, 0x60, +0x73, 0x39, 0xBD, 0xE0, 0x74, 0x20, 0x74, 0x60, 0x75, 0x19, 0x9F, 0xE0, 0x76, 0x00, 0x56, 0x60, +0x76, 0xF9, 0x81, 0xE0, 0x77, 0xE0, 0x38, 0x60, 0x78, 0xD9, 0x63, 0xE0, 0x79, 0xC0, 0x1A, 0x60, +0x7A, 0xB9, 0x45, 0xE0, 0x7B, 0xA9, 0x36, 0xE0, 0x7C, 0xA2, 0x62, 0x60, 0x7D, 0x89, 0x18, 0xE0, +0x7E, 0x82, 0x44, 0x60, 0x7F, 0x68, 0xFA, 0xE0, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0xB6, 0xD0, 0x01, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x09, 0x00, 0x00, -0xA8, 0xC0, 0x00, 0x09, 0x7A, 0x7A, 0x7A, 0x00, 0x4E, 0x5A, 0x44, 0x54, 0x00, 0x4E, 0x5A, 0x53, -0x54, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x12, -0xA8, 0x80, 0x00, 0x00, 0x00, 0x22, 0x41, 0x6D, 0x75, 0x6E, 0x64, 0x73, 0x65, 0x6E, 0x2D, 0x53, -0x63, 0x6F, 0x74, 0x74, 0x20, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x2C, 0x20, 0x53, 0x6F, -0x75, 0x74, 0x68, 0x20, 0x50, 0x6F, 0x6C, 0x65, +0x02, 0x01, 0x02, 0x05, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x00, 0x00, 0xAF, 0xC8, 0x01, 0x00, 0x00, 0x00, 0xA1, 0xB8, 0x00, 0x05, 0x00, +0x00, 0xA8, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xB6, 0xD0, 0x01, 0x0A, 0x00, 0x00, 0xA8, 0xC0, 0x00, +0x00, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x00, 0x4E, 0x5A, 0x53, 0x54, 0x00, 0x4E, 0x5A, 0x4D, 0x54, +0x00, 0x4E, 0x5A, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, /* Antarctica/Syowa */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x41, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -7535,8 +7536,8 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { /* Asia/Amman */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x4A, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0D, 0xB6, 0xA3, 0xD6, 0xD0, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xB6, 0xA3, 0xD6, 0xD0, 0x06, 0x72, 0x79, 0xE0, 0x07, 0x0C, 0xAB, 0x50, 0x08, 0x24, 0x37, 0x60, 0x08, 0xED, 0xDE, 0xD0, 0x0A, 0x05, 0x6A, 0xE0, 0x0A, 0xCF, 0x12, 0x50, 0x0B, 0xE7, 0xEF, 0xE0, 0x0C, 0xDA, 0x75, 0xD0, 0x0D, 0xC9, 0x23, 0x60, 0x0E, 0x92, 0xCA, 0xD0, 0x0F, 0xA9, 0x05, 0x60, 0x10, 0x72, 0xAC, 0xD0, @@ -7553,31 +7554,17 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { 0x42, 0x4C, 0x72, 0xE0, 0x43, 0x3C, 0x63, 0xE0, 0x44, 0x2C, 0x54, 0xE0, 0x45, 0x41, 0x2F, 0xE0, 0x46, 0x0C, 0x36, 0xE0, 0x47, 0x21, 0x11, 0xE0, 0x47, 0xEC, 0x18, 0xE0, 0x49, 0x0A, 0x2E, 0x60, 0x49, 0xCB, 0xFA, 0xE0, 0x4A, 0xEA, 0x10, 0x60, 0x4B, 0xAB, 0xDC, 0xE0, 0x4C, 0xC9, 0xF2, 0x60, -0x4D, 0x94, 0xF9, 0x60, 0x4E, 0xA9, 0xD4, 0x60, 0x4F, 0x74, 0xDB, 0x60, 0x52, 0x69, 0x98, 0x60, -0x53, 0x34, 0x9F, 0x60, 0x54, 0x52, 0xB4, 0xE0, 0x55, 0x14, 0x81, 0x60, 0x56, 0x32, 0x96, 0xE0, -0x56, 0xFD, 0x9D, 0xE0, 0x58, 0x12, 0x78, 0xE0, 0x58, 0xDD, 0x7F, 0xE0, 0x59, 0xF2, 0x5A, 0xE0, -0x5A, 0xBD, 0x61, 0xE0, 0x5B, 0xD2, 0x3C, 0xE0, 0x5C, 0x9D, 0x43, 0xE0, 0x5D, 0xB2, 0x1E, 0xE0, -0x5E, 0x7D, 0x25, 0xE0, 0x5F, 0x9B, 0x3B, 0x60, 0x60, 0x5D, 0x07, 0xE0, 0x61, 0x7B, 0x1D, 0x60, -0x62, 0x46, 0x24, 0x60, 0x63, 0x5A, 0xFF, 0x60, 0x64, 0x26, 0x06, 0x60, 0x65, 0x3A, 0xE1, 0x60, -0x66, 0x05, 0xE8, 0x60, 0x67, 0x1A, 0xC3, 0x60, 0x67, 0xE5, 0xCA, 0x60, 0x69, 0x03, 0xDF, 0xE0, -0x69, 0xC5, 0xAC, 0x60, 0x6A, 0xE3, 0xC1, 0xE0, 0x6B, 0xA5, 0x8E, 0x60, 0x6C, 0xC3, 0xA3, 0xE0, -0x6D, 0x8E, 0xAA, 0xE0, 0x6E, 0xA3, 0x85, 0xE0, 0x6F, 0x6E, 0x8C, 0xE0, 0x70, 0x83, 0x67, 0xE0, -0x71, 0x4E, 0x6E, 0xE0, 0x72, 0x63, 0x49, 0xE0, 0x73, 0x2E, 0x50, 0xE0, 0x74, 0x4C, 0x66, 0x60, -0x75, 0x0E, 0x32, 0xE0, 0x76, 0x2C, 0x48, 0x60, 0x76, 0xF7, 0x4F, 0x60, 0x78, 0x0C, 0x2A, 0x60, -0x78, 0xD7, 0x31, 0x60, 0x79, 0xEC, 0x0C, 0x60, 0x7A, 0xB7, 0x13, 0x60, 0x7B, 0xCB, 0xEE, 0x60, -0x7C, 0x96, 0xF5, 0x60, 0x7D, 0xB5, 0x0A, 0xE0, 0x7E, 0x76, 0xD7, 0x60, 0x7F, 0x94, 0xEC, 0xE0, +0x4D, 0x94, 0xF9, 0x60, 0x4E, 0xA9, 0xD4, 0x60, 0x4F, 0x74, 0xDB, 0x60, 0x50, 0x89, 0xB6, 0x60, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, -0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, -0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, -0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, -0x03, 0x01, 0x03, 0x01, 0x03, 0x00, 0x00, 0x21, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, +0x03, 0x01, 0x03, 0x01, 0x05, 0x00, 0x00, 0x21, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, -0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, -0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBA, 0x14, 0xB8, 0x01, 0x49, -0x7C, 0xF5, 0x00, 0x00, 0x00, 0x00, +0x30, 0x01, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, +0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBA, 0x14, 0xB8, 0x01, 0x49, 0x7C, 0xF5, 0x00, 0x00, +0x00, 0x00, /* Asia/Anadyr */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -8060,13 +8047,13 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { /* Asia/Dili */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x54, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0x92, 0xE6, 0x18, 0xC4, +0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0x92, 0xE6, 0x18, 0xC4, 0xCB, 0x99, 0x32, 0xF0, 0xD2, 0x56, 0xEE, 0x70, 0x0B, 0xEA, 0x30, 0x70, 0x39, 0xC3, 0x99, 0x00, 0x01, 0x02, 0x03, 0x04, 0x03, 0x00, 0x00, 0x75, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x70, -0x80, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x54, 0x4C, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x43, -0x49, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x48, -0x68, 0x01, 0xD2, 0x48, 0x7D, 0x00, 0x00, 0x00, 0x00, +0x80, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x54, 0x4C, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x57, +0x49, 0x54, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, +0x48, 0x68, 0x01, 0xD2, 0x48, 0x7D, 0x00, 0x00, 0x00, 0x00, /* Asia/Dubai */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x41, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -8122,19 +8109,19 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { 0x45, 0x12, 0xFD, 0x50, 0x46, 0x0E, 0xD9, 0xE0, 0x46, 0xE8, 0x6F, 0x70, 0x47, 0xEC, 0x18, 0xE0, 0x48, 0xB7, 0x11, 0xD0, 0x49, 0xCB, 0xFA, 0xE0, 0x4A, 0xA0, 0x3C, 0x60, 0x4B, 0xAD, 0x2E, 0x9C, 0x4C, 0x61, 0xBD, 0xD0, 0x4D, 0x94, 0xF9, 0x9C, 0x4E, 0x35, 0xC2, 0x50, 0x4F, 0x74, 0xDB, 0x60, -0x50, 0x5B, 0x91, 0xE0, 0x51, 0x54, 0xBD, 0x60, 0x52, 0x44, 0xAE, 0x60, 0x53, 0x34, 0x9F, 0x60, -0x54, 0x24, 0x90, 0x60, 0x55, 0x14, 0x81, 0x60, 0x56, 0x04, 0x72, 0x60, 0x56, 0xFD, 0x9D, 0xE0, -0x57, 0xE4, 0x54, 0x60, 0x58, 0xDD, 0x7F, 0xE0, 0x59, 0xC4, 0x36, 0x60, 0x5A, 0xBD, 0x61, 0xE0, -0x5B, 0xA4, 0x18, 0x60, 0x5C, 0x9D, 0x43, 0xE0, 0x5D, 0x8D, 0x34, 0xE0, 0x5E, 0x7D, 0x25, 0xE0, -0x5F, 0x6D, 0x16, 0xE0, 0x60, 0x5D, 0x07, 0xE0, 0x61, 0x4C, 0xF8, 0xE0, 0x62, 0x46, 0x24, 0x60, -0x63, 0x2C, 0xDA, 0xE0, 0x64, 0x26, 0x06, 0x60, 0x65, 0x0C, 0xBC, 0xE0, 0x66, 0x05, 0xE8, 0x60, -0x66, 0xF5, 0xD9, 0x60, 0x67, 0xE5, 0xCA, 0x60, 0x68, 0xD5, 0xBB, 0x60, 0x69, 0xC5, 0xAC, 0x60, -0x6A, 0xB5, 0x9D, 0x60, 0x6B, 0xA5, 0x8E, 0x60, 0x6C, 0x95, 0x7F, 0x60, 0x6D, 0x8E, 0xAA, 0xE0, -0x6E, 0x75, 0x61, 0x60, 0x6F, 0x6E, 0x8C, 0xE0, 0x70, 0x55, 0x43, 0x60, 0x71, 0x4E, 0x6E, 0xE0, -0x72, 0x3E, 0x5F, 0xE0, 0x73, 0x2E, 0x50, 0xE0, 0x74, 0x1E, 0x41, 0xE0, 0x75, 0x0E, 0x32, 0xE0, -0x75, 0xFE, 0x23, 0xE0, 0x76, 0xF7, 0x4F, 0x60, 0x77, 0xDE, 0x05, 0xE0, 0x78, 0xD7, 0x31, 0x60, -0x79, 0xBD, 0xE7, 0xE0, 0x7A, 0xB7, 0x13, 0x60, 0x7B, 0x9D, 0xC9, 0xE0, 0x7C, 0x96, 0xF5, 0x60, -0x7D, 0x86, 0xE6, 0x60, 0x7E, 0x76, 0xD7, 0x60, 0x7F, 0x66, 0xC8, 0x60, 0x00, 0x01, 0x00, 0x01, +0x50, 0x5B, 0x91, 0xE0, 0x51, 0x54, 0xBD, 0x60, 0x52, 0x44, 0xA0, 0x50, 0x53, 0x34, 0x9F, 0x60, +0x54, 0x24, 0x82, 0x50, 0x55, 0x14, 0x81, 0x60, 0x56, 0x04, 0x64, 0x50, 0x56, 0xFD, 0x9D, 0xE0, +0x57, 0xE4, 0x46, 0x50, 0x58, 0xDD, 0x7F, 0xE0, 0x59, 0xC4, 0x28, 0x50, 0x5A, 0xBD, 0x61, 0xE0, +0x5B, 0xA4, 0x0A, 0x50, 0x5C, 0x9D, 0x43, 0xE0, 0x5D, 0x8D, 0x26, 0xD0, 0x5E, 0x7D, 0x25, 0xE0, +0x5F, 0x6D, 0x08, 0xD0, 0x60, 0x5D, 0x07, 0xE0, 0x61, 0x4C, 0xEA, 0xD0, 0x62, 0x46, 0x24, 0x60, +0x63, 0x2C, 0xCC, 0xD0, 0x64, 0x26, 0x06, 0x60, 0x65, 0x0C, 0xAE, 0xD0, 0x66, 0x05, 0xE8, 0x60, +0x66, 0xF5, 0xCB, 0x50, 0x67, 0xE5, 0xCA, 0x60, 0x68, 0xD5, 0xAD, 0x50, 0x69, 0xC5, 0xAC, 0x60, +0x6A, 0xB5, 0x8F, 0x50, 0x6B, 0xA5, 0x8E, 0x60, 0x6C, 0x95, 0x71, 0x50, 0x6D, 0x8E, 0xAA, 0xE0, +0x6E, 0x75, 0x53, 0x50, 0x6F, 0x6E, 0x8C, 0xE0, 0x70, 0x55, 0x35, 0x50, 0x71, 0x4E, 0x6E, 0xE0, +0x72, 0x3E, 0x51, 0xD0, 0x73, 0x2E, 0x50, 0xE0, 0x74, 0x1E, 0x33, 0xD0, 0x75, 0x0E, 0x32, 0xE0, +0x75, 0xFE, 0x15, 0xD0, 0x76, 0xF7, 0x4F, 0x60, 0x77, 0xDD, 0xF7, 0xD0, 0x78, 0xD7, 0x31, 0x60, +0x79, 0xBD, 0xD9, 0xD0, 0x7A, 0xB7, 0x13, 0x60, 0x7B, 0x9D, 0xBB, 0xD0, 0x7C, 0x96, 0xF5, 0x60, +0x7D, 0x86, 0xD8, 0x50, 0x7E, 0x76, 0xD7, 0x60, 0x7F, 0x66, 0xBA, 0x50, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, @@ -8196,19 +8183,19 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { 0x48, 0xBB, 0x06, 0x50, 0x49, 0xCB, 0xFA, 0xE0, 0x4A, 0xA0, 0x3C, 0x60, 0x4B, 0xAB, 0xDC, 0xE0, 0x4C, 0x61, 0xBD, 0xD0, 0x4D, 0x94, 0xF9, 0x9C, 0x4E, 0x35, 0xC2, 0x50, 0x4E, 0x5C, 0x0B, 0xE0, 0x4E, 0x84, 0xDC, 0x50, 0x4F, 0x74, 0xDB, 0x60, 0x50, 0x5B, 0x91, 0xE0, 0x51, 0x54, 0xBD, 0x60, -0x52, 0x44, 0xAE, 0x60, 0x53, 0x34, 0x9F, 0x60, 0x54, 0x24, 0x90, 0x60, 0x55, 0x14, 0x81, 0x60, -0x56, 0x04, 0x72, 0x60, 0x56, 0xFD, 0x9D, 0xE0, 0x57, 0xE4, 0x54, 0x60, 0x58, 0xDD, 0x7F, 0xE0, -0x59, 0xC4, 0x36, 0x60, 0x5A, 0xBD, 0x61, 0xE0, 0x5B, 0xA4, 0x18, 0x60, 0x5C, 0x9D, 0x43, 0xE0, -0x5D, 0x8D, 0x34, 0xE0, 0x5E, 0x7D, 0x25, 0xE0, 0x5F, 0x6D, 0x16, 0xE0, 0x60, 0x5D, 0x07, 0xE0, -0x61, 0x4C, 0xF8, 0xE0, 0x62, 0x46, 0x24, 0x60, 0x63, 0x2C, 0xDA, 0xE0, 0x64, 0x26, 0x06, 0x60, -0x65, 0x0C, 0xBC, 0xE0, 0x66, 0x05, 0xE8, 0x60, 0x66, 0xF5, 0xD9, 0x60, 0x67, 0xE5, 0xCA, 0x60, -0x68, 0xD5, 0xBB, 0x60, 0x69, 0xC5, 0xAC, 0x60, 0x6A, 0xB5, 0x9D, 0x60, 0x6B, 0xA5, 0x8E, 0x60, -0x6C, 0x95, 0x7F, 0x60, 0x6D, 0x8E, 0xAA, 0xE0, 0x6E, 0x75, 0x61, 0x60, 0x6F, 0x6E, 0x8C, 0xE0, -0x70, 0x55, 0x43, 0x60, 0x71, 0x4E, 0x6E, 0xE0, 0x72, 0x3E, 0x5F, 0xE0, 0x73, 0x2E, 0x50, 0xE0, -0x74, 0x1E, 0x41, 0xE0, 0x75, 0x0E, 0x32, 0xE0, 0x75, 0xFE, 0x23, 0xE0, 0x76, 0xF7, 0x4F, 0x60, -0x77, 0xDE, 0x05, 0xE0, 0x78, 0xD7, 0x31, 0x60, 0x79, 0xBD, 0xE7, 0xE0, 0x7A, 0xB7, 0x13, 0x60, -0x7B, 0x9D, 0xC9, 0xE0, 0x7C, 0x96, 0xF5, 0x60, 0x7D, 0x86, 0xE6, 0x60, 0x7E, 0x76, 0xD7, 0x60, -0x7F, 0x66, 0xC8, 0x60, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x02, 0x01, +0x52, 0x44, 0xA0, 0x50, 0x53, 0x34, 0x9F, 0x60, 0x54, 0x24, 0x82, 0x50, 0x55, 0x14, 0x81, 0x60, +0x56, 0x04, 0x64, 0x50, 0x56, 0xFD, 0x9D, 0xE0, 0x57, 0xE4, 0x46, 0x50, 0x58, 0xDD, 0x7F, 0xE0, +0x59, 0xC4, 0x28, 0x50, 0x5A, 0xBD, 0x61, 0xE0, 0x5B, 0xA4, 0x0A, 0x50, 0x5C, 0x9D, 0x43, 0xE0, +0x5D, 0x8D, 0x26, 0xD0, 0x5E, 0x7D, 0x25, 0xE0, 0x5F, 0x6D, 0x08, 0xD0, 0x60, 0x5D, 0x07, 0xE0, +0x61, 0x4C, 0xEA, 0xD0, 0x62, 0x46, 0x24, 0x60, 0x63, 0x2C, 0xCC, 0xD0, 0x64, 0x26, 0x06, 0x60, +0x65, 0x0C, 0xAE, 0xD0, 0x66, 0x05, 0xE8, 0x60, 0x66, 0xF5, 0xCB, 0x50, 0x67, 0xE5, 0xCA, 0x60, +0x68, 0xD5, 0xAD, 0x50, 0x69, 0xC5, 0xAC, 0x60, 0x6A, 0xB5, 0x8F, 0x50, 0x6B, 0xA5, 0x8E, 0x60, +0x6C, 0x95, 0x71, 0x50, 0x6D, 0x8E, 0xAA, 0xE0, 0x6E, 0x75, 0x53, 0x50, 0x6F, 0x6E, 0x8C, 0xE0, +0x70, 0x55, 0x35, 0x50, 0x71, 0x4E, 0x6E, 0xE0, 0x72, 0x3E, 0x51, 0xD0, 0x73, 0x2E, 0x50, 0xE0, +0x74, 0x1E, 0x33, 0xD0, 0x75, 0x0E, 0x32, 0xE0, 0x75, 0xFE, 0x15, 0xD0, 0x76, 0xF7, 0x4F, 0x60, +0x77, 0xDD, 0xF7, 0xD0, 0x78, 0xD7, 0x31, 0x60, 0x79, 0xBD, 0xD9, 0xD0, 0x7A, 0xB7, 0x13, 0x60, +0x7B, 0x9D, 0xBB, 0xD0, 0x7C, 0x96, 0xF5, 0x60, 0x7D, 0x86, 0xD8, 0x50, 0x7E, 0x76, 0xD7, 0x60, +0x7F, 0x66, 0xBA, 0x50, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x01, 0x02, @@ -8397,7 +8384,7 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { 0xDA, 0xFF, 0x26, 0x00, 0xF4, 0xB5, 0xBE, 0x88, 0x01, 0x02, 0x03, 0x02, 0x04, 0x02, 0x05, 0x00, 0x00, 0x64, 0x20, 0x00, 0x00, 0x00, 0x00, 0x67, 0x20, 0x00, 0x04, 0x00, 0x00, 0x69, 0x78, 0x00, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0D, 0x00, 0x00, 0x70, 0x80, 0x00, 0x09, 0x00, 0x00, 0x62, -0x70, 0x00, 0x09, 0x4A, 0x4D, 0x54, 0x00, 0x4A, 0x41, 0x56, 0x54, 0x00, 0x57, 0x49, 0x54, 0x00, +0x70, 0x00, 0x09, 0x42, 0x4D, 0x54, 0x00, 0x4A, 0x41, 0x56, 0x54, 0x00, 0x57, 0x49, 0x42, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xEB, 0x65, 0x01, 0xB5, 0x9F, 0x40, 0x00, 0x00, 0x00, 0x0E, 0x4A, 0x61, 0x76, 0x61, 0x20, 0x26, 0x20, 0x53, 0x75, 0x6D, 0x61, 0x74, 0x72, 0x61, @@ -8408,7 +8395,7 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xBA, 0x16, 0xC1, 0x98, 0xD0, 0x58, 0xB9, 0xF0, 0xF4, 0xB5, 0xA2, 0x68, 0x01, 0x02, 0x01, 0x00, 0x00, 0x83, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x85, 0x98, 0x00, 0x08, 0x4C, 0x4D, 0x54, -0x00, 0x45, 0x49, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x57, 0x49, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x76, 0xAA, 0x01, 0xE9, 0x59, 0x70, 0x00, 0x00, 0x00, 0x31, 0x77, 0x65, 0x73, 0x74, 0x20, 0x4E, 0x65, 0x77, 0x20, 0x47, 0x75, 0x69, 0x6E, 0x65, 0x61, 0x20, 0x28, 0x49, 0x72, 0x69, 0x61, 0x6E, 0x20, 0x4A, 0x61, 0x79, 0x61, 0x29, 0x20, 0x26, 0x20, 0x4D, 0x61, 0x6C, 0x75, 0x6B, 0x75, @@ -8754,17 +8741,17 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { /* Asia/Makassar */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x49, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0xA1, 0xF2, 0x5D, 0x90, +0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xA1, 0xF2, 0x5D, 0x90, 0xBA, 0x16, 0xD5, 0x90, 0xCB, 0x88, 0x1D, 0x80, 0xD2, 0x56, 0xEE, 0x70, 0x01, 0x02, 0x03, 0x02, 0x00, 0x00, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0xF0, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, -0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00, -0x43, 0x49, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x81, 0x85, 0x8D, 0x01, 0xC8, 0xD9, 0x1F, 0x00, 0x00, 0x00, 0x48, 0x65, 0x61, 0x73, 0x74, -0x20, 0x26, 0x20, 0x73, 0x6F, 0x75, 0x74, 0x68, 0x20, 0x42, 0x6F, 0x72, 0x6E, 0x65, 0x6F, 0x2C, -0x20, 0x53, 0x75, 0x6C, 0x61, 0x77, 0x65, 0x73, 0x69, 0x20, 0x28, 0x43, 0x65, 0x6C, 0x65, 0x62, -0x65, 0x73, 0x29, 0x2C, 0x20, 0x42, 0x61, 0x6C, 0x69, 0x2C, 0x20, 0x4E, 0x75, 0x73, 0x61, 0x20, -0x54, 0x65, 0x6E, 0x67, 0x61, 0x72, 0x72, 0x61, 0x2C, 0x20, 0x77, 0x65, 0x73, 0x74, 0x20, 0x54, -0x69, 0x6D, 0x6F, 0x72, +0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00, +0x57, 0x49, 0x54, 0x41, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x81, 0x85, 0x8D, 0x01, 0xC8, 0xD9, 0x1F, 0x00, 0x00, 0x00, 0x48, 0x65, 0x61, 0x73, +0x74, 0x20, 0x26, 0x20, 0x73, 0x6F, 0x75, 0x74, 0x68, 0x20, 0x42, 0x6F, 0x72, 0x6E, 0x65, 0x6F, +0x2C, 0x20, 0x53, 0x75, 0x6C, 0x61, 0x77, 0x65, 0x73, 0x69, 0x20, 0x28, 0x43, 0x65, 0x6C, 0x65, +0x62, 0x65, 0x73, 0x29, 0x2C, 0x20, 0x42, 0x61, 0x6C, 0x69, 0x2C, 0x20, 0x4E, 0x75, 0x73, 0x61, +0x20, 0x54, 0x65, 0x6E, 0x67, 0x61, 0x72, 0x72, 0x61, 0x2C, 0x20, 0x77, 0x65, 0x73, 0x74, 0x20, +0x54, 0x69, 0x6D, 0x6F, 0x72, /* Asia/Manila */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x50, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -8980,17 +8967,17 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { /* Asia/Pontianak */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x49, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x14, 0x8B, 0xFF, 0x8E, 0x00, +0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x15, 0x8B, 0xFF, 0x8E, 0x00, 0xBA, 0x16, 0xDF, 0x00, 0xCB, 0x79, 0xA4, 0x08, 0xD2, 0x56, 0xEE, 0x70, 0xD7, 0x3C, 0xC6, 0x08, 0xDA, 0xFF, 0x26, 0x00, 0xF4, 0xB5, 0xBE, 0x88, 0x21, 0xDA, 0x74, 0x80, 0x01, 0x02, 0x03, 0x02, 0x04, 0x02, 0x05, 0x06, 0x00, 0x00, 0x66, 0x80, 0x00, 0x00, 0x00, 0x00, 0x66, 0x80, 0x00, 0x04, 0x00, 0x00, 0x69, 0x78, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0C, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x00, 0x00, 0x70, 0x80, 0x00, 0x10, 0x00, 0x00, 0x62, 0x70, 0x00, 0x08, 0x4C, 0x4D, -0x54, 0x00, 0x50, 0x4D, 0x54, 0x00, 0x57, 0x49, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x43, 0x49, -0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x89, 0x47, 0x3A, 0x01, 0xB9, 0x7C, 0xD5, 0x00, 0x00, 0x00, 0x15, 0x77, 0x65, 0x73, 0x74, -0x20, 0x26, 0x20, 0x63, 0x65, 0x6E, 0x74, 0x72, 0x61, 0x6C, 0x20, 0x42, 0x6F, 0x72, 0x6E, 0x65, -0x6F, +0x54, 0x00, 0x50, 0x4D, 0x54, 0x00, 0x57, 0x49, 0x42, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x57, 0x49, +0x54, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x89, 0x47, 0x3A, 0x01, 0xB9, 0x7C, 0xD5, 0x00, 0x00, 0x00, 0x15, 0x77, 0x65, 0x73, +0x74, 0x20, 0x26, 0x20, 0x63, 0x65, 0x6E, 0x74, 0x72, 0x61, 0x6C, 0x20, 0x42, 0x6F, 0x72, 0x6E, +0x65, 0x6F, /* Asia/Pyongyang */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -9368,12 +9355,12 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { /* Asia/Ujung_Pandang */ 0x50, 0x48, 0x50, 0x31, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0xA1, 0xF2, 0x5D, 0x90, +0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xA1, 0xF2, 0x5D, 0x90, 0xBA, 0x16, 0xD5, 0x90, 0xCB, 0x88, 0x1D, 0x80, 0xD2, 0x56, 0xEE, 0x70, 0x01, 0x02, 0x03, 0x02, 0x00, 0x00, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0xF0, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, -0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00, -0x43, 0x49, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, +0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00, +0x57, 0x49, 0x54, 0x41, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, /* Asia/Ulaanbaatar */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x4D, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -15346,8 +15333,9 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { /* Europe/Vaduz */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x4C, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x72, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x09, 0x15, 0x23, 0xEB, 0x90, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09, 0xCA, 0x17, 0x6A, 0x00, +0xCA, 0xE2, 0x71, 0x00, 0xCB, 0xF7, 0x4C, 0x00, 0xCC, 0xC2, 0x53, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x16, 0x13, 0xDC, 0x90, 0x17, 0x03, 0xCD, 0x90, 0x17, 0xF3, 0xBE, 0x90, 0x18, 0xE3, 0xAF, 0x90, 0x19, 0xD3, 0xA0, 0x90, 0x1A, 0xC3, 0x91, 0x90, 0x1B, 0xBC, 0xBD, 0x10, 0x1C, 0xAC, 0xAE, 0x10, 0x1D, 0x9C, 0x9F, 0x10, 0x1E, 0x8C, 0x90, 0x10, 0x1F, 0x7C, 0x81, 0x10, 0x20, 0x6C, 0x72, 0x10, @@ -15376,17 +15364,17 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { 0x74, 0x45, 0xF9, 0x10, 0x75, 0x11, 0x00, 0x10, 0x76, 0x2F, 0x15, 0x90, 0x76, 0xF0, 0xE2, 0x10, 0x78, 0x0E, 0xF7, 0x90, 0x78, 0xD0, 0xC4, 0x10, 0x79, 0xEE, 0xD9, 0x90, 0x7A, 0xB0, 0xA6, 0x10, 0x7B, 0xCE, 0xBB, 0x90, 0x7C, 0x99, 0xC2, 0x90, 0x7D, 0xAE, 0x9D, 0x90, 0x7E, 0x79, 0xA4, 0x90, -0x7F, 0x8E, 0x7F, 0x90, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, -0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, -0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0xD1, 0x46, 0x38, 0x01, 0x21, 0x2D, 0xF2, 0x00, -0x00, 0x00, 0x00, +0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x00, +0x00, 0x00, 0x0E, 0x10, 0x00, 0x05, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x00, 0x00, 0x00, 0x0E, 0x10, +0x00, 0x05, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, +0x00, 0x01, 0x01, 0x00, 0xD1, 0x46, 0x38, 0x01, 0x21, 0x2D, 0xF2, 0x00, 0x00, 0x00, 0x00, /* Europe/Vatican */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x56, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -16278,14 +16266,14 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { /* Jamaica */ 0x50, 0x48, 0x50, 0x31, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x93, 0x0F, 0xB5, 0x00, +0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x93, 0x0F, 0xB4, 0xFF, 0x08, 0x20, 0xC1, 0x70, 0x09, 0x10, 0xA4, 0x60, 0x09, 0xAD, 0x94, 0xF0, 0x0A, 0xF0, 0x86, 0x60, 0x0B, 0xE0, 0x85, 0x70, 0x0C, 0xD9, 0xA2, 0xE0, 0x0D, 0xC0, 0x67, 0x70, 0x0E, 0xB9, 0x84, 0xE0, 0x0F, 0xA9, 0x83, 0xF0, 0x10, 0x99, 0x66, 0xE0, 0x11, 0x89, 0x65, 0xF0, 0x12, 0x79, 0x48, 0xE0, 0x13, 0x69, 0x47, 0xF0, 0x14, 0x59, 0x2A, 0xE0, 0x15, 0x49, 0x29, 0xF0, 0x16, 0x39, 0x0C, 0xE0, 0x17, 0x29, 0x0B, 0xF0, 0x18, 0x22, 0x29, 0x60, 0x19, 0x08, 0xED, 0xF0, 0x1A, 0x02, 0x0B, 0x60, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, -0x01, 0x02, 0x01, 0x02, 0x01, 0xFF, 0xFF, 0xB8, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, +0x01, 0x02, 0x01, 0x02, 0x01, 0xFF, 0xFF, 0xB8, 0x01, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x08, 0x4B, 0x4D, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, @@ -16999,19 +16987,19 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { 0x36, 0x3B, 0x17, 0xE0, 0x36, 0xD7, 0xFA, 0x60, 0x38, 0x24, 0x34, 0x60, 0x38, 0xB7, 0xDC, 0x60, 0x4B, 0x11, 0x2C, 0xE0, 0x4B, 0xAE, 0x0F, 0x60, 0x4C, 0xC2, 0xEA, 0x60, 0x4D, 0x72, 0x41, 0xE0, 0x4E, 0xA2, 0xCC, 0x60, 0x4F, 0x1A, 0xC4, 0xE0, 0x50, 0x82, 0xAE, 0x60, 0x50, 0xFA, 0xA6, 0xE0, -0x52, 0x62, 0x90, 0x60, 0x52, 0xDA, 0x88, 0xE0, 0x54, 0x42, 0x72, 0x60, 0x54, 0xBA, 0x6A, 0xE0, -0x56, 0x22, 0x54, 0x60, 0x56, 0xA3, 0x87, 0x60, 0x58, 0x0B, 0x70, 0xE0, 0x58, 0x83, 0x69, 0x60, +0x52, 0x6B, 0xCA, 0xE0, 0x52, 0xDA, 0x88, 0xE0, 0x54, 0x4B, 0xAC, 0xE0, 0x54, 0xBA, 0x6A, 0xE0, +0x56, 0x2B, 0x8E, 0xE0, 0x56, 0xA3, 0x87, 0x60, 0x58, 0x0B, 0x70, 0xE0, 0x58, 0x83, 0x69, 0x60, 0x59, 0xEB, 0x52, 0xE0, 0x5A, 0x63, 0x4B, 0x60, 0x5B, 0xCB, 0x34, 0xE0, 0x5C, 0x43, 0x2D, 0x60, -0x5D, 0xAB, 0x16, 0xE0, 0x5E, 0x23, 0x0F, 0x60, 0x5F, 0x8A, 0xF8, 0xE0, 0x60, 0x0C, 0x2B, 0xE0, +0x5D, 0xB4, 0x51, 0x60, 0x5E, 0x23, 0x0F, 0x60, 0x5F, 0x94, 0x33, 0x60, 0x60, 0x0C, 0x2B, 0xE0, 0x61, 0x74, 0x15, 0x60, 0x61, 0xEC, 0x0D, 0xE0, 0x63, 0x53, 0xF7, 0x60, 0x63, 0xCB, 0xEF, 0xE0, -0x65, 0x33, 0xD9, 0x60, 0x65, 0xAB, 0xD1, 0xE0, 0x67, 0x13, 0xBB, 0x60, 0x67, 0x8B, 0xB3, 0xE0, -0x68, 0xF3, 0x9D, 0x60, 0x69, 0x6B, 0x95, 0xE0, 0x6A, 0xD3, 0x7F, 0x60, 0x6B, 0x54, 0xB2, 0x60, +0x65, 0x33, 0xD9, 0x60, 0x65, 0xAB, 0xD1, 0xE0, 0x67, 0x1C, 0xF5, 0xE0, 0x67, 0x8B, 0xB3, 0xE0, +0x68, 0xFC, 0xD7, 0xE0, 0x69, 0x6B, 0x95, 0xE0, 0x6A, 0xDC, 0xB9, 0xE0, 0x6B, 0x54, 0xB2, 0x60, 0x6C, 0xBC, 0x9B, 0xE0, 0x6D, 0x34, 0x94, 0x60, 0x6E, 0x9C, 0x7D, 0xE0, 0x6F, 0x14, 0x76, 0x60, -0x70, 0x7C, 0x5F, 0xE0, 0x70, 0xF4, 0x58, 0x60, 0x72, 0x5C, 0x41, 0xE0, 0x72, 0xD4, 0x3A, 0x60, -0x74, 0x3C, 0x23, 0xE0, 0x74, 0xB4, 0x1C, 0x60, 0x76, 0x25, 0x40, 0x60, 0x76, 0x9D, 0x38, 0xE0, +0x70, 0x7C, 0x5F, 0xE0, 0x70, 0xF4, 0x58, 0x60, 0x72, 0x65, 0x7C, 0x60, 0x72, 0xD4, 0x3A, 0x60, +0x74, 0x45, 0x5E, 0x60, 0x74, 0xB4, 0x1C, 0x60, 0x76, 0x25, 0x40, 0x60, 0x76, 0x9D, 0x38, 0xE0, 0x78, 0x05, 0x22, 0x60, 0x78, 0x7D, 0x1A, 0xE0, 0x79, 0xE5, 0x04, 0x60, 0x7A, 0x5C, 0xFC, 0xE0, -0x7B, 0xC4, 0xE6, 0x60, 0x7C, 0x3C, 0xDE, 0xE0, 0x7D, 0xA4, 0xC8, 0x60, 0x7E, 0x1C, 0xC0, 0xE0, -0x7F, 0x84, 0xAA, 0x60, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x7B, 0xC4, 0xE6, 0x60, 0x7C, 0x3C, 0xDE, 0xE0, 0x7D, 0xAE, 0x02, 0xE0, 0x7E, 0x1C, 0xC0, 0xE0, +0x7F, 0x8D, 0xE4, 0xE0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, @@ -17074,11 +17062,13 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { /* Pacific/Johnston */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x55, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xFF, 0xFF, 0x73, 0x60, -0x00, 0x00, 0x48, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0xA2, 0xE3, 0x38, 0x00, 0x0F, 0xFF, 0x0D, -0x00, 0x00, 0x00, 0x0E, 0x4A, 0x6F, 0x68, 0x6E, 0x73, 0x74, 0x6F, 0x6E, 0x20, 0x41, 0x74, 0x6F, -0x6C, 0x6C, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0xBB, 0x05, 0x43, 0x48, +0xBB, 0x21, 0x71, 0x58, 0xCB, 0x89, 0x3D, 0xC8, 0xD2, 0x61, 0x49, 0x38, 0xD5, 0x8D, 0x73, 0x48, +0x01, 0x00, 0x01, 0x00, 0x02, 0xFF, 0xFF, 0x6C, 0x58, 0x00, 0x00, 0xFF, 0xFF, 0x7A, 0x68, 0x01, +0x04, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x00, 0x48, 0x53, 0x54, 0x00, 0x48, 0x44, 0x54, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA2, 0xE3, 0x38, 0x00, 0x0F, 0xFF, 0x0D, 0x00, 0x00, 0x00, +0x0E, 0x4A, 0x6F, 0x68, 0x6E, 0x73, 0x74, 0x6F, 0x6E, 0x20, 0x41, 0x74, 0x6F, 0x6C, 0x6C, /* Pacific/Kiritimati */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x4B, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -18410,4 +18400,4 @@ const unsigned char timelib_timezone_db_data_builtin[261525] = { 0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, }; -const timelib_tzdb timezonedb_builtin = { "2013.4", 579, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; +const timelib_tzdb timezonedb_builtin = { "2013.6", 579, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; diff --git a/ext/date/php_date.c b/ext/date/php_date.c index f0c9525e56..13a645117c 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -480,7 +480,7 @@ const zend_function_entry date_funcs_immutable[] = { PHP_ME(DateTimeImmutable, __construct, arginfo_date_create, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC) PHP_ME(DateTime, __wakeup, NULL, ZEND_ACC_PUBLIC) PHP_ME(DateTimeImmutable, __set_state, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME_MAPPING(createFromFormat, date_create_from_format, arginfo_date_create_from_format, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + PHP_ME_MAPPING(createFromFormat, date_create_immutable_from_format, arginfo_date_create_from_format, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) PHP_ME_MAPPING(getLastErrors, date_get_last_errors, arginfo_date_get_last_errors, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) PHP_ME_MAPPING(format, date_format, arginfo_date_method_format, 0) PHP_ME_MAPPING(getTimezone, date_timezone_get, arginfo_date_method_timezone_get, 0) @@ -1406,6 +1406,7 @@ PHPAPI signed long php_parse_date(char *string, signed long *now) parsed_time = timelib_strtotime(string, strlen(string), &error, DATE_TIMEZONEDB, php_date_parse_tzfile_wrapper); if (error->error_count) { + timelib_time_dtor(parsed_time); timelib_error_container_dtor(error); return -1; } @@ -2142,27 +2143,21 @@ static zval* date_clone_immutable(zval *object TSRMLS_DC) static int date_object_compare_date(zval *d1, zval *d2 TSRMLS_DC) { - if (Z_TYPE_P(d1) == IS_OBJECT && Z_TYPE_P(d2) == IS_OBJECT && - instanceof_function(Z_OBJCE_P(d1), date_ce_date TSRMLS_CC) && - instanceof_function(Z_OBJCE_P(d2), date_ce_date TSRMLS_CC)) { - php_date_obj *o1 = zend_object_store_get_object(d1 TSRMLS_CC); - php_date_obj *o2 = zend_object_store_get_object(d2 TSRMLS_CC); + php_date_obj *o1 = zend_object_store_get_object(d1 TSRMLS_CC); + php_date_obj *o2 = zend_object_store_get_object(d2 TSRMLS_CC); - if (!o1->time || !o2->time) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Trying to compare an incomplete DateTime object"); - return 1; - } - if (!o1->time->sse_uptodate) { - timelib_update_ts(o1->time, o1->time->tz_info); - } - if (!o2->time->sse_uptodate) { - timelib_update_ts(o2->time, o2->time->tz_info); - } - - return (o1->time->sse == o2->time->sse) ? 0 : ((o1->time->sse < o2->time->sse) ? -1 : 1); + if (!o1->time || !o2->time) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Trying to compare an incomplete DateTime or DateTimeImmutable object"); + return 1; + } + if (!o1->time->sse_uptodate) { + timelib_update_ts(o1->time, o1->time->tz_info); + } + if (!o2->time->sse_uptodate) { + timelib_update_ts(o2->time, o2->time->tz_info); } - return 1; + return (o1->time->sse == o2->time->sse) ? 0 : ((o1->time->sse < o2->time->sse) ? -1 : 1); } static HashTable *date_object_get_gc(zval *object, zval ***table, int *n TSRMLS_DC) @@ -2198,13 +2193,13 @@ static HashTable *date_object_get_properties(zval *object TSRMLS_DC) /* first we add the date and time in ISO format */ MAKE_STD_ZVAL(zv); ZVAL_STRING(zv, date_format("Y-m-d H:i:s", 12, dateobj->time, 1), 0); - zend_hash_update(props, "date", 5, &zv, sizeof(zval), NULL); + zend_hash_update(props, "date", 5, &zv, sizeof(zv), NULL); /* then we add the timezone name (or similar) */ if (dateobj->time->is_localtime) { MAKE_STD_ZVAL(zv); ZVAL_LONG(zv, dateobj->time->zone_type); - zend_hash_update(props, "timezone_type", 14, &zv, sizeof(zval), NULL); + zend_hash_update(props, "timezone_type", 14, &zv, sizeof(zv), NULL); MAKE_STD_ZVAL(zv); switch (dateobj->time->zone_type) { @@ -2227,7 +2222,7 @@ static HashTable *date_object_get_properties(zval *object TSRMLS_DC) ZVAL_STRING(zv, dateobj->time->tz_abbr, 1); break; } - zend_hash_update(props, "timezone", 9, &zv, sizeof(zval), NULL); + zend_hash_update(props, "timezone", 9, &zv, sizeof(zv), NULL); } return props; @@ -2305,7 +2300,7 @@ static HashTable *date_object_get_properties_timezone(zval *object TSRMLS_DC) MAKE_STD_ZVAL(zv); ZVAL_LONG(zv, tzobj->type); - zend_hash_update(props, "timezone_type", 14, &zv, sizeof(zval), NULL); + zend_hash_update(props, "timezone_type", 14, &zv, sizeof(zv), NULL); MAKE_STD_ZVAL(zv); switch (tzobj->type) { @@ -2327,7 +2322,7 @@ static HashTable *date_object_get_properties_timezone(zval *object TSRMLS_DC) ZVAL_STRING(zv, tzobj->tzi.z.abbr, 1); break; } - zend_hash_update(props, "timezone", 9, &zv, sizeof(zval), NULL); + zend_hash_update(props, "timezone", 9, &zv, sizeof(zv), NULL); return props; } @@ -2394,7 +2389,7 @@ static HashTable *date_object_get_properties_interval(zval *object TSRMLS_DC) #define PHP_DATE_INTERVAL_ADD_PROPERTY(n,f) \ MAKE_STD_ZVAL(zv); \ ZVAL_LONG(zv, (long)intervalobj->diff->f); \ - zend_hash_update(props, n, strlen(n) + 1, &zv, sizeof(zval), NULL); + zend_hash_update(props, n, strlen(n) + 1, &zv, sizeof(zv), NULL); PHP_DATE_INTERVAL_ADD_PROPERTY("y", y); PHP_DATE_INTERVAL_ADD_PROPERTY("m", m); @@ -2411,7 +2406,7 @@ static HashTable *date_object_get_properties_interval(zval *object TSRMLS_DC) } else { MAKE_STD_ZVAL(zv); ZVAL_FALSE(zv); - zend_hash_update(props, "days", 5, &zv, sizeof(zval), NULL); + zend_hash_update(props, "days", 5, &zv, sizeof(zv), NULL); } PHP_DATE_INTERVAL_ADD_PROPERTY("special_type", special.type); PHP_DATE_INTERVAL_ADD_PROPERTY("special_amount", special.amount); @@ -4064,7 +4059,11 @@ zval *date_interval_read_property(zval *object, zval *member, int type, const ze ALLOC_INIT_ZVAL(retval); Z_SET_REFCOUNT_P(retval, 0); - ZVAL_LONG(retval, value); + if (value != -99999) { + ZVAL_LONG(retval, value); + } else { + ZVAL_FALSE(retval); + } if (member == &tmp_member) { zval_dtor(member); diff --git a/ext/date/tests/DateInterval_days_prop1.phpt b/ext/date/tests/DateInterval_days_prop1.phpt new file mode 100644 index 0000000000..627b8f0b27 --- /dev/null +++ b/ext/date/tests/DateInterval_days_prop1.phpt @@ -0,0 +1,10 @@ +--TEST-- +Wrong var_dump(DateInterval->days) value +--FILE-- +<?php + +$interval = new DateInterval('P2Y4DT6H8M'); + +var_dump($interval->days); +--EXPECT-- +bool(false) diff --git a/ext/date/tests/DateTime_fix_createFromFormat.phpt b/ext/date/tests/DateTime_fix_createFromFormat.phpt new file mode 100644 index 0000000000..abde292775 --- /dev/null +++ b/ext/date/tests/DateTime_fix_createFromFormat.phpt @@ -0,0 +1,29 @@ +--TEST-- +Test fix for DateTime when date have textual day with dot or other special char at end +--FILE-- +<?php + +//Set the default time zone +date_default_timezone_set('Europe/London'); + +echo "*** Testing clone on DateTime objects ***\n"; + +// Create a DateTime object.. +$orig = new DateTime('2012-11-29 17:00:00'); + +// String to parse +$string = "Thu., Nov. 29, 2012 5:00PM"; + +// Create a DateTime object from format +$fromFormat = DateTime::createFromFormat( "D., M# j, Y g:iA", $string ); + +echo "Format method: " . $orig->format("D., M. j, Y g:iA") . "\n"; +echo "createFromFormat method: " . $fromFormat->format("D., M. j, Y g:iA") . "\n"; + +?> +===DONE=== +--EXPECTF-- +*** Testing clone on DateTime objects *** +Format method: Thu., Nov. 29, 2012 5:00PM +createFromFormat method: Thu., Nov. 29, 2012 5:00PM +===DONE=== diff --git a/ext/date/tests/bug64157.phpt b/ext/date/tests/bug64157.phpt new file mode 100644 index 0000000000..fb71495430 --- /dev/null +++ b/ext/date/tests/bug64157.phpt @@ -0,0 +1,14 @@ +--TEST-- +Test for bug #64157: DateTime::createFromFormat() reports confusing error message +--CREDITS-- +Boro Sitnikovski <buritomath@yahoo.com> +--INI-- +date.timezone = UTC +--FILE-- +<?php +DateTime::createFromFormat('s', '0'); +$lastErrors = DateTime::getLastErrors(); +print_r($lastErrors['errors'][0]); +?> +--EXPECT-- +A two digit second could not be found diff --git a/ext/date/tests/bug65184.phpt b/ext/date/tests/bug65184.phpt index adfd8d8124..9bb68558aa 100644 --- a/ext/date/tests/bug65184.phpt +++ b/ext/date/tests/bug65184.phpt @@ -6,6 +6,8 @@ if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') { die("skip Test is valid for Windows"); } ?> +--INI-- +date.timezone = UTC --FILE-- <?php setlocale(LC_ALL, 'Japanese_Japan.932'); diff --git a/ext/date/tests/bug65502.phpt b/ext/date/tests/bug65502.phpt new file mode 100644 index 0000000000..8819c1ff74 --- /dev/null +++ b/ext/date/tests/bug65502.phpt @@ -0,0 +1,12 @@ +--TEST-- +Test for bug #65502: DateTimeImmutable::createFromFormat returns DateTime +--CREDITS-- +Boro Sitnikovski <buritomath@yahoo.com> +--INI-- +date.timezone = UTC +--FILE-- +<?php +echo get_class(DateTimeImmutable::createFromFormat('j-M-Y', '12-Sep-2013')); +?> +--EXPECT-- +DateTimeImmutable diff --git a/ext/date/tests/bug65548.phpt b/ext/date/tests/bug65548.phpt new file mode 100644 index 0000000000..53f2519f6d --- /dev/null +++ b/ext/date/tests/bug65548.phpt @@ -0,0 +1,34 @@ +--TEST-- +Test for bug #65548: Comparison for DateTimeImmutable doesn't work +--CREDITS-- +Boro Sitnikovski <buritomath@yahoo.com> +--INI-- +date.timezone = UTC +--FILE-- +<?php +$iToday = new DateTimeImmutable('today'); +$iTomorrow = new DateTimeImmutable('tomorrow'); + +$mToday = new DateTime('today'); +$mTomorrow = new DateTime('tomorrow'); + +var_dump($iToday < $iTomorrow); +var_dump($iToday == $iTomorrow); +var_dump($iToday > $iTomorrow); + +var_dump($iToday == $mToday); +var_dump($iToday === $mToday); + +var_dump($iToday < $mTomorrow); +var_dump($iToday == $mTomorrow); +var_dump($iToday > $mTomorrow); +?> +--EXPECT-- +bool(true) +bool(false) +bool(false) +bool(true) +bool(false) +bool(true) +bool(false) +bool(false) diff --git a/ext/dba/dba.c b/ext/dba/dba.c index 8005101de3..ced90f0c62 100644 --- a/ext/dba/dba.c +++ b/ext/dba/dba.c @@ -226,12 +226,17 @@ static size_t php_dba_make_key(zval *key, char **key_str, char **key_free TSRMLS *key_free = *key_str; return len; } else { - *key_free = NULL; + zval tmp = *key; + int len; - convert_to_string(key); - *key_str = Z_STRVAL_P(key); + zval_copy_ctor(&tmp); + convert_to_string(&tmp); - return Z_STRLEN_P(key); + *key_free = *key_str = estrndup(Z_STRVAL(tmp), Z_STRLEN(tmp)); + len = Z_STRLEN(tmp); + + zval_dtor(&tmp); + return len; } } /* }}} */ @@ -297,6 +302,14 @@ static size_t php_dba_make_key(zval *key, char **key_str, char **key_free TSRMLS RETURN_FALSE; \ } +/* the same check, but with a call to DBA_ID_DONE before returning */ +#define DBA_WRITE_CHECK_WITH_ID \ + if(info->mode != DBA_WRITER && info->mode != DBA_TRUNC && info->mode != DBA_CREAT) { \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "You cannot perform a modification to a database without proper access"); \ + DBA_ID_DONE; \ + RETURN_FALSE; \ + } + /* }}} */ /* {{{ globals */ @@ -557,7 +570,7 @@ static void php_dba_update(INTERNAL_FUNCTION_PARAMETERS, int mode) DBA_FETCH_RESOURCE(info, &id); - DBA_WRITE_CHECK; + DBA_WRITE_CHECK_WITH_ID; if (info->hnd->update(info, key_str, key_len, val, val_len, mode TSRMLS_CC) == SUCCESS) { DBA_ID_DONE; @@ -612,7 +625,8 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent) char *file_mode; char mode[4], *pmode, *lock_file_mode = NULL; int persistent_flag = persistent ? STREAM_OPEN_PERSISTENT : 0; - char *opened_path, *lock_name; + char *opened_path = NULL; + char *lock_name; if(ac < 2) { WRONG_PARAM_COUNT; @@ -835,8 +849,10 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent) if (!persistent) { info->lock.name = opened_path; } else { - info->lock.name = pestrdup(opened_path, persistent); - efree(opened_path); + if (opened_path) { + info->lock.name = pestrdup(opened_path, persistent); + efree(opened_path); + } } } } @@ -1110,7 +1126,7 @@ PHP_FUNCTION(dba_delete) { DBA_ID_GET2; - DBA_WRITE_CHECK; + DBA_WRITE_CHECK_WITH_ID; if(info->hnd->delete(info, key_str, key_len TSRMLS_CC) == SUCCESS) { diff --git a/ext/dba/tests/bug65708.phpt b/ext/dba/tests/bug65708.phpt new file mode 100644 index 0000000000..b77138f6ed --- /dev/null +++ b/ext/dba/tests/bug65708.phpt @@ -0,0 +1,38 @@ +--TEST-- +Bug #65708 (dba functions cast $key param to string in-place, bypassing copy on write) +--SKIPIF-- +<?php + require_once(dirname(__FILE__) .'/skipif.inc'); +?> +--FILE-- +<?php + +error_reporting(E_ALL); + +require_once(dirname(__FILE__) .'/test.inc'); + +$db = dba_popen($db_filename, 'c'); + +$key = 1; +$copy = $key; + +echo gettype($key)."\n"; +echo gettype($copy)."\n"; + +dba_exists($key, $db); + +echo gettype($key)."\n"; +echo gettype($copy)."\n"; + +dba_close($db); + +?> +--CLEAN-- +<?php + require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECT-- +integer +integer +integer +integer diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index 1e98567dca..db8ec83a44 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -1089,7 +1089,11 @@ void dom_xpath_objects_free_storage(void *object TSRMLS_DC) void dom_objects_free_storage(void *object TSRMLS_DC) { dom_object *intern = (dom_object *)object; +#if defined(__GNUC__) && __GNUC__ >= 3 + int retcount __attribute__((unused)); /* keep compiler quiet */ +#else int retcount; +#endif zend_object_std_dtor(&intern->std TSRMLS_CC); diff --git a/ext/exif/exif.c b/ext/exif/exif.c index bd646d9adf..2fe54f7b31 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -2643,6 +2643,7 @@ static int exif_process_user_comment(image_info_type *ImageInfo, char **pszInfoP } else { decode = ImageInfo->decode_unicode_le; } + /* XXX this will fail again if encoding_converter returns on error something different than SIZE_MAX */ if (zend_multibyte_encoding_converter( (unsigned char**)pszInfoPtr, &len, @@ -2650,7 +2651,7 @@ static int exif_process_user_comment(image_info_type *ImageInfo, char **pszInfoP ByteCount, zend_multibyte_fetch_encoding(ImageInfo->encode_unicode TSRMLS_CC), zend_multibyte_fetch_encoding(decode TSRMLS_CC) - TSRMLS_CC) < 0) { + TSRMLS_CC) == (size_t)-1) { len = exif_process_string_raw(pszInfoPtr, szValuePtr, ByteCount); } return len; @@ -2663,6 +2664,7 @@ static int exif_process_user_comment(image_info_type *ImageInfo, char **pszInfoP *pszEncoding = estrdup((const char*)szValuePtr); szValuePtr = szValuePtr+8; ByteCount -= 8; + /* XXX this will fail again if encoding_converter returns on error something different than SIZE_MAX */ if (zend_multibyte_encoding_converter( (unsigned char**)pszInfoPtr, &len, @@ -2670,7 +2672,7 @@ static int exif_process_user_comment(image_info_type *ImageInfo, char **pszInfoP ByteCount, zend_multibyte_fetch_encoding(ImageInfo->encode_jis TSRMLS_CC), zend_multibyte_fetch_encoding(ImageInfo->motorola_intel ? ImageInfo->decode_jis_be : ImageInfo->decode_jis_le TSRMLS_CC) - TSRMLS_CC) < 0) { + TSRMLS_CC) == (size_t)-1) { len = exif_process_string_raw(pszInfoPtr, szValuePtr, ByteCount); } return len; @@ -2700,8 +2702,8 @@ static int exif_process_user_comment(image_info_type *ImageInfo, char **pszInfoP static int exif_process_unicode(image_info_type *ImageInfo, xp_field_type *xp_field, int tag, char *szValuePtr, int ByteCount TSRMLS_DC) { xp_field->tag = tag; - - /* Copy the comment */ + + /* XXX this will fail again if encoding_converter returns on error something different than SIZE_MAX */ if (zend_multibyte_encoding_converter( (unsigned char**)&xp_field->value, &xp_field->size, @@ -2709,7 +2711,7 @@ static int exif_process_unicode(image_info_type *ImageInfo, xp_field_type *xp_fi ByteCount, zend_multibyte_fetch_encoding(ImageInfo->encode_unicode TSRMLS_CC), zend_multibyte_fetch_encoding(ImageInfo->motorola_intel ? ImageInfo->decode_unicode_be : ImageInfo->decode_unicode_le TSRMLS_CC) - TSRMLS_CC) < 0) { + TSRMLS_CC) == (size_t)-1) { xp_field->size = exif_process_string_raw(&xp_field->value, szValuePtr, ByteCount); } return xp_field->size; diff --git a/ext/exif/tests/bug62523_1.jpg b/ext/exif/tests/bug62523_1.jpg new file mode 100644 index 0000000000..9a63d1e84d --- /dev/null +++ b/ext/exif/tests/bug62523_1.jpg @@ -0,0 +1,9 @@ +<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> +<html><head> +<title>301 Moved Permanently</title> +</head><body> +<h1>Moved Permanently</h1> +<p>The document has moved <a href="http://www.getid3.org/temp/62523.jpg">here</a>.</p> +<hr> +<address>Apache Server at getid3.org Port 80</address> +</body></html> diff --git a/ext/exif/tests/bug62523_1.phpt b/ext/exif/tests/bug62523_1.phpt new file mode 100644 index 0000000000..28d42f021d --- /dev/null +++ b/ext/exif/tests/bug62523_1.phpt @@ -0,0 +1,18 @@ +--TEST-- +Bug 62523 (php crashes with segfault when exif_read_data called) +--SKIPIF-- +<?php +extension_loaded("exif") or die("skip need exif"); +?> +--FILE-- +<?php +echo "Test\n"; +var_dump(count(exif_read_data(__DIR__."/bug62523_1.jpg"))); +?> +Done +--EXPECTF-- +Test + +Warning: exif_read_data(bug62523_1.jpg): File not supported in %sbug62523_1.php on line %d +int(1) +Done diff --git a/ext/exif/tests/bug62523_2.jpg b/ext/exif/tests/bug62523_2.jpg Binary files differnew file mode 100644 index 0000000000..8d7fc6c5f4 --- /dev/null +++ b/ext/exif/tests/bug62523_2.jpg diff --git a/ext/exif/tests/bug62523_2.phpt b/ext/exif/tests/bug62523_2.phpt new file mode 100644 index 0000000000..ddc8ae824e --- /dev/null +++ b/ext/exif/tests/bug62523_2.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug 62523 (php crashes with segfault when exif_read_data called) +--SKIPIF-- +<?php +extension_loaded("exif") or die("skip need exif"); +?> +--FILE-- +<?php +echo "Test\n"; +var_dump(count(exif_read_data(__DIR__."/bug62523_2.jpg"))); +?> +Done +--EXPECT-- +Test +int(76) +Done diff --git a/ext/exif/tests/bug62523_3.jpg b/ext/exif/tests/bug62523_3.jpg new file mode 100644 index 0000000000..3ee91368ce --- /dev/null +++ b/ext/exif/tests/bug62523_3.jpg @@ -0,0 +1,12 @@ +<html>
+ <head><title>Found</title></head>
+ <body>
+ <h1>Found</h1>
+ <p>The resource was found at <a href="http://dl.dropboxusercontent.com/u/7562584/Bugs/Php/bad_exif.jpeg">http://dl.dropboxusercontent.com/u/7562584/Bugs/Php/bad_exif.jpeg</a>;
+you should be redirected automatically.
+
+<!-- --></p>
+ <hr noshade>
+ <div align="right">WSGI Server</div>
+ </body>
+</html>
diff --git a/ext/exif/tests/bug62523_3.phpt b/ext/exif/tests/bug62523_3.phpt new file mode 100644 index 0000000000..6e11354c5a --- /dev/null +++ b/ext/exif/tests/bug62523_3.phpt @@ -0,0 +1,18 @@ +--TEST-- +Bug 62523 (php crashes with segfault when exif_read_data called) +--SKIPIF-- +<?php +extension_loaded("exif") or die("skip need exif"); +?> +--FILE-- +<?php +echo "Test\n"; +var_dump(count(exif_read_data(__DIR__."/bug62523_3.jpg"))); +?> +Done +--EXPECTF-- +Test + +Warning: exif_read_data(bug62523_3.jpg): File not supported in %sbug62523_3.php on line %d +int(1) +Done diff --git a/ext/exif/tests/exif_encoding_crash.jpg b/ext/exif/tests/exif_encoding_crash.jpg Binary files differnew file mode 100644 index 0000000000..55138abe55 --- /dev/null +++ b/ext/exif/tests/exif_encoding_crash.jpg diff --git a/ext/exif/tests/exif_encoding_crash.phpt b/ext/exif/tests/exif_encoding_crash.phpt new file mode 100644 index 0000000000..1c4ad63860 --- /dev/null +++ b/ext/exif/tests/exif_encoding_crash.phpt @@ -0,0 +1,14 @@ +--TEST-- +PHP crash when zend_multibyte_encoding_converter returns (size_t)-1) +--SKIPIF-- +<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?> +--FILE-- +<?php +$infile = dirname(__FILE__).'/exif_encoding_crash.jpg'; +$exif_data = exif_read_data($infile); +echo "*** no core dump ***\n"; +?> +===DONE=== +--EXPECT-- +*** no core dump *** +===DONE=== diff --git a/ext/filter/logical_filters.c b/ext/filter/logical_filters.c index b8df2183b9..39433d6ece 100644 --- a/ext/filter/logical_filters.c +++ b/ext/filter/logical_filters.c @@ -484,10 +484,6 @@ void php_filter_validate_url(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */ } s++; } - - if (*(e - 1) == '.') { - goto bad_url; - } } if ( @@ -718,6 +714,7 @@ void php_filter_validate_ip(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */ if (flags & FILTER_FLAG_NO_RES_RANGE) { if ( (ip[0] == 0) || + (ip[0] == 100 && (ip[1] >= 64 && ip[1] <= 127)) || (ip[0] == 128 && ip[1] == 0) || (ip[0] == 191 && ip[1] == 255) || (ip[0] == 169 && ip[1] == 254) || diff --git a/ext/filter/tests/018.phpt b/ext/filter/tests/018.phpt index af52b2e60d..75bbd13427 100644 --- a/ext/filter/tests/018.phpt +++ b/ext/filter/tests/018.phpt @@ -15,6 +15,8 @@ var_dump(filter_var("192.168.0.1", FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE var_dump(filter_var("192.0.34.166", FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE)); var_dump(filter_var("127.0.0.1", FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE)); var_dump(filter_var("192.0.0.1", FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE)); +var_dump(filter_var("100.64.0.0", FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE)); +var_dump(filter_var("100.127.255.255", FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE)); var_dump(filter_var("192.0.34.166", FILTER_VALIDATE_IP)); var_dump(filter_var("256.1237.123.1", FILTER_VALIDATE_IP)); var_dump(filter_var("255.255.255.255", FILTER_VALIDATE_IP)); @@ -40,6 +42,8 @@ bool(false) string(12) "192.0.34.166" bool(false) string(9) "192.0.0.1" +bool(false) +bool(false) string(12) "192.0.34.166" bool(false) string(15) "255.255.255.255" diff --git a/ext/filter/tests/bug64441.phpt b/ext/filter/tests/bug64441.phpt new file mode 100644 index 0000000000..149079ec05 --- /dev/null +++ b/ext/filter/tests/bug64441.phpt @@ -0,0 +1,11 @@ +--TEST-- +bug 64441, FILTER_VALIDATE_URL will invalidate a hostname that ended by dot +--SKIPIF-- +<?php if (!extension_loaded("filter")) die("skip"); ?> +--FILE-- +<?php +var_dump(filter_var('http://example.com./', FILTER_VALIDATE_URL)); +var_dump(filter_var('http://example.com/', FILTER_VALIDATE_URL)); +--EXPECT-- +string(20) "http://example.com./" +string(19) "http://example.com/" diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index 2c5bc5d7e3..30b3ba6285 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -630,7 +630,7 @@ ftp_alloc(ftpbuf_t *ftp, const long size, char **response) return 0; } - if (response && ftp->inbuf) { + if (response) { *response = estrdup(ftp->inbuf); } @@ -1638,7 +1638,7 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC) if (ftp->resp == 226) { ftp->data = data_close(ftp, data); php_stream_close(tmpstream); - return ecalloc(1, sizeof(char**)); + return ecalloc(1, sizeof(char*)); } /* pull data buffer into tmpfile */ @@ -1666,11 +1666,11 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC) } } - ftp->data = data = data_close(ftp, data); + ftp->data = data_close(ftp, data); php_stream_rewind(tmpstream); - ret = safe_emalloc((lines + 1), sizeof(char**), size * sizeof(char*)); + ret = safe_emalloc((lines + 1), sizeof(char*), size); entry = ret; text = (char*) (ret + lines + 1); diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c index da22e0b63e..21e13ea460 100644 --- a/ext/ftp/php_ftp.c +++ b/ext/ftp/php_ftp.c @@ -968,7 +968,9 @@ PHP_FUNCTION(ftp_nb_get) RETURN_LONG(PHP_FTP_FAILED); } - php_stream_close(outstream); + if (ret == PHP_FTP_FINISHED){ + php_stream_close(outstream); + } RETURN_LONG(ret); } diff --git a/ext/ftp/tests/ftp_nb_continue.phpt b/ext/ftp/tests/ftp_nb_continue.phpt new file mode 100644 index 0000000000..1f70339913 --- /dev/null +++ b/ext/ftp/tests/ftp_nb_continue.phpt @@ -0,0 +1,182 @@ +--TEST-- +Testing whether ftp_nb_continue() fetches more data +--SKIPIF-- +<?php +require 'skipif.inc'; +?> +--FILE-- +<?php +require 'server.inc'; + +$file = "mediumfile.txt"; + +$ftp = ftp_connect('127.0.0.1', $port); +ftp_login($ftp, 'user', 'pass'); +if (!$ftp) die("Couldn't connect to the server"); + +$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . $file; +touch($local_file); + +$r = ftp_nb_get($ftp, $local_file, $file, FTP_BINARY); +while ($r == FTP_MOREDATA) { + $r = ftp_nb_continue($ftp); +} +ftp_close($ftp); + +echo file_get_contents($local_file); +?> +--CLEAN-- +<?php +@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "mediumfile.txt"); +?> +--EXPECT-- +This is line 0 of the test data. +This is line 1 of the test data. +This is line 2 of the test data. +This is line 3 of the test data. +This is line 4 of the test data. +This is line 5 of the test data. +This is line 6 of the test data. +This is line 7 of the test data. +This is line 8 of the test data. +This is line 9 of the test data. +This is line 10 of the test data. +This is line 11 of the test data. +This is line 12 of the test data. +This is line 13 of the test data. +This is line 14 of the test data. +This is line 15 of the test data. +This is line 16 of the test data. +This is line 17 of the test data. +This is line 18 of the test data. +This is line 19 of the test data. +This is line 20 of the test data. +This is line 21 of the test data. +This is line 22 of the test data. +This is line 23 of the test data. +This is line 24 of the test data. +This is line 25 of the test data. +This is line 26 of the test data. +This is line 27 of the test data. +This is line 28 of the test data. +This is line 29 of the test data. +This is line 30 of the test data. +This is line 31 of the test data. +This is line 32 of the test data. +This is line 33 of the test data. +This is line 34 of the test data. +This is line 35 of the test data. +This is line 36 of the test data. +This is line 37 of the test data. +This is line 38 of the test data. +This is line 39 of the test data. +This is line 40 of the test data. +This is line 41 of the test data. +This is line 42 of the test data. +This is line 43 of the test data. +This is line 44 of the test data. +This is line 45 of the test data. +This is line 46 of the test data. +This is line 47 of the test data. +This is line 48 of the test data. +This is line 49 of the test data. +This is line 50 of the test data. +This is line 51 of the test data. +This is line 52 of the test data. +This is line 53 of the test data. +This is line 54 of the test data. +This is line 55 of the test data. +This is line 56 of the test data. +This is line 57 of the test data. +This is line 58 of the test data. +This is line 59 of the test data. +This is line 60 of the test data. +This is line 61 of the test data. +This is line 62 of the test data. +This is line 63 of the test data. +This is line 64 of the test data. +This is line 65 of the test data. +This is line 66 of the test data. +This is line 67 of the test data. +This is line 68 of the test data. +This is line 69 of the test data. +This is line 70 of the test data. +This is line 71 of the test data. +This is line 72 of the test data. +This is line 73 of the test data. +This is line 74 of the test data. +This is line 75 of the test data. +This is line 76 of the test data. +This is line 77 of the test data. +This is line 78 of the test data. +This is line 79 of the test data. +This is line 80 of the test data. +This is line 81 of the test data. +This is line 82 of the test data. +This is line 83 of the test data. +This is line 84 of the test data. +This is line 85 of the test data. +This is line 86 of the test data. +This is line 87 of the test data. +This is line 88 of the test data. +This is line 89 of the test data. +This is line 90 of the test data. +This is line 91 of the test data. +This is line 92 of the test data. +This is line 93 of the test data. +This is line 94 of the test data. +This is line 95 of the test data. +This is line 96 of the test data. +This is line 97 of the test data. +This is line 98 of the test data. +This is line 99 of the test data. +This is line 100 of the test data. +This is line 101 of the test data. +This is line 102 of the test data. +This is line 103 of the test data. +This is line 104 of the test data. +This is line 105 of the test data. +This is line 106 of the test data. +This is line 107 of the test data. +This is line 108 of the test data. +This is line 109 of the test data. +This is line 110 of the test data. +This is line 111 of the test data. +This is line 112 of the test data. +This is line 113 of the test data. +This is line 114 of the test data. +This is line 115 of the test data. +This is line 116 of the test data. +This is line 117 of the test data. +This is line 118 of the test data. +This is line 119 of the test data. +This is line 120 of the test data. +This is line 121 of the test data. +This is line 122 of the test data. +This is line 123 of the test data. +This is line 124 of the test data. +This is line 125 of the test data. +This is line 126 of the test data. +This is line 127 of the test data. +This is line 128 of the test data. +This is line 129 of the test data. +This is line 130 of the test data. +This is line 131 of the test data. +This is line 132 of the test data. +This is line 133 of the test data. +This is line 134 of the test data. +This is line 135 of the test data. +This is line 136 of the test data. +This is line 137 of the test data. +This is line 138 of the test data. +This is line 139 of the test data. +This is line 140 of the test data. +This is line 141 of the test data. +This is line 142 of the test data. +This is line 143 of the test data. +This is line 144 of the test data. +This is line 145 of the test data. +This is line 146 of the test data. +This is line 147 of the test data. +This is line 148 of the test data. +This is line 149 of the test data. diff --git a/ext/ftp/tests/server.inc b/ext/ftp/tests/server.inc index 7dc8fa08d9..bb0c1ff10b 100644 --- a/ext/ftp/tests/server.inc +++ b/ext/ftp/tests/server.inc @@ -368,6 +368,13 @@ if ($pid) { } fputs($s, "226 Closing data Connection.\r\n"); break; + case "mediumfile": + fputs($s, "150 File status okay; about to open data connection.\r\n"); + for($i = 0; $i < 150; $i++){ + fputs($fs, "This is line $i of the test data.\n"); + } + fputs($s, "226 Closing data Connection.\r\n"); + default: fputs($s, "550 {$matches[1]}: No such file or directory \r\n"); break; diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c index e3247a78c1..3643535f2e 100644 --- a/ext/gd/libgd/gd_interpolation.c +++ b/ext/gd/libgd/gd_interpolation.c @@ -1065,6 +1065,7 @@ gdImagePtr gdImageScaleTwoPass(const gdImagePtr src, const unsigned int src_widt if (tmp_im == NULL) { return NULL; } + gdImageSetInterpolationMethod(tmp_im, src->interpolation_id); _gdScaleHoriz(src, src_width, src_height, tmp_im, new_width, src_height); dst = gdImageCreateTrueColor(new_width, new_height); @@ -1072,6 +1073,7 @@ gdImagePtr gdImageScaleTwoPass(const gdImagePtr src, const unsigned int src_widt gdFree(tmp_im); return NULL; } + gdImageSetInterpolationMethod(dst, src->interpolation_id); _gdScaleVert(tmp_im, new_width, src_height, dst, new_width, new_height); gdFree(tmp_im); @@ -1086,8 +1088,9 @@ gdImagePtr Scale(const gdImagePtr src, const unsigned int src_width, const unsig if (tmp_im == NULL) { return NULL; } - _gdScaleHoriz(src, src_width, src_height, tmp_im, new_width, src_height); + gdImageSetInterpolationMethod(tmp_im, src->interpolation_id); + _gdScaleHoriz(src, src_width, src_height, tmp_im, new_width, src_height); _gdScaleVert(tmp_im, new_width, src_height, dst, new_width, new_height); gdFree(tmp_im); diff --git a/ext/gd/php_gd.h b/ext/gd/php_gd.h index 269c315e88..22fac40dd0 100644 --- a/ext/gd/php_gd.h +++ b/ext/gd/php_gd.h @@ -59,7 +59,7 @@ PHPAPI extern const char php_sig_gif[3]; PHPAPI extern const char php_sig_jpg[3]; -PHPAPI extern const char php_sig_png[3]; +PHPAPI extern const char php_sig_png[8]; extern zend_module_entry gd_module_entry; #define phpext_gd_ptr &gd_module_entry diff --git a/ext/imap/config.m4 b/ext/imap/config.m4 index 3efc245901..d664215e66 100644 --- a/ext/imap/config.m4 +++ b/ext/imap/config.m4 @@ -198,9 +198,9 @@ if test "$PHP_IMAP" != "no"; then AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.) fi - if test -r "$IMAP_DIR/c-client/c-client.a"; then + if test ! -r "$IMAP_DIR/c-client/libc-client.a" && test -r "$IMAP_DIR/c-client/c-client.a" ; then ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1 - elif test -r "$IMAP_DIR/$PHP_LIBDIR/c-client.a"; then + elif test ! -r "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" && test -r "$IMAP_DIR/$PHP_LIBDIR/c-client.a"; then ln -s "$IMAP_DIR/$PHP_LIBDIR/c-client.a" "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" >/dev/null 2>&1 fi diff --git a/ext/intl/collator/collator_create.c b/ext/intl/collator/collator_create.c index b2a8c7f6ba..7ed4c53439 100644 --- a/ext/intl/collator/collator_create.c +++ b/ext/intl/collator/collator_create.c @@ -27,7 +27,7 @@ /* {{{ */ static void collator_ctor(INTERNAL_FUNCTION_PARAMETERS) { - char* locale; + const char* locale; int locale_len = 0; zval* object; Collator_object* co; diff --git a/ext/intl/dateformat/dateformat_parse.c b/ext/intl/dateformat/dateformat_parse.c index 4193e89017..9930778546 100644 --- a/ext/intl/dateformat/dateformat_parse.c +++ b/ext/intl/dateformat/dateformat_parse.c @@ -62,7 +62,7 @@ static void internal_parse_to_timestamp(IntlDateFormatter_object *dfo, char* tex } /* }}} */ -static void add_to_localtime_arr( IntlDateFormatter_object *dfo, zval* return_value, UCalendar parsed_calendar, long calendar_field, char* key_name TSRMLS_DC) +static void add_to_localtime_arr( IntlDateFormatter_object *dfo, zval* return_value, const UCalendar *parsed_calendar, long calendar_field, char* key_name TSRMLS_DC) { long calendar_field_val = ucal_get( parsed_calendar, calendar_field, &INTL_DATA_ERROR_CODE(dfo)); INTL_METHOD_CHECK_STATUS( dfo, "Date parsing - localtime failed : could not get a field from calendar" ); @@ -83,7 +83,7 @@ static void add_to_localtime_arr( IntlDateFormatter_object *dfo, zval* return_va */ static void internal_parse_to_localtime(IntlDateFormatter_object *dfo, char* text_to_parse, int32_t text_len, int32_t *parse_pos, zval *return_value TSRMLS_DC) { - UCalendar* parsed_calendar = NULL; + UCalendar *parsed_calendar = NULL; UChar* text_utf16 = NULL; int32_t text_utf16_len = 0; long isInDST = 0; @@ -92,7 +92,7 @@ static void internal_parse_to_localtime(IntlDateFormatter_object *dfo, char* tex intl_convert_utf8_to_utf16(&text_utf16, &text_utf16_len, text_to_parse, text_len, &INTL_DATA_ERROR_CODE(dfo)); INTL_METHOD_CHECK_STATUS(dfo, "Error converting timezone to UTF-16" ); - parsed_calendar = udat_getCalendar(DATE_FORMAT_OBJECT(dfo)); + parsed_calendar = (UCalendar *)udat_getCalendar(DATE_FORMAT_OBJECT(dfo)); udat_parseCalendar( DATE_FORMAT_OBJECT(dfo), parsed_calendar, text_utf16, text_utf16_len, parse_pos, &INTL_DATA_ERROR_CODE(dfo)); if (text_utf16) { diff --git a/ext/intl/formatter/formatter_main.c b/ext/intl/formatter/formatter_main.c index d0671a88b5..0a568472c4 100644 --- a/ext/intl/formatter/formatter_main.c +++ b/ext/intl/formatter/formatter_main.c @@ -27,7 +27,7 @@ /* {{{ */ static void numfmt_ctor(INTERNAL_FUNCTION_PARAMETERS) { - char* locale; + const char* locale; char* pattern = NULL; int locale_len = 0, pattern_len = 0; long style; diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c index d1a86d8ee2..21b5847f2d 100644 --- a/ext/intl/locale/locale_methods.c +++ b/ext/intl/locale/locale_methods.c @@ -121,12 +121,15 @@ static int16_t findOffset(const char* const* list, const char* key) } /*}}}*/ -static char* getPreferredTag(char* gf_tag) +static char* getPreferredTag(const char* gf_tag) { char* result = NULL; int grOffset = 0; grOffset = findOffset( LOC_GRANDFATHERED ,gf_tag); + if(grOffset < 0) { + return NULL; + } if( grOffset < LOC_PREFERRED_GRANDFATHERED_LEN ){ /* return preferred tag */ result = estrdup( LOC_PREFERRED_GRANDFATHERED[grOffset] ); @@ -172,7 +175,7 @@ static int getStrrtokenPos(char* str, int savedPos) * returns -1 if no singleton * strtok equivalent search for singleton */ -static int getSingletonPos(char* str) +static int getSingletonPos(const char* str) { int result =-1; int i=0; @@ -248,7 +251,7 @@ PHP_NAMED_FUNCTION(zif_locale_set_default) * common code shared by get_primary_language,get_script or get_region or get_variant * result = 0 if error, 1 if successful , -1 if no value */ -static char* get_icu_value_internal( char* loc_name , char* tag_name, int* result , int fromParseLocale) +static char* get_icu_value_internal( const char* loc_name , char* tag_name, int* result , int fromParseLocale) { char* tag_value = NULL; int32_t tag_value_len = 512; @@ -278,7 +281,7 @@ static char* get_icu_value_internal( char* loc_name , char* tag_name, int* resul /* Handle singletons */ if( strcmp(tag_name , LOC_LANG_TAG)==0 ){ if( strlen(loc_name)>1 && (isIDPrefix(loc_name) ==1 ) ){ - return loc_name; + return (char *)loc_name; } } @@ -367,7 +370,7 @@ static char* get_icu_value_internal( char* loc_name , char* tag_name, int* resul static void get_icu_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAMETERS) { - char* loc_name = NULL; + const char* loc_name = NULL; int loc_name_len = 0; char* tag_value = NULL; @@ -462,10 +465,10 @@ PHP_FUNCTION(locale_get_primary_language ) }}} */ static void get_icu_disp_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAMETERS) { - char* loc_name = NULL; + const char* loc_name = NULL; int loc_name_len = 0; - char* disp_loc_name = NULL; + const char* disp_loc_name = NULL; int disp_loc_name_len = 0; int free_loc_name = 0; @@ -558,7 +561,7 @@ static void get_icu_disp_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAME efree( mod_loc_name ); } if (free_loc_name) { - efree(disp_loc_name); + efree((void *)disp_loc_name); disp_loc_name = NULL; } RETURN_FALSE; @@ -569,7 +572,7 @@ static void get_icu_disp_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAME efree( mod_loc_name ); } if (free_loc_name) { - efree(disp_loc_name); + efree((void *)disp_loc_name); disp_loc_name = NULL; } /* Convert display locale name from UTF-16 to UTF-8. */ @@ -663,10 +666,10 @@ PHP_FUNCTION( locale_get_keywords ) UEnumeration* e = NULL; UErrorCode status = U_ZERO_ERROR; - const char* kw_key = NULL; + const char* kw_key = NULL; int32_t kw_key_len = 0; - char* loc_name = NULL; + const char* loc_name = NULL; int loc_name_len = 0; /* @@ -713,7 +716,7 @@ PHP_FUNCTION( locale_get_keywords ) kw_value = erealloc( kw_value , kw_value_len+1); } if (U_FAILURE(status)) { - intl_error_set( NULL, FAILURE, "locale_get_keywords: Error encountered while getting the keyword value for the keyword", 0 TSRMLS_CC ); + intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "locale_get_keywords: Error encountered while getting the keyword value for the keyword", 0 TSRMLS_CC ); if( kw_value){ efree( kw_value ); } @@ -971,12 +974,12 @@ PHP_FUNCTION(locale_compose) * e.g. for locale='en_US-x-prv1-prv2-prv3' * returns a pointer to the string 'prv1-prv2-prv3' */ -static char* get_private_subtags(char* loc_name) +static char* get_private_subtags(const char* loc_name) { char* result =NULL; int singletonPos = 0; int len =0; - char* mod_loc_name =NULL; + const char* mod_loc_name =NULL; if( loc_name && (len = strlen(loc_name)>0 ) ){ mod_loc_name = loc_name ; @@ -1016,7 +1019,7 @@ static char* get_private_subtags(char* loc_name) /* {{{ code used by locale_parse */ -static int add_array_entry(char* loc_name, zval* hash_arr, char* key_name TSRMLS_DC) +static int add_array_entry(const char* loc_name, zval* hash_arr, char* key_name TSRMLS_DC) { char* key_value = NULL; char* cur_key_name = NULL; @@ -1081,7 +1084,7 @@ static int add_array_entry(char* loc_name, zval* hash_arr, char* key_name TSRMLS */ PHP_FUNCTION(locale_parse) { - char* loc_name = NULL; + const char* loc_name = NULL; int loc_name_len = 0; int grOffset = 0; @@ -1125,8 +1128,8 @@ PHP_FUNCTION(locale_parse) */ PHP_FUNCTION(locale_get_all_variants) { - char* loc_name = NULL; - int loc_name_len = 0; + const char* loc_name = NULL; + int loc_name_len = 0; int result = 0; char* token = NULL; @@ -1179,10 +1182,10 @@ PHP_FUNCTION(locale_get_all_variants) /*{{{ * Converts to lower case and also replaces all hyphens with the underscore */ -static int strToMatch(char* str ,char *retstr) +static int strToMatch(const char* str ,char *retstr) { char* anchor = NULL; - char* anchor1 = NULL; + const char* anchor1 = NULL; int result = 0; int len = 0; @@ -1222,7 +1225,7 @@ PHP_FUNCTION(locale_filter_matches) { char* lang_tag = NULL; int lang_tag_len = 0; - char* loc_range = NULL; + const char* loc_range = NULL; int loc_range_len = 0; int result = 0; @@ -1398,7 +1401,7 @@ static void array_cleanup( char* arr[] , int arr_size) * returns the lookup result to lookup_loc_range_src_php * internal function */ -static char* lookup_loc_range(char* loc_range, HashTable* hash_arr, int canonicalize TSRMLS_DC) +static char* lookup_loc_range(const char* loc_range, HashTable* hash_arr, int canonicalize TSRMLS_DC) { int i = 0; int cur_arr_len = 0; @@ -1520,7 +1523,7 @@ PHP_FUNCTION(locale_lookup) { char* fallback_loc = NULL; int fallback_loc_len = 0; - char* loc_range = NULL; + const char* loc_range = NULL; int loc_range_len = 0; zval* arr = NULL; diff --git a/ext/intl/msgformat/msgformat.c b/ext/intl/msgformat/msgformat.c index 6a9f04f32b..7d8cd958e3 100644 --- a/ext/intl/msgformat/msgformat.c +++ b/ext/intl/msgformat/msgformat.c @@ -28,7 +28,7 @@ /* {{{ */ static void msgfmt_ctor(INTERNAL_FUNCTION_PARAMETERS) { - char* locale; + const char* locale; char* pattern; int locale_len = 0, pattern_len = 0; UChar* spattern = NULL; diff --git a/ext/intl/msgformat/msgformat_format.c b/ext/intl/msgformat/msgformat_format.c index 4b81cfe2b4..55ec9e84ba 100644 --- a/ext/intl/msgformat/msgformat_format.c +++ b/ext/intl/msgformat/msgformat_format.c @@ -103,7 +103,7 @@ PHP_FUNCTION( msgfmt_format_message ) int spattern_len = 0; char *pattern = NULL; int pattern_len = 0; - char *slocale = NULL; + const char *slocale = NULL; int slocale_len = 0; MessageFormatter_object mf = {0}; MessageFormatter_object *mfo = &mf; diff --git a/ext/intl/msgformat/msgformat_helpers.cpp b/ext/intl/msgformat/msgformat_helpers.cpp index c4456d54f3..f75fd91dce 100644 --- a/ext/intl/msgformat/msgformat_helpers.cpp +++ b/ext/intl/msgformat/msgformat_helpers.cpp @@ -209,6 +209,9 @@ static HashTable *umsg_parse_format(MessageFormatter_object *mfo, continue; } } + } else { + intl_errors_set(&err, U_INVALID_FORMAT_ERROR, "Invalid part type encountered", 0 TSRMLS_CC); + continue; } UMessagePatternArgType argType = p.getArgType(); diff --git a/ext/intl/msgformat/msgformat_parse.c b/ext/intl/msgformat/msgformat_parse.c index 413d3b1f15..14a6363424 100644 --- a/ext/intl/msgformat/msgformat_parse.c +++ b/ext/intl/msgformat/msgformat_parse.c @@ -93,7 +93,7 @@ PHP_FUNCTION( msgfmt_parse_message ) int spattern_len = 0; char *pattern = NULL; int pattern_len = 0; - char *slocale = NULL; + const char *slocale = NULL; int slocale_len = 0; char *source = NULL; int src_len = 0; diff --git a/ext/intl/resourcebundle/resourcebundle.c b/ext/intl/resourcebundle/resourcebundle.c index 6d39dfb7e0..f5475faf1c 100644 --- a/ext/intl/resourcebundle/resourcebundle.c +++ b/ext/intl/resourcebundle/resourcebundle.c @@ -41,7 +41,7 @@ void resourcebundle_extract_value( zval *return_value, ResourceBundle_object *so case URES_STRING: ufield = ures_getString( source->child, &ilen, &INTL_DATA_ERROR_CODE(source) ); INTL_METHOD_CHECK_STATUS(source, "Failed to retrieve string value"); - INTL_METHOD_RETVAL_UTF8(source, ufield, ilen, 0); + INTL_METHOD_RETVAL_UTF8(source, (UChar *)ufield, ilen, 0); break; case URES_BINARY: diff --git a/ext/intl/tests/bug58756_MessageFormatter.phpt b/ext/intl/tests/bug58756_MessageFormatter.phpt index bbe96b7045..18566b666c 100644 --- a/ext/intl/tests/bug58756_MessageFormatter.phpt +++ b/ext/intl/tests/bug58756_MessageFormatter.phpt @@ -4,6 +4,9 @@ Bug #58756: w.r.t MessageFormatter <?php if (!extension_loaded('intl')) die('skip intl extension not enabled'); +if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) + die('skip for ICU < 51.2'); +?> --FILE-- <?php ini_set("intl.error_level", E_WARNING); @@ -31,4 +34,4 @@ echo "msgf2: ", $msgf->format(array($time, 'date')), " ", --EXPECT-- date: Tuesday, July 7, 2009 8:41:13 PM EDT msgf: Tuesday, July 7, 2009 8:41:13 PM EDT -==DONE==
\ No newline at end of file +==DONE== diff --git a/ext/intl/tests/bug58756_MessageFormatter_variant2.phpt b/ext/intl/tests/bug58756_MessageFormatter_variant2.phpt new file mode 100644 index 0000000000..4fcfdbc08c --- /dev/null +++ b/ext/intl/tests/bug58756_MessageFormatter_variant2.phpt @@ -0,0 +1,37 @@ +--TEST-- +Bug #58756: w.r.t MessageFormatter +--SKIPIF-- +<?php +if (!extension_loaded('intl')) + die('skip intl extension not enabled'); +if (version_compare(INTL_ICU_VERSION, '51.2') < 0) + die('skip for ICU >= 51.2'); +?> +--FILE-- +<?php +ini_set("intl.error_level", E_WARNING); +//ini_set("intl.default_locale", "nl"); + +$time = 1247013673; + +ini_set('date.timezone', 'America/New_York'); + +$msgf = new MessageFormatter('en_US', '{0,date,full} {0,time,h:m:s a V}'); + +echo "date: " . date('l, F j, Y g:i:s A T', $time) . "\n"; +echo "msgf: " . $msgf->format(array($time)) . "\n"; + +//NOT FIXED: +/*$msgf = new MessageFormatter('en_US', +'{1, select, date {{0,date,full}} other {{0,time,h:m:s a V}}}'); + +echo "msgf2: ", $msgf->format(array($time, 'date')), " ", + $msgf->format(array($time, 'time')), "\n"; +*/ + +?> +==DONE== +--EXPECT-- +date: Tuesday, July 7, 2009 8:41:13 PM EDT +msgf: Tuesday, July 7, 2009 8:41:13 PM usnyc +==DONE== diff --git a/ext/intl/tests/collator_asort.phpt b/ext/intl/tests/collator_asort.phpt index a614ddc3f8..308f3a3ca3 100644 --- a/ext/intl/tests/collator_asort.phpt +++ b/ext/intl/tests/collator_asort.phpt @@ -2,6 +2,7 @@ asort() --SKIPIF-- <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> --FILE-- <?php diff --git a/ext/intl/tests/collator_asort_variant2.phpt b/ext/intl/tests/collator_asort_variant2.phpt new file mode 100644 index 0000000000..f9dff13608 --- /dev/null +++ b/ext/intl/tests/collator_asort_variant2.phpt @@ -0,0 +1,243 @@ +--TEST-- +asort() +--SKIPIF-- +<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?> +--FILE-- +<?php + +/* + * Sort associative arrays using various locales. + */ + + +$test_num = 1; + +/* + * Sort various arrays in specified locale. + */ +function sort_arrays( $locale, $test_arrays, $sort_flag = Collator::SORT_REGULAR ) +{ + $res_str = ''; + + $coll = ut_coll_create( $locale ); + + foreach( $test_arrays as $test_array ) + { + // Try to sort test data. + $res_val = ut_coll_asort( $coll, $test_array, $sort_flag ); + + // Return output data. + $res_dump = "\n" . dump( $test_array ) . + "\n Result: " . dump( $res_val ); + + // Preppend test signature to output string + $md5 = md5( $res_dump ); + + global $test_num; + + $res_str .= "\n\n". + "Test $test_num.$md5:" . + $res_dump; + ++$test_num; + } + + return $res_str; +} + +/* + * Test main function. + */ +function ut_main() +{ + global $test_num; + $test_num = 1; + $res_str = ''; + + // Sort an array in SORT_REGULAR mode using en_US locale. + $test_params = array( + array( 'd' => 'y' , + 'c' => 'i' , + 'a' => 'k' ), + + array( 'a' => 'a' , + 'b' => 'aaa', + 'c' => 'aa' ), + + array( 'a' => 'a' , + 'aaa'=> 'a' , + 'aa' => 'a' ), + + array( '1' => 'abc', + '5' => '!' , + '2' => null , + '7' => '' ), + + array( '1' => '100', + '2' => '25' , + '3' => '36' ), + + array( '1' => 5 , + '2' => '30' , + '3' => 2 ) + ); + + $res_str .= sort_arrays( 'en_US', $test_params ); + + // Sort an array in SORT_STRING mode using en_US locale. + $test_params = array( + array( '1' => '100', + '2' => '25' , + '3' => '36' ), + + array( '1' => 5 , + '2' => '30' , + '3' => 2 ), + + array( '1' => 'd' , + '2' => '' , + '3' => ' a' ), + + array( '1' => 'y' , + '2' => 'k' , + '3' => 'i' ) + ); + + $res_str .= sort_arrays( 'en_US', $test_params, Collator::SORT_STRING ); + + // Sort a non-ASCII array using ru_RU locale. + $test_params = array( + array( 'п' => 'у', + 'б' => 'в', + 'е' => 'а' ), + + array( '1' => 'п', + '4' => '', + '7' => 'd', + '2' => 'пп' ) + ); + + $res_str .= sort_arrays( 'ru_RU', $test_params ); + + + // Sort an array using Lithuanian locale. + $test_params = array( + array( 'd' => 'y', + 'c' => 'i', + 'a' => 'k' ) + ); + + $res_str .= sort_arrays( 'lt_LT', $test_params ); + + return $res_str . "\n"; +} + +include_once( 'ut_common.inc' ); +ut_run(); +?> +--EXPECT-- +Test 1.162b81ac12878b817fc39063097e45b5: +array ( + 'c' => 'i', + 'a' => 'k', + 'd' => 'y', +) + Result: true + +Test 2.93d96e22f692d8a281b0a389f01f8d1e: +array ( + 'a' => 'a', + 'c' => 'aa', + 'b' => 'aaa', +) + Result: true + +Test 3.9f25de4482bc7b58de508e278113317c: +array ( + 'aa' => 'a', + 'aaa' => 'a', + 'a' => 'a', +) + Result: true + +Test 4.a85a41ea78e45b651080cfd98c0b431d: +array ( + 7 => '', + 2 => NULL, + 5 => '!', + 1 => 'abc', +) + Result: true + +Test 5.99dc71f405b286e03d489061b36e6900: +array ( + 2 => '25', + 3 => '36', + 1 => '100', +) + Result: true + +Test 6.bf5bba243307c9d12934e756ad4be190: +array ( + 3 => 2, + 1 => 5, + 2 => '30', +) + Result: true + +Test 7.e4ee7024c61476e9e7a6c28b5e47df6f: +array ( + 1 => '100', + 2 => '25', + 3 => '36', +) + Result: true + +Test 8.5fa7033dd43784be0db1474eb48b83c8: +array ( + 3 => 2, + 2 => '30', + 1 => 5, +) + Result: true + +Test 9.588cdf4692bc09aa92ffe7e48f9e4579: +array ( + 2 => '', + 3 => ' a', + 1 => 'd', +) + Result: true + +Test 10.be02641a47ebcccd23e4183ca3a415f7: +array ( + 3 => 'i', + 2 => 'k', + 1 => 'y', +) + Result: true + +Test 11.153d9b11d1e5936afc917a94a4e11f34: +array ( + 'е' => 'а', + 'б' => 'в', + 'п' => 'у', +) + Result: true + +Test 12.e1f5cb037b564dce39ffbd0a61562d59: +array ( + 4 => '', + 1 => 'п', + 2 => 'пп', + 7 => 'd', +) + Result: true + +Test 13.8800d48abb960a59002eef77f1d73ae0: +array ( + 'c' => 'i', + 'd' => 'y', + 'a' => 'k', +) + Result: true diff --git a/ext/intl/tests/collator_compare.phpt b/ext/intl/tests/collator_compare.phpt index f10b5708f4..7c07204b70 100644 --- a/ext/intl/tests/collator_compare.phpt +++ b/ext/intl/tests/collator_compare.phpt @@ -2,6 +2,7 @@ compare() --SKIPIF-- <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> --FILE-- <?php diff --git a/ext/intl/tests/collator_compare_variant2.phpt b/ext/intl/tests/collator_compare_variant2.phpt new file mode 100644 index 0000000000..15c725bc4f --- /dev/null +++ b/ext/intl/tests/collator_compare_variant2.phpt @@ -0,0 +1,135 @@ +--TEST-- +compare() +--SKIPIF-- +<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?> +--FILE-- +<?php + +/* + * Compare various string pairs using various locales. + */ + + +/* + * Converts comparison result to a character. + */ +function cmp_to_char( $comp_res ) +{ + switch( $comp_res ) + { + case 0: // UCOL_EQUAL + return '='; + case 1: // UCOL_GREATER + return '>'; + case -1: // UCOL_LESS + return '<'; + default: + return '?'; + } +} + +/* + * Compare string pairs in the given array + * using specified locale. + */ +function compare_pairs( $locale, $test_array ) +{ + $res_str = ''; + + $coll = ut_coll_create( $locale ); + + foreach( $test_array as $test_strings ) + { + list( $str1, $str2 ) = $test_strings; + + // Compare strings. + $res_val = cmp_to_char( ut_coll_compare( $coll, $str1, $str2 ) ); + + // Concatenate result strings. + $res_str .= dump( $str1 ) . + ' ' . $res_val . ' ' . + dump( $str2 ) . "\n"; + } + + return $res_str; + +} + +function ut_main() +{ + $res_str = ''; + + // Compare strings using en_US locale. + $test_params = array( + array( 'abc', 'abc' ), + array( 'Abc', 'abc' ), + array( 'a' , 'abc' ), + array( 'a' , '' ), + array( '' , '' ), + array( 'a' , 'b' ), + array( 'ab' , 'b' ), + array( 'ab' , 'a' ), + array( 123 , 'abc' ), + array( 'ac' , null ), + array( '.' , '.' ), + // Try to compare long strings. + array( 'abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcde', + 'abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdea'), + array( null , null ) + ); + + $res_str .= compare_pairs( 'en_US', $test_params ); + + + // Compare strings using ru_RU locale. + $test_params = array( + array( 'а', 'б' ), + array( 'а', 'аа' ), + array( 'аб', 'ба' ), + array( 'а', ',' ), + array( 'а', 'b' ), + array( 'а', 'bb' ), + array( 'а', 'ab' ), + array( 'а', null ) + ); + + $res_str .= compare_pairs( 'ru_RU', $test_params ); + + + // Compare strings using lt_LT locale. + $test_params = array( + array( 'y', 'k' ) + ); + + $res_str .= compare_pairs( 'lt_LT', $test_params ); + + return $res_str; +} + +include_once( 'ut_common.inc' ); +ut_run(); +?> +--EXPECT-- +'abc' = 'abc' +'Abc' > 'abc' +'a' < 'abc' +'a' > '' +'' = '' +'a' < 'b' +'ab' < 'b' +'ab' > 'a' +123 < 'abc' +'ac' > NULL +'.' = '.' +'abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcde' < 'abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdea' +NULL = NULL +'а' < 'б' +'а' < 'аа' +'аб' < 'ба' +'а' > ',' +'а' < 'b' +'а' < 'bb' +'а' < 'ab' +'а' > NULL +'y' < 'k' diff --git a/ext/intl/tests/collator_get_sort_key.phpt b/ext/intl/tests/collator_get_sort_key.phpt index a9c4d71348..58240d426c 100644 --- a/ext/intl/tests/collator_get_sort_key.phpt +++ b/ext/intl/tests/collator_get_sort_key.phpt @@ -3,6 +3,8 @@ collator_get_sort_key() --SKIPIF-- <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> <?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip ICU >= 4.8 only'; ?> +<?php /* XXX Obviously it fails somewhere between >= 4.8 and < 51.2 */ +if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> --FILE-- <?php @@ -95,4 +97,4 @@ key: 5c0a161801070107 source: жжж key: 5c3a3a3a01070107 source: эюя -key: 5d3b3f4501070107
\ No newline at end of file +key: 5d3b3f4501070107 diff --git a/ext/intl/tests/collator_get_sort_key_variant2.phpt b/ext/intl/tests/collator_get_sort_key_variant2.phpt new file mode 100644 index 0000000000..bb09256d6b --- /dev/null +++ b/ext/intl/tests/collator_get_sort_key_variant2.phpt @@ -0,0 +1,98 @@ +--TEST-- +collator_get_sort_key() +--SKIPIF-- +<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?> +--FILE-- +<?php + +/* + * Get sort keys using various locales + */ +function sort_arrays( $locale, $data ) +{ + $res_str = ''; + + $coll = ut_coll_create( $locale ); + + foreach($data as $value) { + $res_val = ut_coll_get_sort_key( $coll, $value ); + $res_str .= "source: ".$value."\n". + "key: ".bin2hex($res_val)."\n"; + } + + return $res_str; +} + + +function ut_main() +{ + $res_str = ''; + + // Regular strings keys + $test_params = array( + 'abc', 'abd', 'aaa', + 'аа', 'а', 'z', + '', null , '3', + 'y' , 'i' , 'k' + ); + + $res_str .= sort_arrays( 'en_US', $test_params ); + + // Sort a non-ASCII array using ru_RU locale. + $test_params = array( + 'абг', 'абв', 'жжж', 'эюя' + ); + + $res_str .= sort_arrays( 'ru_RU', $test_params ); + + // Sort an array using Lithuanian locale. + $res_str .= sort_arrays( 'lt_LT', $test_params ); + + return $res_str . "\n"; +} + +include_once( 'ut_common.inc' ); +ut_run(); +?> +--EXPECT-- +source: abc +key: 27292b01070107 +source: abd +key: 27292d01070107 +source: aaa +key: 27272701070107 +source: аа +key: 5c0a0a01060106 +source: а +key: 5c0a01050105 +source: z +key: 5901050105 +source: +key: 0101 +source: +key: 0101 +source: 3 +key: 1801050105 +source: y +key: 5701050105 +source: i +key: 3701050105 +source: k +key: 3b01050105 +source: абг +key: 260a161a01070107 +source: абв +key: 260a161801070107 +source: жжж +key: 263a3a3a01070107 +source: эюя +key: 273b3f4501070107 +source: абг +key: 5c0a161a01070107 +source: абв +key: 5c0a161801070107 +source: жжж +key: 5c3a3a3a01070107 +source: эюя +key: 5d3b3f4501070107 diff --git a/ext/intl/tests/collator_sort.phpt b/ext/intl/tests/collator_sort.phpt index 5cefe2fd7c..e16eeea1e8 100644 --- a/ext/intl/tests/collator_sort.phpt +++ b/ext/intl/tests/collator_sort.phpt @@ -2,6 +2,7 @@ sort() --SKIPIF-- <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> --FILE-- <?php diff --git a/ext/intl/tests/collator_sort_variant2.phpt b/ext/intl/tests/collator_sort_variant2.phpt new file mode 100644 index 0000000000..29a5082fda --- /dev/null +++ b/ext/intl/tests/collator_sort_variant2.phpt @@ -0,0 +1,248 @@ +--TEST-- +sort() +--SKIPIF-- +<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?> +--FILE-- +<?php + +/* + * Sort arrays using various locales. + */ + + +$test_num = 1; + +/* + * Sort arrays in the given list using specified locale. + */ +function sort_arrays( $locale, $arrays, $sort_flag = Collator::SORT_REGULAR ) +{ + $res_str = ''; + + $coll = ut_coll_create( $locale ); + + foreach( $arrays as $array ) + { + // Sort array values + $res_val = ut_coll_sort( $coll, $array, $sort_flag ); + + // Concatenate the sorted array and function result + // with output string. + $res_dump = "\n" . dump( $array ) . + "\n Result: " . dump( $res_val ); + + // Preppend test signature to output string + $md5 = md5( $res_dump ); + + global $test_num; + + $res_str .= "\n\n". + "Test $test_num.$md5:" . + $res_dump; + ++$test_num; + } + + return $res_str; +} + +function ut_main() +{ + global $test_num; + $test_num = 1; + $res_str = ''; + + // Sort an array in SORT_REGULAR mode using en_US locale. + $test_params = array( + array( 'abc', 'abd', 'aaa' ), + array( 'm' , '1' , '_' ), + array( 'a' , 'aaa', 'aa' ), + array( 'ba' , 'b' , 'ab' ), + array( 'e' , 'c' , 'a' ), + array( '100', '25' , '36' ), + array( 5 , '30' , 2 ), + array( 'd' , '' , ' a' ), + array( 'd ' , 'f ' , ' a' ), + array( 'a' , null , '3' ), + array( 'y' , 'k' , 'i' ) + ); + + $res_str .= sort_arrays( 'en_US', $test_params ); + + $test_params = array( + array( '100', '25' , '36' ), + array( 5 , '30' , 2 ), + array( 'd' , '' , ' a' ), + array( 'y' , 'k' , 'i' ) + ); + + // Sort in en_US locale with SORT_STRING flag + $res_str .= sort_arrays( 'en_US', $test_params, Collator::SORT_STRING ); + + + // Sort a non-ASCII array using ru_RU locale. + $test_params = array( + array( 'абг', 'абв', 'ааа', 'abc' ), + array( 'аа', 'ааа' , 'а' ) + ); + + $res_str .= sort_arrays( 'ru_RU', $test_params ); + + // Sort an array using Lithuanian locale. + $test_params = array( + array( 'y' , 'k' , 'i' ) + ); + + $res_str .= sort_arrays( 'lt_LT', $test_params ); + + return $res_str; +} + +include_once( 'ut_common.inc' ); +ut_run(); +?> +--EXPECT-- +Test 1.e8f1cd28133d79ecd660002f1c660d0e: +array ( + 0 => 'aaa', + 1 => 'abc', + 2 => 'abd', +) + Result: true + +Test 2.c2ded12173dd2996927378cae37eb275: +array ( + 0 => '_', + 1 => '1', + 2 => 'm', +) + Result: true + +Test 3.54071c968d71cb98c5d379145f8d7d38: +array ( + 0 => 'a', + 1 => 'aa', + 2 => 'aaa', +) + Result: true + +Test 4.19abe63d6f6dfef65b0e3c9ab4826b07: +array ( + 0 => 'ab', + 1 => 'b', + 2 => 'ba', +) + Result: true + +Test 5.9a8dc0a9bc771368c2f1fc3d02754610: +array ( + 0 => 'a', + 1 => 'c', + 2 => 'e', +) + Result: true + +Test 6.ab530b060e5e54a65bfb8b9f8fc61870: +array ( + 0 => '25', + 1 => '36', + 2 => '100', +) + Result: true + +Test 7.0718dd838509017bded2ed307a6e785f: +array ( + 0 => 2, + 1 => 5, + 2 => '30', +) + Result: true + +Test 8.923d65739c5219c634616ffd100a50e4: +array ( + 0 => '', + 1 => ' a', + 2 => 'd', +) + Result: true + +Test 9.289bc2f28e87d3201ec9d7e8477ae1b0: +array ( + 0 => ' a', + 1 => 'd ', + 2 => 'f ', +) + Result: true + +Test 10.de0fd958484f2377a645835d7fbcf124: +array ( + 0 => NULL, + 1 => '3', + 2 => 'a', +) + Result: true + +Test 11.dd2b8f0adb37c45d528cad1a0cc0f361: +array ( + 0 => 'i', + 1 => 'k', + 2 => 'y', +) + Result: true + +Test 12.1e6b4d6f7df9d4580317634ea46d8208: +array ( + 0 => '100', + 1 => '25', + 2 => '36', +) + Result: true + +Test 13.cec115dc9850b98dfbdf102efa09e61b: +array ( + 0 => 2, + 1 => '30', + 2 => 5, +) + Result: true + +Test 14.923d65739c5219c634616ffd100a50e4: +array ( + 0 => '', + 1 => ' a', + 2 => 'd', +) + Result: true + +Test 15.dd2b8f0adb37c45d528cad1a0cc0f361: +array ( + 0 => 'i', + 1 => 'k', + 2 => 'y', +) + Result: true + +Test 16.49056308afb2b800363c5baa735ed247: +array ( + 0 => 'ааа', + 1 => 'абв', + 2 => 'абг', + 3 => 'abc', +) + Result: true + +Test 17.91480b10473a0c96a4cd6d88c23c577a: +array ( + 0 => 'а', + 1 => 'аа', + 2 => 'ааа', +) + Result: true + +Test 18.fdd3fe3981476039164aa000bf9177f2: +array ( + 0 => 'i', + 1 => 'y', + 2 => 'k', +) + Result: true diff --git a/ext/intl/tests/collator_sort_with_sort_keys.phpt b/ext/intl/tests/collator_sort_with_sort_keys.phpt index 2f489d745c..8be9c97789 100644 --- a/ext/intl/tests/collator_sort_with_sort_keys.phpt +++ b/ext/intl/tests/collator_sort_with_sort_keys.phpt @@ -2,6 +2,7 @@ sort_with_sort_keys() --SKIPIF-- <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> --FILE-- <?php diff --git a/ext/intl/tests/collator_sort_with_sort_keys_variant2.phpt b/ext/intl/tests/collator_sort_with_sort_keys_variant2.phpt new file mode 100644 index 0000000000..5257f8a6ff --- /dev/null +++ b/ext/intl/tests/collator_sort_with_sort_keys_variant2.phpt @@ -0,0 +1,190 @@ +--TEST-- +sort_with_sort_keys() +--SKIPIF-- +<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?> +--FILE-- +<?php + +/* + * Sort arrays using various locales. + */ + + +$test_num = 1; + +/* + * Sort arrays in the given list using specified locale. + */ +function sort_arrays( $locale, $arrays ) +{ + $res_str = ''; + + $coll = ut_coll_create( $locale ); + + foreach( $arrays as $array ) + { + // Sort array values + $res_val = ut_coll_sort_with_sort_keys( $coll, $array ); + + // Concatenate the sorted array and function result + // with output string. + $res_dump = "\n" . dump( $array ) . + "\n Result: " . dump( $res_val ); + + + // Preppend test signature to output string + $md5 = md5( $res_dump ); + + global $test_num; + + $res_str .= "\n\n". + "Test $test_num.$md5:" . + $res_dump; + ++$test_num; + } + + return $res_str; +} + + +function ut_main() +{ + global $test_num; + $test_num = 1; + $res_str = ''; + + // Sort an array in SORT_REGULAR mode using en_US locale. + $test_params = array( + array( 'abc', 'abd', 'aaa' ), + array( 'm' , '1' , '_' ), + array( 'a' , 'aaa', 'aa' ), + array( 'ba' , 'b' , 'ab' ), + array( 'e' , 'c' , 'a' ), + array( 'd' , '' , ' a' ), + array( 'd ' , 'f ' , ' a' ), + array( 'a' , null , '3' ), + array( 'y' , 'i' , 'k' ) + ); + + $res_str .= sort_arrays( 'en_US', $test_params ); + + // Sort a non-ASCII array using ru_RU locale. + $test_params = array( + array( 'абг', 'абв', 'ааа', 'abc' ), + array( 'аа', 'ааа', 'а' ) + ); + + $res_str .= sort_arrays( 'ru_RU', $test_params ); + + // Array with data for sorting. + $test_params = array( + array( 'y' , 'i' , 'k' ) + ); + + // Sort an array using Lithuanian locale. + $res_str .= sort_arrays( 'lt_LT', $test_params ); + + return $res_str . "\n"; +} + +include_once( 'ut_common.inc' ); +ut_run(); +?> +--EXPECT-- +Test 1.e8f1cd28133d79ecd660002f1c660d0e: +array ( + 0 => 'aaa', + 1 => 'abc', + 2 => 'abd', +) + Result: true + +Test 2.c2ded12173dd2996927378cae37eb275: +array ( + 0 => '_', + 1 => '1', + 2 => 'm', +) + Result: true + +Test 3.54071c968d71cb98c5d379145f8d7d38: +array ( + 0 => 'a', + 1 => 'aa', + 2 => 'aaa', +) + Result: true + +Test 4.19abe63d6f6dfef65b0e3c9ab4826b07: +array ( + 0 => 'ab', + 1 => 'b', + 2 => 'ba', +) + Result: true + +Test 5.9a8dc0a9bc771368c2f1fc3d02754610: +array ( + 0 => 'a', + 1 => 'c', + 2 => 'e', +) + Result: true + +Test 6.923d65739c5219c634616ffd100a50e4: +array ( + 0 => '', + 1 => ' a', + 2 => 'd', +) + Result: true + +Test 7.289bc2f28e87d3201ec9d7e8477ae1b0: +array ( + 0 => ' a', + 1 => 'd ', + 2 => 'f ', +) + Result: true + +Test 8.de0fd958484f2377a645835d7fbcf124: +array ( + 0 => NULL, + 1 => '3', + 2 => 'a', +) + Result: true + +Test 9.dd2b8f0adb37c45d528cad1a0cc0f361: +array ( + 0 => 'i', + 1 => 'k', + 2 => 'y', +) + Result: true + +Test 10.49056308afb2b800363c5baa735ed247: +array ( + 0 => 'ааа', + 1 => 'абв', + 2 => 'абг', + 3 => 'abc', +) + Result: true + +Test 11.91480b10473a0c96a4cd6d88c23c577a: +array ( + 0 => 'а', + 1 => 'аа', + 2 => 'ааа', +) + Result: true + +Test 12.fdd3fe3981476039164aa000bf9177f2: +array ( + 0 => 'i', + 1 => 'y', + 2 => 'k', +) + Result: true diff --git a/ext/intl/tests/dateformat_calendars.phpt b/ext/intl/tests/dateformat_calendars.phpt index 6af02e51c1..2239af28df 100644 --- a/ext/intl/tests/dateformat_calendars.phpt +++ b/ext/intl/tests/dateformat_calendars.phpt @@ -4,8 +4,8 @@ IntlDateFormatter, calendars and time zone date.timezone=Atlantic/Azores --SKIPIF-- <?php -if (!extension_loaded('intl')) - die('skip intl extension not enabled'); +if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> --FILE-- <?php ini_set("intl.error_level", E_WARNING); diff --git a/ext/intl/tests/dateformat_calendars_variant2.phpt b/ext/intl/tests/dateformat_calendars_variant2.phpt new file mode 100644 index 0000000000..61cdea8408 --- /dev/null +++ b/ext/intl/tests/dateformat_calendars_variant2.phpt @@ -0,0 +1,45 @@ +--TEST-- +IntlDateFormatter, calendars and time zone +--INI-- +date.timezone=Atlantic/Azores +--SKIPIF-- +<?php +if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?> +--FILE-- +<?php +ini_set("intl.error_level", E_WARNING); + +$fmt1 = new IntlDateFormatter('en_US', + IntlDateFormatter::FULL, + IntlDateFormatter::FULL, + 'GMT+05:12', + IntlDateFormatter::TRADITIONAL); +$fmt2 = new IntlDateFormatter('en_US', + IntlDateFormatter::FULL, + IntlDateFormatter::FULL, + 'GMT+05:12', + IntlDateFormatter::GREGORIAN); +$fmt3 = new IntlDateFormatter('en_US@calendar=hebrew', + IntlDateFormatter::FULL, + IntlDateFormatter::FULL, + 'GMT+05:12', + IntlDateFormatter::TRADITIONAL); +var_dump($fmt1->format(strtotime('2012-01-01 00:00:00 +0000'))); +var_dump($fmt2->format(strtotime('2012-01-01 00:00:00 +0000'))); +var_dump($fmt3->format(strtotime('2012-01-01 00:00:00 +0000'))); + +new IntlDateFormatter('en_US@calendar=hebrew', + IntlDateFormatter::FULL, + IntlDateFormatter::FULL, + 'GMT+05:12', + -1); +?> +==DONE== +--EXPECTF-- +string(47) "Sunday, January 1, 2012 at 5:12:00 AM GMT+05:12" +string(47) "Sunday, January 1, 2012 at 5:12:00 AM GMT+05:12" +string(48) "Sunday, Tevet 6, 5772 AM at 5:12:00 AM GMT+05:12" + +Warning: IntlDateFormatter::__construct(): datefmt_create: invalid value for calendar type; it must be one of IntlDateFormatter::TRADITIONAL (locale's default calendar) or IntlDateFormatter::GREGORIAN. Alternatively, it can be an IntlCalendar object in %sdateformat_calendars_variant2.php on line %d +==DONE== diff --git a/ext/intl/tests/dateformat_create_cal_arg.phpt b/ext/intl/tests/dateformat_create_cal_arg.phpt index 53fb084af9..a8f351247b 100644 --- a/ext/intl/tests/dateformat_create_cal_arg.phpt +++ b/ext/intl/tests/dateformat_create_cal_arg.phpt @@ -2,8 +2,8 @@ IntlDateFormatter: several forms of the calendar arg --SKIPIF-- <?php -if (!extension_loaded('intl')) - die('skip intl extension not enabled'); +if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> --FILE-- <?php ini_set("intl.error_level", E_WARNING); diff --git a/ext/intl/tests/dateformat_create_cal_arg_variant2.phpt b/ext/intl/tests/dateformat_create_cal_arg_variant2.phpt new file mode 100644 index 0000000000..70b862017b --- /dev/null +++ b/ext/intl/tests/dateformat_create_cal_arg_variant2.phpt @@ -0,0 +1,53 @@ +--TEST-- +IntlDateFormatter: several forms of the calendar arg +--SKIPIF-- +<?php +if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?> +--FILE-- +<?php +ini_set("intl.error_level", E_WARNING); +ini_set("intl.default_locale", "pt_PT"); +ini_set("date.timezone", 'Atlantic/Azores'); + +$ts = strtotime('2012-01-01 00:00:00 UTC'); + +$cal = new IntlGregorianCalendar('UTC', NULL); +$df = new IntlDateFormatter('es_ES', 0, 0, NULL, $cal); +echo $df->format($ts), "\n"; + +$cal = IntlCalendar::createInstance('UTC', 'en@calendar=islamic'); +$df = new IntlDateFormatter('es_ES', 0, 0, NULL, $cal); +echo $df->format($ts), "\n"; + +//override calendar's timezone +$cal = new IntlGregorianCalendar('UTC', NULL); +$df = new IntlDateFormatter('es_ES', 0, 0, 'Europe/Madrid', $cal); +echo $df->format($ts), "\n"; + +//default calendar is gregorian +$df = new IntlDateFormatter('es_ES@calendar=islamic', 0, 0); +echo $df->format($ts), "\n"; + +//try now with traditional +$df = new IntlDateFormatter('es_ES@calendar=islamic', 0, 0, NULL, IntlDateFormatter::TRADITIONAL); +echo $df->format($ts), "\n"; + +//the timezone can be overridden when not specifying a calendar +$df = new IntlDateFormatter('es_ES@calendar=islamic', 0, 0, 'UTC', IntlDateFormatter::TRADITIONAL); +echo $df->format($ts), "\n"; + +$df = new IntlDateFormatter('es_ES', 0, 0, 'UTC', 0); +echo $df->format($ts), "\n"; + +?> +==DONE== +--EXPECTF-- +domingo%S 1 de enero de 2012 00:00:00 GMT +domingo%S 8 de Safar de 1433 00:00:00 GMT +domingo%S 1 de enero de 2012 01:00:00 Hora estándar de Europa central +sábado%S 31 de diciembre de 2011 d.C. 23:00:00 Hora %Sde las Azores +sábado%S 7 de Safar de 1433 AH 23:00:00 Hora %Sde las Azores +domingo%S 8 de Safar de 1433 AH 00:00:00 GMT +domingo%S 1 de enero de 2012 00:00:00 GMT +==DONE== diff --git a/ext/intl/tests/dateformat_format.phpt b/ext/intl/tests/dateformat_format.phpt index 8664eea319..c3f6c297d9 100644 --- a/ext/intl/tests/dateformat_format.phpt +++ b/ext/intl/tests/dateformat_format.phpt @@ -2,6 +2,7 @@ datefmt_format_code() --SKIPIF-- <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> --FILE-- <?php diff --git a/ext/intl/tests/dateformat_formatObject_calendar.phpt b/ext/intl/tests/dateformat_formatObject_calendar.phpt index 0c61e4f2d0..d3ab6260ff 100644 --- a/ext/intl/tests/dateformat_formatObject_calendar.phpt +++ b/ext/intl/tests/dateformat_formatObject_calendar.phpt @@ -2,8 +2,8 @@ IntlDateFormatter::formatObject(): IntlCalendar tests
--SKIPIF--
<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> --FILE--
<?php ini_set("intl.error_level", E_WARNING); diff --git a/ext/intl/tests/dateformat_formatObject_calendar_variant2.phpt b/ext/intl/tests/dateformat_formatObject_calendar_variant2.phpt new file mode 100644 index 0000000000..1ec1fa669a --- /dev/null +++ b/ext/intl/tests/dateformat_formatObject_calendar_variant2.phpt @@ -0,0 +1,40 @@ +--TEST--
+IntlDateFormatter::formatObject(): IntlCalendar tests
+--SKIPIF--
+<?php
+if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?> +--FILE--
+<?php +ini_set("intl.error_level", E_WARNING); +ini_set("intl.default_locale", "pt_PT"); +ini_set("date.timezone", "Europe/Lisbon"); + +$cal = IntlCalendar::fromDateTime('2012-01-01 00:00:00'); //Europe/Lisbon +echo IntlDateFormatter::formatObject($cal), "\n"; +echo IntlDateFormatter::formatObject($cal, IntlDateFormatter::FULL), "\n"; +echo IntlDateFormatter::formatObject($cal, null, "en-US"), "\n"; +echo IntlDateFormatter::formatObject($cal, array(IntlDateFormatter::SHORT, IntlDateFormatter::FULL), "en-US"), "\n"; +echo IntlDateFormatter::formatObject($cal, 'E y-MM-d HH,mm,ss.SSS v', "en-US"), "\n"; + +$cal = IntlCalendar::fromDateTime('2012-01-01 05:00:00+03:00'); +echo datefmt_format_object($cal, IntlDateFormatter::FULL), "\n"; + +$cal = IntlCalendar::createInstance(null,'en-US@calendar=islamic-civil'); +$cal->setTime(strtotime('2012-01-01 00:00:00')*1000.); +echo IntlDateFormatter::formatObject($cal), "\n"; +echo IntlDateFormatter::formatObject($cal, IntlDateFormatter::FULL, "en-US"), "\n"; + +?> +==DONE== +
+--EXPECTF--
+01/01/2012, 00:00:00 +Domingo, 1 de Janeiro de 2012 às 00:00:00 Hora %Sda Europa Ocidental +Jan 1, 2012, 12:00:00 AM +1/1/12, 12:00:00 AM Western European Standard %STime +Sun 2012-01-1 00,00,00.000 Portugal Time +Domingo, 1 de Janeiro de 2012 às 05:00:00 GMT+03:00 +06/02/1433, 00:00:00 +Sunday, Safar 6, 1433 at 12:00:00 AM Western European Standard Time +==DONE== diff --git a/ext/intl/tests/dateformat_formatObject_datetime.phpt b/ext/intl/tests/dateformat_formatObject_datetime.phpt index 6427ad5a98..d9ddb0e644 100644 --- a/ext/intl/tests/dateformat_formatObject_datetime.phpt +++ b/ext/intl/tests/dateformat_formatObject_datetime.phpt @@ -2,8 +2,8 @@ IntlDateFormatter::formatObject(): DateTime tests
--SKIPIF--
<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+if (!extension_loaded('intl')) die('skip intl extension not enabled') ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> --FILE--
<?php ini_set("intl.error_level", E_WARNING); diff --git a/ext/intl/tests/dateformat_formatObject_datetime_variant2.phpt b/ext/intl/tests/dateformat_formatObject_datetime_variant2.phpt new file mode 100644 index 0000000000..2ca9ffd7e8 --- /dev/null +++ b/ext/intl/tests/dateformat_formatObject_datetime_variant2.phpt @@ -0,0 +1,33 @@ +--TEST--
+IntlDateFormatter::formatObject(): DateTime tests
+--SKIPIF--
+<?php
+if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?> +--FILE--
+<?php +ini_set("intl.error_level", E_WARNING); +ini_set("intl.default_locale", "pt_PT"); +ini_set("date.timezone", "Europe/Lisbon"); + +$dt = new DateTime('2012-01-01 00:00:00'); //Europe/Lisbon +echo IntlDateFormatter::formatObject($dt), "\n"; +echo IntlDateFormatter::formatObject($dt, IntlDateFormatter::FULL), "\n"; +echo IntlDateFormatter::formatObject($dt, null, "en-US"), "\n"; +echo IntlDateFormatter::formatObject($dt, array(IntlDateFormatter::SHORT, IntlDateFormatter::FULL), "en-US"), "\n"; +echo IntlDateFormatter::formatObject($dt, 'E y-MM-d HH,mm,ss.SSS v', "en-US"), "\n"; + +$dt = new DateTime('2012-01-01 05:00:00+03:00'); +echo IntlDateFormatter::formatObject($dt, IntlDateFormatter::FULL), "\n"; + +?> +==DONE== +
+--EXPECTF--
+01/01/2012, 00:00:00 +Domingo, 1 de Janeiro de 2012 às 00:00:00 Hora %Sda Europa Ocidental +Jan 1, 2012, 12:00:00 AM +1/1/12, 12:00:00 AM Western European Standard %STime +Sun 2012-01-1 00,00,00.000 Portugal Time +Domingo, 1 de Janeiro de 2012 às 05:00:00 GMT+03:00 +==DONE== diff --git a/ext/intl/tests/dateformat_format_parse.phpt b/ext/intl/tests/dateformat_format_parse.phpt index 6bd3d8a8ff..dfb479e937 100644 --- a/ext/intl/tests/dateformat_format_parse.phpt +++ b/ext/intl/tests/dateformat_format_parse.phpt @@ -2,6 +2,7 @@ datefmt_format_code() and datefmt_parse_code() --SKIPIF-- <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> --FILE-- <?php diff --git a/ext/intl/tests/dateformat_format_parse_version2.phpt b/ext/intl/tests/dateformat_format_parse_version2.phpt new file mode 100644 index 0000000000..8c6f00ef54 --- /dev/null +++ b/ext/intl/tests/dateformat_format_parse_version2.phpt @@ -0,0 +1,295 @@ +--TEST-- +datefmt_format_code() and datefmt_parse_code() +--SKIPIF-- +<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?> +--FILE-- +<?php + +/* + * Test for the datefmt_format function + */ + + +function ut_main() +{ + $timezone = 'GMT+05:00'; + + $locale_arr = array ( + 'en_US' + ); + + $datetype_arr = array ( + IntlDateFormatter::FULL, + IntlDateFormatter::LONG, + IntlDateFormatter::MEDIUM + ); + + $res_str = ''; + + + $time_arr = array ( + 0, + -1200000, + 1200000, + 2200000000, + -2200000000, + 90099999, + 3600, + -3600 + ); + + $localtime_arr1 = array ( + 'tm_sec' => 24 , + 'tm_min' => 3, + 'tm_hour' => 19, + 'tm_mday' => 3, + 'tm_mon' => 3, + 'tm_year' => 105, + ); + $localtime_arr2 = array ( + 'tm_sec' => 21, + 'tm_min' => 5, + 'tm_hour' => 7, + 'tm_mday' => 13, + 'tm_mon' => 7, + 'tm_year' => 205, + ); + $localtime_arr3 = array ( + 'tm_sec' => 11, + 'tm_min' => 13, + 'tm_hour' => 0, + 'tm_mday' => 17, + 'tm_mon' => 11, + 'tm_year' => -5 + ); + + $localtime_arr = array ( + $localtime_arr1, + $localtime_arr2, + $localtime_arr3 + ); + + //Test format and parse with a timestamp : long + foreach( $time_arr as $timestamp_entry){ + $res_str .= "\n------------\n"; + $res_str .= "\nInput timestamp is : $timestamp_entry"; + $res_str .= "\n------------\n"; + foreach( $locale_arr as $locale_entry ){ + foreach( $datetype_arr as $datetype_entry ) { + $res_str .= "\nIntlDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; + $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry,$timezone); + $formatted = ut_datefmt_format( $fmt , $timestamp_entry); + $res_str .= "\nFormatted timestamp is : $formatted"; + $parsed = ut_datefmt_parse( $fmt , $formatted); + if( intl_get_error_code() == U_ZERO_ERROR){ + $res_str .= "\nParsed timestamp is : $parsed"; + }else{ + $res_str .= "\nError while parsing as: '".intl_get_error_message()."'"; + } + } + } + } + + //Test format and parse with a localtime :array + foreach( $localtime_arr as $localtime_entry){ + $res_str .= "\n------------\n"; + $res_str .= "\nInput localtime is : "; + foreach( $localtime_entry as $key => $value){ + $res_str .= "$key : '$value' , "; + } + + $res_str .= "\n------------\n"; + foreach( $locale_arr as $locale_entry ){ + foreach( $datetype_arr as $datetype_entry ) { + $res_str .= "\nIntlDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; + $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry,$timezone); + $formatted1 = ut_datefmt_format( $fmt , $localtime_entry); + if( intl_get_error_code() == U_ZERO_ERROR){ + $res_str .= "\nFormatted localtime_array is : $formatted1"; + }else{ + $res_str .= "\nError while formatting as: '".intl_get_error_message()."'"; + } + //Parsing + $parsed_arr = ut_datefmt_localtime( $fmt, $formatted1 ); + + if( $parsed_arr){ + $res_str .= "\nParsed array is: "; + foreach( $parsed_arr as $key => $value){ + $res_str .= "$key : '$value' , "; + } + } +/* + else{ + //$res_str .= "No values found from LocaleTime parsing."; + $res_str .= "\tError : '".intl_get_error_message()."'"; + } +*/ + } + } + } + + return $res_str; + +} + +include_once( 'ut_common.inc' ); + +// Run the test +ut_run(); +?> +--EXPECT-- +------------ + +Input timestamp is : 0 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Thursday, January 1, 1970 at 5:00:00 AM GMT+05:00 +Parsed timestamp is : 0 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : January 1, 1970 at 5:00:00 AM GMT+5 +Parsed timestamp is : 0 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Jan 1, 1970, 5:00:00 AM +Parsed timestamp is : 0 +------------ + +Input timestamp is : -1200000 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Thursday, December 18, 1969 at 7:40:00 AM GMT+05:00 +Parsed timestamp is : -1200000 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : December 18, 1969 at 7:40:00 AM GMT+5 +Parsed timestamp is : -1200000 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Dec 18, 1969, 7:40:00 AM +Parsed timestamp is : -1200000 +------------ + +Input timestamp is : 1200000 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Thursday, January 15, 1970 at 2:20:00 AM GMT+05:00 +Parsed timestamp is : 1200000 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : January 15, 1970 at 2:20:00 AM GMT+5 +Parsed timestamp is : 1200000 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Jan 15, 1970, 2:20:00 AM +Parsed timestamp is : 1200000 +------------ + +Input timestamp is : 2200000000 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Monday, September 19, 2039 at 4:06:40 AM GMT+05:00 +Parsed timestamp is : 2200000000 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : September 19, 2039 at 4:06:40 AM GMT+5 +Parsed timestamp is : 2200000000 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Sep 19, 2039, 4:06:40 AM +Parsed timestamp is : 2200000000 +------------ + +Input timestamp is : -2200000000 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Sunday, April 15, 1900 at 5:53:20 AM GMT+05:00 +Parsed timestamp is : -2200000000 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : April 15, 1900 at 5:53:20 AM GMT+5 +Parsed timestamp is : -2200000000 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Apr 15, 1900, 5:53:20 AM +Parsed timestamp is : -2200000000 +------------ + +Input timestamp is : 90099999 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Thursday, November 9, 1972 at 12:46:39 AM GMT+05:00 +Parsed timestamp is : 90099999 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : November 9, 1972 at 12:46:39 AM GMT+5 +Parsed timestamp is : 90099999 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Nov 9, 1972, 12:46:39 AM +Parsed timestamp is : 90099999 +------------ + +Input timestamp is : 3600 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Thursday, January 1, 1970 at 6:00:00 AM GMT+05:00 +Parsed timestamp is : 3600 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : January 1, 1970 at 6:00:00 AM GMT+5 +Parsed timestamp is : 3600 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Jan 1, 1970, 6:00:00 AM +Parsed timestamp is : 3600 +------------ + +Input timestamp is : -3600 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Thursday, January 1, 1970 at 4:00:00 AM GMT+05:00 +Parsed timestamp is : -3600 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : January 1, 1970 at 4:00:00 AM GMT+5 +Parsed timestamp is : -3600 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Jan 1, 1970, 4:00:00 AM +Parsed timestamp is : -3600 +------------ + +Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_mday : '3' , tm_mon : '3' , tm_year : '105' , +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted localtime_array is : Sunday, April 3, 2005 at 7:03:24 PM GMT+05:00 +Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_year : '105' , tm_mday : '3' , tm_wday : '0' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '0' , +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted localtime_array is : April 3, 2005 at 7:03:24 PM GMT+5 +Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_year : '105' , tm_mday : '3' , tm_wday : '0' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '0' , +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted localtime_array is : Apr 3, 2005, 7:03:24 PM +Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_year : '105' , tm_mday : '3' , tm_wday : '0' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '0' , +------------ + +Input localtime is : tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_mday : '13' , tm_mon : '7' , tm_year : '205' , +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted localtime_array is : Thursday, August 13, 2105 at 7:05:21 AM GMT+05:00 +Parsed array is: tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_year : '205' , tm_mday : '13' , tm_wday : '4' , tm_yday : '225' , tm_mon : '7' , tm_isdst : '0' , +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted localtime_array is : August 13, 2105 at 7:05:21 AM GMT+5 +Parsed array is: tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_year : '205' , tm_mday : '13' , tm_wday : '4' , tm_yday : '225' , tm_mon : '7' , tm_isdst : '0' , +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted localtime_array is : Aug 13, 2105, 7:05:21 AM +Parsed array is: tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_year : '205' , tm_mday : '13' , tm_wday : '4' , tm_yday : '225' , tm_mon : '7' , tm_isdst : '0' , +------------ + +Input localtime is : tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_mday : '17' , tm_mon : '11' , tm_year : '-5' , +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted localtime_array is : Tuesday, December 17, 1895 at 12:13:11 AM GMT+05:00 +Parsed array is: tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_year : '-5' , tm_mday : '17' , tm_wday : '2' , tm_yday : '351' , tm_mon : '11' , tm_isdst : '0' , +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted localtime_array is : December 17, 1895 at 12:13:11 AM GMT+5 +Parsed array is: tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_year : '-5' , tm_mday : '17' , tm_wday : '2' , tm_yday : '351' , tm_mon : '11' , tm_isdst : '0' , +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted localtime_array is : Dec 17, 1895, 12:13:11 AM +Parsed array is: tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_year : '-5' , tm_mday : '17' , tm_wday : '2' , tm_yday : '351' , tm_mon : '11' , tm_isdst : '0' , diff --git a/ext/intl/tests/dateformat_format_variant2.phpt b/ext/intl/tests/dateformat_format_variant2.phpt new file mode 100644 index 0000000000..7c5bcfcfd4 --- /dev/null +++ b/ext/intl/tests/dateformat_format_variant2.phpt @@ -0,0 +1,423 @@ +--TEST-- +datefmt_format_code() +--SKIPIF-- +<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?> +--FILE-- +<?php + +//ini_set("intl.error_level", E_WARNING); + +/* + * Test for the datefmt_format function + */ + + +function ut_main() +{ + $timezone = 'GMT-10:00'; + + $locale_arr = array ( + 'en_US' + ); + + $datetype_arr = array ( + IntlDateFormatter::FULL, + IntlDateFormatter::LONG, + IntlDateFormatter::MEDIUM, + IntlDateFormatter::SHORT, + IntlDateFormatter::NONE + ); + + $res_str = ''; + + + $time_arr = array ( + 0, + -1200000, + 1200000, + 2200000000.0, + -2200000000.0, + 90099999, + 3600, + -3600 + ); + + $localtime_arr1 = array ( + 'tm_sec' => 24 , + 'tm_min' => 3, + 'tm_hour' => 19, + 'tm_mday' => 3, + 'tm_mon' => 3, + 'tm_year' => 105, + ); + $localtime_arr2 = array ( + 'tm_sec' => 21, + 'tm_min' => 5, + 'tm_hour' => 7, + 'tm_mday' => 13, + 'tm_mon' => 4, + 'tm_year' => 205, + ); + $localtime_arr3 = array ( + 'tm_sec' => 11, + 'tm_min' => 13, + 'tm_hour' => 0, + 'tm_mday' => 17, + 'tm_mon' => 11, + 'tm_year' => -5 + ); + + $localtime_arr = array ( + $localtime_arr1, + $localtime_arr2, + $localtime_arr3 + ); + + $d1 = new DateTime("2010-01-01 01:02:03", new DateTimeZone("UTC")); + $d2 = new DateTime("2000-12-31 03:04:05", new DateTimeZone("UTC")); + $d2->setTimezone(new DateTimeZone("PDT")); + $dates = array( + $d1, + $d2, + new StdClass(), + ); + + //Test format with input as a timestamp : integer + foreach( $time_arr as $timestamp_entry){ + $res_str .= "\n------------\n"; + $res_str .= "\nInput timestamp is : $timestamp_entry"; + $res_str .= "\n------------\n"; + foreach( $locale_arr as $locale_entry ){ + foreach( $datetype_arr as $datetype_entry ) + { + $res_str .= "\nIntlDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; + $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry, $timezone, IntlDateFormatter::GREGORIAN); + $formatted = ut_datefmt_format( $fmt , $timestamp_entry); + $res_str .= "\nFormatted timestamp is : $formatted"; + } + } + } + + //Test format with input as a localtime :array + foreach( $localtime_arr as $localtime_entry){ + $res_str .= "\n------------\n"; + $res_str .= "\nInput localtime is : "; + foreach( $localtime_entry as $key => $value){ + $res_str .= "$key : '$value' , "; + } + + $res_str .= "\n------------\n"; + foreach( $locale_arr as $locale_entry ){ + foreach( $datetype_arr as $datetype_entry ) + { + $res_str .= "\nIntlDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; + $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry, $timezone, IntlDateFormatter::GREGORIAN ); + $formatted1 = ut_datefmt_format( $fmt , $localtime_entry); + if( intl_get_error_code() == U_ZERO_ERROR){ + $res_str .= "\nFormatted localtime_array is : $formatted1"; + }else{ + $res_str .= "\nError while formatting as: '".intl_get_error_message()."'"; + } + } + } + } + + foreach($dates as $date_entry) { + foreach( $locale_arr as $locale_entry ){ + foreach( $datetype_arr as $datetype_entry ) { + $res_str .= "\n------------"; + $res_str .= "\nDate is: ".var_export($date_entry, true); + $res_str .= "\n------------"; + + $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry, $timezone, IntlDateFormatter::GREGORIAN ); + $formatted1 = ut_datefmt_format( $fmt , $date_entry); + if( intl_get_error_code() == U_ZERO_ERROR){ + $res_str .= "\nFormatted DateTime is : $formatted1"; + }else{ + $res_str .= "\nError while formatting as: '".intl_get_error_message()."'"; + } + } + } + } + + return $res_str; + +} + +include_once( 'ut_common.inc' ); + +// Run the test +ut_run(); +?> +--EXPECT-- +------------ + +Input timestamp is : 0 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Wednesday, December 31, 1969 at 2:00:00 PM GMT-10:00 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : December 31, 1969 at 2:00:00 PM GMT-10 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Dec 31, 1969, 2:00:00 PM +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +Formatted timestamp is : 12/31/69, 2:00 PM +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +Formatted timestamp is : 19691231 02:00 PM +------------ + +Input timestamp is : -1200000 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Wednesday, December 17, 1969 at 4:40:00 PM GMT-10:00 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : December 17, 1969 at 4:40:00 PM GMT-10 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Dec 17, 1969, 4:40:00 PM +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +Formatted timestamp is : 12/17/69, 4:40 PM +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +Formatted timestamp is : 19691217 04:40 PM +------------ + +Input timestamp is : 1200000 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Wednesday, January 14, 1970 at 11:20:00 AM GMT-10:00 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : January 14, 1970 at 11:20:00 AM GMT-10 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Jan 14, 1970, 11:20:00 AM +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +Formatted timestamp is : 1/14/70, 11:20 AM +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +Formatted timestamp is : 19700114 11:20 AM +------------ + +Input timestamp is : 2200000000 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Sunday, September 18, 2039 at 1:06:40 PM GMT-10:00 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : September 18, 2039 at 1:06:40 PM GMT-10 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Sep 18, 2039, 1:06:40 PM +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +Formatted timestamp is : 9/18/39, 1:06 PM +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +Formatted timestamp is : 20390918 01:06 PM +------------ + +Input timestamp is : -2200000000 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Saturday, April 14, 1900 at 2:53:20 PM GMT-10:00 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : April 14, 1900 at 2:53:20 PM GMT-10 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Apr 14, 1900, 2:53:20 PM +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +Formatted timestamp is : 4/14/00, 2:53 PM +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +Formatted timestamp is : 19000414 02:53 PM +------------ + +Input timestamp is : 90099999 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Wednesday, November 8, 1972 at 9:46:39 AM GMT-10:00 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : November 8, 1972 at 9:46:39 AM GMT-10 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Nov 8, 1972, 9:46:39 AM +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +Formatted timestamp is : 11/8/72, 9:46 AM +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +Formatted timestamp is : 19721108 09:46 AM +------------ + +Input timestamp is : 3600 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Wednesday, December 31, 1969 at 3:00:00 PM GMT-10:00 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : December 31, 1969 at 3:00:00 PM GMT-10 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Dec 31, 1969, 3:00:00 PM +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +Formatted timestamp is : 12/31/69, 3:00 PM +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +Formatted timestamp is : 19691231 03:00 PM +------------ + +Input timestamp is : -3600 +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted timestamp is : Wednesday, December 31, 1969 at 1:00:00 PM GMT-10:00 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted timestamp is : December 31, 1969 at 1:00:00 PM GMT-10 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted timestamp is : Dec 31, 1969, 1:00:00 PM +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +Formatted timestamp is : 12/31/69, 1:00 PM +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +Formatted timestamp is : 19691231 01:00 PM +------------ + +Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_mday : '3' , tm_mon : '3' , tm_year : '105' , +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted localtime_array is : Sunday, April 3, 2005 at 7:03:24 PM GMT-10:00 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted localtime_array is : April 3, 2005 at 7:03:24 PM GMT-10 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted localtime_array is : Apr 3, 2005, 7:03:24 PM +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +Formatted localtime_array is : 4/3/05, 7:03 PM +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +Formatted localtime_array is : 20050403 07:03 PM +------------ + +Input localtime is : tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_mday : '13' , tm_mon : '4' , tm_year : '205' , +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted localtime_array is : Wednesday, May 13, 2105 at 7:05:21 AM GMT-10:00 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted localtime_array is : May 13, 2105 at 7:05:21 AM GMT-10 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted localtime_array is : May 13, 2105, 7:05:21 AM +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +Formatted localtime_array is : 5/13/05, 7:05 AM +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +Formatted localtime_array is : 21050513 07:05 AM +------------ + +Input localtime is : tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_mday : '17' , tm_mon : '11' , tm_year : '-5' , +------------ + +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 +Formatted localtime_array is : Tuesday, December 17, 1895 at 12:13:11 AM GMT-10:00 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 +Formatted localtime_array is : December 17, 1895 at 12:13:11 AM GMT-10 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 +Formatted localtime_array is : Dec 17, 1895, 12:13:11 AM +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 +Formatted localtime_array is : 12/17/95, 12:13 AM +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +Formatted localtime_array is : 18951217 12:13 AM +------------ +Date is: DateTime::__set_state(array( + 'date' => '2010-01-01 01:02:03', + 'timezone_type' => 3, + 'timezone' => 'UTC', +)) +------------ +Formatted DateTime is : Thursday, December 31, 2009 at 3:02:03 PM GMT-10:00 +------------ +Date is: DateTime::__set_state(array( + 'date' => '2010-01-01 01:02:03', + 'timezone_type' => 3, + 'timezone' => 'UTC', +)) +------------ +Formatted DateTime is : December 31, 2009 at 3:02:03 PM GMT-10 +------------ +Date is: DateTime::__set_state(array( + 'date' => '2010-01-01 01:02:03', + 'timezone_type' => 3, + 'timezone' => 'UTC', +)) +------------ +Formatted DateTime is : Dec 31, 2009, 3:02:03 PM +------------ +Date is: DateTime::__set_state(array( + 'date' => '2010-01-01 01:02:03', + 'timezone_type' => 3, + 'timezone' => 'UTC', +)) +------------ +Formatted DateTime is : 12/31/09, 3:02 PM +------------ +Date is: DateTime::__set_state(array( + 'date' => '2010-01-01 01:02:03', + 'timezone_type' => 3, + 'timezone' => 'UTC', +)) +------------ +Formatted DateTime is : 20091231 03:02 PM +------------ +Date is: DateTime::__set_state(array( + 'date' => '2000-12-30 19:04:05', + 'timezone_type' => 3, + 'timezone' => 'America/Los_Angeles', +)) +------------ +Formatted DateTime is : Saturday, December 30, 2000 at 5:04:05 PM GMT-10:00 +------------ +Date is: DateTime::__set_state(array( + 'date' => '2000-12-30 19:04:05', + 'timezone_type' => 3, + 'timezone' => 'America/Los_Angeles', +)) +------------ +Formatted DateTime is : December 30, 2000 at 5:04:05 PM GMT-10 +------------ +Date is: DateTime::__set_state(array( + 'date' => '2000-12-30 19:04:05', + 'timezone_type' => 3, + 'timezone' => 'America/Los_Angeles', +)) +------------ +Formatted DateTime is : Dec 30, 2000, 5:04:05 PM +------------ +Date is: DateTime::__set_state(array( + 'date' => '2000-12-30 19:04:05', + 'timezone_type' => 3, + 'timezone' => 'America/Los_Angeles', +)) +------------ +Formatted DateTime is : 12/30/00, 5:04 PM +------------ +Date is: DateTime::__set_state(array( + 'date' => '2000-12-30 19:04:05', + 'timezone_type' => 3, + 'timezone' => 'America/Los_Angeles', +)) +------------ +Formatted DateTime is : 20001230 05:04 PM +------------ +Date is: stdClass::__set_state(array( +)) +------------ +Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR' +------------ +Date is: stdClass::__set_state(array( +)) +------------ +Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR' +------------ +Date is: stdClass::__set_state(array( +)) +------------ +Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR' +------------ +Date is: stdClass::__set_state(array( +)) +------------ +Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR' +------------ +Date is: stdClass::__set_state(array( +)) +------------ +Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR' diff --git a/ext/intl/tests/dateformat_get_set_calendar.phpt b/ext/intl/tests/dateformat_get_set_calendar.phpt index dbb3e6cd23..f91fe5c775 100644 --- a/ext/intl/tests/dateformat_get_set_calendar.phpt +++ b/ext/intl/tests/dateformat_get_set_calendar.phpt @@ -2,8 +2,8 @@ IntlDateFormatter: setCalendar()/getCalendar()/getCalendarObject() --SKIPIF-- <?php -if (!extension_loaded('intl')) - die('skip intl extension not enabled'); +if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> --FILE-- <?php ini_set("intl.error_level", E_WARNING); diff --git a/ext/intl/tests/dateformat_get_set_calendar_variant2.phpt b/ext/intl/tests/dateformat_get_set_calendar_variant2.phpt new file mode 100644 index 0000000000..1c5169e65d --- /dev/null +++ b/ext/intl/tests/dateformat_get_set_calendar_variant2.phpt @@ -0,0 +1,55 @@ +--TEST-- +IntlDateFormatter: setCalendar()/getCalendar()/getCalendarObject() +--SKIPIF-- +<?php +if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?> +--FILE-- +<?php +ini_set("intl.error_level", E_WARNING); +ini_set("intl.default_locale", "pt_PT"); +ini_set("date.timezone", 'Atlantic/Azores'); + +$ts = strtotime('2012-01-01 00:00:00 UTC'); + +function d(IntlDateFormatter $df) { +global $ts; +echo $df->format($ts), "\n"; +var_dump($df->getCalendar(), +$df->getCalendarObject()->getType(), +$df->getCalendarObject()->getTimeZone()->getId()); +echo "\n"; +} + +$df = new IntlDateFormatter('fr@calendar=islamic', 0, 0, 'Europe/Minsk'); +d($df); + + +//changing the calendar with a cal type should not change tz +$df->setCalendar(IntlDateFormatter::TRADITIONAL); +d($df); + +//but changing with an actual calendar should +$cal = IntlCalendar::createInstance("UTC"); +$df->setCalendar($cal); +d($df); + +?> +==DONE== +--EXPECT-- +dimanche 1 janvier 2012 ap. J.-C. 03:00:00 UTC+03:00 +int(1) +string(9) "gregorian" +string(12) "Europe/Minsk" + +dimanche 8 safar 1433 AH 03:00:00 UTC+03:00 +int(0) +string(7) "islamic" +string(12) "Europe/Minsk" + +dimanche 1 janvier 2012 ap. J.-C. 00:00:00 UTC +bool(false) +string(9) "gregorian" +string(3) "UTC" + +==DONE== diff --git a/ext/intl/tests/dateformat_get_set_timezone.phpt b/ext/intl/tests/dateformat_get_set_timezone.phpt index 41aa35b9cf..2a7ffa6c73 100644 --- a/ext/intl/tests/dateformat_get_set_timezone.phpt +++ b/ext/intl/tests/dateformat_get_set_timezone.phpt @@ -2,8 +2,8 @@ IntlDateFormatter: get/setTimeZone() --SKIPIF-- <?php -if (!extension_loaded('intl')) - die('skip intl extension not enabled'); +if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> --FILE-- <?php ini_set("intl.error_level", E_WARNING); diff --git a/ext/intl/tests/dateformat_get_set_timezone_variant2.phpt b/ext/intl/tests/dateformat_get_set_timezone_variant2.phpt new file mode 100644 index 0000000000..af9ddf29a4 --- /dev/null +++ b/ext/intl/tests/dateformat_get_set_timezone_variant2.phpt @@ -0,0 +1,62 @@ +--TEST-- +IntlDateFormatter: get/setTimeZone() +--SKIPIF-- +<?php +if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?> +--FILE-- +<?php +ini_set("intl.error_level", E_WARNING); +ini_set("intl.default_locale", "pt_PT"); +ini_set("date.timezone", 'Atlantic/Azores'); + +$ts = strtotime('2012-01-01 00:00:00 UTC'); + +function d(IntlDateFormatter $df) { +global $ts; +echo $df->format($ts), "\n"; +var_dump( +$df->getTimeZoneID(), +$df->getTimeZone()->getID()); +echo "\n"; +} + +$df = new IntlDateFormatter('pt_PT', 0, 0, 'Europe/Minsk'); +d($df); + +$df->setTimeZone(NULL); +d($df); + +$df->setTimeZone('Europe/Madrid'); +d($df); + +$df->setTimeZone(IntlTimeZone::createTimeZone('Europe/Paris')); +d($df); + +$df->setTimeZone(new DateTimeZone('Europe/Amsterdam')); +d($df); + +?> +==DONE== +--EXPECTF-- +Domingo, 1 de Janeiro de 2012 às 03:00:00 GMT+03:00 +string(12) "Europe/Minsk" +string(12) "Europe/Minsk" + +Sábado, 31 de Dezembro de 2011 às 23:00:00 Hor%s %Sdos Açores +string(15) "Atlantic/Azores" +string(15) "Atlantic/Azores" + +Domingo, 1 de Janeiro de 2012 às 01:00:00 Hor%s %Sda Europa Central +string(13) "Europe/Madrid" +string(13) "Europe/Madrid" + +Domingo, 1 de Janeiro de 2012 às 01:00:00 Hor%s %Sda Europa Central +string(12) "Europe/Paris" +string(12) "Europe/Paris" + +Domingo, 1 de Janeiro de 2012 às 01:00:00 Hor%s %Sda Europa Central +string(16) "Europe/Amsterdam" +string(16) "Europe/Amsterdam" + +==DONE== diff --git a/ext/intl/tests/dateformat_set_timezone_id2.phpt b/ext/intl/tests/dateformat_set_timezone_id2.phpt index ce9b89d1fd..a1ee440e71 100644 --- a/ext/intl/tests/dateformat_set_timezone_id2.phpt +++ b/ext/intl/tests/dateformat_set_timezone_id2.phpt @@ -5,6 +5,7 @@ date.timezone=Atlantic/Azores --SKIPIF-- <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> <?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> --FILE-- <?php diff --git a/ext/intl/tests/dateformat_set_timezone_id3.phpt b/ext/intl/tests/dateformat_set_timezone_id3.phpt new file mode 100644 index 0000000000..b3968f9ac0 --- /dev/null +++ b/ext/intl/tests/dateformat_set_timezone_id3.phpt @@ -0,0 +1,85 @@ +--TEST-- +datefmt_set_timezone_id_code() icu >= 4.8 +--INI-- +date.timezone=Atlantic/Azores +--SKIPIF-- +<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?> +--FILE-- +<?php + +ini_set("intl.error_level", E_WARNING); +ini_set("error_reporting", ~E_DEPRECATED); + +/* + * Test for the datefmt_set_timezone_id function + */ + + +function ut_main() +{ + $timezone_id_arr = array ( + 'America/New_York', + 'America/Los_Angeles', + 'America/Chicago', + 'CN' + ); + $timestamp_entry = 0; + + $res_str = ''; + + $fmt = ut_datefmt_create( "en_US", IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'US/Pacific' , IntlDateFormatter::GREGORIAN ); + $timezone_id = ut_datefmt_get_timezone_id( $fmt ); + $res_str .= "\nAfter creation of the dateformatter : timezone_id= $timezone_id\n"; + + foreach( $timezone_id_arr as $timezone_id_entry ) + { + + $res_str .= "-----------"; + $res_str .= "\nTrying to set timezone_id= $timezone_id_entry"; + ut_datefmt_set_timezone_id( $fmt , $timezone_id_entry ); + $timezone_id = ut_datefmt_get_timezone_id( $fmt ); + $res_str .= "\nAfter call to set_timezone_id : timezone_id= $timezone_id"; + $formatted = ut_datefmt_format( $fmt, 0); + $res_str .= "\nFormatting timestamp=0 resulted in $formatted"; + $formatted = ut_datefmt_format( $fmt, 3600); + $res_str .= "\nFormatting timestamp=3600 resulted in $formatted"; + $res_str .= "\n"; + + } + + return $res_str; + +} + +include_once( 'ut_common.inc' ); + +// Run the test +ut_run(); +?> +--EXPECTF-- +Warning: IntlDateFormatter::setTimeZoneId(): datefmt_set_timezone: no such time zone: 'CN' in %sut_common.inc on line %d + +Warning: datefmt_set_timezone_id(): datefmt_set_timezone: no such time zone: 'CN' in %sut_common.inc on line %d + +After creation of the dateformatter : timezone_id= US/Pacific +----------- +Trying to set timezone_id= America/New_York +After call to set_timezone_id : timezone_id= America/New_York +Formatting timestamp=0 resulted in Wednesday, December 31, 1969 at 7:00:00 PM Eastern Standard Time +Formatting timestamp=3600 resulted in Wednesday, December 31, 1969 at 8:00:00 PM Eastern Standard Time +----------- +Trying to set timezone_id= America/Los_Angeles +After call to set_timezone_id : timezone_id= America/Los_Angeles +Formatting timestamp=0 resulted in Wednesday, December 31, 1969 at 4:00:00 PM Pacific Standard Time +Formatting timestamp=3600 resulted in Wednesday, December 31, 1969 at 5:00:00 PM Pacific Standard Time +----------- +Trying to set timezone_id= America/Chicago +After call to set_timezone_id : timezone_id= America/Chicago +Formatting timestamp=0 resulted in Wednesday, December 31, 1969 at 6:00:00 PM Central Standard Time +Formatting timestamp=3600 resulted in Wednesday, December 31, 1969 at 7:00:00 PM Central Standard Time +----------- +Trying to set timezone_id= CN +After call to set_timezone_id : timezone_id= America/Chicago +Formatting timestamp=0 resulted in Wednesday, December 31, 1969 at 6:00:00 PM Central Standard Time +Formatting timestamp=3600 resulted in Wednesday, December 31, 1969 at 7:00:00 PM Central Standard Time diff --git a/ext/intl/tests/dateformat_timezone_arg_variations.phpt b/ext/intl/tests/dateformat_timezone_arg_variations.phpt index ccfb5e1964..9fbb145c72 100644 --- a/ext/intl/tests/dateformat_timezone_arg_variations.phpt +++ b/ext/intl/tests/dateformat_timezone_arg_variations.phpt @@ -2,8 +2,8 @@ IntlDateFormatter: several forms of the timezone arg --SKIPIF-- <?php -if (!extension_loaded('intl')) - die('skip intl extension not enabled'); +if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> --FILE-- <?php ini_set("intl.error_level", E_WARNING); diff --git a/ext/intl/tests/dateformat_timezone_arg_variations2.phpt b/ext/intl/tests/dateformat_timezone_arg_variations2.phpt new file mode 100644 index 0000000000..a957963a44 --- /dev/null +++ b/ext/intl/tests/dateformat_timezone_arg_variations2.phpt @@ -0,0 +1,45 @@ +--TEST-- +IntlDateFormatter: several forms of the timezone arg +--SKIPIF-- +<?php +if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?> +--FILE-- +<?php +ini_set("intl.error_level", E_WARNING); +ini_set("date.timezone", 'Atlantic/Azores'); + +$ts = strtotime('2012-01-01 00:00:00 UTC'); + +//should use Atlantic/Azores +$df = new IntlDateFormatter('es_ES', 0, 0, NULL); +echo $df->format($ts), "\n"; + +$df = new IntlDateFormatter('es_ES', 0, 0, 'Europe/Amsterdam'); +echo $df->format($ts), "\n"; + +$df = new IntlDateFormatter('es_ES', 0, 0, new DateTimeZone('Europe/Lisbon')); +echo $df->format($ts), "\n"; + +$df = new IntlDateFormatter('es_ES', 0, 0, IntlTimeZone::createTimeZone('America/New_York')); +echo $df->format($ts), "\n"; + +//time zone has priority +$df = new IntlDateFormatter('es_ES', 0, 0, 'Europe/Amsterdam', new IntlGregorianCalendar('Europe/Lisbon')); +echo $df->format($ts), "\n"; + +//calendar has priority +$df = new IntlDateFormatter('es_ES', 0, 0, NULL, new IntlGregorianCalendar('Europe/Lisbon')); +echo $df->format($ts), "\n"; + +$df = new IntlDateFormatter('es_ES', 0, 0, 'Europe/Amsterdam', 0); +echo $df->format($ts), "\n"; + +--EXPECTF-- +sábado%S, 31 de diciembre de 2011 23:00:00 Hora estándar de las Azores +domingo%S, 1 de enero de 2012 01:00:00 Hora estándar de Europa central +domingo%S, 1 de enero de 2012 00:00:00 Hora%S de Europa occidental +sábado%S, 31 de diciembre de 2011 19:00:00 Hora estándar oriental +domingo%S, 1 de enero de 2012 01:00:00 Hora estándar de Europa central +domingo%S, 1 de enero de 2012 00:00:00 Hora%S de Europa occidental +domingo%S, 1 de enero de 2012 01:00:00 Hora estándar de Europa central diff --git a/ext/intl/tests/formatter_get_locale.phpt b/ext/intl/tests/formatter_get_locale.phpt index 3d4fb2ae4e..7474eabbba 100644 --- a/ext/intl/tests/formatter_get_locale.phpt +++ b/ext/intl/tests/formatter_get_locale.phpt @@ -2,6 +2,7 @@ numfmt_get_locale() --SKIPIF-- <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> --FILE-- <?php diff --git a/ext/intl/tests/formatter_get_locale_variant2.phpt b/ext/intl/tests/formatter_get_locale_variant2.phpt new file mode 100644 index 0000000000..9d25d1cf90 --- /dev/null +++ b/ext/intl/tests/formatter_get_locale_variant2.phpt @@ -0,0 +1,50 @@ +--TEST-- +numfmt_get_locale() +--SKIPIF-- +<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?> +--FILE-- +<?php + +/* + * Get locale. + */ + +function ut_main() +{ + $locales = array( + 'en_UK', + 'en_US@California', + 'fr_CA', + ); + + $loc_types = array( + Locale::ACTUAL_LOCALE => 'actual', + Locale::VALID_LOCALE => 'valid', + ); + + $res_str = ''; + + foreach( $locales as $locale ) + { + $fmt = ut_nfmt_create( $locale, NumberFormatter::DECIMAL ); + $res_str .= "$locale: "; + foreach( $loc_types as $loc_type => $loc_type_name ) + $res_str .= sprintf( " %s=%s", + $loc_type_name, + dump( ut_nfmt_get_locale( $fmt, $loc_type ) ) ); + $res_str .= "\n"; + } + + return $res_str; +} + +include_once( 'ut_common.inc' ); + +// Run the test +ut_run(); +?> +--EXPECT-- +en_UK: actual='en' valid='en' +en_US@California: actual='en' valid='en' +fr_CA: actual='fr' valid='fr_CA' diff --git a/ext/intl/tests/locale_filter_matches2.phpt b/ext/intl/tests/locale_filter_matches2.phpt index 37f9e5a377..12d247dc6b 100644 --- a/ext/intl/tests/locale_filter_matches2.phpt +++ b/ext/intl/tests/locale_filter_matches2.phpt @@ -1,8 +1,9 @@ --TEST-- -locale_filter_matches.phpt() icu >= 4.8 +locale_filter_matches.phpt() icu >= 4.8 && icu < 51.2 --SKIPIF-- <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> <?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> --FILE-- <?php diff --git a/ext/intl/tests/locale_filter_matches3.phpt b/ext/intl/tests/locale_filter_matches3.phpt new file mode 100644 index 0000000000..4c1d4d3898 --- /dev/null +++ b/ext/intl/tests/locale_filter_matches3.phpt @@ -0,0 +1,366 @@ +--TEST-- +locale_filter_matches.phpt() ICU >= 51.2 +--SKIPIF-- +<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?> +--FILE-- +<?php + +/* + * Try parsing different Locales + * with Procedural and Object methods. + */ + +function ut_main() +{ + $loc_ranges = array( + 'de-de', + 'sl_IT', + 'sl_IT_Nedis', + 'jbo', + 'art-lojban', + 'sl_IT' + ); + + $lang_tags = array( + 'de-DEVA', + 'de-DE-1996', + 'de-DE', + 'zh_Hans', + 'de-CH-1996', + 'sl_IT', + 'sl_IT_nedis-a-kirti-x-xyz', + 'sl_IT_rozaj', + 'sl_IT_NEDIS_ROJAZ_1901', + 'i-enochian', + 'sgn-CH-de', + 'art-lojban', + 'i-lux', + 'art-lojban', + 'jbo', + 'en_sl_IT' + ); + + $res_str = ''; + $isCanonical = false; + foreach($loc_ranges as $loc_range){ + foreach($lang_tags as $lang_tag){ + $res_str .="--------------\n"; + $result= ut_loc_locale_filter_matches( $lang_tag , $loc_range , $isCanonical); + $res_str .= "loc_range:$loc_range matches lang_tag $lang_tag ? "; + if( $result){ + $res_str .= "YES\n"; + }else{ + $res_str .= "NO\n"; + } +//canonicalized version + $result= ut_loc_locale_filter_matches( $lang_tag , $loc_range , !($isCanonical)); + $can_loc_range = ut_loc_canonicalize($loc_range); + $can_lang_tag = ut_loc_canonicalize($lang_tag); + $res_str .= "loc_range:$can_loc_range canonically matches lang_tag $can_lang_tag ? "; + if( $result){ + $res_str .= "YES\n"; + }else{ + $res_str .= "NO\n"; + } + } + } + + $res_str .= "\n"; + return $res_str; + +} + +include_once( 'ut_common.inc' ); +ut_run(); + +?> +--EXPECT-- +-------------- +loc_range:de-de matches lang_tag de-DEVA ? NO +loc_range:de_DE canonically matches lang_tag de_Deva ? NO +-------------- +loc_range:de-de matches lang_tag de-DE-1996 ? YES +loc_range:de_DE canonically matches lang_tag de_DE_1996 ? YES +-------------- +loc_range:de-de matches lang_tag de-DE ? YES +loc_range:de_DE canonically matches lang_tag de_DE ? YES +-------------- +loc_range:de-de matches lang_tag zh_Hans ? NO +loc_range:de_DE canonically matches lang_tag zh_Hans ? NO +-------------- +loc_range:de-de matches lang_tag de-CH-1996 ? NO +loc_range:de_DE canonically matches lang_tag de_CH_1996 ? NO +-------------- +loc_range:de-de matches lang_tag sl_IT ? NO +loc_range:de_DE canonically matches lang_tag sl_IT ? NO +-------------- +loc_range:de-de matches lang_tag sl_IT_nedis-a-kirti-x-xyz ? NO +loc_range:de_DE canonically matches lang_tag sl_IT_NEDIS_A_KIRTI_X_XYZ ? NO +-------------- +loc_range:de-de matches lang_tag sl_IT_rozaj ? NO +loc_range:de_DE canonically matches lang_tag sl_IT_ROZAJ ? NO +-------------- +loc_range:de-de matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? NO +loc_range:de_DE canonically matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? NO +-------------- +loc_range:de-de matches lang_tag i-enochian ? NO +loc_range:de_DE canonically matches lang_tag @x=i-enochian ? NO +-------------- +loc_range:de-de matches lang_tag sgn-CH-de ? NO +loc_range:de_DE canonically matches lang_tag sgn_CH_DE ? NO +-------------- +loc_range:de-de matches lang_tag art-lojban ? NO +loc_range:de_DE canonically matches lang_tag art__LOJBAN ? NO +-------------- +loc_range:de-de matches lang_tag i-lux ? NO +loc_range:de_DE canonically matches lang_tag lb ? NO +-------------- +loc_range:de-de matches lang_tag art-lojban ? NO +loc_range:de_DE canonically matches lang_tag art__LOJBAN ? NO +-------------- +loc_range:de-de matches lang_tag jbo ? NO +loc_range:de_DE canonically matches lang_tag jbo ? NO +-------------- +loc_range:de-de matches lang_tag en_sl_IT ? NO +loc_range:de_DE canonically matches lang_tag en_SL_IT ? NO +-------------- +loc_range:sl_IT matches lang_tag de-DEVA ? NO +loc_range:sl_IT canonically matches lang_tag de_Deva ? NO +-------------- +loc_range:sl_IT matches lang_tag de-DE-1996 ? NO +loc_range:sl_IT canonically matches lang_tag de_DE_1996 ? NO +-------------- +loc_range:sl_IT matches lang_tag de-DE ? NO +loc_range:sl_IT canonically matches lang_tag de_DE ? NO +-------------- +loc_range:sl_IT matches lang_tag zh_Hans ? NO +loc_range:sl_IT canonically matches lang_tag zh_Hans ? NO +-------------- +loc_range:sl_IT matches lang_tag de-CH-1996 ? NO +loc_range:sl_IT canonically matches lang_tag de_CH_1996 ? NO +-------------- +loc_range:sl_IT matches lang_tag sl_IT ? YES +loc_range:sl_IT canonically matches lang_tag sl_IT ? YES +-------------- +loc_range:sl_IT matches lang_tag sl_IT_nedis-a-kirti-x-xyz ? YES +loc_range:sl_IT canonically matches lang_tag sl_IT_NEDIS_A_KIRTI_X_XYZ ? YES +-------------- +loc_range:sl_IT matches lang_tag sl_IT_rozaj ? YES +loc_range:sl_IT canonically matches lang_tag sl_IT_ROZAJ ? YES +-------------- +loc_range:sl_IT matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? YES +loc_range:sl_IT canonically matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? YES +-------------- +loc_range:sl_IT matches lang_tag i-enochian ? NO +loc_range:sl_IT canonically matches lang_tag @x=i-enochian ? NO +-------------- +loc_range:sl_IT matches lang_tag sgn-CH-de ? NO +loc_range:sl_IT canonically matches lang_tag sgn_CH_DE ? NO +-------------- +loc_range:sl_IT matches lang_tag art-lojban ? NO +loc_range:sl_IT canonically matches lang_tag art__LOJBAN ? NO +-------------- +loc_range:sl_IT matches lang_tag i-lux ? NO +loc_range:sl_IT canonically matches lang_tag lb ? NO +-------------- +loc_range:sl_IT matches lang_tag art-lojban ? NO +loc_range:sl_IT canonically matches lang_tag art__LOJBAN ? NO +-------------- +loc_range:sl_IT matches lang_tag jbo ? NO +loc_range:sl_IT canonically matches lang_tag jbo ? NO +-------------- +loc_range:sl_IT matches lang_tag en_sl_IT ? NO +loc_range:sl_IT canonically matches lang_tag en_SL_IT ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag de-DEVA ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag de_Deva ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag de-DE-1996 ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag de_DE_1996 ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag de-DE ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag de_DE ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag zh_Hans ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag zh_Hans ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag de-CH-1996 ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag de_CH_1996 ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag sl_IT ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag sl_IT ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag sl_IT_nedis-a-kirti-x-xyz ? YES +loc_range:sl_IT_NEDIS canonically matches lang_tag sl_IT_NEDIS_A_KIRTI_X_XYZ ? YES +-------------- +loc_range:sl_IT_Nedis matches lang_tag sl_IT_rozaj ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag sl_IT_ROZAJ ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? YES +loc_range:sl_IT_NEDIS canonically matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? YES +-------------- +loc_range:sl_IT_Nedis matches lang_tag i-enochian ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag @x=i-enochian ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag sgn-CH-de ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag sgn_CH_DE ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag art-lojban ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag art__LOJBAN ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag i-lux ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag lb ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag art-lojban ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag art__LOJBAN ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag jbo ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag jbo ? NO +-------------- +loc_range:sl_IT_Nedis matches lang_tag en_sl_IT ? NO +loc_range:sl_IT_NEDIS canonically matches lang_tag en_SL_IT ? NO +-------------- +loc_range:jbo matches lang_tag de-DEVA ? NO +loc_range:jbo canonically matches lang_tag de_Deva ? NO +-------------- +loc_range:jbo matches lang_tag de-DE-1996 ? NO +loc_range:jbo canonically matches lang_tag de_DE_1996 ? NO +-------------- +loc_range:jbo matches lang_tag de-DE ? NO +loc_range:jbo canonically matches lang_tag de_DE ? NO +-------------- +loc_range:jbo matches lang_tag zh_Hans ? NO +loc_range:jbo canonically matches lang_tag zh_Hans ? NO +-------------- +loc_range:jbo matches lang_tag de-CH-1996 ? NO +loc_range:jbo canonically matches lang_tag de_CH_1996 ? NO +-------------- +loc_range:jbo matches lang_tag sl_IT ? NO +loc_range:jbo canonically matches lang_tag sl_IT ? NO +-------------- +loc_range:jbo matches lang_tag sl_IT_nedis-a-kirti-x-xyz ? NO +loc_range:jbo canonically matches lang_tag sl_IT_NEDIS_A_KIRTI_X_XYZ ? NO +-------------- +loc_range:jbo matches lang_tag sl_IT_rozaj ? NO +loc_range:jbo canonically matches lang_tag sl_IT_ROZAJ ? NO +-------------- +loc_range:jbo matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? NO +loc_range:jbo canonically matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? NO +-------------- +loc_range:jbo matches lang_tag i-enochian ? NO +loc_range:jbo canonically matches lang_tag @x=i-enochian ? NO +-------------- +loc_range:jbo matches lang_tag sgn-CH-de ? NO +loc_range:jbo canonically matches lang_tag sgn_CH_DE ? NO +-------------- +loc_range:jbo matches lang_tag art-lojban ? NO +loc_range:jbo canonically matches lang_tag art__LOJBAN ? NO +-------------- +loc_range:jbo matches lang_tag i-lux ? NO +loc_range:jbo canonically matches lang_tag lb ? NO +-------------- +loc_range:jbo matches lang_tag art-lojban ? NO +loc_range:jbo canonically matches lang_tag art__LOJBAN ? NO +-------------- +loc_range:jbo matches lang_tag jbo ? YES +loc_range:jbo canonically matches lang_tag jbo ? YES +-------------- +loc_range:jbo matches lang_tag en_sl_IT ? NO +loc_range:jbo canonically matches lang_tag en_SL_IT ? NO +-------------- +loc_range:art-lojban matches lang_tag de-DEVA ? NO +loc_range:art__LOJBAN canonically matches lang_tag de_Deva ? NO +-------------- +loc_range:art-lojban matches lang_tag de-DE-1996 ? NO +loc_range:art__LOJBAN canonically matches lang_tag de_DE_1996 ? NO +-------------- +loc_range:art-lojban matches lang_tag de-DE ? NO +loc_range:art__LOJBAN canonically matches lang_tag de_DE ? NO +-------------- +loc_range:art-lojban matches lang_tag zh_Hans ? NO +loc_range:art__LOJBAN canonically matches lang_tag zh_Hans ? NO +-------------- +loc_range:art-lojban matches lang_tag de-CH-1996 ? NO +loc_range:art__LOJBAN canonically matches lang_tag de_CH_1996 ? NO +-------------- +loc_range:art-lojban matches lang_tag sl_IT ? NO +loc_range:art__LOJBAN canonically matches lang_tag sl_IT ? NO +-------------- +loc_range:art-lojban matches lang_tag sl_IT_nedis-a-kirti-x-xyz ? NO +loc_range:art__LOJBAN canonically matches lang_tag sl_IT_NEDIS_A_KIRTI_X_XYZ ? NO +-------------- +loc_range:art-lojban matches lang_tag sl_IT_rozaj ? NO +loc_range:art__LOJBAN canonically matches lang_tag sl_IT_ROZAJ ? NO +-------------- +loc_range:art-lojban matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? NO +loc_range:art__LOJBAN canonically matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? NO +-------------- +loc_range:art-lojban matches lang_tag i-enochian ? NO +loc_range:art__LOJBAN canonically matches lang_tag @x=i-enochian ? NO +-------------- +loc_range:art-lojban matches lang_tag sgn-CH-de ? NO +loc_range:art__LOJBAN canonically matches lang_tag sgn_CH_DE ? NO +-------------- +loc_range:art-lojban matches lang_tag art-lojban ? YES +loc_range:art__LOJBAN canonically matches lang_tag art__LOJBAN ? YES +-------------- +loc_range:art-lojban matches lang_tag i-lux ? NO +loc_range:art__LOJBAN canonically matches lang_tag lb ? NO +-------------- +loc_range:art-lojban matches lang_tag art-lojban ? YES +loc_range:art__LOJBAN canonically matches lang_tag art__LOJBAN ? YES +-------------- +loc_range:art-lojban matches lang_tag jbo ? NO +loc_range:art__LOJBAN canonically matches lang_tag jbo ? NO +-------------- +loc_range:art-lojban matches lang_tag en_sl_IT ? NO +loc_range:art__LOJBAN canonically matches lang_tag en_SL_IT ? NO +-------------- +loc_range:sl_IT matches lang_tag de-DEVA ? NO +loc_range:sl_IT canonically matches lang_tag de_Deva ? NO +-------------- +loc_range:sl_IT matches lang_tag de-DE-1996 ? NO +loc_range:sl_IT canonically matches lang_tag de_DE_1996 ? NO +-------------- +loc_range:sl_IT matches lang_tag de-DE ? NO +loc_range:sl_IT canonically matches lang_tag de_DE ? NO +-------------- +loc_range:sl_IT matches lang_tag zh_Hans ? NO +loc_range:sl_IT canonically matches lang_tag zh_Hans ? NO +-------------- +loc_range:sl_IT matches lang_tag de-CH-1996 ? NO +loc_range:sl_IT canonically matches lang_tag de_CH_1996 ? NO +-------------- +loc_range:sl_IT matches lang_tag sl_IT ? YES +loc_range:sl_IT canonically matches lang_tag sl_IT ? YES +-------------- +loc_range:sl_IT matches lang_tag sl_IT_nedis-a-kirti-x-xyz ? YES +loc_range:sl_IT canonically matches lang_tag sl_IT_NEDIS_A_KIRTI_X_XYZ ? YES +-------------- +loc_range:sl_IT matches lang_tag sl_IT_rozaj ? YES +loc_range:sl_IT canonically matches lang_tag sl_IT_ROZAJ ? YES +-------------- +loc_range:sl_IT matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? YES +loc_range:sl_IT canonically matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? YES +-------------- +loc_range:sl_IT matches lang_tag i-enochian ? NO +loc_range:sl_IT canonically matches lang_tag @x=i-enochian ? NO +-------------- +loc_range:sl_IT matches lang_tag sgn-CH-de ? NO +loc_range:sl_IT canonically matches lang_tag sgn_CH_DE ? NO +-------------- +loc_range:sl_IT matches lang_tag art-lojban ? NO +loc_range:sl_IT canonically matches lang_tag art__LOJBAN ? NO +-------------- +loc_range:sl_IT matches lang_tag i-lux ? NO +loc_range:sl_IT canonically matches lang_tag lb ? NO +-------------- +loc_range:sl_IT matches lang_tag art-lojban ? NO +loc_range:sl_IT canonically matches lang_tag art__LOJBAN ? NO +-------------- +loc_range:sl_IT matches lang_tag jbo ? NO +loc_range:sl_IT canonically matches lang_tag jbo ? NO +-------------- +loc_range:sl_IT matches lang_tag en_sl_IT ? NO +loc_range:sl_IT canonically matches lang_tag en_SL_IT ? NO diff --git a/ext/intl/tests/locale_get_display_name2.phpt b/ext/intl/tests/locale_get_display_name2.phpt index 40ccc0c2c5..bd8cb50cd5 100644 --- a/ext/intl/tests/locale_get_display_name2.phpt +++ b/ext/intl/tests/locale_get_display_name2.phpt @@ -1,8 +1,9 @@ --TEST-- -locale_get_display_name() icu >= 4.8 +locale_get_display_name() icu >= 4.8 && icu < 51.2 --SKIPIF-- <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> <?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> --FILE-- <?php diff --git a/ext/intl/tests/locale_get_display_name3.phpt b/ext/intl/tests/locale_get_display_name3.phpt new file mode 100644 index 0000000000..3f3d26fcfa --- /dev/null +++ b/ext/intl/tests/locale_get_display_name3.phpt @@ -0,0 +1,342 @@ +--TEST-- +locale_get_display_name() icu >= 51.2 +--SKIPIF-- +<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?> +--FILE-- +<?php + +/* + * Try getting the display_name for different locales + * with Procedural and Object methods. + */ + +function ut_main() +{ + $res_str=''; + + $disp_locales=array('en','fr','de'); + + $locales = array( + 'sl_IT_nedis_KIRTI', + 'sl_IT_nedis-a-kirti-x-xyz', + 'sl_IT_rozaj', + 'sl_IT_NEDIS_ROJAZ_1901', + 'i-enochian', + 'zh-hakka', + 'zh-wuu', + 'i-tay', + 'sgn-BE-nl', + 'sgn-CH-de', + 'sl_IT_rozaj@currency=EUR', + 'uk-ua_CALIFORNIA@currency=;currency=GRN', + 'root', + 'uk@currency=EURO', + 'Hindi', +//Simple language subtag + 'de', + 'fr', + 'ja', + 'i-enochian', //(example of a grandfathered tag) +//Language subtag plus Script subtag: + 'zh-Hant', + 'zh-Hans', + 'sr-Cyrl', + 'sr-Latn', +//Language-Script-Region + 'zh-Hans-CN', + 'sr-Latn-CS', +//Language-Variant + 'sl-rozaj', + 'sl-nedis', +//Language-Region-Variant + 'de-CH-1901', + 'sl-IT-nedis', +//Language-Script-Region-Variant + 'sl-Latn-IT-nedis', +//Language-Region: + 'de-DE', + 'en-US', + 'es-419', +//Private use subtags: + 'de-CH-x-phonebk', + 'az-Arab-x-AZE-derbend', +//Extended language subtags + 'zh-min', + 'zh-min-nan-Hant-CN', +//Private use registry values + 'x-whatever', + 'qaa-Qaaa-QM-x-southern', + 'sr-Latn-QM', + 'sr-Qaaa-CS', +/*Tags that use extensions (examples ONLY: extensions MUST be defined + by revision or update to this document or by RFC): */ + 'en-US-u-islamCal', + 'zh-CN-a-myExt-x-private', + 'en-a-myExt-b-another', +//Some Invalid Tags: + 'de-419-DE', + 'a-DE', + 'ar-a-aaa-b-bbb-a-ccc' + ); + + + $res_str = ''; + + foreach( $locales as $locale ) + { + $res_str .= "locale='$locale'\n"; + foreach( $disp_locales as $disp_locale ) + { + $scr = ut_loc_get_display_name( $locale ,$disp_locale ); + $scr = str_replace(array('(', ')'), '#', $scr); + $res_str .= "disp_locale=$disp_locale : display_name=$scr"; + $res_str .= "\n"; + } + $res_str .= "-----------------\n"; + } + + return $res_str; + +} + +include_once( 'ut_common.inc' ); +ut_run(); + +?> +--EXPECTREGEX-- +locale='sl_IT_nedis_KIRTI' +disp_locale=en : display_name=Slovenian #Italy, NEDIS_KIRTI# +disp_locale=fr : display_name=slovène #Italie, NEDIS_KIRTI# +disp_locale=de : display_name=Slowenisch #Italien, NEDIS_KIRTI# +----------------- +locale='sl_IT_nedis-a-kirti-x-xyz' +disp_locale=en : display_name=Slovenian #Italy, NEDIS_A_KIRTI_X_XYZ# +disp_locale=fr : display_name=slovène #Italie, NEDIS_A_KIRTI_X_XYZ# +disp_locale=de : display_name=Slowenisch #Italien, NEDIS_A_KIRTI_X_XYZ# +----------------- +locale='sl_IT_rozaj' +disp_locale=en : display_name=Slovenian #Italy, Resian# +disp_locale=fr : display_name=slovène #Italie, dialecte de Resia# +disp_locale=de : display_name=Slowenisch #Italien, (ROZAJ|Resianisch)# +----------------- +locale='sl_IT_NEDIS_ROJAZ_1901' +disp_locale=en : display_name=Slovenian #Italy, NEDIS_ROJAZ_1901# +disp_locale=fr : display_name=slovène #Italie, NEDIS_ROJAZ_1901# +disp_locale=de : display_name=Slowenisch #Italien, NEDIS_ROJAZ_1901# +----------------- +locale='i-enochian' +disp_locale=en : display_name=i-enochian #Private-Use=i-enochian# +disp_locale=fr : display_name=i-enochian #Usage privé=i-enochian# +disp_locale=de : display_name=i-enochian #Privatnutzung=i-enochian# +----------------- +locale='zh-hakka' +disp_locale=en : display_name=Chinese( #HAKKA#)? +disp_locale=fr : display_name=chinois( #HAKKA#)? +disp_locale=de : display_name=Chinesisch( #HAKKA#)? +----------------- +locale='zh-wuu' +disp_locale=en : display_name=Chinese #WUU# +disp_locale=fr : display_name=chinois #WUU# +disp_locale=de : display_name=Chinesisch #WUU# +----------------- +locale='i-tay' +disp_locale=en : display_name=i-tay +disp_locale=fr : display_name=i-tay +disp_locale=de : display_name=i-tay +----------------- +locale='sgn-BE-nl' +disp_locale=en : display_name=Sign Languages? #Belgium, NL# +disp_locale=fr : display_name=langues? des signes #Belgique, NL# +disp_locale=de : display_name=Gebärdensprache #Belgien, NL# +----------------- +locale='sgn-CH-de' +disp_locale=en : display_name=Sign Languages? #Switzerland, DE# +disp_locale=fr : display_name=langues? des signes #Suisse, DE# +disp_locale=de : display_name=Gebärdensprache #Schweiz, DE# +----------------- +locale='sl_IT_rozaj@currency=EUR' +disp_locale=en : display_name=Slovenian #Italy, Resian, [Cc]urrency=Euro# +disp_locale=fr : display_name=slovène #Italie, dialecte de Resia, [Dd]evise=euro# +disp_locale=de : display_name=Slowenisch #Italien, (ROZAJ|Resianisch), Währung=Euro# +----------------- +locale='uk-ua_CALIFORNIA@currency=;currency=GRN' +disp_locale=en : display_name=Ukrainian #Ukraine, CALIFORNIA, [Cc]urrency# +disp_locale=fr : display_name=ukrainien #Ukraine, CALIFORNIA, [Dd]evise# +disp_locale=de : display_name=Ukrainisch #Ukraine, CALIFORNIA, Währung# +----------------- +locale='root' +disp_locale=en : display_name=Root +disp_locale=fr : display_name=racine +disp_locale=de : display_name=[Rr]oot +----------------- +locale='uk@currency=EURO' +disp_locale=en : display_name=Ukrainian #[Cc]urrency=EURO# +disp_locale=fr : display_name=ukrainien #[Dd]evise=EURO# +disp_locale=de : display_name=Ukrainisch #Währung=EURO# +----------------- +locale='Hindi' +disp_locale=en : display_name=hindi +disp_locale=fr : display_name=hindi +disp_locale=de : display_name=hindi +----------------- +locale='de' +disp_locale=en : display_name=German +disp_locale=fr : display_name=allemand +disp_locale=de : display_name=Deutsch +----------------- +locale='fr' +disp_locale=en : display_name=French +disp_locale=fr : display_name=français +disp_locale=de : display_name=Französisch +----------------- +locale='ja' +disp_locale=en : display_name=Japanese +disp_locale=fr : display_name=japonais +disp_locale=de : display_name=Japanisch +----------------- +locale='i-enochian' +disp_locale=en : display_name=i-enochian #Private-Use=i-enochian# +disp_locale=fr : display_name=i-enochian #Usage privé=i-enochian# +disp_locale=de : display_name=i-enochian #Privatnutzung=i-enochian# +----------------- +locale='zh-Hant' +disp_locale=en : display_name=Chinese #Traditional# +disp_locale=fr : display_name=chinois #traditionnel# +disp_locale=de : display_name=Chinesisch #Traditionell# +----------------- +locale='zh-Hans' +disp_locale=en : display_name=Chinese #Simplified# +disp_locale=fr : display_name=chinois #simplifié# +disp_locale=de : display_name=Chinesisch #Vereinfacht# +----------------- +locale='sr-Cyrl' +disp_locale=en : display_name=Serbian #Cyrillic# +disp_locale=fr : display_name=serbe #cyrillique# +disp_locale=de : display_name=Serbisch #Kyrillisch# +----------------- +locale='sr-Latn' +disp_locale=en : display_name=Serbian #Latin# +disp_locale=fr : display_name=serbe #latin# +disp_locale=de : display_name=Serbisch #Lateinisch# +----------------- +locale='zh-Hans-CN' +disp_locale=en : display_name=Chinese #Simplified, China# +disp_locale=fr : display_name=chinois #simplifié, Chine# +disp_locale=de : display_name=Chinesisch #Vereinfacht, China# +----------------- +locale='sr-Latn-CS' +disp_locale=en : display_name=Serbian #Latin, Serbia# +disp_locale=fr : display_name=serbe #latin, Serbie# +disp_locale=de : display_name=Serbisch #Lateinisch, Serbien# +----------------- +locale='sl-rozaj' +disp_locale=en : display_name=Slovenian #Resian# +disp_locale=fr : display_name=slovène #dialecte de Resia# +disp_locale=de : display_name=Slowenisch( #(ROZAJ|Resianisch)#)? +----------------- +locale='sl-nedis' +disp_locale=en : display_name=Slovenian #Natisone dialect# +disp_locale=fr : display_name=slovène #dialecte de Natisone# +disp_locale=de : display_name=Slowenisch #Natisone-Dialekt# +----------------- +locale='de-CH-1901' +disp_locale=en : display_name=German #Switzerland, Traditional German orthography# +disp_locale=fr : display_name=allemand #Suisse, orthographe allemande traditionnelle# +disp_locale=de : display_name=Deutsch #Schweiz, (1901|[aA]lte deutsche Rechtschreibung)# +----------------- +locale='sl-IT-nedis' +disp_locale=en : display_name=Slovenian #Italy, Natisone dialect# +disp_locale=fr : display_name=slovène #Italie, dialecte de Natisone# +disp_locale=de : display_name=Slowenisch #Italien, (NEDIS|Natisone-Dialekt)# +----------------- +locale='sl-Latn-IT-nedis' +disp_locale=en : display_name=Slovenian #Latin, Italy, Natisone dialect# +disp_locale=fr : display_name=slovène #latin, Italie, dialecte de Natisone# +disp_locale=de : display_name=Slowenisch #Lateinisch, Italien, (NEDIS|Natisone-Dialekt)# +----------------- +locale='de-DE' +disp_locale=en : display_name=German #Germany# +disp_locale=fr : display_name=allemand #Allemagne# +disp_locale=de : display_name=Deutsch #Deutschland# +----------------- +locale='en-US' +disp_locale=en : display_name=English #United States# +disp_locale=fr : display_name=anglais #États-Unis# +disp_locale=de : display_name=Englisch #Vereinigte Staaten# +----------------- +locale='es-419' +disp_locale=en : display_name=Spanish #Latin America# +disp_locale=fr : display_name=espagnol #Amérique latine# +disp_locale=de : display_name=Spanisch #Lateinamerika# +----------------- +locale='de-CH-x-phonebk' +disp_locale=en : display_name=German #Switzerland, Private-Use=phonebk# +disp_locale=fr : display_name=allemand #Suisse, Usage privé=phonebk# +disp_locale=de : display_name=Deutsch #Schweiz, Privatnutzung=phonebk# +----------------- +locale='az-Arab-x-AZE-derbend' +disp_locale=en : display_name=Azerbaijani #Arabic, Private-Use=aze-derbend# +disp_locale=fr : display_name=azéri #arabe, Usage privé=aze-derbend# +disp_locale=de : display_name=Aserbaidschanisch #Arabisch, Privatnutzung=aze-derbend# +----------------- +locale='zh-min' +disp_locale=en : display_name=Chinese #MIN# +disp_locale=fr : display_name=chinois #MIN# +disp_locale=de : display_name=Chinesisch #MIN# +----------------- +locale='zh-min-nan-Hant-CN' +disp_locale=en : display_name=Chinese #MIN, NAN_HANT_CN# +disp_locale=fr : display_name=chinois #MIN, NAN_HANT_CN# +disp_locale=de : display_name=Chinesisch #MIN, NAN_HANT_CN# +----------------- +locale='x-whatever' +disp_locale=en : display_name=x-whatever #Private-Use=whatever# +disp_locale=fr : display_name=x-whatever #Usage privé=whatever# +disp_locale=de : display_name=x-whatever #Privatnutzung=whatever# +----------------- +locale='qaa-Qaaa-QM-x-southern' +disp_locale=en : display_name=qaa #Qaaa, QM, Private-Use=southern# +disp_locale=fr : display_name=qaa #Qaaa, QM, Usage privé=southern# +disp_locale=de : display_name=qaa #Qaaa, QM, Privatnutzung=southern# +----------------- +locale='sr-Latn-QM' +disp_locale=en : display_name=Serbian #Latin, QM# +disp_locale=fr : display_name=serbe #latin, QM# +disp_locale=de : display_name=Serbisch #Lateinisch, QM# +----------------- +locale='sr-Qaaa-CS' +disp_locale=en : display_name=Serbian #Qaaa, Serbia# +disp_locale=fr : display_name=serbe #Qaaa, Serbie# +disp_locale=de : display_name=Serbisch #Qaaa, Serbien# +----------------- +locale='en-US-u-islamCal' +disp_locale=en : display_name=English #United States, attribute=islamcal# +disp_locale=fr : display_name=anglais #États-Unis, attribute=islamcal# +disp_locale=de : display_name=Englisch #Vereinigte Staaten, attribute=islamcal# +----------------- +locale='zh-CN-a-myExt-x-private' +disp_locale=en : display_name=Chinese #China, a=myext, Private-Use=private# +disp_locale=fr : display_name=chinois #Chine, a=myext, Usage privé=private# +disp_locale=de : display_name=Chinesisch #China, a=myext, Privatnutzung=private# +----------------- +locale='en-a-myExt-b-another' +disp_locale=en : display_name=English #a=myext, b=another# +disp_locale=fr : display_name=anglais #a=myext, b=another# +disp_locale=de : display_name=Englisch #a=myext, b=another# +----------------- +locale='de-419-DE' +disp_locale=en : display_name=German #Latin America, DE# +disp_locale=fr : display_name=allemand #Amérique latine, DE# +disp_locale=de : display_name=Deutsch #Lateinamerika, DE# +----------------- +locale='a-DE' +disp_locale=en : display_name=a #Germany# +disp_locale=fr : display_name=a #Allemagne# +disp_locale=de : display_name=a #Deutschland# +----------------- +locale='ar-a-aaa-b-bbb-a-ccc' +disp_locale=en : display_name=Arabic #a=aaa, b=bbb# +disp_locale=fr : display_name=arabe #a=aaa, b=bbb# +disp_locale=de : display_name=Arabisch #a=aaa, b=bbb# +----------------- diff --git a/ext/intl/tests/locale_get_display_region2.phpt b/ext/intl/tests/locale_get_display_region2.phpt index f1b584188a..1d7354bd1b 100644 --- a/ext/intl/tests/locale_get_display_region2.phpt +++ b/ext/intl/tests/locale_get_display_region2.phpt @@ -1,8 +1,9 @@ --TEST-- -locale_get_display_region() icu >= 4.8 +locale_get_display_region() icu >= 4.8 && icu < 51.2 --SKIPIF-- <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> <?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> --FILE-- <?php diff --git a/ext/intl/tests/locale_get_display_region3.phpt b/ext/intl/tests/locale_get_display_region3.phpt new file mode 100644 index 0000000000..ec287a6446 --- /dev/null +++ b/ext/intl/tests/locale_get_display_region3.phpt @@ -0,0 +1,275 @@ +--TEST-- +locale_get_display_region() icu >= 51.2 +--SKIPIF-- +<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?> +--FILE-- +<?php + +/* + * Try getting the display_region for different locales + * with Procedural and Object methods. + */ + +function ut_main() +{ + $res_str = ''; + + $disp_locales=array('en','fr','de'); + + $locales = array( + 'uk-ua_CALIFORNIA@currency=;currency=GRN', + 'root', + 'uk@currency=EURO', + 'Hindi', +//Simple language subtag + 'de', + 'fr', + 'ja', + 'i-enochian', //(example of a grandfathered tag) +//Language subtag plus Script subtag: + 'zh-Hant', + 'zh-Hans', + 'sr-Cyrl', + 'sr-Latn', +//Language-Script-Region + 'zh-Hans-CN', + 'sr-Latn-CS', +//Language-Variant + 'sl-rozaj', + 'sl-nedis', +//Language-Region-Variant + 'de-CH-1901', + 'sl-IT-nedis', +//Language-Script-Region-Variant + 'sl-Latn-IT-nedis', +//Language-Region: + 'de-DE', + 'en-US', + 'es-419', +//Private use subtags: + 'de-CH-x-phonebk', + 'az-Arab-x-AZE-derbend', +//Extended language subtags + 'zh-min', + 'zh-min-nan-Hant-CN', +//Private use registry values + 'x-whatever', + 'qaa-Qaaa-QM-x-southern', + 'sr-Latn-QM', + 'sr-Qaaa-CS', +/*Tags that use extensions (examples ONLY: extensions MUST be defined + by revision or update to this document or by RFC): */ + 'en-US-u-islamCal', + 'zh-CN-a-myExt-x-private', + 'en-a-myExt-b-another', +//Some Invalid Tags: + 'de-419-DE', + 'a-DE', + 'ar-a-aaa-b-bbb-a-ccc' + ); + + + $res_str = ''; + + foreach( $locales as $locale ) + { + $res_str .= "locale='$locale'\n"; + foreach( $disp_locales as $disp_locale ) + { + $scr = ut_loc_get_display_region( $locale ,$disp_locale ); + $res_str .= "disp_locale=$disp_locale : display_region=$scr"; + $res_str .= "\n"; + } + $res_str .= "-----------------\n"; + } + + return $res_str; + +} + +include_once( 'ut_common.inc' ); +ut_run(); + +?> +--EXPECTREGEX-- +locale='uk-ua_CALIFORNIA@currency=;currency=GRN' +disp_locale=en : display_region=Ukraine +disp_locale=fr : display_region=Ukraine +disp_locale=de : display_region=Ukraine +----------------- +locale='root' +disp_locale=en : display_region= +disp_locale=fr : display_region= +disp_locale=de : display_region= +----------------- +locale='uk@currency=EURO' +disp_locale=en : display_region= +disp_locale=fr : display_region= +disp_locale=de : display_region= +----------------- +locale='Hindi' +disp_locale=en : display_region= +disp_locale=fr : display_region= +disp_locale=de : display_region= +----------------- +locale='de' +disp_locale=en : display_region= +disp_locale=fr : display_region= +disp_locale=de : display_region= +----------------- +locale='fr' +disp_locale=en : display_region= +disp_locale=fr : display_region= +disp_locale=de : display_region= +----------------- +locale='ja' +disp_locale=en : display_region= +disp_locale=fr : display_region= +disp_locale=de : display_region= +----------------- +locale='i-enochian' +disp_locale=en : display_region= +disp_locale=fr : display_region= +disp_locale=de : display_region= +----------------- +locale='zh-Hant' +disp_locale=en : display_region= +disp_locale=fr : display_region= +disp_locale=de : display_region= +----------------- +locale='zh-Hans' +disp_locale=en : display_region= +disp_locale=fr : display_region= +disp_locale=de : display_region= +----------------- +locale='sr-Cyrl' +disp_locale=en : display_region= +disp_locale=fr : display_region= +disp_locale=de : display_region= +----------------- +locale='sr-Latn' +disp_locale=en : display_region= +disp_locale=fr : display_region= +disp_locale=de : display_region= +----------------- +locale='zh-Hans-CN' +disp_locale=en : display_region=China +disp_locale=fr : display_region=Chine +disp_locale=de : display_region=China +----------------- +locale='sr-Latn-CS' +disp_locale=en : display_region=Serbia +disp_locale=fr : display_region=Serbie +disp_locale=de : display_region=Serbien +----------------- +locale='sl-rozaj' +disp_locale=en : display_region=(ROZAJ)? +disp_locale=fr : display_region=(ROZAJ)? +disp_locale=de : display_region=(ROZAJ)? +----------------- +locale='sl-nedis' +disp_locale=en : display_region=(NEDIS)? +disp_locale=fr : display_region=(NEDIS)? +disp_locale=de : display_region=(NEDIS)? +----------------- +locale='de-CH-1901' +disp_locale=en : display_region=Switzerland +disp_locale=fr : display_region=Suisse +disp_locale=de : display_region=Schweiz +----------------- +locale='sl-IT-nedis' +disp_locale=en : display_region=Italy +disp_locale=fr : display_region=Italie +disp_locale=de : display_region=Italien +----------------- +locale='sl-Latn-IT-nedis' +disp_locale=en : display_region=Italy +disp_locale=fr : display_region=Italie +disp_locale=de : display_region=Italien +----------------- +locale='de-DE' +disp_locale=en : display_region=Germany +disp_locale=fr : display_region=Allemagne +disp_locale=de : display_region=Deutschland +----------------- +locale='en-US' +disp_locale=en : display_region=United States +disp_locale=fr : display_region=États-Unis +disp_locale=de : display_region=Vereinigte Staaten +----------------- +locale='es-419' +disp_locale=en : display_region=Latin America +disp_locale=fr : display_region=Amérique latine +disp_locale=de : display_region=Lateinamerika +----------------- +locale='de-CH-x-phonebk' +disp_locale=en : display_region=Switzerland +disp_locale=fr : display_region=Suisse +disp_locale=de : display_region=Schweiz +----------------- +locale='az-Arab-x-AZE-derbend' +disp_locale=en : display_region=X? +disp_locale=fr : display_region=X? +disp_locale=de : display_region=X? +----------------- +locale='zh-min' +disp_locale=en : display_region= +disp_locale=fr : display_region= +disp_locale=de : display_region= +----------------- +locale='zh-min-nan-Hant-CN' +disp_locale=en : display_region=MIN +disp_locale=fr : display_region=MIN +disp_locale=de : display_region=MIN +----------------- +locale='x-whatever' +disp_locale=en : display_region= +disp_locale=fr : display_region= +disp_locale=de : display_region= +----------------- +locale='qaa-Qaaa-QM-x-southern' +disp_locale=en : display_region=QM +disp_locale=fr : display_region=QM +disp_locale=de : display_region=QM +----------------- +locale='sr-Latn-QM' +disp_locale=en : display_region=QM +disp_locale=fr : display_region=QM +disp_locale=de : display_region=QM +----------------- +locale='sr-Qaaa-CS' +disp_locale=en : display_region=Serbia +disp_locale=fr : display_region=Serbie +disp_locale=de : display_region=Serbien +----------------- +locale='en-US-u-islamCal' +disp_locale=en : display_region=United States +disp_locale=fr : display_region=États-Unis +disp_locale=de : display_region=Vereinigte Staaten +----------------- +locale='zh-CN-a-myExt-x-private' +disp_locale=en : display_region=China +disp_locale=fr : display_region=Chine +disp_locale=de : display_region=China +----------------- +locale='en-a-myExt-b-another' +disp_locale=en : display_region=A? +disp_locale=fr : display_region=A? +disp_locale=de : display_region=A? +----------------- +locale='de-419-DE' +disp_locale=en : display_region=Latin America +disp_locale=fr : display_region=Amérique latine +disp_locale=de : display_region=Lateinamerika +----------------- +locale='a-DE' +disp_locale=en : display_region=Germany +disp_locale=fr : display_region=Allemagne +disp_locale=de : display_region=Deutschland +----------------- +locale='ar-a-aaa-b-bbb-a-ccc' +disp_locale=en : display_region=A? +disp_locale=fr : display_region=A? +disp_locale=de : display_region=A? +----------------- diff --git a/ext/intl/tests/locale_lookup.phpt b/ext/intl/tests/locale_lookup.phpt index f0affafa6f..df5204f07d 100644 --- a/ext/intl/tests/locale_lookup.phpt +++ b/ext/intl/tests/locale_lookup.phpt @@ -2,6 +2,7 @@ locale_lookup.phpt() --SKIPIF-- <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> --FILE-- <?php diff --git a/ext/intl/tests/locale_lookup_variant2.phpt b/ext/intl/tests/locale_lookup_variant2.phpt new file mode 100644 index 0000000000..4715951e9a --- /dev/null +++ b/ext/intl/tests/locale_lookup_variant2.phpt @@ -0,0 +1,100 @@ +--TEST-- +locale_lookup.phpt() +--SKIPIF-- +<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?> +--FILE-- +<?php + +/* + * Try parsing different Locales + * with Procedural and Object methods. + */ + +function ut_main() +{ + $loc_ranges = array( + 'de-de', + 'sl_IT', + 'sl_IT_Nedis', + 'jbo', + 'art-lojban' + ); + + $lang_tags = array( + 'de-DEVA', + 'de-DE-1996', + 'de-DE', + 'zh_Hans', + 'de-CH-1996', + 'sl_IT', + 'sl_IT_nedis-a-kirti-x-xyz', + 'sl_IT_rozaj', + 'sl_IT_NEDIS_ROJAZ_1901', + 'i-enochian', + 'sgn-CH-de', + 'art-lojban', + 'i-lux', + 'art-lojban', + 'jbo', + 'en_sl_IT', + 'zh-Hant-CN-x-prv1-prv2' + ); + + + $res_str = ''; + $isCanonical = false; + + foreach($loc_ranges as $loc_range){ + $res_str .="--------------\n"; + $result= ut_loc_locale_lookup( $lang_tags , $loc_range,$isCanonical,"en_US"); + $comma_arr =implode(",",$lang_tags); + $res_str .= "loc_range:$loc_range \nlang_tags: $comma_arr\n"; + $res_str .= "\nlookup result:$result\n"; +//canonicalized version + $result= ut_loc_locale_lookup( $lang_tags , $loc_range,!($isCanonical),"en_US"); + $can_loc_range = ut_loc_canonicalize($loc_range); + $res_str .= "Canonical lookup result:$result\n"; + + } + + $res_str .= "\n"; + return $res_str; + +} + +include_once( 'ut_common.inc' ); +ut_run(); + +?> +--EXPECT-- +-------------- +loc_range:de-de +lang_tags: de-DEVA,de-DE-1996,de-DE,zh_Hans,de-CH-1996,sl_IT,sl_IT_nedis-a-kirti-x-xyz,sl_IT_rozaj,sl_IT_NEDIS_ROJAZ_1901,i-enochian,sgn-CH-de,art-lojban,i-lux,art-lojban,jbo,en_sl_IT,zh-Hant-CN-x-prv1-prv2 + +lookup result:de-DE +Canonical lookup result:de_de +-------------- +loc_range:sl_IT +lang_tags: de-DEVA,de-DE-1996,de-DE,zh_Hans,de-CH-1996,sl_IT,sl_IT_nedis-a-kirti-x-xyz,sl_IT_rozaj,sl_IT_NEDIS_ROJAZ_1901,i-enochian,sgn-CH-de,art-lojban,i-lux,art-lojban,jbo,en_sl_IT,zh-Hant-CN-x-prv1-prv2 + +lookup result:sl_IT +Canonical lookup result:sl_it +-------------- +loc_range:sl_IT_Nedis +lang_tags: de-DEVA,de-DE-1996,de-DE,zh_Hans,de-CH-1996,sl_IT,sl_IT_nedis-a-kirti-x-xyz,sl_IT_rozaj,sl_IT_NEDIS_ROJAZ_1901,i-enochian,sgn-CH-de,art-lojban,i-lux,art-lojban,jbo,en_sl_IT,zh-Hant-CN-x-prv1-prv2 + +lookup result:sl_IT +Canonical lookup result:sl_it +-------------- +loc_range:jbo +lang_tags: de-DEVA,de-DE-1996,de-DE,zh_Hans,de-CH-1996,sl_IT,sl_IT_nedis-a-kirti-x-xyz,sl_IT_rozaj,sl_IT_NEDIS_ROJAZ_1901,i-enochian,sgn-CH-de,art-lojban,i-lux,art-lojban,jbo,en_sl_IT,zh-Hant-CN-x-prv1-prv2 + +lookup result:jbo +Canonical lookup result:jbo +-------------- +loc_range:art-lojban +lang_tags: de-DEVA,de-DE-1996,de-DE,zh_Hans,de-CH-1996,sl_IT,sl_IT_nedis-a-kirti-x-xyz,sl_IT_rozaj,sl_IT_NEDIS_ROJAZ_1901,i-enochian,sgn-CH-de,art-lojban,i-lux,art-lojban,jbo,en_sl_IT,zh-Hant-CN-x-prv1-prv2 + +lookup result:art-lojban +Canonical lookup result:art__lojban diff --git a/ext/intl/tests/msgfmt_format_intlcalendar.phpt b/ext/intl/tests/msgfmt_format_intlcalendar.phpt index 6ae78a9140..a6bff2ecdd 100644 --- a/ext/intl/tests/msgfmt_format_intlcalendar.phpt +++ b/ext/intl/tests/msgfmt_format_intlcalendar.phpt @@ -2,8 +2,8 @@ MessageFormat accepts IntlCalendar args --SKIPIF-- <?php -if (!extension_loaded('intl')) - die('skip intl extension not enabled'); +if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> --FILE-- <?php ini_set("intl.error_level", E_WARNING); @@ -27,4 +27,4 @@ echo "msgf2: ", $msgf->format(array($time, 'date')), " ", ==DONE== --EXPECT-- Quinta-feira, 17 de Maio de 2012 5:35:36 p.m. WEST -==DONE==
\ No newline at end of file +==DONE== diff --git a/ext/intl/tests/msgfmt_format_intlcalendar_variant2.phpt b/ext/intl/tests/msgfmt_format_intlcalendar_variant2.phpt new file mode 100644 index 0000000000..f2d16b899d --- /dev/null +++ b/ext/intl/tests/msgfmt_format_intlcalendar_variant2.phpt @@ -0,0 +1,30 @@ +--TEST-- +MessageFormat accepts IntlCalendar args +--SKIPIF-- +<?php +if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?> +--FILE-- +<?php +ini_set("intl.error_level", E_WARNING); +//ini_set("intl.default_locale", "nl"); +ini_set('date.timezone', 'Europe/Lisbon'); + +$cal = new IntlGregorianCalendar(2012,04,17,17,35,36); + +$msgf = new MessageFormatter('pt_PT', '{0,date,full} {0,time,h:m:s a V}'); +echo $msgf->format(array($cal)), "\n"; + +//NOT FIXED: +/*$msgf = new MessageFormatter('en_US', +'{1, select, date {{0,date,full}} other {{0,time,h:m:s a V}}}'); + +echo "msgf2: ", $msgf->format(array($time, 'date')), " ", + $msgf->format(array($time, 'time')), "\n"; +*/ + +?> +==DONE== +--EXPECT-- +Quinta-feira, 17 de Maio de 2012 5:35:36 PM ptlis +==DONE== diff --git a/ext/intl/tests/resourcebundle_null_mandatory_args.phpt b/ext/intl/tests/resourcebundle_null_mandatory_args.phpt index 17fab6d630..bbbc1b1e91 100644 --- a/ext/intl/tests/resourcebundle_null_mandatory_args.phpt +++ b/ext/intl/tests/resourcebundle_null_mandatory_args.phpt @@ -3,11 +3,9 @@ ResourceBundle constructor bundle accepts NULL for first two arguments --INI-- date.timezone=Atlantic/Azores --SKIPIF-- -<?php -if (!extension_loaded('intl')) - die('skip intl extension not enabled'); -if (version_compare(INTL_ICU_VERSION, '4.8') < 0) - die('skip ICU >= 4.8 only'); +<?php if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?> +<?php if (version_compare(INTL_ICU_VERSION, '4.8') < 0) die('skip ICU >= 4.8 only'); ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> --FILE-- <?php ini_set("intl.error_level", E_WARNING); diff --git a/ext/intl/tests/resourcebundle_null_mandatory_args_variant2.phpt b/ext/intl/tests/resourcebundle_null_mandatory_args_variant2.phpt new file mode 100644 index 0000000000..cf721c8ef2 --- /dev/null +++ b/ext/intl/tests/resourcebundle_null_mandatory_args_variant2.phpt @@ -0,0 +1,26 @@ +--TEST-- +ResourceBundle constructor bundle accepts NULL for first two arguments +--INI-- +date.timezone=Atlantic/Azores +--SKIPIF-- +<?php +if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?> +--FILE-- +<?php +ini_set("intl.error_level", E_WARNING); + +$r = new ResourceBundle('en_US', NULL); +$c = $r->get('calendar')->get('gregorian')->get('DateTimePatterns')->get(0); +var_dump($c); + +ini_set('intl.default_locale', 'pt_PT'); +$r = new ResourceBundle(NULL, NULL); +$c = $r->get('calendar')->get('gregorian')->get('DateTimePatterns')->get(0); +var_dump($c); +?> +==DONE== +--EXPECT-- +string(14) "h:mm:ss a zzzz" +string(13) "HH:mm:ss zzzz" +==DONE== diff --git a/ext/intl/tests/timezone_getDisplayName_variant2-49+.phpt b/ext/intl/tests/timezone_getDisplayName_variant2-49+.phpt index 4ee30aee12..8f60f29040 100644 --- a/ext/intl/tests/timezone_getDisplayName_variant2-49+.phpt +++ b/ext/intl/tests/timezone_getDisplayName_variant2-49+.phpt @@ -1,11 +1,9 @@ --TEST-- -IntlTimeZone::getDisplayName(): type parameter (ICU >= 49) +IntlTimeZone::getDisplayName(): type parameter (ICU >= 49 && ICU < 51.2) --SKIPIF-- -<?php -if (!extension_loaded('intl')) - die('skip intl extension not enabled'); -if (version_compare(INTL_ICU_VERSION, '49') < 0) - die('skip for ICU 49+'); +<?php if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?> +<?php if (version_compare(INTL_ICU_VERSION, '49') < 0) die('skip for ICU 49+'); ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> --FILE-- <?php ini_set("intl.error_level", E_WARNING); @@ -35,4 +33,4 @@ string(5) "+0000" string(3) "GMT" string(3) "GMT" string(22) "Portugal Time (Lisbon)" -==DONE==
\ No newline at end of file +==DONE==
diff --git a/ext/intl/tests/timezone_getDisplayName_variant4.phpt b/ext/intl/tests/timezone_getDisplayName_variant4.phpt new file mode 100644 index 0000000000..39e28892a4 --- /dev/null +++ b/ext/intl/tests/timezone_getDisplayName_variant4.phpt @@ -0,0 +1,35 @@ +--TEST-- +IntlTimeZone::getDisplayName(): type parameter (ICU >= 51.2) +--SKIPIF-- +<?php if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?> +--FILE-- +<?php +ini_set("intl.error_level", E_WARNING); +ini_set("error_reporting", -1); +ini_set("display_errors", 1); + +$lsb = IntlTimeZone::createTimeZone('Europe/Lisbon'); + +ini_set('intl.default_locale', 'en_US'); +var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT)); +var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG)); +var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT_GENERIC)); +var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG_GENERIC)); +var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT_GMT)); +var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG_GMT)); +var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT_COMMONLY_USED)); +var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_GENERIC_LOCATION)); + +?> +==DONE== +--EXPECT-- +string(3) "GMT" +string(30) "Western European Standard Time" +string(13) "Portugal Time" +string(21) "Western European Time" +string(5) "+0000" +string(3) "GMT" +string(3) "GMT" +string(13) "Portugal Time" +==DONE==
diff --git a/ext/ldap/config.m4 b/ext/ldap/config.m4 index 3c8e23ea8e..2804cd5968 100644 --- a/ext/ldap/config.m4 +++ b/ext/ldap/config.m4 @@ -15,6 +15,28 @@ AC_DEFUN([PHP_LDAP_CHECKS], [ LDAP_DIR=$1 LDAP_INCDIR=$1/ldap/public LDAP_LIBDIR=$1/$PHP_LIBDIR + else + + dnl Find Oracle Instant Client RPM header location corresponding to the given lib path e.g. for --with-ldap=/usr/lib/oracle/12.1/client64/lib + AC_CHECK_SIZEOF(long int, 4) + if test "$ac_cv_sizeof_long_int" = "4"; then + PHP_OCI8_IC_LIBDIR_SUFFIX="" + else + PHP_OCI8_IC_LIBDIR_SUFFIX=64 + fi + OCISDKRPMINC=`echo "$1" | $SED -e 's!^/usr/lib/oracle/\(.*\)/client\('${PHP_OCI8_IC_LIBDIR_SUFFIX}'\)*/lib[/]*$!/usr/include/oracle/\1/client\2!'` + + dnl Check for Oracle Instant Client RPM install + if test -f $OCISDKRPMINC/ldap.h; then + LDAP_DIR=$1 + LDAP_INCDIR=$OCISDKRPMINC + LDAP_LIBDIR=$1 + dnl Check for Oracle Instant Client ZIP install + elif test -f $1/sdk/include/ldap.h; then + LDAP_DIR=$1 + LDAP_INCDIR=$1/sdk/include + LDAP_LIBDIR=$1 + fi fi ]) @@ -143,12 +165,21 @@ if test "$PHP_LDAP" != "no"; then PHP_ADD_LIBRARY_WITH_PATH(umich_lber, $LDAP_LIBDIR, LDAP_SHARED_LIBADD) PHP_ADD_LIBRARY_WITH_PATH(umich_ldap, $LDAP_LIBDIR, LDAP_SHARED_LIBADD) - elif test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME; then + elif test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME.12.1; then PHP_ADD_LIBRARY_WITH_PATH(clntsh, $LDAP_LIBDIR, LDAP_SHARED_LIBADD) AC_DEFINE(HAVE_ORALDAP,1,[ ]) - if test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME.10.1; then - AC_DEFINE(HAVE_ORALDAP_10,1,[ ]) - fi + AC_DEFINE(HAVE_ORALDAP_12,1,[ ]) + + elif test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME.11.1; then + PHP_ADD_LIBRARY_WITH_PATH(clntsh, $LDAP_LIBDIR, LDAP_SHARED_LIBADD) + AC_DEFINE(HAVE_ORALDAP,1,[ ]) + AC_DEFINE(HAVE_ORALDAP_11,1,[ ]) + + elif test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME; then + PHP_ADD_LIBRARY_WITH_PATH(clntsh, $LDAP_LIBDIR, LDAP_SHARED_LIBADD) + AC_DEFINE(HAVE_ORALDAP,1,[ ]) + AC_DEFINE(HAVE_ORALDAP_10,1,[ ]) + else AC_MSG_ERROR(Cannot find ldap libraries in $LDAP_LIBDIR.) fi diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 3cfa2092e7..e95f898c15 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -152,7 +152,7 @@ PHP_MINIT_FUNCTION(ldap) REGISTER_LONG_CONSTANT("LDAP_DEREF_FINDING", LDAP_DEREF_FINDING, CONST_PERSISTENT | CONST_CS); REGISTER_LONG_CONSTANT("LDAP_DEREF_ALWAYS", LDAP_DEREF_ALWAYS, CONST_PERSISTENT | CONST_CS); -#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP_10 +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP /* LDAP options */ REGISTER_LONG_CONSTANT("LDAP_OPT_DEREF", LDAP_OPT_DEREF, CONST_PERSISTENT | CONST_CS); REGISTER_LONG_CONSTANT("LDAP_OPT_SIZELIMIT", LDAP_OPT_SIZELIMIT, CONST_PERSISTENT | CONST_CS); @@ -361,7 +361,7 @@ PHP_FUNCTION(ldap_connect) static int _get_lderrno(LDAP *ldap) { #if !HAVE_NSLDAP -#if LDAP_API_VERSION > 2000 || HAVE_ORALDAP_10 +#if LDAP_API_VERSION > 2000 || HAVE_ORALDAP int lderr; /* New versions of OpenLDAP do it this way */ @@ -550,7 +550,7 @@ static void php_set_opts(LDAP *ldap, int sizelimit, int timelimit, int deref, in { /* sizelimit */ if (sizelimit > -1) { -#if (LDAP_API_VERSION >= 2004) || HAVE_NSLDAP || HAVE_ORALDAP_10 +#if (LDAP_API_VERSION >= 2004) || HAVE_NSLDAP || HAVE_ORALDAP ldap_get_option(ldap, LDAP_OPT_SIZELIMIT, old_sizelimit); ldap_set_option(ldap, LDAP_OPT_SIZELIMIT, &sizelimit); #else @@ -561,7 +561,7 @@ static void php_set_opts(LDAP *ldap, int sizelimit, int timelimit, int deref, in /* timelimit */ if (timelimit > -1) { -#if (LDAP_API_VERSION >= 2004) || HAVE_NSLDAP || HAVE_ORALDAP_10 +#if (LDAP_API_VERSION >= 2004) || HAVE_NSLDAP || HAVE_ORALDAP ldap_get_option(ldap, LDAP_OPT_SIZELIMIT, old_timelimit); ldap_set_option(ldap, LDAP_OPT_TIMELIMIT, &timelimit); #else @@ -572,7 +572,7 @@ static void php_set_opts(LDAP *ldap, int sizelimit, int timelimit, int deref, in /* deref */ if (deref > -1) { -#if (LDAP_API_VERSION >= 2004) || HAVE_NSLDAP || HAVE_ORALDAP_10 +#if (LDAP_API_VERSION >= 2004) || HAVE_NSLDAP || HAVE_ORALDAP ldap_get_option(ldap, LDAP_OPT_SIZELIMIT, old_deref); ldap_set_option(ldap, LDAP_OPT_DEREF, &deref); #else @@ -975,12 +975,12 @@ PHP_FUNCTION(ldap_get_entries) add_index_string(tmp1, num_attrib, attribute, 1); num_attrib++; -#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP_10 || WINDOWS +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP || WINDOWS ldap_memfree(attribute); #endif attribute = ldap_next_attribute(ldap, ldap_result_entry, ber); } -#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP_10 || WINDOWS +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP || WINDOWS if (ber != NULL) { ber_free(ber, 0); } @@ -989,7 +989,7 @@ PHP_FUNCTION(ldap_get_entries) add_assoc_long(tmp1, "count", num_attrib); dn = ldap_get_dn(ldap, ldap_result_entry); add_assoc_string(tmp1, "dn", dn, 1); -#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP_10 || WINDOWS +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP || WINDOWS ldap_memfree(dn); #else free(dn); @@ -1027,7 +1027,7 @@ PHP_FUNCTION(ldap_first_attribute) RETURN_FALSE; } else { RETVAL_STRING(attribute, 1); -#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP_10 || WINDOWS +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP || WINDOWS ldap_memfree(attribute); #endif } @@ -1057,7 +1057,7 @@ PHP_FUNCTION(ldap_next_attribute) } if ((attribute = ldap_next_attribute(ld->link, resultentry->data, resultentry->ber)) == NULL) { -#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP_10 || WINDOWS +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP || WINDOWS if (resultentry->ber != NULL) { ber_free(resultentry->ber, 0); resultentry->ber = NULL; @@ -1066,7 +1066,7 @@ PHP_FUNCTION(ldap_next_attribute) RETURN_FALSE; } else { RETVAL_STRING(attribute, 1); -#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP_10 || WINDOWS +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP || WINDOWS ldap_memfree(attribute); #endif } @@ -1113,12 +1113,12 @@ PHP_FUNCTION(ldap_get_attributes) add_index_string(return_value, num_attrib, attribute, 1); num_attrib++; -#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP_10 || WINDOWS +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP || WINDOWS ldap_memfree(attribute); #endif attribute = ldap_next_attribute(ld->link, resultentry->data, ber); } -#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP_10 || WINDOWS +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP || WINDOWS if (ber != NULL) { ber_free(ber, 0); } @@ -1183,7 +1183,7 @@ PHP_FUNCTION(ldap_get_dn) text = ldap_get_dn(ld->link, resultentry->data); if (text != NULL) { RETVAL_STRING(text, 1); -#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP_10 || WINDOWS +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP || WINDOWS ldap_memfree(text); #else free(text); @@ -1241,7 +1241,7 @@ PHP_FUNCTION(ldap_dn2ufn) if (ufn != NULL) { RETVAL_STRING(ufn, 1); -#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP_10 || WINDOWS +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP || WINDOWS ldap_memfree(ufn); #endif } else { @@ -1546,7 +1546,7 @@ PHP_FUNCTION(ldap_sort) } /* }}} */ -#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP_10 +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP /* {{{ proto bool ldap_get_option(resource link, int option, mixed retval) Get the current value of various session-wide parameters */ PHP_FUNCTION(ldap_get_option) @@ -2003,7 +2003,7 @@ PHP_FUNCTION(ldap_rename) newparent = NULL; } -#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP_10 +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP rc = ldap_rename_s(ld->link, dn, newrdn, newparent, deleteoldrdn, NULL, NULL); #else if (newparent_len != 0) { @@ -2047,7 +2047,7 @@ PHP_FUNCTION(ldap_start_tls) } /* }}} */ #endif -#endif /* (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP_10 */ +#endif /* (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP */ #if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC) /* {{{ _ldap_rebind_proc() @@ -2107,6 +2107,7 @@ PHP_FUNCTION(ldap_set_rebind_proc) /* unregister rebind procedure */ if (ld->rebindproc != NULL) { zval_dtor(ld->rebindproc); + FREE_ZVAL(ld->rebindproc); ld->rebindproc = NULL; ldap_set_rebind_proc(ld->link, NULL, NULL); } @@ -2566,7 +2567,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_control_paged_result_response, 0, 0, 2) ZEND_END_ARG_INFO(); #endif -#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP_10 +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_rename, 0, 0, 5) ZEND_ARG_INFO(0, link_identifier) ZEND_ARG_INFO(0, dn) @@ -2682,7 +2683,7 @@ const zend_function_entry ldap_functions[] = { PHP_FE(ldap_compare, arginfo_ldap_compare) PHP_FE(ldap_sort, arginfo_ldap_sort) -#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP_10 +#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP PHP_FE(ldap_rename, arginfo_ldap_rename) PHP_FE(ldap_get_option, arginfo_ldap_get_option) PHP_FE(ldap_set_option, arginfo_ldap_set_option) diff --git a/ext/ldap/tests/ldap_search_variation6.phpt b/ext/ldap/tests/ldap_search_variation6.phpt index a29e4524df..5139ebb77d 100644 --- a/ext/ldap/tests/ldap_search_variation6.phpt +++ b/ext/ldap/tests/ldap_search_variation6.phpt @@ -217,14 +217,26 @@ array(2) { [1]=> resource(%d) of type (ldap result) } -NULL -NULL +array(1) { + ["count"]=> + int(0) +} +array(1) { + ["count"]=> + int(0) +} array(2) { [0]=> resource(%d) of type (ldap result) [1]=> resource(%d) of type (ldap result) } -NULL -NULL +array(1) { + ["count"]=> + int(0) +} +array(1) { + ["count"]=> + int(0) +} ===DONE=== diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c index 4deb02960c..03e9633cae 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c @@ -142,7 +142,7 @@ const struct mbfl_convert_vtbl vtbl_wchar_2022jp_kddi = { int mbfl_filt_conv_2022jp_mobile_wchar(int c, mbfl_convert_filter *filter) { - int c1, s, w, snd; + int c1, s, w, snd = 0; retry: switch (filter->status & 0xf) { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c index 4e1838f060..87bb2f21fd 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c @@ -134,7 +134,7 @@ int mbfl_filt_conv_jis2004_wchar(int c, mbfl_convert_filter *filter) { int k; - int c1, c2, s, s1, s2, w = 0, w1; + int c1, c2, s, s1 = 0, s2 = 0, w = 0, w1; retry: switch (filter->status & 0xf) { diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c index 7a549af666..93ac34644a 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c @@ -605,7 +605,7 @@ mbfilter_unicode2sjis_emoji_sb(int c, int *s1, mbfl_convert_filter *filter) int mbfl_filt_conv_sjis_mobile_wchar(int c, mbfl_convert_filter *filter) { - int c1, s, s1, s2, w; + int c1, s, s1 = 0, s2 = 0, w; int snd = 0; retry: diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.c b/ext/mbstring/libmbfl/mbfl/mbfilter.c index b3759f940d..3b14727d6b 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.c @@ -985,7 +985,7 @@ mbfl_strpos( { int result; mbfl_string _haystack_u8, _needle_u8; - const mbfl_string *haystack_u8, *needle_u8; + const mbfl_string *haystack_u8, *needle_u8 = NULL; const unsigned char *u8_tbl; if (haystack == NULL || haystack->val == NULL || needle == NULL || needle->val == NULL) { diff --git a/ext/mysql/tests/bug55473.phpt b/ext/mysql/tests/bug55473.phpt index 1cc2dc9282..98fd0091dc 100644 --- a/ext/mysql/tests/bug55473.phpt +++ b/ext/mysql/tests/bug55473.phpt @@ -69,18 +69,26 @@ mysql.allow_persistent=1 ?> --EXPECTF-- Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Warning: mysql_ping(): MySQL server has gone away in %s on line %d [003] reconnect 0 Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d [005] Setting openened files... + +Warning: mysql_ping(): MySQL server has gone away in %s on line %d [003] reconnect 1 Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d [007] Opened files as expected + +Warning: mysql_ping(): MySQL server has gone away in %s on line %d [003] reconnect 2 Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d [007] Opened files as expected + +Warning: mysql_ping(): MySQL server has gone away in %s on line %d [003] reconnect 3 Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d diff --git a/ext/opcache/Optimizer/block_pass.c b/ext/opcache/Optimizer/block_pass.c index 7f874e7a4b..1c34cffbf7 100644 --- a/ext/opcache/Optimizer/block_pass.c +++ b/ext/opcache/Optimizer/block_pass.c @@ -562,7 +562,6 @@ static void strip_nop(zend_code_block *block) { zend_op *opline = block->start_opline; zend_op *end, *new_end; - int new_len = 0; /* remove leading NOPs */ while (block->len > 0 && block->start_opline->opcode == ZEND_NOP) { @@ -1284,11 +1283,15 @@ static void assemble_code_blocks(zend_cfg *cfg, zend_op_array *op_array) /* adjust exception jump targets */ if (op_array->last_try_catch) { - int i; - for (i = 0; i< op_array->last_try_catch; i++) { - op_array->try_catch_array[i].try_op = cfg->try[i]->start_opline - new_opcodes; - op_array->try_catch_array[i].catch_op = cfg->catch[i]->start_opline - new_opcodes; + int i, j; + for (i = 0, j = 0; i< op_array->last_try_catch; i++) { + if (cfg->try[i]->access) { + op_array->try_catch_array[j].try_op = cfg->try[i]->start_opline - new_opcodes; + op_array->try_catch_array[j].catch_op = cfg->catch[i]->start_opline - new_opcodes; + j++; + } } + op_array->last_try_catch = j; efree(cfg->try); efree(cfg->catch); } diff --git a/ext/opcache/Optimizer/pass1_5.c b/ext/opcache/Optimizer/pass1_5.c index 46406c383e..70ec6d5e2e 100644 --- a/ext/opcache/Optimizer/pass1_5.c +++ b/ext/opcache/Optimizer/pass1_5.c @@ -37,7 +37,6 @@ if (ZEND_OPTIMIZER_PASS_1 & OPTIMIZATION_LEVEL) { int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC) = get_binary_op(opline->opcode); zend_uint tv = ZEND_RESULT(opline).var; /* temporary variable */ zval result; - zend_op *tmp_opline; int er; if (opline->opcode == ZEND_DIV && @@ -61,95 +60,7 @@ if (ZEND_OPTIMIZER_PASS_1 & OPTIMIZATION_LEVEL) { literal_dtor(&ZEND_OP2_LITERAL(opline)); MAKE_NOP(opline); - /* substitute the following TMP_VAR usage with constant */ - for (tmp_opline = opline + 1; tmp_opline < end; tmp_opline++) { - if (ZEND_OP1_TYPE(tmp_opline) == IS_TMP_VAR && - ZEND_OP1(tmp_opline).var == tv) { - if (tmp_opline->opcode == ZEND_FREE) { - MAKE_NOP(tmp_opline); - zval_dtor(&result); - } else { - ZEND_OP1_TYPE(tmp_opline) = IS_CONST; -#if ZEND_EXTENSION_API_NO > PHP_5_3_X_API_NO - tmp_opline->op1.constant = zend_optimizer_add_literal(op_array, &result TSRMLS_CC); - if (Z_TYPE(result) == IS_STRING) { - Z_HASH_P(&ZEND_OP1_LITERAL(tmp_opline)) = zend_hash_func(Z_STRVAL(ZEND_OP1_LITERAL(tmp_opline)), Z_STRLEN(ZEND_OP1_LITERAL(tmp_opline)) + 1); - if (tmp_opline->opcode == ZEND_INIT_STATIC_METHOD_CALL || - tmp_opline->opcode == ZEND_DO_FCALL || - tmp_opline->opcode == ZEND_CATCH || - tmp_opline->opcode == ZEND_FETCH_CONSTANT) { - op_array->literals[tmp_opline->op1.constant].cache_slot = op_array->last_cache_slot++; - } - } -#else - ZEND_OP1_LITERAL(tmp_opline) = result; -#endif - } - /* TMP_VAR my be used only once */ - break; - } - if (ZEND_OP2_TYPE(tmp_opline) == IS_TMP_VAR && - ZEND_OP2(tmp_opline).var == tv) { - ZEND_OP2_TYPE(tmp_opline) = IS_CONST; -#if ZEND_EXTENSION_API_NO > PHP_5_3_X_API_NO - tmp_opline->op2.constant = zend_optimizer_add_literal(op_array, &result TSRMLS_CC); - if (Z_TYPE(result) == IS_STRING) { - Z_HASH_P(&ZEND_OP2_LITERAL(tmp_opline)) = zend_hash_func(Z_STRVAL(ZEND_OP2_LITERAL(tmp_opline)), Z_STRLEN(ZEND_OP2_LITERAL(tmp_opline)) + 1); - if (tmp_opline->opcode == ZEND_FETCH_R || - tmp_opline->opcode == ZEND_FETCH_W || - tmp_opline->opcode == ZEND_FETCH_RW || - tmp_opline->opcode == ZEND_FETCH_IS || - tmp_opline->opcode == ZEND_FETCH_UNSET || - tmp_opline->opcode == ZEND_FETCH_FUNC_ARG || - tmp_opline->opcode == ZEND_FETCH_CLASS || - tmp_opline->opcode == ZEND_INIT_FCALL_BY_NAME || - tmp_opline->opcode == ZEND_INIT_NS_FCALL_BY_NAME || - tmp_opline->opcode == ZEND_UNSET_VAR || - tmp_opline->opcode == ZEND_ISSET_ISEMPTY_VAR || - tmp_opline->opcode == ZEND_ADD_INTERFACE || - tmp_opline->opcode == ZEND_ADD_TRAIT) { - op_array->literals[tmp_opline->op2.constant].cache_slot = op_array->last_cache_slot++; - } else if (tmp_opline->opcode == ZEND_INIT_METHOD_CALL || - tmp_opline->opcode == ZEND_INIT_STATIC_METHOD_CALL || - tmp_opline->opcode == ZEND_FETCH_CONSTANT || - tmp_opline->opcode == ZEND_ASSIGN_OBJ || - tmp_opline->opcode == ZEND_FETCH_OBJ_R || - tmp_opline->opcode == ZEND_FETCH_OBJ_W || - tmp_opline->opcode == ZEND_FETCH_OBJ_RW || - tmp_opline->opcode == ZEND_FETCH_OBJ_IS || - tmp_opline->opcode == ZEND_FETCH_OBJ_UNSET || - tmp_opline->opcode == ZEND_FETCH_OBJ_FUNC_ARG || - tmp_opline->opcode == ZEND_UNSET_OBJ || - tmp_opline->opcode == ZEND_PRE_INC_OBJ || - tmp_opline->opcode == ZEND_PRE_DEC_OBJ || - tmp_opline->opcode == ZEND_POST_INC_OBJ || - tmp_opline->opcode == ZEND_POST_DEC_OBJ || - tmp_opline->opcode == ZEND_ISSET_ISEMPTY_PROP_OBJ) { - op_array->literals[tmp_opline->op2.constant].cache_slot = op_array->last_cache_slot; - op_array->last_cache_slot += 2; - } else if (tmp_opline->opcode == ZEND_ASSIGN_ADD || - tmp_opline->opcode == ZEND_ASSIGN_SUB || - tmp_opline->opcode == ZEND_ASSIGN_MUL || - tmp_opline->opcode == ZEND_ASSIGN_DIV || - tmp_opline->opcode == ZEND_ASSIGN_MOD || - tmp_opline->opcode == ZEND_ASSIGN_SL || - tmp_opline->opcode == ZEND_ASSIGN_SR || - tmp_opline->opcode == ZEND_ASSIGN_CONCAT || - tmp_opline->opcode == ZEND_ASSIGN_BW_OR || - tmp_opline->opcode == ZEND_ASSIGN_BW_AND || - tmp_opline->opcode == ZEND_ASSIGN_BW_XOR) { - if (tmp_opline->extended_value == ZEND_ASSIGN_OBJ) { - op_array->literals[tmp_opline->op2.constant].cache_slot = op_array->last_cache_slot; - op_array->last_cache_slot += 2; - } - } - } -#else - ZEND_OP2_LITERAL(tmp_opline) = result; -#endif - break; - } - } + replace_tmp_by_const(op_array, opline + 1, tv, &result TSRMLS_CC); } break; @@ -159,6 +70,7 @@ if (ZEND_OPTIMIZER_PASS_1 & OPTIMIZATION_LEVEL) { opline->extended_value != IS_OBJECT && opline->extended_value != IS_RESOURCE) { /* cast of constant operand */ + zend_uint tv = ZEND_RESULT(opline).var; /* temporary variable */ zval res; res = ZEND_OP1_LITERAL(opline); zval_copy_ctor(&res); @@ -179,11 +91,11 @@ if (ZEND_OPTIMIZER_PASS_1 & OPTIMIZATION_LEVEL) { convert_to_string(&res); break; } + literal_dtor(&ZEND_OP1_LITERAL(opline)); - opline->opcode = ZEND_QM_ASSIGN; - opline->extended_value = 0; - ZEND_OP1_LITERAL(opline) = res; - SET_UNUSED(opline->op2); + MAKE_NOP(opline); + + replace_tmp_by_const(op_array, opline + 1, tv, &res TSRMLS_CC); } else if (opline->extended_value == IS_BOOL) { /* T = CAST(X, IS_BOOL) => T = BOOL(X) */ opline->opcode = ZEND_BOOL; @@ -197,7 +109,6 @@ if (ZEND_OPTIMIZER_PASS_1 & OPTIMIZATION_LEVEL) { /* unary operation on constant operand */ unary_op_type unary_op = get_unary_op(opline->opcode); zval result; - zend_op *tmp_opline; zend_uint tv = ZEND_RESULT(opline).var; /* temporary variable */ int er; @@ -218,34 +129,7 @@ if (ZEND_OPTIMIZER_PASS_1 & OPTIMIZATION_LEVEL) { literal_dtor(&ZEND_OP1_LITERAL(opline)); MAKE_NOP(opline); - /* substitute the following TMP_VAR usage with constant */ - for (tmp_opline = opline + 1; tmp_opline < end; tmp_opline++) { - if (ZEND_OP1_TYPE(tmp_opline) == IS_TMP_VAR && - ZEND_OP1(tmp_opline).var == tv) { - if (tmp_opline->opcode == ZEND_FREE) { - MAKE_NOP(tmp_opline); - zval_dtor(&result); - } else { - ZEND_OP1_TYPE(tmp_opline) = IS_CONST; -#if ZEND_EXTENSION_API_NO > PHP_5_3_X_API_NO - tmp_opline->op1.constant = zend_optimizer_add_literal(op_array, &result TSRMLS_CC); -#else - ZEND_OP1_LITERAL(tmp_opline) = result; -#endif - } - break; - } - if (ZEND_OP2_TYPE(tmp_opline) == IS_TMP_VAR && - ZEND_OP2(tmp_opline).var == tv) { - ZEND_OP2_TYPE(tmp_opline) = IS_CONST; -#if ZEND_EXTENSION_API_NO > PHP_5_3_X_API_NO - tmp_opline->op2.constant = zend_optimizer_add_literal(op_array, &result TSRMLS_CC); -#else - ZEND_OP2_LITERAL(tmp_opline) = result; -#endif - break; - } - } + replace_tmp_by_const(op_array, opline + 1, tv, &result TSRMLS_CC); } break; @@ -408,6 +292,7 @@ if (ZEND_OPTIMIZER_PASS_1 & OPTIMIZATION_LEVEL) { int var = opline->result.var; int level = 0; zend_op *op = opline + 1; + zend_op *use = NULL; while (op < end) { if (op->opcode == ZEND_BEGIN_SILENCE) { @@ -420,21 +305,36 @@ if (ZEND_OPTIMIZER_PASS_1 & OPTIMIZATION_LEVEL) { } } if (op->op1_type == IS_VAR && op->op1.var == var) { - op->op1_type = IS_CV; - op->op1.var = zend_optimizer_lookup_cv(op_array, + if (use) { + /* used more than once */ + use = NULL; + break; + } + use = op; + } else if (op->op2_type == IS_VAR && op->op2.var == var) { + if (use) { + /* used more than once */ + use = NULL; + break; + } + use = op; + } + op++; + } + if (use) { + if (use->op1_type == IS_VAR && use->op1.var == var) { + use->op1_type = IS_CV; + use->op1.var = zend_optimizer_lookup_cv(op_array, Z_STRVAL(ZEND_OP1_LITERAL(opline)), Z_STRLEN(ZEND_OP1_LITERAL(opline))); MAKE_NOP(opline); - break; - } else if (op->op2_type == IS_VAR && op->op2.var == var) { - op->op2_type = IS_CV; - op->op2.var = zend_optimizer_lookup_cv(op_array, + } else if (use->op2_type == IS_VAR && use->op2.var == var) { + use->op2_type = IS_CV; + use->op2.var = zend_optimizer_lookup_cv(op_array, Z_STRVAL(ZEND_OP1_LITERAL(opline)), Z_STRLEN(ZEND_OP1_LITERAL(opline))); MAKE_NOP(opline); - break; } - op++; } } break; diff --git a/ext/opcache/Optimizer/zend_optimizer.c b/ext/opcache/Optimizer/zend_optimizer.c index 1f411d5da8..28085cb441 100644 --- a/ext/opcache/Optimizer/zend_optimizer.c +++ b/ext/opcache/Optimizer/zend_optimizer.c @@ -110,6 +110,137 @@ int zend_optimizer_add_literal(zend_op_array *op_array, const zval *zv TSRMLS_DC #endif
+static void replace_tmp_by_const(zend_op_array *op_array,
+ zend_op *opline,
+ zend_uint var,
+ zval *val
+ TSRMLS_DC)
+{
+ zend_op *end = op_array->opcodes + op_array->last;
+
+ while (opline < end) {
+ if (ZEND_OP1_TYPE(opline) == IS_TMP_VAR &&
+ ZEND_OP1(opline).var == var) {
+
+ if (opline->opcode == ZEND_FREE) {
+ MAKE_NOP(opline);
+ zval_dtor(val);
+ } else {
+ ZEND_OP1_TYPE(opline) = IS_CONST;
+#if ZEND_EXTENSION_API_NO > PHP_5_3_X_API_NO
+ if (Z_TYPE_P(val) == IS_STRING) {
+ switch (opline->opcode) {
+ case ZEND_INIT_STATIC_METHOD_CALL:
+ case ZEND_CATCH:
+ case ZEND_FETCH_CONSTANT:
+ opline->op1.constant = zend_optimizer_add_literal(op_array, val TSRMLS_CC);
+ Z_HASH_P(&ZEND_OP1_LITERAL(opline)) = zend_hash_func(Z_STRVAL(ZEND_OP1_LITERAL(opline)), Z_STRLEN(ZEND_OP1_LITERAL(opline)) + 1);
+ op_array->literals[opline->op1.constant].cache_slot = op_array->last_cache_slot++;
+ zend_str_tolower(Z_STRVAL_P(val), Z_STRLEN_P(val));
+ zend_optimizer_add_literal(op_array, val TSRMLS_CC);
+ op_array->literals[opline->op1.constant+1].hash_value = zend_hash_func(Z_STRVAL(op_array->literals[opline->op1.constant+1].constant), Z_STRLEN(op_array->literals[opline->op1.constant+1].constant) + 1);
+ break;
+ case ZEND_DO_FCALL:
+ zend_str_tolower(Z_STRVAL_P(val), Z_STRLEN_P(val));
+ opline->op1.constant = zend_optimizer_add_literal(op_array, val TSRMLS_CC);
+ Z_HASH_P(&ZEND_OP1_LITERAL(opline)) = zend_hash_func(Z_STRVAL(ZEND_OP1_LITERAL(opline)), Z_STRLEN(ZEND_OP1_LITERAL(opline)) + 1);
+ op_array->literals[opline->op1.constant].cache_slot = op_array->last_cache_slot++;
+ break;
+ default:
+ opline->op1.constant = zend_optimizer_add_literal(op_array, val TSRMLS_CC);
+ Z_HASH_P(&ZEND_OP1_LITERAL(opline)) = zend_hash_func(Z_STRVAL(ZEND_OP1_LITERAL(opline)), Z_STRLEN(ZEND_OP1_LITERAL(opline)) + 1);
+ break;
+ }
+ } else {
+ opline->op1.constant = zend_optimizer_add_literal(op_array, val TSRMLS_CC);
+ }
+#else
+ ZEND_OP1_LITERAL(opline) = *val;
+#endif
+ }
+ /* TMP_VAR my be used only once */
+ break;
+ }
+
+ if (ZEND_OP2_TYPE(opline) == IS_TMP_VAR &&
+ ZEND_OP2(opline).var == var) {
+
+ ZEND_OP2_TYPE(opline) = IS_CONST;
+#if ZEND_EXTENSION_API_NO > PHP_5_3_X_API_NO
+ opline->op2.constant = zend_optimizer_add_literal(op_array, val TSRMLS_CC);
+ if (Z_TYPE_P(val) == IS_STRING) {
+ Z_HASH_P(&ZEND_OP2_LITERAL(opline)) = zend_hash_func(Z_STRVAL(ZEND_OP2_LITERAL(opline)), Z_STRLEN(ZEND_OP2_LITERAL(opline)) + 1);
+ switch (opline->opcode) {
+ case ZEND_FETCH_R:
+ case ZEND_FETCH_W:
+ case ZEND_FETCH_RW:
+ case ZEND_FETCH_IS:
+ case ZEND_FETCH_UNSET:
+ case ZEND_FETCH_FUNC_ARG:
+ case ZEND_FETCH_CLASS:
+ case ZEND_INIT_FCALL_BY_NAME:
+ /*case ZEND_INIT_NS_FCALL_BY_NAME:*/
+ case ZEND_UNSET_VAR:
+ case ZEND_ISSET_ISEMPTY_VAR:
+ case ZEND_ADD_INTERFACE:
+ case ZEND_ADD_TRAIT:
+ op_array->literals[opline->op2.constant].cache_slot = op_array->last_cache_slot++;
+ zend_str_tolower(Z_STRVAL_P(val), Z_STRLEN_P(val));
+ zend_optimizer_add_literal(op_array, val TSRMLS_CC);
+ op_array->literals[opline->op2.constant+1].hash_value = zend_hash_func(Z_STRVAL(op_array->literals[opline->op2.constant+1].constant), Z_STRLEN(op_array->literals[opline->op2.constant+1].constant) + 1);
+ break;
+ case ZEND_INIT_METHOD_CALL:
+ case ZEND_INIT_STATIC_METHOD_CALL:
+ zend_str_tolower(Z_STRVAL_P(val), Z_STRLEN_P(val));
+ zend_optimizer_add_literal(op_array, val TSRMLS_CC);
+ op_array->literals[opline->op2.constant+1].hash_value = zend_hash_func(Z_STRVAL(op_array->literals[opline->op2.constant+1].constant), Z_STRLEN(op_array->literals[opline->op2.constant+1].constant) + 1);
+ /* break missing intentionally */
+ /*case ZEND_FETCH_CONSTANT:*/
+ case ZEND_ASSIGN_OBJ:
+ case ZEND_FETCH_OBJ_R:
+ case ZEND_FETCH_OBJ_W:
+ case ZEND_FETCH_OBJ_RW:
+ case ZEND_FETCH_OBJ_IS:
+ case ZEND_FETCH_OBJ_UNSET:
+ case ZEND_FETCH_OBJ_FUNC_ARG:
+ case ZEND_UNSET_OBJ:
+ case ZEND_PRE_INC_OBJ:
+ case ZEND_PRE_DEC_OBJ:
+ case ZEND_POST_INC_OBJ:
+ case ZEND_POST_DEC_OBJ:
+ case ZEND_ISSET_ISEMPTY_PROP_OBJ:
+ op_array->literals[opline->op2.constant].cache_slot = op_array->last_cache_slot;
+ op_array->last_cache_slot += 2;
+ break;
+ case ZEND_ASSIGN_ADD:
+ case ZEND_ASSIGN_SUB:
+ case ZEND_ASSIGN_MUL:
+ case ZEND_ASSIGN_DIV:
+ case ZEND_ASSIGN_MOD:
+ case ZEND_ASSIGN_SL:
+ case ZEND_ASSIGN_SR:
+ case ZEND_ASSIGN_CONCAT:
+ case ZEND_ASSIGN_BW_OR:
+ case ZEND_ASSIGN_BW_AND:
+ case ZEND_ASSIGN_BW_XOR:
+ if (opline->extended_value == ZEND_ASSIGN_OBJ) {
+ op_array->literals[opline->op2.constant].cache_slot = op_array->last_cache_slot;
+ op_array->last_cache_slot += 2;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+#else
+ ZEND_OP2_LITERAL(opline) = *val;
+#endif
+ break;
+ }
+ opline++;
+ }
+}
+
#include "Optimizer/nop_removal.c"
#include "Optimizer/block_pass.c"
#include "Optimizer/optimize_temp_vars_5.c"
diff --git a/ext/opcache/Optimizer/zend_optimizer_internal.h b/ext/opcache/Optimizer/zend_optimizer_internal.h index a9bad01be3..616bdf74f6 100644 --- a/ext/opcache/Optimizer/zend_optimizer_internal.h +++ b/ext/opcache/Optimizer/zend_optimizer_internal.h @@ -27,6 +27,9 @@ #if ZEND_EXTENSION_API_NO > PHP_5_4_X_API_NO
# define VAR_NUM(v) ((zend_uint)(EX_TMP_VAR_NUM(0, 0) - EX_TMP_VAR(0, v)))
# define NUM_VAR(v) ((zend_uint)(zend_uintptr_t)EX_TMP_VAR_NUM(0, v))
+#elif ZEND_EXTENSION_API_NO > PHP_5_2_X_API_NO
+# define VAR_NUM(v) ((v)/ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable)))
+# define NUM_VAR(v) ((v)*ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable)))
#else
# define VAR_NUM(v) ((v)/(sizeof(temp_variable)))
# define NUM_VAR(v) ((v)*(sizeof(temp_variable)))
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index b5474c0507..8cee80f776 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -37,6 +37,7 @@ #include "zend_API.h" #include "zend_ini.h" #include "TSRM/tsrm_virtual_cwd.h" +#include "ext/phar/php_phar.h" #include "zend_accelerator_util_funcs.h" #include "zend_accelerator_hash.h" @@ -144,6 +145,21 @@ static inline int is_cacheable_stream_path(const char *filename) memcmp(filename, "phar://", sizeof("phar://") - 1) == 0; } +static inline int is_phar_relative_alias_path(const char *filename, char **alias, int *alias_len) +{ + if (memcmp(filename, "phar://", sizeof("phar://") - 1) == 0 + && filename[sizeof("phar://") - 1] != '\0' && filename[sizeof("phar://") - 1] != '/') { + char *slash; + *alias = (char*)filename + sizeof("phar://") - 1; + slash = strstr(*alias, "/"); + if (slash) { + *alias_len = slash - *alias; + return 1; + } + } + return 0; +} + /* O+ overrides PHP chdir() function and remembers the current working directory * in ZCG(cwd) and ZCG(cwd_len). Later accel_getcwd() can use stored value and * avoid getcwd() call. @@ -1028,15 +1044,33 @@ char *accel_make_persistent_key_ex(zend_file_handle *file_handle, int path_lengt } memcpy(ZCG(key) + cur_len, include_path, include_path_len); ZCG(key)[key_length] = '\0'; - } else { - /* not use_cwd */ - key_length = path_length; + } else { + /* not use_cwd */ + key_length = path_length; if ((size_t)key_length >= sizeof(ZCG(key))) { ZCG(key_len) = 0; return NULL; + } else { + char *alias; + int alias_len; + if (is_phar_relative_alias_path(file_handle->filename, &alias, &alias_len)) { + char *phar_path; + int phar_path_len; + if (phar_resolve_alias(alias, alias_len, &phar_path, &phar_path_len TSRMLS_CC) == SUCCESS) { + int filename_len = strlen(file_handle->filename); + memcpy(ZCG(key), "phar://", sizeof("phar://") -1); + memcpy(ZCG(key) + sizeof("phar://") - 1, phar_path, phar_path_len); + memcpy(ZCG(key) + sizeof("phar://") - 1 + phar_path_len, + alias + alias_len, filename_len - alias_len - sizeof("phar://") + 2); + key_length = filename_len + (phar_path_len - alias_len); + } else { + memcpy(ZCG(key), file_handle->filename, key_length + 1); + } + } else { + memcpy(ZCG(key), file_handle->filename, key_length + 1); + } } - memcpy(ZCG(key), file_handle->filename, key_length + 1); - } + } *key_len = ZCG(key_len) = key_length; return ZCG(key); @@ -1062,6 +1096,10 @@ int zend_accel_invalidate(const char *filename, int filename_len, zend_bool forc realpath = accelerator_orig_zend_resolve_path(filename, filename_len TSRMLS_CC); #endif + if (!realpath) { + return FAILURE; + } + persistent_script = zend_accel_hash_find(&ZCSG(hash), realpath, strlen(realpath) + 1); if (persistent_script && !persistent_script->corrupted) { zend_file_handle file_handle; @@ -1442,7 +1480,7 @@ static zend_persistent_script *compile_and_cache_file(zend_file_handle *file_han } /* zend_compile() replacement */ -static zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type TSRMLS_DC) +zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type TSRMLS_DC) { zend_persistent_script *persistent_script = NULL; char *key = NULL; @@ -2403,14 +2441,14 @@ static inline int accel_find_sapi(TSRMLS_D) return FAILURE; } -static void zend_accel_init_shm(TSRMLS_D) +static int zend_accel_init_shm(TSRMLS_D) { zend_shared_alloc_lock(TSRMLS_C); accel_shared_globals = zend_shared_alloc(sizeof(zend_accel_shared_globals)); if (!accel_shared_globals) { zend_accel_error(ACCEL_LOG_FATAL, "Insufficient shared memory!"); - return; + return FAILURE; } ZSMMG(app_shared_globals) = accel_shared_globals; @@ -2425,7 +2463,8 @@ static void zend_accel_init_shm(TSRMLS_D) ZCSG(interned_strings).arBuckets = zend_shared_alloc(ZCSG(interned_strings).nTableSize * sizeof(Bucket *)); ZCSG(interned_strings_start) = zend_shared_alloc((ZCG(accel_directives).interned_strings_buffer * 1024 * 1024)); if (!ZCSG(interned_strings).arBuckets || !ZCSG(interned_strings_start)) { - zend_error(E_ERROR, ACCELERATOR_PRODUCT_NAME " cannot allocate buffer for interned strings"); + zend_accel_error(ACCEL_LOG_FATAL, ACCELERATOR_PRODUCT_NAME " cannot allocate buffer for interned strings"); + return FAILURE; } ZCSG(interned_strings_end) = ZCSG(interned_strings_start) + (ZCG(accel_directives).interned_strings_buffer * 1024 * 1024); ZCSG(interned_strings_top) = ZCSG(interned_strings_start); @@ -2464,6 +2503,8 @@ static void zend_accel_init_shm(TSRMLS_D) ZCSG(restart_in_progress) = 0; zend_shared_alloc_unlock(TSRMLS_C); + + return SUCCESS; } static void accel_globals_ctor(zend_accel_globals *accel_globals TSRMLS_DC) @@ -2521,7 +2562,10 @@ static int accel_startup(zend_extension *extension) /********************************************/ switch (zend_shared_alloc_startup(ZCG(accel_directives).memory_consumption)) { case ALLOC_SUCCESS: - zend_accel_init_shm(TSRMLS_C); + if (zend_accel_init_shm(TSRMLS_C) == FAILURE) { + accel_startup_ok = 0; + return FAILURE; + } break; case ALLOC_FAILURE: accel_startup_ok = 0; diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h index 361b60b08f..b9d7ef3470 100644 --- a/ext/opcache/ZendAccelerator.h +++ b/ext/opcache/ZendAccelerator.h @@ -80,6 +80,9 @@ # endif # include <direct.h> #else +# ifndef MAXPATHLEN +# define MAXPATHLEN 4096 +# endif # include <sys/param.h> #endif @@ -100,7 +103,7 @@ extern int lock_file; # elif defined(__svr4__) # define FLOCK_STRUCTURE(name, type, whence, start, len) \ struct flock name = {type, whence, start, len} -# elif defined(__linux__) || defined(__hpux) +# elif defined(__linux__) || defined(__hpux) || defined(__GNU__) # define FLOCK_STRUCTURE(name, type, whence, start, len) \ struct flock name = {type, whence, start, len, 0} # elif defined(_AIX) @@ -111,6 +114,12 @@ extern int lock_file; # define FLOCK_STRUCTURE(name, type, whence, start, len) \ struct flock name = {type, whence, start, len} # endif +# elif defined(HAVE_FLOCK_BSD) +# define FLOCK_STRUCTURE(name, type, whence, start, len) \ + struct flock name = {start, len, -1, type, whence} +# elif defined(HAVE_FLOCK_LINUX) +# define FLOCK_STRUCTURE(name, type, whence, start, len) \ + struct flock name = {type, whence, start, len} # else # error "Don't know how to define struct flock" # endif @@ -325,6 +334,7 @@ int accelerator_shm_read_lock(TSRMLS_D); void accelerator_shm_read_unlock(TSRMLS_D); char *accel_make_persistent_key_ex(zend_file_handle *file_handle, int path_length, int *key_len TSRMLS_DC); +zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type TSRMLS_DC); #if !defined(ZEND_DECLARE_INHERITED_CLASS_DELAYED) # define ZEND_DECLARE_INHERITED_CLASS_DELAYED 145 diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 index 1798fe13fa..60edeed966 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 @@ -326,40 +326,42 @@ int main() { msg=yes,msg=no,msg=no) AC_MSG_RESULT([$msg]) - AC_MSG_CHECKING(for known struct flock definition) - dnl Copied from ZendAccelerator.h - AC_TRY_RUN([ -#include <fcntl.h> -#include <stdlib.h> - -#ifndef ZEND_WIN32 -extern int lock_file; - -# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || (defined(__APPLE__) && defined(__MACH__)/* Darwin */) || defined(__OpenBSD__) || defined(__NetBSD__) -# define FLOCK_STRUCTURE(name, type, whence, start, len) \ - struct flock name = {start, len, -1, type, whence} -# elif defined(__svr4__) -# define FLOCK_STRUCTURE(name, type, whence, start, len) \ - struct flock name = {type, whence, start, len} -# elif defined(__linux__) || defined(__hpux) -# define FLOCK_STRUCTURE(name, type, whence, start, len) \ - struct flock name = {type, whence, start, len, 0} -# elif defined(_AIX) -# if defined(_LARGE_FILES) || defined(__64BIT__) -# define FLOCK_STRUCTURE(name, type, whence, start, len) \ - struct flock name = {type, whence, 0, 0, 0, start, len } -# else -# define FLOCK_STRUCTURE(name, type, whence, start, len) \ - struct flock name = {type, whence, start, len} -# endif -# else -# error "Don't know how to define struct flock" -# endif -#endif -int main() { return 0; } -], -[AC_MSG_RESULT([done])], -[AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no])], []) +flock_type=unknown +AC_MSG_CHECKING("whether flock struct is linux ordered") +AC_TRY_RUN([ + #include <fcntl.h> + struct flock lock = { 1, 2, 3, 4, 5 }; + int main() { + if(lock.l_type == 1 && lock.l_whence == 2 && lock.l_start == 3 && lock.l_len == 4) { + return 0; + } + return 1; + } +], [ + flock_type=linux + AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type]) + AC_MSG_RESULT("yes") +], AC_MSG_RESULT("no") ) + +AC_MSG_CHECKING("whether flock struct is BSD ordered") +AC_TRY_RUN([ + #include <fcntl.h> + struct flock lock = { 1, 2, 3, 4, 5 }; + int main() { + if(lock.l_start == 1 && lock.l_len == 2 && lock.l_type == 4 && lock.l_whence == 5) { + return 0; + } + return 1; + } +], [ + flock_type=bsd + AC_DEFINE([HAVE_FLOCK_BSD], [], [Struct flock is BSD-type]) + AC_MSG_RESULT("yes") +], AC_MSG_RESULT("no") ) + +if test "$flock_type" == "unknown"; then + AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no]) +fi PHP_NEW_EXTENSION(opcache, ZendAccelerator.c \ diff --git a/ext/opcache/tests/bug65510.phpt b/ext/opcache/tests/bug65510.phpt new file mode 100644 index 0000000000..ba19d27d6f --- /dev/null +++ b/ext/opcache/tests/bug65510.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #65510 (5.5.2 crashes in _get_zval_ptr_ptr_var) +--INI-- +allow_url_include=1 +opcache.enable=1 +opcache.enable_cli=1 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function parseQuery() { + $m = array("l", "a", "r", "u", "e", "n", "c", "e"); + foreach($m as $n) { + @list($a, $b) = $n; + } +} +parseQuery(); +echo "ok\n"; +--EXPECT-- +ok diff --git a/ext/opcache/tests/bug65665.phpt b/ext/opcache/tests/bug65665.phpt new file mode 100644 index 0000000000..ac5c18dd83 --- /dev/null +++ b/ext/opcache/tests/bug65665.phpt @@ -0,0 +1,118 @@ +--TEST-- +Bug #65665 (Exception not properly caught when opcache enabled) +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function foo() { + try + { + switch (1) + { + case 0: + try + { + + } + catch (Exception $e) + { + + } + + break; + + case 1: + try + { + throw new Exception('aaa'); + } + catch (Exception $e) + { + echo "correct\n"; + } + + break; + } + } + catch (Exception $e) + { + echo "wrong\n"; + } + return; +} + +function foo1() { + try + { + switch (1) + { + case 0: + try + { + + } + catch (Exception $e) + { +dummy: + echo "ect\n"; + } + + break; + + case 1: + try + { + throw new Exception('aaa'); + } + catch (Exception $e) + { + echo "corr"; + goto dummy; + } + break; + } + } + catch (Exception $e) + { + echo "wrong\n"; + } + return; +} + +function foo2() { + try + { + switch (1) + { + case 0: + try + { +dummy: + throw new Exception('aaa'); + } + catch (Exception $e) + { + echo "correct\n"; + } + + break; + + case 1: + goto dummy; + break; + } + } + catch (Exception $e) + { + echo "wrong\n"; + } + return; +} +foo();foo1();foo2(); +--EXPECT-- +correct +correct +correct diff --git a/ext/opcache/tests/bug65845.phpt b/ext/opcache/tests/bug65845.phpt new file mode 100644 index 0000000000..2ae5f3974a --- /dev/null +++ b/ext/opcache/tests/bug65845.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bug #65845 (Error when Zend Opcache Optimizer is fully enabled) +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$Pile['vars'][(string)'toto'] = 'tutu'; +var_dump($Pile['vars']['toto']); +?> +--EXPECT-- +string(4) "tutu" diff --git a/ext/opcache/tests/issue0128.phpt b/ext/opcache/tests/issue0128.phpt new file mode 100644 index 0000000000..637f675ac2 --- /dev/null +++ b/ext/opcache/tests/issue0128.phpt @@ -0,0 +1,16 @@ +--TEST-- +ISSUE #128 (opcache_invalidate segmentation fault) +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.optimization_level=-1 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +var_dump(opcache_invalidate('1')); +var_dump("okey"); +?> +--EXPECT-- +bool(false) +string(4) "okey" diff --git a/ext/opcache/zend_accelerator_blacklist.c b/ext/opcache/zend_accelerator_blacklist.c index da83cfd311..eb0bc2146c 100644 --- a/ext/opcache/zend_accelerator_blacklist.c +++ b/ext/opcache/zend_accelerator_blacklist.c @@ -314,6 +314,7 @@ void zend_accel_blacklist_load(zend_blacklist *blacklist, char *filename) blacklist->entries[blacklist->pos].path = (char *)malloc(path_length + 1); if (!blacklist->entries[blacklist->pos].path) { zend_accel_error(ACCEL_LOG_ERROR, "malloc() failed\n"); + fclose(fp); return; } blacklist->entries[blacklist->pos].id = blacklist->pos; diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c index f9ddaa98b8..dedb7215c1 100644 --- a/ext/opcache/zend_accelerator_module.c +++ b/ext/opcache/zend_accelerator_module.c @@ -48,6 +48,10 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_opcache_get_status, 0, 0, 0) ZEND_ARG_INFO(0, fetch_scripts) ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_INFO_EX(arginfo_opcache_compile_file, 0, 0, 1) + ZEND_ARG_INFO(0, file) +ZEND_END_ARG_INFO() + ZEND_BEGIN_ARG_INFO_EX(arginfo_opcache_invalidate, 0, 0, 1) ZEND_ARG_INFO(0, script) ZEND_ARG_INFO(0, force) @@ -59,12 +63,14 @@ static ZEND_FUNCTION(opcache_invalidate); /* Private functions */ static ZEND_FUNCTION(opcache_get_status); +static ZEND_FUNCTION(opcache_compile_file); static ZEND_FUNCTION(opcache_get_configuration); static zend_function_entry accel_functions[] = { /* User functions */ ZEND_FE(opcache_reset, arginfo_opcache_none) ZEND_FE(opcache_invalidate, arginfo_opcache_invalidate) + ZEND_FE(opcache_compile_file, arginfo_opcache_compile_file) /* Private functions */ ZEND_FE(opcache_get_configuration, arginfo_opcache_none) ZEND_FE(opcache_get_status, arginfo_opcache_get_status) @@ -709,3 +715,44 @@ static ZEND_FUNCTION(opcache_invalidate) RETURN_FALSE; } } + +static ZEND_FUNCTION(opcache_compile_file) +{ + char *script_name; + int script_name_len; + zend_file_handle handle; + zend_op_array *op_array = NULL; + zend_execute_data *orig_execute_data = NULL; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &script_name, &script_name_len) == FAILURE) { + return; + } + + if (!ZCG(enabled) || !accel_startup_ok || !ZCSG(accelerator_enabled)) { + zend_error(E_NOTICE, ACCELERATOR_PRODUCT_NAME " seems to be disabled, can't compile file"); + RETURN_FALSE; + } + + handle.filename = script_name; + handle.free_filename = 0; + handle.opened_path = NULL; + handle.type = ZEND_HANDLE_FILENAME; + + orig_execute_data = EG(current_execute_data); + + zend_try { + op_array = persistent_compile_file(&handle, ZEND_INCLUDE TSRMLS_CC); + } zend_catch { + EG(current_execute_data) = orig_execute_data; + zend_error(E_WARNING, ACCELERATOR_PRODUCT_NAME " could not compile file %s" TSRMLS_CC, handle.filename); + } zend_end_try(); + + if(op_array != NULL) { + destroy_op_array(op_array TSRMLS_CC); + efree(op_array); + RETVAL_TRUE; + } else { + RETVAL_FALSE; + } + zend_destroy_file_handle(&handle TSRMLS_CC); +} diff --git a/ext/opcache/zend_accelerator_util_funcs.c b/ext/opcache/zend_accelerator_util_funcs.c index 39b4c1fc25..894da63aaa 100644 --- a/ext/opcache/zend_accelerator_util_funcs.c +++ b/ext/opcache/zend_accelerator_util_funcs.c @@ -478,7 +478,7 @@ static void zend_hash_clone_methods(HashTable *ht, HashTable *source, zend_class if (accel_xlat_get(new_entry->scope, new_ce) == SUCCESS) { new_entry->scope = *new_ce; } else { - zend_error(E_ERROR, ACCELERATOR_PRODUCT_NAME " class loading error, class %s, function %s. Please call Zend Support", ce->name, new_entry->function_name); + zend_error(E_ERROR, ACCELERATOR_PRODUCT_NAME " class loading error, class %s, function %s", ce->name, new_entry->function_name); } } @@ -487,7 +487,7 @@ static void zend_hash_clone_methods(HashTable *ht, HashTable *source, zend_class if (accel_xlat_get(new_entry->prototype, new_prototype) == SUCCESS) { new_entry->prototype = *new_prototype; } else { - zend_error(E_ERROR, ACCELERATOR_PRODUCT_NAME " class loading error, class %s, function %s. Please call Zend Support", ce->name, new_entry->function_name); + zend_error(E_ERROR, ACCELERATOR_PRODUCT_NAME " class loading error, class %s, function %s", ce->name, new_entry->function_name); } } @@ -589,7 +589,7 @@ static void zend_hash_clone_prop_info(HashTable *ht, HashTable *source, zend_cla } else if (accel_xlat_get(prop_info->ce, new_ce) == SUCCESS) { prop_info->ce = *new_ce; } else { - zend_error(E_ERROR, ACCELERATOR_PRODUCT_NAME" class loading error, class %s, property %s. Please call Zend Support", ce->name, prop_info->name); + zend_error(E_ERROR, ACCELERATOR_PRODUCT_NAME" class loading error, class %s, property %s", ce->name, prop_info->name); } p = p->pListNext; @@ -621,7 +621,7 @@ static int zend_prepare_function_for_execution(zend_op_array *op_array) if (accel_xlat_get(ce->handler, new_func) == SUCCESS) { \ ce->handler = *new_func; \ } else { \ - zend_error(E_ERROR, ACCELERATOR_PRODUCT_NAME " class loading error, class %s. Please call Zend Support", ce->name); \ + zend_error(E_ERROR, ACCELERATOR_PRODUCT_NAME " class loading error, class %s", ce->name); \ } \ } \ } @@ -710,7 +710,7 @@ static void zend_class_copy_ctor(zend_class_entry **pce) if (accel_xlat_get(ce->parent, new_ce) == SUCCESS) { ce->parent = *new_ce; } else { - zend_error(E_ERROR, ACCELERATOR_PRODUCT_NAME" class loading error, class %s. Please call Zend Support", ce->name); + zend_error(E_ERROR, ACCELERATOR_PRODUCT_NAME" class loading error, class %s", ce->name); } } diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 4a9fcbc9e3..59a58b1c00 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -4676,9 +4676,6 @@ SSL *php_SSL_new_from_context(SSL_CTX *ctx, php_stream *stream TSRMLS_DC) /* {{{ GET_VER_OPT_STRING("local_cert", certfile); if (certfile) { - X509 *cert = NULL; - EVP_PKEY *key = NULL; - SSL *tmpssl; char resolved_path_buff[MAXPATHLEN]; const char * private_key = NULL; @@ -4705,16 +4702,22 @@ SSL *php_SSL_new_from_context(SSL_CTX *ctx, php_stream *stream TSRMLS_DC) /* {{{ } } - tmpssl = SSL_new(ctx); - cert = SSL_get_certificate(tmpssl); - - if (cert) { - key = X509_get_pubkey(cert); - EVP_PKEY_copy_parameters(key, SSL_get_privatekey(tmpssl)); - EVP_PKEY_free(key); - } - SSL_free(tmpssl); - +#if OPENSSL_VERSION_NUMBER < 0x10001001L + do { + /* Unnecessary as of OpenSSLv1.0.1 (will segfault if used with >= 10001001 ) */ + X509 *cert = NULL; + EVP_PKEY *key = NULL; + SSL *tmpssl = SSL_new(ctx); + cert = SSL_get_certificate(tmpssl); + + if (cert) { + key = X509_get_pubkey(cert); + EVP_PKEY_copy_parameters(key, SSL_get_privatekey(tmpssl)); + EVP_PKEY_free(key); + } + SSL_free(tmpssl); + } while (0); +#endif if (!SSL_CTX_check_private_key(ctx)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Private key does not match certificate!"); } diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index ee763571c0..d5860b1a1e 100644 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -997,7 +997,7 @@ static PHP_METHOD(PDO, lastInsertId) pdo_raise_impl_error(dbh, NULL, "IM001", "driver does not support lastInsertId()" TSRMLS_CC); RETURN_FALSE; } else { - Z_STRVAL_P(return_value) = dbh->methods->last_id(dbh, name, &Z_STRLEN_P(return_value) TSRMLS_CC); + Z_STRVAL_P(return_value) = dbh->methods->last_id(dbh, name, (unsigned int *)&Z_STRLEN_P(return_value) TSRMLS_CC); if (!Z_STRVAL_P(return_value)) { PDO_HANDLE_DBH_ERR(); RETURN_FALSE; diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 62eb5e436b..04e71823b9 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -1146,7 +1146,7 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value, zval_ptr_dtor(&val); pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "cannot unserialize class" TSRMLS_CC); return 0; - } else if (ce->unserialize(&return_value, ce, Z_TYPE_P(val) == IS_STRING ? Z_STRVAL_P(val) : "", Z_TYPE_P(val) == IS_STRING ? Z_STRLEN_P(val) : 0, NULL TSRMLS_CC) == FAILURE) { + } else if (ce->unserialize(&return_value, ce, (unsigned char *)(Z_TYPE_P(val) == IS_STRING ? Z_STRVAL_P(val) : ""), Z_TYPE_P(val) == IS_STRING ? Z_STRLEN_P(val) : 0, NULL TSRMLS_CC) == FAILURE) { zval_ptr_dtor(&val); pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "cannot unserialize class" TSRMLS_CC); zval_dtor(return_value); diff --git a/ext/pdo/php_pdo_driver.h b/ext/pdo/php_pdo_driver.h index c757dbf1e5..ede2d6fb76 100644 --- a/ext/pdo/php_pdo_driver.h +++ b/ext/pdo/php_pdo_driver.h @@ -72,11 +72,11 @@ enum pdo_param_type { /* get_col ptr should point to a zval* and the driver is responsible for adding correct type information to get_column_meta() */ - PDO_PARAM_ZVAL -}; + PDO_PARAM_ZVAL, -/* magic flag to denote a parameter as being input/output */ -#define PDO_PARAM_INPUT_OUTPUT 0x80000000 + /* magic flag to denote a parameter as being input/output */ + PDO_PARAM_INPUT_OUTPUT = 0x80000000 +}; #define PDO_PARAM_FLAGS 0xFFFF0000 diff --git a/ext/pdo_dblib/dblib_driver.c b/ext/pdo_dblib/dblib_driver.c index ff42514721..daf5494d58 100644 --- a/ext/pdo_dblib/dblib_driver.c +++ b/ext/pdo_dblib/dblib_driver.c @@ -350,9 +350,10 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_ DBSETLAPP(H->login, vars[1].optval); +/* DBSETLDBNAME is only available in FreeTDS 0.92 or above */ #ifdef DBSETLDBNAME if (vars[3].optval) { - DBSETLDBNAME(H->login, vars[3].optval); + if(FAIL == DBSETLDBNAME(H->login, vars[3].optval)) goto cleanup; } #endif @@ -362,8 +363,20 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_ goto cleanup; } +/* + * FreeTDS < 0.92 does not support the DBSETLDBNAME option + * Send use database here after login (Will not work with SQL Azure) + */ +#ifndef DBSETLDBNAME + if (vars[3].optval) { + if(FAIL == dbuse(H->link, vars[3].optval)) goto cleanup; + } +#endif + +#if PHP_DBLIB_IS_MSSQL /* dblib do not return more than this length from text/image */ DBSETOPT(H->link, DBTEXTLIMIT, "2147483647"); +#endif /* limit text/image from network */ DBSETOPT(H->link, DBTEXTSIZE, "2147483647"); @@ -375,23 +388,6 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_ dbh->max_escaped_char_length = 2; dbh->alloc_own_columns = 1; -#if 0 - /* Cache the supported data types from the servers systypes table */ - if(dbcmd(H->link, "select usertype, name from systypes order by usertype") != FAIL) { - if(dbsqlexec(H->link) != FAIL) { - dbresults(H->link); - while (dbnextrow(H->link) == SUCCESS) { - val = dbdata(H->link, 1); - add_index_string(pdo_dblib_datatypes, *val, dbdata(H->link, 2), 1); - } - } - /* Throw out any remaining resultsets */ - dbcancel(H-link); - } -#endif - - - cleanup: for (i = 0; i < nvars; i++) { if (vars[i].freeme) { diff --git a/ext/pdo_mysql/tests/bug_39858.phpt b/ext/pdo_mysql/tests/bug_39858.phpt index 47457180a5..cb9cafd9f5 100644 --- a/ext/pdo_mysql/tests/bug_39858.phpt +++ b/ext/pdo_mysql/tests/bug_39858.phpt @@ -18,6 +18,8 @@ if ($version < 50000) die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n", $matches[0], $matches[1], $matches[2], $version)); ?> +--XFAIL-- +nextRowset() problem with stored proc & emulation mode & mysqlnd --FILE-- <?php require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); diff --git a/ext/pdo_mysql/tests/bug_41997.phpt b/ext/pdo_mysql/tests/bug_41997.phpt index 38d55a0190..56cbe4b087 100644 --- a/ext/pdo_mysql/tests/bug_41997.phpt +++ b/ext/pdo_mysql/tests/bug_41997.phpt @@ -1,5 +1,7 @@ --TEST-- PDO MySQL Bug #41997 (stored procedure call returning single rowset blocks future queries) +--XFAIL-- +nextRowset() problem with stored proc & emulation mode & mysqlnd --SKIPIF-- <?php require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); diff --git a/ext/pdo_mysql/tests/pdo_mysql___construct.phpt b/ext/pdo_mysql/tests/pdo_mysql___construct.phpt index c3f12df7a9..0cabfe6aa3 100644 --- a/ext/pdo_mysql/tests/pdo_mysql___construct.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql___construct.phpt @@ -49,7 +49,8 @@ MySQLPDOTest::skip(); // should fail $dsn = 'mysql:'; - print tryandcatch(10, '$db = new PDO("' . $dsn . '", "' . $user . '", "' . $pass . '");'); + // don't print the message since it can be different + tryandcatch(10, '$db = new PDO("' . $dsn . '", "' . $user . '", "' . $pass . '");'); $dsn = PDO_MYSQL_TEST_DSN; $user = PDO_MYSQL_TEST_USER; @@ -57,14 +58,15 @@ MySQLPDOTest::skip(); // should work... $db = new PDO($dsn, $user, $pass); + // Reaction on host not specified differs for different configs, so no printing $dsn = 'mysql:invalid=foo'; - print tryandcatch(11, '$db = new PDO("' . $dsn . '", "' . $user . '", "' . $pass . '");'); + tryandcatch(11, '$db = new PDO("' . $dsn . '", "' . $user . '", "' . $pass . '");'); $dsn = 'mysql:' . str_repeat('howmuch=canpdoeat;', 1000); - print tryandcatch(12, '$db = new PDO("' . $dsn . '", "' . $user . '", "' . $pass . '");'); + tryandcatch(12, '$db = new PDO("' . $dsn . '", "' . $user . '", "' . $pass . '");'); $dsn = 'mysql:' . str_repeat('abcdefghij', 1024 * 10) . '=somevalue'; - print tryandcatch(13, '$db = new PDO("' . $dsn . '", "' . $user . '", "' . $pass . '");'); + tryandcatch(13, '$db = new PDO("' . $dsn . '", "' . $user . '", "' . $pass . '");'); if (PDO_MYSQL_TEST_HOST) { $host = PDO_MYSQL_TEST_HOST; @@ -295,6 +297,5 @@ MySQLPDOTest::skip(); [006] invalid data source name, [n/a] n/a [007] could not find driver, [n/a] n/a [009] SQLSTATE[%s] [1045] Access denied for user 'dont%s'@'%s' (using password: YES), [n/a] n/a -[010] SQLSTATE[%s] [1045] Access denied for user 'dont%s'@'%s' (using password: YES), [n/a] n/a [017] DSN=%s, SQLSTATE[%s] [%d] %s done! diff --git a/ext/pdo_mysql/tests/pdo_mysql_pconnect.phpt b/ext/pdo_mysql/tests/pdo_mysql_pconnect.phpt index eb0fff13e6..5990ab812e 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_pconnect.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_pconnect.phpt @@ -64,7 +64,7 @@ MySQLPDOTest::skip(); $tmp = $stmt->fetch(PDO::FETCH_ASSOC); $con1 = $tmp['_con1']; - $db2 = new PDO($dsn, $user, $pass, array(PDO::ATTR_PERSISTENT => true)); + @$db2 = new PDO($dsn, $user, $pass, array(PDO::ATTR_PERSISTENT => true)); $stmt = $db2->query('SELECT CONNECTION_ID() as _con2'); $tmp = $stmt->fetch(PDO::FETCH_ASSOC); $con2 = $tmp['_con2']; @@ -94,4 +94,4 @@ MySQLPDOTest::skip(); print "done!"; ?> --EXPECTF-- -done!
\ No newline at end of file +done! diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt index 7996245431..9165e70551 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt @@ -1,5 +1,7 @@ --TEST-- MySQL PDOStatement->nextRowSet() +--XFAIL-- +nextRowset() problem with stored proc & emulation mode & mysqlnd --SKIPIF-- <?php require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); @@ -310,4 +312,4 @@ array(3) { } } bool(false) -done!
\ No newline at end of file +done! diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt index c34f4a9d35..e58d4a6578 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt @@ -1,5 +1,7 @@ --TEST-- MySQL Prepared Statements and different column counts +--XFAIL-- +nextRowset() problem with stored proc & emulation mode & mysqlnd --SKIPIF-- <?php require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); @@ -120,4 +122,4 @@ if ($version < 50000) print "done!"; ?> --EXPECTF-- -done!
\ No newline at end of file +done! diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c index 252bfff25b..50136430a0 100644 --- a/ext/pdo_pgsql/pgsql_driver.c +++ b/ext/pdo_pgsql/pgsql_driver.c @@ -315,9 +315,9 @@ static int pgsql_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, int unquote case PDO_PARAM_LOB: /* escapedlen returned by PQescapeBytea() accounts for trailing 0 */ #ifdef HAVE_PQESCAPE_BYTEA_CONN - escaped = PQescapeByteaConn(H->server, unquoted, unquotedlen, &tmp_len); + escaped = PQescapeByteaConn(H->server, (unsigned char *)unquoted, (size_t)unquotedlen, &tmp_len); #else - escaped = PQescapeBytea(unquoted, unquotedlen, &tmp_len); + escaped = PQescapeBytea((unsigned char *)unquoted, (size_t)unquotedlen, &tmp_len); #endif *quotedlen = (int)tmp_len + 1; *quoted = emalloc(*quotedlen + 1); @@ -331,9 +331,9 @@ static int pgsql_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, int unquote *quoted = safe_emalloc(2, unquotedlen, 3); (*quoted)[0] = '\''; #ifndef HAVE_PQESCAPE_CONN - *quotedlen = PQescapeString(*quoted + 1, unquoted, unquotedlen); + *quotedlen = PQescapeString(*quoted + 1, unquoted, (size_t)unquotedlen); #else - *quotedlen = PQescapeStringConn(H->server, *quoted + 1, unquoted, unquotedlen, NULL); + *quotedlen = PQescapeStringConn(H->server, *quoted + 1, unquoted, (size_t)unquotedlen, NULL); #endif (*quoted)[*quotedlen + 1] = '\''; (*quoted)[*quotedlen + 2] = '\0'; diff --git a/ext/pdo_pgsql/pgsql_statement.c b/ext/pdo_pgsql/pgsql_statement.c index 3ef89196de..792ad27078 100644 --- a/ext/pdo_pgsql/pgsql_statement.c +++ b/ext/pdo_pgsql/pgsql_statement.c @@ -536,7 +536,7 @@ static int pgsql_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, unsigned *len = 0; return 0; } else { - char *tmp_ptr = PQunescapeBytea(*ptr, &tmp_len); + char *tmp_ptr = (char *)PQunescapeBytea((unsigned char *)*ptr, &tmp_len); if (!tmp_ptr) { /* PQunescapeBytea returned an error */ *len = 0; diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index f0e1780a79..35eb09e584 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -63,6 +63,7 @@ #define PGSQL_MAX_LENGTH_OF_LONG 30 #define PGSQL_MAX_LENGTH_OF_DOUBLE 60 +#if LONG_MAX < UINT_MAX #define PGSQL_RETURN_OID(oid) do { \ if (oid > LONG_MAX) { \ smart_str s = {0}; \ @@ -72,7 +73,9 @@ } \ RETURN_LONG((long)oid); \ } while(0) - +#else +#define PGSQL_RETURN_OID(oid) (RETURN_LONG((long)oid)) +#endif #if HAVE_PQSETNONBLOCKING #define PQ_SETNONBLOCKING(pg_link, flag) PQsetnonblocking(pg_link, flag) @@ -4152,7 +4155,7 @@ PHP_FUNCTION(pg_escape_bytea) #ifdef HAVE_PQESCAPE_BYTEA_CONN if (pgsql_link != NULL || id != -1) { ZEND_FETCH_RESOURCE2(pgsql, PGconn *, &pgsql_link, id, "PostgreSQL link", le_link, le_plink); - to = (char *)PQescapeByteaConn(pgsql, from, (size_t)from_len, &to_len); + to = (char *)PQescapeByteaConn(pgsql, (unsigned char *)from, (size_t)from_len, &to_len); } else #endif to = (char *)PQescapeBytea((unsigned char*)from, from_len, &to_len); @@ -4347,7 +4350,7 @@ static char* php_pgsql_PQescapeInternal(PGconn *conn, const char *str, size_t le #endif static void php_pgsql_escape_internal(INTERNAL_FUNCTION_PARAMETERS, int escape_literal) { - char *from = NULL, *to = NULL, *tmp = NULL; + char *from = NULL, *to = NULL; zval *pgsql_link = NULL; PGconn *pgsql; int from_len; @@ -4380,17 +4383,22 @@ static void php_pgsql_escape_internal(INTERNAL_FUNCTION_PARAMETERS, int escape_l RETURN_FALSE; } #ifdef HAVE_PQESCAPELITERAL - if (escape_literal) { - tmp = PQescapeLiteral(pgsql, from, (size_t)from_len); - } else { - tmp = PQescapeIdentifier(pgsql, from, (size_t)from_len); - } - if (!tmp) { - php_error_docref(NULL TSRMLS_CC, E_WARNING,"Failed to escape"); - RETURN_FALSE; + /* Use a block with a local var to avoid unused variable warnings */ + { + char *tmp; + + if (escape_literal) { + tmp = PQescapeLiteral(pgsql, from, (size_t)from_len); + } else { + tmp = PQescapeIdentifier(pgsql, from, (size_t)from_len); + } + if (!tmp) { + php_error_docref(NULL TSRMLS_CC, E_WARNING,"Failed to escape"); + RETURN_FALSE; + } + to = estrdup(tmp); + PQfreemem(tmp); } - to = estrdup(tmp); - PQfreemem(tmp); #else to = php_pgsql_PQescapeInternal(pgsql, from, (size_t)from_len, escape_literal); if (!to) { @@ -5121,7 +5129,9 @@ PHP_PGSQL_API int php_pgsql_meta_data(PGconn *pg_link, const char *table_name, z #else new_len = PQescapeString(escaped, tmp_name2, strlen(tmp_name2)); #endif - smart_str_appends(&querystr, escaped); + if (new_len) { + smart_str_appends(&querystr, escaped); + } efree(escaped); smart_str_appends(&querystr, "' AND c.relnamespace = n.oid AND n.nspname = '"); @@ -5131,7 +5141,9 @@ PHP_PGSQL_API int php_pgsql_meta_data(PGconn *pg_link, const char *table_name, z #else new_len = PQescapeString(escaped, tmp_name, strlen(tmp_name)); #endif - smart_str_appends(&querystr, escaped); + if (new_len) { + smart_str_appends(&querystr, escaped); + } efree(escaped); smart_str_appends(&querystr, "' AND a.atttypid = t.oid ORDER BY a.attnum;"); @@ -5924,9 +5936,9 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, con size_t to_len; smart_str s = {0}; #ifdef HAVE_PQESCAPE_BYTEA_CONN - tmp = PQescapeByteaConn(pg_link, Z_STRVAL_PP(val), Z_STRLEN_PP(val), &to_len); + tmp = PQescapeByteaConn(pg_link, (unsigned char *)Z_STRVAL_PP(val), Z_STRLEN_PP(val), &to_len); #else - tmp = PQescapeBytea(Z_STRVAL_PP(val), Z_STRLEN_PP(val), &to_len); + tmp = PQescapeBytea(Z_STRVAL_PP(val), (unsigned char *)Z_STRLEN_PP(val), &to_len); #endif Z_TYPE_P(new_val) = IS_STRING; Z_STRLEN_P(new_val) = to_len-1; /* PQescapeBytea's to_len includes additional '\0' */ diff --git a/ext/pgsql/tests/09notice.phpt b/ext/pgsql/tests/09notice.phpt index 67ef262fca..db671016e3 100644 --- a/ext/pgsql/tests/09notice.phpt +++ b/ext/pgsql/tests/09notice.phpt @@ -20,6 +20,9 @@ $db = pg_connect($conn_str); _set_lc_messages(); +$res = pg_query($db, 'SET client_min_messages TO NOTICE;'); +var_dump($res); + pg_query($db, "BEGIN;"); pg_query($db, "BEGIN;"); @@ -33,6 +36,8 @@ echo "pg_last_notice() is Ok\n"; ?> --EXPECTF-- +resource(%d) of type (pgsql result) + Notice: pg_query(): %s already a transaction in progress in %s on line %d %s already a transaction in progress pg_last_notice() is Ok diff --git a/ext/pgsql/tests/80_bug32223.phpt b/ext/pgsql/tests/80_bug32223.phpt index cad5fb3a12..b9bbbf86ed 100644 --- a/ext/pgsql/tests/80_bug32223.phpt +++ b/ext/pgsql/tests/80_bug32223.phpt @@ -37,8 +37,10 @@ begin end; ' LANGUAGE plpgsql;"); - +$res = pg_query($dbh, 'SET client_min_messages TO NOTICE;'); +var_dump($res); $res = pg_query($dbh, 'SELECT test_notice()'); +var_dump($res); $row = pg_fetch_row($res, 0); var_dump($row); pg_free_result($res); @@ -52,6 +54,8 @@ pg_close($dbh); ?> ===DONE=== --EXPECTF-- +resource(%d) of type (pgsql result) +resource(%d) of type (pgsql result) array(1) { [0]=> string(1) "f" diff --git a/ext/pgsql/tests/80_bug32223b.phpt b/ext/pgsql/tests/80_bug32223b.phpt index e79685c43d..418ccfc9ae 100644 --- a/ext/pgsql/tests/80_bug32223b.phpt +++ b/ext/pgsql/tests/80_bug32223b.phpt @@ -37,10 +37,13 @@ begin end; ' LANGUAGE plpgsql;"); +$res = pg_query(dbh, 'SET client_min_messages TO NOTICE;'); +var_dump($res); + function tester() { $res = pg_query(dbh, 'SELECT test_notice()'); $row = pg_fetch_row($res, 0); - var_dump($row); + var_dump($row); pg_free_result($res); if ($row[0] == 'f') { @@ -54,6 +57,7 @@ pg_close(dbh); ?> ===DONE=== --EXPECTF-- +resource(%d) of type (pgsql result) array(1) { [0]=> string(1) "f" diff --git a/ext/phar/config.m4 b/ext/phar/config.m4 index d424060f2a..614d672eab 100644 --- a/ext/phar/config.m4 +++ b/ext/phar/config.m4 @@ -28,5 +28,7 @@ if test "$PHP_PHAR" != "no"; then PHP_ADD_EXTENSION_DEP(phar, spl, true) PHP_ADD_MAKEFILE_FRAGMENT + PHP_INSTALL_HEADERS([ext/phar], [php_phar.h]) + PHP_OUTPUT(ext/phar/phar.1 ext/phar/phar.phar.1) fi diff --git a/ext/phar/php_phar.h b/ext/phar/php_phar.h index a6d7bff414..f8325d0c63 100644 --- a/ext/phar/php_phar.h +++ b/ext/phar/php_phar.h @@ -22,7 +22,7 @@ #ifndef PHP_PHAR_H #define PHP_PHAR_H -#define PHP_PHAR_VERSION "2.0.1" +#define PHP_PHAR_VERSION "2.0.2" #include "ext/standard/basic_functions.h" extern zend_module_entry phar_module_entry; @@ -31,9 +31,11 @@ extern zend_module_entry phar_module_entry; #ifdef PHP_WIN32 #define PHP_PHAR_API __declspec(dllexport) #else -#define PHP_PHAR_API +#define PHP_PHAR_API PHPAPI #endif +PHP_PHAR_API int phar_resolve_alias(char *alias, int alias_len, char **filename, int *filename_len TSRMLS_DC); + #endif /* PHP_PHAR_H */ diff --git a/ext/phar/util.c b/ext/phar/util.c index 8348a47874..97b70a9d95 100644 --- a/ext/phar/util.c +++ b/ext/phar/util.c @@ -1185,6 +1185,17 @@ phar_entry_info * phar_open_jit(phar_archive_data *phar, phar_entry_info *entry, } /* }}} */ +PHP_PHAR_API int phar_resolve_alias(char *alias, int alias_len, char **filename, int *filename_len TSRMLS_DC) /* {{{ */ { + phar_archive_data **fd_ptr; + if (SUCCESS == zend_hash_find(&(PHAR_GLOBALS->phar_alias_map), alias, alias_len, (void**)&fd_ptr)) { + *filename = (*fd_ptr)->fname; + *filename_len = (*fd_ptr)->fname_len; + return SUCCESS; + } + return FAILURE; +} +/* }}} */ + int phar_free_alias(phar_archive_data *phar, char *alias, int alias_len TSRMLS_DC) /* {{{ */ { if (phar->refcount || phar->is_persistent) { @@ -1262,8 +1273,10 @@ alias_success: spprintf(error, 0, "alias \"%s\" is already used for archive \"%s\" cannot be overloaded with \"%s\"", alias, (*fd_ptr)->fname, fname); } if (SUCCESS == phar_free_alias(*fd_ptr, alias, alias_len TSRMLS_CC)) { - efree(*error); - *error = NULL; + if (error) { + efree(*error); + *error = NULL; + } } return FAILURE; } diff --git a/ext/posix/tests/posix_getgrnam.phpt b/ext/posix/tests/posix_getgrnam.phpt deleted file mode 100644 index 854db4ac16..0000000000 --- a/ext/posix/tests/posix_getgrnam.phpt +++ /dev/null @@ -1,19 +0,0 @@ ---TEST-- -posix_getgrnam(): Basic tests ---SKIPIF-- -<?php -if (!extension_loaded('posix')) die('skip - POSIX extension not loaded'); -if (!function_exists('posix_getgrnam')) die('skip posix_getgrnam() not found'); -?> ---FILE-- -<?php - -var_dump(posix_getgrnam(NULL)); -var_dump(posix_getgrnam(1)); -var_dump(posix_getgrnam('')); - -?> ---EXPECT-- -bool(false) -bool(false) -bool(false) diff --git a/ext/posix/tests/posix_getgrnam_basic.phpt b/ext/posix/tests/posix_getgrnam_basic.phpt deleted file mode 100644 index fd5bf23172..0000000000 --- a/ext/posix/tests/posix_getgrnam_basic.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -posix_getgrnam(): Basic tests ---SKIPIF-- -<?php -if (!extension_loaded('posix')) die('skip - POSIX extension not loaded'); -if (!function_exists('posix_getgrnam')) die('skip posix_getgrnam() not found'); -?> ---FILE-- -<?php -echo "Basic test of POSIX posix_getgrnam function\n"; - -var_dump(posix_getgrnam(NULL)); -var_dump(posix_getgrnam(1)); -var_dump(posix_getgrnam('')); - -?> -===DONE=== ---EXPECT-- -Basic test of POSIX posix_getgrnam function -bool(false) -bool(false) -bool(false) -===DONE===
\ No newline at end of file diff --git a/ext/posix/tests/posix_getpwnam.phpt b/ext/posix/tests/posix_getpwnam.phpt deleted file mode 100644 index b5de1e4ce2..0000000000 --- a/ext/posix/tests/posix_getpwnam.phpt +++ /dev/null @@ -1,19 +0,0 @@ ---TEST-- -posix_getpwnam(): Basic tests ---SKIPIF-- -<?php -if (!extension_loaded('posix')) die('skip - POSIX extension not loaded'); -if (!function_exists('posix_getpwnam')) die('skip posix_getpwnam() not found'); -?> ---FILE-- -<?php - -var_dump(posix_getpwnam(1)); -var_dump(posix_getpwnam('')); -var_dump(posix_getpwnam(NULL)); - -?> ---EXPECT-- -bool(false) -bool(false) -bool(false) diff --git a/ext/posix/tests/posix_getpwnam_basic.phpt b/ext/posix/tests/posix_getpwnam_basic.phpt deleted file mode 100644 index d675d6c182..0000000000 --- a/ext/posix/tests/posix_getpwnam_basic.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -posix_getpwnam(): Basic tests ---SKIPIF-- -<?php -if (!extension_loaded('posix')) die('skip - POSIX extension not loaded'); -if (!function_exists('posix_getpwnam')) die('skip posix_getpwnam() not found'); -?> ---FILE-- -<?php -echo "Basic test of POSIX posix_getpwnam function\n"; - -var_dump(posix_getpwnam(1)); -var_dump(posix_getpwnam('')); -var_dump(posix_getpwnam(NULL)); - -?> -===DONE==== ---EXPECT-- -Basic test of POSIX posix_getpwnam function -bool(false) -bool(false) -bool(false) -===DONE==== diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c index 82fd419fcf..1b606b9a33 100644 --- a/ext/session/mod_user.c +++ b/ext/session/mod_user.c @@ -188,7 +188,7 @@ PS_CREATE_SID_FUNC(user) /* maintain backwards compatibility */ if (PSF(create_sid) != NULL) { char *id = NULL; - STDVARS; + zval *retval = NULL; retval = ps_call_handler(PSF(create_sid), 0, NULL TSRMLS_CC); diff --git a/ext/session/session.c b/ext/session/session.c index 1db20185f0..7bb6584621 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -831,9 +831,6 @@ PS_SERIALIZER_ENCODE_FUNC(php_serialize) /* {{{ */ { smart_str buf = {0}; php_serialize_data_t var_hash; - HashTable *_ht = Z_ARRVAL_P(PS(http_session_vars)); - int key_type; - PS_ENCODE_VARS; PHP_VAR_SERIALIZE_INIT(var_hash); php_var_serialize(&buf, &PS(http_session_vars), &var_hash TSRMLS_CC); @@ -849,12 +846,8 @@ PS_SERIALIZER_ENCODE_FUNC(php_serialize) /* {{{ */ PS_SERIALIZER_DECODE_FUNC(php_serialize) /* {{{ */ { - const char *p; - char *name; const char *endptr = val + vallen; zval *session_vars; - int namelen; - int has_value; php_unserialize_data_t var_hash; PHP_VAR_UNSERIALIZE_INIT(var_hash); diff --git a/ext/skeleton/php_skeleton.h b/ext/skeleton/php_skeleton.h index 495907bbd1..0716ae05e6 100644 --- a/ext/skeleton/php_skeleton.h +++ b/ext/skeleton/php_skeleton.h @@ -6,6 +6,8 @@ extern zend_module_entry extname_module_entry; #define phpext_extname_ptr &extname_module_entry +#define PHP_EXTNAME_VERSION "0.1.0" /* Replace with version number for your extension */ + #ifdef PHP_WIN32 # define PHP_EXTNAME_API __declspec(dllexport) #elif defined(__GNUC__) && __GNUC__ >= 4 diff --git a/ext/skeleton/skeleton.c b/ext/skeleton/skeleton.c index ee4ea74e16..2e373442d8 100644 --- a/ext/skeleton/skeleton.c +++ b/ext/skeleton/skeleton.c @@ -41,7 +41,7 @@ zend_module_entry extname_module_entry = { PHP_RSHUTDOWN(extname), /* Replace with NULL if there's nothing to do at request end */ PHP_MINFO(extname), #if ZEND_MODULE_API_NO >= 20010901 - "0.1", /* Replace with version number for your extension */ + PHP_EXTNAME_VERSION, #endif STANDARD_MODULE_PROPERTIES }; diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c index 0ac4c2ed7a..a7a5071c08 100644 --- a/ext/soap/php_sdl.c +++ b/ext/soap/php_sdl.c @@ -2644,16 +2644,17 @@ static sdlAttributePtr make_persistent_sdl_attribute(sdlAttributePtr attr, HashT zend_hash_internal_pointer_reset(pattr->extraAttributes); while (zend_hash_get_current_data(attr->extraAttributes, (void**)&tmp) == SUCCESS) { - pextra = malloc(sizeof(sdlExtraAttribute)); - memset(pextra, 0, sizeof(sdlExtraAttribute)); - if ((*tmp)->ns) { - pextra->ns = strdup((*tmp)->ns); - } - if ((*tmp)->val) { - pextra->val = strdup((*tmp)->val); - } + if (zend_hash_get_current_key_ex(attr->extraAttributes, &key, &key_len, &index, 0, NULL) == HASH_KEY_IS_STRING) { + pextra = malloc(sizeof(sdlExtraAttribute)); + memset(pextra, 0, sizeof(sdlExtraAttribute)); - if (zend_hash_get_current_key_ex(attr->extraAttributes, &key, &key_len, &index, 0, NULL) == HASH_KEY_IS_STRING) { + if ((*tmp)->ns) { + pextra->ns = strdup((*tmp)->ns); + } + if ((*tmp)->val) { + pextra->val = strdup((*tmp)->val); + } + zend_hash_add(pattr->extraAttributes, key, key_len, (void*)&pextra, sizeof(sdlExtraAttributePtr), NULL); } diff --git a/ext/sockets/conversions.c b/ext/sockets/conversions.c index ed55ed52fa..d81484521d 100644 --- a/ext/sockets/conversions.c +++ b/ext/sockets/conversions.c @@ -1257,7 +1257,7 @@ void to_zval_read_msghdr(const char *msghdr_c, zval *zv, res_context *ctx) /* CONVERSIONS for if_index */ static void from_zval_write_ifindex(const zval *zv, char *uinteger, ser_context *ctx) { - unsigned ret; + unsigned ret = 0; zval lzval = zval_used_for_init; if (Z_TYPE_P(zv) == IS_LONG) { diff --git a/ext/sockets/multicast.c b/ext/sockets/multicast.c index 7466c6266e..ecf3a65a32 100644 --- a/ext/sockets/multicast.c +++ b/ext/sockets/multicast.c @@ -63,6 +63,28 @@ static const char *_php_source_op_to_string(enum source_op sop); static int _php_source_op_to_ipv4_op(enum source_op sop); #endif +int php_string_to_if_index(const char *val, unsigned *out TSRMLS_DC) +{ +#if HAVE_IF_NAMETOINDEX + unsigned int ind; + + ind = if_nametoindex(val); + if (ind == 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, + "no interface with name \"%s\" could be found", val); + return FAILURE; + } else { + *out = ind; + return SUCCESS; + } +#else + php_error_docref(NULL TSRMLS_CC, E_WARNING, + "this platform does not support looking up an interface by " + "name, an integer interface index must be supplied instead"); + return FAILURE; +#endif +} + static int php_get_if_index_from_zval(zval *val, unsigned *out TSRMLS_DC) { int ret; @@ -78,31 +100,17 @@ static int php_get_if_index_from_zval(zval *val, unsigned *out TSRMLS_DC) ret = SUCCESS; } } else { -#if HAVE_IF_NAMETOINDEX - unsigned int ind; zval_add_ref(&val); convert_to_string_ex(&val); - ind = if_nametoindex(Z_STRVAL_P(val)); - if (ind == 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, - "no interface with name \"%s\" could be found", Z_STRVAL_P(val)); - ret = FAILURE; - } else { - *out = ind; - ret = SUCCESS; - } + ret = php_string_to_if_index(Z_STRVAL_P(val), out TSRMLS_CC); zval_ptr_dtor(&val); -#else - php_error_docref(NULL TSRMLS_CC, E_WARNING, - "this platform does not support looking up an interface by " - "name, an integer interface index must be supplied instead"); - ret = FAILURE; -#endif } return ret; } + + static int php_get_if_index_from_array(const HashTable *ht, const char *key, php_socket *sock, unsigned int *if_index TSRMLS_DC) { diff --git a/ext/sockets/multicast.h b/ext/sockets/multicast.h index 3614306bbb..81a1bca799 100644 --- a/ext/sockets/multicast.h +++ b/ext/sockets/multicast.h @@ -65,6 +65,8 @@ int php_add4_to_if_index( php_socket *php_sock, unsigned *if_index TSRMLS_DC); +int php_string_to_if_index(const char *val, unsigned *out TSRMLS_DC); + int php_mcast_join( php_socket *sock, int level, diff --git a/ext/sockets/sockaddr_conv.c b/ext/sockets/sockaddr_conv.c index a40b6b4936..64523c3191 100644 --- a/ext/sockets/sockaddr_conv.c +++ b/ext/sockets/sockaddr_conv.c @@ -18,6 +18,7 @@ int php_set_inet6_addr(struct sockaddr_in6 *sin6, char *string, php_socket *php_ struct addrinfo hints; struct addrinfo *addrinfo = NULL; #endif + char *scope = strchr(string, '%'); if (inet_pton(AF_INET6, string, &tmp)) { memcpy(&(sin6->sin6_addr.s6_addr), &(tmp.s6_addr), sizeof(struct in6_addr)); @@ -53,6 +54,22 @@ int php_set_inet6_addr(struct sockaddr_in6 *sin6, char *string, php_socket *php_ } + if (scope++) { + long lval = 0; + double dval = 0; + unsigned scope_id = 0; + + if (IS_LONG == is_numeric_string(scope, strlen(scope), &lval, &dval, 0)) { + if (lval > 0 && lval <= UINT_MAX) { + scope_id = lval; + } + } else { + php_string_to_if_index(scope, &scope_id TSRMLS_CC); + } + + sin6->sin6_scope_id = scope_id; + } + return 1; } /* }}} */ diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 1a417d0f58..3dc7b7925c 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -2290,7 +2290,7 @@ SPL_METHOD(SplFileObject, __construct) intern->u.file.open_mode = NULL; intern->u.file.open_mode_len = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p|sbr", + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p|sbr!", &intern->file_name, &intern->file_name_len, &intern->u.file.open_mode, &intern->u.file.open_mode_len, &use_include_path, &intern->u.file.zcontext) == FAILURE) { diff --git a/ext/spl/tests/bug64782.phpt b/ext/spl/tests/bug64782.phpt new file mode 100644 index 0000000000..ac5d08d7d1 --- /dev/null +++ b/ext/spl/tests/bug64782.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #64782: SplFileObject constructor make $context optional / give it a default value +--FILE-- +<?php + +var_dump(new SplFileObject(__FILE__, "r", false, null)); + +?> +--EXPECTF-- +object(SplFileObject)#1 (%d) { + ["pathName":"SplFileInfo":private]=> + string(%d) "%s/bug64782.php" + ["fileName":"SplFileInfo":private]=> + string(12) "bug64782.php" + ["openMode":"SplFileObject":private]=> + string(1) "r" + ["delimiter":"SplFileObject":private]=> + string(1) "," + ["enclosure":"SplFileObject":private]=> + string(1) """ +} diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index eca7d90368..b4128e066b 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -3639,6 +3639,7 @@ PHP_MINIT_FUNCTION(basic) /* {{{ */ BASIC_ADD_SUBMODULE(dl) BASIC_ADD_SUBMODULE(mail) + BASIC_ADD_SUBMODULE(streams) BASIC_MINIT_SUBMODULE(file) BASIC_MINIT_SUBMODULE(pack) BASIC_MINIT_SUBMODULE(browscap) diff --git a/ext/standard/config.m4 b/ext/standard/config.m4 index 2af2209f2b..3d00d88dda 100644 --- a/ext/standard/config.m4 +++ b/ext/standard/config.m4 @@ -182,12 +182,12 @@ AC_TRY_RUN([ main() { #if HAVE_CRYPT - char salt[30], answer[80]; - - salt[0]='$'; salt[1]='6'; salt[2]='$'; salt[3]='$'; salt[4]='b'; salt[5]='a'; salt[6]='r'; salt[7]='\0'; + char salt[21], answer[21+86]; + + strcpy(salt,"\$6\$rasmuslerdorf\$"); strcpy(answer, salt); - strcpy(&answer[29],"$6$$QMXjqd7rHQZPQ1yHsXkQqC1FBzDiVfTHXL.LaeDAeVV.IzMaV9VU4MQ8kPuZa2SOP1A0RPm772EaFYjpEJtdu."); - exit (strcmp((char *)crypt("foo",salt),answer)); + strcat(answer, "EeHCRjm0bljalWuALHSTs1NB9ipEiLEXLhYeXdOpx22gmlmVejnVXFhd84cEKbYxCo.XuUTrW.RLraeEnsvWs/"); + exit (strcmp((char *)crypt("rasmuslerdorf",salt),answer)); #else exit(0); #endif @@ -211,12 +211,13 @@ AC_TRY_RUN([ main() { #if HAVE_CRYPT - char salt[30], answer[80]; - salt[0]='$'; salt[1]='5'; salt[2]='$'; salt[3]='$'; salt[4]='s'; salt[5]='a'; salt[6]='l'; salt[7]='t'; salt[8]='s'; salt[9]='t'; salt[10]='r'; salt[11]='i'; salt[12]='n'; salt[13]='g'; salt[14]='\0'; - strcat(salt,""); + char salt[21], answer[21+43]; + + strcpy(salt,"\$5\$rasmuslerdorf\$"); strcpy(answer, salt); - strcpy(&answer[29], "$5$saltstring$5B8vYYiY.CVt1RlTTf8KbXBH3hsxY/GNooZaBBGWEc5"); - exit (strcmp((char *)crypt("foo",salt),answer)); + strcat(answer, "cFAm2puLCujQ9t.0CxiFIIvFi4JyQx5UncCt/xRIX23"); + exit (strcmp((char *)crypt("rasmuslerdorf",salt),answer)); + #else exit(0); #endif diff --git a/ext/standard/file.c b/ext/standard/file.c index 106f5c1004..ad6bdad34f 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -818,7 +818,7 @@ PHP_FUNCTION(tempnam) if (p_len > 64) { p[63] = '\0'; } - + RETVAL_FALSE; if ((fd = php_open_temporary_fd_ex(dir, p, &opened_path, 1 TSRMLS_CC)) >= 0) { @@ -1380,13 +1380,13 @@ PHP_FUNCTION(umask) { long arg1 = 0; int oldumask; - + oldumask = umask(077); if (BG(umask) == -1) { BG(umask) = oldumask; } - + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &arg1) == FAILURE) { RETURN_FALSE; } @@ -1799,22 +1799,23 @@ quit_loop: #define FPUTCSV_FLD_CHK(c) memchr(Z_STRVAL(field), c, Z_STRLEN(field)) -/* {{{ proto int fputcsv(resource fp, array fields [, string delimiter [, string enclosure]]) +/* {{{ proto int fputcsv(resource fp, array fields [, string delimiter [, string enclosure [, string escape_char]]]) Format line as CSV and write to file pointer */ PHP_FUNCTION(fputcsv) { - char delimiter = ','; /* allow this to be set as parameter */ - char enclosure = '"'; /* allow this to be set as parameter */ - const char escape_char = '\\'; + char delimiter = ','; /* allow this to be set as parameter */ + char enclosure = '"'; /* allow this to be set as parameter */ + char escape_char = '\\'; /* allow this to be set as parameter */ php_stream *stream; zval *fp = NULL, *fields = NULL; int ret; - char *delimiter_str = NULL, *enclosure_str = NULL; - int delimiter_str_len = 0, enclosure_str_len = 0; + char *delimiter_str = NULL, *enclosure_str = NULL, *escape_str = NULL; + int delimiter_str_len = 0, enclosure_str_len = 0, escape_str_len = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ra|ss", + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ra|sss", &fp, &fields, &delimiter_str, &delimiter_str_len, - &enclosure_str, &enclosure_str_len) == FAILURE) { + &enclosure_str, &enclosure_str_len, + &escape_str, &escape_str_len) == FAILURE) { return; } @@ -1842,6 +1843,17 @@ PHP_FUNCTION(fputcsv) enclosure = *enclosure_str; } + if (escape_str != NULL) { + if (escape_str_len < 1) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "escape must be a character"); + RETURN_FALSE; + } else if (escape_str_len > 1) { + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "escape must be a single character"); + } + /* use first character from string */ + escape_char = *escape_str; + } + PHP_STREAM_TO_ZVAL(stream, &fp); ret = php_fputcsv(stream, fields, delimiter, enclosure, escape_char TSRMLS_CC); diff --git a/ext/standard/filters.c b/ext/standard/filters.c index 0a59039635..15dae1bee6 100644 --- a/ext/standard/filters.c +++ b/ext/standard/filters.c @@ -951,7 +951,9 @@ static php_conv_err_t php_conv_qprint_encode_convert(php_conv_qprint_encode *ins *(pd++) = qp_digits[(c & 0x0f)]; ocnt -= 3; line_ccnt -= 3; - trail_ws--; + if (trail_ws > 0) { + trail_ws--; + } CONSUME_CHAR(ps, icnt, lb_ptr, lb_cnt); } } diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index b8676bbba4..4605e7494f 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -84,6 +84,30 @@ #define HTTP_WRAPPER_HEADER_INIT 1 #define HTTP_WRAPPER_REDIRECTED 2 +static inline void strip_header(char *header_bag, char *lc_header_bag, + const char *lc_header_name) +{ + char *lc_header_start = strstr(lc_header_bag, lc_header_name); + char *header_start = header_bag + (lc_header_start - lc_header_bag); + + if (lc_header_start + && (lc_header_start == lc_header_bag || *(lc_header_start-1) == '\n') + ) { + char *lc_eol = strchr(lc_header_start, '\n'); + char *eol = header_start + (lc_eol - lc_header_start); + + if (lc_eol) { + size_t eollen = strlen(lc_eol); + + memmove(lc_header_start, lc_eol+1, eollen); + memmove(header_start, eol+1, eollen); + } else { + *lc_header_start = '\0'; + *header_start = '\0'; + } + } +} + php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path, char *mode, int options, char **opened_path, php_stream_context *context, int redirect_max, int flags STREAMS_DC TSRMLS_DC) /* {{{ */ { php_stream *stream = NULL; @@ -425,40 +449,17 @@ finish: if (tmp && strlen(tmp) > 0) { char *s; - if (!header_init) { /* Remove post headers for redirects */ - int l = strlen(tmp); - char *s2, *tmp_c = estrdup(tmp); - - php_strtolower(tmp_c, l); - if ((s = strstr(tmp_c, "content-length:"))) { - if ((s2 = memchr(s, '\n', tmp_c + l - s))) { - int b = tmp_c + l - 1 - s2; - memmove(tmp, tmp + (s2 + 1 - tmp_c), b); - memmove(tmp_c, s2 + 1, b); - - } else { - tmp[s - tmp_c] = *s = '\0'; - } - l = strlen(tmp_c); - } - if ((s = strstr(tmp_c, "content-type:"))) { - if ((s2 = memchr(s, '\n', tmp_c + l - s))) { - memmove(tmp, tmp + (s2 + 1 - tmp_c), tmp_c + l - 1 - s2); - } else { - tmp[s - tmp_c] = '\0'; - } - } - - efree(tmp_c); - tmp_c = php_trim(tmp, strlen(tmp), NULL, 0, NULL, 3 TSRMLS_CC); - efree(tmp); - tmp = tmp_c; - } - user_headers = estrdup(tmp); /* Make lowercase for easy comparison against 'standard' headers */ php_strtolower(tmp, strlen(tmp)); + + if (!header_init) { + /* strip POST headers on redirect */ + strip_header(user_headers, tmp, "content-length:"); + strip_header(user_headers, tmp, "content-type:"); + } + if ((s = strstr(tmp, "user-agent:")) && (s == tmp || *(s-1) == '\r' || *(s-1) == '\n' || *(s-1) == '\t' || *(s-1) == ' ')) { diff --git a/ext/standard/info.c b/ext/standard/info.c index 32ef94e599..48e0e85cc5 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -287,7 +287,7 @@ void php_info_print_style(TSRMLS_D) PHPAPI char *php_info_html_esc(char *string TSRMLS_DC) { size_t new_len; - return php_escape_html_entities(string, strlen(string), &new_len, 0, ENT_QUOTES, NULL TSRMLS_CC); + return php_escape_html_entities((unsigned char *) string, strlen(string), &new_len, 0, ENT_QUOTES, NULL TSRMLS_CC); } /* }}} */ diff --git a/ext/standard/password.c b/ext/standard/password.c index 212799100c..ca852038a6 100644 --- a/ext/standard/password.c +++ b/ext/standard/password.c @@ -66,20 +66,20 @@ static php_password_algo php_password_determine_algo(const char *hash, const siz return PHP_PASSWORD_UNKNOWN; } -static zend_bool php_password_salt_is_alphabet(const char *str, const size_t len) /* {{{ */ +static int php_password_salt_is_alphabet(const char *str, const size_t len) /* {{{ */ { size_t i = 0; for (i = 0; i < len; i++) { if (!((str[i] >= 'A' && str[i] <= 'Z') || (str[i] >= 'a' && str[i] <= 'z') || (str[i] >= '0' && str[i] <= '9') || str[i] == '.' || str[i] == '/')) { - return 0; + return FAILURE; } } - return 1; + return SUCCESS; } /* }}} */ -static zend_bool php_password_salt_to64(const char *str, const size_t str_len, const size_t out_len, char *ret) /* {{{ */ +static int php_password_salt_to64(const char *str, const size_t str_len, const size_t out_len, char *ret) /* {{{ */ { size_t pos = 0; size_t ret_len = 0; @@ -108,7 +108,7 @@ static zend_bool php_password_salt_to64(const char *str, const size_t str_len, c } /* }}} */ -static zend_bool php_password_make_salt(size_t length, char *ret TSRMLS_DC) /* {{{ */ +static int php_password_make_salt(size_t length, char *ret TSRMLS_DC) /* {{{ */ { int buffer_valid = 0; size_t i, raw_length; @@ -395,7 +395,7 @@ PHP_FUNCTION(password_hash) efree(buffer); php_error_docref(NULL TSRMLS_CC, E_WARNING, "Provided salt is too short: %lu expecting %lu", (unsigned long) buffer_len, (unsigned long) required_salt_len); RETURN_NULL(); - } else if (0 == php_password_salt_is_alphabet(buffer, buffer_len)) { + } else if (php_password_salt_is_alphabet(buffer, buffer_len) == FAILURE) { salt = safe_emalloc(required_salt_len, 1, 1); if (php_password_salt_to64(buffer, buffer_len, required_salt_len, salt) == FAILURE) { efree(hash_format); diff --git a/ext/standard/tests/file/disk_free_space_basic.phpt b/ext/standard/tests/file/disk_free_space_basic.phpt index 7ea8d36153..200e92ab43 100644 --- a/ext/standard/tests/file/disk_free_space_basic.phpt +++ b/ext/standard/tests/file/disk_free_space_basic.phpt @@ -1,5 +1,9 @@ --TEST-- Test disk_free_space and its alias diskfreespace() functions : basic functionality +--SKIPIF-- +<?php +if (getenv("TRAVIS") === "true") die("skip inaccurate on TravisCI"); +?> --INI-- memory_limit=32M --FILE-- @@ -33,7 +37,7 @@ echo "\n Free Space after writing to a file\n"; $space2 = disk_free_space($file_path.$dir); var_dump( $space2 ); -if( $space1 > $space2 ) +if($space1 > $space2 ) echo "\n Free Space Value Is Correct\n"; else echo "\n Free Space Value Is Incorrect\n"; diff --git a/ext/standard/tests/file/fputcsv_error.phpt b/ext/standard/tests/file/fputcsv_error.phpt index 9403cf446a..ebffd45425 100644 --- a/ext/standard/tests/file/fputcsv_error.phpt +++ b/ext/standard/tests/file/fputcsv_error.phpt @@ -48,7 +48,7 @@ Warning: fputcsv() expects at least 2 parameters, 0 given in %s on line %d NULL -- Testing fputcsv() with more than expected number of arguments -- -Warning: fputcsv() expects at most 4 parameters, 5 given in %s on line %d +Warning: fputcsv() expects parameter 5 to be string, resource given in %s on line %d NULL -- Testing fputcsv() with invalid arguments -- -- Iteration 1 -- diff --git a/ext/standard/tests/file/fputcsv_variation15.phpt b/ext/standard/tests/file/fputcsv_variation15.phpt new file mode 100755 index 0000000000..dc4a9e2dbd --- /dev/null +++ b/ext/standard/tests/file/fputcsv_variation15.phpt @@ -0,0 +1,107 @@ +--TEST-- +various fputcsv() functionality tests +--CREDITS-- +Lee Leathers <leeleathers@gmail.com> +--FILE-- +<?php + +$list = array ( + 0 => 'aaa,bbb', + 1 => 'aaa,"bbb"', + 2 => '"aaa","bbb"', + 3 => 'aaa,bbb', + 4 => '"aaa",bbb', + 5 => '"aaa", "bbb"', + 6 => ',', + 7 => 'aaa,', + 8 => ',"aaa"', + 9 => '"",""', + 10 => '"""""",', + 11 => '""""",aaa', + 12 => 'aaa,bbb ', + 13 => 'aaa,"bbb "', + 14 => 'aaa"aaa","bbb"bbb', + 15 => 'aaa"aaa""",bbb', + 16 => 'aaa,"/"bbb,ccc', + 17 => 'aaa"/"a","bbb"', + 18 => '"/"","aaa"', + 19 => '"/""",aaa', +); + +$file = dirname(__FILE__) . 'fgetcsv.csv'; +@unlink($file); + +$fp = fopen($file, "w"); +foreach ($list as $v) { + fputcsv($fp, explode(',', $v), ',', '"', '/'); +} +fclose($fp); + +$res = file($file); +foreach($res as &$val) +{ + $val = substr($val, 0, -1); +} +echo '$list = ';var_export($res);echo ";\n"; + +$fp = fopen($file, "r"); +$res = array(); +while($l=fgetcsv($fp, 0, ',', '"', '/')) +{ + $res[] = join(',',$l); +} +fclose($fp); + +echo '$list = ';var_export($res);echo ";\n"; + +@unlink($file); + +?> +===DONE=== +<?php exit(0); ?> +--EXPECT-- +$list = array ( + 0 => 'aaa,bbb', + 1 => 'aaa,"""bbb"""', + 2 => '"""aaa""","""bbb"""', + 3 => 'aaa,bbb', + 4 => '"""aaa""",bbb', + 5 => '"""aaa"""," ""bbb"""', + 6 => ',', + 7 => 'aaa,', + 8 => ',"""aaa"""', + 9 => '"""""",""""""', + 10 => '"""""""""""""",', + 11 => '"""""""""""",aaa', + 12 => 'aaa,"bbb "', + 13 => 'aaa,"""bbb """', + 14 => '"aaa""aaa""","""bbb""bbb"', + 15 => '"aaa""aaa""""""",bbb', + 16 => 'aaa,"""/"bbb",ccc', + 17 => '"aaa""/"a""","""bbb"""', + 18 => '"""/"""","""aaa"""', + 19 => '"""/"""""",aaa', +); +$list = array ( + 0 => 'aaa,bbb', + 1 => 'aaa,"bbb"', + 2 => '"aaa","bbb"', + 3 => 'aaa,bbb', + 4 => '"aaa",bbb', + 5 => '"aaa", "bbb"', + 6 => ',', + 7 => 'aaa,', + 8 => ',"aaa"', + 9 => '"",""', + 10 => '"""""",', + 11 => '""""",aaa', + 12 => 'aaa,bbb ', + 13 => 'aaa,"bbb "', + 14 => 'aaa"aaa","bbb"bbb', + 15 => 'aaa"aaa""",bbb', + 16 => 'aaa,"/"bbb,ccc', + 17 => 'aaa"/"a","bbb"', + 18 => '"/"","aaa"', + 19 => '"/""",aaa', +); +===DONE=== diff --git a/ext/standard/tests/http/bug61548.phpt b/ext/standard/tests/http/bug61548.phpt new file mode 100644 index 0000000000..138b15a338 --- /dev/null +++ b/ext/standard/tests/http/bug61548.phpt @@ -0,0 +1,118 @@ +--TEST-- +Bug #61548 (content-type must appear at the end of headers) +--INI-- +allow_url_fopen=1 +--SKIPIF-- +<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?> +--FILE-- +<?php +require 'server.inc'; + +function do_test($header) { + $options = [ + 'http' => [ + 'method' => 'POST', + 'header' => $header, + 'follow_location' => true, + ], + ]; + + $ctx = stream_context_create($options); + + $responses = [ + "data://text/plain,HTTP/1.1 201\r\nLocation: /foo\r\n\r\n", + "data://text/plain,HTTP/1.1 200\r\nConnection: close\r\n\r\n", + ]; + $pid = http_server('tcp://127.0.0.1:12342', $responses, $output); + + $fd = fopen('http://127.0.0.1:12342/', 'rb', false, $ctx); + fseek($output, 0, SEEK_SET); + echo stream_get_contents($output); + + http_server_kill($pid); +} + +do_test("First:1\nSecond:2\nContent-type: text/plain"); +do_test("First:1\nSecond:2\nContent-type: text/plain\n"); +do_test("First:1\nSecond:2\nContent-type: text/plain\nThird:"); +do_test("First:1\nContent-type:text/plain\nSecond:2"); +do_test("First:1\nContent-type:text/plain\nSecond:2\n"); +do_test("First:1\nContent-type:text/plain\nSecond:2\nThird:"); + +?> +Done +--EXPECT-- +POST / HTTP/1.0 +Host: 127.0.0.1:12342 +First:1 +Second:2 +Content-type: text/plain + +GET /foo HTTP/1.0 +Host: 127.0.0.1:12342 +First:1 +Second:2 + + +POST / HTTP/1.0 +Host: 127.0.0.1:12342 +First:1 +Second:2 +Content-type: text/plain + +GET /foo HTTP/1.0 +Host: 127.0.0.1:12342 +First:1 +Second:2 + + +POST / HTTP/1.0 +Host: 127.0.0.1:12342 +First:1 +Second:2 +Content-type: text/plain +Third: + +GET /foo HTTP/1.0 +Host: 127.0.0.1:12342 +First:1 +Second:2 +Third: + +POST / HTTP/1.0 +Host: 127.0.0.1:12342 +First:1 +Content-type:text/plain +Second:2 + +GET /foo HTTP/1.0 +Host: 127.0.0.1:12342 +First:1 +Second:2 + +POST / HTTP/1.0 +Host: 127.0.0.1:12342 +First:1 +Content-type:text/plain +Second:2 + +GET /foo HTTP/1.0 +Host: 127.0.0.1:12342 +First:1 +Second:2 + +POST / HTTP/1.0 +Host: 127.0.0.1:12342 +First:1 +Content-type:text/plain +Second:2 +Third: + +GET /foo HTTP/1.0 +Host: 127.0.0.1:12342 +First:1 +Second:2 +Third: + +Done + diff --git a/ext/standard/tests/serialize/bug64146.phpt b/ext/standard/tests/serialize/bug64146.phpt new file mode 100644 index 0000000000..18ae78d0ce --- /dev/null +++ b/ext/standard/tests/serialize/bug64146.phpt @@ -0,0 +1,60 @@ +--TEST-- +Bug #64146 (serialize incorrectly saving objects when they are cloned) +--FILE-- +<?php + +echo "Test\n"; + +class A +{ + public $a = array(); + + public function __construct() + { + $this->a[] = new B(1); + $this->a[] = new B(2); + } +} + +class B implements Serializable +{ + public $b; + + public function __construct($c) + { + $this->b = new C($c); + } + + public function serialize() + { + return serialize(clone $this->b); + } + + public function unserialize($data) + { + $this->b = unserialize($data); + } +} + +class C +{ + public $c; + + public function __construct($c) + { + $this->c = $c; + } +} + +$a = unserialize(serialize(new A())); + +print $a->a[0]->b->c . "\n"; +print $a->a[1]->b->c . "\n"; + +?> +Done +--EXPECT-- +Test +1 +2 +Done diff --git a/ext/standard/tests/serialize/bug65806.phpt b/ext/standard/tests/serialize/bug65806.phpt new file mode 100644 index 0000000000..19fab95c64 --- /dev/null +++ b/ext/standard/tests/serialize/bug65806.phpt @@ -0,0 +1,83 @@ +--TEST-- +Bug #65806 (unserialize fails with object which is referenced multiple times) +--FILE-- +<?php +class myObjA {} +class myObjB { + public $attrA; + public $attrB; +} +class myObjC { + public $attrC; + public $attrD; +} +class myList { + private $_serialized; + private $_obj; + + public function __construct($obj) + { + $this->_obj = $obj; + $this->_serialized = serialize($this->_obj); + } + public function get() + { + return $this->_obj; + } + public function __sleep() + { + $this->_serialized = serialize($this->_obj); + return array( + "\0" . __CLASS__ . "\0_serialized", + ); + } + public function __wakeup() + { + $this->_obj = unserialize($this->_serialized); + } +} + +echo "SCRIPT START" . PHP_EOL; + +$objA = new myObjA(); +$objB = new myObjB(); +$objC = new myObjC(); + +$objB->attrA = new ArrayIterator(); +$objB->attrB = $objA; + +$objC->attrC = $objB; +$objC->attrD = $objA; + +$list = new myList($objC); + +echo 'check ' . check($list->get()) . PHP_EOL; + +echo "start serialize/unserialize" . PHP_EOL; +$newList = unserialize(serialize($list)); +echo "finish serialize/unserialize" . PHP_EOL; + +//after unserialize the property myObjC::attrD is null instead of expected object +echo 'check ' . check($newList->get()) . PHP_EOL; + +echo "SCRIPT END" . PHP_EOL ; + +function check(myObjC $obj) { + + if (!is_object($obj->attrC)) { + return 'failed (myObjC::attrC => ' . var_export($obj->attrC, true) . ')'; + } + if (!is_object($obj->attrD)) { + return 'failed (myObjC::attrD => ' . var_export($obj->attrD, true) . ')'; + } + return 'successful'; +} +?> +--EXPECT-- +SCRIPT START +check successful +start serialize/unserialize +finish serialize/unserialize +check successful +SCRIPT END + diff --git a/ext/standard/tests/streams/bug65483.phpt b/ext/standard/tests/streams/bug65483.phpt new file mode 100644 index 0000000000..d214bbbbcc --- /dev/null +++ b/ext/standard/tests/streams/bug65483.phpt @@ -0,0 +1,19 @@ +--TEST-- +Bug #65483: quoted-printable encode stream filter incorrectly encoding spaces +--FILE-- +<?php + +$data = 'a b=c d'; + +$fd = fopen('php://temp', 'w+'); +fwrite($fd, $data); +rewind($fd); + +$res = stream_filter_append($fd, 'convert.quoted-printable-encode', STREAM_FILTER_READ); +var_dump(stream_get_contents($fd, -1, 0)); + +fclose($fd); + +?> +--EXPECT-- +string(9) "a b=3Dc d" diff --git a/ext/standard/var.c b/ext/standard/var.c index cd868bb50f..cafb8fa342 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -549,11 +549,9 @@ static inline int php_add_var_hash(HashTable *var_hash, zval *var, void *var_old char id[32], *p; register int len; - /* relies on "(long)" being a perfect hash function for data pointers, - * however the actual identity of an object has had to be determined - * by its object handle since 5.0. */ if ((Z_TYPE_P(var) == IS_OBJECT) && Z_OBJ_HT_P(var)->get_class_entry) { - p = smart_str_print_long(id + sizeof(id) - 1, (long) Z_OBJ_HANDLE_P(var)); + p = smart_str_print_long(id + sizeof(id) - 1, + (long) zend_objects_get_address(var TSRMLS_CC)); *(--p) = 'O'; len = id + sizeof(id) - 1 - p; } else { diff --git a/ext/xmlreader/php_xmlreader.c b/ext/xmlreader/php_xmlreader.c index 02ebc7738e..aae55c8b3e 100644 --- a/ext/xmlreader/php_xmlreader.c +++ b/ext/xmlreader/php_xmlreader.c @@ -805,7 +805,6 @@ PHP_METHOD(xmlreader, read) if (intern != NULL && intern->ptr != NULL) { retval = xmlTextReaderRead(intern->ptr); if (retval == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "An Error Occurred while reading"); RETURN_FALSE; } else { RETURN_BOOL(retval); @@ -847,7 +846,6 @@ PHP_METHOD(xmlreader, next) retval = xmlTextReaderNext(intern->ptr); } if (retval == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "An Error Occurred while reading"); RETURN_FALSE; } else { RETURN_BOOL(retval); @@ -1320,6 +1318,7 @@ PHP_MINIT_FUNCTION(xmlreader) xmlreader_object_handlers.read_property = xmlreader_read_property; xmlreader_object_handlers.write_property = xmlreader_write_property; xmlreader_object_handlers.get_property_ptr_ptr = xmlreader_get_property_ptr_ptr; + xmlreader_object_handlers.clone_obj = NULL; INIT_CLASS_ENTRY(ce, "XMLReader", xmlreader_functions); ce.create_object = xmlreader_objects_new; diff --git a/ext/xmlreader/tests/bug51936.phpt b/ext/xmlreader/tests/bug51936.phpt new file mode 100644 index 0000000000..4b5f1012e7 --- /dev/null +++ b/ext/xmlreader/tests/bug51936.phpt @@ -0,0 +1,22 @@ +--TEST-- +Bug #51936 (Crash with clone XMLReader) +--SKIPIF-- +<?php +extension_loaded("xmlreader") or die("skip requires xmlreader"); +?> +--FILE-- +<?php +echo "Test\n"; + +$xmlreader = new XMLReader(); +$xmlreader->xml("<a><b/></a>"); + +$xmlreader->next(); +$xmlreader2 = clone $xmlreader; +$xmlreader2->next(); +?> +Done +--EXPECTF-- +Test + +Fatal error: Trying to clone an uncloneable object of class XMLReader in %s on line %d diff --git a/ext/xmlreader/tests/bug64230.phpt b/ext/xmlreader/tests/bug64230.phpt new file mode 100644 index 0000000000..0b070925f3 --- /dev/null +++ b/ext/xmlreader/tests/bug64230.phpt @@ -0,0 +1,50 @@ +--TEST-- +Bug #64230 (XMLReader does not suppress errors) +--SKIPIF-- +<?php +extension_loaded("xmlreader") or die("skip requires xmlreader"); +?> +--FILE-- +<?php +echo "Test\n"; + +function show_internal_errors() { + foreach (libxml_get_errors() as $error) { + printf("Internal: %s\n", $error->message); + } + libxml_clear_errors(); +} + +echo "Internal errors TRUE\n"; +libxml_use_internal_errors(true); + +$x = new XMLReader; +$x->xml("<root att/>"); +$x->read(); + +show_internal_errors(); + +echo "Internal errors FALSE\n"; +libxml_use_internal_errors(false); + +$x = new XMLReader; +$x->xml("<root att/>"); +$x->read(); + +show_internal_errors(); + +?> +Done +--EXPECTF-- +Test +Internal errors TRUE +Internal: Specification mandate value for attribute att + +Internal errors FALSE + +Warning: XMLReader::read(): %s: parser error : Specification mandate value for attribute att in %s on line %d + +Warning: XMLReader::read(): <root att/> in %s on line %d + +Warning: XMLReader::read(): ^ in %s on line %d +Done diff --git a/ext/xmlrpc/tests/005.phpt b/ext/xmlrpc/tests/005.phpt new file mode 100644 index 0000000000..613dfde249 --- /dev/null +++ b/ext/xmlrpc/tests/005.phpt @@ -0,0 +1,47 @@ +--TEST-- +xmlrpc_encode() Simple test encode type double and String + +--CREDITS-- +Michel Araujo <araujo_michel@yahoo.com.br> +#PHPSP 2013-08-22 + +--SKIPIF-- +<?php if (!extension_loaded("xmlrpc")) print "skip"; ?> + +--FILE-- +<?php + +$response = xmlrpc_encode(3.24234); +echo $response; + +$response = xmlrpc_encode(-3.24234); +echo $response; + +$response = xmlrpc_encode('Is string'); +echo $response; + +--EXPECT-- +<?xml version="1.0" encoding="utf-8"?> +<params> +<param> + <value> + <double>3.24234</double> + </value> +</param> +</params> +<?xml version="1.0" encoding="utf-8"?> +<params> +<param> + <value> + <double>-3.24234</double> + </value> +</param> +</params> +<?xml version="1.0" encoding="utf-8"?> +<params> +<param> + <value> + <string>Is string</string> + </value> +</param> +</params>
\ No newline at end of file diff --git a/ext/xmlrpc/tests/006.phpt b/ext/xmlrpc/tests/006.phpt new file mode 100644 index 0000000000..f33932d5a2 --- /dev/null +++ b/ext/xmlrpc/tests/006.phpt @@ -0,0 +1,29 @@ +--TEST-- +xmlrpc_decode() Simple test decode type string + +--CREDITS-- +Michel Araujo <araujo_michel@yahoo.com.br> +#PHPSP 2013-08-22 + +--SKIPIF-- +<?php if (!extension_loaded("xmlrpc")) print "skip"; ?> + +--FILE-- +<?php + +$xml = <<<XML +<?xml version="1.0" encoding="utf-8"?> +<params> +<param> + <value> + <string>Is string</string> + </value> +</param> +</params> +XML; + +$response = xmlrpc_decode($xml); +echo $response; + +--EXPECT-- +Is string
\ No newline at end of file diff --git a/ext/xmlrpc/tests/007.phpt b/ext/xmlrpc/tests/007.phpt new file mode 100644 index 0000000000..84c15a7d8a --- /dev/null +++ b/ext/xmlrpc/tests/007.phpt @@ -0,0 +1,29 @@ +--TEST-- +xmlrpc_decode() Simple test decode type int + +--CREDITS-- +Michel Araujo <araujo_michel@yahoo.com.br> +#PHPSP 2013-08-22 + +--SKIPIF-- +<?php if (!extension_loaded("xmlrpc")) print "skip"; ?> + +--FILE-- +<?php + +$xml = <<<XML +<?xml version="1.0" encoding="utf-8"?> +<params> +<param> + <value> + <int>1</int> + </value> +</param> +</params> +XML; + +$response = xmlrpc_decode($xml); +echo $response; + +--EXPECT-- +1
\ No newline at end of file diff --git a/ext/zip/lib/zip_source_error.c b/ext/zip/lib/zip_source_error.c index ffb4652d33..70ec8bc5d4 100644 --- a/ext/zip/lib/zip_source_error.c +++ b/ext/zip/lib/zip_source_error.c @@ -40,7 +40,7 @@ ZIP_EXTERN(void) zip_source_error(struct zip_source *src, int *ze, int *se) { - int e[2]; + int e[2] = { 0, 0 }; if (src->src == NULL) { } diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 7297523aaa..d3ec27bafe 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -102,14 +102,14 @@ static char * php_zip_make_relative_path(char *path, int path_len) /* {{{ */ char *path_begin = path; size_t i; - if (IS_SLASH(path[0])) { - return path + 1; - } - if (path_len < 1 || path == NULL) { return NULL; } + if (IS_SLASH(path[0])) { + return path + 1; + } + i = path_len; while (1) { @@ -1856,15 +1856,16 @@ static ZIPARCHIVE_METHOD(addFromString) /* TODO: fix _zip_replace */ if (cur_idx >= 0) { if (zip_delete(intern, cur_idx) == -1) { - RETURN_FALSE; + goto fail; } } - if (zip_add(intern, name, zs) == -1) { - RETURN_FALSE; - } else { + if (zip_add(intern, name, zs) != -1) { RETURN_TRUE; } +fail: + zip_source_free(zs); + RETURN_FALSE; } /* }}} */ diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index 6f11cf3f32..9b8645a061 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -775,7 +775,12 @@ PHPAPI char *expand_filepath_with_mode(const char *filepath, char *real_path, co * we cannot cannot getcwd() and the requested, * relatively referenced file is accessible */ copy_len = strlen(filepath) > MAXPATHLEN - 1 ? MAXPATHLEN - 1 : strlen(filepath); - real_path = estrndup(filepath, copy_len); + if (real_path) { + memcpy(real_path, filepath, copy_len); + real_path[copy_len] = '\0'; + } else { + real_path = estrndup(filepath, copy_len); + } close(fdtest); return real_path; } else { diff --git a/main/php_version.h b/main/php_version.h index 4a538a4138..d9ea4aab3c 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.in to change version number */ #define PHP_MAJOR_VERSION 5 #define PHP_MINOR_VERSION 5 -#define PHP_RELEASE_VERSION 4 +#define PHP_RELEASE_VERSION 5 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "5.5.4-dev" -#define PHP_VERSION_ID 50504 +#define PHP_VERSION "5.5.5-dev" +#define PHP_VERSION_ID 50505 diff --git a/php.ini-development b/php.ini-development index 43ab1de26a..2ef47a40a2 100644 --- a/php.ini-development +++ b/php.ini-development @@ -83,6 +83,8 @@ ; development version only in development environments as errors shown to ; application users can inadvertently leak otherwise secure information. +; This is php.ini-development INI file. + ;;;;;;;;;;;;;;;;;;; ; Quick Reference ; ;;;;;;;;;;;;;;;;;;; @@ -197,13 +199,12 @@ engine = On ; This directive determines whether or not PHP will recognize code between -; <? and ?> tags as PHP source which should be processed as such. It's been -; recommended for several years that you not use the short tag "short cut" and -; instead to use the full <?php and ?> tag combination. With the wide spread use -; of XML and use of these tags by other languages, the server can become easily -; confused and end up parsing the wrong code in the wrong context. But because -; this short cut has been a feature for such a long time, it's currently still -; supported for backwards compatibility, but we recommend you don't use them. +; <? and ?> tags as PHP source which should be processed as such. It is +; generally recommended that <?php and ?> should be used and that this feature +; should be disabled, as enabling it may result in issues when generating XML +; documents, however this remains supported for backward compatibility reasons. +; Note that this directive does not control the <?= shorthand tag, which can be +; used regardless of this directive. ; Default Value: On ; Development Value: Off ; Production Value: Off @@ -1906,7 +1907,7 @@ ldap.max_links = -1 ;opcache.revalidate_path=0 ; If disabled, all PHPDoc comments are dropped from the code to reduce the - ;size of the optimized code. +; size of the optimized code. ;opcache.save_comments=1 ; If disabled, PHPDoc comments are not loaded from SHM, so "Doc Comments" diff --git a/php.ini-production b/php.ini-production index 0014c4e251..c39de742db 100644 --- a/php.ini-production +++ b/php.ini-production @@ -83,6 +83,8 @@ ; development version only in development environments as errors shown to ; application users can inadvertently leak otherwise secure information. +; This is php.ini-production INI file. + ;;;;;;;;;;;;;;;;;;; ; Quick Reference ; ;;;;;;;;;;;;;;;;;;; @@ -197,13 +199,12 @@ engine = On ; This directive determines whether or not PHP will recognize code between -; <? and ?> tags as PHP source which should be processed as such. It's been -; recommended for several years that you not use the short tag "short cut" and -; instead to use the full <?php and ?> tag combination. With the wide spread use -; of XML and use of these tags by other languages, the server can become easily -; confused and end up parsing the wrong code in the wrong context. But because -; this short cut has been a feature for such a long time, it's currently still -; supported for backwards compatibility, but we recommend you don't use them. +; <? and ?> tags as PHP source which should be processed as such. It is +; generally recommended that <?php and ?> should be used and that this feature +; should be disabled, as enabling it may result in issues when generating XML +; documents, however this remains supported for backward compatibility reasons. +; Note that this directive does not control the <?= shorthand tag, which can be +; used regardless of this directive. ; Default Value: On ; Development Value: Off ; Production Value: Off @@ -1906,7 +1907,7 @@ ldap.max_links = -1 ;opcache.revalidate_path=0 ; If disabled, all PHPDoc comments are dropped from the code to reduce the - ;size of the optimized code. +; size of the optimized code. ;opcache.save_comments=1 ; If disabled, PHPDoc comments are not loaded from SHM, so "Doc Comments" diff --git a/run-tests.php b/run-tests.php index 54a12a177d..7eb445eeb8 100755 --- a/run-tests.php +++ b/run-tests.php @@ -459,7 +459,7 @@ $pass_options = ''; $compression = 0; $output_file = $CUR_DIR . '/php_test_results_' . date('Ymd_Hi') . '.txt'; -if ($compression) { +if ($compression && in_array("compress.zlib", stream_get_filters())) { $output_file = 'compress.zlib://' . $output_file . '.gz'; } @@ -1547,6 +1547,16 @@ TEST $file } } } + + if (!extension_loaded("zlib") + && ( array_key_exists("GZIP_POST", $section_text) + || array_key_exists("DEFLATE_POST", $section_text)) + ) { + $message = "ext/zlib required"; + show_result('SKIP', $tested, $tested_file, "reason: $message", $temp_filenames); + junit_mark_test_as('SKIP', $shortname, $tested, null, "<![CDATA[\n$message\n]]>"); + return 'SKIPPED'; + } if (@count($section_text['REDIRECTTEST']) == 1) { $test_files = array(); diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index cbe9c7bd66..1315a62b87 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -268,6 +268,7 @@ static php_cli_server_ext_mime_type_pair mime_type_map[] = { { "jpg", "image/jpeg" }, { "jpeg", "image/jpeg" }, { "jpe", "image/jpeg" }, + { "pdf", "application/pdf" }, { "png", "image/png" }, { "svg", "image/svg+xml" }, { "txt", "text/plain" }, @@ -412,7 +413,7 @@ static void append_essential_headers(smart_str* buffer, php_cli_server_client *c { { char **val; - if (SUCCESS == zend_hash_find(&client->request.headers, "Host", sizeof("Host"), (void**)&val)) { + if (SUCCESS == zend_hash_find(&client->request.headers, "host", sizeof("host"), (void**)&val)) { smart_str_appendl_ex(buffer, "Host", sizeof("Host") - 1, persistent); smart_str_appendl_ex(buffer, ": ", sizeof(": ") - 1, persistent); smart_str_appends_ex(buffer, *val, persistent); @@ -568,7 +569,7 @@ static char *sapi_cli_server_read_cookies(TSRMLS_D) /* {{{ */ { php_cli_server_client *client = SG(server_context); char **val; - if (FAILURE == zend_hash_find(&client->request.headers, "Cookie", sizeof("Cookie"), (void**)&val)) { + if (FAILURE == zend_hash_find(&client->request.headers, "cookie", sizeof("cookie"), (void**)&val)) { return NULL; } return *val; @@ -1566,12 +1567,9 @@ static int php_cli_server_client_read_request_on_header_value(php_http_parser *p return 1; } { - char *header_name = client->current_header_name; - size_t header_name_len = client->current_header_name_len; - char c = header_name[header_name_len]; - header_name[header_name_len] = '\0'; - zend_hash_add(&client->request.headers, header_name, header_name_len + 1, &value, sizeof(char *), NULL); - header_name[header_name_len] = c; + char *header_name = zend_str_tolower_dup(client->current_header_name, client->current_header_name_len); + zend_hash_add(&client->request.headers, header_name, client->current_header_name_len + 1, &value, sizeof(char *), NULL); + efree(header_name); } if (client->current_header_name_allocated) { @@ -1602,6 +1600,7 @@ static int php_cli_server_client_read_request_on_body(php_http_parser *parser, c } client->request.content_len = 0; } + client->request.content = perealloc(client->request.content, client->request.content_len + length, 1); memmove(client->request.content + client->request.content_len, at, length); client->request.content_len += length; return 0; @@ -1729,7 +1728,7 @@ static void php_cli_server_client_populate_request_info(const php_cli_server_cli request_info->post_data = client->request.content; request_info->content_length = request_info->post_data_length = client->request.content_len; request_info->auth_user = request_info->auth_password = request_info->auth_digest = NULL; - if (SUCCESS == zend_hash_find(&client->request.headers, "Content-Type", sizeof("Content-Type"), (void**)&val)) { + if (SUCCESS == zend_hash_find(&client->request.headers, "content-type", sizeof("content-type"), (void**)&val)) { request_info->content_type = *val; } } /* }}} */ @@ -1967,7 +1966,7 @@ static int php_cli_server_begin_send_static(php_cli_server *server, php_cli_serv static int php_cli_server_request_startup(php_cli_server *server, php_cli_server_client *client TSRMLS_DC) { /* {{{ */ char **auth; php_cli_server_client_populate_request_info(client, &SG(request_info)); - if (SUCCESS == zend_hash_find(&client->request.headers, "Authorization", sizeof("Authorization"), (void**)&auth)) { + if (SUCCESS == zend_hash_find(&client->request.headers, "authorization", sizeof("authorization"), (void**)&auth)) { php_handle_auth_data(*auth TSRMLS_CC); } SG(sapi_headers).http_response_code = 200; diff --git a/sapi/cli/tests/bug65633.phpt b/sapi/cli/tests/bug65633.phpt new file mode 100644 index 0000000000..55834095b1 --- /dev/null +++ b/sapi/cli/tests/bug65633.phpt @@ -0,0 +1,48 @@ +--TEST-- +Bug #65633 (built-in server treat some http headers as case-sensitive) +--SKIPIF-- +<?php +include "skipif.inc"; +?> +--FILE-- +<?php +include "php_cli_server.inc"; +php_cli_server_start(<<<'PHP' +var_dump($_COOKIE, $_SERVER['HTTP_FOO']); +PHP +); + +list($host, $port) = explode(':', PHP_CLI_SERVER_ADDRESS); +$port = intval($port)?:80; + +$fp = fsockopen($host, $port, $errno, $errstr, 0.5); +if (!$fp) { + die("connect failed"); +} + +if(fwrite($fp, <<<HEADER +GET / HTTP/1.1 +cookie: foo=bar +foo: bar + + +HEADER +)) { + while (!feof($fp)) { + echo fgets($fp); + } +} + +fclose($fp); +?> +--EXPECTF-- +HTTP/1.1 200 OK +Connection: close +X-Powered-By: %s +Content-type: text/html + +array(1) { + ["foo"]=> + string(3) "bar" +} +string(3) "bar" diff --git a/sapi/cli/tests/cli_process_title_windows.phpt b/sapi/cli/tests/cli_process_title_windows.phpt index 309c09c0e1..472f9c10fe 100644 --- a/sapi/cli/tests/cli_process_title_windows.phpt +++ b/sapi/cli/tests/cli_process_title_windows.phpt @@ -20,7 +20,7 @@ if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') // no warnings/errors. $is_windows8 = false; -$ps_output = shell_exec("PowerShell \"(Get-Host).UI.RawUI.WindowTitle\""); +$ps_output = shell_exec("PowerShell -NoProfile \"(Get-Host).UI.RawUI.WindowTitle\""); if ($ps_output === null) { echo "Get-Host failed\n"; @@ -28,7 +28,8 @@ if ($ps_output === null) } $ps_output = trim($ps_output); -if (($ps_output == "Windows PowerShell") || ($ps_output == "Administrator: Windows PowerShell")) +$end_title_windows8 = ": Windows PowerShell"; +if (($ps_output == "Windows PowerShell") || (strlen($ps_output) > strlen($end_title_windows8) && substr($ps_output,-strlen($end_title_windows8)) === $end_title_windows8)) $is_windows8 = true; echo "*** Testing setting the process title ***\n"; @@ -45,7 +46,7 @@ if ($is_windows8) } else { - $loaded_title = shell_exec("PowerShell \"get-process cmd*,powershell* | Select-Object mainWindowTitle | ft -hide\""); + $loaded_title = shell_exec("PowerShell -NoProfile \"get-process cmd*,powershell* | Select-Object mainWindowTitle | ft -hide\""); if ($loaded_title === null) { diff --git a/sapi/fpm/fpm/fastcgi.c b/sapi/fpm/fpm/fastcgi.c index 99905c8b60..ec579eadf6 100644 --- a/sapi/fpm/fpm/fastcgi.c +++ b/sapi/fpm/fpm/fastcgi.c @@ -426,8 +426,9 @@ static int fcgi_get_params(fcgi_request *req, unsigned char *p, unsigned char *e char buf[128]; char *tmp = buf; size_t buf_size = sizeof(buf); - int name_len, val_len; - uint eff_name_len; + int name_len = 0; + int val_len = 0; + uint eff_name_len = 0; char *s; int ret = 1; size_t bytes_consumed; diff --git a/sapi/fpm/fpm/fpm_children.c b/sapi/fpm/fpm/fpm_children.c index 84a9474332..45cc075b42 100644 --- a/sapi/fpm/fpm/fpm_children.c +++ b/sapi/fpm/fpm/fpm_children.c @@ -251,7 +251,7 @@ void fpm_children_bury() /* {{{ */ } zlog(severity, "[pool %s] child %d exited %s after %ld.%06d seconds from start", child->wp->config->name, (int) pid, buf, tv2.tv_sec, (int) tv2.tv_usec); } else { - zlog(ZLOG_DEBUG, "[pool %s] child %d has been killed by the process managment after %ld.%06d seconds from start", child->wp->config->name, (int) pid, tv2.tv_sec, (int) tv2.tv_usec); + zlog(ZLOG_DEBUG, "[pool %s] child %d has been killed by the process management after %ld.%06d seconds from start", child->wp->config->name, (int) pid, tv2.tv_sec, (int) tv2.tv_usec); } fpm_child_close(child, 1 /* in event_loop */); diff --git a/sapi/fpm/php-fpm.8.in b/sapi/fpm/php-fpm.8.in index a4e7e74e20..b02aa25ba7 100644 --- a/sapi/fpm/php-fpm.8.in +++ b/sapi/fpm/php-fpm.8.in @@ -96,7 +96,7 @@ Specify alternative path to FastCGI process manager configuration file (the defa .PD 1 .B \-t Test FPM configuration file and exit -If called twice (-tt), the configuration is dumped before exiting. +If called twice (\-tt), the configuration is dumped before exiting. .TP .PD 0 .B \-\-daemonize diff --git a/travis/compile.sh b/travis/compile.sh index a56db63c12..2b53099651 100755 --- a/travis/compile.sh +++ b/travis/compile.sh @@ -33,5 +33,6 @@ --with-gettext \ --enable-sockets \ --with-bz2 \ +--with-openssl \ --enable-bcmath make --quiet diff --git a/travis/ext/mysql/setup.sh b/travis/ext/mysql/setup.sh index 994fad1376..a3ba75cb2d 100755 --- a/travis/ext/mysql/setup.sh +++ b/travis/ext/mysql/setup.sh @@ -1,2 +1,2 @@ #!/bin/bash -mysql -u root -e "CREATE DATABASE IF NOT EXISTS test" +mysql -e "CREATE DATABASE IF NOT EXISTS test" diff --git a/travis/ext/mysqli/setup.sh b/travis/ext/mysqli/setup.sh index 994fad1376..a3ba75cb2d 100755 --- a/travis/ext/mysqli/setup.sh +++ b/travis/ext/mysqli/setup.sh @@ -1,2 +1,2 @@ #!/bin/bash -mysql -u root -e "CREATE DATABASE IF NOT EXISTS test" +mysql -e "CREATE DATABASE IF NOT EXISTS test" diff --git a/travis/ext/pdo_mysql/setup.sh b/travis/ext/pdo_mysql/setup.sh index 994fad1376..a3ba75cb2d 100755 --- a/travis/ext/pdo_mysql/setup.sh +++ b/travis/ext/pdo_mysql/setup.sh @@ -1,2 +1,2 @@ #!/bin/bash -mysql -u root -e "CREATE DATABASE IF NOT EXISTS test" +mysql -e "CREATE DATABASE IF NOT EXISTS test" diff --git a/win32/build/config.w32 b/win32/build/config.w32 index 3face08a8c..3401205c8f 100644 --- a/win32/build/config.w32 +++ b/win32/build/config.w32 @@ -155,7 +155,7 @@ if (VCVERS >= 1400) { // disable annoying warnings. In addition, time_t defaults // to 64-bit. Ask for 32-bit. if (X64) { - ADD_FLAG('CFLAGS', ' /wd4996 /Wp64 '); + ADD_FLAG('CFLAGS', ' /wd4996 '); } else { ADD_FLAG('CFLAGS', ' /wd4996 /D_USE_32BIT_TIME_T=1 '); } diff --git a/win32/build/config.w32.phpize.in b/win32/build/config.w32.phpize.in index b8bf45ea57..7b3b40633b 100644 --- a/win32/build/config.w32.phpize.in +++ b/win32/build/config.w32.phpize.in @@ -134,7 +134,7 @@ if (VCVERS >= 1400) { // disable annoying warnings. In addition, time_t defaults
// to 64-bit. Ask for 32-bit.
if (X64) {
- ADD_FLAG('CFLAGS', ' /wd4996 /Wp64 ');
+ ADD_FLAG('CFLAGS', ' /wd4996 ');
} else {
ADD_FLAG('CFLAGS', ' /wd4996 /D_USE_32BIT_TIME_T=1 ');
}
diff --git a/win32/build/libs_version.txt b/win32/build/libs_version.txt index 096d723a9c..123a75d783 100644 --- a/win32/build/libs_version.txt +++ b/win32/build/libs_version.txt @@ -1,25 +1,17 @@ bz2-1.0.6 -cclient-2007e cclient-2007f freetype-2.4.10 -icu-49.1.2 icu-50.1.2 -jpeglib-8 jpeglib-9 libcurl-7.30.0 libiconv-1.14 libmcrypt-2.5.8 libmpir-2.5.1 libmpir-2.6.0 -libpng-1.2.50 -libpng-1.5.13 -libpq-8.3.6 +libpng-1.5.14 libpq-9.2.2 libssh2-1.4.2 -libtidy-20090325 libtidy-20090406 libxslt-1.1.27 -libxml-2.7.8 libxml-2.9.1 -openssl-0.9.8y openssl-1.0.1e diff --git a/win32/readdir.c b/win32/readdir.c index 9525fc0d6b..0edd5764d4 100644 --- a/win32/readdir.c +++ b/win32/readdir.c @@ -45,6 +45,7 @@ DIR *opendir(const char *dir) dp = (DIR *) malloc(sizeof(DIR)); if (dp == NULL) { + free(filespec); return NULL; } dp->offset = 0; |