summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSutou Kouhei <kou@clear-code.com>2020-06-27 08:31:59 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-06-27 23:54:09 +0900
commita40b390b1775eec264fedc0bbd4504861e61c7e4 (patch)
treecfde8adb4e1648e702b2e7108e943284637a8426
parent6429b6d973597a6347c650ebb6d3fb1bf81f5031 (diff)
downloadruby-a40b390b1775eec264fedc0bbd4504861e61c7e4.tar.gz
[ruby/fiddle] test windows: use _snprintf
https://github.com/ruby/fiddle/commit/aa261bdb9f
-rw-r--r--test/fiddle/test_func.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/fiddle/test_func.rb b/test/fiddle/test_func.rb
index 18052fffdd..376f8786da 100644
--- a/test/fiddle/test_func.rb
+++ b/test/fiddle/test_func.rb
@@ -81,7 +81,12 @@ module Fiddle
end
def test_snprintf
- snprintf = Function.new(@libc["snprintf"],
+ if Fiddle::WINDOWS
+ snprintf_name = "_snprintf"
+ else
+ snprintf_name = "snprintf"
+ end
+ snprintf = Function.new(@libc[snprintf_name],
[
TYPE_VOIDP,
TYPE_SIZE_T,