[patch] fix build on architectures with a signed size_t
fw at deneb.enyo.de
Sun Aug 3 15:55:04 PDT 2008
* Matthias Klose:
> attached are three patches to build on architectures with a signed size_t
Yuck. Is this really true? Seems so.
C99 requires size_t to be unsigned (section 18.104.22.168), and so does POSIX.
I suspsect this was also the case in C90, it's not listed as a change in
C99. And if it's unsigned in C90, it's unsigned in C++ (and the The C++
Programming Language, 3rd edition, confirms this). In fact, the GNU C++
standard library assumes that std::size_t is unsigned.
IIRC, there is code out there which performs security checks (against
integer overflows, for instance) and which assumes that size_t is
Call me insane, but it's the architecture that needs fixing, not
More information about the jdk6-dev