mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* bignum.c (absint_numwords_generic): set an array element after
definition of a variable to fix compile error with older version of fcc (Fujitsu C Compiler) 5.6 on Solaris 10 on Sparc. [Bug #10350] [ruby-dev:48608] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a9c42d1026
commit
9631e3e788
2 changed files with 10 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
Thu Oct 9 23:31:47 2014 Naohisa Goto <ngotogenome@gmail.com>
|
||||
|
||||
* bignum.c (absint_numwords_generic): set an array element after
|
||||
definition of a variable to fix compile error with older version
|
||||
of fcc (Fujitsu C Compiler) 5.6 on Solaris 10 on Sparc.
|
||||
[Bug #10350] [ruby-dev:48608]
|
||||
|
||||
Thu Oct 9 16:15:26 2014 Eric Wong <e@80x24.org>
|
||||
|
||||
* ext/-test-/st/foreach/extconf.rb: new file
|
||||
|
|
4
bignum.c
4
bignum.c
|
@ -3294,7 +3294,7 @@ absint_numwords_generic(size_t numbytes, int nlz_bits_in_msbyte, size_t word_num
|
|||
static const BDIGIT char_bit[1] = { CHAR_BIT };
|
||||
BDIGIT numbytes_bary[bdigit_roomof(sizeof(numbytes))];
|
||||
BDIGIT val_numbits_bary[bdigit_roomof(sizeof(numbytes) + 1)];
|
||||
BDIGIT nlz_bits_in_msbyte_bary[1] = { nlz_bits_in_msbyte };
|
||||
BDIGIT nlz_bits_in_msbyte_bary[1];
|
||||
BDIGIT word_numbits_bary[bdigit_roomof(sizeof(word_numbits))];
|
||||
BDIGIT div_bary[numberof(val_numbits_bary) + BIGDIVREM_EXTRA_WORDS];
|
||||
BDIGIT mod_bary[numberof(word_numbits_bary)];
|
||||
|
@ -3304,6 +3304,8 @@ absint_numwords_generic(size_t numbytes, int nlz_bits_in_msbyte, size_t word_num
|
|||
int sign;
|
||||
size_t numwords;
|
||||
|
||||
nlz_bits_in_msbyte_bary[0] = nlz_bits_in_msbyte;
|
||||
|
||||
/*
|
||||
* val_numbits = numbytes * CHAR_BIT - nlz_bits_in_msbyte
|
||||
* div, mod = val_numbits.divmod(word_numbits)
|
||||
|
|
Loading…
Reference in a new issue