diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-23 04:53:39 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-23 04:53:39 +0000 |
| commit | eea3fae8e9b49f0d19ceda766bd585e7e888c461 (patch) | |
| tree | d605e781a77ce537559caa9e4009c63b214f7596 | |
| parent | 4e007129324ee61df084a1d9ad080db53bafbea2 (diff) | |
* ext/curses/extconf.rb: use try_static_assert.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@18180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -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") |
