Skip to content

Commit

Permalink
Bug fix for windows: Build error
Browse files Browse the repository at this point in the history
  • Loading branch information
u338_steven committed Feb 21, 2014
1 parent db1c4ee commit 5509e8d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ext/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def manual_ssl_config
check_libs(%w[kernel32 rpcrt4 gdi32], true)

if GNU_CHAIN
CONFIG['LDSHARED'] = "$(CXX) -shared -lstdc++"
CONFIG['LDSHAREDXX'] = "$(CXX) -shared -static-libgcc -static-libstdc++"
else
$defs.push "-EHs"
$defs.push "-GR"
Expand Down
2 changes: 1 addition & 1 deletion ext/fastfilereader/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def add_define(name)
check_libs(%w[kernel32 rpcrt4 gdi32], true)

if GNU_CHAIN
CONFIG['LDSHARED'] = "$(CXX) -shared -lstdc++"
CONFIG['LDSHAREDXX'] = "$(CXX) -shared -static-libgcc -static-libstdc++"
else
$defs.push "-EHs"
$defs.push "-GR"
Expand Down
2 changes: 1 addition & 1 deletion ext/project.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ typedef int SOCKET;
#include <assert.h>

typedef int socklen_t;
#ifn_def _PID_T_
#ifndef _PID_T_
#define _PID_T_
typedef int pid_t;
#endif /* _PID_T_ */
Expand Down
10 changes: 6 additions & 4 deletions rakelib/package.rake
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ else
def hack_cross_compilation(ext)
# inject 1.8/1.9 pure-ruby entry point
# HACK: add these dependencies to the task instead of using cross_compiling
ext.cross_platform.each do |platform|
task = "native:#{GEMSPEC.name}:#{platform}"
if Rake::Task.task_defined?(task)
Rake::Task[task].prerequisites.unshift "lib/#{ext.name}.rb"
if ext.cross_platform.is_a?(Array) then
ext.cross_platform.each do |platform|
task = "native:#{GEMSPEC.name}:#{platform}"
if Rake::Task.task_defined?(task)
Rake::Task[task].prerequisites.unshift "lib/#{ext.name}.rb"
end
end
end
end
Expand Down

0 comments on commit 5509e8d

Please sign in to comment.