Bug 19996 - limits.h is broken
limits.h is broken
Status: CLOSED DUPLICATE of bug 19088
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2000-10-29 11:36 EST by Neal D. Becker
Modified: 2007-04-18 12:29 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-10-29 11:36:21 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Neal D. Becker 2000-10-29 11:36:19 EST
/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 01:22:49 EST

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

Note You need to log in before you can comment on or make changes to this bug.