All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Feix <michal@feix.cz>
To: linux-kernel@vger.kernel.org
Subject: Conflicts in kernel 2.6 headers and {glibc,Xorg}
Date: Sun, 09 Jan 2005 10:20:45 +0100	[thread overview]
Message-ID: <41E0F76D.7080805@feix.cz> (raw)

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
michal@feix.cz

             reply	other threads:[~2005-01-09  9:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-09  9:20 Michal Feix [this message]
2005-01-09 11:06 ` Conflicts in kernel 2.6 headers and {glibc,Xorg} 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41E0F76D.7080805@feix.cz \
    --to=michal@feix.cz \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.