Bug 19996 - limits.h is broken
Summary: limits.h is broken
Status: CLOSED DUPLICATE of bug 19088
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc   
(Show other bugs)
Version: 7.0
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-10-29 16:36 UTC by Neal D. Becker
Modified: 2007-04-18 16:29 UTC (History)
0 users

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: ---


Attachments (Terms of Use)

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/Python.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 ***


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