From: Jeremy Olexa Date: Sun, 10 Jan 2010 00:53:41 +0000 (-0800) Subject: PATH_MAX from sys/param.h, when not available from limits.h. X-Git-Tag: v1.13~204 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=8e39fcf97ba6a7fc293bc0e0222982e85c907283 PATH_MAX from sys/param.h, when not available from limits.h. --- diff --git a/src/ChangeLog b/src/ChangeLog index 732a2da4..8db97f32 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-01-09 Jeremy Olexa (tiny change) + + * init.c: Deal with systems which provide PATH_MAX in + sys/param.h rather than limits.h. + 2009-10-09 Steven Schweda * utils.c: Added characters " : \ | to the list of normal diff --git a/src/init.c b/src/init.c index 5a05d035..49c6ea3d 100644 --- a/src/init.c +++ b/src/init.c @@ -37,6 +37,15 @@ as that of the covered work. */ #endif #include #include +#include +/* not all systems provide PATH_MAX in limits.h */ +#ifndef PATH_MAX +# include +# ifndef PATH_MAX +# define PATH_MAX MAXPATHLEN +# endif +#endif + #ifdef HAVE_PWD_H # include