[pcre-dev] [Bug 664] ABI breakage in PCRE 7.6

Page principale
Supprimer ce message
Auteur: Craig Silverstein
Date:  
À: pcre-dev
Sujet: [pcre-dev] [Bug 664] ABI breakage in PCRE 7.6
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=664




--- Comment #3 from Craig Silverstein <csilvers@???> 2008-02-11 22:58:42 ---
Jan, some folks at Google have come up with a solution that should
preserve ABI compatibility while still keeping the change. It uses
gcc aliases. I'm applying the patch against pcre 7.6 below; do you
mind trying it and seeing if it fixes the problems you were seeing?

craig

--cut here--

Index: pcrecpp.cc
===================================================================
--- pcrecpp.cc (revision 319)
+++ pcrecpp.cc (working copy)
@@ -57,6 +57,14 @@
// Special object that stands-in for no argument
Arg RE::no_arg((void*)NULL);

+// This is for ABI compatibility with old versions of pcre (pre-7.6),
+// which defined a global no_arg variable instead of putting it in the
+// RE class. This works on GCC >= 3, at least. We could probably have
+// a more inclusive test if we ever needed it.
+#if defined(__GNUC__) && __GNUC__ >= 3
+extern Arg no_arg __attribute__((alias("_ZN7pcrecpp2RE6no_argE")));
+#endif
+
// If a regular expression has no error, its error_ field points here
static const string empty_string;



--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email