Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ScriptExtraHeaders.h
Go to the documentation of this file.
1 /* Copyright (C) 2013 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 >= 402 // (older GCCs don't support this pragma)
29 # if GCC_VERSION >= 406 // store user flags
30 # pragma GCC diagnostic push
31 # endif
32 # pragma GCC diagnostic ignored "-Wunused-parameter"
33 # pragma GCC diagnostic ignored "-Wredundant-decls"
34 # if GCC_VERSION >= 408
35 # pragma GCC diagnostic ignored "-Wunused-local-typedefs" // caused by js/debug.h
36 # endif
37 #endif
38 #if MSC_VERSION
39 # pragma warning(push)
40 # pragma warning(disable:4100) // "unreferenced formal parameter"
41 # pragma warning(disable:4800) // "forcing value to bool 'true' or 'false' (performance warning)"
42 #endif
43 
44 // Redefine signbit to fix build error in GCC
45 #ifndef signbit
46 # define signbit std::signbit
47 #endif
48 
49 #include "js/jstypedarray.h"
50 #include "js/jsdbgapi.h"
51 
52 #undef signbit
53 
54 #if MSC_VERSION
55 # pragma warning(pop)
56 #endif
57 #if GCC_VERSION >= 402
58 # pragma GCC diagnostic warning "-Wunused-parameter"
59 # pragma GCC diagnostic warning "-Wredundant-decls"
60 # if GCC_VERSION >= 406
61 # pragma GCC diagnostic pop // restore user flags
62 # endif
63 #endif
64 
65 #endif // INCLUDED_SCRIPTEXTRAHEADERS