diff -Naur mozilla/config/pathsub.h mozilla.tpg/config/pathsub.h --- mozilla/config/pathsub.h 2004-04-18 14:17:25.000000000 +0000 +++ mozilla.tpg/config/pathsub.h 2008-05-28 13:39:16.000000000 +0000 @@ -46,7 +46,7 @@ #include <sys/types.h> #ifndef PATH_MAX -#define PATH_MAX 1024 +#error "PATH_MAX is not defined!" #endif /* diff -Naur mozilla/dbm/include/mcom_db.h mozilla.tpg/dbm/include/mcom_db.h --- mozilla/dbm/include/mcom_db.h 2005-09-22 10:38:06.000000000 +0000 +++ mozilla.tpg/dbm/include/mcom_db.h 2008-05-28 13:39:15.000000000 +0000 @@ -175,7 +175,8 @@ #endif /* __DBINTERFACE_PRIVATE */ #ifdef SCO -#define MAXPATHLEN 1024 +#include <limits.h> +#define MAXPATHLEN PATH_MAX #endif #include <fcntl.h> diff -Naur mozilla/js/src/jsfile.c mozilla.tpg/js/src/jsfile.c --- mozilla/js/src/jsfile.c 2007-12-04 03:40:06.000000000 +0000 +++ mozilla.tpg/js/src/jsfile.c 2008-05-28 13:39:15.000000000 +0000 @@ -105,7 +105,8 @@ #define utfstring "binary" #define unicodestring "unicode" -#define MAX_PATH_LENGTH 1024 +#include <limits.h> +#define MAX_PATH_LENGTH PATH_MAX #define MODE_SIZE 256 #define NUMBER_SIZE 32 #define MAX_LINE_LENGTH 256 diff -Naur mozilla/modules/libjar/nsZipArchive.cpp mozilla.tpg/modules/libjar/nsZipArchive.cpp --- mozilla/modules/libjar/nsZipArchive.cpp 2008-03-19 19:28:38.000000000 +0000 +++ mozilla.tpg/modules/libjar/nsZipArchive.cpp 2008-05-28 13:39:16.000000000 +0000 @@ -124,7 +124,7 @@ # define S_IFLNK 0120000 # endif # ifndef PATH_MAX -# define PATH_MAX 1024 +# include <limits.h> # endif #endif /* XP_UNIX */ diff -Naur mozilla/modules/libreg/src/reg.c mozilla.tpg/modules/libreg/src/reg.c --- mozilla/modules/libreg/src/reg.c 2007-06-24 01:07:21.000000000 +0000 +++ mozilla.tpg/modules/libreg/src/reg.c 2008-05-28 13:39:16.000000000 +0000 @@ -91,7 +91,8 @@ #define MAX_PATH PATH_MAX #elif defined(XP_UNIX) #ifndef MAX_PATH -#define MAX_PATH 1024 +#include <limits.h> +#define MAX_PATH PATH_MAX #endif #elif defined(XP_OS2) #ifndef MAX_PATH diff -Naur mozilla/nsprpub/config/pathsub.h mozilla.tpg/nsprpub/config/pathsub.h --- mozilla/nsprpub/config/pathsub.h 2004-04-25 15:00:34.000000000 +0000 +++ mozilla.tpg/nsprpub/config/pathsub.h 2008-05-28 13:39:16.000000000 +0000 @@ -50,7 +50,7 @@ #endif #ifndef PATH_MAX -#define PATH_MAX 1024 +#error "PATH_MAX is not defined!" #endif /* diff -Naur mozilla/security/coreconf/nsinstall/pathsub.h mozilla.tpg/security/coreconf/nsinstall/pathsub.h --- mozilla/security/coreconf/nsinstall/pathsub.h 2004-04-25 15:02:18.000000000 +0000 +++ mozilla.tpg/security/coreconf/nsinstall/pathsub.h 2008-05-28 13:39:16.000000000 +0000 @@ -49,7 +49,7 @@ #endif #ifndef PATH_MAX -#define PATH_MAX 1024 +#error "PATH_MAX is not defined!" #endif /* diff -Naur mozilla/toolkit/mozapps/update/src/updater/updater.cpp mozilla.tpg/toolkit/mozapps/update/src/updater/updater.cpp --- mozilla/toolkit/mozapps/update/src/updater/updater.cpp 2008-03-12 11:13:10.000000000 +0000 +++ mozilla.tpg/toolkit/mozapps/update/src/updater/updater.cpp 2008-05-28 13:39:15.000000000 +0000 @@ -124,7 +124,8 @@ # elif defined(CCHMAXPATH) # define MAXPATHLEN CCHMAXPATH # else -# define MAXPATHLEN 1024 +# include <limits.h> +# define MAXPATHLEN PATH_MAX # endif #endif diff -Naur mozilla/toolkit/xre/nsAppRunner.h mozilla.tpg/toolkit/xre/nsAppRunner.h --- mozilla/toolkit/xre/nsAppRunner.h 2007-12-31 15:15:45.000000000 +0000 +++ mozilla.tpg/toolkit/xre/nsAppRunner.h 2008-05-28 13:39:15.000000000 +0000 @@ -48,7 +48,8 @@ #elif defined(CCHMAXPATH) #define MAXPATHLEN CCHMAXPATH #else -#define MAXPATHLEN 1024 +#include <limits.h> +#define MAXPATHLEN PATH_MAX #endif #endif diff -Naur mozilla/widget/src/xremoteclient/XRemoteClient.cpp mozilla.tpg/widget/src/xremoteclient/XRemoteClient.cpp --- mozilla/widget/src/xremoteclient/XRemoteClient.cpp 2007-09-04 04:13:24.000000000 +0000 +++ mozilla.tpg/widget/src/xremoteclient/XRemoteClient.cpp 2008-05-28 13:39:15.000000000 +0000 @@ -76,7 +76,8 @@ #endif #ifndef MAX_PATH -#define MAX_PATH 1024 +#include <limits.h> +#define MAX_PATH PATH_MAX #endif #define ARRAY_LENGTH(array_) (sizeof(array_)/sizeof(array_[0])) diff -Naur mozilla/xpcom/build/nsXPCOMPrivate.h mozilla.tpg/xpcom/build/nsXPCOMPrivate.h --- mozilla/xpcom/build/nsXPCOMPrivate.h 2007-08-18 03:48:16.000000000 +0000 +++ mozilla.tpg/xpcom/build/nsXPCOMPrivate.h 2008-05-28 13:39:15.000000000 +0000 @@ -272,7 +272,8 @@ #elif defined(CCHMAXPATH) #define MAXPATHLEN CCHMAXPATH #else -#define MAXPATHLEN 1024 +#include <limits.h> +#define MAXPATHLEN PATH_MAX #endif #endif diff -Naur mozilla/xpcom/io/SpecialSystemDirectory.cpp mozilla.tpg/xpcom/io/SpecialSystemDirectory.cpp --- mozilla/xpcom/io/SpecialSystemDirectory.cpp 2008-03-14 18:34:21.000000000 +0000 +++ mozilla.tpg/xpcom/io/SpecialSystemDirectory.cpp 2008-05-28 13:39:15.000000000 +0000 @@ -107,7 +107,8 @@ #elif defined(CCHMAXPATH) #define MAXPATHLEN CCHMAXPATH #else -#define MAXPATHLEN 1024 +#include <limits.h> +#define MAXPATHLEN PATH_MAX #endif #endif diff -Naur mozilla/xpcom/obsolete/nsFileSpecUnix.cpp mozilla.tpg/xpcom/obsolete/nsFileSpecUnix.cpp --- mozilla/xpcom/obsolete/nsFileSpecUnix.cpp 2007-09-18 23:12:10.000000000 +0000 +++ mozilla.tpg/xpcom/obsolete/nsFileSpecUnix.cpp 2008-05-28 13:39:15.000000000 +0000 @@ -80,7 +80,8 @@ #endif #ifndef MAXPATHLEN -#define MAXPATHLEN 1024 /* Guessing this is okay. Works for SCO. */ +#include <limits.h> +#define MAXPATHLEN PATH_MAX /* Guessing this is okay. Works for SCO. */ #endif #if defined(__QNX__) diff -Naur mozilla/xpcom/typelib/xpidl/xpidl_java.c mozilla.tpg/xpcom/typelib/xpidl/xpidl_java.c --- mozilla/xpcom/typelib/xpidl/xpidl_java.c 2008-03-12 11:00:25.000000000 +0000 +++ mozilla.tpg/xpcom/typelib/xpidl/xpidl_java.c 2008-05-28 13:39:15.000000000 +0000 @@ -44,6 +44,7 @@ #include "xpidl.h" #include <ctype.h> #include <glib.h> +#include <limits.h> #ifdef XP_WIN #include <windef.h>