forked from voyageur/openglide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsdk2_unix.h.in
70 lines (62 loc) · 1.92 KB
/
sdk2_unix.h.in
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//**************************************************************
//* OpenGLide - Glide to OpenGL Wrapper
//* http://openglide.sourceforge.net
//*
//* OpenGLide is OpenSource under LGPL license
//* Originaly made by Fabio Barros
//* Modified by Paul for Glidos (http://www.glidos.net)
//* Linux version by Simon White
//**************************************************************
#ifndef __SDK2_UNIX_H__
#define __SDK2_UNIX_H__
/* Define the sizeof of types in bytes */
#define FXSIZEOF_UNSIGNED_CHAR @SIZEOF_UNSIGNED_CHAR@
#define FXSIZEOF_UNSIGNED_SHORT @SIZEOF_UNSIGNED_SHORT@
#define FXSIZEOF_UNSIGNED_INT @SIZEOF_UNSIGNED_INT@
#define FXSIZEOF_UNSIGNED_LONG @SIZEOF_UNSIGNED_LONG@
#define FXSIZEOF_UNSIGNED_LONG_LONG @SIZEOF_UNSIGNED_LONG_LONG@
#define FXSIZEOF_INT_P @SIZEOF_INT_P@
/*
** basic data types
*/
#if FXSIZEOF_UNSIGNED_CHAR != 1
# error "sizeof (unsigned char) != 1"
#else
typedef unsigned char FxU8;
typedef signed char FxI8;
#endif
#if FXSIZEOF_UNSIGNED_SHORT != 2
# error "sizeof (unsigned short) != 2"
#else
typedef unsigned short FxU16;
typedef signed short FxI16;
#endif
#if FXSIZEOF_UNSIGNED_INT == 4
typedef unsigned int FxU32;
typedef signed int FxI32;
#elif FXSIZEOF_UNSIGNED_LONG == 4
typedef unsigned long FxU32;
typedef signed long FxI32;
#else
# error "can't find sizeof(type) of 4 bytes!"
#endif
#if FXSIZEOF_UNSIGNED_LONG == 8
typedef unsigned long FxU64;
typedef signed long FxI64;
#elif FXSIZEOF_UNSIGNED_LONG_LONG == 8
typedef unsigned long long FxU64;
typedef signed long long FxI64;
#else
# error "can't find data type of 8 bytes"
#endif
#if FXSIZEOF_INT_P == 4
typedef FxU32 FxU;
typedef FxI32 FxI;
#else
typedef FxU64 FxU;
typedef FxI64 FxI;
#endif
typedef FxI32 FxBool;
typedef float FxFloat;
typedef double FxDouble;
#endif // __SDK2_UNIX_H__