missing methods in inttypes.h

Corinna Vinschen vinschen@redhat.com
Fri Aug 2 07:51:00 GMT 2013


On Aug  1 13:44, Eric Blake wrote:
> On 08/01/2013 12:03 PM, Joel Sherrill wrote:
> 
> > Would a simple #define like this be acceptable?
> > 
> > #define imaxabs( _j ) (intmax_t) llabs( _j )
> 
> No, because POSIX requires these to exist as linkable functions (it
> allows macros on top of functions, but the functions must exist).

That, and the alias implementation would fix all your concerns, as
long as the types (long long vs. intmax_t) have the same size.

Do we have targets without long long?  Do we have targets with
intmax_t > long long?  I hope not...


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat



More information about the Newlib mailing list