~ubuntu-branches/ubuntu/raring/sflphone/raring

« back to all changes in this revision

Viewing changes to .pc/04_target_s4.patch/daemon/libs/pjproject/pjlib/include/pj/config.h

  • Committer: Package Import Robot
  • Author(s): Whoopie
  • Date: 2012-03-22 10:29:10 UTC
  • mfrom: (4.1.12 sid)
  • Revision ID: package-import@ubuntu.com-20120322102910-tb8hugi2su1tguwh
Tags: 1.0.2-1ubuntu1
* Apply some upstream patches to fix FTBFS (LP: #913018):
  - debian/patches/05_glib_includes.patch: fix glib includes.
  - debian/patches/06_use_XkbKeycodeToKeysym.patch: use 
    XkbKeycodeToKeysym instead of (deprecated) XKeycodeToKeysym.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: config.h 3554 2011-05-05 09:10:15Z 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
/**
 
24
 * @file config.h
 
25
 * @brief PJLIB Main configuration settings.
 
26
 */
 
27
 
 
28
/********************************************************************
 
29
 * Include compiler specific configuration.
 
30
 */
 
31
#if defined(_MSC_VER)
 
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>
 
43
#else
 
44
#  error "Unknown compiler."
 
45
#endif
 
46
 
 
47
 
 
48
/********************************************************************
 
49
 * Include target OS specific configuration.
 
50
 */
 
51
#if defined(PJ_AUTOCONF)
 
52
    /*
 
53
     * Autoconf
 
54
     */
 
55
#   include <pj/compat/os_auto.h>
 
56
 
 
57
#elif defined(PJ_SYMBIAN) && PJ_SYMBIAN!=0
 
58
    /*
 
59
     * SymbianOS
 
60
     */
 
61
#  include <pj/compat/os_symbian.h>
 
62
 
 
63
#elif defined(PJ_WIN32_WINCE) || defined(_WIN32_WCE) || defined(UNDER_CE)
 
64
    /*
 
65
     * Windows CE
 
66
     */
 
67
#   undef PJ_WIN32_WINCE
 
68
#   define PJ_WIN32_WINCE   1
 
69
#   include <pj/compat/os_win32_wince.h>
 
70
 
 
71
    /* Also define Win32 */
 
72
#   define PJ_WIN32 1
 
73
 
 
74
#elif defined(PJ_WIN32) || defined(_WIN32) || defined(__WIN32__) || \
 
75
        defined(_WIN64) || defined(WIN32) || defined(__TOS_WIN__)
 
76
    /*
 
77
     * Win32
 
78
     */
 
79
#   undef PJ_WIN32
 
80
#   define PJ_WIN32 1
 
81
#   include <pj/compat/os_win32.h>
 
82
 
 
83
#elif defined(PJ_LINUX_KERNEL) && PJ_LINUX_KERNEL!=0
 
84
    /*
 
85
     * Linux kernel
 
86
     */
 
87
#  include <pj/compat/os_linux_kernel.h>
 
88
 
 
89
#elif defined(PJ_LINUX) || defined(linux) || defined(__linux)
 
90
    /*
 
91
     * Linux
 
92
     */
 
93
#   undef PJ_LINUX
 
94
#   define PJ_LINUX         1
 
95
#   include <pj/compat/os_linux.h>
 
96
 
 
97
#elif defined(PJ_PALMOS) && PJ_PALMOS!=0
 
98
    /*
 
99
     * Palm
 
100
     */
 
101
#  include <pj/compat/os_palmos.h>
 
102
 
 
103
#elif defined(PJ_SUNOS) || defined(sun) || defined(__sun)
 
104
    /*
 
105
     * SunOS
 
106
     */
 
107
#   undef PJ_SUNOS
 
108
#   define PJ_SUNOS         1
 
109
#   include <pj/compat/os_sunos.h>
 
110
 
 
111
#elif defined(PJ_DARWINOS) || defined(__MACOSX__) || \
 
112
      defined (__APPLE__) || defined (__MACH__)
 
113
    /*
 
114
     * MacOS X
 
115
     */
 
116
#   undef PJ_DARWINOS
 
117
#   define PJ_DARWINOS      1
 
118
#   include <pj/compat/os_darwinos.h>
 
119
 
 
120
#elif defined(PJ_RTEMS) && PJ_RTEMS!=0
 
121
    /*
 
122
     * RTEMS
 
123
     */
 
124
#  include <pj/compat/os_rtems.h>
 
125
#else
 
126
#   error "Please specify target os."
 
127
#endif
 
128
 
 
129
 
 
130
/********************************************************************
 
131
 * Target machine specific configuration.
 
132
 */
 
133
#if defined(PJ_AUTOCONF)
 
134
    /*
 
135
     * Autoconf configured
 
136
     */
 
137
#include <pj/compat/m_auto.h>
 
138
 
 
139
#elif defined (PJ_M_I386) || defined(_i386_) || defined(i_386_) || \
 
140
        defined(_X86_) || defined(x86) || defined(__i386__) || \
 
141
        defined(__i386) || defined(_M_IX86) || defined(__I86__)
 
142
    /*
 
143
     * Generic i386 processor family, little-endian
 
144
     */
 
145
#   undef PJ_M_I386
 
146
#   define PJ_M_I386            1
 
147
#   define PJ_M_NAME            "i386"
 
148
#   define PJ_HAS_PENTIUM       1
 
149
#   define PJ_IS_LITTLE_ENDIAN  1
 
150
#   define PJ_IS_BIG_ENDIAN     0
 
151
 
 
152
 
 
153
#elif defined (PJ_M_X86_64) || defined(__amd64__) || defined(__amd64) || \
 
154
        defined(__x86_64__) || defined(__x86_64)
 
155
    /*
 
156
     * AMD 64bit processor, little endian
 
157
     */
 
158
#   undef PJ_M_X86_64
 
159
#   define PJ_M_X86_64          1
 
160
#   define PJ_M_NAME            "x86_64"
 
161
#   define PJ_HAS_PENTIUM       1
 
162
#   define PJ_IS_LITTLE_ENDIAN  1
 
163
#   define PJ_IS_BIG_ENDIAN     0
 
164
 
 
165
#elif defined(PJ_M_IA64) || defined(__ia64__) || defined(_IA64) || \
 
166
        defined(__IA64__) || defined(   _M_IA64)
 
167
    /*
 
168
     * Intel IA64 processor, little endian
 
169
     */
 
170
#   undef PJ_M_IA64
 
171
#   define PJ_M_IA64            1
 
172
#   define PJ_M_NAME            "ia64"
 
173
#   define PJ_HAS_PENTIUM       1
 
174
#   define PJ_IS_LITTLE_ENDIAN  1
 
175
#   define PJ_IS_BIG_ENDIAN     0
 
176
 
 
177
#elif defined (PJ_M_M68K) && PJ_M_M68K != 0
 
178
 
 
179
    /*
 
180
     * Motorola m68k processor, big endian
 
181
     */
 
182
#   undef PJ_M_M68K
 
183
#   define PJ_M_M68K            1
 
184
#   define PJ_M_NAME            "m68k"
 
185
#   define PJ_HAS_PENTIUM       0
 
186
#   define PJ_IS_LITTLE_ENDIAN  0
 
187
#   define PJ_IS_BIG_ENDIAN     1
 
188
 
 
189
 
 
190
#elif defined (PJ_M_ALPHA) || defined (__alpha__) || defined (__alpha) || \
 
191
        defined (_M_ALPHA)
 
192
    /*
 
193
     * DEC Alpha processor, little endian
 
194
     */
 
195
#   undef PJ_M_ALPHA
 
196
#   define PJ_M_ALPHA           1
 
197
#   define PJ_M_NAME            "alpha"
 
198
#   define PJ_HAS_PENTIUM       0
 
199
#   define PJ_IS_LITTLE_ENDIAN  1
 
200
#   define PJ_IS_BIG_ENDIAN     0
 
201
 
 
202
 
 
203
#elif defined(PJ_M_MIPS) || defined(__mips__) || defined(__mips) || \
 
204
        defined(__MIPS__) || defined(MIPS) || defined(_MIPS_)
 
205
    /*
 
206
     * MIPS, default to little endian
 
207
     */
 
208
#   undef PJ_M_MIPS
 
209
#   define PJ_M_MIPS            1
 
210
#   define PJ_M_NAME            "mips"
 
211
#   define PJ_HAS_PENTIUM       0
 
212
#   if !defined(PJ_IS_LITTLE_ENDIAN) && !defined(PJ_IS_BIG_ENDIAN)
 
213
#       define PJ_IS_LITTLE_ENDIAN      1
 
214
#       define PJ_IS_BIG_ENDIAN         0
 
215
#   endif
 
216
 
 
217
 
 
218
#elif defined (PJ_M_SPARC) || defined(  __sparc__) || defined(__sparc)
 
219
    /*
 
220
     * Sun Sparc, big endian
 
221
     */
 
222
#   undef PJ_M_SPARC
 
223
#   define PJ_M_SPARC           1
 
224
#   define PJ_M_NAME            "sparc"
 
225
#   define PJ_HAS_PENTIUM       0
 
226
#   define PJ_IS_LITTLE_ENDIAN  0
 
227
#   define PJ_IS_BIG_ENDIAN     1
 
228
 
 
229
#elif defined (PJ_M_ARMV4) || defined(ARM) || defined(_ARM_) ||  \
 
230
        defined(ARMV4) || defined(__arm__)
 
231
    /*
 
232
     * ARM, default to little endian
 
233
     */
 
234
#   undef PJ_M_ARMV4
 
235
#   define PJ_M_ARMV4           1
 
236
#   define PJ_M_NAME            "armv4"
 
237
#   define PJ_HAS_PENTIUM       0
 
238
#   if !defined(PJ_IS_LITTLE_ENDIAN) && !defined(PJ_IS_BIG_ENDIAN)
 
239
#       define PJ_IS_LITTLE_ENDIAN      1
 
240
#       define PJ_IS_BIG_ENDIAN         0
 
241
#   endif
 
242
 
 
243
#elif defined (PJ_M_S390) || defined(__s390) || defined(__s390__) || \
 
244
        defined(__S390__) || defined(_M_S390)
 
245
    /*
 
246
     * S390, big endian
 
247
     */
 
248
#   undef PJ_M_S390
 
249
#   define PJ_M_S390            1
 
250
#   define PJ_M_NAME            "s390"
 
251
#   define PJ_HAS_PENTIUM       0
 
252
#   define PJ_IS_LITTLE_ENDIAN  0
 
253
#   define PJ_IS_BIG_ENDIAN     1
 
254
 
 
255
#elif defined (PJ_M_POWERPC) || defined(__powerpc) || defined(__powerpc__) || \
 
256
        defined(__POWERPC__) || defined(__ppc__) || defined(_M_PPC) || \
 
257
        defined(_ARCH_PPC)
 
258
    /*
 
259
     * PowerPC, big endian
 
260
     */
 
261
#   undef PJ_M_POWERPC
 
262
#   define PJ_M_POWERPC         1
 
263
#   define PJ_M_NAME            "powerpc"
 
264
#   define PJ_HAS_PENTIUM       0
 
265
#   define PJ_IS_LITTLE_ENDIAN  0
 
266
#   define PJ_IS_BIG_ENDIAN     1
 
267
 
 
268
#elif defined (PJ_M_NIOS2) || defined(__nios2) || defined(__nios2__) || \
 
269
      defined(__NIOS2__) || defined(__M_NIOS2) || defined(_ARCH_NIOS2)
 
270
    /*
 
271
     * Nios2, little endian
 
272
     */
 
273
#   undef PJ_M_NIOS2
 
274
#   define PJ_M_NIOS2           1
 
275
#   define PJ_M_NAME            "nios2"
 
276
#   define PJ_HAS_PENTIUM       0
 
277
#   define PJ_IS_LITTLE_ENDIAN  1
 
278
#   define PJ_IS_BIG_ENDIAN     0
 
279
                
 
280
#else
 
281
#   error "Please specify target machine."
 
282
#endif
 
283
 
 
284
/* Include size_t definition. */
 
285
#include <pj/compat/size_t.h>
 
286
 
 
287
/* Include site/user specific configuration to control PJLIB features.
 
288
 * YOU MUST CREATE THIS FILE YOURSELF!!
 
289
 */
 
290
#include <pj/config_site.h>
 
291
 
 
292
/********************************************************************
 
293
 * PJLIB Features.
 
294
 */
 
295
 
 
296
/* Overrides for DOXYGEN */
 
297
#ifdef DOXYGEN
 
298
#   undef PJ_FUNCTIONS_ARE_INLINED
 
299
#   undef PJ_HAS_FLOATING_POINT
 
300
#   undef PJ_LOG_MAX_LEVEL
 
301
#   undef PJ_LOG_MAX_SIZE
 
302
#   undef PJ_LOG_USE_STACK_BUFFER
 
303
#   undef PJ_TERM_HAS_COLOR
 
304
#   undef PJ_POOL_DEBUG
 
305
#   undef PJ_HAS_TCP
 
306
#   undef PJ_MAX_HOSTNAME
 
307
#   undef PJ_IOQUEUE_MAX_HANDLES
 
308
#   undef FD_SETSIZE
 
309
#   undef PJ_HAS_SEMAPHORE
 
310
#   undef PJ_HAS_EVENT_OBJ
 
311
#   undef PJ_ENABLE_EXTRA_CHECK
 
312
#   undef PJ_EXCEPTION_USE_WIN32_SEH
 
313
#   undef PJ_HAS_ERROR_STRING
 
314
 
 
315
#   define PJ_HAS_IPV6  1
 
316
#endif
 
317
 
 
318
/**
 
319
 * @defgroup pj_config Build Configuration
 
320
 * @{
 
321
 *
 
322
 * This section contains macros that can set during PJLIB build process
 
323
 * to controll various aspects of the library.
 
324
 *
 
325
 * <b>Note</b>: the values in this page does NOT necessarily reflect to the
 
326
 * macro values during the build process.
 
327
 */
 
328
 
 
329
/**
 
330
 * If this macro is set to 1, it will enable some debugging checking
 
331
 * in the library.
 
332
 *
 
333
 * Default: equal to (NOT NDEBUG).
 
334
 */
 
335
#ifndef PJ_DEBUG
 
336
#  ifndef NDEBUG
 
337
#    define PJ_DEBUG                1
 
338
#  else
 
339
#    define PJ_DEBUG                0
 
340
#  endif
 
341
#endif
 
342
 
 
343
/**
 
344
 * Enable this macro to activate logging to mutex/semaphore related events.
 
345
 * This is useful to troubleshoot concurrency problems such as deadlocks.
 
346
 * In addition, you should also add PJ_LOG_HAS_THREAD_ID flag to the
 
347
 * log decoration to assist the troubleshooting.
 
348
 *
 
349
 * Default: 0
 
350
 */
 
351
#ifndef PJ_DEBUG_MUTEX
 
352
#   define PJ_DEBUG_MUTEX           0
 
353
#endif
 
354
 
 
355
/**
 
356
 * Expand functions in *_i.h header files as inline.
 
357
 *
 
358
 * Default: 0.
 
359
 */
 
360
#ifndef PJ_FUNCTIONS_ARE_INLINED
 
361
#  define PJ_FUNCTIONS_ARE_INLINED  0
 
362
#endif
 
363
 
 
364
/**
 
365
 * Use floating point computations in the library.
 
366
 *
 
367
 * Default: 1.
 
368
 */
 
369
#ifndef PJ_HAS_FLOATING_POINT
 
370
#  define PJ_HAS_FLOATING_POINT     1
 
371
#endif
 
372
 
 
373
/**
 
374
 * Declare maximum logging level/verbosity. Lower number indicates higher
 
375
 * importance, with the highest importance has level zero. The least
 
376
 * important level is five in this implementation, but this can be extended
 
377
 * by supplying the appropriate implementation.
 
378
 *
 
379
 * The level conventions:
 
380
 *  - 0: fatal error
 
381
 *  - 1: error
 
382
 *  - 2: warning
 
383
 *  - 3: info
 
384
 *  - 4: debug
 
385
 *  - 5: trace
 
386
 *  - 6: more detailed trace
 
387
 *
 
388
 * Default: 4
 
389
 */
 
390
#ifndef PJ_LOG_MAX_LEVEL
 
391
#  define PJ_LOG_MAX_LEVEL   5
 
392
#endif
 
393
 
 
394
/**
 
395
 * Maximum message size that can be sent to output device for each call
 
396
 * to PJ_LOG(). If the message size is longer than this value, it will be cut.
 
397
 * This may affect the stack usage, depending whether PJ_LOG_USE_STACK_BUFFER
 
398
 * flag is set.
 
399
 *
 
400
 * Default: 4000
 
401
 */
 
402
#ifndef PJ_LOG_MAX_SIZE
 
403
#  define PJ_LOG_MAX_SIZE           4000
 
404
#endif
 
405
 
 
406
/**
 
407
 * Log buffer.
 
408
 * Does the log get the buffer from the stack? (default is yes).
 
409
 * If the value is set to NO, then the buffer will be taken from static
 
410
 * buffer, which in this case will make the log function non-reentrant.
 
411
 *
 
412
 * Default: 1
 
413
 */
 
414
#ifndef PJ_LOG_USE_STACK_BUFFER
 
415
#  define PJ_LOG_USE_STACK_BUFFER   1
 
416
#endif
 
417
 
 
418
 
 
419
/**
 
420
 * Colorfull terminal (for logging etc).
 
421
 *
 
422
 * Default: 1
 
423
 */
 
424
#ifndef PJ_TERM_HAS_COLOR
 
425
#  define PJ_TERM_HAS_COLOR         1
 
426
#endif
 
427
 
 
428
 
 
429
/**
 
430
 * Set this flag to non-zero to enable various checking for pool
 
431
 * operations. When this flag is set, assertion must be enabled
 
432
 * in the application.
 
433
 *
 
434
 * This will slow down pool creation and destruction and will add
 
435
 * few bytes of overhead, so application would normally want to 
 
436
 * disable this feature on release build.
 
437
 *
 
438
 * Default: 0
 
439
 */
 
440
#ifndef PJ_SAFE_POOL
 
441
#   define PJ_SAFE_POOL             0
 
442
#endif
 
443
 
 
444
 
 
445
/**
 
446
 * If pool debugging is used, then each memory allocation from the pool
 
447
 * will call malloc(), and pool will release all memory chunks when it
 
448
 * is destroyed. This works better when memory verification programs
 
449
 * such as Rational Purify is used.
 
450
 *
 
451
 * Default: 0
 
452
 */
 
453
#ifndef PJ_POOL_DEBUG
 
454
#  define PJ_POOL_DEBUG             0
 
455
#endif
 
456
 
 
457
 
 
458
/**
 
459
 * Specify this as \a stack_size argument in #pj_thread_create() to specify
 
460
 * that thread should use default stack size for the current platform.
 
461
 *
 
462
 * Default: 8192
 
463
 */
 
464
#ifndef PJ_THREAD_DEFAULT_STACK_SIZE 
 
465
#  define PJ_THREAD_DEFAULT_STACK_SIZE    8192
 
466
#endif
 
467
 
 
468
 
 
469
/**
 
470
 * Specify if PJ_CHECK_STACK() macro is enabled to check the sanity of 
 
471
 * the stack. The OS implementation may check that no stack overflow 
 
472
 * occurs, and it also may collect statistic about stack usage. Note
 
473
 * that this will increase the footprint of the libraries since it
 
474
 * tracks the filename and line number of each functions.
 
475
 */
 
476
#ifndef PJ_OS_HAS_CHECK_STACK
 
477
#       define PJ_OS_HAS_CHECK_STACK            0
 
478
#endif
 
479
 
 
480
/**
 
481
 * Do we have alternate pool implementation?
 
482
 *
 
483
 * Default: 0
 
484
 */
 
485
#ifndef PJ_HAS_POOL_ALT_API
 
486
#   define PJ_HAS_POOL_ALT_API      PJ_POOL_DEBUG
 
487
#endif
 
488
 
 
489
 
 
490
/**
 
491
 * Support TCP in the library.
 
492
 * Disabling TCP will reduce the footprint slightly (about 6KB).
 
493
 *
 
494
 * Default: 1
 
495
 */
 
496
#ifndef PJ_HAS_TCP
 
497
#  define PJ_HAS_TCP                1
 
498
#endif
 
499
 
 
500
/**
 
501
 * Support IPv6 in the library. If this support is disabled, some IPv6 
 
502
 * related functions will return PJ_EIPV6NOTSUP.
 
503
 *
 
504
 * Default: 0 (disabled, for now)
 
505
 */
 
506
#ifndef PJ_HAS_IPV6
 
507
#  define PJ_HAS_IPV6               0
 
508
#endif
 
509
 
 
510
 /**
 
511
 * Maximum hostname length.
 
512
 * Libraries sometimes needs to make copy of an address to stack buffer;
 
513
 * the value here affects the stack usage.
 
514
 *
 
515
 * Default: 128
 
516
 */
 
517
#ifndef PJ_MAX_HOSTNAME
 
518
#  define PJ_MAX_HOSTNAME           (128)
 
519
#endif
 
520
 
 
521
/**
 
522
 * Maximum consecutive identical error for accept() operation before
 
523
 * activesock stops calling the next ioqueue accept.
 
524
 *
 
525
 * Default: 50
 
526
 */
 
527
#ifndef PJ_ACTIVESOCK_MAX_CONSECUTIVE_ACCEPT_ERROR
 
528
#   define PJ_ACTIVESOCK_MAX_CONSECUTIVE_ACCEPT_ERROR 50
 
529
#endif
 
530
 
 
531
/**
 
532
 * Constants for declaring the maximum handles that can be supported by
 
533
 * a single IOQ framework. This constant might not be relevant to the 
 
534
 * underlying I/O queue impelementation, but still, developers should be 
 
535
 * aware of this constant, to make sure that the program will not break when
 
536
 * the underlying implementation changes.
 
537
 */
 
538
#ifndef PJ_IOQUEUE_MAX_HANDLES
 
539
#   define PJ_IOQUEUE_MAX_HANDLES       (64)
 
540
#endif
 
541
 
 
542
 
 
543
/**
 
544
 * If PJ_IOQUEUE_HAS_SAFE_UNREG macro is defined, then ioqueue will do more
 
545
 * things to ensure thread safety of handle unregistration operation by
 
546
 * employing reference counter to each handle.
 
547
 *
 
548
 * In addition, the ioqueue will preallocate memory for the handles, 
 
549
 * according to the maximum number of handles that is specified during 
 
550
 * ioqueue creation.
 
551
 *
 
552
 * All applications would normally want this enabled, but you may disable
 
553
 * this if:
 
554
 *  - there is no dynamic unregistration to all ioqueues.
 
555
 *  - there is no threading, or there is no preemptive multitasking.
 
556
 *
 
557
 * Default: 1
 
558
 */
 
559
#ifndef PJ_IOQUEUE_HAS_SAFE_UNREG
 
560
#   define PJ_IOQUEUE_HAS_SAFE_UNREG    1
 
561
#endif
 
562
 
 
563
 
 
564
/**
 
565
 * Default concurrency setting for sockets/handles registered to ioqueue.
 
566
 * This controls whether the ioqueue is allowed to call the key's callback
 
567
 * concurrently/in parallel. The default is yes, which means that if there
 
568
 * are more than one pending operations complete simultaneously, more
 
569
 * than one threads may call the key's callback at the same time. This
 
570
 * generally would promote good scalability for application, at the 
 
571
 * expense of more complexity to manage the concurrent accesses.
 
572
 *
 
573
 * Please see the ioqueue documentation for more info.
 
574
 */
 
575
#ifndef PJ_IOQUEUE_DEFAULT_ALLOW_CONCURRENCY
 
576
#   define PJ_IOQUEUE_DEFAULT_ALLOW_CONCURRENCY   1
 
577
#endif
 
578
 
 
579
 
 
580
/* Sanity check:
 
581
 *  if ioqueue concurrency is disallowed, PJ_IOQUEUE_HAS_SAFE_UNREG
 
582
 *  must be enabled.
 
583
 */
 
584
#if (PJ_IOQUEUE_DEFAULT_ALLOW_CONCURRENCY==0) && (PJ_IOQUEUE_HAS_SAFE_UNREG==0)
 
585
#   error PJ_IOQUEUE_HAS_SAFE_UNREG must be enabled if ioqueue concurrency \
 
586
          is disabled
 
587
#endif
 
588
 
 
589
 
 
590
/**
 
591
 * When safe unregistration (PJ_IOQUEUE_HAS_SAFE_UNREG) is configured in
 
592
 * ioqueue, the PJ_IOQUEUE_KEY_FREE_DELAY macro specifies how long the
 
593
 * ioqueue key is kept in closing state before it can be reused.
 
594
 *
 
595
 * The value is in miliseconds.
 
596
 *
 
597
 * Default: 500 msec.
 
598
 */
 
599
#ifndef PJ_IOQUEUE_KEY_FREE_DELAY
 
600
#   define PJ_IOQUEUE_KEY_FREE_DELAY    500
 
601
#endif
 
602
 
 
603
 
 
604
/**
 
605
 * Determine if FD_SETSIZE is changeable/set-able. If so, then we will
 
606
 * set it to PJ_IOQUEUE_MAX_HANDLES. Currently we detect this by checking
 
607
 * for Winsock.
 
608
 */
 
609
#ifndef PJ_FD_SETSIZE_SETABLE
 
610
#   if (defined(PJ_HAS_WINSOCK_H) && PJ_HAS_WINSOCK_H!=0) || \
 
611
       (defined(PJ_HAS_WINSOCK2_H) && PJ_HAS_WINSOCK2_H!=0)
 
612
#       define PJ_FD_SETSIZE_SETABLE    1
 
613
#   else
 
614
#       define PJ_FD_SETSIZE_SETABLE    0
 
615
#   endif
 
616
#endif
 
617
 
 
618
/**
 
619
 * Overrides FD_SETSIZE so it is consistent throughout the library.
 
620
 * We only do this if we detected that FD_SETSIZE is changeable. If
 
621
 * FD_SETSIZE is not set-able, then PJ_IOQUEUE_MAX_HANDLES must be
 
622
 * set to value lower than FD_SETSIZE.
 
623
 */
 
624
#if PJ_FD_SETSIZE_SETABLE
 
625
    /* Only override FD_SETSIZE if the value has not been set */
 
626
#   ifndef FD_SETSIZE
 
627
#       define FD_SETSIZE               PJ_IOQUEUE_MAX_HANDLES
 
628
#   endif
 
629
#else
 
630
    /* When FD_SETSIZE is not changeable, check if PJ_IOQUEUE_MAX_HANDLES
 
631
     * is lower than FD_SETSIZE value.
 
632
     */
 
633
#   ifdef FD_SETSIZE
 
634
#       if PJ_IOQUEUE_MAX_HANDLES > FD_SETSIZE
 
635
#           error "PJ_IOQUEUE_MAX_HANDLES is greater than FD_SETSIZE"
 
636
#       endif
 
637
#   endif
 
638
#endif
 
639
 
 
640
 
 
641
/**
 
642
 * Specify whether #pj_enum_ip_interface() function should exclude
 
643
 * loopback interfaces.
 
644
 *
 
645
 * Default: 1
 
646
 */
 
647
#ifndef PJ_IP_HELPER_IGNORE_LOOPBACK_IF
 
648
#   define PJ_IP_HELPER_IGNORE_LOOPBACK_IF      1
 
649
#endif
 
650
 
 
651
 
 
652
/**
 
653
 * Has semaphore functionality?
 
654
 *
 
655
 * Default: 1
 
656
 */
 
657
#ifndef PJ_HAS_SEMAPHORE
 
658
#  define PJ_HAS_SEMAPHORE          1
 
659
#endif
 
660
 
 
661
 
 
662
/**
 
663
 * Event object (for synchronization, e.g. in Win32)
 
664
 *
 
665
 * Default: 1
 
666
 */
 
667
#ifndef PJ_HAS_EVENT_OBJ
 
668
#  define PJ_HAS_EVENT_OBJ          1
 
669
#endif
 
670
 
 
671
 
 
672
/**
 
673
 * Maximum file name length.
 
674
 */
 
675
#ifndef PJ_MAXPATH
 
676
#   define PJ_MAXPATH               260
 
677
#endif
 
678
 
 
679
 
 
680
/**
 
681
 * Enable library's extra check.
 
682
 * If this macro is enabled, #PJ_ASSERT_RETURN macro will expand to
 
683
 * run-time checking. If this macro is disabled, #PJ_ASSERT_RETURN
 
684
 * will simply evaluate to #pj_assert().
 
685
 *
 
686
 * You can disable this macro to reduce size, at the risk of crashes
 
687
 * if invalid value (e.g. NULL) is passed to the library.
 
688
 *
 
689
 * Default: 1
 
690
 */
 
691
#ifndef PJ_ENABLE_EXTRA_CHECK
 
692
#   define PJ_ENABLE_EXTRA_CHECK    1
 
693
#endif
 
694
 
 
695
 
 
696
/**
 
697
 * Enable name registration for exceptions with #pj_exception_id_alloc().
 
698
 * If this feature is enabled, then the library will keep track of
 
699
 * names associated with each exception ID requested by application via
 
700
 * #pj_exception_id_alloc().
 
701
 *
 
702
 * Disabling this macro will reduce the code and .bss size by a tad bit.
 
703
 * See also #PJ_MAX_EXCEPTION_ID.
 
704
 *
 
705
 * Default: 1
 
706
 */
 
707
#ifndef PJ_HAS_EXCEPTION_NAMES
 
708
#   define PJ_HAS_EXCEPTION_NAMES   1
 
709
#endif
 
710
 
 
711
/**
 
712
 * Maximum number of unique exception IDs that can be requested
 
713
 * with #pj_exception_id_alloc(). For each entry, a small record will
 
714
 * be allocated in the .bss segment.
 
715
 *
 
716
 * Default: 16
 
717
 */
 
718
#ifndef PJ_MAX_EXCEPTION_ID
 
719
#   define PJ_MAX_EXCEPTION_ID      16
 
720
#endif
 
721
 
 
722
/**
 
723
 * Should we use Windows Structured Exception Handling (SEH) for the
 
724
 * PJLIB exceptions.
 
725
 *
 
726
 * Default: 0
 
727
 */
 
728
#ifndef PJ_EXCEPTION_USE_WIN32_SEH
 
729
#  define PJ_EXCEPTION_USE_WIN32_SEH 0
 
730
#endif
 
731
 
 
732
/**
 
733
 * Should we attempt to use Pentium's rdtsc for high resolution
 
734
 * timestamp.
 
735
 *
 
736
 * Default: 0
 
737
 */
 
738
#ifndef PJ_TIMESTAMP_USE_RDTSC
 
739
#   define PJ_TIMESTAMP_USE_RDTSC   0
 
740
#endif
 
741
 
 
742
/**
 
743
 * Is native platform error positive number?
 
744
 * Default: 1 (yes)
 
745
 */
 
746
#ifndef PJ_NATIVE_ERR_POSITIVE
 
747
#   define PJ_NATIVE_ERR_POSITIVE   1
 
748
#endif
 
749
 
 
750
/**
 
751
 * Include error message string in the library (pj_strerror()).
 
752
 * This is very much desirable!
 
753
 *
 
754
 * Default: 1
 
755
 */
 
756
#ifndef PJ_HAS_ERROR_STRING
 
757
#   define PJ_HAS_ERROR_STRING      1
 
758
#endif
 
759
 
 
760
 
 
761
/**
 
762
 * Include pj_stricmp_alnum() and pj_strnicmp_alnum(), i.e. custom
 
763
 * functions to compare alnum strings. On some systems, they're faster
 
764
 * then stricmp/strcasecmp, but they can be slower on other systems.
 
765
 * When disabled, pjlib will fallback to stricmp/strnicmp.
 
766
 * 
 
767
 * Default: 0
 
768
 */
 
769
#ifndef PJ_HAS_STRICMP_ALNUM
 
770
#   define PJ_HAS_STRICMP_ALNUM     0
 
771
#endif
 
772
 
 
773
 
 
774
/*
 
775
 * Types of QoS backend implementation.
 
776
 */
 
777
 
 
778
/** 
 
779
 * Dummy QoS backend implementation, will always return error on all
 
780
 * the APIs.
 
781
 */
 
782
#define PJ_QOS_DUMMY        1
 
783
 
 
784
/** QoS backend based on setsockopt(IP_TOS) */
 
785
#define PJ_QOS_BSD          2
 
786
 
 
787
/** QoS backend for Windows Mobile 6 */
 
788
#define PJ_QOS_WM           3
 
789
 
 
790
/** QoS backend for Symbian */
 
791
#define PJ_QOS_SYMBIAN      4
 
792
 
 
793
/**
 
794
 * Force the use of some QoS backend API for some platforms.
 
795
 */
 
796
#ifndef PJ_QOS_IMPLEMENTATION
 
797
#   if defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE && _WIN32_WCE >= 0x502
 
798
        /* Windows Mobile 6 or later */
 
799
#       define PJ_QOS_IMPLEMENTATION    PJ_QOS_WM
 
800
#   endif
 
801
#endif
 
802
 
 
803
 
 
804
/**
 
805
 * Enable secure socket. For most platforms, this is implemented using
 
806
 * OpenSSL, so this will require OpenSSL to be installed. For Symbian
 
807
 * platform, this is implemented natively using CSecureSocket.
 
808
 *
 
809
 * Default: 0 (for now)
 
810
 */
 
811
#ifndef PJ_HAS_SSL_SOCK
 
812
#  define PJ_HAS_SSL_SOCK           0
 
813
#endif
 
814
 
 
815
 
 
816
/**
 
817
 * Disable WSAECONNRESET error for UDP sockets on Win32 platforms. See
 
818
 * https://trac.pjsip.org/repos/ticket/1197.
 
819
 *
 
820
 * Default: 1
 
821
 */
 
822
#ifndef PJ_SOCK_DISABLE_WSAECONNRESET
 
823
#   define PJ_SOCK_DISABLE_WSAECONNRESET    1
 
824
#endif
 
825
 
 
826
 
 
827
/** @} */
 
828
 
 
829
/********************************************************************
 
830
 * General macros.
 
831
 */
 
832
 
 
833
/**
 
834
 * @defgroup pj_dll_target Building Dynamic Link Libraries (DLL/DSO)
 
835
 * @ingroup pj_config
 
836
 * @{
 
837
 *
 
838
 * The libraries support generation of dynamic link libraries for
 
839
 * Symbian ABIv2 target (.dso/Dynamic Shared Object files, in Symbian
 
840
 * terms). Similar procedures may be applied for Win32 DLL with some 
 
841
 * modification.
 
842
 *
 
843
 * Depending on the platforms, these steps may be necessary in order to
 
844
 * produce the dynamic libraries:
 
845
 *  - Create the (Visual Studio) projects to produce DLL output. PJLIB
 
846
 *    does not provide ready to use project files to produce DLL, so
 
847
 *    you need to create these projects yourself. For Symbian, the MMP
 
848
 *    files have been setup to produce DSO files for targets that 
 
849
 *    require them.
 
850
 *  - In the (Visual Studio) projects, some macros need to be declared
 
851
 *    so that appropriate modifiers are added to symbol declarations
 
852
 *    and definitions. Please see the macro section below for information
 
853
 *    regarding these macros. For Symbian, these have been taken care by the
 
854
 *    MMP files.
 
855
 *  - Some build systems require .DEF file to be specified when creating
 
856
 *    the DLL. For Symbian, .DEF files are included in pjlib distribution,
 
857
 *    in <tt>pjlib/build.symbian</tt> directory. These DEF files are 
 
858
 *    created by running <tt>./makedef.sh all</tt> from this directory,
 
859
 *    inside Mingw.
 
860
 *
 
861
 * Macros related for building DLL/DSO files:
 
862
 *  - For platforms that supports dynamic link libraries generation,
 
863
 *    it must declare <tt>PJ_EXPORT_SPECIFIER</tt> macro which value contains
 
864
 *    the prefix to be added to symbol definition, to export this 
 
865
 *    symbol in the DLL/DSO. For example, on Win32/Visual Studio, the
 
866
 *    value of this macro is \a __declspec(dllexport), and for ARM 
 
867
 *    ABIv2/Symbian, the value is \a EXPORT_C. 
 
868
 *  - For platforms that supports linking with dynamic link libraries,
 
869
 *    it must declare <tt>PJ_IMPORT_SPECIFIER</tt> macro which value contains
 
870
 *    the prefix to be added to symbol declaration, to import this 
 
871
 *    symbol from a DLL/DSO. For example, on Win32/Visual Studio, the
 
872
 *    value of this macro is \a __declspec(dllimport), and for ARM 
 
873
 *    ABIv2/Symbian, the value is \a IMPORT_C. 
 
874
 *  - Both <tt>PJ_EXPORT_SPECIFIER</tt> and <tt>PJ_IMPORT_SPECIFIER</tt> 
 
875
 *    macros above can be declared in your \a config_site.h if they are not
 
876
 *    declared by pjlib.
 
877
 *  - When PJLIB is built as DLL/DSO, both <tt>PJ_DLL</tt> and 
 
878
 *    <tt>PJ_EXPORTING</tt> macros must be declared, so that 
 
879
 *     <tt>PJ_EXPORT_SPECIFIER</tt> modifier will be added into function
 
880
 *    definition.
 
881
 *  - When application wants to link dynamically with PJLIB, then it
 
882
 *    must declare <tt>PJ_DLL</tt> macro when using/including PJLIB header,
 
883
 *    so that <tt>PJ_IMPORT_SPECIFIER</tt> modifier is properly added into 
 
884
 *    symbol declarations.
 
885
 *
 
886
 * When <b>PJ_DLL</b> macro is not declared, static linking is assumed.
 
887
 *
 
888
 * For example, here are some settings to produce DLLs with Visual Studio
 
889
 * on Windows/Win32:
 
890
 *  - Create Visual Studio projects to produce DLL. Add the appropriate 
 
891
 *    project dependencies to avoid link errors.
 
892
 *  - In the projects, declare <tt>PJ_DLL</tt> and <tt>PJ_EXPORTING</tt> 
 
893
 *    macros.
 
894
 *  - Declare these macros in your <tt>config_site.h</tt>:
 
895
 \verbatim
 
896
        #define PJ_EXPORT_SPECIFIER  __declspec(dllexport)
 
897
        #define PJ_IMPORT_SPECIFIER  __declspec(dllimport)
 
898
 \endverbatim
 
899
 *  - And in the application (that links with the DLL) project, add 
 
900
 *    <tt>PJ_DLL</tt> in the macro declarations.
 
901
 */
 
902
 
 
903
/** @} */
 
904
 
 
905
/**
 
906
 * @defgroup pj_config Build Configuration
 
907
 * @{
 
908
 */
 
909
 
 
910
/**
 
911
 * @def PJ_INLINE(type)
 
912
 * @param type The return type of the function.
 
913
 * Expand the function as inline.
 
914
 */
 
915
#define PJ_INLINE(type)   PJ_INLINE_SPECIFIER type
 
916
 
 
917
/**
 
918
 * This macro declares platform/compiler specific specifier prefix
 
919
 * to be added to symbol declaration to export the symbol when PJLIB
 
920
 * is built as dynamic library.
 
921
 *
 
922
 * This macro should have been added by platform specific headers,
 
923
 * if the platform supports building dynamic library target. 
 
924
 */
 
925
#ifndef PJ_EXPORT_DECL_SPECIFIER
 
926
#   define PJ_EXPORT_DECL_SPECIFIER
 
927
#endif
 
928
 
 
929
 
 
930
/**
 
931
 * This macro declares platform/compiler specific specifier prefix
 
932
 * to be added to symbol definition to export the symbol when PJLIB
 
933
 * is built as dynamic library.
 
934
 *
 
935
 * This macro should have been added by platform specific headers,
 
936
 * if the platform supports building dynamic library target. 
 
937
 */
 
938
#ifndef PJ_EXPORT_DEF_SPECIFIER
 
939
#   define PJ_EXPORT_DEF_SPECIFIER
 
940
#endif
 
941
 
 
942
 
 
943
/**
 
944
 * This macro declares platform/compiler specific specifier prefix
 
945
 * to be added to symbol declaration to import the symbol.
 
946
 *
 
947
 * This macro should have been added by platform specific headers,
 
948
 * if the platform supports building dynamic library target.
 
949
 */
 
950
#ifndef PJ_IMPORT_DECL_SPECIFIER
 
951
#   define PJ_IMPORT_DECL_SPECIFIER
 
952
#endif
 
953
 
 
954
 
 
955
/**
 
956
 * This macro has been deprecated. It will evaluate to nothing.
 
957
 */
 
958
#ifndef PJ_EXPORT_SYMBOL
 
959
#   define PJ_EXPORT_SYMBOL(x)
 
960
#endif
 
961
 
 
962
 
 
963
/**
 
964
 * @def PJ_DECL(type)
 
965
 * @param type The return type of the function.
 
966
 * Declare a function.
 
967
 */
 
968
#if defined(PJ_DLL)
 
969
#   if defined(PJ_EXPORTING)
 
970
#       define PJ_DECL(type)        PJ_EXPORT_DECL_SPECIFIER type
 
971
#   else
 
972
#       define PJ_DECL(type)        PJ_IMPORT_DECL_SPECIFIER type
 
973
#   endif
 
974
#elif !defined(PJ_DECL)
 
975
#   if defined(__cplusplus)
 
976
#       define PJ_DECL(type)        type
 
977
#   else
 
978
#       define PJ_DECL(type)        extern type
 
979
#   endif
 
980
#endif
 
981
 
 
982
 
 
983
/**
 
984
 * @def PJ_DEF(type)
 
985
 * @param type The return type of the function.
 
986
 * Define a function.
 
987
 */
 
988
#if defined(PJ_DLL) && defined(PJ_EXPORTING)
 
989
#   define PJ_DEF(type)             PJ_EXPORT_DEF_SPECIFIER type
 
990
#elif !defined(PJ_DEF)
 
991
#   define PJ_DEF(type)             type
 
992
#endif
 
993
 
 
994
 
 
995
/**
 
996
 * @def PJ_DECL_NO_RETURN(type)
 
997
 * @param type The return type of the function.
 
998
 * Declare a function that will not return.
 
999
 */
 
1000
/**
 
1001
 * @def PJ_IDECL_NO_RETURN(type)
 
1002
 * @param type The return type of the function.
 
1003
 * Declare an inline function that will not return.
 
1004
 */
 
1005
/**
 
1006
 * @def PJ_BEGIN_DECL
 
1007
 * Mark beginning of declaration section in a header file.
 
1008
 */
 
1009
/**
 
1010
 * @def PJ_END_DECL
 
1011
 * Mark end of declaration section in a header file.
 
1012
 */
 
1013
#ifdef __cplusplus
 
1014
#  define PJ_DECL_NO_RETURN(type)   PJ_DECL(type) PJ_NORETURN
 
1015
#  define PJ_IDECL_NO_RETURN(type)  PJ_INLINE(type) PJ_NORETURN
 
1016
#  define PJ_BEGIN_DECL             extern "C" {
 
1017
#  define PJ_END_DECL               }
 
1018
#else
 
1019
#  define PJ_DECL_NO_RETURN(type)   PJ_NORETURN PJ_DECL(type)
 
1020
#  define PJ_IDECL_NO_RETURN(type)  PJ_NORETURN PJ_INLINE(type)
 
1021
#  define PJ_BEGIN_DECL
 
1022
#  define PJ_END_DECL
 
1023
#endif
 
1024
 
 
1025
 
 
1026
 
 
1027
/**
 
1028
 * @def PJ_DECL_DATA(type)
 
1029
 * @param type The data type.
 
1030
 * Declare a global data.
 
1031
 */ 
 
1032
#if defined(PJ_DLL)
 
1033
#   if defined(PJ_EXPORTING)
 
1034
#       define PJ_DECL_DATA(type)   PJ_EXPORT_DECL_SPECIFIER extern type
 
1035
#   else
 
1036
#       define PJ_DECL_DATA(type)   PJ_IMPORT_DECL_SPECIFIER extern type
 
1037
#   endif
 
1038
#elif !defined(PJ_DECL_DATA)
 
1039
#   define PJ_DECL_DATA(type)       extern type
 
1040
#endif
 
1041
 
 
1042
 
 
1043
/**
 
1044
 * @def PJ_DEF_DATA(type)
 
1045
 * @param type The data type.
 
1046
 * Define a global data.
 
1047
 */ 
 
1048
#if defined(PJ_DLL) && defined(PJ_EXPORTING)
 
1049
#   define PJ_DEF_DATA(type)        PJ_EXPORT_DEF_SPECIFIER type
 
1050
#elif !defined(PJ_DEF_DATA)
 
1051
#   define PJ_DEF_DATA(type)        type
 
1052
#endif
 
1053
 
 
1054
 
 
1055
/**
 
1056
 * @def PJ_IDECL(type)
 
1057
 * @param type  The function's return type.
 
1058
 * Declare a function that may be expanded as inline.
 
1059
 */
 
1060
/**
 
1061
 * @def PJ_IDEF(type)
 
1062
 * @param type  The function's return type.
 
1063
 * Define a function that may be expanded as inline.
 
1064
 */
 
1065
 
 
1066
#if PJ_FUNCTIONS_ARE_INLINED
 
1067
#  define PJ_IDECL(type)  PJ_INLINE(type)
 
1068
#  define PJ_IDEF(type)   PJ_INLINE(type)
 
1069
#else
 
1070
#  define PJ_IDECL(type)  PJ_DECL(type)
 
1071
#  define PJ_IDEF(type)   PJ_DEF(type)
 
1072
#endif
 
1073
 
 
1074
 
 
1075
/**
 
1076
 * @def PJ_UNUSED_ARG(arg)
 
1077
 * @param arg   The argument name.
 
1078
 * PJ_UNUSED_ARG prevents warning about unused argument in a function.
 
1079
 */
 
1080
#define PJ_UNUSED_ARG(arg)  (void)arg
 
1081
 
 
1082
/**
 
1083
 * @def PJ_TODO(id)
 
1084
 * @param id    Any identifier that will be printed as TODO message.
 
1085
 * PJ_TODO macro will display TODO message as warning during compilation.
 
1086
 * Example: PJ_TODO(CLEAN_UP_ERROR);
 
1087
 */
 
1088
#ifndef PJ_TODO
 
1089
#  define PJ_TODO(id)       TODO___##id:
 
1090
#endif
 
1091
 
 
1092
/**
 
1093
 * Function attributes to inform that the function may throw exception.
 
1094
 *
 
1095
 * @param x     The exception list, enclosed in parenthesis.
 
1096
 */
 
1097
#define __pj_throw__(x)
 
1098
 
 
1099
/** @} */
 
1100
 
 
1101
/********************************************************************
 
1102
 * Sanity Checks
 
1103
 */
 
1104
#ifndef PJ_HAS_HIGH_RES_TIMER
 
1105
#  error "PJ_HAS_HIGH_RES_TIMER is not defined!"
 
1106
#endif
 
1107
 
 
1108
#if !defined(PJ_HAS_PENTIUM)
 
1109
#  error "PJ_HAS_PENTIUM is not defined!"
 
1110
#endif
 
1111
 
 
1112
#if !defined(PJ_IS_LITTLE_ENDIAN)
 
1113
#  error "PJ_IS_LITTLE_ENDIAN is not defined!"
 
1114
#endif
 
1115
 
 
1116
#if !defined(PJ_IS_BIG_ENDIAN)
 
1117
#  error "PJ_IS_BIG_ENDIAN is not defined!"
 
1118
#endif
 
1119
 
 
1120
#if !defined(PJ_EMULATE_RWMUTEX)
 
1121
#  error "PJ_EMULATE_RWMUTEX should be defined in compat/os_xx.h"
 
1122
#endif
 
1123
 
 
1124
#if !defined(PJ_THREAD_SET_STACK_SIZE)
 
1125
#  error "PJ_THREAD_SET_STACK_SIZE should be defined in compat/os_xx.h"
 
1126
#endif
 
1127
 
 
1128
#if !defined(PJ_THREAD_ALLOCATE_STACK)
 
1129
#  error "PJ_THREAD_ALLOCATE_STACK should be defined in compat/os_xx.h"
 
1130
#endif
 
1131
 
 
1132
PJ_BEGIN_DECL
 
1133
 
 
1134
/** PJLIB version major number. */
 
1135
#define PJ_VERSION_NUM_MAJOR    1
 
1136
 
 
1137
/** PJLIB version minor number. */
 
1138
#define PJ_VERSION_NUM_MINOR    10
 
1139
 
 
1140
/** PJLIB version revision number. */
 
1141
#define PJ_VERSION_NUM_REV      0
 
1142
 
 
1143
/**
 
1144
 * Extra suffix for the version (e.g. "-trunk"), or empty for
 
1145
 * web release version.
 
1146
 */
 
1147
#define PJ_VERSION_NUM_EXTRA    ""
 
1148
 
 
1149
/**
 
1150
 * PJLIB version number consists of three bytes with the following format:
 
1151
 * 0xMMIIRR00, where MM: major number, II: minor number, RR: revision
 
1152
 * number, 00: always zero for now.
 
1153
 */
 
1154
#define PJ_VERSION_NUM  ((PJ_VERSION_NUM_MAJOR << 24) | \
 
1155
                         (PJ_VERSION_NUM_MINOR << 16) | \
 
1156
                         (PJ_VERSION_NUM_REV << 8))
 
1157
 
 
1158
/**
 
1159
 * PJLIB version string constant. @see pj_get_version()
 
1160
 */
 
1161
PJ_DECL_DATA(const char*) PJ_VERSION;
 
1162
 
 
1163
/**
 
1164
 * Get PJLIB version string.
 
1165
 *
 
1166
 * @return #PJ_VERSION constant.
 
1167
 */
 
1168
PJ_DECL(const char*) pj_get_version(void);
 
1169
 
 
1170
/**
 
1171
 * Dump configuration to log with verbosity equal to info(3).
 
1172
 */
 
1173
PJ_DECL(void) pj_dump_config(void);
 
1174
 
 
1175
PJ_END_DECL
 
1176
 
 
1177
 
 
1178
#endif  /* __PJ_CONFIG_H__ */
 
1179