Re: Where did mach_thread_self() go? (solved)
Re: Where did mach_thread_self() go? (solved)
- Subject: Re: Where did mach_thread_self() go? (solved)
- From: Andrew Pinski <email@hidden>
- Date: Fri, 30 Aug 2002 21:07:28 -0400
On Friday, Aug 30, 2002, at 20:54 US/Eastern, EJ Campbell wrote:
With the help from someone from the Metrowerk's newsgroup, I figured
out the problem. The file, "mach_init.h" (and other system headers)
aren't properly bracketed with the extern "C" keyword. Therefore, the
C++ compiler does not know that the methods defined by them are really
C methods.
Before, I got around this problem by placing an extern "C" block
around the inclusion of "mach_init.h" in my prefix file. However, I
was doing the "mach_init.h" inclusion after including
"Carbon/Carbon.h". This worked fine in Mac OS X 10.1 because
"Carbon/Carbon.h" did not include "mach_init.h". However, with 10.2,
things changed, and some file referenced by "Carbon/Carbon.h" must now
be including "mach_init.h" from outside an extern "C" block. Because
of this, including it again, this time from within the requisite
extern "C" block, had no effect.
Anyway, to make a long story short, I fixed the problem by including
mach_init.h from within an extern "C" block at the top of my prefix
file.
Does anyone know why mach_init.h and some other system headers do not
have the standard extern "C" declaration around them like all the
other headers have?
Because c++ was not around that much when the Mach kernel was being
written and Apple has not fixed the problem because gcc says all system
headers are c headers and act as if they have an extern "c" around them.
Thanks,
Andrew Pinski
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.