/* Copyright (C) 2009 Wildfire Games. * 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 . */ /* * precompiled header. must be the first non-comment part of every * source file (VC6..8 requirement). */ #define _SECURE_SCL 0 #include "lib/sysdep/compiler.h" // MSC_VERSION, HAVE_PCH #include "lib/sysdep/os.h" // (must come before posix_types.h) // disable some common and annoying warnings // (done as soon as possible so that headers below are covered) #if MSC_VERSION // .. temporarily disabled W4 (unimportant but ought to be fixed) # pragma warning(disable:4201) // nameless struct (Matrix3D) # pragma warning(disable:4244) // conversion from uintN to uint8 // .. permanently disabled W4 # pragma warning(disable:4127) // conditional expression is constant; rationale: see STMT in lib.h. # pragma warning(disable:4996) // function is deprecated # pragma warning(disable:4786) // identifier truncated to 255 chars # pragma warning(disable:4351) // yes, default init of array entries is desired // .. disabled only for the precompiled headers # pragma warning(disable:4702) // unreachable code (frequent in STL) // .. VS2005 code analysis (very frequent ones) # if MSC_VERSION >= 1400 # pragma warning(disable:6011) // dereferencing NULL pointer # pragma warning(disable:6246) // local declaration hides declaration of the same name in outer scope # endif # if ICC_VERSION # pragma warning(disable:383) // value copied to temporary, reference to temporary used # pragma warning(disable:981) // operands are evaluted in unspecified order # pragma warning(disable:1418) // external function definition with no prior declaration (raised for all non-static function templates) # pragma warning(disable:1572) // floating-point equality and inequality comparisons are unreliable # pragma warning(disable:1786) // function is deprecated (disabling 4996 isn't sufficient) # pragma warning(disable:1684) // conversion from pointer to same-sized integral type # endif #endif // // headers made available everywhere for convenience // // (must come before any system headers because it fixes off_t) #include "lib/posix/posix_types.h" #include "lib/sysdep/arch.h" #include "lib/sysdep/stl.h" #include "lib/lib_api.h" #include "lib/types.h" #include "lib/lib.h" #include "lib/lib_errors.h" #include "lib/code_annotation.h" #include "lib/secure_crt.h" #include "lib/debug.h" // Boost // .. if this package isn't going to be statically linked, we're better off // using Boost via DLL. (otherwise, we would have to ensure the exact same // compiler is used, which is a pain because MSC8, MSC9 and ICC 10 are in use) #ifndef LIB_STATIC_LINK # define BOOST_ALL_DYN_LINK #endif // the following boost libraries have been included in TR1 and are // thus deemed usable: #include using boost::shared_ptr; #include using boost::array; #include using boost::mem_fn; #include using boost::function; #include using boost::bind; #include "lib/external_libraries/boost_filesystem.h" // (this must come after boost and common lib headers) #include "lib/posix/posix.h" // // precompiled headers // // if PCHs are supported and enabled, we make an effort to include all // system headers. otherwise, only a few central headers (e.g. types) // are pulled in and source files must include all the system headers // they use. this policy ensures good compile performance whether or not // PCHs are being used. #include "lib/config.h" // CONFIG_ENABLE_PCH #include "lib/sysdep/compiler.h" // HAVE_PCH #if CONFIG_ENABLE_PCH && HAVE_PCH // anything placed here won't need to be compiled in each translation unit, // but will cause a complete rebuild if they change. // all new-form C library headers #include #include #include #include //#include // defines e.g. "and" to "&". unnecessary and causes trouble with asm. #include #include #include //#include // incompatible with libpng on Debian/Ubuntu #include #include #include #include #include #include #include #include #include // all C++98 STL headers #include #include #include #include #include #include #include #include #include #include #include #include #include // all other C++98 headers #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // STL extensions #if GCC_VERSION >= 402 // (see comment in stl.h about GCC versions) # include # include #elif GCC_VERSION # include # include #else # include # include #endif #endif // #if CONFIG_PCH // restore temporarily-disabled warnings #if MSC_VERSION # pragma warning(default:4702) #endif