On Wed, Oct 09, 2019 at 10:57:20AM +0400, Marc-André Lureau wrote: > Hi > > On Wed, Oct 9, 2019 at 8:03 AM David Gibson <david@xxxxxxxxxxxxxxxxxxxxx> wrote: > > > > On Mon, Oct 07, 2019 at 11:18:03PM +0400, marcandre.lureau@xxxxxxxxxx wrote: > > > From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> > > > > > > Fix mingw cross-compilation: the use of "%z" format and other requires > > > mingw ansi stdio. > > > > Again, can you connec the dots a bit more as to why this breaks mingw. > > https://sourceforge.net/p/mingw-w64/wiki2/printf%20and%20scanf%20family/ > https://sourceforge.net/p/mingw-w64/wiki2/gnu%20printf/ > > dtc uses non-portable formats. Using gnu_printf attributes (for > warnings) in combination with __USE_MINGW_ANSI_STDIO allows to build > for win32. Ok, include that in the commit message please. I do wonder if we should be removing the non-portable formats longer term. dtc is supposed to be portable, although I think we mostly fail because no-one really tests on anything other than Linux. I fixed it up to build on FreeBSD a while back, but I think it's already bitrotted to break that again. > > > > > > > > > Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> > > > --- > > > util.h | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/util.h b/util.h > > > index ca5cb52..347b305 100644 > > > --- a/util.h > > > +++ b/util.h > > > @@ -12,7 +12,7 @@ > > > */ > > > > > > #ifdef __GNUC__ > > > -#define PRINTF(i, j) __attribute__((format (printf, i, j))) > > > +#define PRINTF(i, j) __attribute__((format (gnu_printf, i, j))) > > > #define NORETURN __attribute__((noreturn)) > > > #else > > > #define PRINTF(i, j) > > > -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Attachment:
signature.asc
Description: PGP signature