merges r30407 and r30450 from trunk into ruby_1_9_2.

--
* ext/fiddle/extconf.rb: check for windows.h while building fiddle.
  Thanks Jon Forums! [ruby-core:33923]
--
* Use _WIN32 rather than checking for windows.h.  Thanks Jon Forums!
  [ruby-core:33977]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
yugui 2011-01-16 06:30:33 +00:00
parent 27f15990ad
commit 66fd410332
9 changed files with 31 additions and 11 deletions

View file

@ -16,4 +16,14 @@ class TestFiddle < Fiddle::TestCase
assert_equal(DL.const_get(name), Fiddle.const_get(name))
end
end
def test_windows_constant
require 'rbconfig'
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/
assert Fiddle::WINDOWS, "Fiddle::WINDOWS should be 'true' on Windows platforms"
else
refute Fiddle::WINDOWS, "Fiddle::WINDOWS should be 'false' on non-Windows platforms"
end
end
end