diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-11-03 14:13:45 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-11-03 14:14:14 +0200 |
commit | 759b73a4293e56209e922bf58d7028234e854338 (patch) | |
tree | 73a0b25f0c80c1a07d091bd035957dad3788e85c /system.h | |
parent | b7678c0a40898debdf7396c84967411efbfaf345 (diff) | |
download | rpm-759b73a4293e56209e922bf58d7028234e854338.tar.gz rpm-759b73a4293e56209e922bf58d7028234e854338.tar.bz2 rpm-759b73a4293e56209e922bf58d7028234e854338.zip |
Ensure PATH_MAX is defined (ticket #3) Adam Tkac
- POSIX doesn't require PATH_MAX to be defined as constant, and Hurd
doesn't define it...
- deal with it just once in system.h for now, the proper fix is to get
rid of needing it at all (ie add a mallocing realpath() clone to librpmio)
- patch from Adam Tkac
Diffstat (limited to 'system.h')
-rw-r--r-- | system.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -181,6 +181,16 @@ char *realpath(const char *path, char resolved_path []); #include <limits.h> #endif +#ifndef PATH_MAX +#ifdef _POSIX_PATH_MAX +#define PATH_MAX _POSIX_PATH_MAX +#elif defined MAXPATHLEN +#define PATH_MAX MAXPATHLEN +#else +#define PATH_MAX 256 +#endif +#endif + #if HAVE_ERR_H #include <err.h> #endif |