From ac398c3bafa6e4c80e20571373a96947db863b3d Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Sun, 13 Mar 2016 20:21:49 +0200 Subject: liblzma: Disable external SHA-256 by default. This is the sane thing to do. The conflict with OpenSSL on some OSes and especially that the OS-provided versions can be significantly slower makes it clear that it was a mistake to have the external SHA-256 support enabled by default. Those who want it can now pass --enable-external-sha256 to configure. INSTALL was updated with notes about OSes where this can be a bad idea. The SHA-256 detection code in configure.ac had some bugs that could lead to a build failure in some situations. These were fixed, although it doesn't matter that much now that the external SHA-256 is disabled by default. MINIX >= 3.2.0 uses NetBSD's libc and thus has SHA256_Init in libc instead of libutil. Support for the libutil version was removed. --- src/liblzma/check/check.h | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/liblzma/check/check.h b/src/liblzma/check/check.h index b8902f05..3007d889 100644 --- a/src/liblzma/check/check.h +++ b/src/liblzma/check/check.h @@ -15,13 +15,12 @@ #include "common.h" -// If either the data type or the function for external SHA-256 is missing, -// use the internal SHA-256 code. -#if !(defined(HAVE_CC_SHA256_CTX) || defined(HAVE_SHA256_CTX) \ - || defined(HAVE_SHA2_CTX)) \ - || !(defined(HAVE_CC_SHA256_INIT) \ - || defined(HAVE_SHA256_INIT) \ - || defined(HAVE_SHA256INIT)) +// If the function for external SHA-256 is missing, use the internal SHA-256 +// code. Due to how configure works, these defines can only get defined when +// both a usable header and a type have already been found. +#if !(defined(HAVE_CC_SHA256_INIT) \ + || defined(HAVE_SHA256_INIT) \ + || defined(HAVE_SHA256INIT)) # define HAVE_INTERNAL_SHA256 1 #endif @@ -35,9 +34,6 @@ #elif defined(HAVE_SHA2_H) # include # include -#elif defined(HAVE_MINIX_SHA2_H) -# include -# include #endif #if defined(HAVE_INTERNAL_SHA256) -- cgit v1.2.3