summaryrefslogtreecommitdiff
path: root/tools/nitrogfx/global.h
diff options
context:
space:
mode:
authorMartmists <martmists@gmail.com>2020-04-22 13:57:09 +0200
committerMartmists <martmists@gmail.com>2020-04-22 13:57:09 +0200
commit9b3107c478c9f39c17ef4171c9c5330adcb1385a (patch)
treee63d60215b5ba9405d7aeb3322873d26c5f03cc1 /tools/nitrogfx/global.h
parentdcdf58739922de3b3bbc828f46e36b83f53c52a0 (diff)
parent5ee605688aaea7fe6b4573dc2ce5ce24cd671855 (diff)
Merge branch 'master' into os_lib
Diffstat (limited to 'tools/nitrogfx/global.h')
-rw-r--r--tools/nitrogfx/global.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/nitrogfx/global.h b/tools/nitrogfx/global.h
new file mode 100644
index 00000000..65dd351d
--- /dev/null
+++ b/tools/nitrogfx/global.h
@@ -0,0 +1,31 @@
+// Copyright (c) 2015 YamaArashi
+
+#ifndef GLOBAL_H
+#define GLOBAL_H
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifdef _MSC_VER
+
+#define FATAL_ERROR(format, ...) \
+do { \
+ fprintf(stderr, format, __VA_ARGS__); \
+ exit(1); \
+} while (0)
+
+#define UNUSED
+
+#else
+
+#define FATAL_ERROR(format, ...) \
+do { \
+ fprintf(stderr, format, ##__VA_ARGS__); \
+ exit(1); \
+} while (0)
+
+#define UNUSED __attribute__((__unused__))
+
+#endif // _MSC_VER
+
+#endif // GLOBAL_H