diff --git a/include/prism/internal/bit.h b/include/prism/internal/bit.h index b0111a4c2c..4f7b56090f 100644 --- a/include/prism/internal/bit.h +++ b/include/prism/internal/bit.h @@ -12,7 +12,7 @@ */ #if defined(__GNUC__) || defined(__clang__) #define pm_ctzll(v) ((unsigned) __builtin_ctzll(v)) -#elif defined(_MSC_VER) +#elif defined(_MSC_VER) && defined(_WIN64) #include #include diff --git a/lib/prism/ffi.rb b/lib/prism/ffi.rb index 192b7cb52e..6eb8231c2c 100644 --- a/lib/prism/ffi.rb +++ b/lib/prism/ffi.rb @@ -186,7 +186,7 @@ def self.with # pointer directly; for files it uses a pm_source_t under the hood. class PrismSource # :nodoc: PLATFORM_EXPECTS_UTF8 = - RbConfig::CONFIG["host_os"].match?(/bccwin|cygwin|djgpp|mingw|mswin|wince|darwin/i) + RbConfig::CONFIG["host_os"].match?(/cygwin|mingw|mswin|darwin/i) attr_reader :pointer, :length diff --git a/test/prism/test_helper.rb b/test/prism/test_helper.rb index 406582c0a5..9fea36476b 100644 --- a/test/prism/test_helper.rb +++ b/test/prism/test_helper.rb @@ -236,7 +236,7 @@ def self.each_encoding # True if the current platform is Windows. def self.windows? - RbConfig::CONFIG["host_os"].match?(/bccwin|cygwin|djgpp|mingw|mswin|wince/i) + RbConfig::CONFIG["host_os"].match?(/cygwin|mingw|mswin/i) end # All versions that prism can parse