Skip to content

Commit 0eb414e

Browse files
committed
Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
# By Dmitry Stogov (2) and others # Via Lior Kaplan (2) and others * 'PHP-5.5' of https://git.php.net/repository/php-src: Add information about which INI file is which inside respective files Removed references to "Zend Support" Added support for GNU Hurd. (Svante Signell) - Updated to version 2013.6 (2013f) FIX BUG #48539 - Disable TEXTLIMIT for FreeTDS driver
2 parents 9a655fc + e98fc7d commit 0eb414e

File tree

9 files changed

+864
-839
lines changed

9 files changed

+864
-839
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ PHP NEWS
2626
imap). (ryotakatsuki at gmail dot com)
2727

2828
- OPcache:
29+
. Added support for GNU Hurd. (Svante Signell)
2930
. Added function opcache_compile_file() to load PHP scripts into cache
3031
without execution. (Julien)
3132
. Fixed bug #65665 (Exception not properly caught when opcache enabled).

ext/date/lib/timezonedb.h

Lines changed: 784 additions & 794 deletions
Large diffs are not rendered by default.

ext/opcache/ZendAccelerator.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@
8080
# endif
8181
# include <direct.h>
8282
#else
83+
# ifndef MAXPATHLEN
84+
# define MAXPATHLEN 4096
85+
# endif
8386
# include <sys/param.h>
8487
#endif
8588

@@ -100,7 +103,7 @@ extern int lock_file;
100103
# elif defined(__svr4__)
101104
# define FLOCK_STRUCTURE(name, type, whence, start, len) \
102105
struct flock name = {type, whence, start, len}
103-
# elif defined(__linux__) || defined(__hpux)
106+
# elif defined(__linux__) || defined(__hpux) || defined(__GNU__)
104107
# define FLOCK_STRUCTURE(name, type, whence, start, len) \
105108
struct flock name = {type, whence, start, len, 0}
106109
# elif defined(_AIX)
@@ -111,6 +114,12 @@ extern int lock_file;
111114
# define FLOCK_STRUCTURE(name, type, whence, start, len) \
112115
struct flock name = {type, whence, start, len}
113116
# endif
117+
# elif defined(HAVE_FLOCK_BSD)
118+
# define FLOCK_STRUCTURE(name, type, whence, start, len) \
119+
struct flock name = {start, len, -1, type, whence}
120+
# elif defined(HAVE_FLOCK_LINUX)
121+
# define FLOCK_STRUCTURE(name, type, whence, start, len) \
122+
struct flock name = {type, whence, start, len}
114123
# else
115124
# error "Don't know how to define struct flock"
116125
# endif

ext/opcache/config.m4

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -326,40 +326,42 @@ int main() {
326326
msg=yes,msg=no,msg=no)
327327
AC_MSG_RESULT([$msg])
328328

