]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Fixup SHA512 definitions from compat not appearing when not needed.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 11 Jul 2014 16:44:26 +0000 (16:44 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 11 Jul 2014 16:44:26 +0000 (16:44 +0000)
git-svn-id: file:///svn/unbound/trunk@3175 be551aaa-1e26-0410-a405-d3ace91eadb9

config.h.in
configure
configure.ac

index 486f76448ccf1f0580eb95648914f9d0d14fa2b9..53902ee21b4be83c3ae9ef3e58ff756ff6cc2fca 100644 (file)
@@ -3,6 +3,9 @@
 /* Directory to chroot to */
 #undef CHROOT_DIR
 
+/* Do sha512 definitions in config.h */
+#undef COMPAT_SHA512
+
 /* Pathname to the Unbound configuration file */
 #undef CONFIGFILE
 
@@ -907,7 +910,7 @@ void _ARC4_UNLOCK(void);
 #ifndef HAVE_ARC4RANDOM_UNIFORM
 uint32_t arc4random_uniform(uint32_t upper_bound);
 #endif
-#ifndef HAVE_SHA512_UPDATE
+#ifdef COMPAT_SHA512
 #ifndef SHA512_DIGEST_LENGTH
 #define SHA512_BLOCK_LENGTH            128
 #define SHA512_DIGEST_LENGTH           64
@@ -922,7 +925,7 @@ void SHA512_Init(SHA512_CTX*);
 void SHA512_Update(SHA512_CTX*, void*, size_t);
 void SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
 unsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest);
-#endif /* HAVE_SHA512_UPDATE */
+#endif /* COMPAT_SHA512 */
 
 
 
index 007b89ee233690e8bb2815fdd921809270f7659f..b42d5c83489392c680bca5b1edebd8b102ffc0af 100755 (executable)
--- a/configure
+++ b/configure
@@ -18248,6 +18248,9 @@ _ACEOF
 
 else
 
+
+$as_echo "#define COMPAT_SHA512 1" >>confdefs.h
+;
                                        case " $LIBOBJS " in
   *" sha512.$ac_objext "* ) ;;
   *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
index c5d83a9aa367ff7b4afcdf1559d50eafefa4adf0..bd912e92d99df9a386d78e5d619d98d52e0ee272 100644 (file)
@@ -998,6 +998,7 @@ if test "$USE_NSS" = "no"; then
                        Linux|*)
                                AC_LIBOBJ(getentropy_linux)
                                AC_CHECK_FUNCS([SHA512_Update],,[
+                                       AC_DEFINE([COMPAT_SHA512], [1], [Do sha512 definitions in config.h]);
                                        AC_LIBOBJ(sha512)
                                ])
                                AC_SEARCH_LIBS([clock_gettime], [rt])
@@ -1213,7 +1214,7 @@ void _ARC4_UNLOCK(void);
 #ifndef HAVE_ARC4RANDOM_UNIFORM
 uint32_t arc4random_uniform(uint32_t upper_bound);
 #endif
-#ifndef HAVE_SHA512_UPDATE
+#ifdef COMPAT_SHA512
 #ifndef SHA512_DIGEST_LENGTH
 #define SHA512_BLOCK_LENGTH            128
 #define SHA512_DIGEST_LENGTH           64
@@ -1228,7 +1229,7 @@ void SHA512_Init(SHA512_CTX*);
 void SHA512_Update(SHA512_CTX*, void*, size_t);
 void SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
 unsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest);
-#endif /* HAVE_SHA512_UPDATE */
+#endif /* COMPAT_SHA512 */