1 /********************************************************************
3 * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
4 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
5 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
6 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
8 * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
9 * by the Xiph.Org Foundation http://www.xiph.org/ *
11 ********************************************************************
13 function: Define a consistent set of types on each platform.
15 ********************************************************************/
19 /* make it easy on the folks that want to compile the libs with a
20 different malloc than stdlib */
21 #define _ogg_malloc malloc
22 #define _ogg_calloc calloc
23 #define _ogg_realloc realloc
24 #define _ogg_free free
28 # if defined(__CYGWIN__)
30 typedef int16_t ogg_int16_t;
31 typedef uint16_t ogg_uint16_t;
32 typedef int32_t ogg_int32_t;
33 typedef uint32_t ogg_uint32_t;
34 typedef int64_t ogg_int64_t;
35 typedef uint64_t ogg_uint64_t;
36 # elif defined(__MINGW32__)
37 # include <sys/types.h>
38 typedef short ogg_int16_t;
39 typedef unsigned short ogg_uint16_t;
40 typedef int ogg_int32_t;
41 typedef unsigned int ogg_uint32_t;
42 typedef long long ogg_int64_t;
43 typedef unsigned long long ogg_uint64_t;
44 # elif defined(__MWERKS__)
45 typedef long long ogg_int64_t;
46 typedef unsigned long long ogg_uint64_t;
47 typedef int ogg_int32_t;
48 typedef unsigned int ogg_uint32_t;
49 typedef short ogg_int16_t;
50 typedef unsigned short ogg_uint16_t;
52 # if defined(_MSC_VER) && (_MSC_VER >= 1800) /* MSVC 2013 and newer */
54 typedef int16_t ogg_int16_t;
55 typedef uint16_t ogg_uint16_t;
56 typedef int32_t ogg_int32_t;
57 typedef uint32_t ogg_uint32_t;
58 typedef int64_t ogg_int64_t;
59 typedef uint64_t ogg_uint64_t;
62 typedef __int64 ogg_int64_t;
63 typedef __int32 ogg_int32_t;
64 typedef unsigned __int32 ogg_uint32_t;
65 typedef unsigned __int64 ogg_uint64_t;
66 typedef __int16 ogg_int16_t;
67 typedef unsigned __int16 ogg_uint16_t;
71 #elif (defined(__APPLE__) && defined(__MACH__)) /* MacOS X Framework build */
73 # include <sys/types.h>
74 typedef int16_t ogg_int16_t;
75 typedef u_int16_t ogg_uint16_t;
76 typedef int32_t ogg_int32_t;
77 typedef u_int32_t ogg_uint32_t;
78 typedef int64_t ogg_int64_t;
79 typedef u_int64_t ogg_uint64_t;
81 #elif defined(__HAIKU__)
84 # include <sys/types.h>
85 typedef short ogg_int16_t;
86 typedef unsigned short ogg_uint16_t;
87 typedef int ogg_int32_t;
88 typedef unsigned int ogg_uint32_t;
89 typedef long long ogg_int64_t;
90 typedef unsigned long long ogg_uint64_t;
92 #elif defined(__BEOS__)
95 # include <inttypes.h>
96 typedef int16_t ogg_int16_t;
97 typedef uint16_t ogg_uint16_t;
98 typedef int32_t ogg_int32_t;
99 typedef uint32_t ogg_uint32_t;
100 typedef int64_t ogg_int64_t;
101 typedef uint64_t ogg_uint64_t;
103 #elif defined (__EMX__)
106 typedef short ogg_int16_t;
107 typedef unsigned short ogg_uint16_t;
108 typedef int ogg_int32_t;
109 typedef unsigned int ogg_uint32_t;
110 typedef long long ogg_int64_t;
111 typedef unsigned long long ogg_uint64_t;
114 #elif defined (DJGPP)
117 typedef short ogg_int16_t;
118 typedef int ogg_int32_t;
119 typedef unsigned int ogg_uint32_t;
120 typedef long long ogg_int64_t;
121 typedef unsigned long long ogg_uint64_t;
126 typedef long ogg_int64_t;
127 typedef unsigned long ogg_uint64_t;
128 typedef int ogg_int32_t;
129 typedef unsigned ogg_uint32_t;
130 typedef short ogg_int16_t;
132 #elif defined(__SYMBIAN32__)
135 typedef signed short ogg_int16_t;
136 typedef unsigned short ogg_uint16_t;
137 typedef signed int ogg_int32_t;
138 typedef unsigned int ogg_uint32_t;
139 typedef long long int ogg_int64_t;
140 typedef unsigned long long int ogg_uint64_t;
142 #elif defined(__TMS320C6X__)
144 /* TI C64x compiler */
145 typedef signed short ogg_int16_t;
146 typedef unsigned short ogg_uint16_t;
147 typedef signed int ogg_int32_t;
148 typedef unsigned int ogg_uint32_t;
149 typedef long long int ogg_int64_t;
150 typedef unsigned long long int ogg_uint64_t;
154 # include <ogg/config_types.h>
158 #endif /* _OS_TYPES_H */