diff options
author | Martmists <martmists@gmail.com> | 2020-04-22 13:57:09 +0200 |
---|---|---|
committer | Martmists <martmists@gmail.com> | 2020-04-22 13:57:09 +0200 |
commit | 9b3107c478c9f39c17ef4171c9c5330adcb1385a (patch) | |
tree | e63d60215b5ba9405d7aeb3322873d26c5f03cc1 /tools/jsonproc/jsonproc.h | |
parent | dcdf58739922de3b3bbc828f46e36b83f53c52a0 (diff) | |
parent | 5ee605688aaea7fe6b4573dc2ce5ce24cd671855 (diff) |
Merge branch 'master' into os_lib
Diffstat (limited to 'tools/jsonproc/jsonproc.h')
-rw-r--r-- | tools/jsonproc/jsonproc.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tools/jsonproc/jsonproc.h b/tools/jsonproc/jsonproc.h new file mode 100644 index 00000000..575fb375 --- /dev/null +++ b/tools/jsonproc/jsonproc.h @@ -0,0 +1,32 @@ +// jsonproc.h + +#ifndef JSONPROC_H +#define JSONPROC_H + +#include <cstdlib> +#include <cstdio> +using std::fprintf; using std::exit; + +#include <cstdlib> + +#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 + +#endif // JSONPROC_H |