From 6539378e66ee72723739b39824e1d4339c413088 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Sat, 21 May 2011 09:40:20 +0200 Subject: Override gnulib code with fix for memxor and valgrind. --- gl/hmac-md5.c | 4 ++-- gl/m4/valgrind-tests.m4 | 2 +- gl/memxor.c | 2 +- gl/memxor.h | 2 +- gl/override/lib/hmac-md5.c.diff | 20 ++++++++++++++++++++ gl/override/lib/memxor.c.diff | 11 +++++++++++ gl/override/lib/memxor.h.diff | 10 ++++++++++ gl/override/m4/valgrind-tests.m4.diff | 11 +++++++++++ 8 files changed, 57 insertions(+), 5 deletions(-) create mode 100644 gl/override/lib/hmac-md5.c.diff create mode 100644 gl/override/lib/memxor.c.diff create mode 100644 gl/override/lib/memxor.h.diff create mode 100644 gl/override/m4/valgrind-tests.m4.diff (limited to 'gl') diff --git a/gl/hmac-md5.c b/gl/hmac-md5.c index eed16573ba..2c0edf5e86 100644 --- a/gl/hmac-md5.c +++ b/gl/hmac-md5.c @@ -58,7 +58,7 @@ hmac_md5 (const void *key, size_t keylen, md5_init_ctx (&inner); memset (block, IPAD, sizeof (block)); - memxor (block, key, keylen); + gl_memxor (block, key, keylen); md5_process_block (block, 64, &inner); md5_process_bytes (in, inlen, &inner); @@ -70,7 +70,7 @@ hmac_md5 (const void *key, size_t keylen, md5_init_ctx (&outer); memset (block, OPAD, sizeof (block)); - memxor (block, key, keylen); + gl_memxor (block, key, keylen); md5_process_block (block, 64, &outer); md5_process_bytes (innerhash, 16, &outer); diff --git a/gl/m4/valgrind-tests.m4 b/gl/m4/valgrind-tests.m4 index ab9e25a841..98d4487857 100644 --- a/gl/m4/valgrind-tests.m4 +++ b/gl/m4/valgrind-tests.m4 @@ -23,7 +23,7 @@ AC_DEFUN([gl_VALGRIND_TESTS], if test -n "$VALGRIND" && $VALGRIND -q true > /dev/null 2>&1; then opt_valgrind_tests=yes - VALGRIND="$VALGRIND -q --error-exitcode=1 --leak-check=full" + VALGRIND="$VALGRIND -q --error-exitcode=1" else opt_valgrind_tests=no VALGRIND= diff --git a/gl/memxor.c b/gl/memxor.c index 4eeebcbd56..b80b4308ef 100644 --- a/gl/memxor.c +++ b/gl/memxor.c @@ -23,7 +23,7 @@ #include "memxor.h" void * -memxor (void *restrict dest, const void *restrict src, size_t n) +gl_memxor (void *restrict dest, const void *restrict src, size_t n) { char const *s = src; char *d = dest; diff --git a/gl/memxor.h b/gl/memxor.h index dafa2cfca7..fbf2ac3c54 100644 --- a/gl/memxor.h +++ b/gl/memxor.h @@ -26,6 +26,6 @@ /* Compute binary exclusive OR of memory areas DEST and SRC, putting the result in DEST, of length N bytes. Returns a pointer to DEST. */ -void *memxor (void *restrict dest, const void *restrict src, size_t n); +void *gl_memxor (void *restrict dest, const void *restrict src, size_t n); #endif /* MEMXOR_H */ diff --git a/gl/override/lib/hmac-md5.c.diff b/gl/override/lib/hmac-md5.c.diff new file mode 100644 index 0000000000..1f80022234 --- /dev/null +++ b/gl/override/lib/hmac-md5.c.diff @@ -0,0 +1,20 @@ +--- hmac-md5.c.orig 2011-05-21 09:36:49.076074063 +0200 ++++ hmac-md5.c 2011-05-21 09:37:51.911556830 +0200 +@@ -58,7 +58,7 @@ + md5_init_ctx (&inner); + + memset (block, IPAD, sizeof (block)); +- memxor (block, key, keylen); ++ gl_memxor (block, key, keylen); + + md5_process_block (block, 64, &inner); + md5_process_bytes (in, inlen, &inner); +@@ -70,7 +70,7 @@ + md5_init_ctx (&outer); + + memset (block, OPAD, sizeof (block)); +- memxor (block, key, keylen); ++ gl_memxor (block, key, keylen); + + md5_process_block (block, 64, &outer); + md5_process_bytes (innerhash, 16, &outer); diff --git a/gl/override/lib/memxor.c.diff b/gl/override/lib/memxor.c.diff new file mode 100644 index 0000000000..5b1049c20d --- /dev/null +++ b/gl/override/lib/memxor.c.diff @@ -0,0 +1,11 @@ +--- memxor.c.orig 2011-05-21 09:38:04.328055463 +0200 ++++ memxor.c 2011-05-21 09:38:14.369054337 +0200 +@@ -23,7 +23,7 @@ + #include "memxor.h" + + void * +-memxor (void *restrict dest, const void *restrict src, size_t n) ++gl_memxor (void *restrict dest, const void *restrict src, size_t n) + { + char const *s = src; + char *d = dest; diff --git a/gl/override/lib/memxor.h.diff b/gl/override/lib/memxor.h.diff new file mode 100644 index 0000000000..c7b6ca4037 --- /dev/null +++ b/gl/override/lib/memxor.h.diff @@ -0,0 +1,10 @@ +--- memxor.h.orig 2011-05-21 09:38:26.471555934 +0200 ++++ memxor.h 2011-05-21 09:38:30.668058152 +0200 +@@ -26,6 +26,6 @@ + /* Compute binary exclusive OR of memory areas DEST and SRC, putting + the result in DEST, of length N bytes. Returns a pointer to + DEST. */ +-void *memxor (void *restrict dest, const void *restrict src, size_t n); ++void *gl_memxor (void *restrict dest, const void *restrict src, size_t n); + + #endif /* MEMXOR_H */ diff --git a/gl/override/m4/valgrind-tests.m4.diff b/gl/override/m4/valgrind-tests.m4.diff new file mode 100644 index 0000000000..8a4f643af1 --- /dev/null +++ b/gl/override/m4/valgrind-tests.m4.diff @@ -0,0 +1,11 @@ +--- valgrind-tests.m4.orig 2011-05-21 09:37:17.415555504 +0200 ++++ valgrind-tests.m4 2011-05-21 09:37:34.600259721 +0200 +@@ -23,7 +23,7 @@ + + if test -n "$VALGRIND" && $VALGRIND -q true > /dev/null 2>&1; then + opt_valgrind_tests=yes +- VALGRIND="$VALGRIND -q --error-exitcode=1 --leak-check=full" ++ VALGRIND="$VALGRIND -q --error-exitcode=1" + else + opt_valgrind_tests=no + VALGRIND= -- cgit v1.2.1