This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
LONG_BIT and WORD_BIT
- From: Joel Sherrill <jrs007 at oarcorp dot com>
- To: newlib at sourceware dot org
- Date: Wed, 22 Nov 2017 14:07:26 -0600
- Subject: LONG_BIT and WORD_BIT
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=joel dot sherrill at oarcorp dot com;
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Hi
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
glibc has them in xopen_lim.h with a number of other constants.
The include of that file has guards like this in limits.h:
#ifdef __USE_XOPEN
# include <bits/xopen_lim.h>
#endif
How do folks feel about adding these? If so, what should they
be derived from and where should they be placed?
Thanks.
--joel