archive mirror
 help / color / mirror / Atom feed
* Conflicts in kernel 2.6 headers and {glibc,Xorg}
@ 2005-01-09  9:20 Michal Feix
  2005-01-09 11:06 ` Chris Lingard
  2005-01-09 11:08 ` Tomasz Torcz
  0 siblings, 2 replies; 10+ messages in thread
From: Michal Feix @ 2005-01-09  9:20 UTC (permalink / raw)
  To: linux-kernel

Hello evereyone!

First, I'm not on kernel mailing list so please CC any replies to me. 
Thank you.

Yesterday I was recompiling my Linux from Scratch distribution for the 
first time with Linux kernel 2.6.10 headers as a base for glibc. I've 
found, that glibc (and XOrg later on too) won't compile, as there is a 
conflict in certain functions or macros that glibc and Kernel headers 
both define.

One was in asm/bitops.h (strictly speaking, asm-i386/bitops.h) named 
__ffs, which is defined with unsigned long (both for return type and 
parameter) in linux kernel, but as int in glibc sources. Others were in 
asm/system.h. Macro mb() and nop() which conflicts with Xorg sources and 
with one part of KDE as well (mb() macro and kdepim sources).

Now I am a bit confused. To force my glibc, Xorg and KDE to compile 
cleanly, I had to rename these in kernel headers in my /usr/include/asm 
directory, so they are no longer conflicting (which of course breaks the 
  rest of kernel header files, that use these macros), but since I was 
changing only files in /usr/include/asm, it's probably a "no harm done" 
change, as my Kernel has it's own copy of these files.

My question is: is this a bug in glibc and Xorg sources that they 
declare macros and functions with the same name as kernel headers? I 
believe not, as it worked cleanly with kernel 2.4 headers and glibc was 
first to use these names. :)

Or is it a bug in kernel 2.6 headers, which should be fixed by including 
these functions and macros into __KERNEL__ block, so they will not 
collide with userspace sources?

Thanks for reading this to the end... :)

Michal Feix

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-01-09 16:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-09  9:20 Conflicts in kernel 2.6 headers and {glibc,Xorg} Michal Feix
2005-01-09 11:06 ` Chris Lingard
2005-01-09 11:08 ` Tomasz Torcz
2005-01-09 11:35   ` Michal Feix
2005-01-09 11:55     ` Tomasz Torcz
2005-01-09 12:25       ` DervishD
2005-01-09 12:31         ` Arjan van de Ven
2005-01-09 15:02           ` DervishD
2005-01-09 12:59     ` Jesper Juhl
2005-01-09 16:06   ` George Georgalis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).