This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] Add rebase-dump application to rebase package


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]