I tried the new modutils release, but it fails to build with messages
similar to the problems with 2.1.55. Something seems still messed up in
the include files.
gcc -O2 -Wall program.c
program.c:806: incompatible types in assignment
program.c:806: warning: left-hand operand of comma expression has no
effect
program.c:806: warning: statement with no effect
make[1]: *** [program.o] Error 1
I'm using 2.1.71 kernel includes.
--------------------------------------------------
No doubt everyone knows by now what is wrong, but just
to be sure let me point out what happens. In
/usr/include/signal.h for libc5 one finds
#define __sigemptyset(set) ((*(set) = 0L), 0)
#define __sigfillset(set) ((*(set) = -1L), 0)
#ifdef __OPTIMIZE__
#define sigemptyset __sigemptyset
#define sigfillset __sigfillset
This means that source compiled against these includes
is syntactically incorrect when it does (as mount does)
sigset_t s;
sigfillset(&s);
now that sigset_t has been redefined by linux-2.1.71 as
typedef struct {
unsigned long sig[2];
} sigset_t;
Of course it has always been a bad idea to use the fast
changing kernel includes to compile user programs with -
programs that compiled yesterday fail to compile today
(and worse, programs that were correct yesterday have
mysterious bugs today).
It would have been better to protect this change with
#ifdef __KERNEL__, but the more often these things happen,
the more quickly people will be chased towards glibc.
Note that this particular problem goes away if you omit
the -O2 flag.
Andries
Note that I do not read linux-kernel or linux-gcc
(do not even know whether this latter list still exists).
cc to aeb@cwi.nl if you want me to see your reply.