Bug 1411374 Do not redefine PATH_MAX if it is already defined r?njn draft
authorTom Ritter <tom@mozilla.com>
Tue, 24 Oct 2017 00:36:58 -0500
changeset 685510 1d93838089448033356e8dee86951c7225d355d3
parent 685509 8fe09ce76248f037003c6c1d5a479b1eb2283c19
child 737173 f4d023d92f23ecfaed78fcbdc853719f04bb17dd
push id85958
push userbmo:tom@mozilla.com
push dateTue, 24 Oct 2017 18:56:07 +0000
reviewersnjn
bugs1411374
milestone58.0a1
Bug 1411374 Do not redefine PATH_MAX if it is already defined r?njn MozReview-Commit-ID: trabOdGWYD
js/src/shell/OSObject.cpp
--- a/js/src/shell/OSObject.cpp
+++ b/js/src/shell/OSObject.cpp
@@ -32,17 +32,19 @@
 #include "js/Conversions.h"
 #include "shell/jsshell.h"
 #include "vm/StringBuffer.h"
 #include "vm/TypedArrayObject.h"
 
 #include "jsobjinlines.h"
 
 #ifdef XP_WIN
-# define PATH_MAX (MAX_PATH > _MAX_DIR ? MAX_PATH : _MAX_DIR)
+# ifndef PATH_MAX
+#  define PATH_MAX (MAX_PATH > _MAX_DIR ? MAX_PATH : _MAX_DIR)
+# endif
 # define getcwd _getcwd
 #else
 # include <libgen.h>
 #endif
 
 using js::shell::RCFile;
 
 namespace js {