GoldFish Engine
Quite simple and lightweight game engine
Loading...
Searching...
No Matches
compat.h
Go to the documentation of this file.
1
7
#ifndef __GF_TYPE_COMPAT_H__
8
#define __GF_TYPE_COMPAT_H__
9
10
#ifdef __STDC_VERSION__
11
#if __STDC_VERSION__ >= 199901L
12
#define GF_IS_C99
13
#endif
14
#endif
15
16
#ifdef GF_IS_C99
17
#include <stdbool.h>
18
#include <stdint.h>
19
20
#define gf_true true
21
#define gf_false false
22
typedef
bool
gf_bool_t;
23
24
typedef
uint8_t gf_uint8_t;
25
typedef
uint16_t gf_uint16_t;
26
typedef
uint32_t gf_uint32_t;
27
typedef
uint64_t gf_uint64_t;
28
29
typedef
int8_t gf_int8_t;
30
typedef
int16_t gf_int16_t;
31
typedef
int32_t gf_int32_t;
32
typedef
int64_t gf_int64_t;
33
#else
34
#define gf_true 1
35
#define gf_false (!gf_true)
36
typedef
unsigned
char
gf_bool_t;
37
38
typedef
unsigned
char
gf_uint8_t;
39
typedef
unsigned
short
gf_uint16_t;
40
typedef
unsigned
int
gf_uint32_t;
41
typedef
gf_uint32_t gf_uint64_t;
42
43
typedef
signed
char
gf_int8_t;
44
typedef
signed
short
gf_int16_t;
45
typedef
signed
int
gf_int32_t;
46
typedef
gf_int32_t gf_int64_t;
47
#endif
48
49
#endif
include
gf_type
compat.h
Generated by
1.9.8