From c934d8ed6b819749b299bef62c29c9ec1e40f3b7 Mon Sep 17 00:00:00 2001 From: Lynix Date: Thu, 23 May 2013 02:12:22 +0200 Subject: [PATCH] Added NazaraStringify(Macro) Former-commit-id: 1b4b3165153013e9d2ff5e78c54c4a214deb7ac4 --- include/Nazara/Prerequesites.hpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/include/Nazara/Prerequesites.hpp b/include/Nazara/Prerequesites.hpp index b38528c6b..20b8aa7a6 100644 --- a/include/Nazara/Prerequesites.hpp +++ b/include/Nazara/Prerequesites.hpp @@ -35,6 +35,7 @@ #include +// Identification du compilateur ///TODO: Rajouter des tests d'identification de compilateurs #if defined(__BORLANDC__) #define NAZARA_COMPILER_BORDLAND @@ -70,8 +71,7 @@ #error This compiler is not fully supported #endif -#define NazaraUnused(a) (void) a - +// Identification de la plateforme #if defined(_WIN32) #define NAZARA_PLATFORM_WINDOWS @@ -133,15 +133,22 @@ #define NAZARA_API #endif +// Détection 64 bits #if !defined(NAZARA_PLATFORM_x64) && (defined(_WIN64) || defined(__amd64__) || defined(__x86_64__) || defined(__ia64__) || defined(__ia64) || \ defined(_M_IA64) || defined(__itanium__) || defined(__MINGW64__)) #define NAZARA_PLATFORM_x64 #endif +// Définit NDEBUG si NAZARA_DEBUG n'est pas présent #if !defined(NAZARA_DEBUG) && !defined(NDEBUG) #define NDEBUG #endif +// Macros supplémentaires +#define NazaraStringifyMacro(s) NazaraStringify(s) // http://gcc.gnu.org/onlinedocs/cpp/Stringification.html#Stringification +#define NazaraStringify(s) #s +#define NazaraUnused(a) (void) a + #include static_assert(sizeof(int8_t) == 1, "int8_t is not of the correct size" );