]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix AHX_BROKEN_MEMCMP for autoheader mess up of #undef in config.h.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 9 Feb 2012 12:40:19 +0000 (12:40 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 9 Feb 2012 12:40:19 +0000 (12:40 +0000)
git-svn-id: file:///svn/unbound/trunk@2610 be551aaa-1e26-0410-a405-d3ace91eadb9

acx_nlnetlabs.m4
compat/memcmp.h [new file with mode: 0644]
config.h.in
doc/Changelog

index 3a2e350823eed0e2ec46c65ca4161e365790bbbb..e90c81ea02abd6e14a5d2faee30b3a7dbce3c9f3 100644 (file)
@@ -2,7 +2,8 @@
 # Copyright 2009, Wouter Wijngaards, NLnet Labs.   
 # BSD licensed.
 #
-# Version 20
+# Version 21
+# 2012-02-09 Fix AHX_MEMCMP_BROKEN with undef in compat/memcmp.h.
 # 2012-01-20 Fix COMPILER_FLAGS_UNBOUND for gcc 4.6.2 assigned-not-used-warns.
 # 2011-12-05 Fix getaddrinfowithincludes on windows with fedora16 mingw32-gcc.
 #           Fix ACX_MALLOC for redefined malloc error.
@@ -1326,9 +1327,7 @@ int main(void)
 dnl define memcmp to its replacement, pass unique id for program as arg
 AC_DEFUN([AHX_MEMCMP_BROKEN], [
 #ifdef MEMCMP_IS_BROKEN
-#  ifdef memcmp
-#  undef memcmp
-#  endif
+#include "compat/memcmp.h"
 #define memcmp memcmp_$1
 int memcmp(const void *x, const void *y, size_t n);
 #endif
diff --git a/compat/memcmp.h b/compat/memcmp.h
new file mode 100644 (file)
index 0000000..c1d195c
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ *     memcmp.h: undef memcmp for compat.
+ *
+ *     Copyright (c) 2012, NLnet Labs. All rights reserved.
+ *
+ * See LICENSE for the license.
+*/
+#ifndef COMPAT_MEMCMP_H
+#define COMPAT_MEMCMP_H
+
+#ifdef memcmp
+/* undef here otherwise autoheader messes it up in config.h */
+#  undef memcmp
+#endif
+
+#endif /* COMPAT_MEMCMP_H */
index 58e15dcd02b2ba79171a9cd7d5051cde4ec2119e..c8c0504d401a6792f1ebcef168a3f0e2f365b1db 100644 (file)
@@ -825,9 +825,7 @@ struct tm *gmtime_r(const time_t *timep, struct tm *result);
 
 
 #ifdef MEMCMP_IS_BROKEN
-#  ifdef memcmp
-#  undef memcmp
-#  endif
+#include "compat/memcmp.h"
 #define memcmp memcmp_unbound
 int memcmp(const void *x, const void *y, size_t n);
 #endif
index d452b0e108c0f85cf8419fdb5ba4240b3c77cc61..8321fb6931e9ceb83fcb72bbd1eedbd80a397eec 100644 (file)
@@ -1,3 +1,6 @@
+9 February 2012: Wouter
+       - Fix AHX_BROKEN_MEMCMP for autoheader mess up of #undef in config.h.
+
 8 February 2012: Wouter
        - implement draft-ietf-dnsext-ecdsa-04; which is in IETF LC; This
          implementation is experimental at this time and not recommended