Bug 835551 - Add a new header consolidating non-configure-generated #defines that we require in order to build. r=ted
authorJeff Walden <jwalden@mit.edu>
Wed, 06 Feb 2013 19:09:59 -0800
changeset 121812 38e92a7b5bf4a247e9bead46cd2f113e5ca7c5e9
parent 121811 c06650ce0770bfce66ff4686b2a0432d92e4a8d2
child 121813 095782b5101358425af19282e31b09e3be1b03b0
push id1356
push userttaubert@mozilla.com
push dateFri, 15 Feb 2013 09:40:57 +0000
treeherderfx-team@31e89328fe12 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs835551
milestone21.0a1
Bug 835551 - Add a new header consolidating non-configure-generated #defines that we require in order to build. r=ted
js/public/RequiredDefines.h
js/src/Makefile.in
js/src/js-confdefs.h.in
new file mode 100644
--- /dev/null
+++ b/js/public/RequiredDefines.h
@@ -0,0 +1,24 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sw=4 et tw=79:
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+/*
+ * Various #defines required to build SpiderMonkey.  Embedders should add this
+ * file to the start of the command line via -include or a similar mechanism,
+ * or SpiderMonkey public headers may not work correctly.
+ */
+
+#ifndef js_RequiredDefines_h___
+#define js_RequiredDefines_h___
+
+/*
+ * The c99 defining the limit macros (UINT32_MAX for example), says:
+ * C++ implementations should define these macros only when __STDC_LIMIT_MACROS
+ * is defined before <stdint.h> is included.
+ */
+#define __STDC_LIMIT_MACROS
+
+#endif /* js_RequiredDefines_h___ */
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -228,16 +228,17 @@ EXPORTS_js = \
 		Anchor.h \
 		CharacterEncoding.h \
 		GCAPI.h \
 		HashTable.h \
 		HeapAPI.h \
 		LegacyIntTypes.h \
 		MemoryMetrics.h \
 		PropertyKey.h \
+		RequiredDefines.h \
 		TemplateLib.h \
 		Utility.h \
 		Value.h \
 		Vector.h \
 		$(NULL)
 
 ###############################################
 # BEGIN enable non-releasable features
--- a/js/src/js-confdefs.h.in
+++ b/js/src/js-confdefs.h.in
@@ -3,15 +3,11 @@
  * Do not edit.
  */
 
 #ifndef _JS_CONFDEFS_H_
 #define _JS_CONFDEFS_H_
 
 @ALLDEFINES@
 
-/* The c99 defining the limit macros (UINT32_MAX for example), says:
- * C++ implementations should define these macros only when __STDC_LIMIT_MACROS
- * is defined before <stdint.h> is included. */
-#define __STDC_LIMIT_MACROS
+#include "js/RequiredDefines.h"
 
 #endif /* _JS_CONFDEFS_H_ */
-