Commit 04b664c4 authored by Thijs Kinkhorst's avatar Thijs Kinkhorst

Imported Upstream version 5.6.1+dfsg

parent d73ee84c
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
02 Oct 2014, PHP 5.6.1
- Core:
. Implemented FR #38409 (parse_ini_file() looses the type of booleans). (Tjerk)
. Fixed bug #65463 (SIGSEGV during zend_shutdown()). (Keyur Govande)
. Fixed bug #66036 (Crash on SIGTERM in apache process). (Keyur Govande)
. Fixed bug #67878 (program_prefix not honoured in man pages). (Remi)
. Fixed bug #67938 (Segfault when extending interface method with variadic).
(Nikita)
. Fixed bug #67985 (Incorrect last used array index copied to new array after
unset). (Tjerk)
. Fixed bug #68088 (New Posthandler Potential Illegal efree() vulnerability).
(Mike) (CVE-2014-3622)
- DOM:
. Made DOMNode::textContent writeable. (Tjerk)
- Fileinfo:
. Fixed bug #67731 (finfo::file() returns invalid mime type
for binary files). (Anatol)
- GD:
. Made fontFetch's path parser thread-safe. (Sara)
- GMP:
. Fixed bug #67917 (Using GMP objects with overloaded operators can cause
memory exhaustion). (Nikita)
. Fixed bug #50175 (gmp_init() results 0 on given base and number starting
with 0x or 0b). (Nikita)
. Implemented gmp_import() and gmp_export(). (Leigh, Nikita)
- MySQLi:
. Fixed bug #67839 (mysqli does not handle 4-byte floats correctly). (Keyur)
- OpenSSL:
. Fixed bug #67850 (extension won't build if openssl compiled without SSLv3).
(Daniel Lowrey)
- phpdbg:
. Fixed issue krakjoe/phpdbg#111 (compile error without ZEND_SIGNALS). (Bob)
- SOAP:
. Fixed bug #67955 (SoapClient prepends 0-byte to cookie names). (Philip Hofstetter)
- Session:
. Fixed bug #67972 (SessionHandler Invalid memory read create_sid()). (Adam)
- Sysvsem:
. Implemented FR #67990 (Add optional nowait argument to sem_acquire).
(Matteo)
28 Aug 2014, PHP 5.6.0
- Apache2 Handler SAPI:
......@@ -25,6 +77,7 @@ PHP NEWS
. Fixed bug #66431 (Special Character via COM Interface (CP_UTF8)). (Anatol)
- Core:
. Improved phpinfo() stylesheets. (Colin Viebrock)
. Fixed bug #67693 (incorrect push to the empty array). (Tjerk)
. Removed inconsistency regarding behaviour of array in constants at
run-time. (Bob)
......@@ -133,6 +186,8 @@ PHP NEWS
(Freek Lijten)
- Date:
. Fixed bug #66060 (Heap buffer over-read in DateInterval). (CVE-2013-6712)
(Remi)
. Fixed bug #66091 (memory leaks in DateTime constructor) (Tjerk).
. Fixed bug #67308 (Serialize of DateTime truncates fractions of second).
(Adam)
......@@ -158,24 +213,26 @@ PHP NEWS
. Fixed bug #67705 (extensive backtracking in rule regular expression).
(CVE-2014-3538) (Remi)
. Fixed bug #67327 (fileinfo: CDF infinite loop in nelements DoS).
(CVE-2014-0238)
. Fixed bug #67328 (fileinfo: fileinfo: numerous file_printf calls resulting in
performance degradation).
performance degradation). (CVE-2014-0237)
. Fixed bug #67326 (fileinfo: cdf_read_short_sector insufficient boundary check).
(CVE-2014-0207)
. Fixed bug #67329 (fileinfo: NULL pointer deference flaw by processing certain
CDF files).
CDF files). (CVE-2014-0236)
. Fixed bug #67410 (fileinfo: mconvert incorrect handling of truncated pascal
string size). (Francisco Alonso, Jan Kaluza, Remi)
string size). (CVE-2014-3478) (Francisco Alonso, Jan Kaluza, Remi)
. Fixed bug #67411 (fileinfo: cdf_check_stream_offset insufficient boundary
check). (Francisco Alonso, Jan Kaluza, Remi)
check). (CVE-2014-3479) (Francisco Alonso, Jan Kaluza, Remi)
. Fixed bug #67412 (fileinfo: cdf_count_chain insufficient boundary check).
(Francisco Alonso, Jan Kaluza, Remi)
(CVE-2014-3480) (Francisco Alonso, Jan Kaluza, Remi)
. Fixed bug #67413 (fileinfo: cdf_read_property_info insufficient boundary
check). (Francisco Alonso, Jan Kaluza, Remi)
check). (CVE-2014-3487) (Francisco Alonso, Jan Kaluza, Remi)
. Upgraded to libmagic-5.17 (Anatol)
. Fixed bug #66731 (file: infinite recursion). (CVE-2014-1943) (Remi)
. Fixed bug #66820 (out-of-bounds memory access in fileinfo)
. Fixed bug #66820 (out-of-bounds memory access in fileinfo).
(CVE-2014-2270). (Remi)
. Fixed bug #66946i (fileinfo: extensive backtracking in awk rule regular
. Fixed bug #66946 (fileinfo: extensive backtracking in awk rule regular
expression). (CVE-2013-7345) (Remi)
. Fixed bug #66987 (Memory corruption in fileinfo ext / bigendian).
(Remi)
......@@ -184,12 +241,12 @@ PHP NEWS
. Fixed bug #66307 (Fileinfo crashes with powerpoint files). (Anatol)
- FPM:
. Fix bug #67606 (revised fix 67541, broke mod_fastcgi BC). (David Zuelke)
. Fixed bug #67606 (revised fix 67541, broke mod_fastcgi BC). (David Zuelke)
. Fixed bug #67530 (error_log=syslog ignored). (Remi)
. Fixed bug #67635 (php links to systemd libraries without using pkg-config).
(pacho@gentoo.org, Remi)
. Fix bug #67531 (syslog cannot be set in pool configuration). (Remi)
. Fix bug #67541 (Fix Apache 2.4.10+ SetHandler proxy:fcgi://
. Fixed bug #67531 (syslog cannot be set in pool configuration). (Remi)
. Fixed bug #67541 (Fix Apache 2.4.10+ SetHandler proxy:fcgi://
incompatibilities). (David Zuelke)
. Included apparmor support in fpm
(RFC: https://wiki.php.net/rfc/fpm_change_hat). (Gernot Vormayr)
......@@ -209,10 +266,11 @@ PHP NEWS
. Fixed bug #67248 (imageaffinematrixget missing check of parameters). (Stas)
. Fixed imagettftext to load the correct character map rather than the last one.
(Scott)
. Fixed bug #66714 ( imageconvolution breakage). (Brad Daily)
. Fixed bug #66815 (imagecrop(): insufficient fix for NULL defer
CVE-2013-7327). (Tomas Hoger, Remi).
. Fixed #66869 (Invalid 2nd argument crashes imageaffinematrixget) (Pierre)
. Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop()).
(CVE-2013-7226)
. Fixed bug #66815 (imagecrop(): insufficient fix for NULL defer).
(CVE-2013-7327). (Tomas Hoger, Remi).
. Fixed bug #66869 (Invalid 2nd argument crashes imageaffinematrixget) (Pierre)
. Fixed bug #66887 (imagescale - poor quality of scaled image). (Remi)
. Fixed bug #66890 (imagescale segfault). (Remi)
. Fixed bug #66893 (imagescale ignore method argument). (Remi)
......@@ -305,6 +363,8 @@ PHP NEWS
fields). (Keyur Govande)
- OpenSSL:
. Fixed bug #41631 (socket timeouts not honored in blocking SSL reads)
(Daniel Lowrey).
. Fixed missing type checks in OpenSSL options (Yussuf Khalil, Stas).
. Fixed bug #67609 (TLS connections fail behind HTTP proxy). (Daniel Lowrey)
. Fixed broken build against OpenSSL older than 0.9.8 where ECDH unavailable.
......@@ -385,9 +445,9 @@ PHP NEWS
. Encrypted TLS servers now support the server name indication TLS extension
via the new "SNI_server_certs" SSL context option. (Daniel Lowrey)
. Fixed bug #66833 (Default disgest algo is still MD5, switch to SHA1). (Remi)
. Fix bug #66942 (memory leak in openssl_seal()). (Chuan Ma)
. Fix bug #66952 (memory leak in openssl_open()). (Chuan Ma)
. Fix bug #66840 (Fix broken build when extension built separately).
. Fixed bug #66942 (memory leak in openssl_seal()). (Chuan Ma)
. Fixed bug #66952 (memory leak in openssl_open()). (Chuan Ma)
. Fixed bug #66840 (Fix broken build when extension built separately).
(Daniel Lowrey)
- OPcache:
......@@ -410,7 +470,7 @@ PHP NEWS
. Added support for (*MARK) backtracking verbs. (Nikita)
- pgsql:
. Fix bug #67550 (Error in code "form" instead of "from", pgsql.c, line 756),
. Fixed bug #67550 (Error in code "form" instead of "from", pgsql.c, line 756),
which affected builds against libpq < 7.3. (Adam)
. pg_insert()/pg_select()/pg_update()/pg_delete() are no longer EXPERIMENTAL.
(Yasuo)
......@@ -438,7 +498,7 @@ PHP NEWS
- phpdbg
. Fixed bug #67575 (Compilation fails for phpdbg when the
build directory != src directory). (Andy Thompson)
. Fix Bug #67499 (readline feature not enabled when build with libedit). (Remi)
. Fixed Bug #67499 (readline feature not enabled when build with libedit). (Remi)
. Fix issue krakjoe/phpdbg#94 (List behavior is inconsistent). (Bob)
. Fix issue krakjoe/phpdbg#97 (The prompt should always ensure it is on a
newline). (Bob)
......@@ -482,7 +542,7 @@ PHP NEWS
. Fixed Bug #66071 (memory corruption in error handling) (Popa)
- Phar:
. Fix bug #64498 ($phar->buildFromDirectory can't compress file with an accent
. Fixed bug #64498 ($phar->buildFromDirectory can't compress file with an accent
in its name). (PR #588)
. Fixed bug #67587 (Redirection loop on nginx with FPM). (Christian Weiske)
......
......@@ -54,9 +54,7 @@ Currently we have the following branches in use::
PHP-5.4 Is used to release the PHP 5.4.x series. This is a current
stable version and is open for bugfixes only.
PHP-5.3 Is used to release the PHP 5.3.x series. This is currently
in extended support and open forsecurity fixes only. Triaged
via security@php.net
PHP-5.3 This branch is closed.
PHP-5.2 This branch is closed.
......@@ -69,7 +67,7 @@ Currently we have the following branches in use::
The next few rules are more of a technical nature::
1. All changes should first go to the lowest branch (i.e. 5.3) and then
1. All changes should first go to the lowest branch (i.e. 5.4) and then
get merged up to all other branches. If a change is not needed for
later branches (i.e. fixes for features which where dropped from later
branches) an empty merge should be done.
......
......@@ -256,12 +256,19 @@ PHP 5.6 UPGRADE NOTES
Manipulated serialization strings for objects implementing Serializable by
replacing "C:" with "O:" at the start will now produce an error.
- parse_ini_file():
- parse_ini_string():
Added scanner mode INI_SCANNER_TYPED to yield typed .ini values.
For PHP >= 5.6.1
========================================
6. New Functions
========================================
- GMP:
Added gmp_root($a, $nth) and gmp_rootrem($a, $nth) for calculating nth roots.
Added gmp_import($data, $word_size = 1, $options = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN) in PHP 5.6.1.
Added gmp_export($gmpnumber, $word_size = 1, $options = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN) in PHP 5.6.1.
- Hash
Added hash_equals($known_string, $user_string)
......@@ -369,6 +376,9 @@ PHP 5.6 UPGRADE NOTES
- Added LISTEN/NOTIFY support via PDO::pgsqlGetNotify / PDO::pgsqlGetPid()
as described in https://bugs.php.net/bug.php?id=42614.
- DOM:
- DOMNode::textContent is now a writeable property. (>= 5.6.1)
========================================
10. New Global Constants
========================================
......
--TEST--
Bug #67938: Segfault when extending interface method with variadic
--FILE--
<?php
interface TestInterface {
public function foo();
public function bar(array $bar);
}
class Test implements TestInterface {
public function foo(...$args) {
echo __METHOD__, "\n";
}
public function bar(array $bar, ...$args) {
echo __METHOD__, "\n";
}
}
$obj = new Test;
$obj->foo();
$obj->bar([]);
?>
--EXPECT--
Test::foo
Test::bar
--TEST--
Bug #67985 - Last used array index not copied to new array at assignment
--FILE--
<?php
$a = ['zero', 'one', 'two'];
unset($a[2]);
$b = $a;
$a[] = 'three';
$b[] = 'three';
var_dump($a === $b);
?>
--EXPECT--
bool(true)
......@@ -822,6 +822,20 @@ void zend_shutdown(TSRMLS_D) /* {{{ */
zend_shutdown_timeout_thread();
#endif
zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC);
if (EG(active))
{
/*
* The order of destruction is important here.
* See bugs #65463 and 66036.
*/
zend_hash_reverse_apply(GLOBAL_FUNCTION_TABLE, (apply_func_t) zend_cleanup_function_data_full TSRMLS_CC);
zend_hash_reverse_apply(GLOBAL_CLASS_TABLE, (apply_func_t) zend_cleanup_user_class_data TSRMLS_CC);
zend_cleanup_internal_classes(TSRMLS_C);
zend_hash_reverse_apply(GLOBAL_FUNCTION_TABLE, (apply_func_t) clean_non_persistent_function_full TSRMLS_CC);
zend_hash_reverse_apply(GLOBAL_CLASS_TABLE, (apply_func_t) clean_non_persistent_class_full TSRMLS_CC);
}
zend_destroy_modules();
virtual_cwd_deactivate(TSRMLS_C);
......
......@@ -3258,7 +3258,7 @@ static zend_bool zend_do_perform_implementation_check(const zend_function *fe, c
* go through all the parameters of the function and not just those present in the
* prototype. */
num_args = proto->common.num_args;
if ((fe->common.fn_flags & ZEND_ACC_VARIADIC)
if ((proto->common.fn_flags & ZEND_ACC_VARIADIC)
&& fe->common.num_args > proto->common.num_args) {
num_args = fe->common.num_args;
}
......
......@@ -686,6 +686,8 @@ ZEND_API void zend_cleanup_internal_class_data(zend_class_entry *ce TSRMLS_DC);
ZEND_API void zend_cleanup_internal_classes(TSRMLS_D);
ZEND_API int zend_cleanup_function_data(zend_function *function TSRMLS_DC);
ZEND_API int zend_cleanup_function_data_full(zend_function *function TSRMLS_DC);
ZEND_API int clean_non_persistent_function_full(zend_function *function TSRMLS_DC);
ZEND_API int clean_non_persistent_class_full(zend_class_entry **ce TSRMLS_DC);
ZEND_API void destroy_zend_function(zend_function *function TSRMLS_DC);
ZEND_API void zend_function_dtor(zend_function *function);
......
......@@ -109,7 +109,7 @@ static int clean_non_persistent_function(zend_function *function TSRMLS_DC) /* {
}
/* }}} */
static int clean_non_persistent_function_full(zend_function *function TSRMLS_DC) /* {{{ */
ZEND_API int clean_non_persistent_function_full(zend_function *function TSRMLS_DC) /* {{{ */
{
return (function->type == ZEND_INTERNAL_FUNCTION) ? ZEND_HASH_APPLY_KEEP : ZEND_HASH_APPLY_REMOVE;
}
......@@ -121,7 +121,7 @@ static int clean_non_persistent_class(zend_class_entry **ce TSRMLS_DC) /* {{{ */
}
/* }}} */
static int clean_non_persistent_class_full(zend_class_entry **ce TSRMLS_DC) /* {{{ */
ZEND_API int clean_non_persistent_class_full(zend_class_entry **ce TSRMLS_DC) /* {{{ */
{
return ((*ce)->type == ZEND_INTERNAL_CLASS) ? ZEND_HASH_APPLY_KEEP : ZEND_HASH_APPLY_REMOVE;
}
......
......@@ -283,7 +283,7 @@ struct _zend_ini_scanner_globals {
char *filename;
int lineno;
/* Modes are: ZEND_INI_SCANNER_NORMAL, ZEND_INI_SCANNER_RAW */
/* Modes are: ZEND_INI_SCANNER_NORMAL, ZEND_INI_SCANNER_RAW, ZEND_INI_SCANNER_TYPED */
int scanner_mode;
};
......
This diff is collapsed.
......@@ -52,7 +52,8 @@
TC_QUOTED_STRING = 268,
BOOL_TRUE = 269,
BOOL_FALSE = 270,
END_OF_LINE = 271
NULL_NULL = 271,
END_OF_LINE = 272
};
#endif
/* Tokens. */
......@@ -69,7 +70,8 @@
#define TC_QUOTED_STRING 268
#define BOOL_TRUE 269
#define BOOL_FALSE 270
#define END_OF_LINE 271
#define NULL_NULL 271
#define END_OF_LINE 272
......
This diff is collapsed.
......@@ -265,6 +265,7 @@ ZEND_API int zend_parse_ini_string(char *str, zend_bool unbuffered_errors, int s
%token TC_QUOTED_STRING
%token BOOL_TRUE
%token BOOL_FALSE
%token NULL_NULL
%token END_OF_LINE
%token '=' ':' ',' '.' '"' '\'' '^' '+' '-' '/' '*' '%' '$' '~' '<' '>' '?' '@' '{' '}'
%left '|' '&' '^'
......@@ -291,7 +292,7 @@ statement:
#endif
ZEND_INI_PARSER_CB(&$1, &$3, NULL, ZEND_INI_PARSER_ENTRY, ZEND_INI_PARSER_ARG TSRMLS_CC);
free(Z_STRVAL($1));
free(Z_STRVAL($3));
zval_internal_dtor(&$3);
}
| TC_OFFSET option_offset ']' '=' string_or_value {
#if DEBUG_CFG_PARSER
......@@ -300,7 +301,7 @@ statement:
ZEND_INI_PARSER_CB(&$1, &$5, &$2, ZEND_INI_PARSER_POP_ENTRY, ZEND_INI_PARSER_ARG TSRMLS_CC);
free(Z_STRVAL($1));
free(Z_STRVAL($2));
free(Z_STRVAL($5));
zval_internal_dtor(&$5);
}
| TC_LABEL { ZEND_INI_PARSER_CB(&$1, NULL, NULL, ZEND_INI_PARSER_ENTRY, ZEND_INI_PARSER_ARG TSRMLS_CC); free(Z_STRVAL($1)); }
| END_OF_LINE
......@@ -315,6 +316,7 @@ string_or_value:
expr { $$ = $1; }
| BOOL_TRUE { $$ = $1; }
| BOOL_FALSE { $$ = $1; }
| NULL_NULL { $$ = $1; }
| END_OF_LINE { zend_ini_init_string(&$$); }
;
......
This diff is collapsed.
......@@ -25,6 +25,7 @@
/* Scanner modes */
#define ZEND_INI_SCANNER_NORMAL 0 /* Normal mode. [DEFAULT] */
#define ZEND_INI_SCANNER_RAW 1 /* Raw mode. Option values are not parsed */
#define ZEND_INI_SCANNER_TYPED 2 /* Typed mode. */
BEGIN_EXTERN_C()
int zend_ini_scanner_get_lineno(TSRMLS_D);
......
......@@ -24,6 +24,7 @@
#include <errno.h>
#include "zend.h"
#include "zend_API.h"
#include "zend_globals.h"
#include <zend_ini_parser.h>
#include "zend_ini_scanner.h"
......@@ -137,9 +138,55 @@ ZEND_API zend_ini_scanner_globals ini_scanner_globals;
Z_TYPE_P(retval) = IS_STRING; \
}
#define RETURN_TOKEN(type, str, len) { \
zend_ini_copy_value(ini_lval, str, len); \
return type; \
#define RETURN_TOKEN(type, str, len) { \
if (SCNG(scanner_mode) == ZEND_INI_SCANNER_TYPED) { \
zend_ini_copy_typed_value(ini_lval, type, str, len); \
} else { \
zend_ini_copy_value(ini_lval, str, len); \
} \
return type; \
}
static inline int convert_to_number(zval *retval, const char *str, const int str_len)
{
zend_uchar type;
int overflow;
long lval;
double dval;
if ((type = is_numeric_string_ex(str, str_len, &lval, &dval, 0, &overflow)) != 0) {
if (type == IS_LONG) {
ZVAL_LONG(retval, lval);
return SUCCESS;
} else if (type == IS_DOUBLE && !overflow) {
ZVAL_DOUBLE(retval, dval);
return SUCCESS;
}
}
return FAILURE;
}
static void zend_ini_copy_typed_value(zval *retval, const int type, const char *str, int len)
{
switch (type) {
case BOOL_FALSE:
case BOOL_TRUE:
ZVAL_BOOL(retval, type == BOOL_TRUE);
break;
case NULL_NULL:
ZVAL_NULL(retval);
break;
case TC_NUMBER:
if (convert_to_number(retval, str, len) == SUCCESS) {
break;
}
/* intentional fall-through */
default:
zend_ini_copy_value(retval, str, len);
}
}
static void _yy_push_state(int new_state TSRMLS_DC)
......@@ -172,7 +219,7 @@ static void yy_scan_buffer(char *str, unsigned int len TSRMLS_DC)
static int init_ini_scanner(int scanner_mode, zend_file_handle *fh TSRMLS_DC)
{
/* Sanity check */
if (scanner_mode != ZEND_INI_SCANNER_NORMAL && scanner_mode != ZEND_INI_SCANNER_RAW) {
if (scanner_mode != ZEND_INI_SCANNER_NORMAL && scanner_mode != ZEND_INI_SCANNER_RAW && scanner_mode != ZEND_INI_SCANNER_TYPED) {
zend_error(E_WARNING, "Invalid scanner mode");
return FAILURE;
}
......@@ -422,10 +469,14 @@ SECTION_VALUE_CHARS ([^$\n\r;"'\]\\]|("\\"{ANY_CHAR})|{LITERAL_DOLLAR})
RETURN_TOKEN(BOOL_TRUE, "1", 1);
}
<INITIAL,ST_VALUE>("false"|"off"|"no"|"none"|"null"){TABS_AND_SPACES}* { /* FALSE value (when used outside option value/offset this causes parse error!)*/
<INITIAL,ST_VALUE>("false"|"off"|"no"|"none"){TABS_AND_SPACES}* { /* FALSE value (when used outside option value/offset this causes parse error!)*/
RETURN_TOKEN(BOOL_FALSE, "", 0);
}
<INITIAL,ST_VALUE>("null"){TABS_AND_SPACES}* {
RETURN_TOKEN(NULL_NULL, "", 0);
}
<INITIAL>{LABEL} { /* Get option name */
/* Eat leading whitespace */
EAT_LEADING_WHITESPACE();
......
......@@ -138,6 +138,7 @@ ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC)
ALLOC_HASHTABLE_REL(tmp_ht);
zend_hash_init(tmp_ht, zend_hash_num_elements(original_ht), NULL, ZVAL_PTR_DTOR, 0);
zend_hash_copy(tmp_ht, original_ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
tmp_ht->nNextFreeElement = original_ht->nNextFreeElement;
zvalue->value.ht = tmp_ht;
}
break;
......
......@@ -2800,7 +2800,7 @@ AC_DEFUN([PHP_DETECT_ICC],
dnl PHP_DETECT_SUNCC
dnl Detect if the systems default compiler is suncc.
dnl We also set some usefull CFLAGS if the user didn't set any
dnl We also set some useful CFLAGS if the user didn't set any
AC_DEFUN([PHP_DETECT_SUNCC],[
SUNCC="no"
AC_MSG_CHECKING([for suncc])
......
......@@ -2800,7 +2800,7 @@ AC_DEFUN([PHP_DETECT_ICC],
dnl PHP_DETECT_SUNCC
dnl Detect if the systems default compiler is suncc.
dnl We also set some usefull CFLAGS if the user didn't set any
dnl We also set some useful CFLAGS if the user didn't set any
AC_DEFUN([PHP_DETECT_SUNCC],[
SUNCC="no"
AC_MSG_CHECKING([for suncc])
......@@ -3648,7 +3648,7 @@ ia64-*-hpux*)
rm -rf conftest*
;;
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
......@@ -3662,7 +3662,10 @@ s390*-*linux*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_i386"
;;
ppc64-*linux*|powerpc64-*linux*)
powerpc64le-*linux*)
LD="${LD-ld} -m elf32lppclinux"
;;
powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
......@@ -3681,7 +3684,10 @@ s390*-*linux*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
ppc*-*linux*|powerpc*-*linux*)
powerpcle-*linux*)
LD="${LD-ld} -m elf64lppc"
;;
powerpc-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*)
......
......@@ -615,7 +615,7 @@ ia64-*-hpux*)
rm -rf conftest*
;;
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
......@@ -629,7 +629,10 @@ s390*-*linux*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_i386"
;;
ppc64-*linux*|powerpc64-*linux*)
powerpc64le-*linux*)
LD="${LD-ld} -m elf32lppclinux"
;;
powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
......@@ -648,7 +651,10 @@ s390*-*linux*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
ppc*-*linux*|powerpc*-*linux*)
powerpcle-*linux*)
LD="${LD-ld} -m elf64lppc"
;;
powerpc-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*)
......
......@@ -982,6 +982,12 @@ EOF
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
exit ;;
ppc64le:Linux:*:*)
echo powerpc64le-unknown-linux-gnu
exit ;;
ppcle:Linux:*:*)
echo powerpcle-unknown-linux-gnu
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
exit ;;
......
This diff is collapsed.
......@@ -119,7 +119,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=6
PHP_RELEASE_VERSION=0
PHP_RELEASE_VERSION=1
PHP_EXTRA_VERSION=""
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
......@@ -787,7 +787,12 @@ if test "$PHP_GCOV" = "yes"; then
AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
fi
ltp_version_list="1.5 1.6 1.7 1.9 1.10"
dnl min: 1.5 (i.e. 105, major * 100 + minor for easier comparison)
ltp_version_min="105"
dnl non-working versions, e.g. "1.8 1.18";
dnl remove "none" when introducing the first incompatible LTP version an
dnl separate any following additions by spaces
ltp_version_exclude="1.8"
AC_CHECK_PROG(LTP, lcov, lcov)
AC_CHECK_PROG(LTP_GENHTML, genhtml, genhtml)
......@@ -797,21 +802,30 @@ if test "$PHP_GCOV" = "yes"; then
if test "$LTP"; then
AC_CACHE_CHECK([for ltp version], php_cv_ltp_version, [
php_cv_ltp_version=invalid
ltp_version=`$LTP -v 2>/dev/null | $SED -e 's/^.* //'`
for ltp_check_version in $ltp_version_list; do
if test "$ltp_version" = "$ltp_check_version"; then
php_cv_ltp_version="$ltp_check_version (ok)"
ltp_version_vars=`$LTP -v 2>/dev/null | $SED -e 's/^.* //' -e 's/\./ /g' | tr -d a-z`
if test -n "$ltp_version_vars"; then
set $ltp_version_vars
ltp_version="${1}.${2}"
ltp_version_num="`expr ${1} \* 100 + ${2}`"
if test $ltp_version_num -ge $ltp_version_min; then
php_cv_ltp_version="$ltp_version (ok)"
for ltp_check_version in $ltp_version_exclude; do
if test "$ltp_version" = "$ltp_check_version"; then
php_cv_ltp_version=invalid
break
fi
done
fi
done
fi
])
else
ltp_msg="To enable code coverage reporting you must have one of the following LTP versions installed: $ltp_version_list"
ltp_msg="To enable code coverage reporting you must have LTP installed"
AC_MSG_ERROR([$ltp_msg])
fi
case $php_cv_ltp_version in
""|invalid[)]
ltp_msg="You must have one of the following versions of LTP: $ltp_version_list (found: $ltp_version)."
ltp_msg="This LTP version is not supported (found: $ltp_version, min: $ltp_version_min, excluded: $ltp_version_exclude)."
AC_MSG_ERROR([$ltp_msg])
LTP="exit 0;"
;;
......
/* Generated by re2c 0.13.5 on Thu Jul 31 14:33:37 2014 */
/* Generated by re2c 0.13.5 on Mon Aug 18 18:28:27 2014 */
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
......@@ -669,7 +669,7 @@ static void timelib_set_relative(char **ptr, timelib_sll amount, int behavior, S
}
}
const static timelib_tz_lookup_table* zone_search(const char *word, long gmtoffset, int isdst)
const static timelib_tz_lookup_table* abbr_search(const char *word, long gmtoffset, int isdst)
{
int first_found = 0;
const timelib_tz_lookup_table *tp, *first_found_elem = NULL;
......@@ -697,25 +697,6 @@ const static timelib_tz_lookup_table* zone_search(const char *word, long gmtoffs
return first_found_elem;
}
for (tp = timelib_timezone_lookup; tp->name; tp++) {
if (tp->full_tz_name && strcasecmp(word, tp->full_tz_name) == 0) {
if (!first_found) {
first_found = 1;
first_found_elem = tp;
if (gmtoffset == -1) {
return tp;
}
}
if (tp->gmtoffset == gmtoffset) {
return tp;
}
}
}
if (first_found) {
return first_found_elem;
}
/* Still didn't find anything, let's find the zone solely based on
* offset/isdst then */
for (fmp = timelib_timezone_fallbackmap; fmp->name; fmp++) {
......@@ -726,7 +707,7 @@ const static timelib_tz_lookup_table* zone_search(const char *word, long gmtoffs
return NULL;
}
static long timelib_lookup_zone(char **ptr, int *dst, char **tz_abbr, int *found)
static long timelib_lookup_abbr(char **ptr, int *dst, char **tz_abbr, int *found)
{
char *word;
char *begin = *ptr, *end;
......@@ -740,7 +721,7 @@ static long timelib_lookup_zone(char **ptr, int *dst, char **tz_abbr, int *found
word = calloc(1, end - begin + 1);
memcpy(word, begin, end - begin);
if ((tp = zone_search(word, -1, 0))) {
if ((tp = abbr_search(word, -1, 0))) {
value = -tp->gmtoffset / 60;