1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/public/RequiredDefines.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,34 @@ 1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 1.5 + * vim: set ts=8 sts=4 et sw=4 tw=99: 1.6 + * This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +/* 1.11 + * Various #defines required to build SpiderMonkey. Embedders should add this 1.12 + * file to the start of the command line via -include or a similar mechanism, 1.13 + * or SpiderMonkey public headers may not work correctly. 1.14 + */ 1.15 + 1.16 +#ifndef js_RequiredDefines_h 1.17 +#define js_RequiredDefines_h 1.18 + 1.19 +/* 1.20 + * The c99 defining the limit macros (UINT32_MAX for example), says: 1.21 + * 1.22 + * C++ implementations should define these macros only when 1.23 + * __STDC_LIMIT_MACROS is defined before <stdint.h> is included. 1.24 + * 1.25 + * The same also occurs with __STDC_CONSTANT_MACROS for the constant macros 1.26 + * (INT8_C for example) used to specify a literal constant of the proper type, 1.27 + * and with __STDC_FORMAT_MACROS for the format macros (PRId32 for example) used 1.28 + * with the fprintf function family. 1.29 + */ 1.30 +#define __STDC_LIMIT_MACROS 1.31 +#define __STDC_CONSTANT_MACROS 1.32 +#define __STDC_FORMAT_MACROS 1.33 + 1.34 +/* Also define a char16_t type if not provided by the compiler. */ 1.35 +#include "mozilla/Char16.h" 1.36 + 1.37 +#endif /* js_RequiredDefines_h */