gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnugo-devel] Current CVS does not compile?


From: Arend Bayer
Subject: Re: [gnugo-devel] Current CVS does not compile?
Date: Mon, 11 Aug 2003 17:37:20 +0200 (CEST)

On Mon, 11 Aug 2003, Marco Scheurer wrote:

> (With checking for variadic cpp define... no)
>
> printutils.c: In function `DEBUG_func':
> printutils.c:222: `debug' undeclared (first use in this function)
> printutils.c:222: (Each undeclared identifier is reported only once
> printutils.c:222: for each function it appears in.)
> make[2]: *** [printutils.o] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2

Could you check that the patch below fixes the compile?

Thanks
Arend

("debug" and "verbose" are engine variables, not libboard, and so
DEBUG_func should be moved out of the board library.)

- move DEBUG_func to showbord.c

Index: engine/printutils.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/printutils.c,v
retrieving revision 1.40
diff -u -p -r1.40 printutils.c
--- engine/printutils.c 10 Aug 2003 17:56:51 -0000      1.40
+++ engine/printutils.c 11 Aug 2003 15:37:35 -0000
@@ -209,27 +209,6 @@ mprintf(const char *fmt, ...)
   va_end(ap);
 }

-#ifndef HAVE_VARIADIC_DEFINE
-
-/* See gnugo.h for related TRACE family macro definitions */
-
-/* Always returns 1 to allow use in short-circuit logical expressions. */
-int
-DEBUG_func(int flag, const char *fmt, ...)
-{
-  va_list ap;
-
-  if (debug & flag) {
-    va_start(ap, fmt);
-    vgprintf(stderr, fmt, ap);
-    va_end(ap);
-  }
-
-  return 1;
-}
-
-#endif /*HAVE_VARIADIC_DEFINE*/
-

 /*
  * A wrapper around abort() which shows the state variables at the time
Index: engine/showbord.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/showbord.c,v
retrieving revision 1.23
diff -u -p -r1.23 showbord.c
--- engine/showbord.c   10 Aug 2003 17:56:51 -0000      1.23
+++ engine/showbord.c   11 Aug 2003 15:37:35 -0000
@@ -343,6 +343,29 @@ result_to_string(int result)
 }


+#ifndef HAVE_VARIADIC_DEFINE
+
+/* See gnugo.h for related TRACE family macro definitions */
+
+/* Always returns 1 to allow use in short-circuit logical expressions. */
+int
+DEBUG_func(int flag, const char *fmt, ...)
+{
+  va_list ap;
+
+  if (debug & flag) {
+    va_start(ap, fmt);
+    vgprintf(stderr, fmt, ap);
+    va_end(ap);
+  }
+
+  return 1;
+}
+
+#endif /*HAVE_VARIADIC_DEFINE*/
+
+
+
 /*
  * Local Variables:
  * tab-width: 8





reply via email to

[Prev in Thread] Current Thread [Next in Thread]