Hello!
I have just encountered a problem with the L4Env I/O client API libio.h if you try to use this in a C++ program. You get a syntax error because there is a variable having the name "class". But that is a C++ keyword.
In l4/include/x86/l4/generic_io/types.h: **************************************** struct l4io_drv: "unsigned class:8;"
struct l4io_pci_dev: "unsigned long class;"
In l4/include/x86/l4/generic_io/libio.h: **************************************** "int l4io_pci_find_class(unsigned long class, ...)"
Although these variable names are possible in C, you run in syntax errors when trying to use these API interfaces in a C++ program. I think these variables should get other names, shouldn't they?
Kind regards Marcel
Hi,
On Mon, Oct 23, 2006 at 06:56:01PM +0200, Marcel Winandy wrote:
I have just encountered a problem with the L4Env I/O client API libio.h if you try to use this in a C++ program. You get a syntax error because there is a variable having the name "class". But that is a C++ keyword.
That's a known issue and I never intended to use libio with C++ code.
Although these variable names are possible in C, you run in syntax errors when trying to use these API interfaces in a C++ program. I think these variables should get other names, shouldn't they?
If you want to use the API in C++ programs: Yes. I will fix this.
Ciao
l4-hackers@os.inf.tu-dresden.de