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

Etusivu
Poista viesti
Lähettäjä: Craig Silverstein
Päiväys:  
Vastaanottaja: ph10
Kopio: pcre-dev
Aihe: Re: [pcre-dev] [Bug 664] New: ABI breakage in PCRE 7.6
Hey Philip, I've got at least one report of this patch working as
intended, and I don't think it can hurt, so can you apply it to the
next release of pcre (whenever it might be)?

Thanks,
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;