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

Stepan Kasal (kasal@suse.cz)
Thu, 27 Apr 2000 17:42:28 +0200


Hallo,

> > This include didn't work under C++...
>
> Erm... Looks like the whole file needs #ifdef __KERNEL__ around it anyway,
> so I'ld rather add it and be done with the thing. Guts of the kernel
> includes are not supposed to work in userland...

OK, I think I should tell you the truth--I tried to compile brahms,
KDE MIDI beast.

It has #include <linux/mc146818rtc.h> in Brahms/player/rtcclock.cc .
- linux/mc146818rtc.h includes asm/io.h
- on i386 is everythink OK,
but asm-sparc/io.h includes linux/ioports.h, just to have struct resource .

So we need to leave in linux ioport.h at least "extern struct resource" in
user programs include.
Another possibility is to enclose some parts of asm-sparc/io.h to
#ifdef __KERNEL__ (sorry, I haven't checked the Sparc CVS yet).

Have a nice evening,
Stepan

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