summaryrefslogtreecommitdiff
path: root/tools/src/gbagfx/global.h
blob: b6fea5a0794dab92ad3b7cb2e2bec31aa7c77886 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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