libosip  4.0.0
osipparser2/internal.h
1 /*
2  The oSIP library implements the Session Initiation Protocol (SIP -rfc3261-)
3  Copyright (C) 2001-2012 Aymeric MOIZARD amoizard@antisip.com
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  This library 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 GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library; if not, write to the Free Software
17  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19 
20 #ifndef _INTERNALOSIPPARSER_H_
21 #define _INTERNALOSIPPARSER_H_
22 
23 #if defined (HAVE_CONFIG_H)
24 #include <osip-config.h>
25 #endif
26 
27 #if defined(__PALMOS__) && (__PALMOS__ >= 0x06000000)
28 #define HAVE_CTYPE_H 1
29 #define HAVE_STRING_H 1
30 #define HAVE_SYS_TYPES_H 1
31 #define HAVE_TIME_H 1
32 #define HAVE_STDARG_H 1
33 
34 #elif defined(__VXWORKS_OS__) || defined(__rtems__)
35 #define HAVE_STRING_H 1
36 #define HAVE_TIME_H 1
37 #define HAVE_SYS_TIME_H 1
38 #define HAVE_SYS_TYPES_H 1
39 #define HAVE_STDARG_H 1
40 
41 #elif defined _WIN32_WCE
42 
43 #define HAVE_CTYPE_H 1
44 #define HAVE_STRING_H 1
45 #define HAVE_TIME_H 1
46 #define HAVE_STDARG_H 1
47 
48 #define snprintf _snprintf
49 
50 #elif defined(WIN32)
51 
52 #define HAVE_CTYPE_H 1
53 #define HAVE_STRING_H 1
54 #define HAVE_SYS_TYPES_H 1
55 #define HAVE_TIME_H 1
56 #define HAVE_STDARG_H 1
57 
58 #define snprintf _snprintf
59 
60 /* use win32 crypto routines for random number generation */
61 /* only use for vs .net (compiler v. 1300) or greater */
62 #if _MSC_VER >= 1300
63 #define WIN32_USE_CRYPTO 1
64 #endif
65 
66 #endif
67 
68 #if defined (HAVE_STRING_H)
69 #include <string.h>
70 #elif defined (HAVE_STRINGS_H)
71 #include <strings.h>
72 #else
73 #include <string.h>
74 #endif
75 
76 #include <stdio.h>
77 #include <stdlib.h>
78 
79 #if defined (HAVE_SYS_TYPES_H)
80 #include <sys/types.h>
81 #endif
82 
83 #ifdef HAVE_TIME_H
84 #include <time.h>
85 #endif
86 
87 #if defined (HAVE_SYS_TIME_H)
88 #include <sys/time.h>
89 #endif
90 
91 #if defined(__arc__)
92 #include "includes_api.h"
93 #include "os_cfg_pub.h"
94 #include <posix_time_pub.h>
95 #endif
96 
97 #ifdef __PSOS__
98 #define VA_START(a, f) va_start(a, f)
99 #include "pna.h"
100 #include "stdlib.h"
101 #include "time.h"
102 #define timercmp(tvp, uvp, cmp) \
103 ((tvp)->tv_sec cmp (uvp)->tv_sec || \
104 (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec)
105 #define snprintf osip_snprintf
106 #ifndef INT_MAX
107 #define INT_MAX 0x7FFFFFFF
108 #endif
109 #endif
110 
111 #endif /* #ifndef _INTERNAL_H_ */