summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorChristopher James Halse Rogers <christopher.halse.rogers@canonical.com>2011-03-09 11:17:27 +1100
committerAdam Jackson <ajax@redhat.com>2011-03-14 13:42:55 -0400
commitd17a9fb8414becf6a8998041df68f209f9222b2b (patch)
treebb8158a3323a7529de9fc7794589d6716317f4ed /os
parent021393d1b8bcc9ff2ff5deb2306360e6b0afa1c6 (diff)
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>
Diffstat (limited to 'os')
-rw-r--r--os/access.c19
-rw-r--r--os/osinit.c9
-rw-r--r--os/utils.c11
3 files changed, 1 insertions, 38 deletions
diff --git a/os/access.c b/os/access.c
index eb1a21d42..3856e606e 100644
--- a/os/access.c
+++ b/os/access.c
@@ -165,17 +165,6 @@ SOFTWARE.
#endif /* WIN32 */
-#ifndef PATH_MAX
-#include <sys/param.h>
-#ifndef PATH_MAX
-#ifdef MAXPATHLEN
-#define PATH_MAX MAXPATHLEN
-#else
-#define PATH_MAX 1024
-#endif
-#endif
-#endif
-
#define X_INCLUDE_NETDB_H
#include <X11/Xos_r.h>
@@ -185,14 +174,6 @@ SOFTWARE.
#include "xace.h"
-#ifndef PATH_MAX
-#ifdef MAXPATHLEN
-#define PATH_MAX MAXPATHLEN
-#else
-#define PATH_MAX 1024
-#endif
-#endif
-
Bool defeatAccessControl = FALSE;
#define acmp(a1, a2, len) memcmp((char *)(a1), (char *)(a2), len)
diff --git a/os/osinit.c b/os/osinit.c
index 018e4047d..45d202def 100644
--- a/os/osinit.c
+++ b/os/osinit.c
@@ -63,17 +63,10 @@ SOFTWARE.
#include <execinfo.h>
#endif
+#include "misc.h"
#include "dixstruct.h"
-#ifndef PATH_MAX
-#ifdef MAXPATHLEN
-#define PATH_MAX MAXPATHLEN
-#else
-#define PATH_MAX 1024
-#endif
-#endif
-
#if !defined(SYSV) && !defined(WIN32)
#include <sys/resource.h>
diff --git a/os/utils.c b/os/utils.c
index 18fd91151..a365aca81 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -231,17 +231,6 @@ OsSignal(int sig, OsSigHandlerPtr handler)
#define LOCK_PREFIX "/.X"
#define LOCK_SUFFIX "-lock"
-#ifndef PATH_MAX
-#include <sys/param.h>
-#ifndef PATH_MAX
-#ifdef MAXPATHLEN
-#define PATH_MAX MAXPATHLEN
-#else
-#define PATH_MAX 1024
-#endif
-#endif
-#endif
-
static Bool StillLocking = FALSE;
static char LockFile[PATH_MAX];
static Bool nolock = FALSE;