diff options
| author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-02 09:04:54 +0000 |
|---|---|---|
| committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-02 09:04:54 +0000 |
| commit | fc086c352e5a46a4ae72aa9857d5a53e180b6db5 (patch) | |
| tree | c16d743beb845bb0c59cac6183a9188f1d0807c3 | |
| parent | f712a4f497075a1f7c759c5e83aa6e91465a08dc (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
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | configure.in | 6 | ||||
| -rw-r--r-- | lib/mkmf.rb | 3 |
3 files changed, 10 insertions, 5 deletions
@@ -1,3 +1,9 @@ +Wed Jul 2 17:48:51 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 13:19:44 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> * array.c (rb_ary_fill): check if beg is too big. diff --git a/configure.in b/configure.in index f56faad3f2..682e5a070b 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT() -AC_PREREQ(2.58) +AC_PREREQ(2.60) AC_DEFUN([RUBY_MINGW32], [case "$host_os" in @@ -240,8 +240,7 @@ AC_PROG_MAKE_SET AC_PROG_INSTALL # checks for UNIX variants that set C preprocessor variables -AC_AIX -AC_MINIX +AC_USE_SYSTEM_EXTENSIONS AC_SUBST(RM, ['rm -f']) AC_SUBST(CP, ['cp']) @@ -1575,7 +1574,6 @@ AC_SUBST(RDOCTARGET) case "$target_os" in linux*) - XCFLAGS="$XCFLAGS -D_GNU_SOURCE=1" ;; netbsd*) CFLAGS="$CFLAGS -pipe" 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(" ") |
