On Tue, Jan 26, 2021 at 11:39:52PM +0100, Roland Illig wrote: > The code of usr.bin/make gets distributed to a wider audience by Simon's > bmake distribution (http://www.crufty.net/help/sjg/bmake.html), that's > where the requirement of supporting C89 compilers comes from. At the > time I committed this fix, Simon had managed to dig out an old Solaris 9 > installation with GCC, and these few changes were the only ones needed > to let bmake run on that platform. That sounded easy enough to me.
Also note that we need bmake during bootstrap of pkgsrc, and besides finding a working compiler it is one of the early things you need to make work on an ancient platform if you try to bring it to new use (I have been there with Solaris 2.6 at one point, but gave up for other reasons - and of course the machine in question now runs NetBSD (again) [the Solaris adventure was a temporary thing anyway and as pkgsrc did not help as a "plug and play" way to get a usable dev/debug environment it was not worth pushing]). But I must admit that the *commit log* of that change sounded way more scary than the actual change is: replace %zu with %u in printf calls would be plain wrong and of course break (either at runtime or if lucky at compile time) many, many platforms. But - (void)fprintf(f, "\"%s\" line %zu: ", fname, lineno); + (void)fprintf(f, "\"%s\" line %u: ", fname, (unsigned)lineno); is ok for portable code and "lineno" referencing (I guess) a makefile. It could have been (long unsigned) and "%lu", but maybe portability to systems where that would make a difference is a bit far stretched. Martin