This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC] GDBserver compiler warnings patch
Date: Sun, 12 Jun 2005 21:59:44 -0400
From: Daniel Jacobowitz <drow@false.org>
Hi Daniel,
One small and one larger nit about your patch:
Index: configure.ac
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/configure.ac,v
retrieving revision 1.2
diff -u -p -r1.2 configure.ac
--- configure.ac 24 Feb 2005 20:26:32 -0000 1.2
+++ configure.ac 13 Jun 2005 01:57:11 -0000
@@ -40,10 +40,16 @@ AC_CHECK_HEADERS(sgtty.h termio.h termio
BFD_NEED_DECLARATION(strerror)
+AC_CHECK_TYPE(socklen_t,
+ [AC_DEFINE(HAVE_SOCKLEN_T, 1, [Define if you have socklen_t.])],
+ [], [#include <sys/socket.h>])
1. That AC_DEFINE is superfluous. AC_CHECK_TYPE does that for you ;-).
2. On OpenBSD (and possibly other BSD-like systems) you'll need to
#include <sys/types.h> to get socklen_t.
I propose to replace the above with what I just committed to gdb's
configure.ac:
AC_CHECK_TYPES(socklen_t, [], [],
[#include <sys/types.h>
#include <sys/socket.h>
])
Mark