cURL / Mailing Lists / curl-library / Single Mail

curl-library

Solaris 10 autobuild and recvfrom() sixth argument data type

From: Yang Tse <yangsita_at_gmail.com>
Date: Sun, 20 Jul 2008 23:39:16 +0200

Hi,

Afetr the last changes introduced in the configure script to detect
argument types of the recvfrom() it resulted that the Solaris 10 SPARC
Sun C 5.8 autobuilds failed to properly detect the arguments required
for this function.

Further remote debugging shows that the system is using a prototype
for recvfrom() declared in line 427 of "/usr/include/sys/socket.h"
as: function(int, pointer to void, unsigned int, int, pointer to
struct sockaddr, pointer to void) returning int

The strange part is the sixth argument data type "void *"

First reaction has been to 'fix' the detection routine to also check
for a "void *" sixth argument in recvfrom. At least this should allow
proper termination of the build and testing process.

But even on Solaris, I find it quite strange that the 'real' prototype
has a void pointer for the 'fromlen' sixth argument.

Tor, if you're around, would it be possible to verify if the installed
"/usr/include/sys/socket.h" is the proper one ? Or if besides
<sys/types> and <sys/socket> we need to include another header file to
get the proper prototype of recvfrom() ? Or if I'm missing the
definition of some macro ? I'm also considering the possibility of
_REENTRANT not being defined for the test causing the problem.

Before the results of the test can be used I need to know if the void
pointer type is Ok to make a small adjustment or if the header file
will be fixed and the void pointer detection for sixth argument
removed. Or if simply we should just work around this strange issue.

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