On Friday 25 December 2009, Freddie Chopin wrote:
> On 2009-12-24 23:07, David Brownell wrote:
> > A better fix would be to use "%zd" (for ssize_t, "%d" signed)
> > not "%zu" (for size_t, "%u" unsigned).
> >
> > Can you submit a patch for all these build problems?
> 
> It seems that MinGW for Windows doesn't understand "%zd" (to be exact 
> the "z" is not implemented), so I think that it's better to print size_t 
> as "%lu". See the attached patch

Thing is, "%lu" assumes sizeof(int) == sizeof(long); and
it doesn't address the fact that "ssize_t" is signed.

(And wasn't the original problem related to *signedness*
not support for the "z" modifier?)

You could however use "%ld" and cast the value to "long",
given that this GCC is ancient enough that "z" loses.

- Dave
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to