This is the mail archive of the gcc@gcc.gnu.org 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: gcc's limits.h vs POSIX


DJ Delorie <dj@redhat.com> writes:

> POSIX defines a list of macros that are to be found in <limits.h> (for
> example, PATH_MAX).
> 
> The <limits.h> that gcc generates does not include these.
> 
> DJGPP's <limits.h>, for example, does.
> 
> How does one get the system's <limits.h> ?

If there is a system limits.h, then the limits.h which gcc installs
should have the line
    #include "syslimits.h"

That file should either be the fixed version of <limits.h> installed
by fixincludes, or, if <limits.h> does not need to be fixed, it should
have the line
    #include_next <limits.h>

See the xlimits.h and stmp-int-hdrs targets in gcc/Makefile.in.

Perhaps config/i386/t-djgpp needs to define LIMITS_H_TEST.

Ian


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