From owner-freebsd-bugs Thu Jan 6 14:34:48 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from smtp2.vnet.net (smtp2.vnet.net [166.82.1.32]) by hub.freebsd.org (Postfix) with ESMTP id 5C81E14E2B for ; Thu, 6 Jan 2000 14:34:39 -0800 (PST) (envelope-from rivers@dignus.com) Received: from dignus.com (ponds.vnet.net [166.82.177.48]) by smtp2.vnet.net (8.9.1a/8.9.1) with ESMTP id RAA17071; Thu, 6 Jan 2000 17:34:27 -0500 (EST) Received: from lakes.dignus.com (lakes.dignus.com [10.0.0.3]) by dignus.com (8.9.2/8.8.5) with ESMTP id RAA11572; Thu, 6 Jan 2000 17:34:25 -0500 (EST) Received: (from rivers@localhost) by lakes.dignus.com (8.9.3/8.6.9) id RAA61468; Thu, 6 Jan 2000 17:34:25 -0500 (EST) Date: Thu, 6 Jan 2000 17:34:25 -0500 (EST) From: Thomas David Rivers Message-Id: <200001062234.RAA61468@lakes.dignus.com> To: brian@Awfulhak.org, wollman@khavrinen.lcs.mit.edu Subject: Re: bin/15906: rcmd(3) prototype disagrees with definition Cc: freebsd-bugs@FreeBSD.ORG In-Reply-To: <200001061927.TAA00473@hak.lan.Awfulhak.org> Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > From owner-freebsd-bugs@FreeBSD.ORG Thu Jan 6 17:21:32 2000 > Received: from dignus.com (ponds.dignus.com [10.0.0.1]) by lakes.dignus.com (8.9.3/8.6.9) with ESMTP id RAA61416 for ; Thu, 6 Jan 2000 17:21:31 -0500 (EST) > Received: from hub.freebsd.org (hub.FreeBSD.ORG [204.216.27.18]) > by dignus.com (8.9.2/8.8.5) with ESMTP id RAA11559 > for ; Thu, 6 Jan 2000 17:21:27 -0500 (EST) > Received: by hub.freebsd.org (Postfix, from userid 538) > id 1F63B15778; Thu, 6 Jan 2000 14:18:26 -0800 (PST) > Received: from localhost (localhost [127.0.0.1]) > by hub.freebsd.org (Postfix) with SMTP > id D672A1CD824; Thu, 6 Jan 2000 14:18:25 -0800 (PST) > (envelope-from owner-freebsd-bugs) > Received: by hub.freebsd.org (bulk_mailer v1.12); Thu, 6 Jan 2000 14:18:25 -0800 > Delivered-To: freebsd-bugs@freebsd.org > Received: from awfulhak.org (dynamic-80.max4-du-ws.dialnetwork.pavilion.co.uk [212.74.9.208]) > by hub.freebsd.org (Postfix) with ESMTP id 3919815790 > for ; Thu, 6 Jan 2000 14:18:16 -0800 (PST) > (envelope-from brian@Awfulhak.org) > Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [172.16.0.12]) > by awfulhak.org (8.9.3/8.9.3) with ESMTP id WAA94562; > Thu, 6 Jan 2000 22:18:11 GMT > (envelope-from brian@lan.awfulhak.org) > Received: from hak.lan.Awfulhak.org (localhost.lan.Awfulhak.org [127.0.0.1]) > by hak.lan.Awfulhak.org (8.9.3/8.9.3) with ESMTP id TAA00473; > Thu, 6 Jan 2000 19:27:52 GMT > (envelope-from brian@hak.lan.Awfulhak.org) > Message-Id: <200001061927.TAA00473@hak.lan.Awfulhak.org> > X-Mailer: exmh version 2.1.0 09/18/1999 > To: Garrett Wollman > Cc: freebsd-bugs@FreeBSD.ORG > Subject: Re: bin/15906: rcmd(3) prototype disagrees with definition > In-Reply-To: Message from Garrett Wollman > of "Wed, 05 Jan 2000 09:40:02 PST." <200001051740.JAA13901@freefall.freebsd.org> > Date: Thu, 06 Jan 2000 19:27:52 +0000 > From: Brian Somers > Sender: owner-freebsd-bugs@FreeBSD.ORG > X-Loop: FreeBSD.org > Precedence: bulk > Status: R > > > The following reply was made to PR bin/15906; it has been noted by GNATS. > > > > From: Garrett Wollman > > To: naddy@mips.rhein-neckar.de > > Cc: FreeBSD-gnats-submit@FreeBSD.ORG > > Subject: bin/15906: rcmd(3) prototype disagrees with definition > > Date: Wed, 5 Jan 2000 12:30:19 -0500 (EST) > > > > < said: > > > > >> Synopsis: rcmd(3) prototype disagrees with definition > > > > No, it does not. > > > > > int rcmd __P((char **, int, const char *, > > > const char *, const char *, int *)); > > > > This is the correct prototype for a declaration of the form: > > > > > int > > > rcmd(ahost, rport, locuser, remuser, cmd, fd2p) > > > char **ahost; > > > u_short rport; > > > const char *locuser, *remuser, *cmd; > > > int *fd2p; > > > > > Which instances should be fixed? > > > > Neither. Please read a text on Standard C, such as K&R or H&S. > > Am I missing something ? The function definition, man page and > header file should be consistent. ``int'' != ``u_short'' > irrespective of promotions. u_short is correct (although I don't know > what posix has to say about it). > > > -GAWollman > > -- > Brian > > Don't _EVER_ lose your sense of humour ! > According to ANSI C - a u_short in an old-style header declaration has to match with an `int' in a prototype. If you put u_short in the prototype, and then had an old-style header with u_int in it - the compiler should complain about a redeclaration of the function. - Dave Rivers - To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message