Skip to content

Commit

Permalink
Avoid compiling the C extension on win32 (still doesnt actually work …
Browse files Browse the repository at this point in the history
…due to missing fork())
  • Loading branch information
tmm1 committed Apr 20, 2011
1 parent 3c2d7e7 commit edb457b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 6 additions & 1 deletion ext/extconf.rb
Expand Up @@ -3,4 +3,9 @@
# warnings save lives
$CFLAGS << " -Wall "

create_makefile('posix_spawn_ext')
if RUBY_PLATFORM =~ /(mswin|mingw|bccwin)/
File.open('Makefile','w'){|f| f.puts "default: \ninstall: " }
else
create_makefile('posix_spawn_ext')
end

5 changes: 4 additions & 1 deletion lib/posix/spawn.rb
@@ -1,4 +1,7 @@
require 'posix_spawn_ext'
unless RUBY_PLATFORM =~ /(mswin|mingw|bccwin)/
require 'posix_spawn_ext'
end

require 'posix/spawn/version'
require 'posix/spawn/child'

Expand Down

0 comments on commit edb457b

Please sign in to comment.