summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@laas.fr>2009-11-02 11:11:24 +0100
committerKeith Packard <keithp@keithp.com>2009-11-02 07:37:30 -0800
commit48b8c076a7b7dbbddfc472e8c6e5251a0b174cbc (patch)
tree7cfc10aa5587d42a40b6d4777d354e7a0dcb7e57 /os
parentda923d0bc15e99a8ed1986bd6f5df37f7af7284b (diff)
add libc as a choice for SHA1 implementation
On Sun, Nov 01, 2009 at 02:54:13PM -0800, Keith Packard wrote: > Excerpts from Matthieu Herrb's message of Sun Nov 01 09:34:35 -0800 2009: > > > +AC_CHECK_FUNCS([SHA1Init], [HAVE_LIBC_SHA1=yes]) > > I'd suggest AC_CHECK_FUNC instead; as far as I can tell, AC_CHECK_FUNCS > will also define HAVE_SHA1INIT. Also, can you use HAVE_LIBC_SHA1 > consistently rather than having two separate names (HAVE_LIBC_SHA1 and > HAVE_SHA1_IN_LIBC)? Yes, I know one is a preprocessor symbol and the > other is a cpp shell variable, but I think that will work anyway. > New version taking you comments into account. From: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun, 1 Nov 2009 18:19:27 +0100 Subject: [PATCH] Add a probe for SHA1 functions in libc in *BSD. The interface is the same as the one in libmd. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'os')
-rw-r--r--os/xsha1.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/os/xsha1.c b/os/xsha1.c
index 94092caa7..229ce896d 100644
--- a/os/xsha1.c
+++ b/os/xsha1.c
@@ -5,7 +5,8 @@
#include "os.h"
#include "xsha1.h"
-#ifdef HAVE_SHA1_IN_LIBMD /* Use libmd for SHA1 */
+#if defined(HAVE_SHA1_IN_LIBMD) /* Use libmd for SHA1 */ \
+ || defined(HAVE_SHA1_IN_LIBC) /* Use libc for SHA1 */
# include <sha1.h>