Pyrogenesis  trunk
ScriptExtraHeaders.h
Go to the documentation of this file.
1 /* Copyright (C) 2016 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 #include "js/Conversions.h"
50 #include "js/GCAPI.h"
51 #include "js/StructuredClone.h"
52 
53 #undef signbit
54 
55 #if MSC_VERSION
56 # pragma warning(pop)
57 #endif
58 #if CLANG_VERSION
59 # pragma clang diagnostic pop
60 #endif
61 #if GCC_VERSION
62 # pragma GCC diagnostic pop
63 #endif
64 
65 #endif // INCLUDED_SCRIPTEXTRAHEADERS