Main Page   Reference Manual   Namespace List   Compound List   Namespace Members   Compound Members   File Members  

libcwd/config.h

Go to the documentation of this file.
00001 // include/libcwd/timestamp-config.h.  Generated from config.h.in by configure.
00002 // $Header$
00003 //
00004 // Copyright (C) 2000 - 2003, by
00005 // 
00006 // Carlo Wood, Run on IRC <carlo@alinoe.com>
00007 // RSA-1024 0x624ACAD5 1997-01-26                    Sign & Encrypt
00008 // Fingerprint16 = 32 EC A7 B6 AC DB 65 A6  F6 F6 55 DD 1C DC FF 61
00009 //
00010 // This file may be distributed under the terms of the Q Public License
00011 // version 1.0 as appearing in the file LICENSE.QPL included in the
00012 // packaging of this file.
00013 //
00014 
00019 #ifndef LIBCWD_CONFIG_H
00020 #define LIBCWD_CONFIG_H
00021 
00022 //
00023 // DO NOT CHANGE THIS FILE
00024 //
00025 // The defines in this file are configuration options chosen during
00026 // compilation of libcwd.  To change these options, run `configure'
00027 // with the appropriate commandline options (Use `configure --help'
00028 // for more details).  In order to be sure that a program is linking
00029 // with a library that was compiled with the same header file, call
00030 // Debug( check_configuration() ); at the top of main() in your program.
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 // autoconf defines that are needed.
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                                                 // This costs about 640 kb of memory per object! (640 bytes * PTHREAD_THREADS_MAX).
00316 #define LIBCWD_DC_MAX 256                       // Maximal total number of debug channels in a single application.
00317                                                 // Costs 4 kb of memory per channel (exclusive the actual channels).
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 // Configuration signature
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 } // namespace libcwd
00414 #endif // __cplusplus
00415 
00416 #endif // LIBCWD_CONFIG_H
Copyright © 2001 - 2004 Carlo Wood.  All rights reserved.