su 1.12.11devel
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
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
52SOFIA_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
75typedef SU_INTPTR_T intptr_t;
76#endif
77#ifndef _UINTPTR_T_DEFINED
79typedef unsigned SU_INTPTR_T uintptr_t;
80#endif
81
83typedef SU_U64_T uint64_t;
85typedef SU_S64_T int64_t;
87typedef SU_U32_T uint32_t;
89typedef SU_S32_T int32_t;
91typedef SU_U16_T uint16_t;
93typedef SU_S16_T int16_t;
95typedef SU_U8_T uint8_t;
97typedef SU_S8_T int8_t;
98
100typedef SU_LEAST64_T int_least64_t;
102typedef SU_LEAST32_T int_least32_t;
104typedef SU_LEAST16_T int_least16_t;
106typedef 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
118typedef SOFIA_SSIZE_T ssize_t;
119#endif
120
121#ifdef SOFIA_ISIZE_T
131typedef SOFIA_ISIZE_T isize_t;
132#else
133typedef size_t isize_t;
134#endif
135
136#ifdef SOFIA_ISSIZE_T
145typedef SOFIA_ISSIZE_T issize_t;
146#else
147typedef ssize_t issize_t;
148#endif
149
150#ifdef SOFIA_USIZE_T
159typedef SOFIA_USIZE_T usize_t;
160#else
161typedef size_t usize_t;
162#endif
163
164SOFIA_END_DECLS
165
166#endif /* SU_TYPES_H */
su library configuration
#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
#define SOFIA_ISIZE_T
Define this as ssize_t.
Definition su_configure.h:114
#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
SU_U32_T uint32_t
32-bit unsigned integer
Definition su_types.h:87
SU_LEAST16_T int_least16_t
At least 16-bit integer.
Definition su_types.h:104
SU_U16_T uint16_t
16-bit unsigned integer
Definition su_types.h:91
SU_S64_T int64_t
64-bit signed integer
Definition su_types.h:85
SU_U64_T uint64_t
64-bit unsigned integer
Definition su_types.h:83
SU_LEAST8_T int_least8_t
At least 8-bit integer.
Definition su_types.h:106
SU_LEAST32_T int_least32_t
At least 32-bit integer.
Definition su_types.h:102
SU_S16_T int16_t
16-bit signed integer
Definition su_types.h:93
SU_INTPTR_T intptr_t
Integer type large enough to store pointers.
Definition su_types.h:75
SU_U8_T uint8_t
8-bit unsigned integer
Definition su_types.h:95
SU_S8_T int8_t
8-bit signed integer
Definition su_types.h:97
unsigned SU_INTPTR_T uintptr_t
Unsigned integer type large enough to store pointers.
Definition su_types.h:79
SU_S32_T int32_t
32-bit signed integer
Definition su_types.h:89
SU_LEAST64_T int_least64_t
At least 64-bit integer.
Definition su_types.h:100

Sofia-SIP 1.12.11devel - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.