X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fnetbase.h;h=5bf3fdd2d2a080b1172fe89174d173afceb81175;hb=10db7eddb688a980032d781b190b94955eb1314c;hp=b5f9d5fad98bdd93e84e1ac86ac4cdf993b8e53f;hpb=6b8de05d0a6696dff4b7dccec5b74889f3cdc486;p=novacoin.git diff --git a/src/netbase.h b/src/netbase.h index b5f9d5f..5bf3fdd 100644 --- a/src/netbase.h +++ b/src/netbase.h @@ -1,34 +1,21 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_NETBASE_H #define BITCOIN_NETBASE_H #include #include -#ifdef WIN32 -#define _WIN32_WINNT 0x0501 -#include -#include -#include -#else -#include -#include -#include -#include -#include -#include -#endif -#ifdef BSD -#include -#endif - #include "serialize.h" #include "compat.h" extern int nConnectTimeout; +#ifdef WIN32 +// In MSVC, this is defined as a macro, undefine it to prevent a compile and link error +#undef SetPort +#endif /** IP address (IPv6, or IPv4 using mapped IPv6 range (::FFFF:0:0/96)) */ class CNetAddr @@ -81,7 +68,7 @@ class CNetAddr ) }; -/** A combnation of a network address (CNetAddr) and a (TCP) port */ +/** A combination of a network address (CNetAddr) and a (TCP) port */ class CService : public CNetAddr { protected: @@ -126,10 +113,10 @@ class CService : public CNetAddr ) }; -bool LookupHost(const char *pszName, std::vector& vIP, int nMaxSolutions = 0, bool fAllowLookup = true); -bool LookupHostNumeric(const char *pszName, std::vector& vIP, int nMaxSolutions = 0); +bool LookupHost(const char *pszName, std::vector& vIP, unsigned int nMaxSolutions = 0, bool fAllowLookup = true); +bool LookupHostNumeric(const char *pszName, std::vector& vIP, unsigned int nMaxSolutions = 0); bool Lookup(const char *pszName, CService& addr, int portDefault = 0, bool fAllowLookup = true); -bool Lookup(const char *pszName, std::vector& vAddr, int portDefault = 0, bool fAllowLookup = true, int nMaxSolutions = 0); +bool Lookup(const char *pszName, std::vector& vAddr, int portDefault = 0, bool fAllowLookup = true, unsigned int nMaxSolutions = 0); bool LookupNumeric(const char *pszName, CService& addr, int portDefault = 0); bool ConnectSocket(const CService &addr, SOCKET& hSocketRet, int nTimeout = nConnectTimeout);