[Patch] Add rebase-dump application to rebase package

Charles Wilson cygwin@cwilson.fastmail.fm
Fri Aug 5 13:08:00 GMT 2011


On 8/5/2011 7:31 AM, Corinna Vinschen wrote:
> Your rebase-dump doesn't build cleanly on mingw64:
> Here's my fix:

> -    printf ("== read %u (0x%08x) bytes (database header)\n",
> +    printf ("== read %zu (0x%08zx) bytes (database header)\n",
>  	    sizeof hdr, sizeof hdr);

Unfortunately, msys doesn't support %z:

== read zu (0x0000000zx) bytes (database header)

I see two solutions: (1) #ifdefs in some manner -- e.g. incode, or a
top-of-file defining the string to use for size_t arguments (decimal and
hex) or (2) use a temporary variable of type unsigned long long, and
assign the result of the sizeof() computation to that var, and then use
%llu or %llx.

Which approach do you think is better?

--
Chuck



More information about the Cygwin-apps mailing list