// include/libcwd/timestamp-sys.h.  Generated from sys.h.in by configure.
// $Header: /cvsroot/libcwd/libcwd/include/libcwd/sys.h.in,v 1.3 2004/05/27 03:03:53 libcw Exp $
//
// Copyright (C) 2000 - 2003, by
// 
// Carlo Wood, Run on IRC <carlo@alinoe.com>
// RSA-1024 0x624ACAD5 1997-01-26                    Sign & Encrypt
// Fingerprint16 = 32 EC A7 B6 AC DB 65 A6  F6 F6 55 DD 1C DC FF 61
//
// This file may be distributed under the terms of the Q Public License
// version 1.0 as appearing in the file LICENSE.QPL included in the
// packaging of this file.
//

//
// NOTE:
//
// This header file was generated with the `configure' script of libcwd-0.99.40
// If you change your system header files (like glibc or kernel header)
// it might be needed to regenerate it.
//

/** \file libcwd/sys.h
 * Do not include this header file directly, instead include a custom \link preparation "sys.h" \endlink.
 */

#ifndef LIBCWD_SYS_H
#define LIBCWD_SYS_H

namespace libcwd {
  /**
   * \brief Offset to __builtin_return_address() needed to get the correct line number from location_ct.
   *
   * \par Example
   * \code
   * libcwd::location_ct loc((char*)__builtin_return_address(0) + libcwd::builtin_return_address_offset);
   * \endcode
   */
  int const builtin_return_address_offset = 0;
}

//
// Compilers and preprocessor used.  Put here to cause a recompile when changed.
// CC    : gcc version 3.4.4 [FreeBSD] 20050518
// CXX   : gcc version 3.4.4 [FreeBSD] 20050518
// CXXCPP: gcc version 3.4.4 [FreeBSD] 20050518
//

//
// Sanity check - if this is defined then _REENTRANT will be defined regardless
// and that won't work.
//
#ifdef __GTHREADS
#error No, no, no... "sys.h" has to be the VERY first header file you include.  Before ANY other (system) header file.
#endif

//
// g++ 3.4 (20030816) defines _REENTRANT regardless when including
// certain standard libstdc++ header files.  Therefore we can ONLY
// test on _REENTRANT here, before including any other header file.
//
#if defined(_REENTRANT) || defined(_THREAD_SAFE)
#define LIBCWD_THREAD_SAFE 1
#else
#define LIBCWD_THREAD_SAFE 0
#endif

#if LIBCWD_THREAD_SAFE && !defined(_GNU_SOURCE)
#error Sorry, libcwd_r uses GNU extensions, also in the header files.
#error Therefore you must also define _GNU_SOURCE when you are linking with -lcwd_r.
#error Please add #define _GNU_SOURCE to your "sys.h", see reference-manual/preparation.html#preparation_step2.
#endif

#endif /* LIBCWD_SYS_H */
