#ifndef __INC_LIBTHECORE_SIGNAL_H__ #define __INC_LIBTHECORE_SIGNAL_H__ /* ### LINUX-BLOCK-BEGIN (signal.h shadow guard) ######################### */ #if defined(__linux__) && !defined(_SIGNAL_H) /* --------------------------------------------------------------------------- * Header-shadowing guard (Linux only). * * glibc's is literally one line: "#include ". Every * module compiles with -I<...>/libthecore/include, so that bracket include * resolves to *this* file instead of /usr/include/signal.h, and SIGPIPE, * signal(), sigaction() and friends silently disappear. libthecore's own * stdafx.h includes , so this bites signal.c immediately, and * db/src/Main.cpp and libsql/Tellwait.cpp include directly. (It * does not happen on FreeBSD, where includes and not * the other way round, which is why the production build never hit this.) * * Pull the real header in via #include_next, which resumes the search after * the directory this file was found in. _SIGNAL_H is glibc's own guard, so * when the system header already got in first this is a no-op. * ------------------------------------------------------------------------- */ #include_next #endif /* ### LINUX-BLOCK-END (signal.h shadow guard) ########################### */ #ifdef __cplusplus extern "C" { #endif extern void signal_setup(); extern void signal_timer_disable(); extern void signal_timer_enable(int timeout_seconds); #ifdef __cplusplus }; #endif #endif