[Ruby 1.9-Bug#4144][Open] check_signedness("size_t")

Bug #4144: check_signedness(“size_t”)
http://redmine.ruby-lang.org/issues/show/4144

起票者: Kazuhiro NISHIYAMA
ステータス: Open, 優先度: Normal
カテゴリ: build
ruby -v: ruby 1.9.3dev (2010-12-10 trunk 30157) [i686-linux]

ext/iconv で
…/ext/iconv/iconv.c:481:5: warning: “SIGNEDNESS_OF_SIZE_T” is not
defined
という警告が出ていたので調べてみたところ、 check_signedness がおかしいようです。

% ruby-trunk -v -r mkmf -e ‘check_signedness(“size_t”)’
ruby 1.9.3dev (2010-12-10 trunk 30157) [i686-linux]
checking signedness of size_t… failed
% cat mkmf.log
check_signedness: checking signedness of size_t… --------------------
failed

“gcc -o conftest
-I/home/kazu/opt/ruby-trunk/include/ruby-1.9.1/i686-linux
-I/home/kazu/opt/ruby-trunk/include/ruby-1.9.1/ruby/backward
-I/home/kazu/opt/ruby-trunk/include/ruby-1.9.1 -I.
-D_FILE_OFFSET_BITS=64 -O2 -fno-tree-pre -g3 -ggdb -DRUBY_DEBUG_ENV
-Wall -Wformat=2 -Wundef -Wno-parentheses -fPIC conftest.c -L.
-L/home/kazu/opt/ruby-trunk/lib -Wl,-R/home/kazu/opt/ruby-trunk/lib -L.
-rdynamic -Wl,-export-dynamic -Wl,-R
-Wl,/home/kazu/opt/ruby-trunk/lib -L/home/kazu/opt/ruby-trunk/lib
-lruby-static -lpthread -lrt -ldl -lcrypt -lm -lc”
checked program was:
/* begin /
1: #include “ruby.h”
2:
3: int main() {return 0;}
/
end */

“gcc -I/home/kazu/opt/ruby-trunk/include/ruby-1.9.1/i686-linux
-I/home/kazu/opt/ruby-trunk/include/ruby-1.9.1/ruby/backward
-I/home/kazu/opt/ruby-trunk/include/ruby-1.9.1 -I.
-D_FILE_OFFSET_BITS=64 -O2 -fno-tree-pre -g3 -ggdb -DRUBY_DEBUG_ENV
-Wall -Wformat=2 -Wundef -Wno-parentheses -fPIC -c conftest.c”
conftest.c:4: error: ‘rbcv_typedef_’ undeclared here (not in a function)
checked program was:
/* begin /
1: #include “ruby.h”
2:
3: /top/
4: int conftest_const[((rbcv_typedef_)-1 < 0) ? 1 : -1];
/
end */

“gcc -I/home/kazu/opt/ruby-trunk/include/ruby-1.9.1/i686-linux
-I/home/kazu/opt/ruby-trunk/include/ruby-1.9.1/ruby/backward
-I/home/kazu/opt/ruby-trunk/include/ruby-1.9.1 -I.
-D_FILE_OFFSET_BITS=64 -O2 -fno-tree-pre -g3 -ggdb -DRUBY_DEBUG_ENV
-Wall -Wformat=2 -Wundef -Wno-parentheses -fPIC -c conftest.c”
conftest.c:4: error: ‘rbcv_typedef_’ undeclared here (not in a function)
checked program was:
/* begin /
1: #include “ruby.h”
2:
3: /top/
4: int conftest_const[((rbcv_typedef_)-1 > 0) ? 1 : -1];
/
end */

チケット #4144 が更新されました。 (by Nobuyoshi N.)

ステータス OpenからClosedに変更
進捗 % 0から100に変更

This issue was solved with changeset r30160.
Kazuhiro, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.