* 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
This commit is contained in:
shyouhei 2008-07-01 12:13:13 +00:00
parent 982450e24f
commit 1b62e5ec37
2 changed files with 8 additions and 1 deletions

View File

@ -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> Tue Jul 1 20:55:07 2008 URABE Shyouhei <shyouhei@ruby-lang.org>
* eval.c (rb_interrupt): trick to suppress GCC warning. * eval.c (rb_interrupt): trick to suppress GCC warning.

View File

@ -321,6 +321,7 @@ end
def create_tmpsrc(src) def create_tmpsrc(src)
src = yield(src) if block_given? src = yield(src) if block_given?
src[0, 0] = COMMON_HEADERS + "\n"
src = src.gsub(/[ \t]+$/, '').gsub(/\A\n+|^\n+$/, '').sub(/[^\n]\z/, "\\&\n") src = src.gsub(/[ \t]+$/, '').gsub(/\A\n+|^\n+$/, '').sub(/[^\n]\z/, "\\&\n")
count = 0 count = 0
begin begin
@ -1843,7 +1844,7 @@ split = Shellwords.method(:shellwords).to_proc
EXPORT_PREFIX = config_string('EXPORT_PREFIX') {|s| s.strip} EXPORT_PREFIX = config_string('EXPORT_PREFIX') {|s| s.strip}
hdr = [] hdr = ['#include "ruby.h"' "\n"]
config_string('COMMON_MACROS') do |s| config_string('COMMON_MACROS') do |s|
Shellwords.shellwords(s).each do |w| Shellwords.shellwords(s).each do |w|
hdr << "#define " + w.split(/=/, 2).join(" ") hdr << "#define " + w.split(/=/, 2).join(" ")