Gentoo Archives: gentoo-commits

From: "Michael Sterrett (mr_bones_)" <mr_bones_@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in games-mud/tf/files: tf-50_beta8-pcre.patch
Date: Sun, 27 May 2012 21:10:13
Message-Id: 20120527210958.909602004C@flycatcher.gentoo.org
1 mr_bones_ 12/05/27 21:09:58
2
3 Added: tf-50_beta8-pcre.patch
4 Log:
5 add patch to work around libpcre changes submitted by Robert Varga via bug #409779
6
7 (Portage version: 2.1.10.49/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 games-mud/tf/files/tf-50_beta8-pcre.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-mud/tf/files/tf-50_beta8-pcre.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-mud/tf/files/tf-50_beta8-pcre.patch?rev=1.1&content-type=text/plain
14
15 Index: tf-50_beta8-pcre.patch
16 ===================================================================
17 From f61b5859d69c2d99264182f60f5ae1e430812b59 Mon Sep 17 00:00:00 2001
18 From: =?UTF-8?q?Petr=20=C5=A0abata?= <contyk@××××××.com>
19 Date: Fri, 10 Feb 2012 13:55:46 +0100
20 Subject: [PATCH] Fix build with PCRE-8.30+
21 MIME-Version: 1.0
22 Content-Type: text/plain; charset=UTF-8
23 Content-Transfer-Encoding: 8bit
24
25 This patch fixes build with the latest PCRE release which removes some
26 obsolete code tinyfugue still uses, namely pcre_info().
27
28 Signed-off-by: Petr Šabata <contyk@××××××.com>
29 ---
30 src/macro.c | 3 ++-
31 src/pattern.c | 2 +-
32 src/pattern.h | 2 +-
33 3 files changed, 4 insertions(+), 3 deletions(-)
34
35 diff --git a/src/macro.c b/src/macro.c
36 index ac28fc9..b492717 100644
37 --- a/src/macro.c
38 +++ b/src/macro.c
39 @@ -893,7 +893,8 @@ static int complete_macro(Macro *spec, unsigned int hash, int num,
40 }
41 spec->attr &= ~F_NONE;
42 if (spec->nsubattr) {
43 - int n = pcre_info(spec->trig.ri->re, NULL, NULL);
44 + int n;
45 + pcre_fullinfo(spec->trig.ri->re, NULL, PCRE_INFO_CAPTURECOUNT, &n);
46 for (i = 0; i < spec->nsubattr; i++) {
47 spec->subattr[i].attr &= ~F_NONE;
48 if (spec->subattr[i].subexp > n) {
49 diff --git a/src/pattern.c b/src/pattern.c
50 index 047a44a..a7228ff 100644
51 --- a/src/pattern.c
52 +++ b/src/pattern.c
53 @@ -151,7 +151,7 @@ static RegInfo *tf_reg_compile_fl(const char *pattern, int optimize,
54 emsg ? emsg : "unknown error");
55 goto tf_reg_compile_error;
56 }
57 - n = pcre_info(ri->re, NULL, NULL);
58 + pcre_fullinfo(ri->re, NULL, PCRE_INFO_CAPTURECOUNT, &n);
59 if (n < 0) goto tf_reg_compile_error;
60 ri->ovecsize = 3 * (n + 1);
61 ri->ovector = dmalloc(NULL, sizeof(int) * ri->ovecsize, file, line);
62 diff --git a/src/pattern.h b/src/pattern.h
63 index 1eec0f9..cbe9af9 100644
64 --- a/src/pattern.h
65 +++ b/src/pattern.h
66 @@ -10,7 +10,7 @@
67 #ifndef PATTERN_H
68 #define PATTERN_H
69
70 -#include "pcre-2.08/pcre.h"
71 +#include <pcre.h>
72
73 typedef struct RegInfo {
74 pcre *re;
75 --
76 1.7.7.6