This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: 2.95.3 destruction in Linux header
- To: Geoff Keating <geoffk at redhat dot com>, drepper at redhat dot com
- Subject: Re: 2.95.3 destruction in Linux header
- From: Stephen L Moshier <moshier at mediaone dot net>
- Date: Sun, 25 Mar 2001 12:36:49 -0500 (EST)
- cc: gcc-bugs at gcc dot gnu dot org
- Reply-To: moshier at moshier dot ne dot mediaone dot net
> tst.c:
> #include <linux/fs.h>
>
> i486-linux-2.95.3-gcc -D__KERNEL__ -c tst.c
> (hundreds of errors)
Here is where the path of header file self-destruction apparently starts.
On linux, gcc-2.95.3 has a newly invented private header file
/usr/lib/gcc-lib/i486-linux/2.95.3/include/asm/posix_types.h
that references /usr/include/features.h. Upon commenting out that
reference to features.h, the errors go away.
Whatever problem this header file is supposed to solve,
I think the inclusion of a system header should not be part of
the supposed solution. Perhaps, if it is fixing a linux header,
it could get the information it needs from some other linux header?
RCS file: RCS/posix_types.h,v
retrieving revision 1.1
diff -p -r1.1 posix_types.h
*** posix_types.h 2001/03/17 01:35:11 1.1
--- posix_types.h 2001/03/25 17:17:07
***************
*** 1,6 ****
/* This file fixes __FD_ZERO bug for glibc-1.x. */
#ifndef _POSIX_TYPES_H_WRAPPER
! #include <features.h>
#include_next <asm/posix_types.h>
#if defined(__FD_ZERO) && !defined(__GLIBC__)
--- 1,7 ----
/* This file fixes __FD_ZERO bug for glibc-1.x. */
#ifndef _POSIX_TYPES_H_WRAPPER
! /* Including this system header leads to conflicts with kernel
headers.
! include <features.h> */
#include_next <asm/posix_types.h>
#if defined(__FD_ZERO) && !defined(__GLIBC__)