GCC-2.95.1 posix_types.h and linux 2.2.x , 2.3.x

Binaire (binaire@binaire.cx)
Wed, 25 Aug 1999 00:39:18 +0000


Hi ,
I have a problem with gcc-2.95.1 , it's come with a wrapper around posix_types.h :
/* 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__)
#undef __FD_ZERO
#define __FD_ZERO(fdsetp) \
do { \
int __d0, __d1; \
__asm__ __volatile__("cld ; rep ; stosl" \
: "=&c" (__d0), "=&D" (__d1) \
: "a" (0), "0" (__FDSET_LONGS), \
"1" ((__kernel_fd_set *) (fdsetp)) :"memory"); \
} while (0)
#endif

#define _POSIX_TYPES_H_WRAPPER
#endif /* _POSIX_TYPES_H_WRAPPER */

The problem is when I would like to compile a kernel module like vmware or gart-glx : these modules call
linux/types.h which will include asm/posix_types.h ; as gcc-2.95.1 call the wrapper before
asm/posix_types.h : it will include features.h
In features.h there is
/* Suppress kernel-name space pollution unless user expressedly asks
for it. */
#ifndef _LOOSE_KERNEL_NAMES
# define __KERNEL_STRICT_NAMES
#endif

But in linux/types.h we found

#ifndef __KERNEL_STRICT_NAMES

typedef __kernel_fd_set fd_set;
typedef __kernel_dev_t dev_t;
typedef __kernel_ino_t ino_t;
.....

As __KERNEL_STRICT_NAMES is defined by features.h : there is a tone on typedef that will not be
declared by linux/types.h and so the compilation of these modules will fail unless i remove the #include
<features.h> but this include is need for the definition of __GLIBC__

So what is the solution ? fixing kernel tree or gcc-2.95.1 ?

Thank
-vhq

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/