This is the mail archive of the gcc-bugs@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]

Re: 2.95.3 destruction in Linux header



> 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__)




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