From a4804fbdf503a9c2b550b877120ca4029c65cdb3 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 8 Dec 2017 05:51:19 +0000 Subject: support gperf 3.1 * tool/gperf.sed: extracted sed commands to a script. ANSI-C code produced by gperf 3.1 declares length arguments as `size_t`. it causes conflict with existing declarations, and needs casts for a local variable and return statements. [Feature #13883] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- enc/unicode/10.0.0/name2ctype.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'enc/unicode/10.0.0/name2ctype.h') diff --git a/enc/unicode/10.0.0/name2ctype.h b/enc/unicode/10.0.0/name2ctype.h index 6aab2cb3ae..4a1422d17a 100644 --- a/enc/unicode/10.0.0/name2ctype.h +++ b/enc/unicode/10.0.0/name2ctype.h @@ -34756,7 +34756,9 @@ struct uniname2ctype_struct { }; #define uniname2ctype_offset(str) offsetof(struct uniname2ctype_pool_t, uniname2ctype_pool_##str) +#if !1+0 static const struct uniname2ctype_struct *uniname2ctype_p(const char *, unsigned int); +#endif #ifndef USE_UNICODE_PROPERTIES #define TOTAL_KEYWORDS 15 @@ -34786,7 +34788,7 @@ inline #endif #endif static unsigned int -uniname2ctype_hash (register const char *str, register unsigned int len) +uniname2ctype_hash (register const char *str, register size_t len) { #ifndef USE_UNICODE_PROPERTIES static const unsigned char asso_values[] = @@ -34832,7 +34834,7 @@ uniname2ctype_hash (register const char *str, register unsigned int len) #ifndef USE_UNICODE_PROPERTIES return len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]]; #else /* USE_UNICODE_PROPERTIES */ - register unsigned int hval = len; + register unsigned int hval = (unsigned int)len; switch (hval) { @@ -36535,7 +36537,7 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents = }; #define uniname2ctype_pool ((const char *) &uniname2ctype_pool_contents) const struct uniname2ctype_struct * -uniname2ctype_p (register const char *str, register unsigned int len) +uniname2ctype_p (register const char *str, register size_t len) { static const struct uniname2ctype_struct wordlist[] = { -- cgit v1.2.3