A common way of handling these types of format-string differences for 32/64 bit cases is to define macros named things like PRIX32 which expands to the proper % sequence to print a 32-bit number as hex. We could do something similar for size_t and introduce something like PRIuSIZE. For anything C99-compliant, it would expand to %zu, but for mingw, it would expand to the appropriate size for the bitness of the host.

--
Rick Altherr
[email protected]

"He said he hadn't had a byte in three days. I had a short, so I split it with him."
 -- Unsigned



On May 17, 2009, at 6:04 AM, Øyvind Harboe wrote:

On Sun, May 17, 2009 at 11:20 AM, Michael Bruck <[email protected]> wrote:
At least the arm11 port has a macro ZU that is intended to be used
when size_t is printed. I recently saw a patch that ignored that, but
I didn't comment on this error because it is like fighting windmills.
Someone who regularly compiles mingw (or a cross-compile farm) would
be in a better position to consistently highlight such issues.

How about finding some library/implementation of sprintf() that
we can statically link with OpenOCD rather than relying on
the underlying OS/runtimes?
--
Øyvind Harboe
Embedded software and hardware consulting services
http://consulting.zylin.com
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Attachment: smime.p7s
Description: S/MIME cryptographic signature

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

Reply via email to