329-
AC_MSG_CHECKING(for known struct flock definition)
330-
dnl Copied from ZendAccelerator.h
331-
AC_TRY_RUN([
332-
#include <fcntl.h>
333-
#include <stdlib.h>
334-
335-
#ifndef ZEND_WIN32
336-
extern int lock_file;
337-
338-
# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || (defined(__APPLE__) && defined(__MACH__)/* Darwin */) || defined(__OpenBSD__) || defined(__NetBSD__)
339-
# define FLOCK_STRUCTURE(name, type, whence, start, len) \
340-
struct flock name = {start, len, -1, type, whence}
341-
# elif defined(__svr4__)
342-
# define FLOCK_STRUCTURE(name, type, whence, start, len) \
343-
struct flock name = {type, whence, start, len}
344-
# elif defined(__linux__) || defined(__hpux)
345-
# define FLOCK_STRUCTURE(name, type, whence, start, len) \
346-
struct flock name = {type, whence, start, len, 0}
347-
# elif defined(_AIX)
348-
# if defined(_LARGE_FILES) || defined(__64BIT__)
349-
# define FLOCK_STRUCTURE(name, type, whence, start, len) \
350-
struct flock name = {type, whence, 0, 0, 0, start, len }
351-
# else
352-
# define FLOCK_STRUCTURE(name, type, whence, start, len) \
353-
struct flock name = {type, whence, start, len}
354-
# endif
355-
# else
356-
# error "Don't know how to define struct flock"
357-
# endif
358-
#endif
359-
int main() { return 0; }
360-
],
361-
[AC_MSG_RESULT([done])],
362-
[AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no])], [])
329+
flock_type=unknown
330+
AC_MSG_CHECKING("whether flock struct is linux ordered")
331+
AC_TRY_RUN([
332+
#include <fcntl.h>
333+
struct flock lock = { 1, 2, 3, 4, 5 };
334+
int main() {
335+
if(lock.l_type == 1 && lock.l_whence == 2 && lock.l_start == 3 && lock.l_len == 4) {
336+
return 0;
337+
}
338+
return 1;
339+
}
340+
], [
341+
flock_type=linux
342+
AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
343+
AC_MSG_RESULT("yes")
344+
], AC_MSG_RESULT("no") )
345+
346+
AC_MSG_CHECKING("whether flock struct is BSD ordered")
347+
AC_TRY_RUN([
348+
#include <fcntl.h>
349+
struct flock lock = { 1, 2, 3, 4, 5 };
350+
int main() {
351+
if(lock.l_start == 1 && lock.l_len == 2 && lock.l_type == 4 && lock.l_whence == 5) {
352+
return 0;
353+
}
354+
return 1;
355+
}
356+
], [
357+
flock_type=bsd
358+
AC_DEFINE([HAVE_FLOCK_BSD], [], [Struct flock is BSD-type])
359+
AC_MSG_RESULT("yes")
360+
], AC_MSG_RESULT("no") )
361+
362+
if test "$flock_type" == "unknown"; then
363+
AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no])
364+
fi
363365

364366
PHP_NEW_EXTENSION(opcache,
365367
ZendAccelerator.c \

ext/opcache/zend_accelerator_util_funcs.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ static void zend_hash_clone_methods(HashTable *ht, HashTable *source, zend_class
478478
if (accel_xlat_get(new_entry->scope, new_ce) == SUCCESS) {
479479
new_entry->scope = *new_ce;
480480
} else {
481-
zend_error(E_ERROR, ACCELERATOR_PRODUCT_NAME " class loading error, class %s, function %s. Please call Zend Support", ce->name, new_entry->function_name);
481+
zend_error(E_ERROR, ACCELERATOR_PRODUCT_NAME " class loading error, class %s, function %s", ce->name, new_entry->function_name);
482482
}
483483
}
484484

@@ -487,7 +487,7 @@ static void zend_hash_clone_methods(HashTable *ht, HashTable *source, zend_class
487487
if (accel_xlat_get(new_entry->prototype, new_prototype) == SUCCESS) {
488488
new_entry->prototype = *new_prototype;
489489
} else {
490-
zend_error(E_ERROR, ACCELERATOR_PRODUCT_NAME " class loading error, class %s, function %s. Please call Zend Support", ce->name, new_entry->function_name);
490+
zend_error(E_ERROR, ACCELERATOR_PRODUCT_NAME " class loading error, class %s, function %s", ce->name, new_entry->function_name);
491491
}
492492
}
493493

@@ -589,7 +589,7 @@ static void zend_hash_clone_prop_info(HashTable *ht, HashTable *source, zend_cla
589589
} else if (accel_xlat_get(prop_info->ce, new_ce) == SUCCESS) {
590590
prop_info->ce = *new_ce;
591591
} else {
592-
zend_error(E_ERROR, ACCELERATOR_PRODUCT_NAME" class loading error, class %s, property %s. Please call Zend Support", ce->name, prop_info->name);
592+
zend_error(E_ERROR, ACCELERATOR_PRODUCT_NAME" class loading error, class %s, property %s", ce->name, prop_info->name);
593593
}
594594

595595
p = p->pListNext;
@@ -621,7 +621,7 @@ static int zend_prepare_function_for_execution(zend_op_array *op_array)
621621
if (accel_xlat_get(ce->handler, new_func) == SUCCESS) { \
622622
ce->handler = *new_func; \
623623
} else { \
624-
zend_error(E_ERROR, ACCELERATOR_PRODUCT_NAME " class loading error, class %s. Please call Zend Support", ce->name); \
624+
zend_error(E_ERROR, ACCELERATOR_PRODUCT_NAME " class loading error, class %s", ce->name); \
625625
} \
626626
} \
627627
}
@@ -710,7 +710,7 @@ static void zend_class_copy_ctor(zend_class_entry **pce)
710710
if (accel_xlat_get(ce->parent, new_ce) == SUCCESS) {
711711
ce->parent = *new_ce;
712712
} else {
713-
zend_error(E_ERROR, ACCELERATOR_PRODUCT_NAME" class loading error, class %s. Please call Zend Support", ce->name);
713+
zend_error(E_ERROR, ACCELERATOR_PRODUCT_NAME" class loading error, class %s", ce->name);
714714
}
715715
}
716716

