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

config.h

Go to the documentation of this file.
00001 // include/libcwd/timestamp-config.h.  Generated from config.h.in by configure.
00002 // $Header: /cvsroot/libcwd/libcwd/include/libcwd/config.h.in,v 1.5 2005/12/30 23:23:12 libcw Exp $
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 
00129 #define CWDEBUG_LOCATION 1
00130 
00181 #define CWDEBUG_LIBBFD (CWDEBUG_LOCATION && 0)
00182 
00201 #define CWDEBUG_DEBUG 0
00202 
00224 #define CWDEBUG_DEBUGOUTPUT (CWDEBUG_DEBUG && 1)
00225 
00244 #define CWDEBUG_DEBUGM (CWDEBUG_ALLOC && CWDEBUG_DEBUG && 0)
00245 
00263 #define CWDEBUG_MARKER (CWDEBUG_ALLOC && 1)
00264 
00265 //
00266 // autoconf defines that are needed.
00267 //
00268 
00269 #define LIBCWD_HAVE_PTHREAD
00270 
00271 #if CWDEBUG_ALLOC
00272 #define LIBCWD_HAVE___LIBC_MALLOC
00273 #undef LIBCWD_HAVE__LIBC_MALLOC
00274 #define LIBCWD_HAVE_DLOPEN
00275 #define LIBCWD_HAVE_POSIX_MEMALIGN
00276 #define LIBCWD_HAVE_MEMALIGN
00277 #define LIBCWD_HAVE_VALLOC
00278 #if defined(LIBCWD_HAVE___LIBC_MALLOC) || defined(LIBCWD_HAVE__LIBC_MALLOC) || defined(LIBCWD_HAVE_DLOPEN)
00279 #define LIBCWD_USE_EXTERNAL_C_LINKAGE_FOR_MALLOC
00280 #endif
00281 #endif
00282 
00283 #if LIBCWD_THREAD_SAFE
00284 
00285 #define LIBCWD_DO_MAX 8                         // Maximal total number of debug objects in a single application.
00286                                                 // This costs about 640 kb of memory per object! (640 bytes * PTHREAD_THREADS_MAX).
00287 #define LIBCWD_DC_MAX 256                       // Maximal total number of debug channels in a single application.
00288                                                 // Costs 4 kb of memory per channel (exclusive the actual channels).
00289 
00311 #define CWDEBUG_DEBUGT 0
00312 #else // !LIBCWD_THREAD_SAFE
00313 #define LIBCWD_THREAD_SAFE 0
00314 #define CWDEBUG_DEBUGT 0
00315 #endif // !LIBCWD_THREAD_SAFE
00316 
00317 //
00318 // Configuration signature
00319 //
00320 
00321 #ifdef __cplusplus
00322 namespace libcwd {
00323 
00324 static unsigned long const config_signature_header_c =
00325         (
00326 #if CWDEBUG_ALLOC
00327         1|
00328 #endif
00329 #if CWDEBUG_MAGIC
00330         2|
00331 #endif
00332 #if CWDEBUG_LOCATION
00333         4|
00334 #endif
00335 #if CWDEBUG_LIBBFD
00336         8|
00337 #endif
00338 #if CWDEBUG_DEBUG
00339         16|
00340 #endif
00341 #if CWDEBUG_DEBUGM
00342         32|
00343 #endif
00344 #if CWDEBUG_DEBUGT
00345         64|
00346 #endif
00347 #if CWDEBUG_MARKER
00348         128|
00349 #endif
00350 #if CWDEBUG_DEBUGOUTPUT
00351         256|
00352 #endif
00353         (512 * (0 + 128 * (99 + 128 * 44))));
00354 
00355 extern unsigned long get_config_signature_lib_c(void) __attribute__((const));
00356 extern void conf_check_failed(void);
00357 extern void version_check_failed(void);
00358 
00372 inline
00373 void
00374 check_configuration(void) {
00375   if (get_config_signature_lib_c() != config_signature_header_c)
00376   {
00377     if (get_config_signature_lib_c() / 512 != config_signature_header_c / 512)
00378       version_check_failed();
00379     else
00380       conf_check_failed();
00381   }
00382 }
00383 
00384 } // namespace libcwd
00385 #endif // __cplusplus
00386 
00387 #endif // LIBCWD_CONFIG_H
Copyright © 2001 - 2004 Carlo Wood.  All rights reserved.