From 9a7c25abab65e2a501e05676b6e4e53f0e9ff026 Mon Sep 17 00:00:00 2001 From: naruse Date: Sat, 21 Nov 2015 04:35:57 +0000 Subject: * 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/digest/bubblebabble/bubblebabble.c | 4 ++-- ext/digest/bubblebabble/extconf.rb | 1 - ext/digest/md5/extconf.rb | 1 - ext/digest/md5/md5.h | 2 +- ext/digest/md5/md5init.c | 3 ++- ext/digest/rmd160/extconf.rb | 1 - ext/digest/rmd160/rmd160.h | 2 +- ext/digest/rmd160/rmd160init.c | 3 ++- ext/digest/sha1/extconf.rb | 1 - ext/digest/sha1/sha1.h | 2 +- ext/digest/sha1/sha1init.c | 3 ++- ext/digest/sha2/extconf.rb | 5 +---- ext/digest/sha2/sha2.c | 2 +- ext/digest/sha2/sha2init.c | 3 ++- 14 files changed, 15 insertions(+), 18 deletions(-) (limited to 'ext/digest') diff --git a/ext/digest/bubblebabble/bubblebabble.c b/ext/digest/bubblebabble/bubblebabble.c index 4bccd221b8..4b8263de5a 100644 --- a/ext/digest/bubblebabble/bubblebabble.c +++ b/ext/digest/bubblebabble/bubblebabble.c @@ -11,8 +11,8 @@ ************************************************/ -#include "ruby.h" -#include "digest.h" +#include +#include "../digest.h" static ID id_digest; diff --git a/ext/digest/bubblebabble/extconf.rb b/ext/digest/bubblebabble/extconf.rb index 53cb83934a..1214add293 100644 --- a/ext/digest/bubblebabble/extconf.rb +++ b/ext/digest/bubblebabble/extconf.rb @@ -1,6 +1,5 @@ require 'mkmf' $defs << "-DHAVE_CONFIG_H" -$INCFLAGS << " -I$(srcdir)/.." create_makefile('digest/bubblebabble') diff --git a/ext/digest/md5/extconf.rb b/ext/digest/md5/extconf.rb index 5140325b8f..05a990cdd2 100644 --- a/ext/digest/md5/extconf.rb +++ b/ext/digest/md5/extconf.rb @@ -6,7 +6,6 @@ require "mkmf" require File.expand_path("../../digest_conf", __FILE__) $defs << "-DHAVE_CONFIG_H" -$INCFLAGS << " -I$(srcdir)/.." $objs = [ "md5init.#{$OBJEXT}" ] diff --git a/ext/digest/md5/md5.h b/ext/digest/md5/md5.h index a0faa25e48..1b3383c5ee 100644 --- a/ext/digest/md5/md5.h +++ b/ext/digest/md5/md5.h @@ -46,7 +46,7 @@ #ifndef MD5_INCLUDED # define MD5_INCLUDED -#include "defs.h" +#include "../defs.h" /* * This code has some adaptations for the Ghostscript environment, but it diff --git a/ext/digest/md5/md5init.c b/ext/digest/md5/md5init.c index bcd332d648..a6afedef69 100644 --- a/ext/digest/md5/md5init.c +++ b/ext/digest/md5/md5init.c @@ -1,7 +1,8 @@ /* $RoughId: md5init.c,v 1.2 2001/07/13 19:49:10 knu Exp $ */ /* $Id$ */ -#include "digest.h" +#include +#include "../digest.h" #if defined(MD5_USE_OPENSSL) #include "md5ossl.h" #elif defined(MD5_USE_COMMONDIGEST) diff --git a/ext/digest/rmd160/extconf.rb b/ext/digest/rmd160/extconf.rb index 49c26b0945..15fd095cf2 100644 --- a/ext/digest/rmd160/extconf.rb +++ b/ext/digest/rmd160/extconf.rb @@ -6,7 +6,6 @@ require "mkmf" require File.expand_path("../../digest_conf", __FILE__) $defs << "-DNDEBUG" << "-DHAVE_CONFIG_H" -$INCFLAGS << " -I$(srcdir)/.." $objs = [ "rmd160init.#{$OBJEXT}" ] diff --git a/ext/digest/rmd160/rmd160.h b/ext/digest/rmd160/rmd160.h index 098fa05a88..6324709d96 100644 --- a/ext/digest/rmd160/rmd160.h +++ b/ext/digest/rmd160/rmd160.h @@ -26,7 +26,7 @@ #ifndef _RMD160_H_ #define _RMD160_H_ -#include "defs.h" +#include "../defs.h" typedef struct { uint32_t state[5]; /* state (ABCDE) */ diff --git a/ext/digest/rmd160/rmd160init.c b/ext/digest/rmd160/rmd160init.c index 7aa835ddfc..c1e753cc11 100644 --- a/ext/digest/rmd160/rmd160init.c +++ b/ext/digest/rmd160/rmd160init.c @@ -1,7 +1,8 @@ /* $RoughId: rmd160init.c,v 1.3 2001/07/13 20:00:43 knu Exp $ */ /* $Id$ */ -#include "digest.h" +#include +#include "../digest.h" #if defined(RMD160_USE_OPENSSL) #include "rmd160ossl.h" #else diff --git a/ext/digest/sha1/extconf.rb b/ext/digest/sha1/extconf.rb index 7528fb2de3..84690e8ea5 100644 --- a/ext/digest/sha1/extconf.rb +++ b/ext/digest/sha1/extconf.rb @@ -6,7 +6,6 @@ require "mkmf" require File.expand_path("../../digest_conf", __FILE__) $defs << "-DHAVE_CONFIG_H" -$INCFLAGS << " -I$(srcdir)/.." $objs = [ "sha1init.#{$OBJEXT}" ] diff --git a/ext/digest/sha1/sha1.h b/ext/digest/sha1/sha1.h index 6f1c388cf2..2accc46d46 100644 --- a/ext/digest/sha1/sha1.h +++ b/ext/digest/sha1/sha1.h @@ -11,7 +11,7 @@ #ifndef _SYS_SHA1_H_ #define _SYS_SHA1_H_ -#include "defs.h" +#include "../defs.h" typedef struct { uint32_t state[5]; diff --git a/ext/digest/sha1/sha1init.c b/ext/digest/sha1/sha1init.c index 1f0580883f..1f8b89e276 100644 --- a/ext/digest/sha1/sha1init.c +++ b/ext/digest/sha1/sha1init.c @@ -1,7 +1,8 @@ /* $RoughId: sha1init.c,v 1.2 2001/07/13 19:49:10 knu Exp $ */ /* $Id$ */ -#include "digest.h" +#include +#include "../digest.h" #if defined(SHA1_USE_OPENSSL) #include "sha1ossl.h" #elif defined(SHA1_USE_COMMONDIGEST) diff --git a/ext/digest/sha2/extconf.rb b/ext/digest/sha2/extconf.rb index 142a7f7077..fe515457b7 100644 --- a/ext/digest/sha2/extconf.rb +++ b/ext/digest/sha2/extconf.rb @@ -6,7 +6,6 @@ require "mkmf" 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") $preload = %w[digest] -if have_type("uint64_t", "defs.h", $defs.join(' ')) - create_makefile("digest/sha2") -end +create_makefile("digest/sha2") diff --git a/ext/digest/sha2/sha2.c b/ext/digest/sha2/sha2.c index 1d29ee2d76..c86eab37a0 100644 --- a/ext/digest/sha2/sha2.c +++ b/ext/digest/sha2/sha2.c @@ -34,7 +34,7 @@ * $Id$ */ -#include "defs.h" +#include "../defs.h" #include /* memcpy()/memset() or bcopy()/bzero() */ #include /* assert() */ #include "sha2.h" diff --git a/ext/digest/sha2/sha2init.c b/ext/digest/sha2/sha2init.c index 09ccee5ac4..9fd8ece7fe 100644 --- a/ext/digest/sha2/sha2init.c +++ b/ext/digest/sha2/sha2init.c @@ -1,7 +1,8 @@ /* $RoughId: sha2init.c,v 1.3 2001/07/13 20:00:43 knu Exp $ */ /* $Id$ */ -#include "digest.h" +#include +#include "../digest.h" #if defined(SHA2_USE_OPENSSL) #include "sha2ossl.h" #elif defined(SHA2_USE_COMMONDIGEST) -- cgit v1.2.3