[前][次][番号順一覧][スレッド一覧]

ruby-changes:40615

From: naruse <ko1@a...>
Date: Sat, 21 Nov 2015 13:36:07 +0900 (JST)
Subject: [ruby-changes:40615] naruse:r52694 (trunk): * ext/digest/*/*.[ch]: include ruby.h before digest.h to avoid

naruse	2015-11-21 13:35:57 +0900 (Sat, 21 Nov 2015)

  New Revision: 52694

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52694

  Log:
    * ext/digest/*/*.[ch]: include ruby.h before digest.h to avoid
      includeing ext/digest/extconf.h. [Bug #3231]
      https://msdn.microsoft.com/library/36k2cdd4.aspx
    
    * ext/digest/*/extconf.rb: remove ext/digest from include search path
      to avoid confusion of cl.exe.
    
    * ext/digest/*/*.[ch]: explicitly specify def.h's path.

  Modified files:
    trunk/ChangeLog
    trunk/ext/digest/bubblebabble/bubblebabble.c
    trunk/ext/digest/bubblebabble/extconf.rb
    trunk/ext/digest/md5/extconf.rb
    trunk/ext/digest/md5/md5.h
    trunk/ext/digest/md5/md5init.c
    trunk/ext/digest/rmd160/extconf.rb
    trunk/ext/digest/rmd160/rmd160.h
    trunk/ext/digest/rmd160/rmd160init.c
    trunk/ext/digest/sha1/extconf.rb
    trunk/ext/digest/sha1/sha1.h
    trunk/ext/digest/sha1/sha1init.c
    trunk/ext/digest/sha2/extconf.rb
    trunk/ext/digest/sha2/sha2.c
    trunk/ext/digest/sha2/sha2init.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 52693)
+++ ChangeLog	(revision 52694)
@@ -1,3 +1,14 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Nov 21 13:31:52 2015  NARUSE, Yui  <naruse@r...>
+
+	* ext/digest/*/*.[ch]: include ruby.h before digest.h to avoid
+	  includeing ext/digest/extconf.h. [Bug #3231]
+	  https://msdn.microsoft.com/library/36k2cdd4.aspx
+
+	* ext/digest/*/extconf.rb: remove ext/digest from include search path
+	  to avoid confusion of cl.exe.
+
+	* ext/digest/*/*.[ch]: explicitly specify def.h's path.
+
 Sat Nov 21 13:05:16 2015  NARUSE, Yui  <naruse@r...>
 
 	* ext/openssl/ossl.h: LibreSSL doesn't have and need e_os2.h.
Index: ext/digest/bubblebabble/bubblebabble.c
===================================================================
--- ext/digest/bubblebabble/bubblebabble.c	(revision 52693)
+++ ext/digest/bubblebabble/bubblebabble.c	(revision 52694)
@@ -11,8 +11,8 @@ https://github.com/ruby/ruby/blob/trunk/ext/digest/bubblebabble/bubblebabble.c#L11
 
 ************************************************/
 
-#include "ruby.h"
-#include "digest.h"
+#include <ruby/ruby.h>
+#include "../digest.h"
 
 static ID id_digest;
 
Index: ext/digest/bubblebabble/extconf.rb
===================================================================
--- ext/digest/bubblebabble/extconf.rb	(revision 52693)
+++ ext/digest/bubblebabble/extconf.rb	(revision 52694)
@@ -1,6 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/ext/digest/bubblebabble/extconf.rb#L1
 require 'mkmf'
 
 $defs << "-DHAVE_CONFIG_H"
-$INCFLAGS << " -I$(srcdir)/.."
 
 create_makefile('digest/bubblebabble')
Index: ext/digest/md5/extconf.rb
===================================================================
--- ext/digest/md5/extconf.rb	(revision 52693)
+++ ext/digest/md5/extconf.rb	(revision 52694)
@@ -6,7 +6,6 @@ require "mkmf" https://github.com/ruby/ruby/blob/trunk/ext/digest/md5/extconf.rb#L6
 require File.expand_path("../../digest_conf", __FILE__)
 
 $defs << "-DHAVE_CONFIG_H"
-$INCFLAGS << " -I$(srcdir)/.."
 
 $objs = [ "md5init.#{$OBJEXT}" ]
 
Index: ext/digest/md5/md5init.c
===================================================================
--- ext/digest/md5/md5init.c	(revision 52693)
+++ ext/digest/md5/md5init.c	(revision 52694)
@@ -1,7 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ext/digest/md5/md5init.c#L1
 /* $RoughId: md5init.c,v 1.2 2001/07/13 19:49:10 knu Exp $ */
 /* $Id$ */
 
-#include "digest.h"
+#include <ruby/ruby.h>
+#include "../digest.h"
 #if defined(MD5_USE_OPENSSL)
 #include "md5ossl.h"
 #elif defined(MD5_USE_COMMONDIGEST)
Index: ext/digest/md5/md5.h
===================================================================
--- ext/digest/md5/md5.h	(revision 52693)
+++ ext/digest/md5/md5.h	(revision 52694)
@@ -46,7 +46,7 @@ https://github.com/ruby/ruby/blob/trunk/ext/digest/md5/md5.h#L46
 #ifndef MD5_INCLUDED
 #  define MD5_INCLUDED
 
-#include "defs.h"
+#include "../defs.h"
 
 /*
  * This code has some adaptations for the Ghostscript environment, but it
Index: ext/digest/rmd160/rmd160.h
===================================================================
--- ext/digest/rmd160/rmd160.h	(revision 52693)
+++ ext/digest/rmd160/rmd160.h	(revision 52694)
@@ -26,7 +26,7 @@ https://github.com/ruby/ruby/blob/trunk/ext/digest/rmd160/rmd160.h#L26
 #ifndef _RMD160_H_
 #define _RMD160_H_
 
-#include "defs.h"
+#include "../defs.h"
 
 typedef struct {
 	uint32_t	state[5];	/* state (ABCDE) */
