@@ -20,132 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2020// comndef.h -- general definitions
2121
2222#include <stdio.h>
23-
24- //make shared
25- #ifndef QDECL
26- #ifdef _MSC_VER
27- #define QDECL _cdecl
28- #else
29- #define QDECL
30- #endif
31- #endif
32-
33- #define VK_NO_STDINT_H //we're handling this. please don't cause conflicts. grr.
34- #if __STDC_VERSION__ >= 199901L || defined(__GNUC__ ) || _MSC_VER >= 1600
35- //C99 has a stdint header which hopefully contains an intptr_t
36- //its optional... but if its not in there then its unlikely you'll actually be able to get the engine to a stage where it *can* load anything
37- #include <stdint.h>
38- typedef intptr_t qintptr_t ;
39- typedef uintptr_t quintptr_t ;
40- #define qint16_t int16_t
41- #define quint16_t uint16_t
42- #define qint32_t int32_t
43- #define quint32_t uint32_t
44- #define qint64_t int64_t
45- #define quint64_t uint64_t
46- #define qintmax_t intmax_t
47- #define quintmax_t uintmax_t
48- #else
49- #define qint8_t signed char //be explicit with this one.
50- #define quint8_t unsigned char
51- #define qint16_t short
52- #define quint16_t unsigned short
53- #define qint32_t int
54- #define quint32_t unsigned qint32_t
55- #if defined(_WIN64 )
56- #define qintptr_t __int64
57- #define FTE_WORDSIZE 64
58- #define quintptr_t unsigned qintptr_t
59- #define qint64_t __int64
60- #define quint64_t unsigned __int64
61- #elif defined(_WIN32 )
62- #if !defined(_MSC_VER ) || _MSC_VER < 1300
63- #define __w64
64- #endif
65- typedef __int32 __w64 qintptr_t ; //add __w64 if you need msvc to shut up about unsafe type conversions
66- typedef unsigned __int32 __w64 quintptr_t ;
67- // #define qintptr_t __int32
68- // #define quintptr_t unsigned qintptr_t
69- #define qint64_t __int64
70- #define quint64_t unsigned __int64
71- #define FTE_WORDSIZE 32
72- #else
73- #ifdef __LP64__
74- #define qintptr_t long int
75- #define qint64_t long int
76- #define FTE_WORDSIZE 64
77- #elif __WORDSIZE == 64
78- #define qintptr_t long long
79- #define qint64_t long long
80- #define FTE_WORDSIZE 64
81- #else
82- #define qintptr_t long
83- #define qint64_t long long
84- #define FTE_WORDSIZE 32
85- #endif
86- #define quintptr_t unsigned qintptr_t
87- #define quint64_t unsigned qint64_t
88- #endif
89-
90- #define qintmax_t qint64_t
91- #define quintmax_t quint64_t
92-
93- #ifndef uint32_t
94- #define int8_t qint8_t
95- #define uint8_t quint8_t
96- #define int16_t qint16_t
97- #define uint16_t quint16_t
98- #define int32_t qint32_t
99- #define uint32_t quint32_t
100- #define int64_t qint64_t
101- #define uint64_t quint64_t
102- #define intptr_t qintptr_t
103- #define uintptr_t quintptr_t
104- #define intmax_t qintmax_t
105- #define uintmax_t quintmax_t
106- #endif
107- #endif
108-
109- #ifndef FTE_WORDSIZE
110- #ifdef __WORDSIZE
111- #define FTE_WORDSIZE __WORDSIZE
112- #elif defined(_WIN64 )
113- #define FTE_WORDSIZE 64
114- #else
115- #define FTE_WORDSIZE 32
116- #endif
117- #endif
118-
119- #ifdef _MSC_VER
120- #if _MSC_VER >= 1900
121- // MSVC 14 supports these
122- #elif _MSC_VER >= 1310
123- #define strtoull _strtoui64
124- #define strtoll _strtoi64
125- #else
126- #define strtoull strtoul //hopefully this won't cause too many issues
127- #define strtoll strtol //hopefully this won't cause too many issues
128- #define DWORD_PTR DWORD //32bit only
129- #define ULONG_PTR ULONG
130- #endif
131- #endif
132-
133-
134- typedef unsigned char qbyte ;
135-
136- // KJB Undefined true and false defined in SciTech's DEBUG.H header
137- #undef true
138- #undef false
139-
140- #ifdef __cplusplus
141- typedef enum {qfalse , qtrue } qboolean ;//false and true are forcivly defined.
142- //#define true qtrue
143- //#define false qfalse
144- #else
145- typedef enum {qfalse , qtrue } qboolean ;
146- #define true qtrue
147- #define false qfalse
148- #endif
23+ #include "math/types.h"
14924
15025#define STRINGIFY2 (s ) #s
15126#define STRINGIFY (s ) STRINGIFY2(s)
0 commit comments