19#ifndef __PJ_CONFIG_H__
20#define __PJ_CONFIG_H__
32# include <pj/compat/cc_msvc.h>
33#elif defined(__GNUC__)
34# include <pj/compat/cc_gcc.h>
35#elif defined(__CW32__)
36# include <pj/compat/cc_mwcc.h>
37#elif defined(__MWERKS__)
38# include <pj/compat/cc_codew.h>
39#elif defined(__GCCE__)
40# include <pj/compat/cc_gcce.h>
41#elif defined(__ARMCC__)
42# include <pj/compat/cc_armcc.h>
44# error "Unknown compiler."
49# error "PJ_ALIGN_DATA is not defined!"
55#if defined(PJ_AUTOCONF)
59# include <pj/compat/os_auto.h>
61#elif defined(PJ_SYMBIAN) && PJ_SYMBIAN!=0
65# include <pj/compat/os_symbian.h>
67#elif defined(PJ_WIN32_WINCE) || defined(_WIN32_WCE) || defined(UNDER_CE)
72# define PJ_WIN32_WINCE 1
73# include <pj/compat/os_win32_wince.h>
78#elif defined(PJ_WIN32_WINPHONE8) || defined(_WIN32_WINPHONE8)
82# undef PJ_WIN32_WINPHONE8
83# define PJ_WIN32_WINPHONE8 1
84# include <pj/compat/os_winphone8.h>
89#elif defined(PJ_WIN32_UWP) || defined(_WIN32_UWP)
94# define PJ_WIN32_UWP 1
95# include <pj/compat/os_winuwp.h>
98# define PJ_WIN32_WINPHONE8 1
103#elif defined(PJ_WIN32) || defined(_WIN32) || defined(__WIN32__) || \
104 defined(WIN32) || defined(PJ_WIN64) || defined(_WIN64) || \
105 defined(WIN64) || defined(__TOS_WIN__)
106# if defined(PJ_WIN64) || defined(_WIN64) || defined(WIN64)
115# include <pj/compat/os_win32.h>
117#elif defined(PJ_LINUX) || defined(linux) || defined(__linux)
123# include <pj/compat/os_linux.h>
125#elif defined(PJ_PALMOS) && PJ_PALMOS!=0
129# include <pj/compat/os_palmos.h>
131#elif defined(PJ_SUNOS) || defined(sun) || defined(__sun)
137# include <pj/compat/os_sunos.h>
139#elif defined(PJ_DARWINOS) || defined(__MACOSX__) || \
140 defined (__APPLE__) || defined (__MACH__)
145# define PJ_DARWINOS 1
146# include <pj/compat/os_darwinos.h>
148#elif defined(PJ_RTEMS) && PJ_RTEMS!=0
152# include <pj/compat/os_rtems.h>
154# error "Please specify target os."
161#if defined(PJ_AUTOCONF)
165#include <pj/compat/m_auto.h>
167#elif defined (PJ_M_I386) || defined(_i386_) || defined(i_386_) || \
168 defined(_X86_) || defined(x86) || defined(__i386__) || \
169 defined(__i386) || defined(_M_IX86) || defined(__I86__)
175# define PJ_M_NAME "i386"
176# define PJ_HAS_PENTIUM 1
177# define PJ_IS_LITTLE_ENDIAN 1
178# define PJ_IS_BIG_ENDIAN 0
180#elif defined (PJ_M_X86_64) || defined(__amd64__) || defined(__amd64) || \
181 defined(__x86_64__) || defined(__x86_64) || \
182 defined(_M_X64) || defined(_M_AMD64)
187# define PJ_M_X86_64 1
188# define PJ_M_NAME "x86_64"
189# define PJ_HAS_PENTIUM 1
190# define PJ_IS_LITTLE_ENDIAN 1
191# define PJ_IS_BIG_ENDIAN 0
193#elif defined(PJ_M_IA64) || defined(__ia64__) || defined(_IA64) || \
194 defined(__IA64__) || defined( _M_IA64)
200# define PJ_M_NAME "ia64"
201# define PJ_HAS_PENTIUM 1
202# define PJ_IS_LITTLE_ENDIAN 1
203# define PJ_IS_BIG_ENDIAN 0
205#elif defined (PJ_M_M68K) && PJ_M_M68K != 0
212# define PJ_M_NAME "m68k"
213# define PJ_HAS_PENTIUM 0
214# define PJ_IS_LITTLE_ENDIAN 0
215# define PJ_IS_BIG_ENDIAN 1
218#elif defined (PJ_M_ALPHA) || defined (__alpha__) || defined (__alpha) || \
225# define PJ_M_NAME "alpha"
226# define PJ_HAS_PENTIUM 0
227# define PJ_IS_LITTLE_ENDIAN 1
228# define PJ_IS_BIG_ENDIAN 0
231#elif defined(PJ_M_MIPS) || defined(__mips__) || defined(__mips) || \
232 defined(__MIPS__) || defined(MIPS) || defined(_MIPS_)
238# define PJ_M_NAME "mips"
239# define PJ_HAS_PENTIUM 0
240# if !PJ_IS_LITTLE_ENDIAN && !PJ_IS_BIG_ENDIAN
241# error Endianness must be declared for this processor
245#elif defined (PJ_M_SPARC) || defined( __sparc__) || defined(__sparc)
251# define PJ_M_NAME "sparc"
252# define PJ_HAS_PENTIUM 0
253# define PJ_IS_LITTLE_ENDIAN 0
254# define PJ_IS_BIG_ENDIAN 1
256#elif defined(ARM) || defined(_ARM_) || defined(__arm__) || \
257 defined(_M_ARM) || defined(_M_ARM64) || defined(__aarch64__)
258# define PJ_HAS_PENTIUM 0
262# if !PJ_IS_LITTLE_ENDIAN && !PJ_IS_BIG_ENDIAN
263# error Endianness must be declared for this processor
265# if defined (PJ_M_ARMV7) || defined(ARMV7)
268# define PJ_M_NAME "armv7"
269# elif defined (PJ_M_ARMV4) || defined(ARMV4)
272# define PJ_M_NAME "armv4"
273# elif defined (PJ_M_ARM64) || defined(ARM64) || defined(__aarch64__)
276# define PJ_M_NAME "arm64"
279#elif defined (PJ_M_POWERPC) || defined(__powerpc) || defined(__powerpc__) || \
280 defined(__POWERPC__) || defined(__ppc__) || defined(_M_PPC) || \
286# define PJ_M_POWERPC 1
287# define PJ_M_NAME "powerpc"
288# define PJ_HAS_PENTIUM 0
289# if !PJ_IS_LITTLE_ENDIAN && !PJ_IS_BIG_ENDIAN
290# error Endianness must be declared for this processor
293#elif defined (PJ_M_NIOS2) || defined(__nios2) || defined(__nios2__) || \
294 defined(__NIOS2__) || defined(__M_NIOS2) || defined(_ARCH_NIOS2)
300# define PJ_M_NAME "nios2"
301# define PJ_HAS_PENTIUM 0
302# define PJ_IS_LITTLE_ENDIAN 1
303# define PJ_IS_BIG_ENDIAN 0
306# error "Please specify target machine."
310#include <pj/compat/size_t.h>
315#include <pj/config_site.h>
323# undef PJ_FUNCTIONS_ARE_INLINED
324# undef PJ_HAS_FLOATING_POINT
325# undef PJ_LOG_MAX_LEVEL
326# undef PJ_LOG_MAX_SIZE
327# undef PJ_LOG_USE_STACK_BUFFER
328# undef PJ_TERM_HAS_COLOR
331# undef PJ_MAX_HOSTNAME
332# undef PJ_IOQUEUE_MAX_HANDLES
334# undef PJ_HAS_SEMAPHORE
335# undef PJ_HAS_EVENT_OBJ
336# undef PJ_EXCEPTION_USE_WIN32_SEH
337# undef PJ_HAS_ERROR_STRING
339# define PJ_HAS_IPV6 1
375#ifndef PJ_DEBUG_MUTEX
376# define PJ_DEBUG_MUTEX 0
384#ifndef PJ_FUNCTIONS_ARE_INLINED
385# define PJ_FUNCTIONS_ARE_INLINED 0
393#ifndef PJ_HAS_FLOATING_POINT
394# define PJ_HAS_FLOATING_POINT 1
414#ifndef PJ_LOG_MAX_LEVEL
415# define PJ_LOG_MAX_LEVEL 5
426#ifndef PJ_LOG_MAX_SIZE
427# define PJ_LOG_MAX_SIZE 4000
438#ifndef PJ_LOG_USE_STACK_BUFFER
439# define PJ_LOG_USE_STACK_BUFFER 1
447#ifndef PJ_LOG_ENABLE_INDENT
448# define PJ_LOG_ENABLE_INDENT 1
457#ifndef PJ_LOG_INDENT_SIZE
458# define PJ_LOG_INDENT_SIZE 1
466#ifndef PJ_LOG_INDENT_CHAR
467# define PJ_LOG_INDENT_CHAR '.'
475#ifndef PJ_LOG_SENDER_WIDTH
478# if (UINTPTR_MAX == 0xffffffffffffffff)
479# define PJ_LOG_SENDER_WIDTH 22
481# define PJ_LOG_SENDER_WIDTH 14
484# define PJ_LOG_SENDER_WIDTH 14
493#ifndef PJ_LOG_THREAD_WIDTH
494# define PJ_LOG_THREAD_WIDTH 12
502#ifndef PJ_TERM_HAS_COLOR
503# define PJ_TERM_HAS_COLOR 1
519# define PJ_SAFE_POOL 0
532# define PJ_POOL_DEBUG 0
542#ifndef PJ_POOL_RELEASE_WIPE_DATA
543# define PJ_POOL_RELEASE_WIPE_DATA 0
555#ifndef PJ_TIMER_DEBUG
556# define PJ_TIMER_DEBUG 1
575#ifndef PJ_TIMER_USE_COPY
576# define PJ_TIMER_USE_COPY 1
588#ifndef PJ_TIMER_USE_LINKED_LIST
589# define PJ_TIMER_USE_LINKED_LIST 0
595#ifndef PJ_GRP_LOCK_DEBUG
596# define PJ_GRP_LOCK_DEBUG 0
606#ifndef PJ_THREAD_DEFAULT_STACK_SIZE
607# define PJ_THREAD_DEFAULT_STACK_SIZE 8192
618#ifndef PJ_OS_HAS_CHECK_STACK
619# define PJ_OS_HAS_CHECK_STACK 0
627#ifndef PJ_HAS_POOL_ALT_API
628# define PJ_HAS_POOL_ALT_API PJ_POOL_DEBUG
649# define PJ_HAS_IPV6 0
659#ifndef PJ_MAX_HOSTNAME
660# define PJ_MAX_HOSTNAME (128)
669#ifndef PJ_ACTIVESOCK_MAX_CONSECUTIVE_ACCEPT_ERROR
670# define PJ_ACTIVESOCK_MAX_CONSECUTIVE_ACCEPT_ERROR 50
680#ifndef PJ_IOQUEUE_MAX_HANDLES
681# define PJ_IOQUEUE_MAX_HANDLES (64)
701#ifndef PJ_IOQUEUE_HAS_SAFE_UNREG
702# define PJ_IOQUEUE_HAS_SAFE_UNREG 1
717#ifndef PJ_IOQUEUE_DEFAULT_ALLOW_CONCURRENCY
718# define PJ_IOQUEUE_DEFAULT_ALLOW_CONCURRENCY 1
726#if (PJ_IOQUEUE_DEFAULT_ALLOW_CONCURRENCY==0) && (PJ_IOQUEUE_HAS_SAFE_UNREG==0)
727# error PJ_IOQUEUE_HAS_SAFE_UNREG must be enabled if ioqueue concurrency \
741#ifndef PJ_IOQUEUE_KEY_FREE_DELAY
742# define PJ_IOQUEUE_KEY_FREE_DELAY 500
752#ifndef PJ_IOQUEUE_DEFAULT_EPOLL_FLAGS
753# define PJ_IOQUEUE_DEFAULT_EPOLL_FLAGS PJ_IOQUEUE_EPOLL_AUTO
762#ifndef PJ_FD_SETSIZE_SETABLE
763# if (defined(PJ_HAS_WINSOCK_H) && PJ_HAS_WINSOCK_H!=0) || \
764 (defined(PJ_HAS_WINSOCK2_H) && PJ_HAS_WINSOCK2_H!=0)
765# define PJ_FD_SETSIZE_SETABLE 1
767# define PJ_FD_SETSIZE_SETABLE 0
777#if PJ_FD_SETSIZE_SETABLE
780# define FD_SETSIZE PJ_IOQUEUE_MAX_HANDLES
806#ifndef PJ_IP_HELPER_IGNORE_LOOPBACK_IF
807# define PJ_IP_HELPER_IGNORE_LOOPBACK_IF 1
816#ifndef PJ_HAS_SEMAPHORE
817# define PJ_HAS_SEMAPHORE 1
825#ifndef PJ_SEMAPHORE_USE_DISPATCH_SEM
826# if defined(PJ_DARWINOS) && PJ_DARWINOS != 0
827# define PJ_SEMAPHORE_USE_DISPATCH_SEM 1
829# define PJ_SEMAPHORE_USE_DISPATCH_SEM 0
839#ifndef PJ_HAS_EVENT_OBJ
840# define PJ_HAS_EVENT_OBJ 1
848# define PJ_MAXPATH 260
863#ifndef PJ_HAS_EXCEPTION_NAMES
864# define PJ_HAS_EXCEPTION_NAMES 1
874#ifndef PJ_MAX_EXCEPTION_ID
875# define PJ_MAX_EXCEPTION_ID 16
884#ifndef PJ_EXCEPTION_USE_WIN32_SEH
885# define PJ_EXCEPTION_USE_WIN32_SEH 0
894#ifndef PJ_TIMESTAMP_USE_RDTSC
895# define PJ_TIMESTAMP_USE_RDTSC 0
902#ifndef PJ_NATIVE_ERR_POSITIVE
903# define PJ_NATIVE_ERR_POSITIVE 1
912#ifndef PJ_HAS_ERROR_STRING
913# define PJ_HAS_ERROR_STRING 1
925#ifndef PJ_HAS_STRICMP_ALNUM
926# define PJ_HAS_STRICMP_ALNUM 0
934#if defined(PJ_ENABLE_EXTRA_CHECK) && PJ_ENABLE_EXTRA_CHECK==0
936# pragma message("Warning: PJ_ENABLE_EXTRA_CHECK macro is deprecated"\
937 " and has no effect")
939# warning "PJ_ENABLE_EXTRA_CHECK macro is deprecated and has no effect"
952#define PJ_QOS_DUMMY 1
961#define PJ_QOS_SYMBIAN 4
964#define PJ_QOS_DARWIN 5
969#ifndef PJ_QOS_IMPLEMENTATION
970# if defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE && _WIN32_WCE >= 0x502
972# define PJ_QOS_IMPLEMENTATION PJ_QOS_WM
973# elif defined(PJ_DARWINOS)
975# define PJ_QOS_IMPLEMENTATION PJ_QOS_DARWIN
988#ifndef PJ_HAS_SSL_SOCK
989# define PJ_HAS_SSL_SOCK 0
997#define PJ_SSL_SOCK_IMP_NONE 0
998#define PJ_SSL_SOCK_IMP_OPENSSL 1
999#define PJ_SSL_SOCK_IMP_GNUTLS 2
1000#define PJ_SSL_SOCK_IMP_DARWIN 3
1003#define PJ_SSL_SOCK_IMP_APPLE 4
1015#ifndef PJ_SSL_SOCK_IMP
1016# if PJ_HAS_SSL_SOCK==0
1017# define PJ_SSL_SOCK_IMP PJ_SSL_SOCK_IMP_NONE
1019# define PJ_SSL_SOCK_IMP PJ_SSL_SOCK_IMP_OPENSSL
1029#ifndef PJ_SSL_SOCK_MAX_CIPHERS
1030# define PJ_SSL_SOCK_MAX_CIPHERS 256
1041#ifndef PJ_SSL_SOCK_OSSL_CIPHERS
1042# define PJ_SSL_SOCK_OSSL_CIPHERS "HIGH:-COMPLEMENTOFDEFAULT"
1051#ifndef PJ_SSL_SOCK_MAX_CURVES
1052# define PJ_SSL_SOCK_MAX_CURVES 32
1061#ifndef PJ_SSL_SOCK_OSSL_USE_THREAD_CB
1062# define PJ_SSL_SOCK_OSSL_USE_THREAD_CB 1
1064# define PJ_SSL_SOCK_OSSL_USE_THREAD_CB 0
1074#ifndef PJ_SOCK_DISABLE_WSAECONNRESET
1075# define PJ_SOCK_DISABLE_WSAECONNRESET 1
1084#ifndef PJ_MAX_SOCKOPT_PARAMS
1085# define PJ_MAX_SOCKOPT_PARAMS 4
1178#define PJ_INLINE(type) PJ_INLINE_SPECIFIER type
1188#ifndef PJ_EXPORT_DECL_SPECIFIER
1189# define PJ_EXPORT_DECL_SPECIFIER
1201#ifndef PJ_EXPORT_DEF_SPECIFIER
1202# define PJ_EXPORT_DEF_SPECIFIER
1213#ifndef PJ_IMPORT_DECL_SPECIFIER
1214# define PJ_IMPORT_DECL_SPECIFIER
1221#ifndef PJ_EXPORT_SYMBOL
1222# define PJ_EXPORT_SYMBOL(x)
1232# if defined(PJ_EXPORTING)
1233# define PJ_DECL(type) PJ_EXPORT_DECL_SPECIFIER type
1235# define PJ_DECL(type) PJ_IMPORT_DECL_SPECIFIER type
1237#elif !defined(PJ_DECL)
1238# if defined(__cplusplus)
1239# define PJ_DECL(type) type
1241# define PJ_DECL(type) extern type
1251#if defined(PJ_DLL) && defined(PJ_EXPORTING)
1252# define PJ_DEF(type) PJ_EXPORT_DEF_SPECIFIER type
1253#elif !defined(PJ_DEF)
1254# define PJ_DEF(type) type
1277# define PJ_DECL_NO_RETURN(type) PJ_DECL(type) PJ_NORETURN
1278# define PJ_IDECL_NO_RETURN(type) PJ_INLINE(type) PJ_NORETURN
1279# define PJ_BEGIN_DECL extern "C" {
1280# define PJ_END_DECL }
1282# define PJ_DECL_NO_RETURN(type) PJ_NORETURN PJ_DECL(type)
1283# define PJ_IDECL_NO_RETURN(type) PJ_NORETURN PJ_INLINE(type)
1284# define PJ_BEGIN_DECL
1296# if defined(PJ_EXPORTING)
1297# define PJ_DECL_DATA(type) PJ_EXPORT_DECL_SPECIFIER extern type
1299# define PJ_DECL_DATA(type) PJ_IMPORT_DECL_SPECIFIER extern type
1301#elif !defined(PJ_DECL_DATA)
1302# define PJ_DECL_DATA(type) extern type
1311#if defined(PJ_DLL) && defined(PJ_EXPORTING)
1312# define PJ_DEF_DATA(type) PJ_EXPORT_DEF_SPECIFIER type
1313#elif !defined(PJ_DEF_DATA)
1314# define PJ_DEF_DATA(type) type
1329#if PJ_FUNCTIONS_ARE_INLINED
1330# define PJ_IDECL(type) PJ_INLINE(type)
1331# define PJ_IDEF(type) PJ_INLINE(type)
1333# define PJ_IDECL(type) PJ_DECL(type)
1334# define PJ_IDEF(type) PJ_DEF(type)
1343#define PJ_UNUSED_ARG(arg) (void)arg
1352# define PJ_TODO(id) TODO___##id:
1360# define PJ_RACE_ME(x)
1368#define __pj_throw__(x)
1375#ifndef PJ_HAS_HIGH_RES_TIMER
1376# error "PJ_HAS_HIGH_RES_TIMER is not defined!"
1379#if !defined(PJ_HAS_PENTIUM)
1380# error "PJ_HAS_PENTIUM is not defined!"
1383#if !defined(PJ_IS_LITTLE_ENDIAN)
1384# error "PJ_IS_LITTLE_ENDIAN is not defined!"
1387#if !defined(PJ_IS_BIG_ENDIAN)
1388# error "PJ_IS_BIG_ENDIAN is not defined!"
1391#if !defined(PJ_EMULATE_RWMUTEX)
1392# error "PJ_EMULATE_RWMUTEX should be defined in compat/os_xx.h"
1395#if !defined(PJ_THREAD_SET_STACK_SIZE)
1396# error "PJ_THREAD_SET_STACK_SIZE should be defined in compat/os_xx.h"
1399#if !defined(PJ_THREAD_ALLOCATE_STACK)
1400# error "PJ_THREAD_ALLOCATE_STACK should be defined in compat/os_xx.h"
1406#define PJ_VERSION_NUM_MAJOR 2
1409#define PJ_VERSION_NUM_MINOR 13
1412#define PJ_VERSION_NUM_REV 0
1418#define PJ_VERSION_NUM_EXTRA ""
1425#define PJ_VERSION_NUM ((PJ_VERSION_NUM_MAJOR << 24) | \
1426 (PJ_VERSION_NUM_MINOR << 16) | \
1427 (PJ_VERSION_NUM_REV << 8))
void pj_dump_config(void)
const char * pj_get_version(void)
const char * PJ_VERSION
Definition: config.h:1432
#define PJ_BEGIN_DECL
Definition: config.h:1284
#define PJ_END_DECL
Definition: config.h:1285