diff options
author | Michael Biebl <biebl@debian.org> | 2012-10-10 06:45:13 +0200 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2012-10-10 06:45:13 +0200 |
commit | 5b0595cc98c012dfa5ac0f214dbc543a11c982cb (patch) | |
tree | 21d6b1b3cbad0c7609a3d3785332a5ffd2a8dee1 /runtime/debug.h | |
parent | e1ab13c77be9fbe3e2e5dfe3357fcd9f991b71b5 (diff) | |
download | rsyslog-5b0595cc98c012dfa5ac0f214dbc543a11c982cb.tar.gz |
Imported Upstream version 7.1.9upstream/7.1.9
Diffstat (limited to 'runtime/debug.h')
-rw-r--r-- | runtime/debug.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/runtime/debug.h b/runtime/debug.h index 717c0fe..5bd26bd 100644 --- a/runtime/debug.h +++ b/runtime/debug.h @@ -35,6 +35,7 @@ /* external static data elements (some time to be replaced) */ extern int Debug; /* debug flag - read-only after startup */ extern int debugging_on; /* read-only, except on sig USR1 */ +extern int stddbg; /* the handle for regular debug output, set to stdout if not forking, -1 otherwise */ /* data types */ @@ -105,8 +106,13 @@ void dbgPrintAllDebugInfo(void); void *dbgmalloc(size_t size); /* macros */ -#define DBGPRINTF(...) if(Debug) { dbgprintf(__VA_ARGS__); } -#define DBGOPRINT(...) if(Debug) { dbgoprint(__VA_ARGS__); } +#ifdef DEBUGLESS +# define DBGPRINTF(...) {} +# define DBGOPRINT(...) {} +#else +# define DBGPRINTF(...) if(Debug) { dbgprintf(__VA_ARGS__); } +# define DBGOPRINT(...) if(Debug) { dbgoprint(__VA_ARGS__); } +#endif #ifdef RTINST # define BEGINfunc static dbgFuncDB_t *pdbgFuncDB; int dbgCALLStaCK_POP_POINT = dbgEntrFunc(&pdbgFuncDB, __FILE__, __func__, __LINE__); # define ENDfunc dbgExitFunc(pdbgFuncDB, dbgCALLStaCK_POP_POINT, RS_RET_NO_IRET); |