From 2c30e876c43debeb2736dc40b96fb82268d2ea49 Mon Sep 17 00:00:00 2001 From: nagachika Date: Tue, 24 Nov 2015 15:28:43 +0000 Subject: merge revision(s) 52694: [Backport #3231] * 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/branches/ruby_2_2@52739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/digest/sha2/extconf.rb | 5 +---- ext/digest/sha2/sha2.c | 2 +- ext/digest/sha2/sha2init.c | 3 ++- ext/digest/sha2/sha2ossl.c | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) (limited to 'ext/digest/sha2') diff --git a/ext/digest/sha2/extconf.rb b/ext/digest/sha2/extconf.rb index ac35132250..12fbbc4144 100644 --- a/ext/digest/sha2/extconf.rb +++ b/ext/digest/sha2/extconf.rb @@ -5,7 +5,6 @@ require "mkmf" $defs << "-DHAVE_CONFIG_H" -$INCFLAGS << " -I$(srcdir)/.." $objs = [ "sha2init.#{$OBJEXT}" ] @@ -27,6 +26,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 d0629a2b64..0cd3b0f24e 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 8a5faeee57..38467df12c 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" #else diff --git a/ext/digest/sha2/sha2ossl.c b/ext/digest/sha2/sha2ossl.c index 34353be8b8..e68828899c 100644 --- a/ext/digest/sha2/sha2ossl.c +++ b/ext/digest/sha2/sha2ossl.c @@ -1,4 +1,4 @@ -#include "defs.h" +#include "../defs.h" #include "sha2ossl.h" #define SHA_Finish(bit) \ -- cgit v1.2.3