Skip to content
This repository
Browse code

fix build on windows

  • Loading branch information...
commit 7475a24ab333b8ef03d3baa615e59557a02541a6 1 parent 3b066cf
Aaron Patterson authored November 17, 2012

Showing 1 changed file with 5 additions and 5 deletions. Show diff stats Hide diff stats

  1. 10  ext/psych/extconf.rb
10  ext/psych/extconf.rb
@@ -17,6 +17,11 @@
17 17
 have_header 'unistd.h'
18 18
 
19 19
 unless find_header('yaml.h') && find_library('yaml', 'yaml_get_version')
  20
+  case RUBY_PLATFORM
  21
+  when /mswin/
  22
+    $CFLAGS += " -DYAML_DECLARE_STATIC -DHAVE_CONFIG_H"
  23
+  end
  24
+
20 25
   srcdir = File.expand_path File.dirname __FILE__
21 26
   files = Dir.chdir File.join(srcdir, 'yaml') do
22 27
     Dir.entries(Dir.pwd).find_all { |f|
@@ -30,11 +35,6 @@
30 35
   have_header 'config.h'
31 36
 end
32 37
 
33  
-case RUBY_PLATFORM
34  
-when /mswin/
35  
-  $CFLAGS += " -DYAML_DECLARE_STATIC -DHAVE_CONFIG_H"
36  
-end
37  
-
38 38
 create_makefile 'psych'
39 39
 
40 40
 # :startdoc:

0 notes on commit 7475a24

Please sign in to comment.
Something went wrong with that request. Please try again.