Go to the documentation of this file.
47 #ifndef _MIRA_PLATFORM_H_
48 #define _MIRA_PLATFORM_H_
72 #if defined(__x86_64__) || defined(_M_X64)
75 # define MIRA_ARCH_X86
76 # define MIRA_ARCH_X86_64
77 #elif defined(__i386) || defined(_M_IX86)
80 # define MIRA_ARCH_X86
81 # define MIRA_ARCH_X86_32
82 #elif defined(__aarch64__)
85 # define MIRA_ARCH_ARM
86 # define MIRA_ARCH_ARM_64
87 #elif defined(__arm__) || defined(_M_ARM)
90 # define MIRA_ARCH_ARM
91 # define MIRA_ARCH_ARM_32
96 # define MIRA_FUNCTION __PRETTY_FUNCTION__
98 # define MIRA_FUNCTION __FUNCTION__
102 # define MIRA_DEFAULT_CONSTRUCTOR =default;
104 # define MIRA_DEFAULT_CONSTRUCTOR {}
110 # // Disable some warnings in context of DLL exports/imports
111 # pragma warning(disable : 4251)
112 # pragma warning(disable : 4275)
114 # // Disable some more warnings on Windows
115 # pragma warning(disable : 4355)
117 # // Disable "conversion from 'size_t' to 'int', possible loss of data"
118 # pragma warning(disable : 4267)
119 # // Disable "conversion from '__int64' to 'int', possible loss of data"
120 # pragma warning(disable : 4244)
123 # ifndef WIN32_LEAN_AND_MEAN
124 # // Avoid include old or unusual used Windows heads (like old Winsock.h)
125 # define WIN32_LEAN_AND_MEAN 1
127 # include <windows.h>
150 # ifdef MIRA_BASE_EXPORTS
151 # define MIRA_BASE_EXPORT __declspec(dllexport)
153 # define MIRA_BASE_EXPORT __declspec(dllimport)
156 # define MIRA_BASE_EXPORT
167 #if defined(__GNUC__)
168 # if defined(__GNUC_PATCHLEVEL__)
169 # define MIRA_GNUC_VERSION (__GNUC__ * 10000 \
170 + __GNUC_MINOR__ * 100 \
171 + __GNUC_PATCHLEVEL__)
173 # define MIRA_GNUC_VERSION (__GNUC__ * 10000 \
174 + __GNUC_MINOR__ * 100)
187 # define MIRA_DEPRECATED(text, decl) __declspec(deprecated(text)) decl
188 # define MIRA_DEPRECATED_CLASS(text) __declspec(deprecated(text))
190 # if MIRA_GNUC_VERSION < 40500
191 # define MIRA_DEPRECATED(text, decl) __attribute__ ((deprecated)) decl
192 # define MIRA_DEPRECATED_CLASS(text) __attribute__ ((deprecated))
194 # define MIRA_DEPRECATED(text, decl) __attribute__ ((deprecated(text))) decl
195 # define MIRA_DEPRECATED_CLASS(text) __attribute__ ((deprecated(text)))