wok-current diff R/stuff/pcre.u @ rev 17597
Up: pangomm 2.35.1
author | Alexander Medvedev <devl547@gmail.com> |
---|---|
date | Tue Feb 10 20:17:45 2015 +0000 (2015-02-10) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/R/stuff/pcre.u Tue Feb 10 20:17:45 2015 +0000 1.3 @@ -0,0 +1,33 @@ 1.4 +Fix for pcre-8.30 and above 1.5 + 1.6 +--- src/main/util.c.orig 2012-02-09 17:15:08.000000000 +0000 1.7 ++++ src/main/util.c 2012-02-09 17:20:31.000000000 +0000 1.8 +@@ -1257,8 +1257,18 @@ 1.9 + } 1.10 + 1.11 + #include "pcre.h" 1.12 ++ 1.13 ++/* This changed at 8.30 */ 1.14 ++#if PCRE_MAJOR > 8 || PCRE_MINOR >= 30 1.15 ++extern int _pcre_valid_utf(const char *string, int length, int *erroroffset); 1.16 ++ 1.17 ++Rboolean utf8Valid(const char *str) 1.18 ++{ 1.19 ++ int errp; 1.20 ++ return (_pcre_valid_utf(str, (int) strlen(str), &errp) == 0); 1.21 ++} 1.22 + /* This changed at 8.13: we don't allow < 8.0 */ 1.23 +-#if PCRE_MAJOR > 8 || PCRE_MINOR >= 13 1.24 ++#elif PCRE_MAJOR > 8 || PCRE_MINOR >= 13 1.25 + extern int _pcre_valid_utf8(const char *string, int length, int *erroroffset); 1.26 + 1.27 + Rboolean utf8Valid(const char *str) 1.28 +@@ -1266,7 +1276,7 @@ 1.29 + int errp; 1.30 + return (_pcre_valid_utf8(str, (int) strlen(str), &errp) == 0); 1.31 + } 1.32 +-#else 1.33 ++#else 1.34 + extern int _pcre_valid_utf8(const char *string, int length); 1.35 + 1.36 + Rboolean utf8Valid(const char *str)