2008-06-30 17:00 UTC+0100 Miguel Angel Marchuet <miguelangel@marchuet.net>
* source/rtl/hbinet.c
+ Added define SOCKET_ERROR, that is missing in some compilers.
This commit is contained in:
@@ -8,6 +8,10 @@
|
||||
2008-12-31 13:59 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2008-06-30 17:00 UTC+0100 Miguel Angel Marchuet <miguelangel@marchuet.net>
|
||||
* source/rtl/hbinet.c
|
||||
+ Added define SOCKET_ERROR, that is missing in some compilers.
|
||||
|
||||
2008-06-30 16:36 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* contrib/hbtip/tests/tiptest.prg
|
||||
! Remove strings as arrays access. Thanks Lorenzo.
|
||||
|
||||
@@ -226,6 +226,12 @@ static void hb_inetLinuxSigusrHandle( int sig )
|
||||
}
|
||||
#endif
|
||||
|
||||
// some compilers has missing this define
|
||||
#ifndef SOCKET_ERROR
|
||||
#define SOCKET_ERROR (-1)
|
||||
#endif
|
||||
|
||||
|
||||
/* JC1: we need it volatile to be minimally thread safe. */
|
||||
static volatile int s_iSessions = 0;
|
||||
|
||||
@@ -472,10 +478,10 @@ static int hb_socketConnect( HB_SOCKET_STRUCT *Socket )
|
||||
int value;
|
||||
socklen_t len = sizeof(value);
|
||||
|
||||
if( getsockopt( Socket->com, SOL_SOCKET, SO_SNDBUF, (char *) &value, &len ) == 0 )
|
||||
if( getsockopt( Socket->com, SOL_SOCKET, SO_SNDBUF, (char *) &value, &len ) != SOCKET_ERROR )
|
||||
{
|
||||
Socket->iSndBufSize = value;
|
||||
if( getsockopt( Socket->com, SOL_SOCKET, SO_RCVBUF, (char *) &value, &len ) == 0 )
|
||||
if( getsockopt( Socket->com, SOL_SOCKET, SO_RCVBUF, (char *) &value, &len ) != SOCKET_ERROR )
|
||||
{
|
||||
Socket->iRcvBufSize = value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user