Browse Source

apply a preventive link-time symbol namespace conflict workaround (we got caught by a symbol conflict and resulting segfault in the RPM 5 camp and this change prevents such sitations already in advance)

Ralf S. Engelschall 18 years ago
parent
commit
81cc46b577
2 changed files with 19 additions and 1 deletions
  1. 16 0
      pcre/pcre.patch
  2. 3 1
      pcre/pcre.spec

+ 16 - 0
pcre/pcre.patch

@@ -0,0 +1,16 @@
+Index: pcreposix.h
+--- pcreposix.h.orig	2007-08-01 11:06:39 +0200
++++ pcreposix.h	2007-11-01 20:28:15 +0100
+@@ -129,6 +129,12 @@
+ 
+ /* The functions */
+ 
++/* link-time symbol namespace conflict prevention */
++#define regcomp  pcreposix_regcomp
++#define regexec  pcreposix_regexec
++#define regerror pcreposix_regerror
++#define regfree  pcreposix_regfree
++
+ PCREPOSIX_EXP_DECL int regcomp(regex_t *, const char *, int);
+ PCREPOSIX_EXP_DECL int regexec(const regex_t *, const char *, size_t,
+                      regmatch_t *, int);

+ 3 - 1
pcre/pcre.spec

@@ -33,13 +33,14 @@ Class:        BASE
 Group:        Libraries
 License:      LGPL
 Version:      7.4
-Release:      20070921
+Release:      20071101
 
 #   package options
 %option       with_utf8  yes
 
 #   list of sources
 Source0:      ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-%{version}.tar.gz
+Patch0:       pcre.patch
 
 #   build information
 Prefix:       %{l_prefix}
@@ -61,6 +62,7 @@ AutoReqProv:  no
 
 %prep
     %setup -q
+    %patch -p0
     %{l_shtool} subst \
         -e '/LINENO: error: C[+]* preprocessor/{N;N;N;N;s/.*/:/;}' \
         configure