diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-01 12:13:13 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-01 12:13:13 +0000 |
commit | 1b62e5ec370a5e442effad9b5012cb3373a839ff (patch) | |
tree | ee365d6aeb2464044b9708a3acb2bb9ef779c63c | |
parent | 982450e24fb275644664499cea197deae3f5722b (diff) |
* lib/mkmf.rb (create_tmpsrc): we need to include COMMON_HEADERS,
namely inclusion of ruby.h, because _GNU_SOURCE is now defined
there (if any) and socket.so requires it on Linux systems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | lib/mkmf.rb | 3 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Tue Jul 1 21:09:58 2008 URABE Shyouhei <shyouhei@ruby-lang.org> + + * lib/mkmf.rb (create_tmpsrc): we need to include COMMON_HEADERS, + namely inclusion of ruby.h, because _GNU_SOURCE is now defined + there (if any) and socket.so requires it on Linux systems. + Tue Jul 1 20:55:07 2008 URABE Shyouhei <shyouhei@ruby-lang.org> * eval.c (rb_interrupt): trick to suppress GCC warning. 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(" ") |