diff options
Diffstat (limited to 'ext/curses/extconf.rb')
-rw-r--r-- | ext/curses/extconf.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/curses/extconf.rb b/ext/curses/extconf.rb index 3e53ef65f7..a95b49ffea 100644 --- a/ext/curses/extconf.rb +++ b/ext/curses/extconf.rb @@ -129,5 +129,13 @@ if header_library warn "unexpeted value for --with-curses-version: #{with_curses_version}" end + for type in ["long", "int"] + if try_static_assert("sizeof(chtype) == sizeof(unsigned #{type})", + %w[stdio.h stdlib.h]+curses) + $defs << "-DCHTYPE_IS_U#{type.upcase}" + break + end + end + create_makefile("curses") end |