diff options
Diffstat (limited to 'tools/mapjson/mapjson.h')
-rw-r--r-- | tools/mapjson/mapjson.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/mapjson/mapjson.h b/tools/mapjson/mapjson.h new file mode 100644 index 0000000..6e961a2 --- /dev/null +++ b/tools/mapjson/mapjson.h @@ -0,0 +1,31 @@ +// mapjson.h + +#ifndef MAPJSON_H +#define MAPJSON_H + +#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 // MAPJSON_H |