blob: 6d1cfcfce3c83c4ec88995f0a77481bac020700e [file] [log] [blame]
Benny Prijono8a0ab282008-01-23 20:17:42 +00001/* $Id$ */
2/*
3 * Copyright (C) 2003-2007 Benny Prijono <benny@prijono.org>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19#ifndef __SRTP_CONFIG_H__
20#define __SRTP_CONFIG_H__
21
22#include <pj/types.h>
23
24/* We'll just define CISC if it's x86 family */
25#if (defined(PJ_M_I386) && PJ_M_I386!=0) || \
26 (defined(PJ_M_X86_64) && PJ_M_X86_64!=0) || \
27 (defined(PJ_M_IA64) && PJ_M_IA64!=0)
28# define CPU_CISC 1
Benny Prijono1d481ab2008-01-24 15:27:30 +000029/* # define HAVE_X86 1 use X86 inlined assembly code */
Benny Prijono8a0ab282008-01-23 20:17:42 +000030#else
31# define CPU_RISC 1
32#endif
33
34/* Define to compile in dynamic debugging system. */
35#define ENABLE_DEBUGGING PJ_DEBUG
36
37/* Define to 1 if you have the <arpa/inet.h> header file. */
38#if defined(PJ_HAS_ARPA_INET_H) && PJ_HAS_ARPA_INET_H!=0
39# define HAVE_ARPA_INET_H 1
40#endif
41
42/* Define to 1 if you have the <byteswap.h> header file. */
43/* #undef HAVE_BYTESWAP_H */
44
45/* Define to 1 if you have the `inet_aton' function. */
46#if defined(PJ_SOCK_HAS_INET_PTON) && PJ_SOCK_HAS_INET_PTON
47# define HAVE_INET_ATON 1
48#endif
49
50
51/* Define to 1 if you have the <netinet/in.h> header file. */
52#if defined(PJ_HAS_NETINET_IN_H) && PJ_HAS_NETINET_IN_H!=0
53# define HAVE_NETINET_IN_H 1
54#endif
55
56/* Define to 1 if you have the <stdlib.h> header file. */
57#if defined(PJ_HAS_STDLIB_H) && PJ_HAS_STDLIB_H!=0
58# define HAVE_STDLIB_H 1
59#endif
60
61/* Define to 1 if you have the <string.h> header file. */
62#if defined(PJ_HAS_STRING_H) && PJ_HAS_STRING_H!=0
63# define HAVE_STRING_H 1
64#endif
65
66/* Define to 1 if you have the <sys/socket.h> header file. */
67#if defined(PJ_HAS_SYS_SOCKET_H) && PJ_HAS_SYS_SOCKET_H!=0
68# define HAVE_SYS_SOCKET_H 1
69#endif
70
71/* Define to 1 if you have the <sys/types.h> header file. */
72#if defined(PJ_HAS_SYS_TYPES_H) && PJ_HAS_SYS_TYPES_H!=0
73# define HAVE_SYS_TYPES_H 1
74#endif
75
76/* Define to 1 if you have the <unistd.h> header file. */
77/* Define to 1 if you have the `usleep' function. */
78#if defined(PJ_HAS_UNISTD_H) && PJ_HAS_UNISTD_H!=0
79# define HAVE_UNISTD_H 1
80# define HAVE_USLEEP 1
81#endif
82
83
84/* Define to 1 if you have the <windows.h> header file. */
85#if defined(PJ_WIN32) && PJ_WIN32!=0
86# define HAVE_WINDOWS_H 1
87#endif
88
89/* Define to 1 if you have the <winsock2.h> header file. */
90#if defined(PJ_HAS_WINSOCK2_H) && PJ_HAS_WINSOCK2_H!=0
91# define HAVE_WINSOCK2_H 1
92#endif
93
94#define HAVE_INT16_T 1
95#define HAVE_INT32_T 1
96#define HAVE_INT8_T 1
97#define HAVE_UINT8_T 1
98#define HAVE_UINT16_T 1
99#define HAVE_UINT32_T 1
100#define HAVE_UINT64_T 1
101
102/* Define to 1 if you have the <stdint.h> header file. */
103#if defined(PJ_HAS_STDINT_H) && PJ_HAS_STDINT_H!=0
104# define HAVE_STDINT_H 1
105#else
106 typedef pj_uint8_t uint8_t;
107 typedef pj_uint16_t uint16_t;
108 typedef pj_uint32_t uint32_t;
109 typedef pj_uint64_t uint64_t;
110 typedef pj_int8_t int8_t;
111 typedef pj_int16_t int16_t;
112 typedef pj_int32_t int32_t;
113 typedef pj_int64_t int64_t;
114#endif
115
Benny Prijono1d481ab2008-01-24 15:27:30 +0000116#define SIZEOF_UNSIGNED_LONG 8
Benny Prijono8a0ab282008-01-23 20:17:42 +0000117#define SIZEOF_UNSIGNED_LONG_LONG 8
118
119
120#if (_MSC_VER >= 1400) // VC8+
121# ifndef _CRT_SECURE_NO_DEPRECATE
122# define _CRT_SECURE_NO_DEPRECATE
123# endif
124# ifndef _CRT_NONSTDC_NO_DEPRECATE
125# define _CRT_NONSTDC_NO_DEPRECATE
126# endif
127#endif // VC8+
128
129#ifdef _MSC_VER
130# ifndef __cplusplus
131# define inline _inline
132# endif
133
134# pragma warning(disable:4311)
135# pragma warning(disable:4761) // integral mismatch
136# pragma warning(disable:4018) // signed/unsigned mismatch
137# pragma warning(disable:4244) // conversion from int64 to int
138#endif
139
Benny Prijono2c423752008-01-24 10:23:43 +0000140/* clock() */
141#if defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE!=0
142 /* clock() causes unresolved symbol on linking */
143# define _CLOCK_T_DEFINED
144# define CLOCKS_PER_SEC 1000
145# define clock_t unsigned
146
147 #include <windows.h>
148 static clock_t clock(void)
149 {
150 return GetTickCount();
151 }
152#endif
153
Benny Prijono8a0ab282008-01-23 20:17:42 +0000154
155/* Path to random device */
156/* #define DEV_URANDOM "/dev/urandom" */
157
Benny Prijono1d481ab2008-01-24 15:27:30 +0000158/* Only with PJSIP:
159 * Try to open PJ_DEV_URANDOM if present
160 */
161#if defined(PJ_HAS_FCNTL_H) && defined(PJ_HAS_UNISTD_H)
162# define PJ_DEV_URANDOM "/dev/urandom"
163#endif
164
Benny Prijono8a0ab282008-01-23 20:17:42 +0000165/* We have overridden libsrtp error mechanism, so these are not used. */
166/* #undef ERR_REPORTING_FILE */
167/* #undef ERR_REPORTING_STDOUT */
168/* #undef USE_ERR_REPORTING_FILE */
169/* #undef USE_SYSLOG */
170/* #undef HAVE_SYSLOG_H */
171
172
173/* Define this to use ISMAcryp code. */
174/* #undef GENERIC_AESICM */
175
176/* Define to 1 if you have the <inttypes.h> header file. */
177/* #undef HAVE_INTTYPES_H */
178
179/* Define to 1 if you have the `socket' function. */
180/* #undef HAVE_SOCKET */
181
182/* Define to 1 if you have the `socket' library (-lsocket). */
183/* #undef HAVE_LIBSOCKET */
184
185/* Define to 1 if you have the <machine/types.h> header file. */
186/* #undef HAVE_MACHINE_TYPES_H */
187
188
189/* Define to 1 if you have the <strings.h> header file. */
190//#define HAVE_STRINGS_H 1
191
192/* Define to 1 if you have the <sys/int_types.h> header file. */
193/* #undef HAVE_SYS_INT_TYPES_H */
194
195/* Define to use GDOI. */
196/* #undef SRTP_GDOI */
197
198/* Define to compile for kernel contexts. */
199/* #undef SRTP_KERNEL */
200
201/* Define to compile for Linux kernel context. */
202/* #undef SRTP_KERNEL_LINUX */
203
204/* Define to 1 if you have the ANSI C header files. */
205//#define STDC_HEADERS 1
206
207/* Endianness would have been set by pjlib. */
208/* #undef WORDS_BIGENDIAN */
209
210/* Define to empty if `const' does not conform to ANSI C. */
211/* #undef const */
212
213/* Define to `unsigned' if <sys/types.h> does not define. */
214/* #undef size_t */
215
216
217#endif /* __SRTP_CONFIG_H__ */
218