[perl #109262] Don't use _POSIX_PATH_MAX as a fallback PATH_MAX
authorDominic Hargreaves <dom@earth.li>
Fri, 3 Feb 2012 19:35:36 +0000 (19:35 +0000)
committerDominic Hargreaves <dom@earth.li>
Sat, 18 Feb 2012 11:13:26 +0000 (11:13 +0000)
_POSIX_PATH_MAX is required to be defined for POSIX systems as
256, which is too small for a fallback PATH_MAX (some systems, such as
GNU/Hurd, do not have an inherent limit on path length).

perl.h

diff --git a/perl.h b/perl.h
index 7274503..361bbf6 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -2764,11 +2764,7 @@ freeing any remaining Perl interpreters.
 #      define MAXPATHLEN (PATH_MAX+1)
 #    endif
 #  else
-#    ifdef _POSIX_PATH_MAX
-#       define MAXPATHLEN _POSIX_PATH_MAX
-#    else
-#       define MAXPATHLEN 1024 /* Err on the large side. */
-#    endif
+#    define MAXPATHLEN 1024    /* Err on the large side. */
 #  endif
 #endif