From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8737 invoked by alias); 20 Dec 2001 11:39:22 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 8578 invoked from network); 20 Dec 2001 11:37:53 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 20 Dec 2001 11:37:53 -0000 Received: from there (cse.cygnus.com [205.180.230.236]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with SMTP id AAA24102; Thu, 20 Dec 2001 00:16:03 -0800 (PST) Message-Id: <200112200816.AAA24102@cygnus.com> Content-Type: text/plain; charset="iso-8859-1" From: "Martin M. Hunt" Organization: Red Hat Inc To: Elena Zannoni Subject: Re: [RFA] new tcp_open Date: Thu, 20 Dec 2001 03:39:00 -0000 X-Mailer: KMail [version 1.3.2] Cc: Andrew Cagney , gdb-patches@sources.redhat.com References: <200112031918.LAA18199@cygnus.com> <200112182028.MAA25648@cygnus.com> <15393.6280.385863.67517@localhost.localdomain> In-Reply-To: <15393.6280.385863.67517@localhost.localdomain> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SW-Source: 2001-12/txt/msg00513.txt.bz2 Those warnings were always there. My patch reverted those lines back to what was there before. However, it does appear that changing the char * cast to a void * would eliminate the warning and should probably work everywhere. Systems that based their sockets on very old BSD have char * instead of void * in their setsockopt prototypes. I tested void * on Linux and Windows and neither complain. I have been trying all day on a Solaris box, but it just can't seem to compile GDB in less than a couple of days. How can a big Ultrasparc with a load average of 0.08 take > 12 hours to build GDB??? Martin On Wednesday 19 December 2001 02:45 pm, Elena Zannoni wrote: > Martin, I am getting these warnings on solaris (with ,-Werror): > > > cc1: warnings being treated as errors > /es/scratch/ezannoni/uberbaum/src/gdb/ser-tcp.c: In function `tcp_open': > /es/scratch/ezannoni/uberbaum/src/gdb/ser-tcp.c:154: warning: passing arg 4 > of `getsockopt' from incompatible pointer type make: *** [ser-tcp.o] Error > 1 > > Elena > > Martin M. Hunt writes: > > Checked in. > > > > Martin > > > > On Tuesday 18 December 2001 03:21 am, Andrew Cagney wrote: > > > > Please give this patch a try and see if it fixes the problem. > > > > > > > > Index: ser-tcp.c > > > > =================================================================== > > > > RCS file: /cvs/src/src/gdb/ser-tcp.c,v > > > > retrieving revision 1.9 > > > > diff -u -p -r1.9 ser-tcp.c > > > > --- ser-tcp.c 2001/12/07 17:57:05 1.9 > > > > +++ ser-tcp.c 2001/12/18 10:54:31 > > > > @@ -165,6 +165,10 @@ tcp_open (struct serial *scb, const char > > > > tmp = 0; > > > > ioctl (scb->fd, FIONBIO, &tmp); > > > > > > > > + tmp = 1; > > > > + setsockopt (scb->fd, IPPROTO_TCP, TCP_NODELAY, > > > > + (char *)&tmp, sizeof (tmp)); > > > > + > > > > /* If we don't do this, then GDB simply exits > > > > when the remote side dies. */ > > > > signal (SIGPIPE, SIG_IGN); > > > > > > If it does, feel free to check it, and any other related changes in > > > :-) > > > > > > > > > Andrew