28 #ifndef __RTTR_CORE_PREREQUISITES_H__
29 #define __RTTR_CORE_PREREQUISITES_H__
31 #include "rttr/base/version.h"
36 #define RTTR_PLATFORM_WINDOWS 1
37 #define RTTR_PLATFORM_LINUX 2
39 #define RTTR_COMPILER_MSVC 1
40 #define RTTR_COMPILER_GNUC 2
42 #define RTTR_ENDIAN_LITTLE 1
43 #define RTTR_ENDIAN_BIG 2
45 #define RTTR_ARCH_32 1
46 #define RTTR_ARCH_64 2
51 #if defined( __WIN32__ ) || defined( _WIN32 )
52 # define RTTR_PLATFORM RTTR_PLATFORM_WINDOWS
54 # define RTTR_PLATFORM RTTR_PLATFORM_LINUX
60 #if defined( __GNUC__ )
61 # define RTTR_COMPILER RTTR_COMPILER_GNUC
62 # define RTTR_COMP_VER (((__GNUC__)*1000) + \
63 (__GNUC_MINOR__*100) + \
65 #elif defined( _MSC_VER )
66 # define RTTR_COMPILER RTTR_COMPILER_MSVC
67 # define RTTR_COMP_VER _MSC_VER
69 # error "No known compiler. Abort! Abort!"
76 #if defined(__x86_64__) || defined(_M_X64) || defined(__powerpc64__) || defined(__alpha__) ||\
77 defined(__ia64__) || defined(__s390__) || defined(__s390x__)
78 # define RTTR_ARCH_TYPE RTTR_ARCH_64
80 # define RTTR_ARCH_TYPE RTTR_ARCH_32
83 #if RTTR_COMPILER == RTTR_COMPILER_MSVC
84 # define RTTR_INLINE inline
85 # define RTTR_FORCE_INLINE __forceinline
86 #elif RTTR_COMPILER == RTTR_COMPILER_GNUC
87 # define RTTR_INLINE inline
88 # define RTTR_FORCE_INLINE inline __attribute__((always_inline))
90 # define RTTR_INLINE inline
91 # define RTTR_FORCE_INLINE inline // no force inline for other platforms possible
98 #if RTTR_COMPILER == RTTR_COMPILER_MSVC || __MINGW32__ || __CYGWIN__
99 # define RTTR_HELPER_DLL_IMPORT __declspec( dllimport )
100 # define RTTR_HELPER_DLL_EXPORT __declspec( dllexport )
101 # define RTTR_HELPER_DLL_LOCAL
102 #elif RTTR_COMPILER == RTTR_COMPILER_GNUC
103 # if RTTR_COMP_VER >= 4000
104 # define RTTR_HELPER_DLL_IMPORT __attribute__ ((visibility ("default")))
105 # define RTTR_HELPER_DLL_EXPORT __attribute__ ((visibility ("default")))
106 # define RTTR_HELPER_DLL_LOCAL __attribute__ ((visibility ("hidden")))
108 # define RTTR_HELPER_DLL_IMPORT
109 # define RTTR_HELPER_DLL_EXPORT
110 # define RTTR_HELPER_DLL_LOCAL
113 # error "Do not know how to export classes for this platform"
116 #ifdef RTTR_DLL // compiled as a DLL
117 # ifdef RTTR_DLL_EXPORTS // defined if we are building the DLL
118 # define RTTR_API RTTR_HELPER_DLL_EXPORT
120 # define RTTR_API RTTR_HELPER_DLL_IMPORT
122 # define RTTR_LOCAL RTTR_HELPER_DLL_LOCAL
123 #else // it's a static lib.
141 #if RTTR_COMPILER == RTTR_COMPILER_MSVC
143 # pragma warning (push)
146 # pragma warning (disable : 4786)
150 # pragma warning (disable : 4503)
154 # pragma warning (disable : 4251)
159 # pragma warning (disable : 4275)
164 # pragma warning( disable : 4290 )
169 # pragma warning( disable: 4661)
176 # pragma warning( disable: 4996)
180 # pragma warning (disable : 4100)
185 #endif // __RTTR_CORE_PREREQUISITES_H__
unsigned int uint32
Definition: core_prerequisites.h:133
int int32
Definition: core_prerequisites.h:136
char int8
Definition: core_prerequisites.h:135
unsigned short uint16
Definition: core_prerequisites.h:132
short int16
Definition: core_prerequisites.h:134
unsigned char uint8
Definition: core_prerequisites.h:131