OregonCore  revision 3611e8a-git
Your Favourite TBC server
Define.h
Go to the documentation of this file.
1 /*
2  * This file is part of the OregonCore Project. See AUTHORS file for Copyright information
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License as published by the
6  * Free Software Foundation; either version 2 of the License, or (at your
7  * option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef OREGON_DEFINE_H
19 #define OREGON_DEFINE_H
20 
21 #include <sys/types.h>
22 
23 #include <ace/Basic_Types.h>
24 #include <ace/ACE_export.h>
25 
26 #include "Platform/CompilerDefs.h"
27 
28 #define OREGON_LITTLEENDIAN 0
29 #define OREGON_BIGENDIAN 1
30 
31 #if !defined(OREGON_ENDIAN)
32 # if defined (ACE_BIG_ENDIAN)
33 # define OREGON_ENDIAN OREGON_BIGENDIAN
34 # else //ACE_BYTE_ORDER != ACE_BIG_ENDIAN
35 # define OREGON_ENDIAN OREGON_LITTLEENDIAN
36 # endif //ACE_BYTE_ORDER
37 #endif //OREGON_ENDIAN
38 
39 #if PLATFORM == PLATFORM_WINDOWS
40 # define OREGON_PATH_MAX MAX_PATH
41 # ifndef DECLSPEC_NORETURN
42 # define DECLSPEC_NORETURN __declspec(noreturn)
43 # endif //DECLSPEC_NORETURN
44 #else //PLATFORM != PLATFORM_WINDOWS
45 # define OREGON_PATH_MAX PATH_MAX
46 # define DECLSPEC_NORETURN
47 #endif //PLATFORM
48 
49 #if !defined(COREDEBUG)
50 # define OREGON_INLINE inline
51 #else //COREDEBUG
52 # if !defined(OREGON_DEBUG)
53 # define OREGON_DEBUG
54 # endif //OREGON_DEBUG
55 # define OREGON_INLINE
56 #endif
57 
58 #if COMPILER == COMPILER_GNU
59 # define ATTR_NORETURN __attribute__((noreturn))
60 # define ATTR_PRINTF(F,V) __attribute__ ((format (printf, F, V)))
61 #else //COMPILER != COMPILER_GNU
62 # define ATTR_NORETURN
63 # define ATTR_PRINTF(F,V)
64 #endif //COMPILER == COMPILER_GNU
65 
66 typedef ACE_INT64 int64;
67 typedef ACE_INT32 int32;
68 typedef ACE_INT16 int16;
69 typedef ACE_INT8 int8;
70 typedef ACE_UINT64 uint64;
71 typedef ACE_UINT32 uint32;
72 typedef ACE_UINT16 uint16;
73 typedef ACE_UINT8 uint8;
74 
75 #if COMPILER != COMPILER_MICROSOFT
76 typedef uint16 WORD;
77 typedef uint32 DWORD;
78 #endif //COMPILER
79 
81 
82 #endif //OREGON_DEFINE_H
83 
ACE_INT32 int32
Definition: Define.h:67
ACE_INT8 int8
Definition: Define.h:69
ACE_UINT8 uint8
Definition: Define.h:73
ACE_UINT64 uint64
Definition: Define.h:70
uint64 OBJECT_HANDLE
Definition: Define.h:80
ACE_INT64 int64
Definition: Define.h:66
ACE_UINT16 uint16
Definition: Define.h:72
ACE_INT16 int16
Definition: Define.h:68
ACE_UINT32 uint32
Definition: Define.h:71