From owner-freebsd-net@FreeBSD.ORG Mon Jan 2 02:09:27 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 8F2F116A41F for ; Mon, 2 Jan 2006 02:09:27 +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 2482A43D48 for ; Mon, 2 Jan 2006 02:09:27 +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 379FCD2F099 for ; Sun, 1 Jan 2006 21:09:25 -0500 (EST) Received: from web3.messagingengine.com ([10.202.2.212]) by frontend1.internal (MEProxy); Sun, 01 Jan 2006 21:09:25 -0500 Received: by web3.messagingengine.com (Postfix, from userid 99) id 77A1115316; Sun, 1 Jan 2006 21:09:26 -0500 (EST) Message-Id: <1136167766.17477.250884723@webmail.messagingengine.com> X-Sasl-Enc: chHlo/SuDKzmDtdat/C7XsDn/4zTtTT2EckPls+wTDK+ 1136167766 From: "Aluminium Oxide" To: freebsd-net@freebsd.org 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, 02 Jan 2006 12:39:26 +1030 Subject: /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:09:27 -0000 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 > */ ===================================================== -- Aluminium Oxide orac000@internet-mail.org -- http://www.fastmail.fm - A fast, anti-spam email service.