cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Solaris 10 autobuild and recvfrom() sixth argument data type

From: Yang Tse <yangsita_at_gmail.com>
Date: Mon, 21 Jul 2008 16:47:23 +0200

2008/7/21, Jamie Lokier wrote:

> Because 'socklen_t' and 'size_t' are unsigned, and 'int' is signed,
> the only compatible prototype is 'void *'.
>
> Provided the type sizes are the same, there's no problem since the
> values are always small and positive.

Yes. But we certainly have to define an in/out variable to pass and
hold a value referenced by the void pointer. I have opted for an
unsigned int, http://cool.haxx.se/cvs.cgi/curl/ares/setup_once.h.diff?r1=1.29&r2=1.30

This should be good enough, as long as the internal implementation of
recvfrom functions with a void pointer prototype for sixth argument
use an int or unsigned int.

Thanks,

-- 
-=[Yang]=-
Received on 2008-07-21