summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 88b5b6d)
raw | patch | inline | side by side (parent: 88b5b6d)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Thu, 16 Oct 2008 20:04:46 +0000 (22:04 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Thu, 16 Oct 2008 20:04:46 +0000 (22:04 +0200) |
Because the `poison' pragma complains about macros (which are then never
used), this feature does more harm than good in everyday use. So we'll
only activate it when building in debug mode, so hopefully authors of
new plugins will use this.
used), this feature does more harm than good in everyday use. So we'll
only activate it when building in debug mode, so hopefully authors of
new plugins will use this.
src/collectd.h | patch | blob | history | |
src/perl.c | patch | blob | history |
diff --git a/src/collectd.h b/src/collectd.h
index eece4203894b1a51786446b6787fba77f152d944..895413a701004d879108dda020a9c59e22bf4934 100644 (file)
--- a/src/collectd.h
+++ b/src/collectd.h
# define __attribute__(x) /**/
#endif
-#if __GNUC__
+#if defined(COLLECT_DEBUG) && COLLECT_DEBUG && defined(__GNUC__) && __GNUC__
# pragma GCC poison strcpy strcat strtok
#endif
* included.
*/
#ifndef DONT_POISON_SPRINTF_YET
-# if __GNUC__
+# if defined(COLLECT_DEBUG) && COLLECT_DEBUG && defined(__GNUC__) && __GNUC__
# pragma GCC poison sprintf
# endif
#endif
diff --git a/src/perl.c b/src/perl.c
index 2a8180d2231d71e64fedbe55f5c197b87327195d..3df11a3d594096ec7ca3d63b8877adbe77654c26 100644 (file)
--- a/src/perl.c
+++ b/src/perl.c
#include <EXTERN.h>
#include <perl.h>
-#if __GNUC__
+#if defined(COLLECT_DEBUG) && COLLECT_DEBUG && defined(__GNUC__) && __GNUC__
# pragma GCC poison sprintf
#endif