mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bernd Petrovitsch <bernd@firmix.at>
To: Esben Nielsen <simlo@phys.au.dk>
Cc: Valdis.Kletnieks@vt.edu, Jesper Juhl <jesper.juhl@gmail.com>,
	"Budde, Marco" <budde@telos.de>,
	linux-kernel@vger.kernel.org
Subject: Re: kbuild & C++
Date: Wed, 07 Sep 2005 13:44:53 +0200	[thread overview]
Message-ID: <1126093493.24425.62.camel@tara.firmix.at> (raw)
In-Reply-To: <Pine.OSF.4.05.10509071055180.21532-100000@da410.phys.au.dk>

On Wed, 2005-09-07 at 11:21 +0200, Esben Nielsen wrote:
> On Tue, 6 Sep 2005 Valdis.Kletnieks@vt.edu wrote:
> 
> > On Wed, 07 Sep 2005 00:20:11 +0200, Esben Nielsen said:
> > 
> > > Which is too bad. You can do stuff much more elegant, effectively and
> > > safer in C++ than in C. Yes, you can do inheritance in C, but it leaves
> > > it up to the user to make sure the type-casts are done OK every time. You
> > > can with macros do some dynamic typing, but not nearly as effectively as
> > > with templates, and those macros always comes very, very ugly. (Some say
> > > templates are ugly, but they first become ugly when they are used
> > > way beyond what you can do with macros.)
> > > 
> > > I think it can only be a plus to Linux to add C++ support for at least
> > > out-of-mainline drivers. Adding drivers written in C++ into the mainline
> > > is another thing.
> > 
> > http://www.tux.org/lkml/#s15-3 Why don't we rewrite the Linux kernel in C++?
> 
> I can't see it should be _that_ hard to make the kernel C++ friendly. At work 
> I use a RTOS written in plain C but where you can easily use C++ in kernel
> space (there is no user-space :-). We use gcc by the way.

Of course. Probably the easiest way is
-) to provide a pure C interface (read: write functions with C linkage
   that call your C++ stuff) to your C++ stuff
-) compile your C++ sources separately
-) kill all not-existing features needed by the linker and other
   programs (or implement them in the kernel/your module).

> PS. Do the above people break GPL by forcing people to accept a
> license-agreement before downloading a patch to the kernel? Shouldn't they
> provide a direct url?

As long as the license agreement does not conflict with the GPL, I can't
see a legal problem. And you can download their source - which is
probably GPL - and put it online wherever you want.
It is inpolite though, IMHO. But it is also inpolite to top-post, break
threads, include meaningless disclaimers, etc.

	Bernd
-- 
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services


  parent reply	other threads:[~2005-09-07 11:45 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-06 11:23 Budde, Marco
2005-09-06 11:30 ` Bernd Petrovitsch
2005-09-06 21:08   ` Chris Frey
2005-09-07  6:39     ` Bernd Petrovitsch
2005-09-06 11:38 ` linux-os (Dick Johnson)
2005-09-06 21:20 ` Jesper Juhl
2005-09-06 22:20   ` Esben Nielsen
2005-09-06 22:22     ` Randy.Dunlap
2005-09-06 22:32     ` Jesper Juhl
2005-09-07  2:33     ` Valdis.Kletnieks
2005-09-07  9:21       ` Esben Nielsen
2005-09-07 10:11         ` Valdis.Kletnieks
2005-09-07 10:58           ` Esben Nielsen
2005-09-07 11:44         ` Bernd Petrovitsch [this message]
2005-09-06 21:41 ` Sam Ravnborg
2005-09-10 12:29 ` Sam Ravnborg
2005-09-07  9:13 Budde, Marco
2005-09-07  9:57 ` Valdis.Kletnieks
2005-09-07 10:45   ` Esben Nielsen
2005-09-07 10:00 ` Bernd Petrovitsch
2005-09-07 10:17 Budde, Marco
2005-09-07 18:52 ` Lee Revell
     [not found] <4JJOt-77X-9@gated-at.bofh.it>
2005-09-07 12:02 ` Bodo Eggert
2005-09-07 12:04 Budde, Marco
2005-09-07 12:58 ` Bernd Petrovitsch
2005-09-07 13:15 ` Nick Piggin
2005-09-15 12:35 Budde, Marco
2005-09-18 18:41 ` Sam Ravnborg

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=1126093493.24425.62.camel@tara.firmix.at \
    --to=bernd@firmix.at \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=budde@telos.de \
    --cc=jesper.juhl@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=simlo@phys.au.dk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®