[Pcre-svn] [329] code/trunk: Craig's second patch to fix the…

Página Inicial
Delete this message
Autor: Subversion repository
Data:  
Para: pcre-svn
Assunto: [Pcre-svn] [329] code/trunk: Craig's second patch to fix the previous one.
Revision: 329
          http://vcs.pcre.org/viewvc?view=rev&revision=329
Author:   ph10
Date:     2008-03-28 12:06:36 +0000 (Fri, 28 Mar 2008)


Log Message:
-----------
Craig's second patch to fix the previous one.

Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/pcrecpp.cc


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2008-03-26 17:39:06 UTC (rev 328)
+++ code/trunk/ChangeLog    2008-03-28 12:06:36 UTC (rev 329)
@@ -38,7 +38,8 @@
     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

Modified: code/trunk/pcrecpp.cc
===================================================================
--- code/trunk/pcrecpp.cc    2008-03-26 17:39:06 UTC (rev 328)
+++ code/trunk/pcrecpp.cc    2008-03-28 12:06:36 UTC (rev 329)
@@ -64,18 +64,21 @@
 // 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")));
+  __attribute__((weak, alias(USER_LABEL_PREFIX "_ZN7pcrecpp2RE6no_argE")));
+# endif
 #endif
-#endif


// If a regular expression has no error, its error_ field points here
static const string empty_string;