Index: ext/digest/rmd160/extconf.rb
===================================================================
--- ext/digest/rmd160/extconf.rb	(revision 52693)
+++ ext/digest/rmd160/extconf.rb	(revision 52694)
@@ -6,7 +6,6 @@ require "mkmf" https://github.com/ruby/ruby/blob/trunk/ext/digest/rmd160/extconf.rb#L6
 require File.expand_path("../../digest_conf", __FILE__)
 
 $defs << "-DNDEBUG" << "-DHAVE_CONFIG_H"
-$INCFLAGS << " -I$(srcdir)/.."
 
 $objs = [ "rmd160init.#{$OBJEXT}" ]
 
Index: ext/digest/rmd160/rmd160init.c
===================================================================
--- ext/digest/rmd160/rmd160init.c	(revision 52693)
+++ ext/digest/rmd160/rmd160init.c	(revision 52694)
@@ -1,7 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ext/digest/rmd160/rmd160init.c#L1
 /* $RoughId: rmd160init.c,v 1.3 2001/07/13 20:00:43 knu Exp $ */
 /* $Id$ */
 
-#include "digest.h"
+#include <ruby/ruby.h>
+#include "../digest.h"
 #if defined(RMD160_USE_OPENSSL)
 #include "rmd160ossl.h"
 #else
Index: ext/digest/sha1/sha1init.c
===================================================================
--- ext/digest/sha1/sha1init.c	(revision 52693)
+++ ext/digest/sha1/sha1init.c	(revision 52694)
@@ -1,7 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ext/digest/sha1/sha1init.c#L1
 /* $RoughId: sha1init.c,v 1.2 2001/07/13 19:49:10 knu Exp $ */
 /* $Id$ */
 
-#include "digest.h"
+#include <ruby/ruby.h>
+#include "../digest.h"
 #if defined(SHA1_USE_OPENSSL)
 #include "sha1ossl.h"
 #elif defined(SHA1_USE_COMMONDIGEST)
Index: ext/digest/sha1/sha1.h
===================================================================
--- ext/digest/sha1/sha1.h	(revision 52693)
+++ ext/digest/sha1/sha1.h	(revision 52694)
@@ -11,7 +11,7 @@ https://github.com/ruby/ruby/blob/trunk/ext/digest/sha1/sha1.h#L11
 #ifndef _SYS_SHA1_H_
 #define	_SYS_SHA1_H_
 
-#include "defs.h"
+#include "../defs.h"
 
 typedef struct {
 	uint32_t state[5];
Index: ext/digest/sha1/extconf.rb
===================================================================
--- ext/digest/sha1/extconf.rb	(revision 52693)
+++ ext/digest/sha1/extconf.rb	(revision 52694)
@@ -6,7 +6,6 @@ require "mkmf" https://github.com/ruby/ruby/blob/trunk/ext/digest/sha1/extconf.rb#L6
 require File.expand_path("../../digest_conf", __FILE__)
 
 $defs << "-DHAVE_CONFIG_H"
-$INCFLAGS << " -I$(srcdir)/.."
 
 $objs = [ "sha1init.#{$OBJEXT}" ]
 
Index: ext/digest/sha2/sha2init.c
===================================================================
--- ext/digest/sha2/sha2init.c	(revision 52693)
+++ ext/digest/sha2/sha2init.c	(revision 52694)
@@ -1,7 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ext/digest/sha2/sha2init.c#L1
 /* $RoughId: sha2init.c,v 1.3 2001/07/13 20:00:43 knu Exp $ */
 /* $Id$ */
 
-#include "digest.h"
+#include <ruby/ruby.h>
+#include "../digest.h"
 #if defined(SHA2_USE_OPENSSL)
 #include "sha2ossl.h"
 #elif defined(SHA2_USE_COMMONDIGEST)
Index: ext/digest/sha2/extconf.rb
===================================================================
--- ext/digest/sha2/extconf.rb	(revision 52693)
+++ ext/digest/sha2/extconf.rb	(revision 52694)
@@ -6,7 +6,6 @@ require "mkmf" https://github.com/ruby/ruby/blob/trunk/ext/digest/sha2/extconf.rb#L6
 require File.expand_path("../../digest_conf", __FILE__)
 
 $defs << "-DHAVE_CONFIG_H"
-$INCFLAGS << " -I$(srcdir)/.."
 
 $objs = [ "sha2init.#{$OBJEXT}" ]
 
@@ -18,6 +17,4 @@ have_header("sys/cdefs.h") https://github.com/ruby/ruby/blob/trunk/ext/digest/sha2/extconf.rb#L17
 
 $preload = %w[digest]
 
-if have_type("uint64_t", "defs.h", $defs.join(' '))
-  create_makefile("digest/sha2")
-end
+create_makefile("digest/sha2")
Index: ext/digest/sha2/sha2.c
===================================================================
--- ext/digest/sha2/sha2.c	(revision 52693)
+++ ext/digest/sha2/sha2.c	(revision 52694)
@@ -34,7 +34,7 @@ https://github.com/ruby/ruby/blob/trunk/ext/digest/sha2/sha2.c#L34
  * $Id$
  */
 
-#include "defs.h"
+#include "../defs.h"
 #include <string.h>	/* memcpy()/memset() or bcopy()/bzero() */
 #include <assert.h>	/* assert() */
 #include "sha2.h"

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]