mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Linux Kernel Developer" <linux_developer@hotmail.com>
To: <linux-kernel@vger.kernel.org>
Cc: "Alan Cox" <alan@lxorguk.ukuu.org.uk>
Subject: Re: Need info on the use of certain datastructures and the first C++ keyword patch for 2.2.17
Date: Tue, 31 Oct 2000 03:13:54 -0500	[thread overview]
Message-ID: <OE71gE8Peski0RKGhXc000008a7@hotmail.com> (raw)
In-Reply-To: <E13qEbg-0006rE-00@the-village.bc.nu>

----- Original Message -----
From: "Alan Cox" <alan@lxorguk.ukuu.org.uk>
To: "Linux Kernel Developer" <linux_developer@hotmail.com>
Cc: <linux-kernel@vger.kernel.org>
Sent: Monday, October 30, 2000 8:04 AM
Subject: Re: Need info on the use of certain datastructures and the first
C++ keyword patch for 2.2.17


> > js_dev::new.  My questions are basically this.  If I update these data
> > structure members' names along with the references to them in various C
> > files in the kernel will all be happy in Linuxland.  Can any external
>
> That may well be a problem. Also the use of private.
>
> You may find that creating your own wrappers for these files that do
>
> extern "C" {
> #define new new_
> #define private private_
> #include <linux/foo.h>
> #undef new
> #undef private
> }
>
> safer, since you won't break anything

    That was one of the two possible solutions I was looking at initially.
Having for example a module.hpp header file alongside module.h which did the
extern "C" {} wrapper along with the #define new lk_new, etc.  Actually that
would be an easier task for me as I could easily write a Perl script which
automatically built that for any kernel.  However from the responses I
gathered at the time it was mostly recommended against.  I am also leary at
that option as some variable (and function?) names would differ when used in
either a C or C++ program and also after having seeing the horror Palm did
with defines in their SDK.

    Perhaps this is what I should do.  Continue making the straitforward
fixes that will not break anything and incorporate that into my main patch.
Fixes for situations such as the one I encountered in those 3 data
structures I will put into a separate patch for testing to see if the change
affects anybody.  If those modifications happen prove unwise then for those
rare cases do the .hpp option on those header files.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

      parent reply	other threads:[~2000-10-31  8:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-30 11:09 Linux Kernel Developer
2000-10-30 12:00 ` J . A . Magallon
2000-10-30 12:46   ` Keith Owens
2000-10-31  8:13   ` Linux Kernel Developer
2000-10-30 13:04 ` Alan Cox
2000-10-30 13:20   ` Keith Owens
2000-10-30 13:41     ` Alan Cox
2000-10-30 13:56       ` Keith Owens
2000-10-30 14:02         ` Alan Cox
2000-10-30 14:08           ` Keith Owens
2000-10-30 18:16             ` Alan Cox
2000-10-30 21:04               ` Keith Owens
2000-10-31  8:13   ` Linux Kernel Developer [this message]

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=OE71gE8Peski0RKGhXc000008a7@hotmail.com \
    --to=linux_developer@hotmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --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 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®