1 | /* |
---|
2 | * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> |
---|
3 | * |
---|
4 | * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> |
---|
5 | * |
---|
6 | * This program is free software; you can redistribute it and/or modify |
---|
7 | * it under the terms of the GNU General Public License as published by |
---|
8 | * the Free Software Foundation; either version 2 of the License, or |
---|
9 | * (at your option) any later version. |
---|
10 | * |
---|
11 | * This program is distributed in the hope that it will be useful, |
---|
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
14 | * GNU General Public License for more details. |
---|
15 | * |
---|
16 | * You should have received a copy of the GNU General Public License |
---|
17 | * along with this program; if not, write to the Free Software |
---|
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
19 | */ |
---|
20 | |
---|
21 | #ifndef TRINITY_COMPILERDEFS_H |
---|
22 | #define TRINITY_COMPILERDEFS_H |
---|
23 | |
---|
24 | #define PLATFORM_WINDOWS 0 |
---|
25 | #define PLATFORM_UNIX 1 |
---|
26 | #define PLATFORM_APPLE 2 |
---|
27 | #define PLATFORM_INTEL 3 |
---|
28 | |
---|
29 | // must be first (win 64 also define WIN32) |
---|
30 | #if defined( _WIN64 ) |
---|
31 | # define PLATFORM PLATFORM_WINDOWS |
---|
32 | #elif defined( __WIN32__ ) || defined( WIN32 ) || defined( _WIN32 ) |
---|
33 | # define PLATFORM PLATFORM_WINDOWS |
---|
34 | #elif defined( __APPLE_CC__ ) |
---|
35 | # define PLATFORM PLATFORM_APPLE |
---|
36 | #elif defined( __INTEL_COMPILER ) |
---|
37 | # define PLATFORM PLATFORM_INTEL |
---|
38 | #else |
---|
39 | # define PLATFORM PLATFORM_UNIX |
---|
40 | #endif |
---|
41 | |
---|
42 | #define COMPILER_MICROSOFT 0 |
---|
43 | #define COMPILER_GNU 1 |
---|
44 | #define COMPILER_BORLAND 2 |
---|
45 | #define COMPILER_INTEL 3 |
---|
46 | |
---|
47 | #ifdef _MSC_VER |
---|
48 | # define COMPILER COMPILER_MICROSOFT |
---|
49 | #elif defined( __BORLANDC__ ) |
---|
50 | # define COMPILER COMPILER_BORLAND |
---|
51 | #elif defined( __INTEL_COMPILER ) |
---|
52 | # define COMPILER COMPILER_INTEL |
---|
53 | #elif defined( __GNUC__ ) |
---|
54 | # define COMPILER COMPILER_GNU |
---|
55 | #else |
---|
56 | # pragma error "FATAL ERROR: Unknown compiler." |
---|
57 | #endif |
---|
58 | |
---|
59 | #if COMPILER == COMPILER_MICROSOFT |
---|
60 | # pragma warning( disable : 4267 ) // conversion from 'size_t' to 'int', possible loss of data |
---|
61 | # pragma warning( disable : 4786 ) // identifier was truncated to '255' characters in the debug information |
---|
62 | #endif |
---|
63 | #endif |
---|