# Create header (Re: Re: ossl\_cipher.c:124: warning: control

**URL:** <https://www.ruby-forum.com/t/create-header-re-re-ossl-cipher-c-warning-control/60897>\
**Category:** Development\
**Created:** [May 18, 2006, 11:15am UTC](https://www.ruby-forum.com/t/create-header-re-re-ossl-cipher-c-warning-control/60897 "2006-05-18T11:15:51Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![nobu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/e9c0ed/32.png) [@nobu](https://www.ruby-forum.com/u/nobu)\
**Post date:** [May 18, 2006, 11:15am UTC](https://www.ruby-forum.com/t/create-header-re-re-ossl-cipher-c-warning-control/60897/1 "2006-05-18T11:15:51Z")

</div>

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

06/05/11 e$B$Ke(B Tanaka A.[removed\_email\_address@domain.invalid](mailto: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 (C) 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})

```

---

<div class="post-metadata">

**Author:** ![nobu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/e9c0ed/32.png) [@nobu](https://www.ruby-forum.com/u/nobu)\
**Post date:** [May 20, 2006, 6:55pm UTC](https://www.ruby-forum.com/t/create-header-re-re-ossl-cipher-c-warning-control/60897/2 "2006-05-20T18:55:05Z")

</div>

In article  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid),  
“Nobuyoshi N.” [removed\_email\_address@domain.invalid](mailto: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

---

<div class="post-metadata">

**Author:** ![nobu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/e9c0ed/32.png) [@nobu](https://www.ruby-forum.com/u/nobu)\
**Post date:** [May 22, 2006, 6:32am UTC](https://www.ruby-forum.com/t/create-header-re-re-ossl-cipher-c-warning-control/60897/3 "2006-05-22T06:32:36Z")

</div>

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

06/05/21 e$B$Ke(B removed\_email\_address@domain.invalid[removed\_email\_address@domain.invalid](mailto:removed_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

---

<div class="post-metadata">

**Author:** ![nobu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/e9c0ed/32.png) [@nobu](https://www.ruby-forum.com/u/nobu)\
**Post date:** [May 25, 2006, 7:29am UTC](https://www.ruby-forum.com/t/create-header-re-re-ossl-cipher-c-warning-control/60897/4 "2006-05-25T07:29:51Z")

</div>

In article [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid),  
“Nobuyoshi N.” [removed\_email\_address@domain.invalid](mailto: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

---

<div class="post-metadata">

**Author:** ![nobu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/e9c0ed/32.png) [@nobu](https://www.ruby-forum.com/u/nobu)\
**Post date:** [May 21, 2006, 10:30am UTC](https://www.ruby-forum.com/t/create-header-re-re-ossl-cipher-c-warning-control/60897/5 "2006-05-21T10:30:50Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![nobu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/e9c0ed/32.png) [@nobu](https://www.ruby-forum.com/u/nobu)\
**Post date:** [May 30, 2006, 10:59am UTC](https://www.ruby-forum.com/t/create-header-re-re-ossl-cipher-c-warning-control/60897/6 "2006-05-30T10:59:29Z")

</div>

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

06/05/30 e$B$Ke(B Tanaka A.[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
e$B$5$s$O=q$-$^$7$?e(B:

> In article [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid),  
> “Nobuyoshi N.” [removed\_email\_address@domain.invalid](mailto: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

---

<div class="post-metadata">

**Author:** ![nobu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/e9c0ed/32.png) [@nobu](https://www.ruby-forum.com/u/nobu)\
**Post date:** [June 1, 2006, 7:41pm UTC](https://www.ruby-forum.com/t/create-header-re-re-ossl-cipher-c-warning-control/60897/7 "2006-06-01T19:41:45Z")

</div>

In article  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid),  
“Nobuyoshi N.” [removed\_email\_address@domain.invalid](mailto: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

---

<div class="post-metadata">

**Author:** ![nobu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/e9c0ed/32.png) [@nobu](https://www.ruby-forum.com/u/nobu)\
**Post date:** [May 30, 2006, 4:02am UTC](https://www.ruby-forum.com/t/create-header-re-re-ossl-cipher-c-warning-control/60897/8 "2006-05-30T04:02:25Z")

</div>

In article [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid),  
“Nobuyoshi N.” [removed\_email\_address@domain.invalid](mailto: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?
