This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
hpux build errors, and -Werror
- From: Randolph Chung <randolph at tausq dot org>
- To: gdb at sources dot redhat dot com
- Date: Wed, 01 Mar 2006 23:22:56 +0800
- Subject: hpux build errors, and -Werror
Currently on hppa64-hp-hpux11.11, gdb fails to build with -Werror
because we are not getting the const flag correct with iconv() calls.
gdb's configure script actually has some tests for this, from
acinclude.m4, however, the test doesn't actually work (at least in this
case), because configure doesn't compile the test program with -Werror,
and the resultant warning doesn't trigger the script to define ICONV_CONST
I'm not very good with autoconf & friends and can't figure out the right
way to fix it. Can somebody give me some hints?
On hppa2.0w-hp-hpux11.11, there is a different problem, at least on the
system I'm testing on:
ser-tcp.c:209 has a call to getsockopt. This causes a (fatal) warning:
../../gdb/gdb/ser-tcp.c:209: warning: passing arg 5 of `getsockopt' from
incompatible pointer type
getsockopt is declared as:
extern int getsockopt (int, int, int, void *, int *);
whereas socklen_t is:
typedef long unsigned int size_t
typedef size_t socklen_t;
I would argue the headers are broken on this platform, but nonetheless
we may need to find a way to workaround this in gdb. I can't think of
any good way to do this though.
Comments appreciated.
randolph