/[pcre]/code/trunk/pcrecpp.cc
ViewVC logotype

Diff of /code/trunk/pcrecpp.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 329 by ph10, Fri Mar 28 12:06:36 2008 UTC revision 330 by ph10, Sat Apr 5 15:31:38 2008 UTC
# Line 59  Arg RE::no_arg((void*)NULL); Line 59  Arg RE::no_arg((void*)NULL);
59    
60  // This is for ABI compatibility with old versions of pcre (pre-7.6),  // This is for ABI compatibility with old versions of pcre (pre-7.6),
61  // which defined a global no_arg variable instead of putting it in the  // which defined a global no_arg variable instead of putting it in the
62  // RE class.  This works on GCC >= 3, at least.  We could probably  // RE class.  This works on GCC >= 3, at least.  It definitely works
63  // have a more inclusive test if we ever needed it.  (Note that not  // for ELF, but may not for other object formats (Mach-O, for
64  // only the __attribute__ syntax, but also __USER_LABEL_PREFIX__, are  // instance, does not support aliases.)  We could probably have a more
65    // inclusive test if we ever needed it.  (Note that not only the
66    // __attribute__ syntax, but also __USER_LABEL_PREFIX__, are
67  // gnu-specific.)  // gnu-specific.)
68  #if defined(__GNUC__) && __GNUC__ >= 3  #if defined(__GNUC__) && __GNUC__ >= 3 && defined(__ELF__)
69  # define AS_STRING(x)   AS_STRING_INTERNAL(x)  # define ULP_AS_STRING(x)            ULP_AS_STRING_INTERNAL(x)
70  # define AS_STRING_INTERNAL(x)   #x  # define ULP_AS_STRING_INTERNAL(x)   #x
71  # define USER_LABEL_PREFIX  AS_STRING(__USER_LABEL_PREFIX__)  # define USER_LABEL_PREFIX_STR       ULP_AS_STRING(__USER_LABEL_PREFIX__)
 # if defined(__ELF__)  
72  extern Arg no_arg  extern Arg no_arg
73    __attribute__((alias(USER_LABEL_PREFIX "_ZN7pcrecpp2RE6no_argE")));    __attribute__((alias(USER_LABEL_PREFIX_STR "_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  
74  #endif  #endif
75    
76  // If a regular expression has no error, its error_ field points here  // If a regular expression has no error, its error_ field points here

Legend:
Removed from v.329  
changed lines
  Added in v.330

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12