summaryrefslogtreecommitdiffstats
path: root/Tools/MCADefrag/Globals.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-05-25 00:21:39 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-05-25 00:21:39 +0200
commitf55f5ec47f67dcc31e56bc364297aaf60d75b0c3 (patch)
tree62262220c9342b0eab368f553a836d736a39d972 /Tools/MCADefrag/Globals.h
parentUpdate CompositeChat.h (diff)
parentUpdate README.md (diff)
downloadcuberite-f55f5ec47f67dcc31e56bc364297aaf60d75b0c3.tar
cuberite-f55f5ec47f67dcc31e56bc364297aaf60d75b0c3.tar.gz
cuberite-f55f5ec47f67dcc31e56bc364297aaf60d75b0c3.tar.bz2
cuberite-f55f5ec47f67dcc31e56bc364297aaf60d75b0c3.tar.lz
cuberite-f55f5ec47f67dcc31e56bc364297aaf60d75b0c3.tar.xz
cuberite-f55f5ec47f67dcc31e56bc364297aaf60d75b0c3.tar.zst
cuberite-f55f5ec47f67dcc31e56bc364297aaf60d75b0c3.zip
Diffstat (limited to 'Tools/MCADefrag/Globals.h')
-rw-r--r--Tools/MCADefrag/Globals.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/Tools/MCADefrag/Globals.h b/Tools/MCADefrag/Globals.h
index 0f31de7e3..f70a90d17 100644
--- a/Tools/MCADefrag/Globals.h
+++ b/Tools/MCADefrag/Globals.h
@@ -22,6 +22,15 @@
#define ALIGN_8
#define ALIGN_16
+ #define FORMATSTRING(formatIndex, va_argsIndex)
+
+ // MSVC has its own custom version of zu format
+ #define SIZE_T_FMT "%Iu"
+ #define SIZE_T_FMT_PRECISION(x) "%" #x "Iu"
+ #define SIZE_T_FMT_HEX "%Ix"
+
+ #define NORETURN __declspec(noreturn)
+
#elif defined(__GNUC__)
// TODO: Can GCC explicitly mark classes as abstract (no instances can be created)?
@@ -39,6 +48,12 @@
#define stricmp strcasecmp
#define FORMATSTRING(formatIndex,va_argsIndex)
+
+ #define SIZE_T_FMT "%zu"
+ #define SIZE_T_FMT_PRECISION(x) "%" #x "zu"
+ #define SIZE_T_FMT_HEX "%zx"
+
+ #define NORETURN __attribute((__noreturn__))
#else
#error "You are using an unsupported compiler, you might need to #define some stuff here for your compiler"