32 lines
618 B
C
Raw Normal View History

2015-11-13 21:57:22 -08:00
// Copyright (c) 2015 YamaArashi
#ifndef GLOBAL_H
#define GLOBAL_H
#include <stdio.h>
#include <stdlib.h>
#ifdef _MSC_VER
#define FATAL_ERROR(format, ...) \
do { \
2015-11-13 22:44:23 -08:00
fprintf(stderr, format, __VA_ARGS__); \
exit(1); \
2015-11-13 21:57:22 -08:00
} while (0)
2015-11-23 17:44:06 -08:00
#define UNUSED
2015-11-13 21:57:22 -08:00
#else
#define FATAL_ERROR(format, ...) \
do { \
2015-11-13 22:44:23 -08:00
fprintf(stderr, format, ##__VA_ARGS__); \
exit(1); \
2015-11-13 21:57:22 -08:00
} while (0)
2015-11-23 17:44:06 -08:00
#define UNUSED __attribute__((__unused__))
2015-11-13 21:57:22 -08:00
2015-11-23 17:44:06 -08:00
#endif // _MSC_VER
2015-11-13 21:57:22 -08:00
#endif // GLOBAL_H