]> sjero.net Git - wget/commitdiff
PATH_MAX from sys/param.h, when not available from limits.h.
authorJeremy Olexa <darkside@gentoo.org>
Sun, 10 Jan 2010 00:53:41 +0000 (16:53 -0800)
committerJeremy Olexa <darkside@gentoo.org>
Sun, 10 Jan 2010 00:53:41 +0000 (16:53 -0800)
src/ChangeLog
src/init.c

index 732a2da44d295a062cd3444e4804c7b24d8501a5..8db97f32e96795404f12f174d8ddbce849f3c9f7 100644 (file)
@@ -1,3 +1,8 @@
+2010-01-09  Jeremy Olexa  <darkside@gentoo.org>  (tiny change)
+
+       * init.c: Deal with systems which provide PATH_MAX in
+       sys/param.h rather than limits.h.
+
 2009-10-09  Steven Schweda  <sms@antinode.info>
 
        * utils.c: Added characters " : \ | to the list of normal
index 5a05d035cbb061885490c618de27dfa8e9dd2adc..49c6ea3d7d2a8787550d7f2faab47ca52c172517 100644 (file)
@@ -37,6 +37,15 @@ as that of the covered work.  */
 #endif
 #include <string.h>
 #include <errno.h>
+#include <limits.h>
+/* not all systems provide PATH_MAX in limits.h */
+#ifndef PATH_MAX
+# include <sys/param.h>
+# ifndef PATH_MAX
+#  define PATH_MAX MAXPATHLEN
+# endif
+#endif
+
 
 #ifdef HAVE_PWD_H
 # include <pwd.h>