Create header (Re: Re: ossl_cipher.c:124: warning: control


#1

e$B$J$+$@$G$9!#e(B

06/05/11 e$B$Ke(B Tanaka A.removed_email_address@domain.invalid e$B$5$s$O=q$-$^$7$?e(B:

e$B$&$%$`!#9T$,@Z$l$F$7$^$C$?!#e(B

e$B$=$&$$$($P!"$3$N!"%3%^%s%I%i%$%s0z?t$Ke(B HAVE_XXX e$B$H$$$&%^%/%me(B
e$B$r$D$1$k!"$H$$$&$N$O$J$s$G$J$s$G$7$g$&e(B?

e$B$=$l$,!"B>$N%3!<%I$h$j$bI,$:@h$KDj5A$5$l$k0lHV3N<B$JJ}K!$@$+$i$G$9!#e(B

e$B>o$K%U%!%$%k$KJ]B8$9$k$h$&$K$7$?$[$&$,!">r7o$,JQ$o$C$?$H$-$K:F%3%s%Q%$%k$5$l$F$&$l$7$$$+$b$7$l$^$;$s!#e(B

  • ruby.h, ext/extmk.rb, lib/mkmf.rb: always create extconf header, and
    include.

  • ext/readline/readline.c: include ruby.h before HAVE_* macros.

Index: ruby.h

RCS file: /pub/cvs/ruby/src/ruby/ruby.h,v
retrieving revision 1.134
diff -U 2 -p -r1.134 ruby.h
— ruby.h 2 Mar 2006 05:22:30 -0000 1.134
+++ ruby.h 18 May 2006 01:32:25 -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: /pub/cvs/ruby/src/ruby/ext/extmk.rb,v
retrieving revision 1.88
diff -U 2 -p -r1.88 extmk.rb
— ext/extmk.rb 17 May 2006 15:41:31 -0000 1.88
+++ ext/extmk.rb 18 May 2006 01:32:25 -0000
@@ -125,4 +125,5 @@ def extmake(target)
begin
if (!(ok &&= extract_makefile(makefile)) ||

  •   !$extconf_h || !File.exist?($extconf_h) ||
      !(t = modified?(makefile, MTIMES)) ||
           %W"#{$srcdir}/makefile.rb #{$srcdir}/extconf.rb
    

#{$srcdir}/depend".any? {|f| modified?(f, [t])})
Index: ext/readline/readline.c

RCS file: /pub/cvs/ruby/src/ruby/ext/readline/readline.c,v
retrieving revision 1.27
diff -U 2 -p -r1.27 readline.c
— ext/readline/readline.c 24 Sep 2005 00:17:43 -0000 1.27
+++ ext/readline/readline.c 18 May 2006 01:32:25 -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: lib/mkmf.rb

RCS file: /pub/cvs/ruby/src/ruby/lib/mkmf.rb,v
retrieving revision 1.238
diff -U 2 -p -r1.238 mkmf.rb
— lib/mkmf.rb 17 May 2006 15:41:32 -0000 1.238
+++ lib/mkmf.rb 18 May 2006 01:33:44 -0000
@@ -829,19 +829,24 @@ end
def create_header(header = “extconf.h”)
message “creating %s\n”, header

  • if $defs.length > 0
  • 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
  •  end
    
  •  hfile.print "#endif\n"
    
  • sym = header.tr(“a-z./\055”, “A-Z___”)
  • hdr = ["#ifndef #{sym}\n#define #{sym}\n"]
  • for line in $defs
  • case line
  • when /^-D([^=]+)(?:=(.*))?/
  •  hdr << "#define #$1 #{$2 ? Shellwords.shellwords($2)[0] : 1}\n"
    
  • when /^-U(.*)/
  •  hdr << "#undef #$1\n"
    
  • end
  • end
  • hdr << “#endif\n”
  • hdr = hdr.join
  • open(header, “r+”) do |hfile|
  • unless hfile.read == hdr
  •  hfile.rewind
    
  •  hfile.truncate(0)
    
  •  hfile.write(hdr)
    
    end
    end
  • $extconf_h = header
    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,5 @@ LIBRUBYARG_STATIC = #$LIBRUBYARG_STATIC

CFLAGS = #{CONFIG[‘CCDLFLAGS’] unless $static} #$CFLAGS #$ARCH_FLAG
-CPPFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir) #{$defs.join(" ")}
#{$CPPFLAGS}
+CPPFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir)
#{extconf_h}#{$CPPFLAGS}
CXXFLAGS = $(CFLAGS) #{CONFIG[‘CXXFLAGS’]}
DLDFLAGS = #$LDFLAGS #$DLDFLAGS #$ARCH_FLAG
@@ -1064,4 +1070,8 @@ def create_makefile(target, srcprefix =
end

  • unless $extconf_h
  • create_header
  • end
  • libpath = libpathflag(libpath)

@@ -1260,4 +1270,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,4 +1284,5 @@ 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
    @@ -1390,5 +1402,5 @@ clean:

distclean: clean

  •   @-$(RM) Makefile extconf.h conftest.* mkmf.log
    
  •   @-$(RM) Makefile #{$extconf_h} conftest.* mkmf.log
      @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES#{sep})

#2

In article
removed_email_address@domain.invalid,
“Nobuyoshi N.” removed_email_address@domain.invalid writes:

e$B$=$l$,!"B>$N%3!<%I$h$j$bI,$:@h$KDj5A$5$l$k0lHV3N<B$JJ}K!$@$+$i$G$9!#e(B

e$B$^$!!"$?$7$+$K$=$&$G$O$"$j$^$9$,!#e(B

e$B>o$K%U%!%$%k$KJ]B8$9$k$h$&$K$7$?$[$&$,!">r7o$,JQ$o$C$?$H$-$K:F%3%s%Q%$%k$5$l$F$&$l$7$$$+$b$7$l$^$;$s!#e(B

e$B;n$7$F$_$^$7$?!#e(B

e$B%Q%C%A$r$-$l$$$KEv$F$k$K$Oe(B 3e$B9Te(B fold
e$B$5$l$F$?$N$r=$@5$9$kI,MWe(B
e$B$,$"$j$^$7$?$,!"$=$l$O$=$l$H$7$Fe(B make e$B$9$k$He(B bigdecimal
e$B$N$He(B
e$B$3$m$Ge(B

Index: lib/mkmf.rb

  • open(header, “r+”) do |hfile|

e$B$,e(B Errno::ENOENT e$B$K$J$j$^$7$?$N$G!"$H$j$"$($:e(B w+
e$B$K$7$^$7$?!#e(B

e$B$=$&$9$k$H!"e(Binstall e$B$^$G$O$$$/$N$G$9$,!"e(Bcheck e$B$Ge(B
digest/md5
e$B$re(Brequire e$B$9$k$N$K<:GT$7$^$9!#e(B

% ./ruby -v -rdigest/md5 -e ‘’
ruby 1.9.0 (2006-05-18) [i686-linux]
/tmp/b/lib/ruby/1.9/i686-linux/digest/md5.so:
/tmp/b/lib/ruby/1.9/i686-linux/digest/md5.so: undefined symbol:
rb_Digest_MD5_Init - /tmp/b/lib/ruby/1.9/i686-linux/digest/md5.so
(LoadError)

e$B$I$&$d$i!"e(B

gcc -fPIC -g -O2 -DHAVE_CONFIG_H -I…/…/…/./ext/digest/md5/… -I.
-I…/…/… -I…/…/…/. -I…/…/…/./ext/digest/md5
-DRUBY_EXTCONF_H=“extconf.h” -c md5init.c
gcc -fPIC -g -O2 -DHAVE_CONFIG_H -I…/…/…/./ext/digest/md5/… -I.
-I…/…/… -I…/…/…/. -I…/…/…/./ext/digest/md5
-DRUBY_EXTCONF_H=“extconf.h” -c md5ossl.c

e$B$H$$$&$h$&%3%s%Q%$%k$7$F!“e(Bopenssl e$B$r;H$*$&$HH=CG$7$Fe(B
md5ossl.c
e$B$r;H$C$?$,!“e(Bmd5init.c e$B$r%3%s%Q%$%k$7$?;~$Ke(B
-I…/…/…/./ext/digest/md5/… e$B$,e(B -I. e$B$h$j@h$K$”$k$N$Ge(B
digest/md5/extconf.h e$B$G$J$/e(B digest/extconf.h e$B$rFI$s$@$”$2$/e(B
e$B$K$=$3$K$Oe(B HAVE_OPENSSL_MD5_H e$B$,$J$$$N$GLdBj$,5/$3$k!"$H$$$&e(B
e$B$3$H$N$h$&$G$9!#$&$%$`!#e(B


#3

e$B$J$+$@$G$9!#e(B

06/05/21 e$B$Ke(B removed_email_address@domain.invalidremoved_email_address@domain.invalid
e$B$5$s$O=q$-$^$7$?e(B:

-CPPFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir) #{$defs.join(" ")} #{$CPPFLAGS}
+INCFLAGS = -I. #$INCFLAGS
+CPPFLAGS = #{extconf_h}#{$CPPFLAGS}

link_commande$B$de(Bcc_commande$B$J$I$K$"$o$;$Fe(B$(INCFLAGS)e$B$rJ,N%$7$?$s$G$9$,!"e(B*/Makefile.sube$B$rK:$l$F$^$7$?!#e(B

e$B$H$$$&$+$b$H$b$H$,$=$C$A$rJ,N%$9$k$?$a$Ne(B$(COMPILE_C)e$B$J$N$K!#e(B

e$B$9$$$^$;$s$,e(B
ruby -pi -e ‘$_.sub!(/s,@COMPILE_C(XX)?@,$$([A-Z]+)/){"#$&
$$(INCFLAGS)"}’ */Makefile.sub
e$B$7$F$/$@$5$$!#e(B


#4

In article removed_email_address@domain.invalid,
“Nobuyoshi N.” removed_email_address@domain.invalid writes:

ruby -pi -e ‘$_.sub!(/s,@COMPILE_C(XX)?@,$$([A-Z]+)/){"#$&
$$(INCFLAGS)"}’ */Makefile.sub
e$B$7$F$/$@$5$$!#e(B

e$B$d$C$F$_$^$7$?!#e(B

e$B$9$k$H!"e(Bmake check e$B$GLdBj$,=P$^$7$?!#$A$g$C$H9J$k$He(B openssl
e$B$N$H$3$m$Ge(B

% ./ruby test/runner.rb -v test/openssl
Loaded suite openssl
Started
test_decode(OpenSSL::TestASN1): .

test_parallel(OpenSSL::TestSSL): *** glibc detected *** double free or
corruption (!prev): 0x082c4558 ***

e$B$H$J$C$F!"D4$Y$F$_$k$He(B openssl_missing.c e$B$Oe(B ruby.h e$B$re(B
include e$B$7$F$$$J$$$N$,860x$N$h$&$G$9!#e(B

extconf.h e$B$re(B include e$B$9$k$h$&$K$7$?$iLdBj$J$/$J$j$^$7$?!#e(B


#5

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)) ||

  •   !$extconf_h || !File.exist?($extconf_h) ||
      !(t = modified?(makefile, MTIMES)) ||
           %W"#{$srcdir}/makefile.rb #{$srcdir}/extconf.rb 
    

#{$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

  • if have_macro(“IPV6_INRIA_VERSION”, “netinet/in.h”)
  • $ipv6type = “inria”
  • $CPPFLAGS="-DINET6 "+$CPPFLAGS
  • elsif have_macro(“KAME”, “netinet/in.h”)
  • $ipv6type = “kame”
  • $ipv6lib=“inet6”
  • $ipv6libdir="/usr/local/v6/lib"
  • $ipv6trylibc=true
  • $CPPFLAGS="-DINET6 "+$CPPFLAGS
  • elsif File.directory? “/usr/inet6”
  • $ipv6type = “linux”
  • $ipv6lib=“inet6”
  • $ipv6libdir="/usr/inet6/lib"
  • $CPPFLAGS="-DINET6 -I/usr/inet6/include "+$CPPFLAGS
  • elsif have_macro("_TOSHIBA_INET6", “sys/param.h”)
  • $ipv6type = “toshiba”
  • $ipv6lib=“inet6”
  • $ipv6libdir="/usr/local/v6/lib"
  • $CPPFLAGS="-DINET6 "+$CPPFLAGS
  • elsif have_macro(“V6D”, “/usr/local/v6/include/sys/v6config.h”)
  • $ipv6type = “v6d”
  • $ipv6lib=“v6”
  • $ipv6libdir="/usr/local/v6/lib"
  • $CFLAGS="-I/usr/local/v6/include "+$CFLAGS
  • $CPPFLAGS="-DINET6 "+$CPPFLAGS
  • elsif have_macro("_ZETA_MINAMI_INET6", “sys/param.h”)
  • $ipv6type = “zeta”
  • $ipv6lib=“inet6”
  • $ipv6libdir="/usr/local/v6/lib"
  • $CPPFLAGS="-DINET6 "+$CPPFLAGS
  • else
  • $ipv6lib=with_config(“ipv6-lib”, nil)
  • $ipv6libdir=with_config(“ipv6-libdir”, nil)
  • $CPPFLAGS="-DINET6 "+$CPPFLAGS
  • end
  • if $ipv6lib
  • if File.directory? $ipv6libdir and File.exist?
    “#{$ipv6libdir}/lib#{$ipv6lib}.a”
  •  $LOCAL_LIBS = " -L#$ipv6libdir -l#$ipv6lib"
    
  • elsif !$ipv6trylibc
  •  abort <<EOS
    

-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

  •  find_library(ipv6lib, nil, with_config("ipv6-libdir", ldirs)) and
    
  •    ipv6lib
    
  • elsif have_library(“inet6”)
  •  "inet6"
    
    end
  • end
  • 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="")

  • RbConfig::expand("$(CC) -c #$INCFLAGS -I$(hdrdir) " \
  •             "#$CPPFLAGS #$CFLAGS #$ARCH_FLAG #{opt} 
    

#{CONFTEST_C}",

  •    CONFIG.merge('hdrdir' => $hdrdir.quote))
    
  • RbConfig::expand("$(CC) -c #$INCFLAGS #$CPPFLAGS #$CFLAGS #$ARCH_FLAG
    #{opt} #{CONFTEST_C}",
  •      CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => 
    

$srcdir.quote))
end

def cpp_command(outfile, opt="")

  • RbConfig::expand("$(CPP) #$INCFLAGS -I$(hdrdir) " \
  •             "#$CPPFLAGS #$CFLAGS #{opt} #{CONFTEST_C} #{outfile}",
    
  •    CONFIG.merge('hdrdir' => $hdrdir.quote))
    
  • RbConfig::expand("$(CPP) #$INCFLAGS #$CPPFLAGS #$CFLAGS #{opt}
    #{CONFTEST_C} #{outfile}",
  •      CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => 
    

$srcdir.quote))
end

@@ -829,18 +827,25 @@ end
def create_header(header = “extconf.h”)
message “creating %s\n”, header

  • if $defs.length > 0
  • 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
  • hdr = ["#ifndef #{sym}\n#define #{sym}\n"]
  • for line in $defs
  •  case line
    
  •  when /^-D([^=]+)(?:=(.*))?/
    
  • hdr << “#define #$1 #{$2 ? Shellwords.shellwords($2)[0] : 1}\n”
  •  when /^-U(.*)/
    
  • hdr << “#undef #$1\n”
  •  end
    
  • end
  • hdr << “#endif\n”
  • hdr = hdr.join
  • open(header, “w+”) do |hfile|
  •  unless hfile.read == hdr
    
  • hfile.rewind
  • hfile.truncate(0)
  • hfile.write(hdr)
    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

  •   @-$(RM) Makefile extconf.h conftest.* mkmf.log
    
  •   @-$(RM) Makefile #{$extconf_h} conftest.* mkmf.log
      @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES#{sep})

#6

e$B$J$+$@$G$9!#e(B

06/05/30 e$B$Ke(B Tanaka A.removed_email_address@domain.invalid
e$B$5$s$O=q$-$^$7$?e(B:

In article removed_email_address@domain.invalid,
“Nobuyoshi N.” removed_email_address@domain.invalid writes:
e$B$J$s$+F~$C$?$h$&$G$9$,!"$"$H$Oe(B ext/openssl e$BB&$G$NBP=h$rK>$`!"e(B
e$B$H$$$&46$8$G$9$+e(B?

e$B$H$j$"$($:!“0JA0$N$^$^$@$He(Bcreate_headere$B$7$F$bA4It%3%^%s%I%i%$%se(B
e$B$G$bEO$7$F$$$?$N$G!”%X%C%@$r:n$C$?$H$-$K$OEO$5$J$$$h$&$K$7$^$7e(B
e$B$?!#e(B

ruby.he$B$+$iFI$`$h$&$K$9$k$N$O%X%C%@$N=g=x$K0MB8$9$k$N$G!"$9$Y$Fe(B
e$B$N3HD%%i%$%V%i%j$K6/@)$9$k$N$O!"$A$g$C$H$?$a$i$o$l$^$9!#e(B
extmk.rbe$B$+$i<B9T$7$?>l9g$@$1$/$i$$$,$$$$$+$b$7$l$^$;$s!#e(B

e$B$H$J$C$F!"D4$Y$F$_$k$He(B openssl_missing.c e$B$Oe(B ruby.h e$B$re(B
include e$B$7$F$$$J$$$N$,860x$N$h$&$G$9!#e(B

openssl_missing.ce$B$@$1$G$J$/!“e(Bossl.he$B$Oe(Bruby.he$B$re(Bincludee$B$9$kA0$Ke(B
HAVE_*e$B%^%/%m$r;H$C$F$$$k$N$G!”$=$NA0$Ke(Bincludee$B$7$J$1$j$c$$$1$J$$e(B
e$B$h$&$J5$$,$7$^$9!#e(B


#7

In article
removed_email_address@domain.invalid,
“Nobuyoshi N.” removed_email_address@domain.invalid writes:

e$B$H$j$"$($:!“0JA0$N$^$^$@$He(Bcreate_headere$B$7$F$bA4It%3%^%s%I%i%$%se(B
e$B$G$bEO$7$F$$$?$N$G!”%X%C%@$r:n$C$?$H$-$K$OEO$5$J$$$h$&$K$7$^$7e(B
e$B$?!#e(B

ruby.he$B$+$iFI$`$h$&$K$9$k$N$O%X%C%@$N=g=x$K0MB8$9$k$N$G!"$9$Y$Fe(B
e$B$N3HD%%i%$%V%i%j$K6/@)$9$k$N$O!"$A$g$C$H$?$a$i$o$l$^$9!#e(B
extmk.rbe$B$+$i<B9T$7$?>l9g$@$1$/$i$$$,$$$$$+$b$7$l$^$;$s!#e(B

e$B;d$Oe(B ruby.h e$B$+$iFI$`$H$$$&$N$O9M$($F$^$;$s$G$7$?$,!“FI$a$PFIe(B
e$B$s$@$GJXMx$J$3$H$bB?$$$G$”$m$&$H$b;W$$$^$9!#e(B

e$B$^$!!“e(Bruby.h e$B$+$ie(B extconf.h
e$B$rFI$s$@$H$7$F$b!”$=$l$H$OJL$Ke(B
extconf.h e$B$rFI$`$3$H$O$G$-$k$N$G!"$"$^$j:$$i$J$$$H$$$&5$$b$7e(B
e$B$^$9!#e(B


#8

In article removed_email_address@domain.invalid,
“Nobuyoshi N.” removed_email_address@domain.invalid writes:

e$B$9$$$^$;$s$,e(B
ruby -pi -e ‘$_.sub!(/s,@COMPILE_C(XX)?@,$$([A-Z]+)/){"#$&
$$(INCFLAGS)"}’ */Makefile.sub
e$B$7$F$/$@$5$$!#e(B

e$B$J$s$+F~$C$?$h$&$G$9$,!"$"$H$Oe(B ext/openssl
e$BB&$G$NBP=h$rK>$`!"e(B
e$B$H$$$&46$8$G$9$+e(B?