Subject: Re: main return...
To: None <current-users@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: current-users
Date: 03/24/1996 08:47:54
>> I have occasionally seen net source that passes "-Wall -Werror" but
>> so far nothing has passed this;

>> CFLAGS = -ansi -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wwrite-strings \
>>          -Wstrict-prototypes -Wmissing-prototypes -funsigned-char \
>>          -Dscanf=DONT_USE_SCANF -Dgets=DONT_USE_GETS -Werror

> Indeed I'd be surprised if anything can.

As I remarked in another note, much of my code probably would.

> StunOS doesn't include prototypes for all functions in the Sun
> library that are also standard C.  Under these conditions, getting
> missing-prototypes to work properly is impossible.

No.  You just have to treat it as an OS bug and patch over it.
Personally, I do this by maintaining a shadow include tree that holds
fixed copies of OS include files, and the cc (well, gcc) command on my
path is a wrapper that provides the necessary -I options to make it
pick stuff up from the shadow tree.

The only downside to this technique that I've found is that it makes me
forget that the OS include files are broken, which is a problem if/when
I go to distribute my code.  (Yes, I know that missing prototypes is
not "broken" for SunOS - I use the shadow include tree to "fix" other
bugs in the include files too.)

					der Mouse