00001 // include/libcwd/timestamp-sys.h. Generated from sys.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 00015 // 00016 // NOTE: 00017 // 00018 // This header file was generated with the `configure' script of libcwd-1.0.3 00019 // If you change your system header files (like glibc or kernel header) 00020 // it might be needed to regenerate it. 00021 // 00022 00027 #ifndef LIBCWD_SYS_H 00028 #define LIBCWD_SYS_H 00029 00030 namespace libcwd { 00039 int const builtin_return_address_offset = -1; 00040 } 00041 00042 // 00043 // Compilers and preprocessor used. Put here to cause a recompile when changed. 00044 // CC : Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.3-10' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu 00045 // CXX : Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.3-10' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu 00046 // CXXCPP: Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.3-10' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu 00047 // 00048 00049 // 00050 // Sanity check - if this is defined then _REENTRANT will be defined regardless 00051 // and that won't work. 00052 // 00053 #ifdef __GTHREADS 00054 #error No, no, no... "sys.h" has to be the VERY first header file you include. Before ANY other (system) header file. 00055 #endif 00056 00057 // 00058 // g++ 3.4 (20030816) defines _REENTRANT regardless when including 00059 // certain standard libstdc++ header files. Therefore we can ONLY 00060 // test on _REENTRANT here, before including any other header file. 00061 // 00062 #if defined(_REENTRANT) || defined(_THREAD_SAFE) 00063 // Some (broken) third party libraries include -D_REENTRANT in the 00064 // pkg-config --cflags output (for example, several X libraries). 00065 // Therefore we can't even rely here on it anymore. Instead use 00066 // our own define to know if this is a threaded application or not. 00067 #ifndef LIBCWD_THREAD_SAFE 00068 // This could be a #warning -- if gcc SHOWED warnings in system headers. 00069 #error Please use -DLIBCWD_THREAD_SAFE on the command line if you intend to link with libcwd_r! \ 00070 To fix this error, remove -D_REENTRANT (and/or -D_THREAD_SAFE) from your compile flags \ 00071 when you are compiling a single threaded application (and link with libcwd), or add \ 00072 -DLIBCWD_THREAD_SAFE to the compile flags (and link with libcwd_r). Alternatively you \ 00073 can suppress this warning by adding -DLIBCWD_THREAD_SAFE=0 (and link with libcwd). \ 00074 You are strongly advised to use pkg-config to determine the correct flags \ 00075 (see example-project/m4/CW_LIB_LIBCWD.m4)! 00076 #endif // LIBCWD_THREAD_SAFE 00077 00078 #else // !(defined(_REENTRANT) || defined(_THREAD_SAFE)) 00079 00080 #ifndef LIBCWD_THREAD_SAFE 00081 #define LIBCWD_THREAD_SAFE 0 00082 #elif LIBCWD_THREAD_SAFE 00083 // This could be a #warning -- if gcc SHOWED warnings in system headers. 00084 #error LIBCWD_THREAD_SAFE is set, which implies the use of threads. \ 00085 You should also define _REENTRANT (or _THREAD_SAFE on some OS) for the sake of other libraries in this case! \ 00086 Add -D_REENTRANT -pthread to your CXXFLAGS for threaded applications. 00087 #endif 00088 00089 #endif // defined(_REENTRANT) || defined(_THREAD_SAFE) 00090 00091 #if LIBCWD_THREAD_SAFE && !defined(_GNU_SOURCE) 00092 #error Sorry, libcwd_r uses GNU extensions, also in the header files. 00093 #error Therefore you must also define _GNU_SOURCE when you are linking with -lcwd_r. 00094 #error Please add #define _GNU_SOURCE to your "sys.h", see reference-manual/preparation.html#preparation_step2. 00095 #endif 00096 00097 #endif /* LIBCWD_SYS_H */