From: phough@netcom.com (Paul Houghton) Subject: Re: SLS1.03(99pl11) and DosEmulator Date: Wed, 11 Aug 1993 13:32:16 GMT
Juan Marchini (marchini@ds18.scri.fsu.edu) wrote:
: In article <1993Aug11.000812.12110@kf8nh.wariat.org> bsa@kf8nh.wariat.org (Brandon S. Allbery) writes:
: >In article <CBKCt4.14q@mailer.cc.fsu.edu> marchini@ds18.scri.fsu.edu (Juan Marchini) writes:
: >>extern "C" int printk(const char * fmt, ...);
: >> ^^^
: >>
: >>since i don't know this syntax for an extern defined function in C,
: >
: >Small kernel include files bug. You see, it's *not* legal C.
: >
: >It is, however, perfectly legal C++, which the Linux kernel is currently
: >written in.
: >
: >:-(
: ahhh, of course, i didn't even think of that. so what should i do,
: just keep the files as *.h.c and *.h.c++, and move them over, or make
: a symbolic link when i need to? is there another way i should work
: this? should i even bother to use it the c++ way, even i use c++,
: seeing as you, as i remember it, c++ should accept this?
I would recommend you keep the original .h file and change
extern "C" int printk(const char * fmt, ...);
to
#ifdef __cplusplus
extern "C"
#endif
int printk(const char * fmt, ...);
this is a standard practice for header files. take a
look at /usr/*/g++-include/regex.h
paul
-- IMHO - Paul Houghton - phough@netcom.com