lkml.org 
[lkml]   [1998]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: why asmlinkage is needed?
Hi Andi,

mec> For instance, on linux 2.0.33, compile a C++ program that includes
mec> <linux/md.h>, which has user-space ioctl definitions. The compilation
mec> will blow up on a typedef for lcall7 in <linux/personality.h>.

andi> Just add extern "C" { ... } around the includes then.

Try it. It doesn't help at all.

The problem is in this line in include/linux/personality.h:

/* Prototype for an lcall7 syscall handler. */
typedef asmlinkage void (*lcall7_func)(struct pt_regs *);

In C++, include/linux/linkage.h defines asmlinkage to "extern "C"".
The combination of typedef and extern "C" generates the compilation
error. Wrapping this in extern "C" { ... } does no good at all.

This problem is still in Linux 2.0.35. It has been fixed in the
2.1.XX line by removing the word "asmlinkage" from this line.
Perhaps this change should go into 2.0.36.

Michael Chastain
<mailto:mec@shout.net>
"love without fear"

-
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.altern.org/andrebalsa/doc/lkml-faq.html

\
 
 \ /
  Last update: 2005-03-22 13:44    [W:0.021 / U:0.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site