Re: [Linux-ia64] C++ doesn't like asm/atomic.h

From: Gary Hade <garyhade_at_us.ibm.com>
Date: 2002-04-09 02:00:42
On Fri, Apr 05, 2002 at 01:54:27PM -0800, David Mosberger wrote:
> >>>>> On Fri, 5 Apr 2002 13:40:34 -0800, Gary Hade <garyhade@us.ibm.com> said:
> 
>   Gary> asm/atomic.h is not palatable to C++ due to it's use of the
>   Gary> C++ keyword "new".
> 
> Eh, the kernel is written in C.  If you have an application that
> includes a kernel header, fix the application---it's broken.  (This
> has been Linus' edict for the last N years, for some N > 3...)
> 
> 	--david

Oops, I must admit that my gray matter is definitely corrupted by 
working on systems where there was an effort to use #ifdef __KERNEL__ 
to keep all kernel-only code from being included in user-level 
application code.

Would it be okay in the Linux world for an application written 
in C++ to use a system call such as query_module(2)?  If so, the 
application code would include <linux/module.h>.  <linux/module.h>
includes <asm/atomic.h> on a line which is not within an 
#ifdef __KERNEL__ region so the same C++ compile failure will occur.

Gary
Received on Mon Apr 08 10:00:08 2002

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:08 EST