OSDN Git Service

Import UnkoTim220
[timidity41/timidity41.git] / ogg / os_types.h
1 /********************************************************************
2  *                                                                  *
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.       *
7  *                                                                  *
8  * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
9  * by the Xiph.Org Foundation http://www.xiph.org/                  *
10  *                                                                  *
11  ********************************************************************
12
13  function: #ifdef jail to whip a few platforms into the UNIX ideal.
14  last mod: $Id: os_types.h,v 1.14 2003/09/02 05:09:14 xiphmont Exp $
15
16  ********************************************************************/
17 #ifndef _OS_TYPES_H
18 #define _OS_TYPES_H
19
20 /* make it easy on the folks that want to compile the libs with a
21    different malloc than stdlib */
22 #define _ogg_malloc  malloc
23 #define _ogg_calloc  calloc
24 #define _ogg_realloc realloc
25 #define _ogg_free    free
26
27 #ifdef _WIN32 
28
29 #  ifndef __GNUC__
30    /* MSVC/Borland */
31    typedef __int64 ogg_int64_t;
32    typedef __int32 ogg_int32_t;
33    typedef unsigned __int32 ogg_uint32_t;
34    typedef __int16 ogg_int16_t;
35    typedef unsigned __int16 ogg_uint16_t;
36 #  else
37    /* Cygwin */
38    #include <_G_config.h>
39    typedef _G_int64_t ogg_int64_t;
40    typedef _G_int32_t ogg_int32_t;
41    typedef _G_uint32_t ogg_uint32_t;
42    typedef _G_int16_t ogg_int16_t;
43    typedef _G_uint16_t ogg_uint16_t;
44 #  endif
45
46 #elif defined(__MACOS__)
47
48 #  include <sys/types.h>
49    typedef SInt16 ogg_int16_t;
50    typedef UInt16 ogg_uint16_t;
51    typedef SInt32 ogg_int32_t;
52    typedef UInt32 ogg_uint32_t;
53    typedef SInt64 ogg_int64_t;
54
55 #elif defined(__MACOSX__) /* MacOS X Framework build */
56
57 #  include <sys/types.h>
58    typedef int16_t ogg_int16_t;
59    typedef u_int16_t ogg_uint16_t;
60    typedef int32_t ogg_int32_t;
61    typedef u_int32_t ogg_uint32_t;
62    typedef int64_t ogg_int64_t;
63
64 #elif defined(__BEOS__)
65
66    /* Be */
67 #  include <inttypes.h>
68    typedef int16_t ogg_int16_t;
69    typedef u_int16_t ogg_uint16_t;
70    typedef int32_t ogg_int32_t;
71    typedef u_int32_t ogg_uint32_t;
72    typedef int64_t ogg_int64_t;
73
74 #elif defined (__EMX__)
75
76    /* OS/2 GCC */
77    typedef short ogg_int16_t;
78    typedef unsigned short ogg_uint16_t;
79    typedef int ogg_int32_t;
80    typedef unsigned int ogg_uint32_t;
81    typedef long long ogg_int64_t;
82
83 #elif defined (DJGPP)
84
85    /* DJGPP */
86    typedef short ogg_int16_t;
87    typedef int ogg_int32_t;
88    typedef unsigned int ogg_uint32_t;
89    typedef long long ogg_int64_t;
90
91 #elif defined(R5900)
92
93    /* PS2 EE */
94    typedef long ogg_int64_t;
95    typedef int ogg_int32_t;
96    typedef unsigned ogg_uint32_t;
97    typedef short ogg_int16_t;
98
99 #else
100
101 #  include <sys/types.h>
102 #  include <ogg/config_types.h>
103
104 #endif
105
106 #endif  /* _OS_TYPES_H */