summaryrefslogtreecommitdiff
path: root/pcrecpp.cc
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2008-03-05 17:14:08 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2008-03-05 17:14:08 +0000
commitbf81f7a2223b11e45e3a7e9f74fa2bb448a20900 (patch)
tree1be82727b73ce2f64376da71f66e41ce4bfc1551 /pcrecpp.cc
parentabb65c4b1d51f55f2a59e759cb1def6db0211521 (diff)
downloadpcre-bf81f7a2223b11e45e3a7e9f74fa2bb448a20900.tar.gz
Craig's patch to pcrecpp.cc to restore ABI compatibility with pre-7.6 versions,
which defined a global no_arg variable instead of putting it in the RE class. git-svn-id: svn://vcs.exim.org/pcre/code/trunk@322 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcrecpp.cc')
-rw-r--r--pcrecpp.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/pcrecpp.cc b/pcrecpp.cc
index 0e21718..f34f0fc 100644
--- a/pcrecpp.cc
+++ b/pcrecpp.cc
@@ -57,6 +57,14 @@ static const int kVecSize = (1 + kMaxArgs) * 3; // results + PCRE workspace
// 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;