From 8e39fcf97ba6a7fc293bc0e0222982e85c907283 Mon Sep 17 00:00:00 2001 From: Jeremy Olexa Date: Sat, 9 Jan 2010 16:53:41 -0800 Subject: [PATCH] PATH_MAX from sys/param.h, when not available from limits.h. --- src/ChangeLog | 5 +++++ src/init.c | 9 +++++++++ 2 files changed, 14 insertions(+) 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