ext/pdo_dblib/dblib_driver.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,10 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
362362
goto cleanup;
363363
}
364364

365+
#if PHP_DBLIB_IS_MSSQL
365366
/* dblib do not return more than this length from text/image */
366367
DBSETOPT(H->link, DBTEXTLIMIT, "2147483647");
368+
#endif
367369

368370
/* limit text/image from network */
369371
DBSETOPT(H->link, DBTEXTSIZE, "2147483647");

php.ini-development

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@
8383
; development version only in development environments as errors shown to
8484
; application users can inadvertently leak otherwise secure information.
8585

86+
; This is php.ini-development INI file.
87+
8688
;;;;;;;;;;;;;;;;;;;
8789
; Quick Reference ;
8890
;;;;;;;;;;;;;;;;;;;

php.ini-production

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@
8383
; development version only in development environments as errors shown to
8484
; application users can inadvertently leak otherwise secure information.
8585

86+
; This is php.ini-production INI file.
87+
8688
;;;;;;;;;;;;;;;;;;;
8789
; Quick Reference ;
8890
;;;;;;;;;;;;;;;;;;;

sapi/cgi/cgi_main.c

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ static const opt_struct OPTIONS[] = {
154154
{'?', 0, "usage"},/* help alias (both '?' and 'usage') */
155155
{'v', 0, "version"},
156156
{'z', 1, "zend-extension"},
157+
{'W', 1, "warmup"},
157158
{'T', 1, "timing"},
158159
{'-', 0, NULL} /* end of args */
159160
};
@@ -1754,6 +1755,7 @@ int main(int argc, char *argv[])
17541755
int fcgi_fd = 0;
17551756
fcgi_request *request = NULL;
17561757
int repeats = 1;
1758+
int warmup_repeats = 0;
17571759
int benchmark = 0;
17581760
#if HAVE_GETTIMEOFDAY
17591761
struct timeval start, end;
@@ -2103,6 +2105,9 @@ consult the installation file that came with this distribution, or visit \n\
21032105
time(&start);
21042106
#endif
21052107
break;
2108+
case 'W':
2109+
warmup_repeats = atoi(php_optarg);
2110+
break;
21062111
case 'h':
21072112
case '?':
21082113
if (request) {
@@ -2516,12 +2521,24 @@ consult the installation file that came with this distribution, or visit \n\
25162521

25172522
if (!fastcgi) {
25182523
if (benchmark) {
2519-
repeats--;
2520-
if (repeats > 0) {
2521-
script_file = NULL;
2522-
php_optind = orig_optind;
2523-
php_optarg = orig_optarg;
2524+
if (warmup_repeats) {
2525+
warmup_repeats--;
2526+
if (!warmup_repeats) {
2527+
#ifdef HAVE_GETTIMEOFDAY
2528+
gettimeofday(&start, NULL);
2529+
#else
2530+
time(&start);
2531+
#endif
2532+
}
25242533
continue;
2534+
} else {
2535+
repeats--;
2536+
if (repeats > 0) {
2537+
script_file = NULL;
2538+
php_optind = orig_optind;
2539+
php_optarg = orig_optarg;
2540+
continue;
2541+
}
25252542
}
25262543
}
25272544
break;

0 commit comments

Comments
 (0)