Subject: Re: C Language Standard(s)
To: None <current-users@NetBSD.ORG>
From: Tobias Weingartner <weingart@austin.BrandonU.CA>
List: current-users
Date: 01/10/1996 08:19:51
>
> but how *else* do you do this correctly, for it to work with both
> k&r compilers and "strict ansi" ones ?
>
> i know it's ugly, but, i know of no other way to get the benefits
> of prototypes while still allowing the code to compile with non-ansi
> compilers (which some code that i maintain requires).
>
Is that NetBSD code (kernel/userland), or your own code? I don't see
the problem if you have to maintain your own code, as gcc and most any
C compiler (well, unix C compilers), will eat K&R C code for breakfast.
However, the following should make it quite abundently *CLEAR* that we
need to use either lint, or ANSI-C. Nuff said.
> To: netbsd-gnats@wizardz.com
> From: Daniel Hagerty <hag@wizardz.com>
> Subject: port-hp300/1918: mis-declaration of hilqfree in hil.c
>
> >Number: 1918
> >Category: port-hp300
> >Synopsis: mis-declaration of hilqfree in hil.c
>
> >Description:
> hilqfree from arch/hp300/dev/hil.c is not declared
> properly. The argument 'p' doesn't have a declaration and is assummed
> int. This doesn't show up in kernel's that don't have DEBUG set.
> >How-To-Repeat:
> >Fix:
> This patch should fix it.
>
> diff -c -r1.1.1.2 hil.c
> *** hil.c 1995/12/13 13:26:49 1.1.1.2
> --- hil.c 1996/01/09 08:27:04
> ***************
> *** 1012,1017 ****
> --- 1012,1018 ----
> hilqfree(hilp, qnum, p)
> register struct hil_softc *hilp;
> register int qnum;
> + struct proc *p;
> {
>
> #ifdef DEBUG
> >Audit-Trail:
> >Unformatted:
--Toby.