зеркало из https://github.com/github/ruby.git
* missing/ffs.c (ffs): fixed for non-zero values.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
cb4133c8ab
Коммит
a22df39467
|
@ -1,3 +1,7 @@
|
|||
Thu May 13 21:40:39 2010 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* missing/ffs.c (ffs): fixed for non-zero values.
|
||||
|
||||
Thu May 13 18:45:25 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/io/console/console.c (get_write_fd): return primary fd if no
|
||||
|
|
|
@ -6,11 +6,13 @@
|
|||
int ffs(int arg)
|
||||
{
|
||||
unsigned int x = (unsigned int)arg;
|
||||
int r = 0;
|
||||
int r;
|
||||
|
||||
if (x == 0)
|
||||
return 0;
|
||||
|
||||
r = 1;
|
||||
|
||||
#if 32 < SIZEOF_INT * CHAR_BIT
|
||||
if ((x & 0xffffffff) == 0) {
|
||||
x >>= 32;
|
||||
|
|
Загрузка…
Ссылка в новой задаче