Bug 19996

Summary: limits.h is broken
Product: [Retired] Red Hat Linux Reporter: Neal D. Becker <nbecker>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED DUPLICATE QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-10-29 16:36:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Neal D. Becker 2000-10-29 16:36:19 UTC
/usr/include/bits/xopen_lim.h requires INT_MAX be defined, but xopen_lim.h is included before it's defined.

INT_MAX is defined in /usr/lib/gcc-lib/i386-redhat-linux/2.96/include/limits.h

But look what happens:

nbecker:/usr/local/src/Python-2.0/Parser% gcc -g -O2 -Wall -Wstrict-prototypes -I./../Include -I.. -DHAVE_CONFIG_H -c -o node.o node.c -save-temps -H
. ../Include/patchlevel.h
. ../config.h
. /usr/lib/gcc-lib/i386-redhat-linux/2.96/include/limits.h
.. /usr/lib/gcc-lib/i386-redhat-linux/2.96/include/syslimits.h
... /usr/lib/gcc-lib/i386-redhat-linux/2.96/include/limits.h
.... /usr/include/limits.h
..... /usr/include/features.h
...... /usr/include/sys/cdefs.h
...... /usr/include/gnu/stubs.h
..... /usr/include/bits/posix1_lim.h
...... /usr/include/bits/local_lim.h
....... /usr/include/linux/limits.h
..... /usr/include/bits/posix2_lim.h
..... /usr/include/bits/xopen_lim.h

See?  xopen_lim.h is included before limits.h is finished, and before INT_MAX is defined.

Comment 1 Jakub Jelinek 2000-10-30 06:22:49 UTC

*** This bug has been marked as a duplicate of 19088 ***