diff options
Diffstat (limited to 'lib/mkmf.rb')
-rw-r--r-- | lib/mkmf.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 74a20609b2..034ca0bf9c 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -321,6 +321,7 @@ end def create_tmpsrc(src) src = yield(src) if block_given? + src[0, 0] = COMMON_HEADERS + "\n" src = src.gsub(/[ \t]+$/, '').gsub(/\A\n+|^\n+$/, '').sub(/[^\n]\z/, "\\&\n") count = 0 begin @@ -1843,7 +1844,7 @@ split = Shellwords.method(:shellwords).to_proc EXPORT_PREFIX = config_string('EXPORT_PREFIX') {|s| s.strip} -hdr = [] +hdr = ['#include "ruby.h"' "\n"] config_string('COMMON_MACROS') do |s| Shellwords.shellwords(s).each do |w| hdr << "#define " + w.split(/=/, 2).join(" ") |