xine-lib 1.2.13-20230125hg15249
os_types.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2004-2022 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 typedef __int32 intptr_t;
42 typedef unsigned __int32 uintptr_t;
43
44#elif defined(__MACOS__)
45
46# include <sys/types.h>
47 typedef SInt8 int8_t;
48 typedef UInt8 uint8_t;
49 typedef SInt16 int16_t;
50 typedef UInt16 uint16_t;
51 typedef SInt32 int32_t;
52 typedef UInt32 uint32_t;
53 typedef SInt64 int64_t;
54 typedef UInt64 uint64_t;
55 typedef SInt32 intptr_t;
56 typedef UInt32 uintptr_t;
57
58#elif defined(__MACOSX__) /* MacOS X Framework build */
59
60# include <sys/types.h>
61 typedef u_int8_t uint8_t;
62 typedef u_int16_t uint16_t;
63 typedef u_int32_t uint32_t;
64 typedef u_int64_t uint64_t;
65
66#elif defined (__EMX__)
67
68 /* OS/2 GCC */
69 typedef signed char int8_t;
70 typedef unsigned char uint8_t;
71 typedef short int16_t;
72 typedef unsigned short uint16_t;
73 typedef int int32_t;
74 typedef unsigned int uint32_t;
75 typedef long long int64_t;
76 typedef unsigned long long uint64_t;
77 typedef long intptr_t;
78 typedef unsigned long uintptr_t;
79
80#elif defined (DJGPP)
81
82 /* DJGPP */
83 typedef signed char int8_t;
84 typedef unsigned char uint8_t;
85 typedef short int16_t;
86 typedef unsigned short uint16_t;
87 typedef int int32_t;
88 typedef unsigned int uint32_t;
89 typedef long long int64_t;
90 typedef unsigned long long uint64_t;
91 typedef long intptr_t;
92 typedef unsigned long uintptr_t;
93
94#elif defined(R5900)
95
96 /* PS2 EE */
97 typedef signed char int8_t;
98 typedef unsigned char uint8_t;
99 typedef short int16_t;
100 typedef unsigned short int16_t;
101 typedef int int32_t;
102 typedef unsigned uint32_t;
103 typedef long int64_t;
104 typedef unsigned long uint64_t;
105 /* FIXME: 32bit? */
106 typedef long intptr_t;
107 typedef unsigned long uintptr_t;
108
109#else
110
111 /*
112 * CygWin: _WIN32 & __GNUC__
113 * BeOS: __BEOS__
114 * Linux, Solaris, Mac and others
115 */
116# include <inttypes.h>
117
118#endif
119
120#endif /* XINE_OS_TYPES_H */
signed short SInt16
Definition components.h:17
unsigned char UInt8
Definition components.h:14
signed long SInt32
Definition components.h:19
unsigned short UInt16
Definition components.h:16
signed char SInt8
Definition components.h:15
unsigned long UInt32
Definition components.h:18