Data type problem
Ralf Corsepius
ralf.corsepius at rtems.org
Tue Oct 16 14:31:06 UTC 2007
On Tue, 2007-10-16 at 09:23 -0500, Joel Sherrill wrote:
> Ralf Corsepius wrote:
> > On Tue, 2007-10-16 at 14:18 +0000, Stéphane ARQUER wrote:
> >
> >> I succeeded to compile with
> >> #include <sys/types.h>
> >>
> > sys/types.h doesn't contain any fixed size types.
> >
> > You want to include <stdint.h> and nothing else.
> >
> I thought some of the code he mentioned had u_long.
u_long is a historic BSD-proprietary type.
It is not a fixed size type nor is it standardized. Some (older) BSD
sources use it for historic reasons, implicitly and bogusly presuming
some implicit sizes.
Portable code should not use it, even less if fixed size types are
desired - BTW: Even BSD is gradually abandoning their historic types in
favor of standardized types.
Ralf
More information about the users
mailing list