3rdparty/licenseReport: Add seperate LGPL checks
[haiku.git] / src / add-ons / media / plugins / matroska / libebml / ebml / c / libebml_t.h
blob93805136929f6c8cab9fc96881d6b71c5cb89daf
1 /****************************************************************************
2 ** LIBEBML : parse EBML files, see http://ebml.sourceforge.net/
3 **
4 ** <file/class description>
5 **
6 ** Copyright (C) 2002-2003 Steve Lhomme. All rights reserved.
7 **
8 ** This file is part of LIBEBML.
9 **
10 ** This library is free software; you can redistribute it and/or
11 ** modify it under the terms of the GNU Lesser General Public
12 ** License as published by the Free Software Foundation; either
13 ** version 2.1 of the License, or (at your option) any later version.
14 **
15 ** This library is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ** Lesser General Public License for more details.
19 **
20 ** You should have received a copy of the GNU Lesser General Public
21 ** License along with this library; if not, write to the Free Software
22 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 ** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.
26 ** Contact license@matroska.org if any conditions of this licensing are
27 ** not clear to you.
29 **********************************************************************/
31 /*!
32 \file libebml_t.h
33 \version \$Id: libebml_t.h 1298 2008-02-21 22:14:18Z mosu $
34 \author Steve Lhomme <robux4 @ users.sf.net>
35 \author Ingo Ralf Blum <ingoralfblum @ users.sf.net>
36 \author Moritz Bunkus <moritz@bunkus.org>
38 \brief Misc type definitions for the C API of LIBEBML
40 \note These types should be compiler/language independant (just platform dependant)
41 \todo recover the sized types (uint16, int32, etc) here too (or maybe here only)
44 #ifndef _LIBEBML_T_H_INCLUDED_
45 #define _LIBEBML_T_H_INCLUDED_
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
51 // Changed char is unsigned now (signedness was causing trouble in endil)
52 #if defined(_WIN32)
53 # if !defined(__GNUC__) // Microsoft Visual C++
54 typedef signed __int64 int64;
55 typedef signed __int32 int32;
56 typedef signed __int16 int16;
57 typedef signed __int8 int8;
58 typedef __int8 character;
59 typedef unsigned __int64 uint64;
60 typedef unsigned __int32 uint32;
61 typedef unsigned __int16 uint16;
62 typedef unsigned __int8 uint8;
63 # else // __GNUC__, this is mingw
64 # include <stdint.h>
65 typedef int64_t int64;
66 typedef int32_t int32;
67 typedef int16_t int16;
68 typedef int8_t int8;
69 typedef int8_t character;
70 typedef uint64_t uint64;
71 typedef uint32_t uint32;
72 typedef uint16_t uint16;
73 typedef uint8_t uint8;
74 # endif // __GNUC__
75 #elif (defined(__BEOS__) || defined(__HAIKU__))
76 #include <SupportDefs.h>
77 #elif defined(DJGPP) /* SL : DJGPP doesn't support POSIX types ???? */
78 typedef signed long long int64;
79 typedef signed long int32;
80 typedef signed short int16;
81 typedef signed char int8;
82 typedef char character;
83 typedef unsigned long long uint64;
84 typedef unsigned long uint32;
85 typedef unsigned short uint16;
86 typedef unsigned char uint8;
87 #elif defined(__sun) && (defined(__svr4__) || defined(__SVR4)) // SOLARIS
88 # include <inttypes.h>
89 # ifdef _NO_LONGLONG
90 # error This compiler does not support 64bit integers.
91 # endif
92 typedef long long int64; // int64_t is not always defined :(
93 typedef int32_t int32;
94 typedef int16_t int16;
95 typedef int8_t int8;
96 typedef int8_t character;
97 typedef unsigned long long uint64; // uint64_t is not always defined :(
98 typedef uint32_t uint32;
99 typedef uint16_t uint16;
100 typedef uint8_t uint8;
101 #elif (defined(__BEOS__) || defined(__HAIKU__))
102 # include <support/SupportDefs.h>
103 #else // anything else (Linux, BSD, ...)
104 # include <sys/types.h>
105 typedef int64_t int64;
106 typedef int32_t int32;
107 typedef int16_t int16;
108 typedef int8_t int8;
109 typedef int8_t character;
110 typedef u_int64_t uint64;
111 typedef u_int32_t uint32;
112 typedef u_int16_t uint16;
113 typedef u_int8_t uint8;
114 #endif /* anything else */
116 typedef uint8 binary;
119 typedef enum open_mode {
120 MODE_READ,
121 MODE_WRITE,
122 MODE_CREATE,
123 MODE_SAFE
124 } open_mode;
126 #define EBML_MIN(x,y) ((x)<(y) ? (x) : (y))
128 #ifdef __cplusplus
130 #endif
132 #endif /* _LIBEBML_T_H_INCLUDED_ */