[patch] fix build on architectures with a signed size_t

Florian Weimer 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
> (s390-linux-gnu).

Yuck.  Is this really true?  Seems so.

C99 requires size_t to be unsigned (section, 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 distro-pkg-dev mailing list