mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-02 15:15:23 +00:00
Cherry-pick fix for bug 412610 (MAXPATHLEN)
This commit is contained in:
parent
ca80b70b7d
commit
8f98c4c732
@ -62,6 +62,7 @@
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
# include <unistd.h>
|
||||
# include <limits.h>
|
||||
# define FILESEPARATOR '/'
|
||||
# define FILESEPARATOR2 '\0'
|
||||
# define CURRENT_DIR "/"
|
||||
@ -105,7 +106,11 @@
|
||||
#define utfstring "binary"
|
||||
#define unicodestring "unicode"
|
||||
|
||||
#ifdef PATH_MAX
|
||||
#define MAX_PATH_LENGTH PATH_MAX
|
||||
#else
|
||||
#define MAX_PATH_LENGTH 1024
|
||||
#endif
|
||||
#define MODE_SIZE 256
|
||||
#define NUMBER_SIZE 32
|
||||
#define MAX_LINE_LENGTH 256
|
||||
|
@ -203,6 +203,7 @@ typedef pthread_rwlock_t LCMS_RWLOCK_T;
|
||||
|
||||
#if defined(__GNUC__) || defined(__FreeBSD__)
|
||||
# include <unistd.h>
|
||||
# include <limits.h>
|
||||
#endif
|
||||
|
||||
#ifndef LCMS_WIN_TYPES_ALREADY_DEFINED
|
||||
@ -233,7 +234,11 @@ typedef void *LPVOID;
|
||||
#define HIWORD(l) ((WORD)((DWORD)(l) >> 16))
|
||||
|
||||
#ifndef MAX_PATH
|
||||
# define MAX_PATH (256)
|
||||
# ifdef PATH_MAX
|
||||
# define MAX_PATH PATH_MAX
|
||||
# else
|
||||
# define MAX_PATH (256)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define cdecl
|
||||
|
@ -69,6 +69,10 @@
|
||||
#include <Carbon/Carbon.h>
|
||||
#endif
|
||||
|
||||
#ifdef XP_UNIX
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#ifdef STANDALONE_REGISTRY
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
@ -91,8 +95,12 @@
|
||||
#define MAX_PATH PATH_MAX
|
||||
#elif defined(XP_UNIX)
|
||||
#ifndef MAX_PATH
|
||||
#ifdef PATH_MAX
|
||||
#define MAX_PATH PATH_MAX
|
||||
#else
|
||||
#define MAX_PATH 1024
|
||||
#endif
|
||||
#endif
|
||||
#elif defined(XP_OS2)
|
||||
#ifndef MAX_PATH
|
||||
#define MAX_PATH 260
|
||||
|
@ -53,6 +53,7 @@
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <limits.h>
|
||||
#include <X11/Xatom.h>
|
||||
#ifdef POLL_WITH_XCONNECTIONNUMBER
|
||||
#include <poll.h>
|
||||
@ -76,8 +77,12 @@
|
||||
#endif
|
||||
|
||||
#ifndef MAX_PATH
|
||||
#ifdef PATH_MAX
|
||||
#define MAX_PATH PATH_MAX
|
||||
#else
|
||||
#define MAX_PATH 1024
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define ARRAY_LENGTH(array_) (sizeof(array_)/sizeof(array_[0]))
|
||||
|
||||
|
@ -76,6 +76,7 @@
|
||||
|
||||
#elif defined(XP_UNIX)
|
||||
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/param.h>
|
||||
@ -100,7 +101,9 @@
|
||||
#endif
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#ifdef MAX_PATH
|
||||
#ifdef PATH_MAX
|
||||
#define MAXPATHLEN PATH_MAX
|
||||
#elif defined(MAX_PATH)
|
||||
#define MAXPATHLEN MAX_PATH
|
||||
#elif defined(_MAX_PATH)
|
||||
#define MAXPATHLEN _MAX_PATH
|
||||
|
Loading…
Reference in New Issue
Block a user