2016-08-02 18:58:30 +02:00
|
|
|
/* Copyright (C) 2016 Wildfire Games.
|
2011-07-17 01:24:14 +02:00
|
|
|
* This file is part of 0 A.D.
|
|
|
|
*
|
|
|
|
* 0 A.D. is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* 0 A.D. is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef INCLUDED_SCRIPTEXTRAHEADERS
|
|
|
|
#define INCLUDED_SCRIPTEXTRAHEADERS
|
|
|
|
|
|
|
|
// Includes occasionally-used SpiderMonkey headers for typed arrays and debug API,
|
|
|
|
// with appropriate tweaks to fix warnings and build errors. (Most code should
|
|
|
|
// just include ScriptTypes.h directly to get the standard jsapi.h.)
|
|
|
|
|
|
|
|
#include "scriptinterface/ScriptTypes.h"
|
|
|
|
|
|
|
|
// Ignore some harmless warnings
|
2015-01-24 15:46:52 +01:00
|
|
|
#if GCC_VERSION
|
|
|
|
# pragma GCC diagnostic push
|
2011-07-17 01:24:14 +02:00
|
|
|
# pragma GCC diagnostic ignored "-Wunused-parameter"
|
|
|
|
# pragma GCC diagnostic ignored "-Wredundant-decls"
|
2014-03-28 21:26:32 +01:00
|
|
|
# pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
|
2011-07-17 01:24:14 +02:00
|
|
|
#endif
|
2015-02-22 22:15:47 +01:00
|
|
|
#if CLANG_VERSION
|
|
|
|
# pragma clang diagnostic push
|
|
|
|
# pragma clang diagnostic ignored "-Wmismatched-tags"
|
|
|
|
#endif
|
2011-07-17 01:24:14 +02:00
|
|
|
#if MSC_VERSION
|
2015-01-24 15:46:52 +01:00
|
|
|
// reduce the warning level for the SpiderMonkey headers
|
|
|
|
# pragma warning(push, 1)
|
2011-07-17 01:24:14 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// Redefine signbit to fix build error in GCC
|
2012-01-17 23:05:43 +01:00
|
|
|
#ifndef signbit
|
|
|
|
# define signbit std::signbit
|
|
|
|
#endif
|
2011-07-17 01:24:14 +02:00
|
|
|
|
2014-03-28 21:26:32 +01:00
|
|
|
#include "jsfriendapi.h"
|
2016-09-02 18:23:44 +02:00
|
|
|
#include "js/Conversions.h"
|
2014-03-28 21:26:32 +01:00
|
|
|
#include "js/GCAPI.h"
|
2015-01-24 15:46:52 +01:00
|
|
|
#include "js/StructuredClone.h"
|
2011-07-17 01:24:14 +02:00
|
|
|
|
|
|
|
#undef signbit
|
|
|
|
|
|
|
|
#if MSC_VERSION
|
|
|
|
# pragma warning(pop)
|
|
|
|
#endif
|
2015-02-22 22:15:47 +01:00
|
|
|
#if CLANG_VERSION
|
|
|
|
# pragma clang diagnostic pop
|
|
|
|
#endif
|
2015-01-24 15:46:52 +01:00
|
|
|
#if GCC_VERSION
|
|
|
|
# pragma GCC diagnostic pop
|
2011-07-17 01:24:14 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // INCLUDED_SCRIPTEXTRAHEADERS
|