Updated Copyright year to 2013
[getmangos.git] / src / framework / Platform / CompilerDefs.h
blob6ece9acc98f1048019fcd303b66c8c47cd295b4b
1 /*
2 * Copyright (C) 2005-2013 MaNGOS <http://getmangos.com/>
4 * This program 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.
9 * This program 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.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef MANGOS_COMPILERDEFS_H
20 #define MANGOS_COMPILERDEFS_H
22 #define PLATFORM_WINDOWS 0
23 #define PLATFORM_UNIX 1
24 #define PLATFORM_APPLE 2
25 #define PLATFORM_INTEL 3
27 // must be first (win 64 also define WIN32)
28 #if defined( _WIN64 )
29 # define PLATFORM PLATFORM_WINDOWS
30 #elif defined( __WIN32__ ) || defined( WIN32 ) || defined( _WIN32 )
31 # define PLATFORM PLATFORM_WINDOWS
32 #elif defined( __APPLE_CC__ )
33 # define PLATFORM PLATFORM_APPLE
34 #elif defined( __INTEL_COMPILER )
35 # define PLATFORM PLATFORM_INTEL
36 #else
37 # define PLATFORM PLATFORM_UNIX
38 #endif
40 #define COMPILER_MICROSOFT 0
41 #define COMPILER_GNU 1
42 #define COMPILER_BORLAND 2
43 #define COMPILER_INTEL 3
45 #ifdef _MSC_VER
46 # define COMPILER COMPILER_MICROSOFT
47 #elif defined( __BORLANDC__ )
48 # define COMPILER COMPILER_BORLAND
49 #elif defined( __INTEL_COMPILER )
50 # define COMPILER COMPILER_INTEL
51 #elif defined( __GNUC__ )
52 # define COMPILER COMPILER_GNU
53 #else
54 # pragma error "FATAL ERROR: Unknown compiler."
55 #endif
57 #if COMPILER == COMPILER_MICROSOFT
58 # pragma warning( disable : 4267 ) // conversion from 'size_t' to 'int', possible loss of data
59 # pragma warning( disable : 4786 ) // identifier was truncated to '255' characters in the debug information
60 #endif
61 #endif