Hi all,

The attached patch is required to work around bugs in the MinGW32 build.

For context, the fd_set macros appear to be poorly defined on MinGW32,
causing superfluous sign-compare warnings.  The patch turns it off only
when building a) that platform and b) those files that use those macros.

So it is intended, but please test before applying.

Cheers,

Zach

Index: src/helper/Makefile.am
===================================================================
--- src/helper/Makefile.am	(revision 1478)
+++ src/helper/Makefile.am	(working copy)
@@ -18,6 +18,11 @@
 libhelper_a_SOURCES += ioutil.c
 endif
 
+libhelper_a_CFLAGS =
+if IS_MINGW
+# FD_* macros are sloppy with their signs on MinGW32 platform
+libhelper_a_CFLAGS += -Wno-sign-compare
+endif
 
 noinst_HEADERS = binarybuffer.h configuration.h types.h log.h command.h \
 	time_support.h replacements.h fileio.h jim.h jim-eventloop.h \
Index: src/server/Makefile.am
===================================================================
--- src/server/Makefile.am	(revision 1478)
+++ src/server/Makefile.am	(working copy)
@@ -8,6 +8,11 @@
 libserver_a_SOURCES += httpd.c
 endif
 
+libserver_a_CFLAGS =
+if IS_MINGW
+# FD_* macros are sloppy with their signs on MinGW32 platform
+libserver_a_CFLAGS += -Wno-sign-compare
+endif
 
 # tcl server addons
 noinst_HEADERS += tcl_server.h
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to