54 #error No, no, no... "sys.h" has to be the VERY first header file you include. Before ANY other (system) header file.
62 #if defined(_REENTRANT) || defined(_THREAD_SAFE)
67 #ifndef LIBCWD_THREAD_SAFE
69 #error Please use -DLIBCWD_THREAD_SAFE on the command line if you intend to link with libcwd_r! \
70 To fix this error, remove -pthread (and/or -D_REENTRANT and/or -D_THREAD_SAFE) from your compile flags \
71 when you are compiling a single threaded application (and link with libcwd), or add \
72 -DLIBCWD_THREAD_SAFE to the compile flags (and link with libcwd_r). Alternatively you \
73 can suppress this warning by adding -DLIBCWD_THREAD_SAFE=0 (and link with libcwd). \
74 You are strongly advised to use pkg-config to determine the correct flags \
75 (see example-project/m4/CW_LIB_LIBCWD.m4)!
80 #ifndef LIBCWD_THREAD_SAFE
81 #define LIBCWD_THREAD_SAFE 0
82 #elif LIBCWD_THREAD_SAFE
84 #error LIBCWD_THREAD_SAFE is set, which implies the use of threads. \
85 You should also define _REENTRANT (or _THREAD_SAFE on some OS) for the sake of other libraries in this case! \
86 Add -pthread to your CXXFLAGS for threaded applications (that should cause _REENTRANT to be defined).
91 #if LIBCWD_THREAD_SAFE && !defined(_GNU_SOURCE)
92 #error Sorry, libcwd_r uses GNU extensions, also in the header files.
93 #error Therefore you must also define _GNU_SOURCE when you are linking with -lcwd_r.
94 #error Please add #define _GNU_SOURCE to your "sys.h", see reference-manual/preparation.html#preparation_step2.
namespace for libcwd.
Definition: debug.cc:87
int const builtin_return_address_offset
Offset to __builtin_return_address() needed to get the correct line number from location_ct.
Definition: sys.h:39