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

config.h
Go to the documentation of this file.
1 // include/libcwd/timestamp-config.h. Generated from config.h.in by configure.
2 // $Header$
3 //
4 // Copyright (C) 2000 - 2003, by
5 //
6 // Carlo Wood, Run on IRC <carlo@alinoe.com>
7 // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt
8 // Fingerprint16 = 32 EC A7 B6 AC DB 65 A6 F6 F6 55 DD 1C DC FF 61
9 //
10 // This file may be distributed under the terms of the Q Public License
11 // version 1.0 as appearing in the file LICENSE.QPL included in the
12 // packaging of this file.
13 //
14 
19 #ifndef LIBCWD_CONFIG_H
20 #define LIBCWD_CONFIG_H
21 
22 //
23 // DO NOT CHANGE THIS FILE
24 //
25 // The defines in this file are configuration options chosen during
26 // compilation of libcwd. To change these options, run `configure'
27 // with the appropriate commandline options (Use `configure --help'
28 // for more details). In order to be sure that a program is linking
29 // with a library that was compiled with the same header file, call
30 // Debug( check_configuration() ); at the top of main() in your program.
31 //
32 
78 #define CWDEBUG_ALLOC 1
79 
101 #define CWDEBUG_MAGIC (CWDEBUG_ALLOC && 1)
102 
130 #define CWDEBUG_GLIBCXX_DEBUG 0
131 
158 #define CWDEBUG_LOCATION 1
159 
210 #define CWDEBUG_LIBBFD (CWDEBUG_LOCATION && 0)
211 
230 #define CWDEBUG_DEBUG 1
231 
253 #define CWDEBUG_DEBUGOUTPUT (CWDEBUG_DEBUG && 0)
254 
273 #define CWDEBUG_DEBUGM (CWDEBUG_ALLOC && CWDEBUG_DEBUG && 0)
274 
292 #define CWDEBUG_MARKER (CWDEBUG_ALLOC && 1)
293 
294 //
295 // autoconf defines that are needed.
296 //
297 
298 #define LIBCWD_HAVE_PTHREAD
299 
300 #if CWDEBUG_ALLOC
301 #define LIBCWD_HAVE___LIBC_MALLOC
302 #undef LIBCWD_HAVE__LIBC_MALLOC
303 #define LIBCWD_HAVE_DLOPEN
304 #define LIBCWD_HAVE_POSIX_MEMALIGN
305 #define LIBCWD_HAVE_ALIGNED_ALLOC
306 #define LIBCWD_HAVE_MEMALIGN
307 #define LIBCWD_HAVE_VALLOC
308 #if defined(LIBCWD_HAVE___LIBC_MALLOC) || defined(LIBCWD_HAVE__LIBC_MALLOC) || defined(LIBCWD_HAVE_DLOPEN)
309 #define LIBCWD_USE_EXTERNAL_C_LINKAGE_FOR_MALLOC
310 #endif
311 #endif
312 
313 #ifndef LIBCWD_THREAD_SAFE
314 #define LIBCWD_THREAD_SAFE 0
315 #endif
316 
317 #if LIBCWD_THREAD_SAFE
318 
319 #define LIBCWD_DO_MAX 8 // Maximal total number of debug objects in a single application.
320  // This costs about 640 kb of memory per object! (640 bytes * PTHREAD_THREADS_MAX).
321 #define LIBCWD_DC_MAX 256 // Maximal total number of debug channels in a single application.
322  // Costs 4 kb of memory per channel (exclusive the actual channels).
323 
345 #define CWDEBUG_DEBUGT 0
346 #else // !LIBCWD_THREAD_SAFE
347 #define CWDEBUG_DEBUGT 0
348 #endif // !LIBCWD_THREAD_SAFE
349 
350 //
351 // Configuration signature
352 //
353 
354 #ifdef __cplusplus
355 namespace libcwd {
356 
357 static unsigned long const config_signature_header_c =
358  (
359 #if CWDEBUG_ALLOC
360  1|
361 #endif
362 #if CWDEBUG_MAGIC
363  2|
364 #endif
365 #if CWDEBUG_LOCATION
366  4|
367 #endif
368 #if CWDEBUG_LIBBFD
369  8|
370 #endif
371 #if CWDEBUG_DEBUG
372  16|
373 #endif
374 #if CWDEBUG_DEBUGM
375  32|
376 #endif
377 #if CWDEBUG_DEBUGT
378  64|
379 #endif
380 #if CWDEBUG_MARKER
381  128|
382 #endif
383 #if CWDEBUG_DEBUGOUTPUT
384  256|
385 #endif
386  (512 * (1 + 128 * (1 + 128 * 2))));
387 
388 extern unsigned long get_config_signature_lib_c() __attribute__((const));
389 extern void conf_check_failed();
390 extern void version_check_failed();
391 
405 inline
406 void
407 check_configuration() {
408  if (get_config_signature_lib_c() != config_signature_header_c)
409  {
410  if (get_config_signature_lib_c() / 512 != config_signature_header_c / 512)
411  version_check_failed();
412  else
413  conf_check_failed();
414  }
415 }
416 
417 } // namespace libcwd
418 #endif // __cplusplus
419 
420 #endif // LIBCWD_CONFIG_H
namespace for libcwd.
Definition: debug.cc:87
Copyright © 2001 - 2004 Carlo Wood.  All rights reserved.