]> granicus.if.org Git - php/commitdiff
extend _SC_ARG_MAX usage onto platforms where it's available
authorAnatol Belski <ab@php.net>
Thu, 28 Jan 2016 11:06:33 +0000 (12:06 +0100)
committerAnatol Belski <ab@php.net>
Thu, 28 Jan 2016 11:06:33 +0000 (12:06 +0100)
ext/standard/exec.c

index 29024f6f4386a6d5c05418b1344e910121fc0d17..cbaaedbc83d95d16994d2c6d4fce8e2e4e025ac1 100644 (file)
@@ -46,7 +46,7 @@
 #include <fcntl.h>
 #endif
 
-#if (HAVE_NICE || defined(__linux__)) && HAVE_UNISTD_H
+#if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
 
@@ -55,7 +55,7 @@ static int cmd_max_len;
 /* {{{ PHP_MINIT_FUNCTION(exec) */
 PHP_MINIT_FUNCTION(exec)
 {
-#ifdef __linux__
+#ifdef _SC_ARG_MAX
        cmd_max_len = sysconf(_SC_ARG_MAX);
 #elif defined(ARG_MAX)
        cmd_max_len = ARG_MAX;