BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJLIB Reference

config.h
Go to the documentation of this file.
1 /* $Id: config.h 5552 2017-01-26 03:47:58Z nanang $ */
2 /*
3  * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
4  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 #ifndef __PJ_CONFIG_H__
21 #define __PJ_CONFIG_H__
22 
23 
29 /********************************************************************
30  * Include compiler specific configuration.
31  */
32 #if defined(_MSC_VER)
33 # include <pj/compat/cc_msvc.h>
34 #elif defined(__GNUC__)
35 # include <pj/compat/cc_gcc.h>
36 #elif defined(__CW32__)
37 # include <pj/compat/cc_mwcc.h>
38 #elif defined(__MWERKS__)
39 # include <pj/compat/cc_codew.h>
40 #elif defined(__GCCE__)
41 # include <pj/compat/cc_gcce.h>
42 #elif defined(__ARMCC__)
43 # include <pj/compat/cc_armcc.h>
44 #else
45 # error "Unknown compiler."
46 #endif
47 
48 /* PJ_ALIGN_DATA is compiler specific directive to align data address */
49 #ifndef PJ_ALIGN_DATA
50 # error "PJ_ALIGN_DATA is not defined!"
51 #endif
52 
53 /********************************************************************
54  * Include target OS specific configuration.
55  */
56 #if defined(PJ_AUTOCONF)
57  /*
58  * Autoconf
59  */
60 # include <pj/compat/os_auto.h>
61 
62 #elif defined(PJ_SYMBIAN) && PJ_SYMBIAN!=0
63  /*
64  * SymbianOS
65  */
66 # include <pj/compat/os_symbian.h>
67 
68 #elif defined(PJ_WIN32_WINCE) || defined(_WIN32_WCE) || defined(UNDER_CE)
69  /*
70  * Windows CE
71  */
72 # undef PJ_WIN32_WINCE
73 # define PJ_WIN32_WINCE 1
74 # include <pj/compat/os_win32_wince.h>
75 
76  /* Also define Win32 */
77 # define PJ_WIN32 1
78 
79 #elif defined(PJ_WIN32_WINPHONE8) || defined(_WIN32_WINPHONE8)
80  /*
81  * Windows Phone 8
82  */
83 # undef PJ_WIN32_WINPHONE8
84 # define PJ_WIN32_WINPHONE8 1
85 # include <pj/compat/os_winphone8.h>
86 
87  /* Also define Win32 */
88 # define PJ_WIN32 1
89 
90 #elif defined(PJ_WIN32_UWP) || defined(_WIN32_UWP)
91  /*
92  * Windows UWP
93  */
94 # undef PJ_WIN32_UWP
95 # define PJ_WIN32_UWP 1
96 # include <pj/compat/os_winuwp.h>
97 
98  /* Define Windows phone */
99 # define PJ_WIN32_WINPHONE8 1
100 
101  /* Also define Win32 */
102 # define PJ_WIN32 1
103 
104 #elif defined(PJ_WIN32) || defined(_WIN32) || defined(__WIN32__) || \
105  defined(WIN32) || defined(PJ_WIN64) || defined(_WIN64) || \
106  defined(WIN64) || defined(__TOS_WIN__)
107 # if defined(PJ_WIN64) || defined(_WIN64) || defined(WIN64)
108  /*
109  * Win64
110  */
111 # undef PJ_WIN64
112 # define PJ_WIN64 1
113 # endif
114 # undef PJ_WIN32
115 # define PJ_WIN32 1
116 # include <pj/compat/os_win32.h>
117 
118 #elif defined(PJ_LINUX_KERNEL) && PJ_LINUX_KERNEL!=0
119  /*
120  * Linux kernel
121  */
122 # include <pj/compat/os_linux_kernel.h>
123 
124 #elif defined(PJ_LINUX) || defined(linux) || defined(__linux)
125  /*
126  * Linux
127  */
128 # undef PJ_LINUX
129 # define PJ_LINUX 1
130 # include <pj/compat/os_linux.h>
131 
132 #elif defined(PJ_PALMOS) && PJ_PALMOS!=0
133  /*
134  * Palm
135  */
136 # include <pj/compat/os_palmos.h>
137 
138 #elif defined(PJ_SUNOS) || defined(sun) || defined(__sun)
139  /*
140  * SunOS
141  */
142 # undef PJ_SUNOS
143 # define PJ_SUNOS 1
144 # include <pj/compat/os_sunos.h>
145 
146 #elif defined(PJ_DARWINOS) || defined(__MACOSX__) || \
147  defined (__APPLE__) || defined (__MACH__)
148  /*
149  * MacOS X
150  */
151 # undef PJ_DARWINOS
152 # define PJ_DARWINOS 1
153 # include <pj/compat/os_darwinos.h>
154 
155 #elif defined(PJ_RTEMS) && PJ_RTEMS!=0
156  /*
157  * RTEMS
158  */
159 # include <pj/compat/os_rtems.h>
160 #else
161 # error "Please specify target os."
162 #endif
163 
164 
165 /********************************************************************
166  * Target machine specific configuration.
167  */
168 #if defined(PJ_AUTOCONF)
169  /*
170  * Autoconf configured
171  */
172 #include <pj/compat/m_auto.h>
173 
174 #elif defined (PJ_M_I386) || defined(_i386_) || defined(i_386_) || \
175  defined(_X86_) || defined(x86) || defined(__i386__) || \
176  defined(__i386) || defined(_M_IX86) || defined(__I86__)
177  /*
178  * Generic i386 processor family, little-endian
179  */
180 # undef PJ_M_I386
181 # define PJ_M_I386 1
182 # define PJ_M_NAME "i386"
183 # define PJ_HAS_PENTIUM 1
184 # define PJ_IS_LITTLE_ENDIAN 1
185 # define PJ_IS_BIG_ENDIAN 0
186 
187 
188 #elif defined (PJ_M_X86_64) || defined(__amd64__) || defined(__amd64) || \
189  defined(__x86_64__) || defined(__x86_64) || \
190  defined(_M_X64) || defined(_M_AMD64)
191  /*
192  * AMD 64bit processor, little endian
193  */
194 # undef PJ_M_X86_64
195 # define PJ_M_X86_64 1
196 # define PJ_M_NAME "x86_64"
197 # define PJ_HAS_PENTIUM 1
198 # define PJ_IS_LITTLE_ENDIAN 1
199 # define PJ_IS_BIG_ENDIAN 0
200 
201 #elif defined(PJ_M_IA64) || defined(__ia64__) || defined(_IA64) || \
202  defined(__IA64__) || defined( _M_IA64)
203  /*
204  * Intel IA64 processor, default to little endian
205  */
206 # undef PJ_M_IA64
207 # define PJ_M_IA64 1
208 # define PJ_M_NAME "ia64"
209 # define PJ_HAS_PENTIUM 1
210 # define PJ_IS_LITTLE_ENDIAN 1
211 # define PJ_IS_BIG_ENDIAN 0
212 
213 #elif defined (PJ_M_M68K) && PJ_M_M68K != 0
214 
215  /*
216  * Motorola m68k processor, big endian
217  */
218 # undef PJ_M_M68K
219 # define PJ_M_M68K 1
220 # define PJ_M_NAME "m68k"
221 # define PJ_HAS_PENTIUM 0
222 # define PJ_IS_LITTLE_ENDIAN 0
223 # define PJ_IS_BIG_ENDIAN 1
224 
225 
226 #elif defined (PJ_M_ALPHA) || defined (__alpha__) || defined (__alpha) || \
227  defined (_M_ALPHA)
228  /*
229  * DEC Alpha processor, little endian
230  */
231 # undef PJ_M_ALPHA
232 # define PJ_M_ALPHA 1
233 # define PJ_M_NAME "alpha"
234 # define PJ_HAS_PENTIUM 0
235 # define PJ_IS_LITTLE_ENDIAN 1
236 # define PJ_IS_BIG_ENDIAN 0
237 
238 
239 #elif defined(PJ_M_MIPS) || defined(__mips__) || defined(__mips) || \
240  defined(__MIPS__) || defined(MIPS) || defined(_MIPS_)
241  /*
242  * MIPS, bi-endian, so raise error if endianness is not configured
243  */
244 # undef PJ_M_MIPS
245 # define PJ_M_MIPS 1
246 # define PJ_M_NAME "mips"
247 # define PJ_HAS_PENTIUM 0
248 # if !PJ_IS_LITTLE_ENDIAN && !PJ_IS_BIG_ENDIAN
249 # error Endianness must be declared for this processor
250 # endif
251 
252 
253 #elif defined (PJ_M_SPARC) || defined( __sparc__) || defined(__sparc)
254  /*
255  * Sun Sparc, big endian
256  */
257 # undef PJ_M_SPARC
258 # define PJ_M_SPARC 1
259 # define PJ_M_NAME "sparc"
260 # define PJ_HAS_PENTIUM 0
261 # define PJ_IS_LITTLE_ENDIAN 0
262 # define PJ_IS_BIG_ENDIAN 1
263 
264 #elif defined(ARM) || defined(_ARM_) || defined(__arm__) || defined(_M_ARM)
265 # define PJ_HAS_PENTIUM 0
266  /*
267  * ARM, bi-endian, so raise error if endianness is not configured
268  */
269 # if !PJ_IS_LITTLE_ENDIAN && !PJ_IS_BIG_ENDIAN
270 # error Endianness must be declared for this processor
271 # endif
272 # if defined (PJ_M_ARMV7) || defined(ARMV7)
273 # undef PJ_M_ARMV7
274 # define PJ_M_ARM7 1
275 # define PJ_M_NAME "armv7"
276 # elif defined (PJ_M_ARMV4) || defined(ARMV4)
277 # undef PJ_M_ARMV4
278 # define PJ_M_ARMV4 1
279 # define PJ_M_NAME "armv4"
280 # endif
281 
282 #elif defined (PJ_M_POWERPC) || defined(__powerpc) || defined(__powerpc__) || \
283  defined(__POWERPC__) || defined(__ppc__) || defined(_M_PPC) || \
284  defined(_ARCH_PPC)
285  /*
286  * PowerPC, bi-endian, so raise error if endianness is not configured
287  */
288 # undef PJ_M_POWERPC
289 # define PJ_M_POWERPC 1
290 # define PJ_M_NAME "powerpc"
291 # define PJ_HAS_PENTIUM 0
292 # if !PJ_IS_LITTLE_ENDIAN && !PJ_IS_BIG_ENDIAN
293 # error Endianness must be declared for this processor
294 # endif
295 
296 #elif defined (PJ_M_NIOS2) || defined(__nios2) || defined(__nios2__) || \
297  defined(__NIOS2__) || defined(__M_NIOS2) || defined(_ARCH_NIOS2)
298  /*
299  * Nios2, little endian
300  */
301 # undef PJ_M_NIOS2
302 # define PJ_M_NIOS2 1
303 # define PJ_M_NAME "nios2"
304 # define PJ_HAS_PENTIUM 0
305 # define PJ_IS_LITTLE_ENDIAN 1
306 # define PJ_IS_BIG_ENDIAN 0
307 
308 #else
309 # error "Please specify target machine."
310 #endif
311 
312 /* Include size_t definition. */
313 #include <pj/compat/size_t.h>
314 
315 /* Include site/user specific configuration to control PJLIB features.
316  * YOU MUST CREATE THIS FILE YOURSELF!!
317  */
318 #include <pj/config_site.h>
319 
320 /********************************************************************
321  * PJLIB Features.
322  */
323 
324 /* Overrides for DOXYGEN */
325 #ifdef DOXYGEN
326 # undef PJ_FUNCTIONS_ARE_INLINED
327 # undef PJ_HAS_FLOATING_POINT
328 # undef PJ_LOG_MAX_LEVEL
329 # undef PJ_LOG_MAX_SIZE
330 # undef PJ_LOG_USE_STACK_BUFFER
331 # undef PJ_TERM_HAS_COLOR
332 # undef PJ_POOL_DEBUG
333 # undef PJ_HAS_TCP
334 # undef PJ_MAX_HOSTNAME
335 # undef PJ_IOQUEUE_MAX_HANDLES
336 # undef FD_SETSIZE
337 # undef PJ_HAS_SEMAPHORE
338 # undef PJ_HAS_EVENT_OBJ
339 # undef PJ_ENABLE_EXTRA_CHECK
340 # undef PJ_EXCEPTION_USE_WIN32_SEH
341 # undef PJ_HAS_ERROR_STRING
342 
343 # define PJ_HAS_IPV6 1
344 #endif
345 
363 #ifndef PJ_DEBUG
364 # ifndef NDEBUG
365 # define PJ_DEBUG 1
366 # else
367 # define PJ_DEBUG 0
368 # endif
369 #endif
370 
379 #ifndef PJ_DEBUG_MUTEX
380 # define PJ_DEBUG_MUTEX 0
381 #endif
382 
388 #ifndef PJ_FUNCTIONS_ARE_INLINED
389 # define PJ_FUNCTIONS_ARE_INLINED 0
390 #endif
391 
397 #ifndef PJ_HAS_FLOATING_POINT
398 # define PJ_HAS_FLOATING_POINT 1
399 #endif
400 
418 #ifndef PJ_LOG_MAX_LEVEL
419 # define PJ_LOG_MAX_LEVEL 5
420 #endif
421 
430 #ifndef PJ_LOG_MAX_SIZE
431 # define PJ_LOG_MAX_SIZE 4000
432 #endif
433 
442 #ifndef PJ_LOG_USE_STACK_BUFFER
443 # define PJ_LOG_USE_STACK_BUFFER 1
444 #endif
445 
451 #ifndef PJ_LOG_ENABLE_INDENT
452 # define PJ_LOG_ENABLE_INDENT 1
453 #endif
454 
461 #ifndef PJ_LOG_INDENT_SIZE
462 # define PJ_LOG_INDENT_SIZE 1
463 #endif
464 
470 #ifndef PJ_LOG_INDENT_CHAR
471 # define PJ_LOG_INDENT_CHAR '.'
472 #endif
473 
479 #ifndef PJ_TERM_HAS_COLOR
480 # define PJ_TERM_HAS_COLOR 1
481 #endif
482 
483 
495 #ifndef PJ_SAFE_POOL
496 # define PJ_SAFE_POOL 0
497 #endif
498 
499 
508 #ifndef PJ_POOL_DEBUG
509 # define PJ_POOL_DEBUG 0
510 #endif
511 
512 
521 #ifndef PJ_TIMER_DEBUG
522 # define PJ_TIMER_DEBUG 0
523 #endif
524 
525 
529 #ifndef PJ_GRP_LOCK_DEBUG
530 # define PJ_GRP_LOCK_DEBUG 0
531 #endif
532 
533 
540 #ifndef PJ_THREAD_DEFAULT_STACK_SIZE
541 # define PJ_THREAD_DEFAULT_STACK_SIZE 8192
542 #endif
543 
544 
552 #ifndef PJ_OS_HAS_CHECK_STACK
553 # define PJ_OS_HAS_CHECK_STACK 0
554 #endif
555 
561 #ifndef PJ_HAS_POOL_ALT_API
562 # define PJ_HAS_POOL_ALT_API PJ_POOL_DEBUG
563 #endif
564 
565 
572 #ifndef PJ_HAS_TCP
573 # define PJ_HAS_TCP 1
574 #endif
575 
582 #ifndef PJ_HAS_IPV6
583 # define PJ_HAS_IPV6 0
584 #endif
585 
593 #ifndef PJ_MAX_HOSTNAME
594 # define PJ_MAX_HOSTNAME (128)
595 #endif
596 
603 #ifndef PJ_ACTIVESOCK_MAX_CONSECUTIVE_ACCEPT_ERROR
604 # define PJ_ACTIVESOCK_MAX_CONSECUTIVE_ACCEPT_ERROR 50
605 #endif
606 
614 #ifndef PJ_IOQUEUE_MAX_HANDLES
615 # define PJ_IOQUEUE_MAX_HANDLES (64)
616 #endif
617 
618 
635 #ifndef PJ_IOQUEUE_HAS_SAFE_UNREG
636 # define PJ_IOQUEUE_HAS_SAFE_UNREG 1
637 #endif
638 
639 
651 #ifndef PJ_IOQUEUE_DEFAULT_ALLOW_CONCURRENCY
652 # define PJ_IOQUEUE_DEFAULT_ALLOW_CONCURRENCY 1
653 #endif
654 
655 
656 /* Sanity check:
657  * if ioqueue concurrency is disallowed, PJ_IOQUEUE_HAS_SAFE_UNREG
658  * must be enabled.
659  */
660 #if (PJ_IOQUEUE_DEFAULT_ALLOW_CONCURRENCY==0) && (PJ_IOQUEUE_HAS_SAFE_UNREG==0)
661 # error PJ_IOQUEUE_HAS_SAFE_UNREG must be enabled if ioqueue concurrency \
662  is disabled
663 #endif
664 
665 
675 #ifndef PJ_IOQUEUE_KEY_FREE_DELAY
676 # define PJ_IOQUEUE_KEY_FREE_DELAY 500
677 #endif
678 
679 
685 #ifndef PJ_FD_SETSIZE_SETABLE
686 # if (defined(PJ_HAS_WINSOCK_H) && PJ_HAS_WINSOCK_H!=0) || \
687  (defined(PJ_HAS_WINSOCK2_H) && PJ_HAS_WINSOCK2_H!=0)
688 # define PJ_FD_SETSIZE_SETABLE 1
689 # else
690 # define PJ_FD_SETSIZE_SETABLE 0
691 # endif
692 #endif
693 
700 #if PJ_FD_SETSIZE_SETABLE
701  /* Only override FD_SETSIZE if the value has not been set */
702 # ifndef FD_SETSIZE
703 # define FD_SETSIZE PJ_IOQUEUE_MAX_HANDLES
704 # endif
705 #else
706  /* When FD_SETSIZE is not changeable, check if PJ_IOQUEUE_MAX_HANDLES
707  * is lower than FD_SETSIZE value.
708  *
709  * Update: Not all ioqueue backends require this (such as epoll), so
710  * this check will be done on the ioqueue implementation itself, such as
711  * ioqueue select.
712  */
713 /*
714 # ifdef FD_SETSIZE
715 # if PJ_IOQUEUE_MAX_HANDLES > FD_SETSIZE
716 # error "PJ_IOQUEUE_MAX_HANDLES is greater than FD_SETSIZE"
717 # endif
718 # endif
719 */
720 #endif
721 
722 
729 #ifndef PJ_IP_HELPER_IGNORE_LOOPBACK_IF
730 # define PJ_IP_HELPER_IGNORE_LOOPBACK_IF 1
731 #endif
732 
733 
739 #ifndef PJ_HAS_SEMAPHORE
740 # define PJ_HAS_SEMAPHORE 1
741 #endif
742 
743 
749 #ifndef PJ_HAS_EVENT_OBJ
750 # define PJ_HAS_EVENT_OBJ 1
751 #endif
752 
753 
757 #ifndef PJ_MAXPATH
758 # define PJ_MAXPATH 260
759 #endif
760 
761 
773 #ifndef PJ_ENABLE_EXTRA_CHECK
774 # define PJ_ENABLE_EXTRA_CHECK 1
775 #endif
776 
777 
789 #ifndef PJ_HAS_EXCEPTION_NAMES
790 # define PJ_HAS_EXCEPTION_NAMES 1
791 #endif
792 
800 #ifndef PJ_MAX_EXCEPTION_ID
801 # define PJ_MAX_EXCEPTION_ID 16
802 #endif
803 
810 #ifndef PJ_EXCEPTION_USE_WIN32_SEH
811 # define PJ_EXCEPTION_USE_WIN32_SEH 0
812 #endif
813 
820 #ifndef PJ_TIMESTAMP_USE_RDTSC
821 # define PJ_TIMESTAMP_USE_RDTSC 0
822 #endif
823 
828 #ifndef PJ_NATIVE_ERR_POSITIVE
829 # define PJ_NATIVE_ERR_POSITIVE 1
830 #endif
831 
838 #ifndef PJ_HAS_ERROR_STRING
839 # define PJ_HAS_ERROR_STRING 1
840 #endif
841 
842 
851 #ifndef PJ_HAS_STRICMP_ALNUM
852 # define PJ_HAS_STRICMP_ALNUM 0
853 #endif
854 
855 
856 /*
857  * Types of QoS backend implementation.
858  */
859 
864 #define PJ_QOS_DUMMY 1
865 
867 #define PJ_QOS_BSD 2
868 
870 #define PJ_QOS_WM 3
871 
873 #define PJ_QOS_SYMBIAN 4
874 
876 #define PJ_QOS_DARWIN 5
877 
881 #ifndef PJ_QOS_IMPLEMENTATION
882 # if defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE && _WIN32_WCE >= 0x502
883  /* Windows Mobile 6 or later */
884 # define PJ_QOS_IMPLEMENTATION PJ_QOS_WM
885 # endif
886 #endif
887 
888 
896 #ifndef PJ_HAS_SSL_SOCK
897 # define PJ_HAS_SSL_SOCK 0
898 #endif
899 
900 
906 #ifndef PJ_SSL_SOCK_MAX_CIPHERS
907 # define PJ_SSL_SOCK_MAX_CIPHERS 256
908 #endif
909 
910 
918 #ifndef PJ_SSL_SOCK_OSSL_CIPHERS
919 # define PJ_SSL_SOCK_OSSL_CIPHERS "HIGH:-COMPLEMENTOFDEFAULT"
920 #endif
921 
922 
928 #ifndef PJ_SSL_SOCK_MAX_CURVES
929 # define PJ_SSL_SOCK_MAX_CURVES 32
930 #endif
931 
932 
939 #ifndef PJ_SOCK_DISABLE_WSAECONNRESET
940 # define PJ_SOCK_DISABLE_WSAECONNRESET 1
941 #endif
942 
943 
946 /********************************************************************
947  * General macros.
948  */
949 
1032 #define PJ_INLINE(type) PJ_INLINE_SPECIFIER type
1033 
1042 #ifndef PJ_EXPORT_DECL_SPECIFIER
1043 # define PJ_EXPORT_DECL_SPECIFIER
1044 #endif
1045 
1046 
1055 #ifndef PJ_EXPORT_DEF_SPECIFIER
1056 # define PJ_EXPORT_DEF_SPECIFIER
1057 #endif
1058 
1059 
1067 #ifndef PJ_IMPORT_DECL_SPECIFIER
1068 # define PJ_IMPORT_DECL_SPECIFIER
1069 #endif
1070 
1071 
1075 #ifndef PJ_EXPORT_SYMBOL
1076 # define PJ_EXPORT_SYMBOL(x)
1077 #endif
1078 
1079 
1085 #if defined(PJ_DLL)
1086 # if defined(PJ_EXPORTING)
1087 # define PJ_DECL(type) PJ_EXPORT_DECL_SPECIFIER type
1088 # else
1089 # define PJ_DECL(type) PJ_IMPORT_DECL_SPECIFIER type
1090 # endif
1091 #elif !defined(PJ_DECL)
1092 # if defined(__cplusplus)
1093 # define PJ_DECL(type) type
1094 # else
1095 # define PJ_DECL(type) extern type
1096 # endif
1097 #endif
1098 
1099 
1105 #if defined(PJ_DLL) && defined(PJ_EXPORTING)
1106 # define PJ_DEF(type) PJ_EXPORT_DEF_SPECIFIER type
1107 #elif !defined(PJ_DEF)
1108 # define PJ_DEF(type) type
1109 #endif
1110 
1111 
1130 #ifdef __cplusplus
1131 # define PJ_DECL_NO_RETURN(type) PJ_DECL(type) PJ_NORETURN
1132 # define PJ_IDECL_NO_RETURN(type) PJ_INLINE(type) PJ_NORETURN
1133 # define PJ_BEGIN_DECL extern "C" {
1134 # define PJ_END_DECL }
1135 #else
1136 # define PJ_DECL_NO_RETURN(type) PJ_NORETURN PJ_DECL(type)
1137 # define PJ_IDECL_NO_RETURN(type) PJ_NORETURN PJ_INLINE(type)
1138 # define PJ_BEGIN_DECL
1139 # define PJ_END_DECL
1140 #endif
1141 
1142 
1143 
1149 #if defined(PJ_DLL)
1150 # if defined(PJ_EXPORTING)
1151 # define PJ_DECL_DATA(type) PJ_EXPORT_DECL_SPECIFIER extern type
1152 # else
1153 # define PJ_DECL_DATA(type) PJ_IMPORT_DECL_SPECIFIER extern type
1154 # endif
1155 #elif !defined(PJ_DECL_DATA)
1156 # define PJ_DECL_DATA(type) extern type
1157 #endif
1158 
1159 
1165 #if defined(PJ_DLL) && defined(PJ_EXPORTING)
1166 # define PJ_DEF_DATA(type) PJ_EXPORT_DEF_SPECIFIER type
1167 #elif !defined(PJ_DEF_DATA)
1168 # define PJ_DEF_DATA(type) type
1169 #endif
1170 
1171 
1183 #if PJ_FUNCTIONS_ARE_INLINED
1184 # define PJ_IDECL(type) PJ_INLINE(type)
1185 # define PJ_IDEF(type) PJ_INLINE(type)
1186 #else
1187 # define PJ_IDECL(type) PJ_DECL(type)
1188 # define PJ_IDEF(type) PJ_DEF(type)
1189 #endif
1190 
1191 
1197 #define PJ_UNUSED_ARG(arg) (void)arg
1198 
1205 #ifndef PJ_TODO
1206 # define PJ_TODO(id) TODO___##id:
1207 #endif
1208 
1213 #ifndef PJ_RACE_ME
1214 # define PJ_RACE_ME(x)
1215 #endif
1216 
1222 #define __pj_throw__(x)
1223 
1226 /********************************************************************
1227  * Sanity Checks
1228  */
1229 #ifndef PJ_HAS_HIGH_RES_TIMER
1230 # error "PJ_HAS_HIGH_RES_TIMER is not defined!"
1231 #endif
1232 
1233 #if !defined(PJ_HAS_PENTIUM)
1234 # error "PJ_HAS_PENTIUM is not defined!"
1235 #endif
1236 
1237 #if !defined(PJ_IS_LITTLE_ENDIAN)
1238 # error "PJ_IS_LITTLE_ENDIAN is not defined!"
1239 #endif
1240 
1241 #if !defined(PJ_IS_BIG_ENDIAN)
1242 # error "PJ_IS_BIG_ENDIAN is not defined!"
1243 #endif
1244 
1245 #if !defined(PJ_EMULATE_RWMUTEX)
1246 # error "PJ_EMULATE_RWMUTEX should be defined in compat/os_xx.h"
1247 #endif
1248 
1249 #if !defined(PJ_THREAD_SET_STACK_SIZE)
1250 # error "PJ_THREAD_SET_STACK_SIZE should be defined in compat/os_xx.h"
1251 #endif
1252 
1253 #if !defined(PJ_THREAD_ALLOCATE_STACK)
1254 # error "PJ_THREAD_ALLOCATE_STACK should be defined in compat/os_xx.h"
1255 #endif
1256 
1258 
1260 #define PJ_VERSION_NUM_MAJOR 2
1261 
1263 #define PJ_VERSION_NUM_MINOR 6
1264 
1266 #define PJ_VERSION_NUM_REV 0
1267 
1272 #define PJ_VERSION_NUM_EXTRA ""
1273 
1279 #define PJ_VERSION_NUM ((PJ_VERSION_NUM_MAJOR << 24) | \
1280  (PJ_VERSION_NUM_MINOR << 16) | \
1281  (PJ_VERSION_NUM_REV << 8))
1282 
1286 PJ_DECL_DATA(const char*) PJ_VERSION;
1287 
1293 PJ_DECL(const char*) pj_get_version(void);
1294 
1298 PJ_DECL(void) pj_dump_config(void);
1299 
1301 
1302 
1303 #endif /* __PJ_CONFIG_H__ */
1304 
void pj_dump_config(void)
const char * pj_get_version(void)
#define PJ_END_DECL
Definition: config.h:1139
#define PJ_BEGIN_DECL
Definition: config.h:1138
const char * PJ_VERSION
Definition: config.h:1286

 


PJLIB Open Source, high performance, small footprint, and very very portable framework
Copyright (C) 2006-2009 Teluu Inc.