Problem with personality.h

Angel Jimenez Jimenez (ajimenez@vnet.es)
Thu, 02 Jan 1997 15:32:13 +0100


Hi,

I'm writing a kernel module in C++, and I'm getting errors while
compiling. The problem is a line in personality.h:

typedef asmlinkage void (*lcall7_func)(struct pt_regs *);

where asmlinkage gets translated in C++ to extern "C". I think the
problem is that the translated sentence:

typedef extern "C" void (*lcall7_func)(struct pt_regs *);

is not C++ standard.

I have been searching about in C++ draft, and found this:

[7.5.6] The linkage of a pointer to function affects only the
pointer.
When the pointer is dereferenced, the function to which it refers is
considered to be a C++ function. There is no way to specify that the
function to which a function pointer refers is written in another
language.

So, it seems to me that the word 'asmlinkage' is not needed in this
case.

BTW, is this the right place to send this message, or do I have to
fordward it to another place?

Angel Jimenez