[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Version 1.6 does not compile on WIN32
From: |
Riccardo Scandariato |
Subject: |
Version 1.6 does not compile on WIN32 |
Date: |
Fri, 28 Sep 2001 13:23:33 +0200 |
I experienced some bugs. I hope the followings might help in solving
them.
Regards,
--
_____________________________________________________________
Riccardo Scandariato address@hidden
-----------------------------------------------------------
Politecnico di Torino
Dip. Automatica e Informatica
Torino, Italy
_____________________________________________________________
BUG: illegal pure syntax
InetMcastAddrValidator: public InetAddrValidator
{
...
#if __BYTE_ORDER == __BIG_ENDIAN
static const uint32 MCAST_VALID_MASK = 0xF0000000;
static const uint32 MCAST_VALID_VALUE = 0xE0000000;
#else
static const uint32 MCAST_VALID_MASK = 0x000000F0;
static const uint32 MCAST_VALID_VALUE = 0x000000E0;
#endif
...
}
NOTE: static consts must be initialized in inaddr.cpp as follows:
const uint32 InetMcastAddrValidator::MCAST_VALID_MASK = 0xF0000000;
const uint32 InetMcastAddrValidator::MCAST_VALID_VALUE = 0xE0000000;
---------------------------------------------------------------------
BUG: redefinition of default parameter
InetAddress::InetAddress(const InetAddrValidator *validator = NULL)
: validator(validator), ipaddr(NULL), addr_count(0)
{
...
}
InetAddress::InetAddress(const char *address,
const InetAddrValidator *validator = NULL) :
validator(validator), ipaddr(NULL), addr_count(0)
{
...
}
InetAddress::InetAddress(struct in_addr addr,
const InetAddrValidator *validator = NULL) :
validator(validator), ipaddr(NULL)
{
...
}
NOTE: default parameters are already defined in header
(delete NULL here)
---------------------------------------------------------------------
BUG: cannot convert parameter 1 from 'unsigned long' to
'const struct in_addr'
bool InetAddress::setIPAddress(const char *host)
{
...
#if defined(WIN32)
unsigned long n_addr;
n_addr = inet_addr(host);
if ( validator )
(*validator)(n_addr);
if(n_addr == INADDR_NONE)
return false;
*this = n_addr;
#else
...
}
NOTE: replace above code as follows
struct in_addr n_addr;
n_addr.S_un.S_addr = inet_addr(host);
if ( validator )
(*validator)(n_addr);
...
- Version 1.6 does not compile on WIN32,
Riccardo Scandariato <=