From owner-freebsd-net@FreeBSD.ORG Mon Jan 2 02:19:06 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7120A16A41F for ; Mon, 2 Jan 2006 02:19:06 +0000 (GMT) (envelope-from orac000@internet-mail.org) Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id B7D9943D49 for ; Mon, 2 Jan 2006 02:19:05 +0000 (GMT) (envelope-from orac000@internet-mail.org) Received: from frontend1.internal (mysql-sessions.internal [10.202.2.149]) by frontend1.messagingengine.com (Postfix) with ESMTP id 1EDF6D2F02B for ; Sun, 1 Jan 2006 21:19:04 -0500 (EST) Received: from web3.messagingengine.com ([10.202.2.212]) by frontend1.internal (MEProxy); Sun, 01 Jan 2006 21:19:04 -0500 Received: by web3.messagingengine.com (Postfix, from userid 99) id 5C52E16D20; Sun, 1 Jan 2006 21:19:05 -0500 (EST) Message-Id: <1136168345.18174.250886155@webmail.messagingengine.com> X-Sasl-Enc: Utz7+4cjc2CdfG76eULjAO23Sv7EjBFKXzidbWZNeBgt 1136168345 From: "Aluminium Oxide" To: freebsd-net@freebsd.org Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1136168345181740"; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.5 (F2.73; T1.15; A1.64; B3.05; Q3.03) Date: Mon, 02 Jan 2006 12:49:05 +1030 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Fwd: /usr/src/lib/libc/net/res_debug.c: compile problem fixed X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2006 02:19:06 -0000 This is a multi-part message in MIME format. --_----------=_1136168345181740 Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.5 (F2.73; T1.15; A1.64; B3.05; Q3.03) Date: Mon, 2 Jan 2006 02:19:05 UT Oops. Let's try that again, with the attachments this time... On Mon, 02 Jan 2006 12:39:26 +1030, "Aluminium Oxide" said: > I've fixed a problem with res_debug.c, which, during a make buildworld > on a 6.0 RELEASE i386 system cvsupped yesterday, was stopping with > these errors : > > ============================================================ > ..... > In file included from /usr/src/lib/libc/net/res_debug.c:733: > > /usr/src/lib/libc/net/res_debug.c: in function '__loc_aton' : > /usr/src/lib/libc/net/res_debug.c:733: warning: passing arg 1 of > 'latlon2ul' from incompatible pointer type > /usr/src/lib/libc/net/res_debug.c:735: warning: passing arg 1 of > 'latlon2ul' from incompatible pointer type > /usr/src/lib/libc/net/res_debug.c:786: warning: passing arg 1 of > 'latlon2ul' from incompatible pointer type > /usr/src/lib/libc/net/res_debug.c:797: warning: passing arg 1 of > 'latlon2ul' from incompatible pointer type > /usr/src/lib/libc/net/res_debug.c:808: warning: passing arg 1 of > 'latlon2ul' from incompatible pointer type > > *** Error code 1 > Stop in /usr/src/lib/libc/ > ...... > Stop in /usr/src. > ============================================================ > > I have fixed this and would like to either create a patch for the code > in question, or if you prefer simply replacing the code (26Kb) with the > attached code. Either way, I am not the most experienced C programmer > and would like my changes checked. > > Below is the output of `diff res_debug.org.c res_debug.c` > > I've also attached this. > ===================================================== > 574,575c574,575 > < precsize_aton(strptr) > < char **strptr; > --- > > precsize_aton(char **strptr) > > /* char **strptr; */ > 616,618c616,618 > < latlon2ul(latlonstrptr,which) > < char **latlonstrptr; > < int *which; > --- > > latlon2ul(char *latlonstrptr,int *which) > > /* char **latlonstrptr; */ > > /* int *which; */ > 624c624 > < cp = *latlonstrptr; > --- > > cp = latlonstrptr; > 707c707 > < *latlonstrptr = cp; > --- > > latlonstrptr = cp; > 719c719,720 > < const char *cp, *maxcp; > --- > > char *cp; > > char *maxcp; > 730,731c731,732 > < cp = ascii; > < maxcp = cp + strlen(ascii); > --- > > *cp = *ascii; > > *maxcp = *cp + strlen(ascii); > 733c734 > < lltemp1 = latlon2ul(&cp, which1); > --- > > lltemp1 = latlon2ul(cp, which1); > 735c736 > < lltemp2 = latlon2ul(&cp, which2); > --- > > lltemp2 = latlon2ul(cp, which2); > 737c738 > < switch (which1 + which2) { > --- > > switch (*which1 + *which2) { > 739c740 > < if ((which1 == 1) && (which2 == 2)) { /* normal case */ > --- > > if ((*which1 == 1) && (*which2 == 2)) { /* normal case */ > 742c743,744 > < } else if ((which1 == 2) && (which2 == 1)) { /* reversed > */ > --- > > } else if ((*which1 == 2) && (*which2 == 1)) { /* reversed > > */ > > ===================================================== ===================== Sub UNIX lumen Damien Miller orac000@internet-mail.org ===================== -- Aluminium Oxide orac000@internet-mail.org -- http://www.fastmail.fm - A fast, anti-spam email service. --_----------=_1136168345181740 Content-Disposition: attachment; filename="res_debug.c.org" Content-Transfer-Encoding: base64 Content-Type: application/octet-stream; name="res_debug.c.org" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.5 (F2.73; T1.15; A1.64; B3.05; Q3.03) Date: Mon, 2 Jan 2006 02:19:05 UT --_----------=_1136168345181740 Content-Disposition: attachment; filename="res_debug.c.diff" Content-Transfer-Encoding: base64 Content-Type: text/x-patch; name="res_debug.c.diff" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.5 (F2.73; T1.15; A1.64; B3.05; Q3.03) Date: Mon, 2 Jan 2006 02:19:05 UT NTc0LDU3NWM1NzQsNTc1CjwgcHJlY3NpemVfYXRvbihzdHJwdHIpCjwgCWNo YXIgKipzdHJwdHI7Ci0tLQo+IHByZWNzaXplX2F0b24oY2hhciAqKnN0cnB0 cikKPiAvKgljaGFyICoqc3RycHRyOyAqLwo2MTYsNjE4YzYxNiw2MTgKPCBs YXRsb24ydWwobGF0bG9uc3RycHRyLHdoaWNo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