[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] gnugo-3.1.9 doesn't compile any more under with CFLAG
From: |
Teun Burgers |
Subject: |
Re: [gnugo-devel] gnugo-3.1.9 doesn't compile any more under with CFLAGS=-mno-cygwin option |
Date: |
Sat, 13 Oct 2001 17:03:47 +0200 |
Denis Dupeyron wrote:
> I usually build GNU Go using the CFLAGS=-mno-cygwin option, since it makes a
> smaller
> executable and I dont need the cygwin1.dll when I use GNU Go with Jago or
> OpenGo.
> However, since version 3.1.9, it complains about not finding crtdbg.h when
> compiling
> gg_utils.c.
crtdbg.h is VC specific apparantly.
The attached patch fixes this and another problem. The connect function
is already defined in winsock.h.
- portability fix for MINGW. Don't include crtdbg.h
- rename connect to string_connect.
Teun
Index: engine/liberty.h
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/liberty.h,v
retrieving revision 1.33
diff -u -r1.33 liberty.h
--- engine/liberty.h 2001/10/12 15:09:52 1.33
+++ engine/liberty.h 2001/10/13 14:58:47
@@ -244,7 +244,7 @@
void reading_hotspots(float values[MAX_BOARD][MAX_BOARD]);
/* readconnect.c */
-int connect(int str1, int str2, int *move);
+int string_connect(int str1, int str2, int *move);
int disconnect(int str1, int str2, int *move);
Index: engine/readconnect.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/readconnect.c,v
retrieving revision 1.7
diff -u -r1.7 readconnect.c
--- engine/readconnect.c 2001/10/12 20:35:26 1.7
+++ engine/readconnect.c 2001/10/13 14:58:48
@@ -387,7 +387,7 @@
/* Externally callable frontend to recursive_connect(). */
int
-connect(int str1, int str2, int *move)
+string_connect(int str1, int str2, int *move)
{
nodes_connect = 0;
*move = PASS_MOVE;
Index: engine/sgfdecide.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/sgfdecide.c,v
retrieving revision 1.14
diff -u -r1.14 sgfdecide.c
--- engine/sgfdecide.c 2001/10/12 15:09:52 1.14
+++ engine/sgfdecide.c 2001/10/13 14:58:49
@@ -146,7 +146,7 @@
reset_engine();
count_variations = 1;
- result = connect(POS(ai, aj), POS(bi, bj), &move);
+ result = string_connect(POS(ai, aj), POS(bi, bj), &move);
if (result == WIN) {
if (move == NO_MOVE)
gprintf("%m and %m are connected as it stands (%d variations)\n",
Index: interface/play_gtp.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/interface/play_gtp.c,v
retrieving revision 1.26
diff -u -r1.26 play_gtp.c
--- interface/play_gtp.c 2001/10/12 15:09:52 1.26
+++ interface/play_gtp.c 2001/10/13 14:58:55
@@ -916,7 +916,7 @@
if (BOARD(ai, aj) != BOARD(bi, bj))
return gtp_failure(id, "vertices must have same color");
- result = connect(POS(ai, aj), POS(bi, bj), &connect_move);
+ result = string_connect(POS(ai, aj), POS(bi, bj), &connect_move);
gtp_printid(id, GTP_SUCCESS);
gtp_print_code(result);
if (result != 0)
Index: utils/gg_utils.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/utils/gg_utils.c,v
retrieving revision 1.9
diff -u -r1.9 gg_utils.c
--- utils/gg_utils.c 2001/10/10 19:11:15 1.9
+++ utils/gg_utils.c 2001/10/13 14:58:58
@@ -100,6 +100,7 @@
#ifdef WIN32
+#ifdef VC
#include <crtdbg.h>
verifyW32(BOOL b)
@@ -109,6 +110,17 @@
fprintf(stderr, "Win32 Err: %ld\n", GetLastError());
}
}
+
+#else
+
+verifyW32(BOOL b)
+{
+ if (!b) {
+ fprintf(stderr, "Win32 Err: %ld\n", GetLastError());
+ }
+}
+
+#endif
#endif