This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH 64bit] ssize_t
On Feb 20 11:00, Christopher Faylor wrote:
> On Wed, Feb 20, 2013 at 04:42:02PM +0100, Ralf Corsepius wrote:
> >So far, the best I have been able to come up with for RTEMS, was a
> >pretty unpleasant, error prone and lacking generality preprocessor cascade:
>
> FWIW (and maybe already has already done this research) Linux defines
> "__WORDSIZE" and "__WORDSIZE_COMPAT32" and then defines __SQUAD_TYPE,
> __UQUAD_TYPE, __SWORD_TYPE, etc. ssize_t, ssize_t and others are based
> on those __WORDSIZE. This implementation seems fairly clean to me.
In theory you're right. The problem with __WORDSIZE is just that it's
an architecture specific thingy. So you have to start with defining the
__WORDSIZEes of all newlib-supported CPUs, and only then you can define
ssize_t.
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat