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

From: Stepan Kasal (kasal@suse.cz)
Date: Thu Apr 27 2000 - 10:42:28 EST


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/



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