wok-6.x rev 13824

R: update pcre code
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Jan 07 11:03:44 2013 +0100 (2013-01-07)
parents efe6d158ca02
children 52375111086e
files R/receipt R/stuff/pcre.u
line diff
     1.1 --- a/R/receipt	Mon Jan 07 11:02:00 2013 +0100
     1.2 +++ b/R/receipt	Mon Jan 07 11:03:44 2013 +0100
     1.3 @@ -19,6 +19,7 @@
     1.4  	export R_PDFVIEWER="epdfview"
     1.5  	unset DESTDIR
     1.6  	cd $src
     1.7 +	patch -p 0 < $stuff/pcre.u
     1.8  	./configure \
     1.9  		--enable-R-shlib \
    1.10  		--with-system-zlib \
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/R/stuff/pcre.u	Mon Jan 07 11:03:44 2013 +0100
     2.3 @@ -0,0 +1,33 @@
     2.4 +Fix for pcre-8.30 and above
     2.5 +
     2.6 +--- src/main/util.c.orig	2012-02-09 17:15:08.000000000 +0000
     2.7 ++++ src/main/util.c	2012-02-09 17:20:31.000000000 +0000
     2.8 +@@ -1257,8 +1257,18 @@
     2.9 + }
    2.10 + 
    2.11 + #include "pcre.h"
    2.12 ++
    2.13 ++/* This changed at 8.30 */
    2.14 ++#if  PCRE_MAJOR > 8 || PCRE_MINOR >= 30
    2.15 ++extern int _pcre_valid_utf(const char *string, int length, int *erroroffset);
    2.16 ++
    2.17 ++Rboolean utf8Valid(const char *str)
    2.18 ++{
    2.19 ++    int errp;
    2.20 ++    return  (_pcre_valid_utf(str, (int) strlen(str), &errp) == 0);
    2.21 ++}
    2.22 + /* This changed at 8.13: we don't allow < 8.0 */
    2.23 +-#if  PCRE_MAJOR > 8 || PCRE_MINOR >= 13
    2.24 ++#elif  PCRE_MAJOR > 8 || PCRE_MINOR >= 13
    2.25 + extern int _pcre_valid_utf8(const char *string, int length, int *erroroffset);
    2.26 + 
    2.27 + Rboolean utf8Valid(const char *str)
    2.28 +@@ -1266,7 +1276,7 @@
    2.29 +     int errp;
    2.30 +     return  (_pcre_valid_utf8(str, (int) strlen(str), &errp) == 0);
    2.31 + }
    2.32 +-#else
    2.33 ++#else 
    2.34 + extern int _pcre_valid_utf8(const char *string, int length);
    2.35 + 
    2.36 + Rboolean utf8Valid(const char *str)