This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]