Re: warning: implicit declaration of function 'mach_reply_port'
Re: warning: implicit declaration of function 'mach_reply_port'
- Subject: Re: warning: implicit declaration of function 'mach_reply_port'
- From: Jean-Daniel Dupas <email@hidden>
- Date: Sun, 13 Jun 2010 11:48:35 +0200
If you don't find it, just don't use it. It's not as if this call was the only way to allocate a receive right.
mach_port_name_t my_mach_reply_port() {
mach_port_name_t port;
kern_return_t kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &port);
return KERN_SUCCESS == kr ? port : MACH_PORT_NULL;
}
> Yes, it appears to have been in mach/mach_traps.h once.
>
> It also shows in the 2005 and 2007 docs as: extern mach_port_name_t mach_reply_port(void);
>
> which works of course to eliminate the build error message and appears to be current.
>
> But this doesn't answer the question, which is, in essence, where is it now defined?
>
>
>> grep mach_reply_port -r /usr/include/
>
> fishes:
>
> john-macmullins-imac-2:~ johnmacmullin$ grep mach_reply_port -r /usr/include/
> grep: /usr/include/c++/4.0.0/powerpc-apple-darwin10/ppc64: No such file or directory
> grep: /usr/include/c++/4.0.0/powerpc-apple-darwin8/ppc64: No such file or directory
> grep: /usr/include/c++/4.0.0/powerpc-apple-darwin9/ppc64: No such file or directory
> grep: /usr/include/c++/4.2.1/powerpc-apple-darwin10/ppc64: No such file or directory
> grep: /usr/include/c++/4.2.1/powerpc-apple-darwin8/ppc64: No such file or directory
> grep: /usr/include/c++/4.2.1/powerpc-apple-darwin9/ppc64: No such file or directory
>
> I did Spotlight on a number of folders to no avail.
>
> Leaving the question in my mind still unanswered.
>
> On Jun 12, 2010, at 12:28 PM, Jens Alfke wrote:
>
>>
>> On Jun 11, 2010, at 3:08 PM, John MacMullin wrote:
>>
>>> The docs and internet search suggest mach_reply_port is a system call. That being the case, why the message? What's its declaration and am I missing an include?
>>
>> In the spirit of ‘teach a man to fish’:
>> grep mach_reply_port -r /usr/include/
>>
>> —Jens
>
> Best regards,
>
> John MacMullin
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
-- Jean-Daniel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden