This is the mail archive of the mailing list for the GCC 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: How is limits.h handled ?!?!?

On Mon, 7 Jul 2003, Nathanael Nerode wrote:

> The design seems to be barking mad.  There's glimits.h, gsyslimits.h,
> limitx.h, limity.h, and fixincludes all mucking about together.  And 
> there's a couple of uses of '#include_next'.
> What's actually going on here?  What's the idea?

<limits.h> is required of freestanding implementations, so GCC must 
provide it.  But the C standard specifies that it defines MB_LEN_MAX, 
which is a library property, so that value may need to be got from the 
system library.  And POSIX also specifies some defines for <limits.h> (if 
the relevant feature test macros are defined), so GCC's <limits.h> must 
include the system library's version to get those defines.

(Those are the requirements for GCC's <limits.h> implementation.  Someone
else will need to explain how the implementation design relates to the
requirements, as the only part of the design I'm responsible for is the
use of built-in macros to get the values relating to integer types in
<limits.h> correct in all cases.)

Joseph S. Myers

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