From cd9579081f098cc2887573a9e004962d3f0dcc63 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se>
Date: Wed, 25 Jun 2014 19:26:43 +0200
Subject: [PATCH] Use WITH_HOGWEED instead of HAVE_LIBGMP for preprocessor
 conditionals.

---
 ChangeLog                    |  5 +++++
 testsuite/bignum-test.c      | 10 +++++-----
 testsuite/sexp-format-test.c |  6 +++---
 testsuite/testutils.h        |  4 ----
 4 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 723524df..8174ea49 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2014-06-25  Niels Möller  <nisse@lysator.liu.se>
 
+	* testsuite/bignum-test.c: Use WITH_HOGWEED instead of HAVE_LIBGMP
+	for preprocessor conditionals.
+	* testsuite/testutils.h: Likewise.
+	* testsuite/sexp-format-test.c: Likewise.
+
 	* testsuite/ecdsa-keygen-test.c (test_main): Use printf,
 	mpz_out_str and write_mpn instead of gmp_fprintf.
 	* testsuite/ecdsa-sign-test.c (test_ecdsa): Likewise.
diff --git a/testsuite/bignum-test.c b/testsuite/bignum-test.c
index 31149304..602554b5 100644
--- a/testsuite/bignum-test.c
+++ b/testsuite/bignum-test.c
@@ -7,7 +7,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#if HAVE_LIBGMP
+#if WITH_HOGWEED
 #include "bignum.h"
 
 static void
@@ -43,13 +43,13 @@ test_size(long x, unsigned size)
   ASSERT(nettle_mpz_sizeinbase_256_s(t) == size);
   mpz_clear(t);
 }
-#endif /* HAVE_LIBGMP */
+#endif /* WITH_HOGWEED */
 
 
 void
 test_main(void)
 {
-#if HAVE_LIBGMP
+#if WITH_HOGWEED
   test_size(0, 1);
   test_size(1, 1);
   test_size(0x7f, 1);
@@ -87,7 +87,7 @@ test_main(void)
   test_bignum("-8000", SHEX(  "8000"));
   test_bignum("-8001", SHEX("ff7fff"));
   
-#else /* !HAVE_LIBGMP */
+#else /* !WITH_HOGWEED */
   SKIP();
-#endif /* !HAVE_LIBGMP */
+#endif /* !WITH_HOGWEED */
 }
diff --git a/testsuite/sexp-format-test.c b/testsuite/sexp-format-test.c
index 54852796..22d86ba9 100644
--- a/testsuite/sexp-format-test.c
+++ b/testsuite/sexp-format-test.c
@@ -3,7 +3,7 @@
 
 #include "buffer.h"
 
-#if HAVE_LIBGMP
+#if WITH_HOGWEED
 # include "bignum.h"
 #endif
 
@@ -132,7 +132,7 @@ test_main(void)
     nettle_buffer_clear(&buffer);
   }
   
-#if HAVE_LIBGMP
+#if WITH_HOGWEED
   {
     mpz_t x;
     mpz_t y;
@@ -162,5 +162,5 @@ test_main(void)
     mpz_clear(y);
     mpz_clear(z);
   }
-#endif /* HAVE_LIBGMP */
+#endif /* WITH_HOGWEED */
 }
diff --git a/testsuite/testutils.h b/testsuite/testutils.h
index 71b093d2..4768f996 100644
--- a/testsuite/testutils.h
+++ b/testsuite/testutils.h
@@ -12,10 +12,6 @@
 #include <stdio.h>
 #include <string.h>
 
-#if HAVE_LIBGMP
-# include "bignum.h"
-#endif
-
 #if WITH_HOGWEED
 # include "rsa.h"
 # include "dsa-compat.h"
-- 
GitLab