This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: missing methods in inttypes.h


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]