summaryrefslogtreecommitdiff
path: root/tools/br_ips/global.h
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2019-07-11 21:16:23 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2019-07-11 21:16:23 -0400
commit250a331df9dbd312d572aaf0d629503417cfc9d4 (patch)
tree34f31dba3c816e5c308d1baf336fe4541a208d79 /tools/br_ips/global.h
parent97ab00ba2189c4d8b483ddcad3fc7cf97386122b (diff)
Track tools srcs
Diffstat (limited to 'tools/br_ips/global.h')
-rw-r--r--tools/br_ips/global.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/br_ips/global.h b/tools/br_ips/global.h
new file mode 100644
index 0000000..b82c516
--- /dev/null
+++ b/tools/br_ips/global.h
@@ -0,0 +1,27 @@
+#ifndef GUARD_BR_IPS_GLOBAL_H
+#define GUARD_BR_IPS_GLOBAL_H
+
+#ifdef _MSC_VER
+
+#define FATAL_ERROR(format, ...) \
+do { \
+ fprintf(stderr, format, __VA_ARGS__); \
+ exit(1); \
+} while (0)
+
+#else
+
+#define FATAL_ERROR(format, ...) \
+do { \
+ fprintf(stderr, format, ##__VA_ARGS__); \
+ exit(1); \
+} while (0)
+
+#endif // _MSC_VER
+
+typedef struct Hunk {
+ uint32_t offset;
+ size_t size;
+} hunk_t;
+
+#endif //GUARD_BR_IPS_GLOBAL_H