ruby-changes:49463
From: naruse <ko1@a...>
Date: Thu, 4 Jan 2018 03:02:23 +0900 (JST)
Subject: [ruby-changes:49463] naruse:r61579 (ruby_2_5): merge revision(s) 61471, 61472: [Backport #14231]
naruse 2018-01-04 03:02:17 +0900 (Thu, 04 Jan 2018) New Revision: 61579 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61579 Log: merge revision(s) 61471,61472: [Backport #14231] Use UINT128_T support flag from configure Current check for __uint128_t in hash.c is not valid, since it ignores compilers other than gcc. We hit this on lcc on e2k platform. Configure script properly checks from 128-bit data types support and sets HAVE_UINT128_T accordingly. This approach is already used within ruby at bignum.c, random.c, etc. Probably hash.c is an overlooked remnant of old days. This patch fixes this. [ruby-core:84438] [Bug #14231] [Fix GH-1781] From: Andrew Savchenko <bircoph@a...> hash.c: use uint128_t * hash.c (mult_and_mix): use uint128_t instead of __uint128_t. [ruby-core:84438] [Bug #14231] From: Nobuyoshi Nakada <nobu@r...> Modified directories: branches/ruby_2_5/ Modified files: branches/ruby_2_5/hash.c branches/ruby_2_5/version.h Index: ruby_2_5/hash.c =================================================================== --- ruby_2_5/hash.c (revision 61578) +++ ruby_2_5/hash.c (revision 61579) @@ -230,8 +230,8 @@ static const uint64_t prime2 = ((uint64_ https://github.com/ruby/ruby/blob/trunk/ruby_2_5/hash.c#L230 static inline uint64_t mult_and_mix(uint64_t m1, uint64_t m2) { -#if defined(__GNUC__) && UINT_MAX != ULONG_MAX - __uint128_t r = (__uint128_t) m1 * (__uint128_t) m2; +#if defined HAVE_UINT128_T + uint128_t r = (uint128_t) m1 * (uint128_t) m2; return (uint64_t) (r >> 64) ^ (uint64_t) r; #else uint64_t hm1 = m1 >> 32, hm2 = m2 >> 32; Index: ruby_2_5/version.h =================================================================== --- ruby_2_5/version.h (revision 61578) +++ ruby_2_5/version.h (revision 61579) @@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_5/version.h#L1 #define RUBY_VERSION "2.5.0" -#define RUBY_RELEASE_DATE "2017-12-27" -#define RUBY_PATCHLEVEL 1 +#define RUBY_RELEASE_DATE "2018-01-04" +#define RUBY_PATCHLEVEL 2 -#define RUBY_RELEASE_YEAR 2017 -#define RUBY_RELEASE_MONTH 12 -#define RUBY_RELEASE_DAY 27 +#define RUBY_RELEASE_YEAR 2018 +#define RUBY_RELEASE_MONTH 1 +#define RUBY_RELEASE_DAY 4 #include "ruby/version.h" Index: ruby_2_5 =================================================================== --- ruby_2_5 (revision 61578) +++ ruby_2_5 (revision 61579) Property changes on: ruby_2_5 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /trunk:r61471-61472 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/