This is the mail archive of the
mailing list for the newlib project.
Re: missing methods in inttypes.h
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: newlib at sourceware dot org
- Date: Fri, 2 Aug 2013 09:51:20 +0200
- Subject: Re: missing methods in inttypes.h
- References: <51F678CC dot 2070901 at oarcorp dot com> <20130730091311 dot GM4166 at calimero dot vinschen dot de> <51F7C6FC dot 7070101 at oarcorp dot com> <20130730155734 dot GR4166 at calimero dot vinschen dot de> <51FAA2F0 dot 4010606 at oarcorp dot com> <51FABA86 dot 2030405 at redhat dot com>
- Reply-to: newlib at sourceware dot org
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...