e$B$J$+$@$G$9!#e(B
At Sun, 21 May 2006 01:52:01 +0900,
Tanaka A. wrote in [ruby-dev:28659]:
e$B$3$H$N$h$&$G$9!#$&$%$`!#e(B
e$B<j85$G$O:F8=$7$J$$$H;W$C$?$i!"%=!<%9$H$OJL$N%G%#%l%/%H%j$G%3%se(B
e$B%Q%$%k$7$F$$$k$?$a!"e(Bext/digeste$B$N%=!<%9%G%#%l%/%H%j$K$Oe(Bextconf.h
e$B$,:n$i$l$J$$$+$i$G$7$?!#e(B
e$B:n$jD>$7$?%Q%C%A$G$9!#e(B
Index: ruby.h
RCS file: /cvs/ruby/src/ruby/ruby.h,v
retrieving revision 1.134
diff -p -U2 -r1.134 ruby.h
— ruby.h 2 Mar 2006 05:22:30 -0000 1.134
+++ ruby.h 11 May 2006 14:46:59 -0000
@@ -23,4 +23,7 @@ extern “C” {
#include “config.h”
+#ifdef RUBY_EXTCONF_H
+#include RUBY_EXTCONF_H
+#endif
#define NORETURN_STYLE_NEW 1
Index: ext/extmk.rb
RCS file: /cvs/ruby/src/ruby/ext/extmk.rb,v
retrieving revision 1.88
diff -p -U2 -r1.88 extmk.rb
— ext/extmk.rb 17 May 2006 15:41:31 -0000 1.88
+++ ext/extmk.rb 19 May 2006 15:39:06 -0000
@@ -125,4 +125,5 @@ def extmake(target)
begin
if (!(ok &&= extract_makefile(makefile)) ||
#{$srcdir}/depend".any? {|f| modified?(f, [t])})
Index: ext/dbm/extconf.rb
RCS file: /cvs/ruby/src/ruby/ext/dbm/extconf.rb,v
retrieving revision 1.16
diff -p -U2 -r1.16 extconf.rb
— ext/dbm/extconf.rb 24 Jul 2003 07:41:36 -0000 1.16
+++ ext/dbm/extconf.rb 21 May 2006 00:54:24 -0000
@@ -34,5 +34,5 @@ def db_check(db)
for hdr in $dbm_conf_headers.fetch(db, [“ndbm.h”])
if have_header(hdr.dup) and have_type(“DBM”, hdr.dup, hsearch)
- $CFLAGS += " " + hsearch + ‘-DDBM_HDR="<’+hdr+’>"’
- $defs << hsearch << ‘-DDBM_HDR="<’+hdr+’>"’
return true
end
Index: ext/digest/md5/extconf.rb
===================================================================
RCS file: /cvs/ruby/src/ruby/ext/digest/md5/extconf.rb,v
retrieving revision 1.6
diff -p -U2 -r1.6 extconf.rb
— ext/digest/md5/extconf.rb 21 Jan 2004 09:05:25 -0000 1.6
+++ ext/digest/md5/extconf.rb 21 May 2006 00:41:53 -0000
@@ -4,5 +4,6 @@
require “mkmf”
-$CFLAGS << " -DHAVE_CONFIG_H -I#{File.dirname(FILE)}/…"
+$defs << “-DHAVE_CONFIG_H”
+$INCFLAGS << " -I$(srcdir)/…"
$objs = [ “md5init.#{$OBJEXT}” ]
Index: ext/digest/rmd160/extconf.rb
RCS file: /cvs/ruby/src/ruby/ext/digest/rmd160/extconf.rb,v
retrieving revision 1.6
diff -p -U2 -r1.6 extconf.rb
— ext/digest/rmd160/extconf.rb 21 Jan 2004 07:01:31 -0000 1.6
+++ ext/digest/rmd160/extconf.rb 21 May 2006 00:42:20 -0000
@@ -4,5 +4,6 @@
require “mkmf”
-$CFLAGS << " -DHAVE_CONFIG_H -I#{File.dirname(FILE)}/…"
+$defs << “-DNDEBUG” << “-DHAVE_CONFIG_H”
+$INCFLAGS << " -I$(srcdir)/…"
$objs = [ “rmd160init.#{$OBJEXT}” ]
Index: ext/digest/sha1/extconf.rb
RCS file: /cvs/ruby/src/ruby/ext/digest/sha1/extconf.rb,v
retrieving revision 1.6
diff -p -U2 -r1.6 extconf.rb
— ext/digest/sha1/extconf.rb 7 Jan 2004 22:06:38 -0000 1.6
+++ ext/digest/sha1/extconf.rb 21 May 2006 00:42:46 -0000
@@ -4,5 +4,6 @@
require “mkmf”
-$CFLAGS << " -DHAVE_CONFIG_H -I#{File.dirname(FILE)}/…"
+$defs << “-DHAVE_CONFIG_H”
+$INCFLAGS << " -I$(srcdir)/…"
$objs = [ “sha1init.#{$OBJEXT}” ]
Index: ext/digest/sha2/extconf.rb
RCS file: /cvs/ruby/src/ruby/ext/digest/sha2/extconf.rb,v
retrieving revision 1.10
diff -p -U2 -r1.10 extconf.rb
— ext/digest/sha2/extconf.rb 6 Sep 2005 23:22:39 -0000 1.10
+++ ext/digest/sha2/extconf.rb 21 May 2006 00:42:59 -0000
@@ -4,5 +4,6 @@
require “mkmf”
-$CPPFLAGS << " -DHAVE_CONFIG_H -I#{File.dirname(FILE)}/…"
+$defs << “-DHAVE_CONFIG_H”
+$INCFLAGS << " -I$(srcdir)/…"
$objs = [
Index: ext/readline/readline.c
RCS file: /cvs/ruby/src/ruby/ext/readline/readline.c,v
retrieving revision 1.27
diff -p -U2 -r1.27 readline.c
— ext/readline/readline.c 24 Sep 2005 00:17:43 -0000 1.27
+++ ext/readline/readline.c 13 May 2006 13:09:08 -0000
@@ -2,4 +2,6 @@
Copyright © 1997-2001 Shugo M. */
+#include “ruby.h”
+
#include <errno.h>
#include <stdio.h>
@@ -16,5 +18,4 @@
#endif
-#include “ruby.h”
#include “rubyio.h”
#include “rubysig.h”
Index: ext/socket/extconf.rb
RCS file: /cvs/ruby/src/ruby/ext/socket/extconf.rb,v
retrieving revision 1.45
diff -p -U2 -r1.45 extconf.rb
— ext/socket/extconf.rb 21 Oct 2005 06:46:41 -0000 1.45
+++ ext/socket/extconf.rb 21 Oct 2005 15:43:45 -0000
@@ -27,5 +27,5 @@ if /solaris/ =~ RUBY_PLATFORM and !try_c
end
-$ipv6 = false
+ipv6 = false
default_ipv6 = /cygwin/ !~ RUBY_PLATFORM
if enable_config(“ipv6”, default_ipv6)
@@ -38,61 +38,43 @@ main()
}
EOF
- $CPPFLAGS+=" -DENABLE_IPV6"
- $ipv6 = true
- $defs << “-DENABLE_IPV6” << “-DINET6”
- ipv6 = true
end
end
-$ipv6type = nil
-$ipv6lib = nil
-$ipv6libdir = nil
-$ipv6trylibc = nil
-if $ipv6
-Fatal: no #$ipv6lib library found. cannot continue.
-You need to fetch lib#{$ipv6lib}.a from appropriate
-ipv6 kit and compile beforehand.
+if ipv6
- ipv6lib = nil
- class << (fmt = “unknown”)
- def %(s) s || self end
- end
- idirs, ldirs = dir_config(“inet6”, %w[/usr/inet6 /usr/local/v6].find
{|d| File.directory?(d)})
- checking_for(“ipv6 type”, fmt) do
- if have_macro(“IPV6_INRIA_VERSION”, “netinet/in.h”)
-
"inria"
- elsif have_macro(“KAME”, “netinet/in.h”)
-
have_library(ipv6lib = "inet6")
-
"kame"
- elsif have_macro("_TOSHIBA_INET6", “sys/param.h”)
-
have_library(ipv6lib = "inet6") and "toshiba"
- elsif have_macro(“V6D”, “sys/v6config.h”)
-
have_library(ipv6lib = "v6") and "v6d"
- elsif have_macro("_ZETA_MINAMI_INET6", “sys/param.h”)
-
have_library(ipv6lib = "inet6") and "zeta"
- elsif ipv6lib = with_config(“ipv6-lib”)
-
warn <<EOS
±-with-ipv6-lib and --with-ipv6-libdir option will be obsolete, use
±-with-inet6lib and --with-inet6-{include,lib} options instead.
EOS
- end or not ipv6lib or abort <<EOS
-
+Fatal: no #{ipv6lib} library found. cannot continue.
+You need to fetch lib#{ipv6lib}.a from appropriate
+ipv6 kit and compile beforehand.
+EOS
end
@@ -220,5 +202,5 @@ main()
EOF
end
-if $ipv6 and not getaddr_info_ok
+if ipv6 and not getaddr_info_ok
abort <<EOS
Index: ext/socket/socket.c
RCS file: /cvs/ruby/src/ruby/ext/socket/socket.c,v
retrieving revision 1.159
diff -p -U2 -r1.159 socket.c
— ext/socket/socket.c 3 Feb 2006 09:15:38 -0000 1.159
+++ ext/socket/socket.c 13 Feb 2006 23:58:39 -0000
@@ -2097,5 +2097,5 @@ sock_s_socketpair(klass, domain, type, p
VALUE klass, domain, type, protocol;
{
-#if !defined(_WIN32) && !defined(BEOS) && !defined(EMX) &&
!defined(QNXNTO)
+#if defined HAVE_SOCKETPAIR
int d, t, sp[2];
Index: ext/zlib/extconf.rb
RCS file: /cvs/ruby/src/ruby/ext/zlib/extconf.rb,v
retrieving revision 1.3
diff -p -U2 -r1.3 extconf.rb
— ext/zlib/extconf.rb 9 Jan 2006 11:00:40 -0000 1.3
+++ ext/zlib/extconf.rb 21 May 2006 00:13:07 -0000
@@ -55,10 +55,5 @@ if %w’z libz zlib zdll’.find {|z| have_l
defines << “OS_CODE=#{os_code}”
- defines = defines.collect{|d|’ -D’+d}.join
- if $CPPFLAGS then
- $CPPFLAGS += defines
- else
- $CFLAGS += defines
- end
-
$defs.concat(defines.collect{|d|’ -D’+d})
create_makefile(‘zlib’)
Index: lib/mkmf.rb
===================================================================
RCS file: /cvs/ruby/src/ruby/lib/mkmf.rb,v
retrieving revision 1.238
diff -p -U2 -r1.238 mkmf.rb
— lib/mkmf.rb 17 May 2006 15:41:32 -0000 1.238
+++ lib/mkmf.rb 21 May 2006 00:40:13 -0000
@@ -274,13 +274,11 @@ end
def cc_command(opt="")
#{CONFTEST_C}",
$srcdir.quote))
end
def cpp_command(outfile, opt="")
$srcdir.quote))
end
@@ -829,18 +827,25 @@ end
def create_header(header = “extconf.h”)
message “creating %s\n”, header
- unless $defs.empty?
sym = header.tr(“a-z./\055”, “A-Z___”)
- open(header, “w”) do |hfile|
-
hfile.print "#ifndef #{sym}\n#define #{sym}\n"
-
for line in $defs
- case line
- when /^-D([^=]+)(?:=(.*))?/
-
hfile.print "#define #$1 #{$2 || 1}\n"
- when /^-U(.*)/
-
hfile.print "#undef #$1\n"
- end
-
hfile.print "#endif\n"
end
- $extconf_h = header
end
end
@@ -952,4 +957,5 @@ VPATH = #{vpath.join(CONFIG['PATH_SEPARA
sep = “”
end
- extconf_h = $extconf_h ? “-DRUBY_EXTCONF_H=\”#{$extconf_h}\" " :
“”
mk << %{
CC = #{CONFIG[‘CC’]}
@@ -961,5 +967,6 @@ LIBRUBYARG_STATIC = #$LIBRUBYARG_STATIC
CFLAGS = #{CONFIG[‘CCDLFLAGS’] unless $static} #$CFLAGS #$ARCH_FLAG
-CPPFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir) #{$defs.join(" ")}
#{$CPPFLAGS}
+INCFLAGS = -I. #$INCFLAGS
+CPPFLAGS = #{extconf_h}#{$CPPFLAGS}
CXXFLAGS = $(CFLAGS) #{CONFIG[‘CXXFLAGS’]}
DLDFLAGS = #$LDFLAGS #$DLDFLAGS #$ARCH_FLAG
@@ -1064,4 +1071,8 @@ def create_makefile(target, srcprefix =
end
- unless $extconf_h
- create_header
- end
- libpath = libpathflag(libpath)
@@ -1260,4 +1271,5 @@ site-install-rb: install-rb
end
headers << $config_h if $config_h
- headers << $extconf_h if $extconf_h
mfile.print "$(OBJS): ", headers.join(’ '), “\n”
end
@@ -1273,9 +1285,10 @@ def init_mkmf(config = CONFIG)
$enable_shared = config[‘ENABLE_SHARED’] == ‘yes’
$defs = []
- $extconf_h = nil
$CFLAGS = with_config(“cflags”, arg_config(“CFLAGS”,
config[“CFLAGS”])).dup
$ARCH_FLAG = with_config(“arch_flag”, arg_config(“ARCH_FLAG”,
config[“ARCH_FLAG”])).dup
$CPPFLAGS = with_config(“cppflags”, arg_config(“CPPFLAGS”,
config[“CPPFLAGS”])).dup
$LDFLAGS = (with_config(“ldflags”) || “”).dup
- $INCFLAGS = “-I$(topdir)”
- $INCFLAGS = “-I$(topdir) -I$(hdrdir) -I$(srcdir)”
$DLDFLAGS = with_config(“dldflags”, arg_config(“DLDFLAGS”,
config[“DLDFLAGS”])).dup
$LIBEXT = config[‘LIBEXT’].dup
@@ -1368,8 +1381,8 @@ COMMON_LIBS = config_string('COMMON_LIBS
COMPILE_RULES = config_string(‘COMPILE_RULES’, &split) || %w[.%s.%s:]
RULE_SUBST = config_string(‘RULE_SUBST’)
-COMPILE_C = config_string(‘COMPILE_C’) || ‘$(CC) $(CFLAGS) $(CPPFLAGS)
-c $<’
-COMPILE_CXX = config_string(‘COMPILE_CXX’) || ‘$(CXX) $(CXXFLAGS)
$(CPPFLAGS) -c $<’
+COMPILE_C = config_string(‘COMPILE_C’) || ‘$(CC) -c $(INCFLAGS)
$(CPPFLAGS) $(CFLAGS) $<’
+COMPILE_CXX = config_string(‘COMPILE_CXX’) || ‘$(CXX) -c $(INCFLAGS)
$(CPPFLAGS) $(CXXFLAGS) $<’
TRY_LINK = config_string(‘TRY_LINK’) ||
- "$(CC) #{OUTFLAG}conftest $(INCFLAGS) -I$(hdrdir) $(CPPFLAGS) " \
- "$(CC) #{OUTFLAG}conftest $(INCFLAGS) $(CPPFLAGS) "
“$(CFLAGS) $(src) $(LIBPATH) $(LDFLAGS) $(ARCH_FLAG) $(LOCAL_LIBS)
$(LIBS)”
LINK_SO = config_string(‘LINK_SO’) ||
@@ -1390,5 +1403,5 @@ clean:
distclean: clean