Re: [PATCH] C++ breaks on linux/ioport.h

Jamie Lokier (lk@tantalophile.demon.co.uk)
Fri, 28 Apr 2000 02:07:32 +0200


Manfred Spraul wrote:
> Dominik Kubla wrote:
> > extern "C" {
> > #include <linux/header1.h>
> > #include <linux/header2.h>
> > ...
> > }
>
> I tried that a few weeks ago:
> 3 or 4 header files contain variables with the names
>
> new
> virtual
>
> new is reserved, and virtual caused a parse error somewhere in an inline
> function (page->virtual).

That's because Domonik really meant:

extern "C" {
#define new c_new
#define virtual c_virtual
#include <linux/header1.h>
#include <linux/header2.h>
#undef new
#undef virtual
}

have a nice day,
-- Jamie

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