LONG_BIT and WORD_BIT
Yaakov Selkowitz
yselkowi@redhat.com
Tue Nov 28 08:58:00 GMT 2017
On 2017-11-24 09:21, Corinna Vinschen wrote:
> On Nov 22 14:07, Joel Sherrill wrote:
>> Linux and FreeBSD define LONG_BIT and WORD_BIT which are "CX"
>> category. Newlib doesn't so I would like to discuss how to add them.
>>
>> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html
>>
>> FreeBSD has them guarded like this in sys/types.h:
>>
>> #if __XSI_VISIBLE || __POSIX_VISIBLE >= 200809
>> #define LONG_BIT __LONG_BIT
>> #define WORD_BIT __WORD_BIT
>> #endif
>>
>> How do folks feel about adding these? If so, what should they
>> be derived from and where should they be placed?
>
> Following Opengroup, I guess they should be in limits.h, guarded
> with __POSIX_VISIBLE >= 200809.
The guard is correct in FreeBSD, __XSI_VISIBLE || __POSIX_VISIBLE >= 200809.
> Yaakov, what about Cygwin's limits.h? It already defines LONG_BIT and
> WORD_BIT, but neglects to guard them.
I'll write a patch.
--
Yaakov Selkowitz
Software Engineer - Platform Enablement Group
Red Hat, Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: OpenPGP digital signature
URL: <http://sourceware.org/pipermail/newlib/attachments/20171128/5cd6fe15/attachment.sig>
More information about the Newlib
mailing list