summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-23 04:53:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-23 04:53:39 +0000
commit391f0a726fcf5e8787191446db29e1acc5dc9c4b (patch)
tree3f161f283e7386dba6bf3d9917202dd05777b9d3
parent4c3799ec1df43f72e2b50b5eb4e3eb5ad0df24a2 (diff)
* ext/curses/extconf.rb: use try_static_assert.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--ext/curses/extconf.rb3
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index d0cfaf94847..d2986387e24 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 1b7d2d37062..799d1bfe5ff 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")