su
1.13.18
Toggle main menu visibility
Loading...
Searching...
No Matches
su_types.h
Go to the documentation of this file.
1
/*
2
* This file is part of the Sofia-SIP package
3
*
4
* Copyright (C) 2005 Nokia Corporation.
5
*
6
* Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden>
7
*
8
* This library is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Lesser General Public License
10
* as published by the Free Software Foundation; either version 2.1 of
11
* the License, or (at your option) any later version.
12
*
13
* This library is distributed in the hope that it will be useful, but
14
* WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* Lesser General Public License for more details.
17
*
18
* You should have received a copy of the GNU Lesser General Public
19
* License along with this library; if not, write to the Free Software
20
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21
* 02110-1301 USA
22
*
23
*/
24
25
#ifndef SU_TYPES_H
27
#define SU_TYPES_H
35
36
#ifndef SU_CONFIG_H
37
#include <
sofia-sip/su_config.h
>
38
#endif
39
40
#if SU_HAVE_STDINT
41
#include <stdint.h>
42
#elif SU_HAVE_INTTYPES
43
#include <inttypes.h>
44
#endif
45
46
#if SU_HAVE_SYS_TYPES
47
#include <sys/types.h>
48
#endif
49
50
#include <stddef.h>
51
52
SOFIA_BEGIN_DECLS
53
54
#if SU_HAVE_STDINT || SU_HAVE_INTTYPES
55
#define SU_S64_T int64_t
56
#define SU_U64_T uint64_t
57
#define SU_S32_T int32_t
58
#define SU_U32_T uint32_t
59
#define SU_S16_T int16_t
60
#define SU_U16_T uint16_t
61
#define SU_S8_T int8_t
62
#define SU_U8_T uint8_t
63
#define SU_LEAST64_T int_least64_t
64
#define SU_LEAST32_T int_least32_t
65
#define SU_LEAST16_T int_least16_t
66
#define SU_LEAST8_T int_least8_t
67
#endif
68
69
#if DOXYGEN_ONLY || (!SU_HAVE_STDINT && !SU_HAVE_INTTYPES && SU_HAVE_WIN32)
70
71
/* Use macros defined in <sofia-sip/su_configure_win32.h> */
72
73
#ifndef _INTPTR_T_DEFINED
75
typedef
SU_INTPTR_T
intptr_t
;
76
#endif
77
#ifndef _UINTPTR_T_DEFINED
79
typedef
unsigned
SU_INTPTR_T
uintptr_t
;
80
#endif
81
83
typedef
SU_U64_T
uint64_t
;
85
typedef
SU_S64_T
int64_t
;
87
typedef
SU_U32_T
uint32_t
;
89
typedef
SU_S32_T
int32_t
;
91
typedef
SU_U16_T
uint16_t
;
93
typedef
SU_S16_T
int16_t
;
95
typedef
SU_U8_T
uint8_t
;
97
typedef
SU_S8_T
int8_t
;
98
100
typedef
SU_LEAST64_T
int_least64_t
;
102
typedef
SU_LEAST32_T
int_least32_t
;
104
typedef
SU_LEAST16_T
int_least16_t
;
106
typedef
SU_LEAST8_T
int_least8_t
;
107
#endif
108
109
#if !SU_HAVE_STDINT && !SU_HAVE_INTTYPES && !SU_HAVE_WIN32
110
#error "no integer types available."
111
#endif
112
113
/* ---------------------------------------------------------------------- */
114
/* size_t types for binary compatibility */
115
116
#ifdef SOFIA_SSIZE_T
118
typedef
SOFIA_SSIZE_T ssize_t;
119
#endif
120
121
#ifdef SOFIA_ISIZE_T
131
typedef
SOFIA_ISIZE_T
isize_t;
132
#else
133
typedef
size_t
isize_t;
134
#endif
135
136
#ifdef SOFIA_ISSIZE_T
145
typedef
SOFIA_ISSIZE_T
issize_t;
146
#else
147
typedef
ssize_t issize_t;
148
#endif
149
150
#ifdef SOFIA_USIZE_T
159
typedef
SOFIA_USIZE_T
usize_t;
160
#else
161
typedef
size_t
usize_t;
162
#endif
163
164
SOFIA_END_DECLS
165
166
#endif
/* SU_TYPES_H */
su_config.h
su library configuration
SOFIA_ISSIZE_T
#define SOFIA_ISSIZE_T
Define this as ssize_t (int when compatible with sofia-sip-ua 1.12.0 binaries).
Definition
su_configure.h:121
SOFIA_ISIZE_T
#define SOFIA_ISIZE_T
Define this as ssize_t.
Definition
su_configure.h:114
SOFIA_USIZE_T
#define SOFIA_USIZE_T
Define this as size_t (unsigned int when compatible with sofia-sip-ua 1.12.0 binaries).
Definition
su_configure.h:128
uint32_t
SU_U32_T uint32_t
32-bit unsigned integer
Definition
su_types.h:87
int_least16_t
SU_LEAST16_T int_least16_t
At least 16-bit integer.
Definition
su_types.h:104
uint16_t
SU_U16_T uint16_t
16-bit unsigned integer
Definition
su_types.h:91
int64_t
SU_S64_T int64_t
64-bit signed integer
Definition
su_types.h:85
uint64_t
SU_U64_T uint64_t
64-bit unsigned integer
Definition
su_types.h:83
int_least8_t
SU_LEAST8_T int_least8_t
At least 8-bit integer.
Definition
su_types.h:106
int_least32_t
SU_LEAST32_T int_least32_t
At least 32-bit integer.
Definition
su_types.h:102
int16_t
SU_S16_T int16_t
16-bit signed integer
Definition
su_types.h:93
intptr_t
SU_INTPTR_T intptr_t
Integer type large enough to store pointers.
Definition
su_types.h:75
uint8_t
SU_U8_T uint8_t
8-bit unsigned integer
Definition
su_types.h:95
int8_t
SU_S8_T int8_t
8-bit signed integer
Definition
su_types.h:97
uintptr_t
unsigned SU_INTPTR_T uintptr_t
Unsigned integer type large enough to store pointers.
Definition
su_types.h:79
int32_t
SU_S32_T int32_t
32-bit signed integer
Definition
su_types.h:89
int_least64_t
SU_LEAST64_T int_least64_t
At least 64-bit integer.
Definition
su_types.h:100
Sofia-SIP 1.13.18 - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.