1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 17:38:14 +02:00

Merge branch 'master' of git.php.net:php-src

This commit is contained in:
Pierre Joye
2013-04-26 06:40:42 +02:00
42 changed files with 8059 additions and 1295 deletions
+6990 -2
View File
File diff suppressed because it is too large Load Diff
+4 -2
View File
@@ -65,11 +65,13 @@ extern ZEND_API void zend_ensure_fpu_mode(TSRMLS_D);
MS Visual C:
- Since MSVC users tipically don't use autoconf or CMake, we will detect
MSVC via compile time define.
MSVC via compile time define. Floating point precision change isn't
supported on 64 bit platforms, so it's NOP. See
http://msdn.microsoft.com/en-us/library/c9676k6h(v=vs.110).aspx
*/
/* MSVC detection (MSVC people usually don't use autoconf) */
#ifdef _MSC_VER
#if defined(_MSC_VER) && !defined(_WIN64)
# if _MSC_VER >= 1500
/* Visual C++ 2008 or higher, supports _controlfp_s */
# define HAVE__CONTROLFP_S
+3 -1
View File
@@ -22,8 +22,8 @@
#define ZEND_GENERATORS_H
BEGIN_EXTERN_C()
extern ZEND_API zend_class_entry *zend_ce_generator;
END_EXTERN_C()
typedef struct _zend_generator_iterator {
zend_object_iterator intern;
@@ -66,6 +66,8 @@ ZEND_API zval *zend_generator_create_zval(zend_op_array *op_array TSRMLS_DC);
ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished_execution TSRMLS_DC);
ZEND_API void zend_generator_resume(zend_generator *generator TSRMLS_DC);
END_EXTERN_C()
#endif
/*
+3 -1
View File
@@ -3172,7 +3172,9 @@ ZEND_VM_HANDLER(67, ZEND_SEND_REF, VAR|CV, ANY)
ZEND_VM_NEXT_OPCODE();
}
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.opline_num)) {
if (opline->extended_value == ZEND_DO_FCALL_BY_NAME &&
EX(function_state).function->type == ZEND_INTERNAL_FUNCTION &&
!ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.opline_num)) {
ZEND_VM_DISPATCH_TO_HELPER(zend_send_by_var_helper);
}
+6 -2
View File
@@ -13093,7 +13093,9 @@ static int ZEND_FASTCALL ZEND_SEND_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
ZEND_VM_NEXT_OPCODE();
}
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.opline_num)) {
if (opline->extended_value == ZEND_DO_FCALL_BY_NAME &&
EX(function_state).function->type == ZEND_INTERNAL_FUNCTION &&
!ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.opline_num)) {
return zend_send_by_var_helper_SPEC_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
@@ -30714,7 +30716,9 @@ static int ZEND_FASTCALL ZEND_SEND_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS
ZEND_VM_NEXT_OPCODE();
}
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.opline_num)) {
if (opline->extended_value == ZEND_DO_FCALL_BY_NAME &&
EX(function_state).function->type == ZEND_INTERNAL_FUNCTION &&
!ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.opline_num)) {
return zend_send_by_var_helper_SPEC_CV(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
+1 -9
View File
@@ -5,10 +5,6 @@ dnl
PHP_ARG_WITH(curl, for cURL support,
[ --with-curl[=DIR] Include cURL support])
dnl Temporary option while we develop this aspect of the extension
PHP_ARG_WITH(curlwrappers, if we should use cURL for url streams,
[ --with-curlwrappers EXPERIMENTAL: Use cURL for url streams], no, no)
if test "$PHP_CURL" != "no"; then
if test -r $PHP_CURL/include/curl/easy.h; then
CURL_DIR=$PHP_CURL
@@ -145,10 +141,6 @@ int main(int argc, char *argv[])
$CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR
])
if test "$PHP_CURLWRAPPERS" != "no" ; then
AC_DEFINE(PHP_CURL_URL_WRAPPERS,1,[ ])
fi
PHP_NEW_EXTENSION(curl, interface.c multi.c share.c streams.c curl_file.c, $ext_shared)
PHP_NEW_EXTENSION(curl, interface.c multi.c share.c curl_file.c, $ext_shared)
PHP_SUBST(CURL_SHARED_LIBADD)
fi
+1 -2
View File
@@ -13,14 +13,13 @@ if (PHP_CURL != "no") {
&& (((PHP_ZLIB=="no") && (CHECK_LIB("zlib_a.lib;zlib.lib", "curl", PHP_CURL))) ||
(PHP_ZLIB_SHARED && CHECK_LIB("zlib.lib", "curl", PHP_CURL)) || (PHP_ZLIB == "yes" && (!PHP_ZLIB_SHARED)))
) {
EXTENSION("curl", "interface.c multi.c share.c streams.c curl_file.c", true);
EXTENSION("curl", "interface.c multi.c share.c curl_file.c", true);
AC_DEFINE('HAVE_CURL', 1, 'Have cURL library');
AC_DEFINE('HAVE_CURL_SSL', 1, 'Have SSL suppurt in cURL');
AC_DEFINE('HAVE_CURL_EASY_STRERROR', 1, 'Have curl_easy_strerror in cURL');
AC_DEFINE('HAVE_CURL_MULTI_STRERROR', 1, 'Have curl_multi_strerror in cURL');
ADD_FLAG("CFLAGS_CURL", "/D CURL_STATICLIB");
// TODO: check for curl_version_info
// AC_DEFINE('PHP_CURL_URL_WRAPPERS', 0, 'Use curl for URL wrappers [experimental]');
} else {
WARNING("curl not enabled; libraries and headers not found");
}
-33
View File
@@ -1221,25 +1221,6 @@ PHP_MINIT_FUNCTION(curl)
return FAILURE;
}
#ifdef PHP_CURL_URL_WRAPPERS
REGISTER_LONG_CONSTANT("CURL_WRAPPERS_ENABLED", 1, CONST_CS | CONST_PERSISTENT);
{
curl_version_info_data *info = curl_version_info(CURLVERSION_NOW);
char **p = (char **)info->protocols;
while (*p != NULL) {
/* Do not enable cURL "file" protocol and make sure cURL is always used when --with-curlwrappers is enabled */
if (strncasecmp(*p, "file", sizeof("file")-1) != 0) {
php_unregister_url_stream_wrapper(*p TSRMLS_CC);
php_register_url_stream_wrapper(*p, &php_curl_wrapper TSRMLS_CC);
}
(void) *p++;
}
}
#else
REGISTER_LONG_CONSTANT("CURL_WRAPPERS_ENABLED", 0, CONST_CS | CONST_PERSISTENT);
#endif
curlfile_register_class(TSRMLS_C);
return SUCCESS;
@@ -1250,20 +1231,6 @@ PHP_MINIT_FUNCTION(curl)
*/
PHP_MSHUTDOWN_FUNCTION(curl)
{
#ifdef PHP_CURL_URL_WRAPPERS
{
curl_version_info_data *info = curl_version_info(CURLVERSION_NOW);
char **p = (char **)info->protocols;
while (*p != NULL) {
/* Do not enable cURL "file" protocol and make sure cURL is always used when --with-curlwrappers is enabled */
if (strncasecmp(*p, "file", sizeof("file")-1) != 0) {
php_unregister_url_stream_wrapper(*p TSRMLS_CC);
}
(void) *p++;
}
}
#endif
curl_global_cleanup();
#ifdef PHP_CURL_NEED_OPENSSL_TSL
if (php_curl_openssl_tsl) {
-32
View File
@@ -200,38 +200,6 @@ void _php_curl_cleanup_handle(php_curl *);
void _php_curl_multi_cleanup_list(void *data);
int _php_curl_verify_handlers(php_curl *ch, int reporterror TSRMLS_DC);
/* streams support */
extern php_stream_ops php_curl_stream_ops;
#define PHP_STREAM_IS_CURL &php_curl_stream_ops
php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename, char *mode,
int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC);
extern php_stream_wrapper php_curl_wrapper;
struct php_curl_buffer {
off_t readpos, writepos;
php_stream *buf;
};
typedef struct {
CURL *curl;
CURLM *multi;
char *url;
struct php_curl_buffer readbuffer; /* holds downloaded data */
struct php_curl_buffer writebuffer; /* holds data to upload */
fd_set readfds, writefds, excfds;
int maxfd;
char errstr[CURL_ERROR_SIZE + 1];
CURLMcode mcode;
int pending;
zval *headers;
struct curl_slist *headers_slist; /* holds custom headers sent out in the request */
} php_curl_stream;
void curlfile_register_class(TSRMLS_D);
PHP_CURL_API extern zend_class_entry *curl_CURLFile_class;
-542
View File
@@ -1,542 +0,0 @@
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2013 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Wez Furlong <wez@thebrainroom.com> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
/* This file implements cURL based wrappers.
* NOTE: If you are implementing your own streams that are intended to
* work independently of wrappers, this is not a good example to follow!
**/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include "php_memory_streams.h"
#if HAVE_CURL
#include <stdio.h>
#include <string.h>
#ifdef PHP_WIN32
#include <winsock2.h>
#include <sys/types.h>
#endif
#include <curl/curl.h>
#include <curl/easy.h>
#define SMART_STR_PREALLOC 4096
#include "ext/standard/php_smart_str.h"
#include "ext/standard/info.h"
#include "ext/standard/file.h"
#include "ext/standard/php_string.h"
#include "php_curl.h"
static size_t on_data_available(char *data, size_t size, size_t nmemb, void *ctx)
{
php_stream *stream = (php_stream *) ctx;
php_curl_stream *curlstream = (php_curl_stream *) stream->abstract;
size_t wrote;
TSRMLS_FETCH();
/* TODO: I'd like to deprecate this.
* This code is here because until we start getting real data, we don't know
* if we have had all of the headers
* */
if (curlstream->readbuffer.writepos == 0) {
zval *sym;
if (!EG(active_symbol_table)) {
zend_rebuild_symbol_table(TSRMLS_C);
}
MAKE_STD_ZVAL(sym);
*sym = *curlstream->headers;
zval_copy_ctor(sym);
ZEND_SET_SYMBOL(EG(active_symbol_table), "http_response_header", sym);
}
php_stream_seek(curlstream->readbuffer.buf, curlstream->readbuffer.writepos, SEEK_SET);
wrote = php_stream_write(curlstream->readbuffer.buf, data, size * nmemb);
curlstream->readbuffer.writepos = php_stream_tell(curlstream->readbuffer.buf);
return wrote;
}
/* cURL guarantees that headers are written as complete lines, with this function
* called once for each header */
static size_t on_header_available(char *data, size_t size, size_t nmemb, void *ctx)
{
size_t length = size * nmemb;
zval *header;
php_stream *stream = (php_stream *) ctx;
php_curl_stream *curlstream = (php_curl_stream *) stream->abstract;
TSRMLS_FETCH();
if (length < 2) {
/* invalid header ? */
return length;
}
if (!(length == 2 && data[0] == '\r' && data[1] == '\n')) {
MAKE_STD_ZVAL(header);
Z_STRLEN_P(header) = length;
Z_STRVAL_P(header) = estrndup(data, length);
if (Z_STRVAL_P(header)[length-1] == '\n') {
Z_STRVAL_P(header)[length-1] = '\0';
Z_STRLEN_P(header)--;
if (Z_STRVAL_P(header)[length-2] == '\r') {
Z_STRVAL_P(header)[length-2] = '\0';
Z_STRLEN_P(header)--;
}
}
Z_TYPE_P(header) = IS_STRING;
zend_hash_next_index_insert(Z_ARRVAL_P(curlstream->headers), &header, sizeof(zval *), NULL);
/* based on the header, we might need to trigger a notification */
if (!strncasecmp(data, "Location: ", 10)) {
php_stream_notify_info(stream->context, PHP_STREAM_NOTIFY_REDIRECTED, data + 10, 0);
} else if (!strncasecmp(data, "Content-Type: ", 14)) {
php_stream_notify_info(stream->context, PHP_STREAM_NOTIFY_MIME_TYPE_IS, data + 14, 0);
} else if (!strncasecmp(data, "Context-Length: ", 16)) {
php_stream_notify_file_size(stream->context, atoi(data + 16), data, 0);
php_stream_notify_progress_init(stream->context, 0, 0);
}
}
return length;
}
static int on_progress_avail(php_stream *stream, double dltotal, double dlnow, double ultotal, double ulnow)
{
TSRMLS_FETCH();
/* our notification system only works in a single direction; we should detect which
* direction is important and use the correct values in this call */
php_stream_notify_progress(stream->context, (size_t) dlnow, (size_t) dltotal);
return 0;
}
static size_t php_curl_stream_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC)
{
php_curl_stream *curlstream = (php_curl_stream *) stream->abstract;
if (curlstream->writebuffer.buf) {
return php_stream_write(curlstream->writebuffer.buf, buf, count);
}
return 0;
}
static size_t php_curl_stream_read(php_stream *stream, char *buf, size_t count TSRMLS_DC)
{
php_curl_stream *curlstream = (php_curl_stream *) stream->abstract;
size_t didread = 0;
if (curlstream->readbuffer.readpos >= curlstream->readbuffer.writepos && curlstream->pending) {
/* we need to read some more data */
struct timeval tv;
/* fire up the connection */
if (curlstream->readbuffer.writepos == 0) {
while (CURLM_CALL_MULTI_PERFORM == curl_multi_perform(curlstream->multi, &curlstream->pending));
}
do {
FD_ZERO(&curlstream->readfds);
FD_ZERO(&curlstream->writefds);
FD_ZERO(&curlstream->excfds);
/* get the descriptors from curl */
curl_multi_fdset(curlstream->multi, &curlstream->readfds, &curlstream->writefds, &curlstream->excfds, &curlstream->maxfd);
/* if we are in blocking mode, set a timeout */
tv.tv_usec = 0;
tv.tv_sec = 15; /* TODO: allow this to be configured from the script */
/* wait for data */
switch ((curlstream->maxfd < 0) ? 1 :
select(curlstream->maxfd + 1, &curlstream->readfds, &curlstream->writefds, &curlstream->excfds, &tv)) {
case -1:
/* error */
return 0;
case 0:
/* no data yet: timed-out */
return 0;
default:
/* fetch the data */
do {
curlstream->mcode = curl_multi_perform(curlstream->multi, &curlstream->pending);
} while (curlstream->mcode == CURLM_CALL_MULTI_PERFORM);
}
} while (curlstream->maxfd >= 0 &&
curlstream->readbuffer.readpos >= curlstream->readbuffer.writepos && curlstream->pending > 0);
}
/* if there is data in the buffer, try and read it */
if (curlstream->readbuffer.writepos > 0 && curlstream->readbuffer.readpos < curlstream->readbuffer.writepos) {
php_stream_seek(curlstream->readbuffer.buf, curlstream->readbuffer.readpos, SEEK_SET);
didread = php_stream_read(curlstream->readbuffer.buf, buf, count);
curlstream->readbuffer.readpos = php_stream_tell(curlstream->readbuffer.buf);
}
if (didread == 0) {
stream->eof = 1;
}
return didread;
}
static int php_curl_stream_close(php_stream *stream, int close_handle TSRMLS_DC)
{
php_curl_stream *curlstream = (php_curl_stream *) stream->abstract;
/* TODO: respect the close_handle flag here, so that casting to a FILE* on
* systems without fopencookie will work properly */
curl_multi_remove_handle(curlstream->multi, curlstream->curl);
curl_easy_cleanup(curlstream->curl);
curl_multi_cleanup(curlstream->multi);
if (curlstream->headers_slist) {
curl_slist_free_all(curlstream->headers_slist);
}
/* we are not closing curlstream->readbuf here, because we export
* it as a zval with the wrapperdata - the engine will garbage collect it */
efree(curlstream->url);
efree(curlstream);
return 0;
}
static int php_curl_stream_flush(php_stream *stream TSRMLS_DC)
{
#ifdef ilia_0
php_curl_stream *curlstream = (php_curl_stream *) stream->abstract;
#endif
return 0;
}
static int php_curl_stream_stat(php_stream *stream, php_stream_statbuf *ssb TSRMLS_DC)
{
/* TODO: fill in details based on Data: and Content-Length: headers, and/or data
* from curl_easy_getinfo().
* For now, return -1 to indicate that it doesn't make sense to stat this stream */
return -1;
}
static int php_curl_stream_cast(php_stream *stream, int castas, void **ret TSRMLS_DC)
{
php_curl_stream *curlstream = (php_curl_stream *) stream->abstract;
/* delegate to the readbuffer stream */
return php_stream_cast(curlstream->readbuffer.buf, castas, ret, 0);
}
php_stream_ops php_curl_stream_ops = {
php_curl_stream_write,
php_curl_stream_read,
php_curl_stream_close,
php_curl_stream_flush,
"cURL",
NULL, /* seek */
php_curl_stream_cast, /* cast */
php_curl_stream_stat /* stat */
};
php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename, char *mode,
int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC)
{
php_stream *stream;
php_curl_stream *curlstream;
zval *tmp, **ctx_opt = NULL;
curlstream = emalloc(sizeof(php_curl_stream));
memset(curlstream, 0, sizeof(php_curl_stream));
stream = php_stream_alloc(&php_curl_stream_ops, curlstream, 0, mode);
php_stream_context_set(stream, context);
curlstream->curl = curl_easy_init();
curlstream->multi = curl_multi_init();
curlstream->pending = 1;
curlstream->headers_slist = NULL;
/* if opening for an include statement, ensure that the local storage will
* have a FILE* associated with it.
* Otherwise, use the "smart" memory stream that will turn itself into a file
* when it gets large */
#ifndef HAVE_FOPENCOOKIE
if (options & STREAM_WILL_CAST) {
curlstream->readbuffer.buf = php_stream_fopen_tmpfile();
} else
#endif
{
curlstream->readbuffer.buf = php_stream_temp_new();
}
/* curl requires the URL to be valid throughout it's operation, so dup it */
curlstream->url = estrdup(filename);
curl_easy_setopt(curlstream->curl, CURLOPT_URL, curlstream->url);
/* feed curl data into our read buffer */
curl_easy_setopt(curlstream->curl, CURLOPT_WRITEFUNCTION, on_data_available);
curl_easy_setopt(curlstream->curl, CURLOPT_FILE, stream);
/* feed headers */
curl_easy_setopt(curlstream->curl, CURLOPT_HEADERFUNCTION, on_header_available);
curl_easy_setopt(curlstream->curl, CURLOPT_WRITEHEADER, stream);
curl_easy_setopt(curlstream->curl, CURLOPT_ERRORBUFFER, curlstream->errstr);
curl_easy_setopt(curlstream->curl, CURLOPT_VERBOSE, 0);
/* enable progress notification */
curl_easy_setopt(curlstream->curl, CURLOPT_PROGRESSFUNCTION, on_progress_avail);
curl_easy_setopt(curlstream->curl, CURLOPT_PROGRESSDATA, stream);
curl_easy_setopt(curlstream->curl, CURLOPT_NOPROGRESS, 0);
curl_easy_setopt(curlstream->curl, CURLOPT_USERAGENT, FG(user_agent) ? FG(user_agent) : "PHP/" PHP_VERSION);
/* TODO: read cookies and options from context */
if (context && !strncasecmp(filename, "http", sizeof("http")-1)) {
/* Protocol version */
if (SUCCESS == php_stream_context_get_option(context, "http", "protocol_version", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_DOUBLE) {
if (Z_DVAL_PP(ctx_opt) == 1.1) {
curl_easy_setopt(curlstream->curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
} else {
curl_easy_setopt(curlstream->curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
}
}
if (SUCCESS == php_stream_context_get_option(context, "http", "curl_verify_ssl_host", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_BOOL && Z_LVAL_PP(ctx_opt) == 1) {
curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYHOST, 2);
} else {
curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYHOST, 0);
}
if (SUCCESS == php_stream_context_get_option(context, "http", "curl_verify_ssl_peer", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_BOOL && Z_LVAL_PP(ctx_opt) == 1) {
curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYPEER, 1);
} else {
curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYPEER, 0);
}
/* HTTP(S) */
if (SUCCESS == php_stream_context_get_option(context, "http", "user_agent", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_STRING) {
curl_easy_setopt(curlstream->curl, CURLOPT_USERAGENT, Z_STRVAL_PP(ctx_opt));
}
if (SUCCESS == php_stream_context_get_option(context, "http", "header", &ctx_opt)) {
if (Z_TYPE_PP(ctx_opt) == IS_ARRAY) {
HashPosition pos;
zval **header = NULL;
for (zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(ctx_opt), &pos);
SUCCESS == zend_hash_get_current_data_ex(Z_ARRVAL_PP(ctx_opt), (void *)&header, &pos);
zend_hash_move_forward_ex(Z_ARRVAL_PP(ctx_opt), &pos)
) {
if (Z_TYPE_PP(header) == IS_STRING) {
curlstream->headers_slist = curl_slist_append(curlstream->headers_slist, Z_STRVAL_PP(header));
}
}
} else if (Z_TYPE_PP(ctx_opt) == IS_STRING && Z_STRLEN_PP(ctx_opt)) {
char *p, *token, *trimmed, *copy_ctx_opt;
copy_ctx_opt = php_trim(Z_STRVAL_PP(ctx_opt), Z_STRLEN_PP(ctx_opt), NULL, 0, NULL, 3 TSRMLS_CC);
p = php_strtok_r(copy_ctx_opt, "\r\n", &token);
while (p) {
trimmed = php_trim(p, strlen(p), NULL, 0, NULL, 3 TSRMLS_CC);
curlstream->headers_slist = curl_slist_append(curlstream->headers_slist, trimmed);
efree(trimmed);
p = php_strtok_r(NULL, "\r\n", &token);
}
efree(copy_ctx_opt);
}
if (curlstream->headers_slist) {
curl_easy_setopt(curlstream->curl, CURLOPT_HTTPHEADER, curlstream->headers_slist);
}
}
if (SUCCESS == php_stream_context_get_option(context, "http", "method", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_STRING) {
if (strcasecmp(Z_STRVAL_PP(ctx_opt), "get")) {
if (!strcasecmp(Z_STRVAL_PP(ctx_opt), "head")) {
curl_easy_setopt(curlstream->curl, CURLOPT_NOBODY, 1);
} else {
if (!strcasecmp(Z_STRVAL_PP(ctx_opt), "post")) {
curl_easy_setopt(curlstream->curl, CURLOPT_POST, 1);
} else {
curl_easy_setopt(curlstream->curl, CURLOPT_CUSTOMREQUEST, Z_STRVAL_PP(ctx_opt));
}
if (SUCCESS == php_stream_context_get_option(context, "http", "content", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_STRING) {
curl_easy_setopt(curlstream->curl, CURLOPT_POSTFIELDS, Z_STRVAL_PP(ctx_opt));
curl_easy_setopt(curlstream->curl, CURLOPT_POSTFIELDSIZE, (long)Z_STRLEN_PP(ctx_opt));
}
}
}
}
if (SUCCESS == php_stream_context_get_option(context, "http", "proxy", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_STRING) {
curl_easy_setopt(curlstream->curl, CURLOPT_PROXY, Z_STRVAL_PP(ctx_opt));
}
if (SUCCESS == php_stream_context_get_option(context, "http", "max_redirects", &ctx_opt)) {
long mr = 20;
if (Z_TYPE_PP(ctx_opt) != IS_STRING || !is_numeric_string(Z_STRVAL_PP(ctx_opt), Z_STRLEN_PP(ctx_opt), &mr, NULL, 1)) {
if (Z_TYPE_PP(ctx_opt) == IS_LONG) {
mr = Z_LVAL_PP(ctx_opt);
}
}
if (mr > 1) {
if (PG(open_basedir) && *PG(open_basedir)) {
curl_easy_setopt(curlstream->curl, CURLOPT_FOLLOWLOCATION, 0);
} else {
curl_easy_setopt(curlstream->curl, CURLOPT_FOLLOWLOCATION, 1);
}
curl_easy_setopt(curlstream->curl, CURLOPT_MAXREDIRS, mr);
}
} else {
if (PG(open_basedir) && *PG(open_basedir)) {
curl_easy_setopt(curlstream->curl, CURLOPT_FOLLOWLOCATION, 0);
} else {
curl_easy_setopt(curlstream->curl, CURLOPT_FOLLOWLOCATION, 1);
}
curl_easy_setopt(curlstream->curl, CURLOPT_MAXREDIRS, 20L);
}
} else if (context && !strncasecmp(filename, "ftps", sizeof("ftps")-1)) {
if (SUCCESS == php_stream_context_get_option(context, "ftp", "curl_verify_ssl_host", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_BOOL && Z_LVAL_PP(ctx_opt) == 1) {
curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYHOST, 2);
} else {
curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYHOST, 0);
}
if (SUCCESS == php_stream_context_get_option(context, "ftp", "curl_verify_ssl_peer", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_BOOL && Z_LVAL_PP(ctx_opt) == 1) {
curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYPEER, 1);
} else {
curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYPEER, 0);
}
}
/* prepare for "pull" mode */
curl_multi_add_handle(curlstream->multi, curlstream->curl);
/* Prepare stuff for file_get_wrapper_data: the data is an array:
*
* data = array(
* "headers" => array("Content-Type: text/html", "Xxx: Yyy"),
* "readbuf" => resource (equivalent to curlstream->readbuffer)
* );
* */
MAKE_STD_ZVAL(stream->wrapperdata);
array_init(stream->wrapperdata);
MAKE_STD_ZVAL(curlstream->headers);
array_init(curlstream->headers);
add_assoc_zval(stream->wrapperdata, "headers", curlstream->headers);
MAKE_STD_ZVAL(tmp);
php_stream_to_zval(curlstream->readbuffer.buf, tmp);
add_assoc_zval(stream->wrapperdata, "readbuf", tmp);
#ifndef HAVE_FOPENCOOKIE
if (options & STREAM_WILL_CAST) {
/* we will need to download the whole resource now,
* since we cannot get the actual FD for the download,
* so we won't be able to drive curl via stdio. */
/* TODO: this needs finishing */
curl_easy_perform(curlstream->curl);
}
else
#endif
{
/* fire up the connection; we need to detect a connection error here,
* otherwise the curlstream we return ends up doing nothing useful. */
CURLMcode m;
CURLMsg *msg;
int msgs_left, msg_found = 0;
while (CURLM_CALL_MULTI_PERFORM == (m = curl_multi_perform(curlstream->multi, &curlstream->pending))) {
; /* spin */
}
if (m != CURLM_OK) {
#if HAVE_CURL_MULTI_STRERROR
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", curl_multi_strerror(m));
#else
php_error_docref(NULL TSRMLS_CC, E_WARNING, "There was an error mcode=%d", m);
#endif
goto exit_fail;
}
/* we have only one curl handle here, even though we use multi syntax,
* so it's ok to fail on any error */
while ((msg = curl_multi_info_read(curlstream->multi, &msgs_left))) {
if (msg->data.result == CURLE_OK) {
continue;
} else {
#if HAVE_CURL_EASY_STRERROR
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", curl_easy_strerror(msg->data.result));
#else
php_error_docref(NULL TSRMLS_CC, E_WARNING, "There was an error mcode=%d", msg->data.result);
#endif
msg_found++;
}
}
if (msg_found) {
goto exit_fail;
}
}
return stream;
exit_fail:
php_stream_close(stream);
return NULL;
}
static php_stream_wrapper_ops php_curl_wrapper_ops = {
php_curl_stream_opener,
NULL, /* stream_close: curl streams know how to clean themselves up */
NULL, /* stream_stat: curl streams know how to stat themselves */
NULL, /* stat url */
NULL, /* opendir */
"cURL", /* label */
NULL, /* unlink */
NULL, /* rename */
NULL, /* mkdir */
NULL /* rmdir */
};
php_stream_wrapper php_curl_wrapper = {
&php_curl_wrapper_ops,
NULL,
1 /* is_url */
};
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: noet sw=4 ts=4 fdm=marker
* vim<600: noet sw=4 ts=4
*/
+469 -441
View File
@@ -221,366 +221,366 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[579] = {
{ "Antarctica/Davis" , 0x0179E5 },
{ "Antarctica/DumontDUrville" , 0x017A86 },
{ "Antarctica/Macquarie" , 0x017B18 },
{ "Antarctica/Mawson" , 0x017D92 },
{ "Antarctica/McMurdo" , 0x017E0E },
{ "Antarctica/Palmer" , 0x018110 },
{ "Antarctica/Rothera" , 0x01842C },
{ "Antarctica/South_Pole" , 0x0184A2 },
{ "Antarctica/Syowa" , 0x0187AA },
{ "Antarctica/Vostok" , 0x018818 },
{ "Arctic/Longyearbyen" , 0x018889 },
{ "Asia/Aden" , 0x018BBB },
{ "Asia/Almaty" , 0x018C10 },
{ "Asia/Amman" , 0x018D8F },
{ "Asia/Anadyr" , 0x019045 },
{ "Asia/Aqtau" , 0x01922A },
{ "Asia/Aqtobe" , 0x019429 },
{ "Asia/Ashgabat" , 0x0195E1 },
{ "Asia/Ashkhabad" , 0x0196FE },
{ "Asia/Baghdad" , 0x01981B },
{ "Asia/Bahrain" , 0x019990 },
{ "Asia/Baku" , 0x0199F6 },
{ "Asia/Bangkok" , 0x019CDE },
{ "Asia/Beirut" , 0x019D33 },
{ "Asia/Bishkek" , 0x01A040 },
{ "Asia/Brunei" , 0x01A1EC },
{ "Asia/Calcutta" , 0x01A24E },
{ "Asia/Choibalsan" , 0x01A2C7 },
{ "Asia/Chongqing" , 0x01A440 },
{ "Asia/Chungking" , 0x01A52F },
{ "Asia/Colombo" , 0x01A5DE },
{ "Asia/Dacca" , 0x01A67A },
{ "Asia/Damascus" , 0x01A720 },
{ "Asia/Dhaka" , 0x01AA70 },
{ "Asia/Dili" , 0x01AB16 },
{ "Asia/Dubai" , 0x01AB9F },
{ "Asia/Dushanbe" , 0x01ABF4 },
{ "Asia/Gaza" , 0x01ACF7 },
{ "Asia/Harbin" , 0x01AF50 },
{ "Asia/Hebron" , 0x01B037 },
{ "Asia/Ho_Chi_Minh" , 0x01B299 },
{ "Asia/Hong_Kong" , 0x01B311 },
{ "Asia/Hovd" , 0x01B4D3 },
{ "Asia/Irkutsk" , 0x01B64B },
{ "Asia/Istanbul" , 0x01B831 },
{ "Asia/Jakarta" , 0x01BC1E },
{ "Asia/Jayapura" , 0x01BCC8 },
{ "Asia/Jerusalem" , 0x01BD64 },
{ "Asia/Kabul" , 0x01C093 },
{ "Asia/Kamchatka" , 0x01C0E4 },
{ "Asia/Karachi" , 0x01C2C0 },
{ "Asia/Kashgar" , 0x01C375 },
{ "Asia/Kathmandu" , 0x01C446 },
{ "Asia/Katmandu" , 0x01C4AC },
{ "Asia/Khandyga" , 0x01C512 },
{ "Asia/Kolkata" , 0x01C737 },
{ "Asia/Krasnoyarsk" , 0x01C7B0 },
{ "Asia/Kuala_Lumpur" , 0x01C998 },
{ "Asia/Kuching" , 0x01CA55 },
{ "Asia/Kuwait" , 0x01CB43 },
{ "Asia/Macao" , 0x01CB98 },
{ "Asia/Macau" , 0x01CCD3 },
{ "Asia/Magadan" , 0x01CE0E },
{ "Asia/Makassar" , 0x01CFF0 },
{ "Asia/Manila" , 0x01D0B4 },
{ "Asia/Muscat" , 0x01D139 },
{ "Asia/Nicosia" , 0x01D18E },
{ "Asia/Novokuznetsk" , 0x01D476 },
{ "Asia/Novosibirsk" , 0x01D678 },
{ "Asia/Omsk" , 0x01D863 },
{ "Asia/Oral" , 0x01DA4A },
{ "Asia/Phnom_Penh" , 0x01DC1A },
{ "Asia/Pontianak" , 0x01DC92 },
{ "Asia/Pyongyang" , 0x01DD53 },
{ "Asia/Qatar" , 0x01DDC0 },
{ "Asia/Qyzylorda" , 0x01DE26 },
{ "Asia/Rangoon" , 0x01DFFC },
{ "Asia/Riyadh" , 0x01E074 },
{ "Asia/Saigon" , 0x01E0C9 },
{ "Asia/Sakhalin" , 0x01E141 },
{ "Asia/Samarkand" , 0x01E338 },
{ "Asia/Seoul" , 0x01E46E },
{ "Asia/Shanghai" , 0x01E512 },
{ "Asia/Singapore" , 0x01E5F2 },
{ "Asia/Taipei" , 0x01E6A9 },
{ "Asia/Tashkent" , 0x01E7C1 },
{ "Asia/Tbilisi" , 0x01E8F2 },
{ "Asia/Tehran" , 0x01EAAC },
{ "Asia/Tel_Aviv" , 0x01ED1A },
{ "Asia/Thimbu" , 0x01F049 },
{ "Asia/Thimphu" , 0x01F0AF },
{ "Asia/Tokyo" , 0x01F115 },
{ "Asia/Ujung_Pandang" , 0x01F19E },
{ "Asia/Ulaanbaatar" , 0x01F21A },
{ "Asia/Ulan_Bator" , 0x01F375 },
{ "Asia/Urumqi" , 0x01F4C2 },
{ "Asia/Ust-Nera" , 0x01F589 },
{ "Asia/Vientiane" , 0x01F78E },
{ "Asia/Vladivostok" , 0x01F806 },
{ "Asia/Yakutsk" , 0x01F9F2 },
{ "Asia/Yekaterinburg" , 0x01FBD7 },
{ "Asia/Yerevan" , 0x01FDE2 },
{ "Atlantic/Azores" , 0x01FFE2 },
{ "Atlantic/Bermuda" , 0x0204E5 },
{ "Atlantic/Canary" , 0x0207C6 },
{ "Atlantic/Cape_Verde" , 0x020A9C },
{ "Atlantic/Faeroe" , 0x020B15 },
{ "Atlantic/Faroe" , 0x020DB9 },
{ "Atlantic/Jan_Mayen" , 0x02105D },
{ "Atlantic/Madeira" , 0x02138F },
{ "Atlantic/Reykjavik" , 0x021898 },
{ "Atlantic/South_Georgia" , 0x021A51 },
{ "Atlantic/St_Helena" , 0x021C63 },
{ "Atlantic/Stanley" , 0x021A95 },
{ "Australia/ACT" , 0x021CB8 },
{ "Australia/Adelaide" , 0x021FD5 },
{ "Australia/Brisbane" , 0x022301 },
{ "Australia/Broken_Hill" , 0x0223C8 },
{ "Australia/Canberra" , 0x022706 },
{ "Australia/Currie" , 0x022A23 },
{ "Australia/Darwin" , 0x022D56 },
{ "Australia/Eucla" , 0x022DDC },
{ "Australia/Hobart" , 0x022EB1 },
{ "Australia/LHI" , 0x02320F },
{ "Australia/Lindeman" , 0x0234AA },
{ "Australia/Lord_Howe" , 0x02358B },
{ "Australia/Melbourne" , 0x023836 },
{ "Australia/North" , 0x023B5B },
{ "Australia/NSW" , 0x023BCF },
{ "Australia/Perth" , 0x023EEC },
{ "Australia/Queensland" , 0x023FC4 },
{ "Australia/South" , 0x024070 },
{ "Australia/Sydney" , 0x02438D },
{ "Australia/Tasmania" , 0x0246CA },
{ "Australia/Victoria" , 0x024A0F },
{ "Australia/West" , 0x024D2C },
{ "Australia/Yancowinna" , 0x024DE2 },
{ "Brazil/Acre" , 0x025104 },
{ "Brazil/DeNoronha" , 0x025203 },
{ "Brazil/East" , 0x025323 },
{ "Brazil/West" , 0x025600 },
{ "Canada/Atlantic" , 0x0256F8 },
{ "Canada/Central" , 0x025BE0 },
{ "Canada/East-Saskatchewan" , 0x0264EA },
{ "Canada/Eastern" , 0x025FFA },
{ "Canada/Mountain" , 0x026673 },
{ "Canada/Newfoundland" , 0x0269E9 },
{ "Canada/Pacific" , 0x026F14 },
{ "Canada/Saskatchewan" , 0x02732D },
{ "Canada/Yukon" , 0x0274B6 },
{ "CET" , 0x0277B9 },
{ "Chile/Continental" , 0x027AC2 },
{ "Chile/EasterIsland" , 0x027E5D },
{ "CST6CDT" , 0x02819F },
{ "Cuba" , 0x0284F0 },
{ "EET" , 0x028863 },
{ "Egypt" , 0x028B16 },
{ "Eire" , 0x028DD9 },
{ "EST" , 0x0292EA },
{ "EST5EDT" , 0x02932E },
{ "Etc/GMT" , 0x02967F },
{ "Etc/GMT+0" , 0x02974B },
{ "Etc/GMT+1" , 0x0297D5 },
{ "Etc/GMT+10" , 0x029862 },
{ "Etc/GMT+11" , 0x0298F0 },
{ "Etc/GMT+12" , 0x02997E },
{ "Etc/GMT+2" , 0x029A99 },
{ "Etc/GMT+3" , 0x029B25 },
{ "Etc/GMT+4" , 0x029BB1 },
{ "Etc/GMT+5" , 0x029C3D },
{ "Etc/GMT+6" , 0x029CC9 },
{ "Etc/GMT+7" , 0x029D55 },
{ "Etc/GMT+8" , 0x029DE1 },
{ "Etc/GMT+9" , 0x029E6D },
{ "Etc/GMT-0" , 0x029707 },
{ "Etc/GMT-1" , 0x02978F },
{ "Etc/GMT-10" , 0x02981B },
{ "Etc/GMT-11" , 0x0298A9 },
{ "Etc/GMT-12" , 0x029937 },
{ "Etc/GMT-13" , 0x0299C5 },
{ "Etc/GMT-14" , 0x029A0C },
{ "Etc/GMT-2" , 0x029A53 },
{ "Etc/GMT-3" , 0x029ADF },
{ "Etc/GMT-4" , 0x029B6B },
{ "Etc/GMT-5" , 0x029BF7 },
{ "Etc/GMT-6" , 0x029C83 },
{ "Etc/GMT-7" , 0x029D0F },
{ "Etc/GMT-8" , 0x029D9B },
{ "Etc/GMT-9" , 0x029E27 },
{ "Etc/GMT0" , 0x0296C3 },
{ "Etc/Greenwich" , 0x029EB3 },
{ "Etc/UCT" , 0x029EF7 },
{ "Etc/Universal" , 0x029F3B },
{ "Etc/UTC" , 0x029F7F },
{ "Etc/Zulu" , 0x029FC3 },
{ "Europe/Amsterdam" , 0x02A007 },
{ "Europe/Andorra" , 0x02A445 },
{ "Europe/Athens" , 0x02A6C1 },
{ "Europe/Belfast" , 0x02AA04 },
{ "Europe/Belgrade" , 0x02AF3B },
{ "Europe/Berlin" , 0x02B204 },
{ "Europe/Bratislava" , 0x02B568 },
{ "Europe/Brussels" , 0x02B89A },
{ "Europe/Bucharest" , 0x02BCD1 },
{ "Europe/Budapest" , 0x02BFFB },
{ "Europe/Busingen" , 0x02C36E },
{ "Europe/Chisinau" , 0x02C625 },
{ "Europe/Copenhagen" , 0x02C9B3 },
{ "Europe/Dublin" , 0x02CCBD },
{ "Europe/Gibraltar" , 0x02D1CE },
{ "Europe/Guernsey" , 0x02D625 },
{ "Europe/Helsinki" , 0x02DB5C },
{ "Europe/Isle_of_Man" , 0x02DE12 },
{ "Europe/Istanbul" , 0x02E349 },
{ "Europe/Jersey" , 0x02E736 },
{ "Europe/Kaliningrad" , 0x02EC6D },
{ "Europe/Kiev" , 0x02EED3 },
{ "Europe/Lisbon" , 0x02F1EA },
{ "Europe/Ljubljana" , 0x02F6EE },
{ "Europe/London" , 0x02F9B7 },
{ "Europe/Luxembourg" , 0x02FEEE },
{ "Europe/Madrid" , 0x030344 },
{ "Europe/Malta" , 0x03070A },
{ "Europe/Mariehamn" , 0x030AC3 },
{ "Europe/Minsk" , 0x030D79 },
{ "Europe/Monaco" , 0x030F87 },
{ "Europe/Moscow" , 0x0313C2 },
{ "Europe/Nicosia" , 0x031613 },
{ "Europe/Oslo" , 0x0318FB },
{ "Europe/Paris" , 0x031C2D },
{ "Europe/Podgorica" , 0x032073 },
{ "Europe/Prague" , 0x03233C },
{ "Europe/Riga" , 0x03266E },
{ "Europe/Rome" , 0x0329B3 },
{ "Europe/Samara" , 0x032D76 },
{ "Europe/San_Marino" , 0x032FA9 },
{ "Europe/Sarajevo" , 0x03336C },
{ "Europe/Simferopol" , 0x033635 },
{ "Europe/Skopje" , 0x033960 },
{ "Europe/Sofia" , 0x033C29 },
{ "Europe/Stockholm" , 0x033F31 },
{ "Europe/Tallinn" , 0x0341E0 },
{ "Europe/Tirane" , 0x03451A },
{ "Europe/Tiraspol" , 0x034820 },
{ "Europe/Uzhgorod" , 0x034BAE },
{ "Europe/Vaduz" , 0x034EC5 },
{ "Europe/Vatican" , 0x035158 },
{ "Europe/Vienna" , 0x03551B },
{ "Europe/Vilnius" , 0x035848 },
{ "Europe/Volgograd" , 0x035B87 },
{ "Europe/Warsaw" , 0x035D87 },
{ "Europe/Zagreb" , 0x036168 },
{ "Europe/Zaporozhye" , 0x036431 },
{ "Europe/Zurich" , 0x036772 },
{ "Factory" , 0x036A21 },
{ "GB" , 0x036A92 },
{ "GB-Eire" , 0x036FC9 },
{ "GMT" , 0x037500 },
{ "GMT+0" , 0x0375CC },
{ "GMT-0" , 0x037588 },
{ "GMT0" , 0x037544 },
{ "Greenwich" , 0x037610 },
{ "Hongkong" , 0x037654 },
{ "HST" , 0x037816 },
{ "Iceland" , 0x03785A },
{ "Indian/Antananarivo" , 0x037A13 },
{ "Indian/Chagos" , 0x037A87 },
{ "Indian/Christmas" , 0x037AE9 },
{ "Indian/Cocos" , 0x037B2D },
{ "Indian/Comoro" , 0x037B71 },
{ "Indian/Kerguelen" , 0x037BC6 },
{ "Indian/Mahe" , 0x037C1B },
{ "Indian/Maldives" , 0x037C70 },
{ "Indian/Mauritius" , 0x037CC5 },
{ "Indian/Mayotte" , 0x037D3B },
{ "Indian/Reunion" , 0x037D90 },
{ "Iran" , 0x037DE5 },
{ "Israel" , 0x038053 },
{ "Jamaica" , 0x038382 },
{ "Japan" , 0x038447 },
{ "Kwajalein" , 0x0384D0 },
{ "Libya" , 0x038533 },
{ "MET" , 0x03872C },
{ "Mexico/BajaNorte" , 0x038A35 },
{ "Mexico/BajaSur" , 0x038D9E },
{ "Mexico/General" , 0x038FE3 },
{ "MST" , 0x039241 },
{ "MST7MDT" , 0x039285 },
{ "Navajo" , 0x0395D6 },
{ "NZ" , 0x03994F },
{ "NZ-CHAT" , 0x039CCD },
{ "Pacific/Apia" , 0x039FB5 },
{ "Pacific/Auckland" , 0x03A151 },
{ "Pacific/Chatham" , 0x03A4DD },
{ "Pacific/Chuuk" , 0x03A7D4 },
{ "Pacific/Easter" , 0x03A82D },
{ "Pacific/Efate" , 0x03AB8B },
{ "Pacific/Enderbury" , 0x03AC51 },
{ "Pacific/Fakaofo" , 0x03ACBF },
{ "Pacific/Fiji" , 0x03AD10 },
{ "Pacific/Funafuti" , 0x03AEA3 },
{ "Pacific/Galapagos" , 0x03AEE7 },
{ "Pacific/Gambier" , 0x03AF5F },
{ "Pacific/Guadalcanal" , 0x03AFC4 },
{ "Pacific/Guam" , 0x03B019 },
{ "Pacific/Honolulu" , 0x03B06F },
{ "Pacific/Johnston" , 0x03B0E6 },
{ "Pacific/Kiritimati" , 0x03B138 },
{ "Pacific/Kosrae" , 0x03B1A3 },
{ "Pacific/Kwajalein" , 0x03B200 },
{ "Pacific/Majuro" , 0x03B26C },
{ "Pacific/Marquesas" , 0x03B2CB },
{ "Pacific/Midway" , 0x03B332 },
{ "Pacific/Nauru" , 0x03B3BC },
{ "Pacific/Niue" , 0x03B434 },
{ "Pacific/Norfolk" , 0x03B492 },
{ "Pacific/Noumea" , 0x03B4E7 },
{ "Pacific/Pago_Pago" , 0x03B577 },
{ "Pacific/Palau" , 0x03B600 },
{ "Pacific/Pitcairn" , 0x03B644 },
{ "Pacific/Pohnpei" , 0x03B699 },
{ "Pacific/Ponape" , 0x03B6EE },
{ "Pacific/Port_Moresby" , 0x03B733 },
{ "Pacific/Rarotonga" , 0x03B777 },
{ "Pacific/Saipan" , 0x03B853 },
{ "Pacific/Samoa" , 0x03B8B6 },
{ "Pacific/Tahiti" , 0x03B93F },
{ "Pacific/Tarawa" , 0x03B9A4 },
{ "Pacific/Tongatapu" , 0x03B9F8 },
{ "Pacific/Truk" , 0x03BA84 },
{ "Pacific/Wake" , 0x03BAC9 },
{ "Pacific/Wallis" , 0x03BB19 },
{ "Pacific/Yap" , 0x03BB5D },
{ "Poland" , 0x03BBA2 },
{ "Portugal" , 0x03BF83 },
{ "PRC" , 0x03C47F },
{ "PST8PDT" , 0x03C530 },
{ "ROC" , 0x03C881 },
{ "ROK" , 0x03C999 },
{ "Singapore" , 0x03CA3D },
{ "Turkey" , 0x03CAF4 },
{ "UCT" , 0x03CEE1 },
{ "Universal" , 0x03CF25 },
{ "US/Alaska" , 0x03CF69 },
{ "US/Aleutian" , 0x03D2D2 },
{ "US/Arizona" , 0x03D638 },
{ "US/Central" , 0x03D6C6 },
{ "US/East-Indiana" , 0x03E0D0 },
{ "US/Eastern" , 0x03DBD1 },
{ "US/Hawaii" , 0x03E33A },
{ "US/Indiana-Starke" , 0x03E3AB },
{ "US/Michigan" , 0x03E71C },
{ "US/Mountain" , 0x03EA53 },
{ "US/Pacific" , 0x03EDCC },
{ "US/Pacific-New" , 0x03F1D1 },
{ "US/Samoa" , 0x03F5D6 },
{ "UTC" , 0x03F65F },
{ "W-SU" , 0x03F956 },
{ "WET" , 0x03F6A3 },
{ "Zulu" , 0x03FB90 },
{ "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 },
};
/* This is a generated file, do not modify */
const unsigned char timelib_timezone_db_data_builtin[261076] = {
const unsigned char timelib_timezone_db_data_builtin[261525] = {
/* Africa/Abidjan */
@@ -1868,19 +1868,19 @@ const unsigned char timelib_timezone_db_data_builtin[261076] = {
0x45, 0x31, 0xB2, 0x40, 0x45, 0xF3, 0x70, 0xB0, 0x47, 0x1A, 0xCE, 0xC0, 0x47, 0xD3, 0x52, 0xB0,
0x48, 0xFA, 0xB0, 0xC0, 0x49, 0xB3, 0x34, 0xB0, 0x4A, 0xDA, 0x92, 0xC0, 0x4B, 0xC1, 0x3B, 0x30,
0x4C, 0xA7, 0xFF, 0xC0, 0x4D, 0xA1, 0x1D, 0x30, 0x4E, 0x87, 0xE1, 0xC0, 0x4F, 0x80, 0xFF, 0x30,
0x50, 0x70, 0xFE, 0x40, 0x51, 0x4E, 0x6C, 0x30, 0x52, 0x50, 0xE0, 0x40, 0x53, 0x49, 0xFD, 0xB0,
0x54, 0x30, 0xC2, 0x40, 0x55, 0x29, 0xDF, 0xB0, 0x56, 0x10, 0xA4, 0x40, 0x57, 0x09, 0xC1, 0xB0,
0x57, 0xF0, 0x86, 0x40, 0x58, 0xE9, 0xA3, 0xB0, 0x59, 0xD0, 0x68, 0x40, 0x5A, 0xC9, 0x85, 0xB0,
0x5B, 0xB9, 0x84, 0xC0, 0x5C, 0xB2, 0xA2, 0x30, 0x5D, 0x99, 0x66, 0xC0, 0x5E, 0x92, 0x84, 0x30,
0x5F, 0x79, 0x48, 0xC0, 0x60, 0x72, 0x66, 0x30, 0x61, 0x59, 0x2A, 0xC0, 0x62, 0x52, 0x48, 0x30,
0x63, 0x39, 0x0C, 0xC0, 0x64, 0x32, 0x2A, 0x30, 0x65, 0x18, 0xEE, 0xC0, 0x66, 0x1B, 0x46, 0xB0,
0x67, 0x02, 0x0B, 0x40, 0x67, 0xFB, 0x28, 0xB0, 0x68, 0xE1, 0xED, 0x40, 0x69, 0xDB, 0x0A, 0xB0,
0x6A, 0xC1, 0xCF, 0x40, 0x6B, 0xBA, 0xEC, 0xB0, 0x6C, 0xA1, 0xB1, 0x40, 0x6D, 0x9A, 0xCE, 0xB0,
0x6E, 0x81, 0x93, 0x40, 0x6F, 0x7A, 0xB0, 0xB0, 0x70, 0x6A, 0xAF, 0xC0, 0x71, 0x63, 0xCD, 0x30,
0x72, 0x4A, 0x91, 0xC0, 0x73, 0x43, 0xAF, 0x30, 0x74, 0x2A, 0x73, 0xC0, 0x75, 0x23, 0x91, 0x30,
0x76, 0x0A, 0x55, 0xC0, 0x77, 0x03, 0x73, 0x30, 0x77, 0xEA, 0x37, 0xC0, 0x78, 0xE3, 0x55, 0x30,
0x79, 0xCA, 0x19, 0xC0, 0x7A, 0xC3, 0x37, 0x30, 0x7B, 0xB3, 0x36, 0x40, 0x7C, 0xAC, 0x53, 0xB0,
0x7D, 0x93, 0x18, 0x40, 0x7E, 0x8C, 0x35, 0xB0, 0x7F, 0x72, 0xFA, 0x40, 0x01, 0x02, 0x01, 0x03,
0x50, 0x70, 0xFE, 0x40, 0x51, 0x4E, 0x6C, 0x30, 0x52, 0x50, 0xE0, 0x40, 0x53, 0x2E, 0x4E, 0x30,
0x54, 0x30, 0xC2, 0x40, 0x55, 0x0E, 0x30, 0x30, 0x56, 0x10, 0xA4, 0x40, 0x56, 0xF7, 0x4C, 0xB0,
0x57, 0xF0, 0x86, 0x40, 0x58, 0xD7, 0x2E, 0xB0, 0x59, 0xD0, 0x68, 0x40, 0x5A, 0xB7, 0x10, 0xB0,
0x5B, 0xB9, 0x84, 0xC0, 0x5C, 0x96, 0xF2, 0xB0, 0x5D, 0x99, 0x66, 0xC0, 0x5E, 0x76, 0xD4, 0xB0,
0x5F, 0x79, 0x48, 0xC0, 0x60, 0x5F, 0xF1, 0x30, 0x61, 0x59, 0x2A, 0xC0, 0x62, 0x3F, 0xD3, 0x30,
0x63, 0x39, 0x0C, 0xC0, 0x64, 0x1F, 0xB5, 0x30, 0x65, 0x18, 0xEE, 0xC0, 0x65, 0xFF, 0x97, 0x30,
0x67, 0x02, 0x0B, 0x40, 0x67, 0xDF, 0x79, 0x30, 0x68, 0xE1, 0xED, 0x40, 0x69, 0xBF, 0x5B, 0x30,
0x6A, 0xC1, 0xCF, 0x40, 0x6B, 0xA8, 0x77, 0xB0, 0x6C, 0xA1, 0xB1, 0x40, 0x6D, 0x88, 0x59, 0xB0,
0x6E, 0x81, 0x93, 0x40, 0x6F, 0x68, 0x3B, 0xB0, 0x70, 0x6A, 0xAF, 0xC0, 0x71, 0x48, 0x1D, 0xB0,
0x72, 0x4A, 0x91, 0xC0, 0x73, 0x27, 0xFF, 0xB0, 0x74, 0x2A, 0x73, 0xC0, 0x75, 0x11, 0x1C, 0x30,
0x76, 0x0A, 0x55, 0xC0, 0x76, 0xF0, 0xFE, 0x30, 0x77, 0xEA, 0x37, 0xC0, 0x78, 0xD0, 0xE0, 0x30,
0x79, 0xCA, 0x19, 0xC0, 0x7A, 0xB0, 0xC2, 0x30, 0x7B, 0xB3, 0x36, 0x40, 0x7C, 0x90, 0xA4, 0x30,
0x7D, 0x93, 0x18, 0x40, 0x7E, 0x70, 0x86, 0x30, 0x7F, 0x72, 0xFA, 0x40, 0x01, 0x02, 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,
@@ -7214,46 +7214,43 @@ const unsigned char timelib_timezone_db_data_builtin[261076] = {
0x69, 0x65,
/* Antarctica/Macquarie */
0x50, 0x48, 0x50, 0x31, 0x01, 0x41, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x50, 0x48, 0x50, 0x31, 0x01, 0x41, 0x55, 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, 0x5F, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0D, 0x91, 0x05, 0x5B, 0x00,
0x9B, 0xD5, 0x78, 0x80, 0x9C, 0xBC, 0x20, 0xF0, 0xCB, 0x54, 0xB3, 0x00, 0xCB, 0xC7, 0x57, 0x70,
0xCC, 0xB7, 0x56, 0x80, 0xCD, 0xA7, 0x39, 0x70, 0xCE, 0xA0, 0x73, 0x00, 0xCF, 0x87, 0x1B, 0x70,
0xFB, 0xC2, 0x8D, 0x00, 0xFC, 0xB2, 0x7E, 0x00, 0xFD, 0xC7, 0x59, 0x00, 0xFE, 0x76, 0xB0, 0x80,
0xFF, 0xA7, 0x3B, 0x00, 0x00, 0x56, 0x92, 0x80, 0x01, 0x87, 0x1D, 0x00, 0x02, 0x3F, 0xAF, 0x00,
0x03, 0x70, 0x39, 0x80, 0x04, 0x0D, 0x1C, 0x00, 0x05, 0x50, 0x1B, 0x80, 0x05, 0xF6, 0x38, 0x80,
0x07, 0x2F, 0xFD, 0x80, 0x07, 0xD6, 0x1A, 0x80, 0x09, 0x0F, 0xDF, 0x80, 0x09, 0xB5, 0xFC, 0x80,
0x0A, 0xEF, 0xC1, 0x80, 0x0B, 0x9F, 0x19, 0x00, 0x0C, 0xD8, 0xDE, 0x00, 0x0D, 0x7E, 0xFB, 0x00,
0x0E, 0xB8, 0xC0, 0x00, 0x0F, 0x5E, 0xDD, 0x00, 0x10, 0x98, 0xA2, 0x00, 0x11, 0x3E, 0xBF, 0x00,
0x12, 0x78, 0x84, 0x00, 0x13, 0x1E, 0xA1, 0x00, 0x14, 0x58, 0x66, 0x00, 0x14, 0xFE, 0x83, 0x00,
0x16, 0x38, 0x48, 0x00, 0x17, 0x03, 0x4F, 0x00, 0x18, 0x21, 0x64, 0x80, 0x18, 0xE3, 0x31, 0x00,
0x1A, 0x01, 0x46, 0x80, 0x1A, 0xA7, 0x63, 0x80, 0x1B, 0xE1, 0x28, 0x80, 0x1C, 0x87, 0x45, 0x80,
0x1D, 0xC1, 0x0A, 0x80, 0x1E, 0x67, 0x27, 0x80, 0x1F, 0x97, 0xB2, 0x00, 0x20, 0x59, 0x7E, 0x80,
0x21, 0x80, 0xCE, 0x80, 0x22, 0x42, 0x9B, 0x00, 0x23, 0x69, 0xEB, 0x00, 0x24, 0x22, 0x7D, 0x00,
0x25, 0x49, 0xCD, 0x00, 0x26, 0x02, 0x5F, 0x00, 0x27, 0x29, 0xAF, 0x00, 0x27, 0xF4, 0xB6, 0x00,
0x28, 0xED, 0xE1, 0x80, 0x29, 0xD4, 0x98, 0x00, 0x2A, 0xCD, 0xC3, 0x80, 0x2B, 0xB4, 0x7A, 0x00,
0x2C, 0xAD, 0xA5, 0x80, 0x2D, 0x94, 0x5C, 0x00, 0x2E, 0x8D, 0x87, 0x80, 0x2F, 0x74, 0x3E, 0x00,
0x30, 0x6D, 0x69, 0x80, 0x31, 0x5D, 0x5A, 0x80, 0x32, 0x56, 0x86, 0x00, 0x33, 0x3D, 0x3C, 0x80,
0x34, 0x36, 0x68, 0x00, 0x35, 0x1D, 0x1E, 0x80, 0x36, 0x16, 0x4A, 0x00, 0x36, 0xFD, 0x00, 0x80,
0x37, 0xF6, 0x2C, 0x00, 0x38, 0xDC, 0xE2, 0x80, 0x39, 0xA7, 0xE9, 0x80, 0x3A, 0xBC, 0xC4, 0x80,
0x3B, 0xBF, 0x2A, 0x80, 0x3C, 0xA5, 0xE1, 0x00, 0x3D, 0x9F, 0x0C, 0x80, 0x3E, 0x85, 0xC3, 0x00,
0x3F, 0x7E, 0xEE, 0x80, 0x40, 0x65, 0xA5, 0x00, 0x41, 0x5E, 0xD0, 0x80, 0x42, 0x45, 0x87, 0x00,
0x43, 0x3E, 0xB2, 0x80, 0x44, 0x2E, 0xA3, 0x80, 0x45, 0x1E, 0x94, 0x80, 0x46, 0x05, 0x4B, 0x00,
0x47, 0x07, 0xB1, 0x00, 0x47, 0xF7, 0xA2, 0x00, 0x48, 0xE7, 0x93, 0x00, 0x49, 0xD7, 0x84, 0x00,
0x4A, 0xC7, 0x75, 0x00, 0x4B, 0xB7, 0x66, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 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, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8C,
0xA0, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00,
0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x08, 0x7A, 0x7A, 0x7A, 0x00, 0x45,
0x53, 0x54, 0x00, 0x4D, 0x49, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x2B, 0x30, 0x02, 0x05, 0x32, 0x58, 0x00, 0x00, 0x00, 0x2A,
0x4D, 0x61, 0x63, 0x71, 0x75, 0x61, 0x72, 0x69, 0x65, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64,
0x20, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x2C, 0x20, 0x4D, 0x61, 0x63, 0x71, 0x75, 0x61,
0x72, 0x69, 0x65, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64,
0x00, 0x00, 0x00, 0x5A, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0D, 0x9B, 0xD5, 0x78, 0x80,
0x9C, 0xBC, 0x20, 0xF0, 0xA0, 0x87, 0xB4, 0x60, 0xD7, 0x0C, 0x68, 0x00, 0xFB, 0xC2, 0x8D, 0x00,
0xFC, 0xB2, 0x7E, 0x00, 0xFD, 0xC7, 0x59, 0x00, 0xFE, 0x76, 0xB0, 0x80, 0xFF, 0xA7, 0x3B, 0x00,
0x00, 0x56, 0x92, 0x80, 0x01, 0x87, 0x1D, 0x00, 0x02, 0x3F, 0xAF, 0x00, 0x03, 0x70, 0x39, 0x80,
0x04, 0x0D, 0x1C, 0x00, 0x05, 0x50, 0x1B, 0x80, 0x05, 0xF6, 0x38, 0x80, 0x07, 0x2F, 0xFD, 0x80,
0x07, 0xD6, 0x1A, 0x80, 0x09, 0x0F, 0xDF, 0x80, 0x09, 0xB5, 0xFC, 0x80, 0x0A, 0xEF, 0xC1, 0x80,
0x0B, 0x9F, 0x19, 0x00, 0x0C, 0xD8, 0xDE, 0x00, 0x0D, 0x7E, 0xFB, 0x00, 0x0E, 0xB8, 0xC0, 0x00,
0x0F, 0x5E, 0xDD, 0x00, 0x10, 0x98, 0xA2, 0x00, 0x11, 0x3E, 0xBF, 0x00, 0x12, 0x78, 0x84, 0x00,
0x13, 0x1E, 0xA1, 0x00, 0x14, 0x58, 0x66, 0x00, 0x14, 0xFE, 0x83, 0x00, 0x16, 0x38, 0x48, 0x00,
0x17, 0x03, 0x4F, 0x00, 0x18, 0x21, 0x64, 0x80, 0x18, 0xE3, 0x31, 0x00, 0x1A, 0x01, 0x46, 0x80,
0x1A, 0xA7, 0x63, 0x80, 0x1B, 0xE1, 0x28, 0x80, 0x1C, 0x87, 0x45, 0x80, 0x1D, 0xC1, 0x0A, 0x80,
0x1E, 0x67, 0x27, 0x80, 0x1F, 0x97, 0xB2, 0x00, 0x20, 0x59, 0x7E, 0x80, 0x21, 0x80, 0xCE, 0x80,
0x22, 0x42, 0x9B, 0x00, 0x23, 0x69, 0xEB, 0x00, 0x24, 0x22, 0x7D, 0x00, 0x25, 0x49, 0xCD, 0x00,
0x26, 0x02, 0x5F, 0x00, 0x27, 0x29, 0xAF, 0x00, 0x27, 0xF4, 0xB6, 0x00, 0x28, 0xED, 0xE1, 0x80,
0x29, 0xD4, 0x98, 0x00, 0x2A, 0xCD, 0xC3, 0x80, 0x2B, 0xB4, 0x7A, 0x00, 0x2C, 0xAD, 0xA5, 0x80,
0x2D, 0x94, 0x5C, 0x00, 0x2E, 0x8D, 0x87, 0x80, 0x2F, 0x74, 0x3E, 0x00, 0x30, 0x6D, 0x69, 0x80,
0x31, 0x5D, 0x5A, 0x80, 0x32, 0x56, 0x86, 0x00, 0x33, 0x3D, 0x3C, 0x80, 0x34, 0x36, 0x68, 0x00,
0x35, 0x1D, 0x1E, 0x80, 0x36, 0x16, 0x4A, 0x00, 0x36, 0xFD, 0x00, 0x80, 0x37, 0xF6, 0x2C, 0x00,
0x38, 0xDC, 0xE2, 0x80, 0x39, 0xA7, 0xE9, 0x80, 0x3A, 0xBC, 0xC4, 0x80, 0x3B, 0xBF, 0x2A, 0x80,
0x3C, 0xA5, 0xE1, 0x00, 0x3D, 0x9F, 0x0C, 0x80, 0x3E, 0x85, 0xC3, 0x00, 0x3F, 0x7E, 0xEE, 0x80,
0x40, 0x65, 0xA5, 0x00, 0x41, 0x5E, 0xD0, 0x80, 0x42, 0x45, 0x87, 0x00, 0x43, 0x3E, 0xB2, 0x80,
0x44, 0x2E, 0xA3, 0x80, 0x45, 0x1E, 0x94, 0x80, 0x46, 0x05, 0x4B, 0x00, 0x47, 0x07, 0xB1, 0x00,
0x47, 0xF7, 0xA2, 0x00, 0x48, 0xE7, 0x93, 0x00, 0x49, 0xD7, 0x84, 0x00, 0x4A, 0xC7, 0x75, 0x00,
0x4B, 0xB7, 0x66, 0x00, 0x01, 0x00, 0x02, 0x00, 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, 0x05, 0x00, 0x00,
0x8C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
0x00, 0x00, 0x9A, 0xB0, 0x01, 0x00, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0,
0x00, 0x08, 0x45, 0x53, 0x54, 0x00, 0x7A, 0x7A, 0x7A, 0x00, 0x4D, 0x49, 0x53, 0x54, 0x00, 0x00,
0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x2B, 0x30, 0x02,
0x05, 0x32, 0x58, 0x00, 0x00, 0x00, 0x10, 0x4D, 0x61, 0x63, 0x71, 0x75, 0x61, 0x72, 0x69, 0x65,
0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64,
/* Antarctica/Mawson */
0x50, 0x48, 0x50, 0x31, 0x01, 0x41, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -8101,7 +8098,7 @@ const unsigned char timelib_timezone_db_data_builtin[261076] = {
/* Asia/Gaza */
0x50, 0x48, 0x50, 0x31, 0x01, 0x50, 0x53, 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, 0x5E, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xC8, 0x59, 0xB2, 0xE0,
0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xC8, 0x59, 0xB2, 0xE0,
0xCC, 0xE5, 0xC1, 0x50, 0xCD, 0xAC, 0xFE, 0x00, 0xCE, 0xC6, 0xF4, 0xD0, 0xCF, 0x8F, 0x66, 0xE0,
0xD0, 0xA9, 0x79, 0xD0, 0xD1, 0x84, 0x60, 0xE0, 0xD2, 0x8A, 0xC9, 0x70, 0xD3, 0x65, 0xB0, 0x80,
0xD4, 0x6B, 0xE0, 0xD0, 0xE8, 0x36, 0x63, 0x60, 0xE8, 0xF4, 0x2D, 0x50, 0xEA, 0x0B, 0xB9, 0x60,
@@ -8122,21 +8119,37 @@ const unsigned char timelib_timezone_db_data_builtin[261076] = {
0x39, 0xEF, 0x60, 0xD0, 0x3A, 0xDF, 0x5F, 0xE0, 0x3B, 0xCF, 0x42, 0xD0, 0x3C, 0xBF, 0x41, 0xE0,
0x3D, 0xAF, 0x24, 0xD0, 0x3E, 0x9F, 0x23, 0xE0, 0x3F, 0x8F, 0x06, 0xD0, 0x40, 0x7F, 0x05, 0xE0,
0x41, 0x5C, 0x81, 0xE0, 0x42, 0x5E, 0xE7, 0xE0, 0x43, 0x41, 0xB7, 0xF0, 0x44, 0x2D, 0xA6, 0x60,
0x45, 0x12, 0xFD, 0x50, 0x46, 0x0E, 0xD9, 0xE0, 0x46, 0xE8, 0x6F, 0x70, 0x47, 0xF1, 0x5E, 0xE0,
0x48, 0xB7, 0x11, 0xD0, 0x49, 0xCB, 0xFA, 0xE0, 0x4A, 0xA0, 0x4A, 0x70, 0x4B, 0xAD, 0x2E, 0x9C,
0x4C, 0x61, 0xBD, 0xD0, 0x4D, 0x96, 0xF3, 0xDC, 0x4E, 0x35, 0xC2, 0x50, 0x4F, 0x74, 0xDB, 0x60,
0x50, 0x5B, 0x91, 0xE0, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x02, 0x01,
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,
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, 0x05, 0x02, 0x05, 0x02, 0x05, 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,
0x05, 0x02, 0x05, 0x02, 0x05, 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, 0x2A, 0x30, 0x01, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00,
0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D,
0x00, 0x00, 0x1C, 0x20, 0x00, 0x00, 0x45, 0x45, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x49,
0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xB9, 0x64, 0xF0, 0x01, 0x47, 0x40, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x47,
0x61, 0x7A, 0x61, 0x20, 0x53, 0x74, 0x72, 0x69, 0x70,
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, 0x2A, 0x30,
0x01, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00,
0x2A, 0x30, 0x01, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x00,
0x45, 0x45, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB9, 0x64,
0xF0, 0x01, 0x47, 0x40, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x61, 0x7A, 0x61, 0x20, 0x53, 0x74,
0x72, 0x69, 0x70,
/* Asia/Harbin */
0x50, 0x48, 0x50, 0x31, 0x01, 0x43, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -8158,7 +8171,7 @@ const unsigned char timelib_timezone_db_data_builtin[261076] = {
/* Asia/Hebron */
0x50, 0x48, 0x50, 0x31, 0x01, 0x50, 0x53, 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, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xC8, 0x59, 0xB2, 0xE0,
0x00, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xC8, 0x59, 0xB2, 0xE0,
0xCC, 0xE5, 0xC1, 0x50, 0xCD, 0xAC, 0xFE, 0x00, 0xCE, 0xC6, 0xF4, 0xD0, 0xCF, 0x8F, 0x66, 0xE0,
0xD0, 0xA9, 0x79, 0xD0, 0xD1, 0x84, 0x60, 0xE0, 0xD2, 0x8A, 0xC9, 0x70, 0xD3, 0x65, 0xB0, 0x80,
0xD4, 0x6B, 0xE0, 0xD0, 0xE8, 0x36, 0x63, 0x60, 0xE8, 0xF4, 0x2D, 0x50, 0xEA, 0x0B, 0xB9, 0x60,
@@ -8179,22 +8192,37 @@ const unsigned char timelib_timezone_db_data_builtin[261076] = {
0x39, 0xEF, 0x60, 0xD0, 0x3A, 0xDF, 0x5F, 0xE0, 0x3B, 0xCF, 0x42, 0xD0, 0x3C, 0xBF, 0x41, 0xE0,
0x3D, 0xAF, 0x24, 0xD0, 0x3E, 0x9F, 0x23, 0xE0, 0x3F, 0x8F, 0x06, 0xD0, 0x40, 0x7F, 0x05, 0xE0,
0x41, 0x5C, 0x81, 0xE0, 0x42, 0x5E, 0xE7, 0xE0, 0x43, 0x41, 0xB7, 0xF0, 0x44, 0x2D, 0xA6, 0x60,
0x45, 0x12, 0xFD, 0x50, 0x46, 0x0E, 0xD9, 0xE0, 0x46, 0xE8, 0x6F, 0x70, 0x47, 0xF1, 0x5E, 0xE0,
0x48, 0xBB, 0x06, 0x50, 0x49, 0xCB, 0xFA, 0xE0, 0x4A, 0xA0, 0x4A, 0x70, 0x4B, 0xAD, 0x2E, 0x9C,
0x4C, 0x61, 0xBD, 0xD0, 0x4D, 0x95, 0xA2, 0x5C, 0x4E, 0x35, 0xC2, 0x50, 0x4E, 0x5C, 0x0B, 0xE0,
0x4E, 0x85, 0x06, 0x80, 0x4F, 0x74, 0xDB, 0x60, 0x50, 0x5B, 0x91, 0xE0, 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, 0x05, 0x02, 0x05, 0x02, 0x05, 0x01, 0x02, 0x01,
0x45, 0x12, 0xFD, 0x50, 0x46, 0x0E, 0xD9, 0xE0, 0x46, 0xE8, 0x6F, 0x70, 0x47, 0xEC, 0x18, 0xE0,
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,
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, 0x2A, 0x30,
0x01, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00,
0x2A, 0x30, 0x01, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x00,
0x45, 0x45, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB9, 0x71,
0xF5, 0x01, 0x48, 0x35, 0x7C, 0x00, 0x00, 0x00, 0x09, 0x57, 0x65, 0x73, 0x74, 0x20, 0x42, 0x61,
0x6E, 0x6B,
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,
0x05, 0x02, 0x05, 0x02, 0x05, 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, 0x2A, 0x30, 0x01, 0x00, 0x00, 0x00, 0x1C, 0x20,
0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x09, 0x00, 0x00,
0x1C, 0x20, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x00, 0x45, 0x45, 0x54, 0x00, 0x45, 0x45,
0x53, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB9, 0x71, 0xF5, 0x01, 0x48, 0x35, 0x7C, 0x00,
0x00, 0x00, 0x09, 0x57, 0x65, 0x73, 0x74, 0x20, 0x42, 0x61, 0x6E, 0x6B,
/* Asia/Ho_Chi_Minh */
0x50, 0x48, 0x50, 0x31, 0x01, 0x56, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -18382,4 +18410,4 @@ const unsigned char timelib_timezone_db_data_builtin[261076] = {
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.2", 579, timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
const timelib_tzdb timezonedb_builtin = { "2013.3", 579, timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
@@ -13,7 +13,7 @@ require_once('skipif.inc');
require_once('dom_test.inc');
chdir(__DIR__);
$XMLStringGood = file_get_contents('note.xml');
$XMLStringGood = file_get_contents(dirname(__FILE__).'/note.xml');
$dom = new DOMDocument;
$dom->resolveExternals = TRUE;
@@ -0,0 +1,38 @@
--TEST--
Test DOMNode::insertBefore() check the error code DOM_NOT_FOUND is raised
--DESCRIPTION--
DOMNode::insertBefore(newNode, [refNode])
DOM_NOT_FOUND is raised if refnode is not a child
This test checks the error message is raised when the refnode is a sibling
--CREDITS--
Antonio Diaz Ruiz <dejalatele@gmail.com>
--INI--
assert.bail=true
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
<?php
$dom = new DOMDocument();
$doc = $dom->load(dirname(__FILE__) . "/book.xml", LIBXML_NOBLANKS);
assert('$doc === true');
$parent_node = $dom->getElementsByTagName("book")->item(0);
assert('!is_null($parent_node)');
$new_node = $dom->createElement('newnode');
assert('$new_node !== false');
// getting a sibling as reference node to insert
$ref_node = $dom->getElementsByTagName("book")->item(1);
try {
$parent_node->insertBefore($new_node, $ref_node);
} catch(DOMException $e) {
echo $e->getMessage();
}
?>
--EXPECT--
Not Found Error
@@ -0,0 +1,39 @@
--TEST--
Test DOMNode::insertBefore() check the error code DOM_NOT_FOUND is raised
--DESCRIPTION--
DOMNode::insertBefore(newNode, [refNode])
DOM_NOT_FOUND is raised if refnode is not a child
This test checks the error message is raised when refnode is the parent node
--CREDITS--
Antonio Diaz Ruiz <dejalatele@gmail.com>
--INI--
assert.bail=true
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
<?php
$dom = new DOMDocument();
$doc = $dom->load(dirname(__FILE__) . "/book.xml", LIBXML_NOBLANKS);
assert('$doc === true');
$parent_node = $dom->getElementsByTagName("book")->item(0);
assert('!is_null($parent_node)');
$new_node = $dom->createElement('newnode');
assert('$new_node !== false');
// getting the parent node as reference node to insert
$ref_node = $dom->getElementsByTagName("book")->item(0)->parentNode;
assert('!is_null($ref_node)');
try {
$parent_node->insertBefore($new_node, $ref_node);
} catch(DOMException $e) {
echo $e->getMessage();
}
?>
--EXPECT--
Not Found Error
@@ -0,0 +1,38 @@
--TEST--
Test DOMNode::insertBefore() check the error code DOM_NOT_FOUND is raised
--DESCRIPTION--
DOMNode::insertBefore(newNode, [refNode])
DOM_NOT_FOUND is raised if refnode is not a child
This test checks the error message is raised when the refnode is a brand new node
--CREDITS--
Antonio Diaz Ruiz <dejalatele@gmail.com>
--INI--
assert.bail=true
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
<?php
$dom = new DOMDocument();
$doc = $dom->load(dirname(__FILE__) . "/book.xml", LIBXML_NOBLANKS);
assert('$doc === true');
$parent_node = $dom->getElementsByTagName("book")->item(0);
assert('!is_null($parent_node)');
$new_node = $dom->createElement('newnode');
assert('$new_node !== false');
// could be a brand new node
$ref_node = $dom->createElement('newnode2');
try {
$parent_node->insertBefore($new_node, $ref_node);
} catch(DOMException $e) {
echo $e->getMessage();
}
?>
--EXPECT--
Not Found Error
@@ -0,0 +1,40 @@
--TEST--
Test DOMNode::insertBefore() check the error code DOM_NOT_FOUND is raised
--DESCRIPTION--
DOMNode::insertBefore(newNode, [refNode])
DOM_NOT_FOUND is raised if refnode is not a child
This test checks the error message is raised when the refnode is a descendant but not a child
--CREDITS--
Antonio Diaz Ruiz <dejalatele@gmail.com>
--INI--
assert.bail=true
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
<?php
$dom = new DOMDocument();
$doc = $dom->load(dirname(__FILE__) . "/book.xml", LIBXML_NOBLANKS);
assert('$doc === true');
$parent_node = $dom->getElementsByTagName("book")->item(0);
assert('!is_null($parent_node)');
$new_node = $dom->createElement('newnode');
assert('$new_node !== false');
// creating a new node (descendant) and getting it as the refnode
$ref_node = $dom->createElement('newnode3');
$parent_node->childNodes->item(0)->appendChild($ref_node);
$dom->saveXML();
try {
$parent_node->insertBefore($new_node, $ref_node);
} catch(DOMException $e) {
echo $e->getMessage();
}
?>
--EXPECT--
Not Found Error
@@ -0,0 +1,35 @@
--TEST--
Test DOMNode::insertBefore() check the error code DOM_NOT_FOUND is raised
--DESCRIPTION--
DOMNode::insertBefore(newNode, [refNode])
DOM_NOT_FOUND is raised if refnode is not a child
This test checks the error message is raised when the refnode is the parent
--CREDITS--
Antonio Diaz Ruiz <dejalatele@gmail.com>
--INI--
assert.bail=true
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
<?php
$dom = new DOMDocument();
$doc = $dom->load(dirname(__FILE__) . "/book.xml", LIBXML_NOBLANKS);
assert('$doc === true');
$parent_node = $dom->getElementsByTagName("book")->item(0);
assert('!is_null($parent_node)');
$ref_node = $parent_node;
$new_node = $dom->createElement('newnode');
assert('$new_node !== false');
try {
$parent_node->insertBefore($new_node, $ref_node);
} catch(DOMException $e) {
echo $e->getMessage();
}
?>
--EXPECT--
Not Found Error
+5
View File
@@ -265,6 +265,7 @@ AC_DEFUN([PHP_GD_CHECK_VERSION],[
PHP_CHECK_LIBRARY(gd, gdImageCreateFromGif, [AC_DEFINE(HAVE_GD_GIF_READ, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdImageGif, [AC_DEFINE(HAVE_GD_GIF_CREATE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdImageWBMP, [AC_DEFINE(HAVE_GD_WBMP, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdImageCreateFromWebp, [AC_DEFINE(HAVE_GD_WEBP, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdImageCreateFromJpeg, [AC_DEFINE(HAVE_GD_JPG, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdImageCreateFromXpm, [AC_DEFINE(HAVE_GD_XPM, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdImageCreateFromGd2, [AC_DEFINE(HAVE_GD_GD2, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
@@ -285,6 +286,8 @@ AC_DEFUN([PHP_GD_CHECK_VERSION],[
PHP_CHECK_LIBRARY(gd, gdNewDynamicCtxEx, [AC_DEFINE(HAVE_GD_DYNAMIC_CTX_EX, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdImageConvolution, [AC_DEFINE(HAVE_GD_IMAGE_CONVOLUTION, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdImagePixelate, [AC_DEFINE(HAVE_GD_IMAGE_PIXELATE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdImageFlipBoth, [AC_DEFINE(HAVE_GD_IMAGE_FLIP, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdImageCreateFromJpegEx,[AC_DEFINE(HAVE_GD_JPGEX, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
])
dnl
@@ -341,6 +344,7 @@ dnl These are always available with bundled library
AC_DEFINE(HAVE_GD_FONTMUTEX, 1, [ ])
AC_DEFINE(HAVE_GD_DYNAMIC_CTX_EX, 1, [ ])
AC_DEFINE(HAVE_GD_GIF_CTX, 1, [ ])
AC_DEFINE(HAVE_GD_IMAGE_FLIP, 1, [ ])
dnl Make sure the libgd/ is first in the include path
GDLIB_CFLAGS="-DHAVE_LIBPNG"
@@ -355,6 +359,7 @@ dnl enable the support in bundled GD library
if test -n "$GD_JPEG_DIR"; then
AC_DEFINE(HAVE_GD_JPG, 1, [ ])
AC_DEFINE(HAVE_GD_JPGEX, 1, [ ])
GDLIB_CFLAGS="$GDLIB_CFLAGS -DHAVE_LIBJPEG"
fi
+47 -39
View File
@@ -891,17 +891,19 @@ ZEND_BEGIN_ARG_INFO(arginfo_imageconvolution, 0)
ZEND_ARG_INFO(0, offset)
ZEND_END_ARG_INFO()
#ifdef HAVE_GD_IMAGE_FLIP
ZEND_BEGIN_ARG_INFO(arginfo_imageflip, 0)
ZEND_ARG_INFO(0, im)
ZEND_ARG_INFO(0, mode)
ZEND_END_ARG_INFO()
#endif
#ifdef HAVE_GD_BUNDLED
ZEND_BEGIN_ARG_INFO(arginfo_imageantialias, 0)
ZEND_ARG_INFO(0, im)
ZEND_ARG_INFO(0, on)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_imageflip, 0)
ZEND_ARG_INFO(0, im)
ZEND_ARG_INFO(0, mode)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_imagecrop, 0)
ZEND_ARG_INFO(0, im)
ZEND_ARG_INFO(0, rect)
@@ -1000,9 +1002,12 @@ const zend_function_entry gd_functions[] = {
PHP_FE(imagerotate, arginfo_imagerotate)
#ifdef HAVE_GD_IMAGE_FLIP
PHP_FE(imageflip, arginfo_imageflip)
#endif
#ifdef HAVE_GD_BUNDLED
PHP_FE(imageantialias, arginfo_imageantialias)
PHP_FE(imageflip, arginfo_imageflip)
PHP_FE(imagecrop, arginfo_imagecrop)
PHP_FE(imagecropauto, arginfo_imagecropauto)
PHP_FE(imagescale, arginfo_imagescale)
@@ -1254,6 +1259,11 @@ PHP_MINIT_FUNCTION(gd)
#ifdef GD2_FMT_COMPRESSED
REGISTER_LONG_CONSTANT("IMG_GD2_COMPRESSED", GD2_FMT_COMPRESSED, CONST_CS | CONST_PERSISTENT);
#endif
#ifdef HAVE_GD_IMAGE_FLIP
REGISTER_LONG_CONSTANT("IMG_FLIP_HORIZONTAL", GD_FLIP_HORINZONTAL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IMG_FLIP_VERTICAL", GD_FLIP_VERTICAL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IMG_FLIP_BOTH", GD_FLIP_BOTH, CONST_CS | CONST_PERSISTENT);
#endif
#if HAVE_GD_BUNDLED
REGISTER_LONG_CONSTANT("IMG_EFFECT_REPLACE", gdEffectReplace, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IMG_EFFECT_ALPHABLEND", gdEffectAlphaBlend, CONST_CS | CONST_PERSISTENT);
@@ -1261,10 +1271,6 @@ PHP_MINIT_FUNCTION(gd)
REGISTER_LONG_CONSTANT("IMG_EFFECT_OVERLAY", gdEffectOverlay, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("GD_BUNDLED", 1, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IMG_FLIP_HORIZONTAL", GD_FLIP_HORINZONTAL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IMG_FLIP_VERTICAL", GD_FLIP_VERTICAL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IMG_FLIP_BOTH", GD_FLIP_BOTH, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IMG_CROP_DEFAULT", GD_CROP_DEFAULT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IMG_CROP_TRANSPARENT", GD_CROP_TRANSPARENT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IMG_CROP_BLACK", GD_CROP_BLACK, CONST_CS | CONST_PERSISTENT);
@@ -2416,7 +2422,7 @@ static int _php_image_type (char data[8])
gdIOCtx *io_ctx;
io_ctx = gdNewDynamicCtxEx(8, data, 0);
if (io_ctx) {
if (getmbi((int(*)(void *)) gdGetC, io_ctx) == 0 && skipheader((int(*)(void *)) gdGetC, io_ctx) == 0 ) {
if (getmbi((int(*)(void *)) io_ctx->getC, io_ctx) == 0 && skipheader((int(*)(void *)) io_ctx->getC, io_ctx) == 0 ) {
#if HAVE_LIBGD204
io_ctx->gd_free(io_ctx);
#else
@@ -2567,7 +2573,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type,
gdImagePtr im = NULL;
php_stream *stream;
FILE * fp = NULL;
#ifdef HAVE_GD_JPG
#ifdef HAVE_GD_JPGEX
long ignore_warning;
#endif
if (image_type == PHP_GDIMG_TYPE_GD2PART) {
@@ -2670,9 +2676,9 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type,
#ifdef HAVE_GD_JPG
case PHP_GDIMG_TYPE_JPG:
#ifdef HAVE_GD_JPGEX
ignore_warning = INI_INT("gd.jpeg_ignore_warning");
#ifdef HAVE_GD_BUNDLED
im = gdImageCreateFromJpeg(fp, ignore_warning);
im = gdImageCreateFromJpegEx(fp, ignore_warning);
#else
im = gdImageCreateFromJpeg(fp);
#endif
@@ -4730,7 +4736,7 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type )
int int_threshold;
int x, y;
float x_ratio, y_ratio;
#ifdef HAVE_GD_JPG
#ifdef HAVE_GD_JPGEX
long ignore_warning;
#endif
@@ -4783,9 +4789,9 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type )
#ifdef HAVE_GD_JPG
case PHP_GDIMG_TYPE_JPG:
#ifdef HAVE_GD_JPGEX
ignore_warning = INI_INT("gd.jpeg_ignore_warning");
#ifdef HAVE_GD_BUNDLED
im_org = gdImageCreateFromJpeg(org, ignore_warning);
im_org = gdImageCreateFromJpegEx(org, ignore_warning);
#else
im_org = gdImageCreateFromJpeg(org);
#endif
@@ -5197,26 +5203,7 @@ PHP_FUNCTION(imageconvolution)
/* }}} */
/* End section: Filters */
#ifdef HAVE_GD_BUNDLED
/* {{{ proto bool imageantialias(resource im, bool on)
Should antialiased functions used or not*/
PHP_FUNCTION(imageantialias)
{
zval *IM;
zend_bool alias;
gdImagePtr im;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rb", &IM, &alias) == FAILURE) {
return;
}
ZEND_FETCH_RESOURCE(im, gdImagePtr, &IM, -1, "Image", le_gd);
gdImageAntialias(im, alias);
RETURN_TRUE;
}
/* }}} */
#ifdef HAVE_GD_IMAGE_FLIP
/* {{{ proto void imageflip(resource im, int mode)
Flip an image (in place) horizontally, vertically or both directions. */
PHP_FUNCTION(imageflip)
@@ -5252,6 +5239,27 @@ PHP_FUNCTION(imageflip)
RETURN_TRUE;
}
/* }}} */
#endif
#ifdef HAVE_GD_BUNDLED
/* {{{ proto bool imageantialias(resource im, bool on)
Should antialiased functions used or not*/
PHP_FUNCTION(imageantialias)
{
zval *IM;
zend_bool alias;
gdImagePtr im;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rb", &IM, &alias) == FAILURE) {
return;
}
ZEND_FETCH_RESOURCE(im, gdImagePtr, &IM, -1, "Image", le_gd);
gdImageAntialias(im, alias);
RETURN_TRUE;
}
/* }}} */
/* {{{ proto void imagecrop(resource im, array rect)
Crop an image using the given coordinates and size, x, y, width and height. */
@@ -5348,7 +5356,7 @@ PHP_FUNCTION(imagecropauto)
break;
default:
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown flip mode");
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown crop mode");
RETURN_FALSE;
}
if (im_crop == NULL) {
@@ -5360,7 +5368,7 @@ PHP_FUNCTION(imagecropauto)
/* }}} */
/* {{{ proto resource imagescale(resource im, new_width[, new_height[, method]])
Crop an image using the given coordinates and size, x, y, width and height. */
Scale an image using the given new width and height. */
PHP_FUNCTION(imagescale)
{
zval *IM;
+6 -2
View File
@@ -362,8 +362,12 @@ gdImagePtr gdImageCreateFromPng(FILE *fd);
gdImagePtr gdImageCreateFromPngCtx(gdIOCtxPtr in);
gdImagePtr gdImageCreateFromWBMP(FILE *inFile);
gdImagePtr gdImageCreateFromWBMPCtx(gdIOCtx *infile);
gdImagePtr gdImageCreateFromJpeg(FILE *infile, int ignore_warning);
gdImagePtr gdImageCreateFromJpegCtx(gdIOCtx *infile, int ignore_warning);
gdImagePtr gdImageCreateFromJpeg(FILE *infile);
gdImagePtr gdImageCreateFromJpegEx(FILE *infile, int ignore_warning);
gdImagePtr gdImageCreateFromJpegCtx(gdIOCtx *infile);
gdImagePtr gdImageCreateFromJpegCtxEx(gdIOCtx *infile, int ignore_warning);
gdImagePtr gdImageCreateFromJpegPtr (int size, void *data);
gdImagePtr gdImageCreateFromJpegPtrEx (int size, void *data, int ignore_warning);
gdImagePtr gdImageCreateFromWebp(FILE *fd);
gdImagePtr gdImageCreateFromWebpCtx(gdIOCtxPtr in);
gdImagePtr gdImageCreateFromWebpPtr (int size, void *data);
+47
View File
@@ -33,3 +33,50 @@ const char * gdPngGetVersionString()
}
#endif
/* Not exported by libgd, copied from gdhelpers.h */
int overflow2(int a, int b)
{
if(a <= 0 || b <= 0) {
return 1;
}
if(a > INT_MAX / b) {
return 1;
}
return 0;
}
/* Not exported by libgd, copied from wbmp.c */
int
getmbi (int (*getin) (void *in), void *in)
{
int i, mbi = 0;
do
{
i = getin (in);
if (i < 0)
return (-1);
mbi = (mbi << 7) | (i & 0x7f);
}
while (i & 0x80);
return (mbi);
}
/* Not exported by libgd, copied from wbmp.c */
int
skipheader (int (*getin) (void *in), void *in)
{
int i;
do
{
i = getin (in);
if (i < 0)
return (-1);
}
while (i & 0x80);
return (0);
}
+3
View File
@@ -11,6 +11,9 @@ const char * gdPngGetVersionString();
const char * gdJpegGetVersionString();
int gdJpegGetVersionInt();
int overflow2(int a, int b);
int getmbi (int (*getin) (void *in), void *in);
int skipheader (int (*getin) (void *in), void *in);
/* filters section
*
+20 -5
View File
@@ -269,21 +269,31 @@ void gdImageJpegCtx (gdImagePtr im, gdIOCtx * outfile, int quality)
gdFree (row);
}
gdImagePtr gdImageCreateFromJpeg (FILE * inFile, int ignore_warning)
gdImagePtr gdImageCreateFromJpeg (FILE * inFile)
{
return gdImageCreateFromJpegEx(inFile, 1);
}
gdImagePtr gdImageCreateFromJpegEx (FILE * inFile, int ignore_warning)
{
gdImagePtr im;
gdIOCtx *in = gdNewFileCtx(inFile);
im = gdImageCreateFromJpegCtx(in, ignore_warning);
im = gdImageCreateFromJpegCtxEx(in, ignore_warning);
in->gd_free (in);
return im;
}
gdImagePtr gdImageCreateFromJpegPtr (int size, void *data, int ignore_warning)
gdImagePtr gdImageCreateFromJpegPtr (int size, void *data)
{
return gdImageCreateFromJpegPtrEx(size, data, 1);
}
gdImagePtr gdImageCreateFromJpegPtrEx (int size, void *data, int ignore_warning)
{
gdImagePtr im;
gdIOCtx *in = gdNewDynamicCtxEx(size, data, 0);
im = gdImageCreateFromJpegCtx(in, ignore_warning);
im = gdImageCreateFromJpegCtxEx(in, ignore_warning);
in->gd_free(in);
return im;
@@ -298,7 +308,12 @@ static int CMYKToRGB(int c, int m, int y, int k, int inverted);
* Create a gd-format image from the JPEG-format INFILE. Returns the
* image, or NULL upon error.
*/
gdImagePtr gdImageCreateFromJpegCtx (gdIOCtx * infile, int ignore_warning)
gdImagePtr gdImageCreateFromJpegCtx (gdIOCtx * infile)
{
return gdImageCreateFromJpegCtxEx(infile, 1);
}
gdImagePtr gdImageCreateFromJpegCtxEx (gdIOCtx * infile, int ignore_warning)
{
struct jpeg_decompress_struct cinfo;
struct jpeg_error_mgr jerr;
+4 -1
View File
@@ -123,9 +123,12 @@ PHP_FUNCTION(imagegrabscreen);
PHP_FUNCTION(imagerotate);
#ifdef HAVE_GD_IMAGE_FLIP
PHP_FUNCTION(imageflip);
#endif
#ifdef HAVE_GD_BUNDLED
PHP_FUNCTION(imageantialias);
PHP_FUNCTION(imageflip);
PHP_FUNCTION(imagecrop);
PHP_FUNCTION(imagecropauto);
PHP_FUNCTION(imagescale);
+70 -98
View File
@@ -2524,126 +2524,98 @@ PHP_FUNCTION(array_count_values)
}
/* }}} */
/* {{{ array_column_param_helper
* Specialized conversion rules for array_column() function
*/
static inline
zend_bool array_column_param_helper(zval **param,
const char *name TSRMLS_DC) {
switch (Z_TYPE_PP(param)) {
case IS_DOUBLE:
convert_to_long_ex(param);
/* fallthrough */
case IS_LONG:
return 1;
case IS_OBJECT:
convert_to_string_ex(param);
/* fallthrough */
case IS_STRING:
return 1;
default:
php_error_docref(NULL TSRMLS_CC, E_WARNING, "The %s key should be either a string or an integer", name);
return 0;
}
}
/* {{{ proto array array_column(array input, mixed column_key[, mixed index_key])
Return the values from a single column in the input array, identified by the
value_key and optionally indexed by the index_key */
PHP_FUNCTION(array_column)
{
zval *zarray, **zcolumn, **zkey = NULL, **data, **zcolval, **zkeyval;
zval **zcolumn = NULL, **zkey = NULL, **data;
HashTable *arr_hash;
HashPosition pointer;
ulong column_idx = 0, key_idx = 0;
char *column = NULL, *key = NULL, *keyval = NULL;
int column_len = 0, key_len = 0, keyval_idx = -1;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "aZ|Z", &zarray, &zcolumn, &zkey) == FAILURE) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "hZ!|Z!", &arr_hash, &zcolumn, &zkey) == FAILURE) {
return;
}
switch (Z_TYPE_PP(zcolumn)) {
case IS_NULL:
column_idx = 0;
break;
case IS_LONG:
column_idx = Z_LVAL_PP(zcolumn);
break;
case IS_STRING:
column = Z_STRVAL_PP(zcolumn);
column_len = Z_STRLEN_PP(zcolumn);
break;
case IS_OBJECT:
convert_to_string_ex(zcolumn);
column = Z_STRVAL_PP(zcolumn);
column_len = Z_STRLEN_PP(zcolumn);
break;
default:
php_error_docref(NULL TSRMLS_CC, E_WARNING, "The column key should be either a string or an integer");
RETURN_FALSE;
if ((zcolumn && !array_column_param_helper(zcolumn, "column" TSRMLS_CC)) ||
(zkey && !array_column_param_helper(zkey, "index" TSRMLS_CC))) {
RETURN_FALSE;
}
if (zkey) {
switch (Z_TYPE_PP(zkey)) {
case IS_NULL:
key_idx = 0;
break;
case IS_LONG:
key_idx = Z_LVAL_PP(zkey);
break;
case IS_STRING:
key = Z_STRVAL_PP(zkey);
key_len = Z_STRLEN_PP(zkey);
break;
case IS_OBJECT:
convert_to_string_ex(zkey);
key = Z_STRVAL_PP(zkey);
key_len = Z_STRLEN_PP(zkey);
break;
default:
php_error_docref(NULL TSRMLS_CC, E_WARNING, "The index key should be either a string or an integer");
RETURN_FALSE;
}
}
arr_hash = Z_ARRVAL_P(zarray);
array_init(return_value);
for (zend_hash_internal_pointer_reset_ex(arr_hash, &pointer);
zend_hash_get_current_data_ex(arr_hash, (void**)&data, &pointer) == SUCCESS;
zend_hash_move_forward_ex(arr_hash, &pointer)) {
zval **zcolval, **zkeyval = NULL;
HashTable *ht;
if (Z_TYPE_PP(data) == IS_ARRAY) {
zval *strkey = NULL;
if (Z_TYPE_PP(data) != IS_ARRAY) {
/* Skip elemens which are not sub-arrays */
continue;
}
ht = Z_ARRVAL_PP(data);
if (column && zend_hash_find(Z_ARRVAL_PP(data), column, column_len + 1, (void**)&zcolval) == FAILURE) {
continue;
} else if (!column && zend_hash_index_find(Z_ARRVAL_PP(data), column_idx, (void**)&zcolval) == FAILURE) {
continue;
}
if (!zcolumn) {
/* NULL column ID means use entire subarray as data */
zcolval = data;
Z_ADDREF_PP(zcolval);
keyval = NULL;
keyval_idx = -1;
if (zkey) {
if (key && zend_hash_find(Z_ARRVAL_PP(data), key, key_len + 1, (void**)&zkeyval) == FAILURE) {
keyval_idx = -1;
} else if (!key && zend_hash_index_find(Z_ARRVAL_PP(data), key_idx, (void**)&zkeyval) == FAILURE) {
keyval_idx = -1;
} else {
switch (Z_TYPE_PP(zkeyval)) {
case IS_LONG:
keyval_idx = Z_LVAL_PP(zkeyval);
break;
case IS_STRING:
keyval = Z_STRVAL_PP(zkeyval);
break;
case IS_OBJECT:
{
MAKE_STD_ZVAL(strkey);
MAKE_COPY_ZVAL(zkeyval, strkey);
convert_to_string(strkey);
keyval = Z_STRVAL_P(strkey);
}
break;
default:
keyval_idx = -1;
}
}
}
if (keyval) {
add_assoc_zval(return_value, keyval, *zcolval);
if (strkey) {
zval_ptr_dtor(&strkey);
}
} else if (keyval_idx != -1) {
add_index_zval(return_value, keyval_idx, *zcolval);
} else {
add_next_index_zval(return_value, *zcolval);
}
/* Otherwise, skip if the value doesn't exist in our subarray */
} else if ((Z_TYPE_PP(zcolumn) == IS_STRING) &&
(zend_hash_find(ht, Z_STRVAL_PP(zcolumn), Z_STRLEN_PP(zcolumn) + 1, (void**)&zcolval) == FAILURE)) {
continue;
} else if ((Z_TYPE_PP(zcolumn) == IS_LONG) &&
(zend_hash_index_find(ht, Z_LVAL_PP(zcolumn), (void**)&zcolval) == FAILURE)) {
continue;
}
/* Failure will leave zkeyval alone which will land us on the final else block below
* which is to append the value as next_index
*/
if (zkey && (Z_TYPE_PP(zkey) == IS_STRING)) {
zend_hash_find(ht, Z_STRVAL_PP(zkey), Z_STRLEN_PP(zkey) + 1, (void**)&zkeyval);
} else if (zkey && (Z_TYPE_PP(zkey) == IS_LONG)) {
zend_hash_index_find(ht, Z_LVAL_PP(zkey), (void**)&zkeyval);
}
Z_ADDREF_PP(zcolval);
if (zkeyval && Z_TYPE_PP(zkeyval) == IS_STRING) {
add_assoc_zval(return_value, Z_STRVAL_PP(zkeyval), *zcolval);
} else if (zkeyval && Z_TYPE_PP(zkeyval) == IS_LONG) {
add_index_zval(return_value, Z_LVAL_PP(zkeyval), *zcolval);
} else if (zkeyval && Z_TYPE_PP(zkeyval) == IS_OBJECT) {
zval copyval;
ZVAL_ZVAL(&copyval, *zkeyval, 1, 0);
convert_to_string(&copyval);
add_assoc_zval(return_value, Z_STRVAL(copyval), *zcolval);
zval_dtor(&copyval);
} else {
add_next_index_zval(return_value, *zcolval);
}
}
}
/* }}} */
-4
View File
@@ -3680,10 +3680,8 @@ PHP_MINIT_FUNCTION(basic) /* {{{ */
php_register_url_stream_wrapper("glob", &php_glob_stream_wrapper TSRMLS_CC);
#endif
php_register_url_stream_wrapper("data", &php_stream_rfc2397_wrapper TSRMLS_CC);
#ifndef PHP_CURL_URL_WRAPPERS
php_register_url_stream_wrapper("http", &php_stream_http_wrapper TSRMLS_CC);
php_register_url_stream_wrapper("ftp", &php_stream_ftp_wrapper TSRMLS_CC);
#endif
#if defined(PHP_WIN32) || (HAVE_DNS_SEARCH_FUNC && !(defined(__BEOS__) || defined(NETWARE)))
# if defined(PHP_WIN32) || HAVE_FULL_DNS_FUNCS
@@ -3713,10 +3711,8 @@ PHP_MSHUTDOWN_FUNCTION(basic) /* {{{ */
#endif
php_unregister_url_stream_wrapper("php" TSRMLS_CC);
#ifndef PHP_CURL_URL_WRAPPERS
php_unregister_url_stream_wrapper("http" TSRMLS_CC);
php_unregister_url_stream_wrapper("ftp" TSRMLS_CC);
#endif
BASIC_MSHUTDOWN_SUBMODULE(browscap)
BASIC_MSHUTDOWN_SUBMODULE(array)
+1 -1
View File
@@ -524,7 +524,7 @@ static u_char *php_parserr(u_char *cp, querybuf *answer, int type_to_fetch, int
tp[dlen] = '\0';
cp += dlen;
add_assoc_stringl(*subarray, "txt", tp, dlen - 1, 0);
add_assoc_stringl(*subarray, "txt", tp, (dlen>0)?dlen - 1:0, 0);
add_assoc_zval(*subarray, "entries", entries);
}
break;
+1 -1
View File
@@ -51,7 +51,7 @@ PHP_FUNCTION(stream_socket_pair)
{
long domain, type, protocol;
php_stream *s1, *s2;
int pair[2];
php_socket_t pair[2];
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll",
&domain, &type, &protocol)) {
@@ -42,8 +42,7 @@ echo "-- last_name column from recordset, keyed by value from first_name column
var_dump(array_column($records, 'last_name', 'first_name'));
echo "\n*** Testing multiple data types ***\n";
$file = basename(__FILE__);
$fh = fopen($file, 'r', true);
$fh = fopen(__FILE__, 'r', true);
$values = array(
array(
'id' => 1,
@@ -85,15 +84,18 @@ echo "\n*** Testing numeric column keys ***\n";
$numericCols = array(
array('aaa', '111'),
array('bbb', '222'),
array('ccc', '333')
array('ccc', '333', -1 => 'ddd')
);
var_dump(array_column($numericCols, 1));
var_dump(array_column($numericCols, 1, 0));
var_dump(array_column($numericCols, 1, 0.123));
var_dump(array_column($numericCols, 1, -1));
echo "\n*** Testing failure to find specified column ***\n";
var_dump(array_column($numericCols, 2));
var_dump(array_column($numericCols, 'foo'));
var_dump(array_column($numericCols, 0, 'foo'));
var_dump(array_column($numericCols, 3.14));
echo "\n*** Testing single dimensional array ***\n";
$singleDimension = array('foo', 'bar', 'baz');
@@ -191,7 +193,7 @@ array(8) {
[6]=>
string(3) "Foo"
[7]=>
resource(5) of type (stream)
resource(%d) of type (stream)
}
array(8) {
[1]=>
@@ -210,7 +212,7 @@ array(8) {
[7]=>
string(3) "Foo"
[8]=>
resource(5) of type (stream)
resource(%d) of type (stream)
}
*** Testing numeric column keys ***
@@ -230,6 +232,22 @@ array(3) {
["ccc"]=>
string(3) "333"
}
array(3) {
["aaa"]=>
string(3) "111"
["bbb"]=>
string(3) "222"
["ccc"]=>
string(3) "333"
}
array(3) {
[0]=>
string(3) "111"
[1]=>
string(3) "222"
["ddd"]=>
string(3) "333"
}
*** Testing failure to find specified column ***
array(0) {
@@ -244,6 +262,8 @@ array(3) {
[2]=>
string(3) "ccc"
}
array(0) {
}
*** Testing single dimensional array ***
array(0) {
@@ -26,18 +26,12 @@ var_dump(array_column(1, 'foo'));
echo "\n-- Testing array_column() column key parameter should be a string or an integer (testing bool) --\n";
var_dump(array_column(array(), true));
echo "\n-- Testing array_column() column key parameter should be a string or integer (testing float) --\n";
var_dump(array_column(array(), 2.3));
echo "\n-- Testing array_column() column key parameter should be a string or integer (testing array) --\n";
var_dump(array_column(array(), array()));
echo "\n-- Testing array_column() index key parameter should be a string or an integer (testing bool) --\n";
var_dump(array_column(array(), 'foo', true));
echo "\n-- Testing array_column() index key parameter should be a string or integer (testing float) --\n";
var_dump(array_column(array(), 'foo', 2.3));
echo "\n-- Testing array_column() index key parameter should be a string or integer (testing array) --\n";
var_dump(array_column(array(), 'foo', array()));
@@ -71,11 +65,6 @@ NULL
Warning: array_column(): The column key should be either a string or an integer in %s on line %d
bool(false)
-- Testing array_column() column key parameter should be a string or integer (testing float) --
Warning: array_column(): The column key should be either a string or an integer in %s on line %d
bool(false)
-- Testing array_column() column key parameter should be a string or integer (testing array) --
Warning: array_column(): The column key should be either a string or an integer in %s on line %d
@@ -86,11 +75,6 @@ bool(false)
Warning: array_column(): The index key should be either a string or an integer in %s on line %d
bool(false)
-- Testing array_column() index key parameter should be a string or integer (testing float) --
Warning: array_column(): The index key should be either a string or an integer in %s on line %d
bool(false)
-- Testing array_column() index key parameter should be a string or integer (testing array) --
Warning: array_column(): The index key should be either a string or an integer in %s on line %d
@@ -0,0 +1,85 @@
--TEST--
Test array_column() function: variant functionality
--FILE--
<?php
/* Array from Bug Request #64493 test script */
$rows = array(
456 => array('id' => '3', 'title' => 'Foo', 'date' => '2013-03-25'),
457 => array('id' => '5', 'title' => 'Bar', 'date' => '2012-05-20'),
);
echo "-- pass null as second parameter to get back all columns indexed by third parameter --\n";
var_dump(array_column($rows, null, 'id'));
echo "-- pass null as second parameter and bogus third param to get back zero-indexed array of all columns --\n";
var_dump(array_column($rows, null, 'foo'));
echo "-- pass null as second parameter and no third param to get back array_values(input) --\n";
var_dump(array_column($rows, null));
echo "Done\n";
--EXPECTF--
-- pass null as second parameter to get back all columns indexed by third parameter --
array(2) {
[3]=>
array(3) {
["id"]=>
string(1) "3"
["title"]=>
string(3) "Foo"
["date"]=>
string(10) "2013-03-25"
}
[5]=>
array(3) {
["id"]=>
string(1) "5"
["title"]=>
string(3) "Bar"
["date"]=>
string(10) "2012-05-20"
}
}
-- pass null as second parameter and bogus third param to get back zero-indexed array of all columns --
array(2) {
[0]=>
array(3) {
["id"]=>
string(1) "3"
["title"]=>
string(3) "Foo"
["date"]=>
string(10) "2013-03-25"
}
[1]=>
array(3) {
["id"]=>
string(1) "5"
["title"]=>
string(3) "Bar"
["date"]=>
string(10) "2012-05-20"
}
}
-- pass null as second parameter and no third param to get back array_values(input) --
array(2) {
[0]=>
array(3) {
["id"]=>
string(1) "3"
["title"]=>
string(3) "Foo"
["date"]=>
string(10) "2013-03-25"
}
[1]=>
array(3) {
["id"]=>
string(1) "5"
["title"]=>
string(3) "Bar"
["date"]=>
string(10) "2012-05-20"
}
}
Done
+5
View File
@@ -8,6 +8,11 @@ if (!function_exists("glob")) {
?>
--FILE--
<?php
// run this test in ext/standard/tests (see bug #64714)
chdir(__DIR__); // ensure in ext/standard/tests/file
chdir('..'); // move up to ext/standard/tests
$globdirs = glob("*", GLOB_ONLYDIR);
$dirs = array();
-24
View File
@@ -1,24 +0,0 @@
--TEST--
Bug #52944 (segfault with zlib filter and corrupted data)
--SKIPIF--
<?php if (!extension_loaded("zlib")) print "skip"; ?>
<?php
if (substr(PHP_OS, 0, 3) != 'WIN') {
die("skip windows only");
}
--INI--
allow_url_fopen=1
--FILE--
<?php
require dirname(__FILE__) . "/bug_52944_corrupted_data.inc";
$fp = fopen('data://text/plain;base64,' . $data, 'r');
stream_filter_append($fp, 'zlib.inflate', STREAM_FILTER_READ);
var_dump(fread($fp,1));
var_dump(fread($fp,1));
fclose($fp);
echo "Done.\n";
--EXPECT--
string(1) "%"
string(1) "C"
Done.
+4 -3
View File
@@ -3,9 +3,6 @@ Bug #52944 (segfault with zlib filter and corrupted data)
--SKIPIF--
<?php if (!extension_loaded("zlib")) print "skip"; ?>
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
die("skip not for windows");
}
if (PHP_OS == 'Darwin') {
die("skip not for Darwin");
}
@@ -13,6 +10,10 @@ if (PHP_OS == 'Darwin') {
allow_url_fopen=1
--FILE--
<?php
/* NOTE this test can fail on asm builds of zlib 1.2.5 or
1.2.7 on at least Windows and Darwin. Using unoptimized
zlib build fixes the issue. */
require dirname(__FILE__) . "/bug_52944_corrupted_data.inc";
$fp = fopen('data://text/plain;base64,' . $data, 'r');
+2 -2
View File
@@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) {
?>
--FILE--
<?php
$f = "temp3.txt.gz";
$f = "gzseek_basic2.gz";
$h = gzopen($f, 'w');
$str1 = "This is the first line.";
$str2 = "This is the second line.";
@@ -39,4 +39,4 @@ reading the output file
This is the first line.
string(40) "0000000000000000000000000000000000000000"
This is the second line.
===DONE===
===DONE===
+2 -2
View File
@@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) {
?>
--FILE--
<?php
$f = "temp3.txt.gz";
$f = "gzseek_variation1.gz";
$h = gzopen($f, 'w');
$str1 = "This is the first line.";
$str2 = "This is the second line.";
@@ -30,4 +30,4 @@ unlink($f);
This is the first line.
string(40) "0000000000000000000000000000000000000000"
This is the second line.
===DONE===
===DONE===
+2 -2
View File
@@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) {
?>
--FILE--
<?php
$f = "temp3.txt.gz";
$f = "gzseek_variation5.gz";
$h = gzopen($f, 'w');
$str1 = "This is the first line.";
$str2 = "This is the second line.";
@@ -39,4 +39,4 @@ reading the output file
This is the first line.
string(40) "0000000000000000000000000000000000000000"
This is the second line.
===DONE===
===DONE===
+2 -2
View File
@@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) {
?>
--FILE--
<?php
$f = "temp3.txt.gz";
$f = "gzseek_variation5.gz";
$h = gzopen($f, 'w');
$str1 = "This is the first line.";
$str2 = "This is the second line.";
@@ -39,4 +39,4 @@ reading the output file
This is the first line.
string(40) "0000000000000000000000000000000000000000"
This is the second line.
===DONE===
===DONE===
+2 -2
View File
@@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) {
?>
--FILE--
<?php
$f = "temp3.txt.gz";
$f = "gzseek_variation7.gz";
$h = gzopen($f, 'w');
$str1 = "This is the first line.";
$str2 = "This is the second line.";
@@ -44,4 +44,4 @@ tell=int(47)
reading the output file
This is the first line.This is the second line.
===DONE===
===DONE===
+13
View File
@@ -0,0 +1,13 @@
--TEST--
Req #60524 (Specify temporary directory)
--INI--
sys_temp_dir=C:\Windows
--SKIPIF--
<?php
if( substr(PHP_OS, 0, 3) != "WIN" )
die('skip Run only on Windows');
?>
--FILE--
<?php echo sys_get_temp_dir(); ?>
--EXPECT--
C:\\Windows
+6
View File
@@ -2,6 +2,12 @@
Req #60524 (Specify temporary directory)
--INI--
sys_temp_dir=/path/to/temp/dir
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip non-windows only test');
}
?>
--FILE--
<?php echo sys_get_temp_dir(); ?>
--EXPECT--
+39 -18
View File
@@ -39,33 +39,54 @@ PHPAPI int socketpair(int domain, int type, int protocol, SOCKET sock[2])
return -1;
}
sock[0] = sock[1] = redirect = INVALID_SOCKET;
sock[0] = socket(domain, type, protocol);
address.sin_addr.s_addr = INADDR_ANY;
address.sin_family = AF_INET;
address.sin_port = 0;
bind(sock[0], (struct sockaddr*)&address, sizeof(address));
if(getsockname(sock[0], (struct sockaddr *)&address, &size) != 0) {
sock[0] = socket(domain, type, protocol);
if (INVALID_SOCKET == sock[0]) {
goto error;
}
listen(sock[0], 2);
sock[1] = socket(domain, type, protocol);
address.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
address.sin_addr.s_addr = INADDR_ANY;
address.sin_family = AF_INET;
address.sin_port = 0;
if (bind(sock[0], (struct sockaddr*)&address, sizeof(address)) != 0) {
goto error;
}
if(getsockname(sock[0], (struct sockaddr *)&address, &size) != 0) {
goto error;
}
if (listen(sock[0], 2) != 0) {
goto error;
}
sock[1] = socket(domain, type, protocol);
if (INVALID_SOCKET == sock[1]) {
goto error;
}
address.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
if(connect(sock[1], (struct sockaddr*)&address, sizeof(address)) != 0) {
goto error;
}
connect(sock[1], (struct sockaddr*)&address, sizeof(address));
redirect = accept(sock[0],(struct sockaddr*)&address, &size);
if (INVALID_SOCKET == redirect) {
goto error;
}
closesocket(sock[0]);
sock[0] = redirect;
if(sock[0] == INVALID_SOCKET ) {
closesocket(sock[0]);
closesocket(sock[1]);
WSASetLastError(WSAECONNABORTED);
return -1;
}
return 0;
error:
closesocket(redirect);
closesocket(sock[0]);
closesocket(sock[1]);
WSASetLastError(WSAECONNABORTED);
return -1;
}