Messages in this thread | | | Date | Sun, 16 Aug 1998 08:23:33 -0500 | From | Michael Elizabeth Chastain <> | Subject | Re: 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
| |