Bug 412610 - MAXPATHLEN too small for glibc's realpath(); m-c part; r=*

jsfile.cpp + reg.c + SpecialSystemDirectory.cpp : benjamin
lcms.h : bholley
XRemoteClient.cpp : roc
This commit is contained in:
Sunil Mohan Adapa 2009-02-23 19:28:12 +01:00
parent bb0410d426
commit 620b5e2d7a
5 changed files with 28 additions and 2 deletions

View File

@ -61,6 +61,7 @@
# include <stdio.h>
# include <stdlib.h>
# include <unistd.h>
# include <limits.h>
# define FILESEPARATOR '/'
# define FILESEPARATOR2 '\0'
# define CURRENT_DIR "/"
@ -104,7 +105,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

View File

@ -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
@ -237,7 +238,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

View File

@ -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

View File

@ -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]))

View File

@ -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