From: Gary Hade <garyhade@us.ibm.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] C++ doesn't like asm/atomic.h
Date: Mon, 08 Apr 2002 16:00:42 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590701905407@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590701905396@msgid-missing>
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
next prev parent reply other threads:[~2002-04-08 16:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-05 21:40 [Linux-ia64] C++ doesn't like asm/atomic.h Gary Hade
2002-04-05 21:54 ` David Mosberger
2002-04-08 16:00 ` Gary Hade [this message]
2002-04-08 17:26 ` David Mosberger
2002-04-08 17:51 ` Ulrich Drepper
2002-04-08 19:00 ` David Mosberger
2002-04-08 19:23 ` Ulrich Drepper
2002-04-08 19:33 ` Gary Hade
2002-04-08 20:13 ` David Mosberger
2002-04-08 20:23 ` Ulrich Drepper
2002-04-08 20:40 ` David Mosberger
2002-04-08 22:59 ` Keith Owens
2002-04-08 23:27 ` Gary Hade
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=marc-linux-ia64-105590701905407@msgid-missing \
--to=garyhade@us.ibm.com \
--cc=linux-ia64@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.