00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00019 #ifndef LIBCWD_CONFIG_H
00020 #define LIBCWD_CONFIG_H
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00078 #define CWDEBUG_ALLOC 1
00079
00101 #define CWDEBUG_MAGIC (CWDEBUG_ALLOC && 1)
00102
00130 #define CWDEBUG_GLIBCXX_DEBUG 0
00131
00158 #define CWDEBUG_LOCATION 1
00159
00210 #define CWDEBUG_LIBBFD (CWDEBUG_LOCATION && 0)
00211
00230 #define CWDEBUG_DEBUG 0
00231
00253 #define CWDEBUG_DEBUGOUTPUT (CWDEBUG_DEBUG && 1)
00254
00273 #define CWDEBUG_DEBUGM (CWDEBUG_ALLOC && CWDEBUG_DEBUG && 0)
00274
00292 #define CWDEBUG_MARKER (CWDEBUG_ALLOC && 1)
00293
00294
00295
00296
00297
00298 #define LIBCWD_HAVE_PTHREAD
00299
00300 #if CWDEBUG_ALLOC
00301 #define LIBCWD_HAVE___LIBC_MALLOC
00302 #undef LIBCWD_HAVE__LIBC_MALLOC
00303 #define LIBCWD_HAVE_DLOPEN
00304 #define LIBCWD_HAVE_POSIX_MEMALIGN
00305 #define LIBCWD_HAVE_MEMALIGN
00306 #define LIBCWD_HAVE_VALLOC
00307 #if defined(LIBCWD_HAVE___LIBC_MALLOC) || defined(LIBCWD_HAVE__LIBC_MALLOC) || defined(LIBCWD_HAVE_DLOPEN)
00308 #define LIBCWD_USE_EXTERNAL_C_LINKAGE_FOR_MALLOC
00309 #endif
00310 #endif
00311
00312 #if LIBCWD_THREAD_SAFE
00313
00314 #define LIBCWD_DO_MAX 8 // Maximal total number of debug objects in a single application.
00315
00316 #define LIBCWD_DC_MAX 256 // Maximal total number of debug channels in a single application.
00317
00318
00340 #define CWDEBUG_DEBUGT 0
00341 #else // !LIBCWD_THREAD_SAFE
00342 #define LIBCWD_THREAD_SAFE 0
00343 #define CWDEBUG_DEBUGT 0
00344 #endif // !LIBCWD_THREAD_SAFE
00345
00346
00347
00348
00349
00350 #ifdef __cplusplus
00351 namespace libcwd {
00352
00353 static unsigned long const config_signature_header_c =
00354 (
00355 #if CWDEBUG_ALLOC
00356 1|
00357 #endif
00358 #if CWDEBUG_MAGIC
00359 2|
00360 #endif
00361 #if CWDEBUG_LOCATION
00362 4|
00363 #endif
00364 #if CWDEBUG_LIBBFD
00365 8|
00366 #endif
00367 #if CWDEBUG_DEBUG
00368 16|
00369 #endif
00370 #if CWDEBUG_DEBUGM
00371 32|
00372 #endif
00373 #if CWDEBUG_DEBUGT
00374 64|
00375 #endif
00376 #if CWDEBUG_MARKER
00377 128|
00378 #endif
00379 #if CWDEBUG_DEBUGOUTPUT
00380 256|
00381 #endif
00382 (512 * (0 + 128 * (99 + 128 * 47))));
00383
00384 extern unsigned long get_config_signature_lib_c(void) __attribute__((const));
00385 extern void conf_check_failed(void);
00386 extern void version_check_failed(void);
00387
00401 inline
00402 void
00403 check_configuration(void) {
00404 if (get_config_signature_lib_c() != config_signature_header_c)
00405 {
00406 if (get_config_signature_lib_c() / 512 != config_signature_header_c / 512)
00407 version_check_failed();
00408 else
00409 conf_check_failed();
00410 }
00411 }
00412
00413 }
00414 #endif // __cplusplus
00415
00416 #endif // LIBCWD_CONFIG_H