summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-02 09:04:54 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-02 09:04:54 +0000
commitfc086c352e5a46a4ae72aa9857d5a53e180b6db5 (patch)
treec16d743beb845bb0c59cac6183a9188f1d0807c3 /lib
parentf712a4f497075a1f7c759c5e83aa6e91465a08dc (diff)
* configure.in (AC_USE_SYSTEM_EXTENSIONS): instead of AC_AIX
* 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/branches/ruby_1_8@17793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/mkmf.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 2207be3ca5..e28b3cea76 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -295,6 +295,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")
open(CONFTEST_C, "wb") do |cfile|
cfile.print src
@@ -1768,7 +1769,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(" ")