diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ext/curses/extconf.rb | 3 |
2 files changed, 5 insertions, 2 deletions
@@ -1,3 +1,7 @@ +Wed Jul 23 13:53:36 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * ext/curses/extconf.rb: use try_static_assert. + Wed Jul 23 10:06:19 2008 Kazuhiro NISHIYAMA <zn@mbf.nifty.com> * test/zlib/test_zlib.rb (TestZlibDeflate#test_params): suppress a diff --git a/ext/curses/extconf.rb b/ext/curses/extconf.rb index 1b7d2d3706..799d1bfe5f 100644 --- a/ext/curses/extconf.rb +++ b/ext/curses/extconf.rb @@ -24,8 +24,7 @@ if make have_func(f) || (have_macro(f, curses) && $defs.push(format("-DHAVE_%s", f.upcase))) end flag = "-D_XOPEN_SOURCE_EXTENDED" - src = "int test_var[(sizeof(char*)>sizeof(int))*2-1];" - if try_compile(cpp_include(%w[stdio.h stdlib.h]+curses)+src , flag) + if try_static_assert("sizeof(char*)>sizeof(int)", %w[stdio.h stdlib.h]+curses , flag) $defs << flag end create_makefile("curses") |