diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2016-03-13 20:21:49 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2016-06-28 21:09:46 +0300 |
commit | 74f8dad9f912a2993768d93d108ea2b0b2c196e0 (patch) | |
tree | aac8ee8edb43e23c1f025bc9c8ce39bd312b5a7c /src/liblzma/check/check.h | |
parent | Update THANKS. (diff) | |
download | xz-74f8dad9f912a2993768d93d108ea2b0b2c196e0.tar.xz |
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.
Diffstat (limited to 'src/liblzma/check/check.h')
-rw-r--r-- | src/liblzma/check/check.h | 16 |
1 files changed, 6 insertions, 10 deletions
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 <sys/types.h> # include <sha2.h> -#elif defined(HAVE_MINIX_SHA2_H) -# include <sys/types.h> -# include <minix/sha2.h> #endif #if defined(HAVE_INTERNAL_SHA256) |