mirror of
https://github.com/php/php-src.git
synced 2024-12-01 05:43:38 +08:00
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5: add error check to sysconf call Going for 5.5.33 now Conflicts: configure.in main/php_version.h
This commit is contained in:
commit
b837f205ca
@ -50,6 +50,10 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
# include "win32/php_stdint.h"
|
||||
#else
|
||||
@ -67,6 +71,13 @@ PHP_MINIT_FUNCTION(exec)
|
||||
{
|
||||
#ifdef _SC_ARG_MAX
|
||||
cmd_max_len = sysconf(_SC_ARG_MAX);
|
||||
if (-1 == cmd_max_len) {
|
||||
#ifdef _POSIX_ARG_MAX
|
||||
cmd_max_len = _POSIX_ARG_MAX;
|
||||
#else
|
||||
cmd_max_len = 4096;
|
||||
#endif
|
||||
}
|
||||
#elif defined(ARG_MAX)
|
||||
cmd_max_len = ARG_MAX;
|
||||
#elif defined(PHP_WIN32)
|
||||
|
Loading…
Reference in New Issue
Block a user