]> granicus.if.org Git - php/commitdiff
- Smarter detection of MAXPATHLEN
authorAndi Gutmans <andi@php.net>
Thu, 7 Sep 2000 15:20:29 +0000 (15:20 +0000)
committerAndi Gutmans <andi@php.net>
Thu, 7 Sep 2000 15:20:29 +0000 (15:20 +0000)
main/php.h

index e48a6ccfe3034bf1303d10f15bfe7d0fb3290567..54d2e6ed4055d95c070b557b851c078a403ac241 100644 (file)
@@ -212,7 +212,11 @@ char *strerror(int);
 #define STR_PRINT(str) ((str)?(str):"")
 
 #ifndef MAXPATHLEN
-#define MAXPATHLEN 256    /* Should be safe for any weird systems that do not define it */
+# ifdef PATH_MAX
+#  define MAXPATHLEN PATH_MAX
+# else
+#  define MAXPATHLEN 256    /* Should be safe for any weird systems that do not define it */
+# endif
 #endif
 
 #define PHP_FN(name) php_if_##name