Subject: Re: CVS commit: src/usr.bin/make
To: James Chacon <jmc@netbsd.org>
From: Simon J. Gerraty <sjg@crufty.net>
List: tech-toolchain
Date: 06/30/2004 22:53:32
>Modified Files:
>	src/usr.bin/make: arch.c compat.c dir.c job.c main.c make.c targ.c
>	    var.c

>Log Message:
>Add some checks for gcc around a few function declarations and note the
>unused variables. Also fix a few other warnings that PR#22118 shows when
>trying to compile bmake on non-NetBSD hosts

This seems a rather ugly solution.  The FreeBSD cdefs.h has things like

#if __GNUC__ // blah
#define __unused        __attribute__((__unused__))
#else
#define __unused
#endif

more detail that that of course, but it allows you to simply put

foo __unused

in a function arg list - which is infinietely preferable to having to 
replicate the function decls.

Please revist this.  I'd rather not import this change into bmake.
Note, if you don't want to rely on cdefs.h you could put something 
similar in make.h - it would still be better than the current 
solution.

Thanks
--sjg