2008-09-22 15:23 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/source/rtl/hbinet.c
    ! fixed W32 compilation
This commit is contained in:
Przemyslaw Czerpak
2008-09-22 13:24:14 +00:00
parent d12e752d5f
commit 934e7f3e8e
2 changed files with 18 additions and 12 deletions

View File

@@ -8,6 +8,10 @@
2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2008-09-22 15:23 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rtl/hbinet.c
! fixed W32 compilation
2008-09-21 20:29 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* harbour/contrib/hbwhat/*.c;*.prg
! Prefixed every WHAT specific functions with "WHT_" and

View File

@@ -345,25 +345,27 @@ static struct hostent * hb_getHosts( char * name, HB_SOCKET_STRUCT *Socket )
{
struct hostent *Host = NULL;
/* TOFIX: make it MT safe */
hb_vmUnlock();
/* TOFIX: make it MT safe */
/* let's see if name is an IP address; not necessary on Linux */
#if defined(HB_OS_WIN_32) || defined(HB_OS_OS2)
ULONG ulAddr;
{
ULONG ulAddr;
ulAddr = inet_addr( name );
if( ulAddr == INADDR_NONE )
{
if( strcmp( "255.255.255.255", name ) == 0 )
ulAddr = inet_addr( name );
if( ulAddr == INADDR_NONE )
{
Host = gethostbyaddr( (const char*) &ulAddr, sizeof( ulAddr ), AF_INET );
if( strcmp( "255.255.255.255", name ) == 0 )
{
Host = gethostbyaddr( (const char*) &ulAddr, sizeof( ulAddr ), AF_INET );
}
}
else
{
Host = gethostbyaddr( (const char*) &ulAddr, sizeof( ulAddr ), AF_INET );
}
}
else
{
Host = gethostbyaddr( (const char*) &ulAddr, sizeof( ulAddr ), AF_INET );
}
#endif