Subject: Re: CVS commit: src/sbin/fdisk
To: Thor Lancelot Simon <tls@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: source-changes
Date: 09/04/2007 09:29:47
On Tue, 04 Sep 2007, Thor Lancelot Simon wrote:
> 	src/sbin/fdisk: fdisk.c
> 
> Log Message:
> This program is a host tool, so when we use newfangled C features like
> PRIxyz we have to ensure it still builds on hosts with Old compilers.
> Noticed while building a cross-toolchain on FreeBSD 4.

I see that the actual change was:

+#ifndef PRId32
+#define PRId32 "ld"
+#endif

A C99 compiler is already a prerequisite for cross building via
build.sh, so I am surprised that we need to do this sort of
thing, but if we do need it, I'd prefer to have it centralised in
src/tools/compat/compat_defs.h.

Perhaps the real problem is that fdisk.c fails to #include <inttypes.h>,
which is where the PRI* macros are supposed to be defined?

--apb (Alan Barrett)