Jim Meyering <[EMAIL PROTECTED]> wrote:

> Bob Proulx <[EMAIL PROTECTED]> wrote:
>> gcc -std=gnu99  -g -O2  -Wl,--as-needed -o factor factor.o libver.a
>> ../lib/libcoreutils.a  ../lib/libcoreutils.a
>> factor.o: In function `print_factors':
>> ../../src/factor.c:451: undefined reference to `debug'
>> collect2: ld returned 1 exit status
>> make[3]: *** [factor] Error 1
>
> Thanks, Bob!
> Here's the fix I've just pushed:

*This* is what I really pushed ;-) (thanks again, Bob)

>From 153477479abd5b4dfda5feb109e3ebf28a578bad Mon Sep 17 00:00:00 2001
From: Jim Meyering <[EMAIL PROTECTED]>
Date: Sat, 25 Oct 2008 22:51:54 +0200
Subject: [PATCH] factor: avoid compilation failure without libgmp

* src/factor.c (debug) [!HAVE_GMP]: Define.
Reported by Bob Proulx.
---
 src/factor.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/factor.c b/src/factor.c
index 8ccefd5..187143a 100644
--- a/src/factor.c
+++ b/src/factor.c
@@ -257,6 +257,14 @@ S4:
   mpz_clear (x);
   mpz_clear (y);
 }
+
+#else
+
+static void
+debug (char const *fmt ATTRIBUTE_UNUSED, ...)
+{
+}
+
 #endif

 /* The maximum number of factors, including -1, for negative numbers.  */
--
1.6.0.3.517.g759a


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to