This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
allow plugins to disable poison
- From: Taras Glek <tglek at mozilla dot com>
- To: gcc-patches at gcc dot gnu dot org, Diego Novillo <dnovillo at google dot com>
- Date: Tue, 06 Oct 2009 14:25:51 -0700
- Subject: allow plugins to disable poison
Hi,
Current GCC poison behavior prevents plugins from using malloc() &
friends which causes conflicts with 3rd party headers that call malloc
from their headers.
* system.h: Do not use poison when PLUGIN_NO_POISON is defined
Taras
Index: gcc/system.h
===================================================================
--- gcc/system.h (revision 152497)
+++ gcc/system.h (working copy)
@@ -661,7 +661,7 @@
#define realloc xrealloc
#endif
-#if (GCC_VERSION >= 3000)
+#if (GCC_VERSION >= 3000) && !defined(PLUGIN_NO_POISON)
/* Note autoconf checks for prototype declarations and includes
system.h while doing so. Only poison these tokens if actually