BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJLIB Reference

config.h
Go to the documentation of this file.
1 /* $Id: config.h 5683 2017-11-08 03:03:22Z ming $ */
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_LOG_SENDER_WIDTH
480 # if PJ_HAS_STDINT_H
481 # include <stdint.h>
482 # if (UINTPTR_MAX == 0xffffffffffffffff)
483 # define PJ_LOG_SENDER_WIDTH 22
484 # else
485 # define PJ_LOG_SENDER_WIDTH 14
486 # endif
487 # else
488 # define PJ_LOG_SENDER_WIDTH 14
489 # endif
490 #endif
491 
497 #ifndef PJ_LOG_THREAD_WIDTH
498 # define PJ_LOG_THREAD_WIDTH 12
499 #endif
500 
506 #ifndef PJ_TERM_HAS_COLOR
507 # define PJ_TERM_HAS_COLOR 1
508 #endif
509 
510 
522 #ifndef PJ_SAFE_POOL
523 # define PJ_SAFE_POOL 0
524 #endif
525 
526 
535 #ifndef PJ_POOL_DEBUG
536 # define PJ_POOL_DEBUG 0
537 #endif
538 
539 
548 #ifndef PJ_TIMER_DEBUG
549 # define PJ_TIMER_DEBUG 0
550 #endif
551 
552 
556 #ifndef PJ_GRP_LOCK_DEBUG
557 # define PJ_GRP_LOCK_DEBUG 0
558 #endif
559 
560 
567 #ifndef PJ_THREAD_DEFAULT_STACK_SIZE
568 # define PJ_THREAD_DEFAULT_STACK_SIZE 8192
569 #endif
570 
571 
579 #ifndef PJ_OS_HAS_CHECK_STACK
580 # define PJ_OS_HAS_CHECK_STACK 0
581 #endif
582 
588 #ifndef PJ_HAS_POOL_ALT_API
589 # define PJ_HAS_POOL_ALT_API PJ_POOL_DEBUG
590 #endif
591 
592 
599 #ifndef PJ_HAS_TCP
600 # define PJ_HAS_TCP 1
601 #endif
602 
609 #ifndef PJ_HAS_IPV6
610 # define PJ_HAS_IPV6 0
611 #endif
612 
620 #ifndef PJ_MAX_HOSTNAME
621 # define PJ_MAX_HOSTNAME (128)
622 #endif
623 
630 #ifndef PJ_ACTIVESOCK_MAX_CONSECUTIVE_ACCEPT_ERROR
631 # define PJ_ACTIVESOCK_MAX_CONSECUTIVE_ACCEPT_ERROR 50
632 #endif
633 
641 #ifndef PJ_IOQUEUE_MAX_HANDLES
642 # define PJ_IOQUEUE_MAX_HANDLES (64)
643 #endif
644 
645 
662 #ifndef PJ_IOQUEUE_HAS_SAFE_UNREG
663 # define PJ_IOQUEUE_HAS_SAFE_UNREG 1
664 #endif
665 
666 
678 #ifndef PJ_IOQUEUE_DEFAULT_ALLOW_CONCURRENCY
679 # define PJ_IOQUEUE_DEFAULT_ALLOW_CONCURRENCY 1
680 #endif
681 
682 
683 /* Sanity check:
684  * if ioqueue concurrency is disallowed, PJ_IOQUEUE_HAS_SAFE_UNREG
685  * must be enabled.
686  */
687 #if (PJ_IOQUEUE_DEFAULT_ALLOW_CONCURRENCY==0) && (PJ_IOQUEUE_HAS_SAFE_UNREG==0)
688 # error PJ_IOQUEUE_HAS_SAFE_UNREG must be enabled if ioqueue concurrency \
689  is disabled
690 #endif
691 
692 
702 #ifndef PJ_IOQUEUE_KEY_FREE_DELAY
703 # define PJ_IOQUEUE_KEY_FREE_DELAY 500
704 #endif
705 
706 
712 #ifndef PJ_FD_SETSIZE_SETABLE
713 # if (defined(PJ_HAS_WINSOCK_H) && PJ_HAS_WINSOCK_H!=0) || \
714  (defined(PJ_HAS_WINSOCK2_H) && PJ_HAS_WINSOCK2_H!=0)
715 # define PJ_FD_SETSIZE_SETABLE 1
716 # else
717 # define PJ_FD_SETSIZE_SETABLE 0
718 # endif
719 #endif
720 
727 #if PJ_FD_SETSIZE_SETABLE
728  /* Only override FD_SETSIZE if the value has not been set */
729 # ifndef FD_SETSIZE
730 # define FD_SETSIZE PJ_IOQUEUE_MAX_HANDLES
731 # endif
732 #else
733  /* When FD_SETSIZE is not changeable, check if PJ_IOQUEUE_MAX_HANDLES
734  * is lower than FD_SETSIZE value.
735  *
736  * Update: Not all ioqueue backends require this (such as epoll), so
737  * this check will be done on the ioqueue implementation itself, such as
738  * ioqueue select.
739  */
740 /*
741 # ifdef FD_SETSIZE
742 # if PJ_IOQUEUE_MAX_HANDLES > FD_SETSIZE
743 # error "PJ_IOQUEUE_MAX_HANDLES is greater than FD_SETSIZE"
744 # endif
745 # endif
746 */
747 #endif
748 
749 
756 #ifndef PJ_IP_HELPER_IGNORE_LOOPBACK_IF
757 # define PJ_IP_HELPER_IGNORE_LOOPBACK_IF 1
758 #endif
759 
760 
766 #ifndef PJ_HAS_SEMAPHORE
767 # define PJ_HAS_SEMAPHORE 1
768 #endif
769 
770 
776 #ifndef PJ_HAS_EVENT_OBJ
777 # define PJ_HAS_EVENT_OBJ 1
778 #endif
779 
780 
784 #ifndef PJ_MAXPATH
785 # define PJ_MAXPATH 260
786 #endif
787 
788 
800 #ifndef PJ_ENABLE_EXTRA_CHECK
801 # define PJ_ENABLE_EXTRA_CHECK 1
802 #endif
803 
804 
816 #ifndef PJ_HAS_EXCEPTION_NAMES
817 # define PJ_HAS_EXCEPTION_NAMES 1
818 #endif
819 
827 #ifndef PJ_MAX_EXCEPTION_ID
828 # define PJ_MAX_EXCEPTION_ID 16
829 #endif
830 
837 #ifndef PJ_EXCEPTION_USE_WIN32_SEH
838 # define PJ_EXCEPTION_USE_WIN32_SEH 0
839 #endif
840 
847 #ifndef PJ_TIMESTAMP_USE_RDTSC
848 # define PJ_TIMESTAMP_USE_RDTSC 0
849 #endif
850 
855 #ifndef PJ_NATIVE_ERR_POSITIVE
856 # define PJ_NATIVE_ERR_POSITIVE 1
857 #endif
858 
865 #ifndef PJ_HAS_ERROR_STRING
866 # define PJ_HAS_ERROR_STRING 1
867 #endif
868 
869 
878 #ifndef PJ_HAS_STRICMP_ALNUM
879 # define PJ_HAS_STRICMP_ALNUM 0
880 #endif
881 
882 
883 /*
884  * Types of QoS backend implementation.
885  */
886 
891 #define PJ_QOS_DUMMY 1
892 
894 #define PJ_QOS_BSD 2
895 
897 #define PJ_QOS_WM 3
898 
900 #define PJ_QOS_SYMBIAN 4
901 
903 #define PJ_QOS_DARWIN 5
904 
908 #ifndef PJ_QOS_IMPLEMENTATION
909 # if defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE && _WIN32_WCE >= 0x502
910  /* Windows Mobile 6 or later */
911 # define PJ_QOS_IMPLEMENTATION PJ_QOS_WM
912 # elif defined(PJ_DARWINOS)
913  /* Darwin OS (e.g: iOS, MacOS, tvOS) */
914 # define PJ_QOS_IMPLEMENTATION PJ_QOS_DARWIN
915 # endif
916 #endif
917 
918 
926 #ifndef PJ_HAS_SSL_SOCK
927 # define PJ_HAS_SSL_SOCK 0
928 #endif
929 
930 
936 #ifndef PJ_SSL_SOCK_MAX_CIPHERS
937 # define PJ_SSL_SOCK_MAX_CIPHERS 256
938 #endif
939 
940 
948 #ifndef PJ_SSL_SOCK_OSSL_CIPHERS
949 # define PJ_SSL_SOCK_OSSL_CIPHERS "HIGH:-COMPLEMENTOFDEFAULT"
950 #endif
951 
952 
958 #ifndef PJ_SSL_SOCK_MAX_CURVES
959 # define PJ_SSL_SOCK_MAX_CURVES 32
960 #endif
961 
962 
969 #ifndef PJ_SOCK_DISABLE_WSAECONNRESET
970 # define PJ_SOCK_DISABLE_WSAECONNRESET 1
971 #endif
972 
973 
976 /********************************************************************
977  * General macros.
978  */
979 
1062 #define PJ_INLINE(type) PJ_INLINE_SPECIFIER type
1063 
1072 #ifndef PJ_EXPORT_DECL_SPECIFIER
1073 # define PJ_EXPORT_DECL_SPECIFIER
1074 #endif
1075 
1076 
1085 #ifndef PJ_EXPORT_DEF_SPECIFIER
1086 # define PJ_EXPORT_DEF_SPECIFIER
1087 #endif
1088 
1089 
1097 #ifndef PJ_IMPORT_DECL_SPECIFIER
1098 # define PJ_IMPORT_DECL_SPECIFIER
1099 #endif
1100 
1101 
1105 #ifndef PJ_EXPORT_SYMBOL
1106 # define PJ_EXPORT_SYMBOL(x)
1107 #endif
1108 
1109 
1115 #if defined(PJ_DLL)
1116 # if defined(PJ_EXPORTING)
1117 # define PJ_DECL(type) PJ_EXPORT_DECL_SPECIFIER type
1118 # else
1119 # define PJ_DECL(type) PJ_IMPORT_DECL_SPECIFIER type
1120 # endif
1121 #elif !defined(PJ_DECL)
1122 # if defined(__cplusplus)
1123 # define PJ_DECL(type) type
1124 # else
1125 # define PJ_DECL(type) extern type
1126 # endif
1127 #endif
1128 
1129 
1135 #if defined(PJ_DLL) && defined(PJ_EXPORTING)
1136 # define PJ_DEF(type) PJ_EXPORT_DEF_SPECIFIER type
1137 #elif !defined(PJ_DEF)
1138 # define PJ_DEF(type) type
1139 #endif
1140 
1141 
1160 #ifdef __cplusplus
1161 # define PJ_DECL_NO_RETURN(type) PJ_DECL(type) PJ_NORETURN
1162 # define PJ_IDECL_NO_RETURN(type) PJ_INLINE(type) PJ_NORETURN
1163 # define PJ_BEGIN_DECL extern "C" {
1164 # define PJ_END_DECL }
1165 #else
1166 # define PJ_DECL_NO_RETURN(type) PJ_NORETURN PJ_DECL(type)
1167 # define PJ_IDECL_NO_RETURN(type) PJ_NORETURN PJ_INLINE(type)
1168 # define PJ_BEGIN_DECL
1169 # define PJ_END_DECL
1170 #endif
1171 
1172 
1173 
1179 #if defined(PJ_DLL)
1180 # if defined(PJ_EXPORTING)
1181 # define PJ_DECL_DATA(type) PJ_EXPORT_DECL_SPECIFIER extern type
1182 # else
1183 # define PJ_DECL_DATA(type) PJ_IMPORT_DECL_SPECIFIER extern type
1184 # endif
1185 #elif !defined(PJ_DECL_DATA)
1186 # define PJ_DECL_DATA(type) extern type
1187 #endif
1188 
1189 
1195 #if defined(PJ_DLL) && defined(PJ_EXPORTING)
1196 # define PJ_DEF_DATA(type) PJ_EXPORT_DEF_SPECIFIER type
1197 #elif !defined(PJ_DEF_DATA)
1198 # define PJ_DEF_DATA(type) type
1199 #endif
1200 
1201 
1213 #if PJ_FUNCTIONS_ARE_INLINED
1214 # define PJ_IDECL(type) PJ_INLINE(type)
1215 # define PJ_IDEF(type) PJ_INLINE(type)
1216 #else
1217 # define PJ_IDECL(type) PJ_DECL(type)
1218 # define PJ_IDEF(type) PJ_DEF(type)
1219 #endif
1220 
1221 
1227 #define PJ_UNUSED_ARG(arg) (void)arg
1228 
1235 #ifndef PJ_TODO
1236 # define PJ_TODO(id) TODO___##id:
1237 #endif
1238 
1243 #ifndef PJ_RACE_ME
1244 # define PJ_RACE_ME(x)
1245 #endif
1246 
1252 #define __pj_throw__(x)
1253 
1256 /********************************************************************
1257  * Sanity Checks
1258  */
1259 #ifndef PJ_HAS_HIGH_RES_TIMER
1260 # error "PJ_HAS_HIGH_RES_TIMER is not defined!"
1261 #endif
1262 
1263 #if !defined(PJ_HAS_PENTIUM)
1264 # error "PJ_HAS_PENTIUM is not defined!"
1265 #endif
1266 
1267 #if !defined(PJ_IS_LITTLE_ENDIAN)
1268 # error "PJ_IS_LITTLE_ENDIAN is not defined!"
1269 #endif
1270 
1271 #if !defined(PJ_IS_BIG_ENDIAN)
1272 # error "PJ_IS_BIG_ENDIAN is not defined!"
1273 #endif
1274 
1275 #if !defined(PJ_EMULATE_RWMUTEX)
1276 # error "PJ_EMULATE_RWMUTEX should be defined in compat/os_xx.h"
1277 #endif
1278 
1279 #if !defined(PJ_THREAD_SET_STACK_SIZE)
1280 # error "PJ_THREAD_SET_STACK_SIZE should be defined in compat/os_xx.h"
1281 #endif
1282 
1283 #if !defined(PJ_THREAD_ALLOCATE_STACK)
1284 # error "PJ_THREAD_ALLOCATE_STACK should be defined in compat/os_xx.h"
1285 #endif
1286 
1288 
1290 #define PJ_VERSION_NUM_MAJOR 2
1291 
1293 #define PJ_VERSION_NUM_MINOR 7
1294 
1296 #define PJ_VERSION_NUM_REV 1
1297 
1302 #define PJ_VERSION_NUM_EXTRA ""
1303 
1309 #define PJ_VERSION_NUM ((PJ_VERSION_NUM_MAJOR << 24) | \
1310  (PJ_VERSION_NUM_MINOR << 16) | \
1311  (PJ_VERSION_NUM_REV << 8))
1312 
1316 PJ_DECL_DATA(const char*) PJ_VERSION;
1317 
1323 PJ_DECL(const char*) pj_get_version(void);
1324 
1328 PJ_DECL(void) pj_dump_config(void);
1329 
1331 
1332 
1333 #endif /* __PJ_CONFIG_H__ */
1334 
void pj_dump_config(void)
const char * pj_get_version(void)
#define PJ_END_DECL
Definition: config.h:1169
#define PJ_BEGIN_DECL
Definition: config.h:1168
const char * PJ_VERSION
Definition: config.h:1316

 


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