Permalink
Browse files

- Fix AHX_BROKEN_MEMCMP for autoheader mess up of #undef in config.h.

git-svn-id: http://unbound.nlnetlabs.nl/svn/trunk@2610 be551aaa-1e26-0410-a405-d3ace91eadb9
  • Loading branch information...
1 parent 4a8edc5 commit 70c199f1a49a12c29736332e82291e6cc1324d0a wouter committed Feb 9, 2012
Showing with 23 additions and 7 deletions.
  1. +3 −4 acx_nlnetlabs.m4
  2. +16 −0 compat/memcmp.h
  3. +1 −3 config.h.in
  4. +3 −0 doc/Changelog
View
@@ -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
View
@@ -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 */
View
@@ -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
View
@@ -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

0 comments on commit 70c199f

Please sign in to comment.