Commit Graph

6 Commits

Author SHA1 Message Date
Rich Felker 7cc79d10af define LONG_MAX via arch alltypes.h, strip down bits/limits.h
LLONG_MAX is uniform for all archs we support and plenty of header and
code level logic assumes it is, so it does not make sense for limits.h
bits mechanism to pretend it's variable.

LONG_BIT can be defined in terms of LONG_MAX; there's no reason to put
it in bits.

by moving LONG_MAX definition to __LONG_MAX in alltypes.h and moving
LLONG_MAX out of bits, there are now no plain-C limits that are
defined in the bits header, so the bits header only needs to be
included in the POSIX or extended profiles. this allows the feature
test macro logic to be removed from the bits header, facilitating a
long-term goal of getting such logic out of bits.

having __LONG_MAX in alltypes.h will allow further generalization of
headers.

archs without a constant PAGESIZE no longer need bits/limits.h at all.
2019-10-17 19:23:39 -04:00
Rich Felker c9c2cd3e69 reverse definition dependency between PAGESIZE and PAGE_SIZE
PAGESIZE is actually the version defined in POSIX base, with PAGE_SIZE
being in the XSI option. use PAGESIZE as the underlying definition to
facilitate making exposure of PAGE_SIZE conditional.
2018-03-10 17:47:14 -05:00
Rich Felker 030b452b8d fix missing _BSD_SOURCE support in bits/*.h
this is actually rather ugly, and would get even uglier if we ever
want to support further feature test macros. at some point i may
factor the bits headers into separate files for C base, POSIX base,
and nonstandard extensions (the only distinctions that seem to matter
now) and then the logic for which to include can go in the main header
rather than being duplicated for each arch. the downside of this is
that it would result in more files having to be opened during
compilation, so as long as the ugliness does not grow, i'm inclined to
leave it alone for now.
2012-05-22 22:12:10 -04:00
Rich Felker e8b8f3c90e move all limits that don't vary out of bits/limits.h, into main limits.h 2011-06-25 15:38:00 -04:00
Rich Felker f451462098 fix the types of some integer constant limits in headers 2011-02-15 19:15:45 -05:00
Rich Felker 1355fdca7c preparing build system to handle ports - step 1 2011-02-15 00:33:23 -05:00