Mixe for Privacy and Anonymity in the Internet
basetypedefs.h
Go to the documentation of this file.
1
/*
2
Copyright (c) 2000, The JAP-Team
3
All rights reserved.
4
Redistribution and use in source and binary forms, with or without modification,
5
are permitted provided that the following conditions are met:
6
7
- Redistributions of source code must retain the above copyright notice,
8
this list of conditions and the following disclaimer.
9
10
- Redistributions in binary form must reproduce the above copyright notice,
11
this list of conditions and the following disclaimer in the documentation and/or
12
other materials provided with the distribution.
13
14
- Neither the name of the University of Technology Dresden, Germany nor the names of its contributors
15
may be used to endorse or promote products derived from this software without specific
16
prior written permission.
17
18
19
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
20
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
21
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS
22
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
27
*/
28
29
#ifndef __BASE_TYPE_DEFS
30
#define __BASE_TYPE_DEFS
31
32
#ifdef _WIN32
33
#define HAVE_NATIVE_UINT64
34
//UINT64 already defined by Windows!
35
#ifdef __clang__
36
typedef
long
long
SINT64
;
37
#else
38
typedef
_int64
SINT64
;
39
#endif
40
typedef
signed
int
SINT32
;
41
typedef
unsigned
short
UINT16
;
42
typedef
signed
short
SINT16
;
43
typedef
unsigned
char
UINT8
;
44
typedef
signed
char
SINT8
;
45
#else
46
#ifdef HAVE_CONFIG_H
47
#if SIZEOF_UNSIGNED_CHAR == 1 && !defined HAVE_UINT8
48
#define HAVE_UINT8
49
typedef
unsigned
char
UINT8
;
50
#endif
51
#if SIZEOF_SIGNED_CHAR == 1 && !defined HAVE_SINT8
52
#define HAVE_SINT8
53
typedef
signed
char
SINT8
;
54
#endif
55
#if SIZEOF_UNSIGNED_SHORT == 2 && !defined HAVE_UINT16
56
#define HAVE_UINT16
57
typedef
unsigned
short
UINT16
;
58
#endif
59
#if SIZEOF_SIGNED_SHORT == 2 && !defined HAVE_SINT16
60
#define HAVE_SINT16
61
typedef
unsigned
short
SINT16
;
62
#endif
63
#if SIZEOF_UNSIGNED_INT == 4 && !defined HAVE_UINT32
64
#define HAVE_UINT32
65
typedef
unsigned
int
UINT32
;
66
#endif
67
#if SIZEOF_SIGNED_INT == 4 && !defined HAVE_SINT32
68
#define HAVE_SINT32
69
typedef
signed
int
SINT32
;
70
#endif
71
#if SIZEOF___UINT64_T == 8 && !defined HAVE_UINT64
72
#define HAVE_UINT64
73
typedef
unsigned
long
long
UINT64
;
74
typedef
signed
long
long
SINT64
;
75
#endif
76
#if SIZEOF_UNSIGNED_LONG_LONG == 8 && !defined HAVE_UINT64
77
#define HAVE_UINT64
78
typedef
unsigned
long
long
UINT64
;
79
typedef
signed
long
long
SINT64
;
80
#endif
81
#ifdef HAVE_UINT64
82
#define HAVE_NATIVE_UINT64
83
#endif
84
#else
85
#if defined(__linux)
86
#include <linux/types.h>
87
#define HAVE_NATIVE_UINT64
88
typedef
unsigned
long
long
UINT64
;
89
typedef
signed
long
long
SINT64
;
90
typedef
__u32
UINT32
;
91
typedef
__s32
SINT32
;
92
typedef
__u16
UINT16
;
93
typedef
__s16
SINT16
;
94
typedef
__u8
UINT8
;
95
typedef
__s8
SINT8
;
96
#elif defined(__sgi)
97
#define HAVE_NATIVE_UINT64
98
typedef
__uint64_t
UINT64
;
99
typedef
__int64_t
SINT64
;
100
typedef
__uint32_t
UINT32
;
101
typedef
__int32_t
SINT32
;
102
typedef
unsigned
short
UINT16
;
103
typedef
signed
short
SINT16
;
104
typedef
unsigned
char
UINT8
;
105
typedef
signed
char
SINT8
;
106
#elif defined(__sun)
107
typedef
uint32_t
UINT32
;
108
typedef
int32_t
SINT32
;
109
typedef
uint16_t
UINT16
;
110
typedef
int16_t
SINT16
;
111
typedef
uint8_t
UINT8
;
112
typedef
int8_t
SINT8
;
113
#elif defined __APPLE_CC__
114
#define HAVE_NATIVE_UINT64
115
typedef
unsigned
long
long
UINT64
;
116
typedef
signed
long
long
SINT64
;
117
typedef
unsigned
int
UINT32
;
118
typedef
signed
int
SINT32
;
119
typedef
unsigned
short
UINT16
;
120
typedef
signed
short
SINT16
;
121
typedef
unsigned
char
UINT8
;
122
typedef
signed
char
SINT8
;
123
#else
124
#warning This seams to be a currently not supported plattform - may be things go wrong!
125
#warning Please report the plattform, so that it could be added
126
#ifdef __GNUC__
//TODO check if for all GNUC long long is 64 bit!!
127
#define HAVE_NATIVE_UINT64
128
typedef
unsigned
long
long
UINT64
;
129
typedef
signed
long
long
SINT64
;
130
#endif
131
typedef
unsigned
int
UINT32
;
132
typedef
signed
int
SINT32
;
133
typedef
unsigned
short
UINT16
;
134
typedef
signed
short
SINT16
;
135
typedef
unsigned
char
UINT8
;
136
typedef
signed
char
SINT8
;
137
#endif
138
#endif
//HAVE_CONFIG_H?
139
#endif
//WIN32?
140
141
#if !defined(HAVE_NATIVE_UINT64)
142
typedef
struct
__UINT64__t_
143
{
144
UINT32
high
;
145
UINT32
low
;
146
}
UINT64
;
147
148
typedef
struct
__SINT64__t_
149
{
150
SINT32
high
;
151
UINT32
low
;
152
}
SINT64
;
153
#endif
154
155
typedef
unsigned
int
UINT
;
156
typedef
signed
int
SINT
;
157
158
#endif
//__BASE_TYPES_DEFS_H
UINT16
unsigned short UINT16
Definition:
basetypedefs.h:133
UINT
unsigned int UINT
Definition:
basetypedefs.h:155
SINT16
signed short SINT16
Definition:
basetypedefs.h:134
SINT32
signed int SINT32
Definition:
basetypedefs.h:132
SINT
signed int SINT
Definition:
basetypedefs.h:156
UINT64
struct __UINT64__t_ UINT64
SINT8
signed char SINT8
Definition:
basetypedefs.h:136
UINT8
unsigned char UINT8
Definition:
basetypedefs.h:135
UINT32
unsigned int UINT32
Definition:
basetypedefs.h:131
SINT64
struct __SINT64__t_ SINT64
__SINT64__t_
Definition:
basetypedefs.h:149
__SINT64__t_::high
SINT32 high
Definition:
basetypedefs.h:150
__SINT64__t_::low
UINT32 low
Definition:
basetypedefs.h:151
__UINT64__t_
Definition:
basetypedefs.h:143
__UINT64__t_::high
UINT32 high
Definition:
basetypedefs.h:144
__UINT64__t_::low
UINT32 low
Definition:
basetypedefs.h:145
Generated on Sat Jul 22 2023 00:20:07 for Mixe for Privacy and Anonymity in the Internet by
1.9.1