diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2008-03-28 12:06:36 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2008-03-28 12:06:36 +0000 |
commit | f977212ac20f98f13c78f00dab0c502379a3cfa1 (patch) | |
tree | d506a7b74d5331a157d78f2f5e2e4452dfe17ca7 | |
parent | 7b07ed7033aa78a3c1b292ca34e3d764f4554513 (diff) | |
download | pcre-f977212ac20f98f13c78f00dab0c502379a3cfa1.tar.gz |
Craig's second patch to fix the previous one.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@329 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | pcrecpp.cc | 13 |
2 files changed, 10 insertions, 6 deletions
@@ -38,7 +38,8 @@ Version 7.7 05-Mar-08 pcre_compile.c and pcre_dfa_exec.c. 8. Applied Craig's patch to pcrecpp.cc to fix a problem in OS X that was - caused by fix #2 above. + caused by fix #2 above. (Subsequently also a second patch to fix the + first patch.) Version 7.6 28-Jan-08 @@ -64,17 +64,20 @@ Arg RE::no_arg((void*)NULL); // only the __attribute__ syntax, but also __USER_LABEL_PREFIX__, are // gnu-specific.) #if defined(__GNUC__) && __GNUC__ >= 3 -#if defined(__ELF__) +# define AS_STRING(x) AS_STRING_INTERNAL(x) +# define AS_STRING_INTERNAL(x) #x +# define USER_LABEL_PREFIX AS_STRING(__USER_LABEL_PREFIX__) +# if defined(__ELF__) extern Arg no_arg - __attribute__((alias(__USER_LABEL_PREFIX__ "_ZN7pcrecpp2RE6no_argE"))); -#else + __attribute__((alias(USER_LABEL_PREFIX "_ZN7pcrecpp2RE6no_argE"))); +# else // While we know elf supports strong aliases, not all formats do (Mach // doesn't, for instance). So make aliases weak by default. This is // a smidge less safe in theory (conceivably, someone could override // this symbol in their own binary), but perfectly ok in practice. extern Arg no_arg - __attribute__((weak, alias(__USER_LABEL_PREFIX__ "_ZN7pcrecpp2RE6no_argE"))); -#endif + __attribute__((weak, alias(USER_LABEL_PREFIX "_ZN7pcrecpp2RE6no_argE"))); +# endif #endif // If a regular expression has no error, its error_ field points here |