- 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
#include "system.h"
-#ifndef PATH_MAX
-# define PATH_MAX 255
-#endif
-
#include <inttypes.h>
#include <rpm/rpmcli.h>
extern int errno;
#endif
-#ifndef PATH_MAX
-#ifdef _POSIX_VERSION
-#define PATH_MAX _POSIX_PATH_MAX
-#else
-#ifdef MAXPATHLEN
-#define PATH_MAX MAXPATHLEN
-#else
-#define PATH_MAX 1024
-#endif
-#endif
-#endif
-
#define MAX_READLINKS 32
#ifdef __STDC__
#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