Thread (5 messages) 5 messages, 4 authors, 2002-09-26

Re: [PATCH] remove #ifdef __KERNEL__ from atomic.h

flat view

From: Paul Mackerras <hidden>
Date: 2002-09-25 07:44:07

Ben Stanley writes:
I was trying to compile sumji (formerly xtunes), which requires
libCommonC++. I found that libCommonC++ would not compile, because it
needs to use the atomic functions declared in include/asm-ppc/atomic.h .
However, this file does not declare these functions unless __KERNEL__ is
defined. I believe that this is incorrect.
This has been gone over many times, user programs shouldn't be using
kernel headers.  I don't mind if you change /usr/include/asm/atomic.h,
that's a glibc header not a kernel header, but the #ifdef __KERNEL__
in the kernel header is there precisely to catch this sort of error.

(And of course /usr/include/asm should NOT be a symlink into the
kernel sources.)

Paul.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help