xine-lib  1.2.10
os_types.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2004-2009 the xine project
3  *
4  * This file is part of xine, a free video player.
5  *
6  * xine is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * xine is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
19  *
20  * Platform dependent types needed by public xine.h.
21  * Types not needed by xine.h are specified in os_internal.h.
22  *
23  * Heavily based on os_types.h from OggVorbis (BSD License),
24  * not tested on all platforms with xine.
25  */
26 
27 #ifndef XINE_OS_TYPES_H
28 #define XINE_OS_TYPES_H
29 
30 #if defined(_WIN32) && !defined(__GNUC__)
31 
32  /* MSVC/Borland */
33  typedef __int8 int8_t;
34  typedef unsigned __int8 uint8_t;
35  typedef __int16 int16_t;
36  typedef unsigned __int16 uint16_t;
37  typedef __int32 int32_t;
38  typedef unsigned __int32 uint32_t;
39  typedef __int64 int64_t;
40  typedef unsigned __int64 uint64_t;
41 
42 #elif defined(__MACOS__)
43 
44 # include <sys/types.h>
45  typedef SInt8 int8_t;
46  typedef UInt8 uint8_t;
47  typedef SInt16 int16_t;
48  typedef UInt16 uint16_t;
49  typedef SInt32 int32_t;
50  typedef UInt32 uint32_t;
51  typedef SInt64 int64_t;
52  typedef UInt64 uint64_t;
53 
54 #elif defined(__MACOSX__) /* MacOS X Framework build */
55 
56 # include <sys/types.h>
57  typedef u_int8_t uint8_t;
58  typedef u_int16_t uint16_t;
59  typedef u_int32_t uint32_t;
60  typedef u_int64_t uint64_t;
61 
62 #elif defined (__EMX__)
63 
64  /* OS/2 GCC */
65  typedef signed char int8_t;
66  typedef unsigned char uint8_t;
67  typedef short int16_t;
68  typedef unsigned short uint16_t;
69  typedef int int32_t;
70  typedef unsigned int uint32_t;
71  typedef long long int64_t;
72  typedef unsigned long long int64_t;
73 
74 #elif defined (DJGPP)
75 
76  /* DJGPP */
77  typedef signed char int8_t;
78  typedef unsigned char uint8_t;
79  typedef short int16_t;
80  typedef unsigned short uint16_t;
81  typedef int int32_t;
82  typedef unsigned int uint32_t;
83  typedef long long int64_t;
84  typedef unsigned long long uint64_t;
85 
86 #elif defined(R5900)
87 
88  /* PS2 EE */
89  typedef signed char int8_t;
90  typedef unsigned char uint8_t;
91  typedef short int16_t;
92  typedef unsigned short int16_t;
93  typedef int int32_t;
94  typedef unsigned uint32_t;
95  typedef long int64_t;
96  typedef unsigned long int64_t;
97 
98 #else
99 
100  /*
101  * CygWin: _WIN32 & __GNUC__
102  * BeOS: __BEOS__
103  * Linux, Solaris, Mac and others
104  */
105 # include <inttypes.h>
106 
107 #endif
108 
109 #endif /* XINE_OS_TYPES_H */
SInt16
signed short SInt16
Definition: components.h:17
SInt32
signed long SInt32
Definition: components.h:19
UInt8
unsigned char UInt8
Definition: components.h:14
SInt8
signed char SInt8
Definition: components.h:15
UInt32
unsigned long UInt32
Definition: components.h:18
UInt16
unsigned short UInt16
Definition: components.h:16