зеркало из https://github.com/mozilla/pjs.git
Bug 412610 - "MAXPATHLEN too small for glibc's realpath()" (define MAXPATHLEN as PATH_MAX when PATH_MAX is available) [r=bsmedberg]
This commit is contained in:
Родитель
cb7afa57ec
Коммит
a455dc4471
|
@ -58,9 +58,12 @@
|
|||
#include "nsDirectoryServiceDefs.h"
|
||||
#include "nsDirectoryServiceUtils.h"
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#ifdef _MAX_PATH
|
||||
#ifdef PATH_MAX
|
||||
#define MAXPATHLEN PATH_MAX
|
||||
#elif defined(_MAX_PATH)
|
||||
#define MAXPATHLEN _MAX_PATH
|
||||
#elif defined(CCHMAXPATH)
|
||||
#define MAXPATHLEN CCHMAXPATH
|
||||
|
|
|
@ -63,12 +63,16 @@
|
|||
#include <windows.h>
|
||||
#include "nsIWindowsRegKey.h"
|
||||
#include "nsILocalFileWin.h"
|
||||
#else
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#include "nsAutoPtr.h"
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#ifdef _MAX_PATH
|
||||
#ifdef PATH_MAX
|
||||
#define MAXPATHLEN PATH_MAX
|
||||
#elif defined(_MAX_PATH)
|
||||
#define MAXPATHLEN _MAX_PATH
|
||||
#elif defined(CCHMAXPATH)
|
||||
#define MAXPATHLEN CCHMAXPATH
|
||||
|
|
|
@ -118,7 +118,9 @@ void LaunchChild(int argc, char **argv);
|
|||
#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
|
||||
|
|
|
@ -40,10 +40,14 @@
|
|||
|
||||
#ifdef XP_WIN
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#ifdef _MAX_PATH
|
||||
#ifdef PATH_MAX
|
||||
#define MAXPATHLEN PATH_MAX
|
||||
#elif defined(_MAX_PATH)
|
||||
#define MAXPATHLEN _MAX_PATH
|
||||
#elif defined(CCHMAXPATH)
|
||||
#define MAXPATHLEN CCHMAXPATH
|
||||
|
|
|
@ -231,6 +231,7 @@ NS_GetFrozenFunctions(XPCOMFunctions *entryPoints, const char* libraryPath);
|
|||
#define XUL_DLL "libxul"MOZ_DLL_SUFFIX
|
||||
|
||||
#else // Unix
|
||||
#include <limits.h> // for PATH_MAX
|
||||
|
||||
#define XPCOM_DLL "libxpcom"MOZ_DLL_SUFFIX
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче