diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d998d4..8a4a7d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +3.0.1 +----- + +Fixed: + +* Windows support was broken in 3.0.0 + + 3.0.0 ----- diff --git a/Rakefile b/Rakefile index 7264a0c..bf773e6 100644 --- a/Rakefile +++ b/Rakefile @@ -29,6 +29,8 @@ namespace "ffi-compiler" do t.cflags << "-D_GNU_SOURCE=1" if RbConfig::CONFIG["host_os"].downcase =~ /mingw/ t.cflags << "-arch x86_64 -arch i386" if t.platform.mac? t.ldflags << "-arch x86_64 -arch i386" if t.platform.mac? + + t.add_define 'WINDOWS_OS' if FFI::Platform.windows? end end task :compile_ffi => ["ffi-compiler:default"] diff --git a/ext/scrypt/Rakefile b/ext/scrypt/Rakefile index 98c6b57..9fb5da0 100644 --- a/ext/scrypt/Rakefile +++ b/ext/scrypt/Rakefile @@ -7,4 +7,6 @@ FFI::Compiler::CompileTask.new('scrypt_ext') do |t| t.cflags << "-arch x86_64 -arch i386" if t.platform.mac? t.ldflags << "-arch x86_64 -arch i386" if t.platform.mac? t.export '../../lib/scrypt/scrypt_ext.rb' + + t.add_define 'WINDOWS_OS' if FFI::Platform.windows? end diff --git a/ext/scrypt/crypto_scrypt.c b/ext/scrypt/crypto_scrypt.c index 492936c..d38d710 100644 --- a/ext/scrypt/crypto_scrypt.c +++ b/ext/scrypt/crypto_scrypt.c @@ -29,8 +29,12 @@ /* #include "bsdtar_platform.h" */ #include -#include - +#if !defined(WINDOWS_OS) + #include + #ifndef HAVE_MMAP + #define HAVE_MMAP 1 + #endif +#endif #include #include #include diff --git a/lib/scrypt/version.rb b/lib/scrypt/version.rb index be3e6da..a990297 100644 --- a/lib/scrypt/version.rb +++ b/lib/scrypt/version.rb @@ -1,3 +1,3 @@ module SCrypt - VERSION = "3.0.0" + VERSION = "3.0.1" end diff --git a/scrypt.gemspec b/scrypt.gemspec index 6f58e7f..1f2c88a 100644 --- a/scrypt.gemspec +++ b/scrypt.gemspec @@ -19,7 +19,7 @@ Gem::Specification.new do |s| alternative functions such as PBKDF2 or bcrypt. EOF - s.add_dependency 'ffi-compiler', '>= 0.0.2' + s.add_dependency 'ffi-compiler', '>= 1.0.0' s.add_dependency 'rake' s.add_development_dependency "rspec" s.add_development_dependency "rdoc"