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:
Anatol Belski 2016-02-02 14:22:31 +01:00
commit b837f205ca

View File

@ -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)