RequiredDefines.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  2. * vim: set ts=8 sts=4 et sw=4 tw=99:
  3. * This Source Code Form is subject to the terms of the Mozilla Public
  4. * License, v. 2.0. If a copy of the MPL was not distributed with this
  5. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  6. /*
  7. * Various #defines required to build SpiderMonkey. Embedders should add this
  8. * file to the start of the command line via -include or a similar mechanism,
  9. * or SpiderMonkey public headers may not work correctly.
  10. */
  11. #ifndef js_RequiredDefines_h
  12. #define js_RequiredDefines_h
  13. /*
  14. * The c99 defining the limit macros (UINT32_MAX for example), says:
  15. *
  16. * C++ implementations should define these macros only when
  17. * __STDC_LIMIT_MACROS is defined before <stdint.h> is included.
  18. *
  19. * The same also occurs with __STDC_CONSTANT_MACROS for the constant macros
  20. * (INT8_C for example) used to specify a literal constant of the proper type,
  21. * and with __STDC_FORMAT_MACROS for the format macros (PRId32 for example) used
  22. * with the fprintf function family.
  23. */
  24. #define __STDC_LIMIT_MACROS
  25. #define __STDC_CONSTANT_MACROS
  26. #define __STDC_FORMAT_MACROS
  27. /* Also define a char16_t type if not provided by the compiler. */
  28. #include "mozilla/Char16.h"
  29. #endif /* js_RequiredDefines_h */