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 06:25:42 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> * ext/syck: suppress warnings more. diff --git a/ext/curses/extconf.rb b/ext/curses/extconf.rb index 0124bbbf4a..4e199af2af 100644 --- a/ext/curses/extconf.rb +++ b/ext/curses/extconf.rb @@ -23,8 +23,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") |
