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

From: Jamie Lokier (lk@tantalophile.demon.co.uk)
Date: Fri Apr 28 2000 - 07:09:00 EST


Manfred Spraul wrote:
> > 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
> > }
>
> Ok, I tried that, but there is still one remaining problem:
> the "page_address()" macro dereferences virtual, thus you cannot use
> page_address() from within the cpp module.

Just leave out the #undefs. You're not actually using new & virtual in
your code, are you? :-)

-- 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/



This archive was generated by hypermail 2b29 : Sun Apr 30 2000 - 21:00:15 EST