Date: Mon, 4 Jun 2001 12:59:02 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: Mike Barcroft <mike@q9media.com> Cc: freebsd-arch@freebsd.org, Mike Heffner <mheffner@vt.edu> Subject: Re: Removing __P() (was Re: whois(1) patch) Message-ID: <Pine.BSF.4.21.0106041245240.53715-100000@besplex.bde.org> In-Reply-To: <B7405488.C0D%mike@q9media.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 3 Jun 2001, Mike Barcroft wrote: > On 6/2/01 9:23 AM, Bruce Evans at bde@zeta.org.au wrote: > > > On Fri, 1 Jun 2001, Mike Barcroft wrote: > > > >> Does anyone have any objections to removing __P() and converting prototypes > >> to ANSI C, as part of binary cleaning up/auditing? > > > > Yes. It subtracts value and gives more changes to audit. > > Sorry, I didn't state that question very clearly. I want to silence > warnings with WARNS=2 enabled by converting some variables to const char *. > Since I'm converting variables to ANSI C types, it makes no sense to care > along the __P() support shims because it won't compile on K&R anyway. Am I > correct in my assertion? Not completely. "const" can usually be defined away by compiling with -Dconst=. <sys/cdefs.h> has some support for sort of the reverse of this -- it defines away "const" and some other keywords by default if the compiler is "gcc -traditional", but compiling with -DNO_ANSI_KEYWORDS prevents this. Very old programs may have variables named "const" and defining away "const" would just break them, but defining away "const" usually works for K&R programs. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0106041245240.53715-100000>