summaryrefslogtreecommitdiff
path: root/ext/fiddle
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-24 00:36:42 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-24 00:36:42 +0000
commita54aae45a6bb488bed497e3421a75720dab9249b (patch)
tree705d4f0a2f0475b235e627dfff459e3e7c42afc9 /ext/fiddle
parent7a0676e8a5fad060fa675b90f72b9dac391c8af7 (diff)
* ext/fiddle/extconf.rb: remove ffitarget.h generated by configure on
mswin, because it's not normal file (cygwin's symlink) and have system attribute. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/fiddle')
-rw-r--r--ext/fiddle/extconf.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/fiddle/extconf.rb b/ext/fiddle/extconf.rb
index 3b885d2..ca5fc35 100644
--- a/ext/fiddle/extconf.rb
+++ b/ext/fiddle/extconf.rb
@@ -78,6 +78,9 @@ begin
system(*args, chdir: libffi.dir) or
raise "failed to configure libffi. Please install libffi."
end
+ if $mswin && File.file?("#{libffi.include}/ffitarget.h")
+ FileUtils.rm_f("#{libffi.include}/ffitarget.h")
+ end
unless File.file?("#{libffi.include}/ffitarget.h")
FileUtils.cp("#{srcdir}/src/x86/ffitarget.h", libffi.include, preserve: true)
end