Consolidate all the PATH_MAX handling into misc.h

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
This commit is contained in:
Christopher James Halse Rogers 2011-03-09 11:17:27 +11:00 • committed by Adam Jackson
commit d17a9fb841
7 changed files with 19 additions and 58 deletions

View file

@ -178,6 +178,17 @@ typedef struct _xReq *xReqPtr;
#endif
#ifndef PATH_MAX
#include <sys/param.h>
#ifndef PATH_MAX
#ifdef MAXPATHLEN
#define PATH_MAX MAXPATHLEN
#else
#define PATH_MAX 1024
#endif
#endif
#endif
/**
* Calculate the number of bytes needed to hold bits.
* @param bits The minimum number of bits needed.