Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
ScriptExtraHeaders.h
Go to the documentation of this file.
1/* Copyright (C) 2023 Wildfire Games.
2 * This file is part of 0 A.D.
3 *
4 * 0 A.D. is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * 0 A.D. is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef INCLUDED_SCRIPTEXTRAHEADERS
19#define INCLUDED_SCRIPTEXTRAHEADERS
20
21// Includes occasionally-used SpiderMonkey headers for typed arrays and debug API,
22// with appropriate tweaks to fix warnings and build errors. (Most code should
23// just include ScriptTypes.h directly to get the standard jsapi.h.)
24
26
27// Ignore some harmless warnings
28#if GCC_VERSION
29# pragma GCC diagnostic push
30# pragma GCC diagnostic ignored "-Wunused-parameter"
31# pragma GCC diagnostic ignored "-Wredundant-decls"
32# pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
33#endif
34#if CLANG_VERSION
35# pragma clang diagnostic push
36# pragma clang diagnostic ignored "-Wmismatched-tags"
37#endif
38#if MSC_VERSION
39// reduce the warning level for the SpiderMonkey headers
40# pragma warning(push, 1)
41#endif
42
43// Redefine signbit to fix build error in GCC
44#ifndef signbit
45# define signbit std::signbit
46#endif
47
48#include "jsfriendapi.h"
49
50#include "js/AllocPolicy.h"
51#include "js/Array.h"
52#include "js/ArrayBuffer.h"
53#include "js/CompilationAndEvaluation.h"
54#include "js/Conversions.h"
55#include "js/ContextOptions.h"
56#include "js/ForOfIterator.h"
57#include "js/GCAPI.h"
58#include "js/GCHashTable.h"
59#include "js/SourceText.h"
60#include "js/Proxy.h"
61#include "js/Warnings.h"
62
63#include "js/experimental/TypedData.h"
64
65#include "js/friend/ErrorMessages.h"
66
67#undef signbit
68
69#if MSC_VERSION
70# pragma warning(pop)
71#endif
72#if CLANG_VERSION
73# pragma clang diagnostic pop
74#endif
75#if GCC_VERSION
76# pragma GCC diagnostic pop
77#endif
78
79#endif // INCLUDED_SCRIPTEXTRAHEADERS