X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8575ff507f8e66e87f8d32fb8710283082bf4e76..6362d82b3ed82aa6795e4ad03160820f94c9e4d4:/src/common/sckaddr.cpp diff --git a/src/common/sckaddr.cpp b/src/common/sckaddr.cpp index d7da5b72bc..ceccf92083 100644 --- a/src/common/sckaddr.cpp +++ b/src/common/sckaddr.cpp @@ -27,14 +27,14 @@ #include #include - #if !defined(__MWERKS__) && !defined(__SALFORDC__) + #if !defined(__MWERKS__) #include #endif #endif // !WX_PRECOMP -#include "wx/gsocket.h" #include "wx/socket.h" #include "wx/sckaddr.h" +#include "wx/private/socket.h" IMPLEMENT_ABSTRACT_CLASS(wxSockAddress, wxObject) IMPLEMENT_ABSTRACT_CLASS(wxIPaddress, wxSockAddress) @@ -42,7 +42,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxIPV4address, wxIPaddress) #if wxUSE_IPV6 IMPLEMENT_DYNAMIC_CLASS(wxIPV6address, wxIPaddress) #endif -#if defined(__UNIX__) && !defined(__WINDOWS__) && !defined(__WINE__) && (!defined(__WXMAC__) || defined(__DARWIN__)) +#if defined(__UNIX__) && !defined(__WINDOWS__) && !defined(__WINE__) IMPLEMENT_DYNAMIC_CLASS(wxUNIXaddress, wxSockAddress) #endif @@ -145,12 +145,12 @@ bool wxIPV4address::Hostname(const wxString& name) return false; } m_origHostname = name; - return (GAddress_INET_SetHostName(m_address, name.mb_str()) == GSOCK_NOERROR); + return (GAddress_INET_SetHostName(m_address, name.mb_str()) == wxSOCKET_NOERROR); } bool wxIPV4address::Hostname(unsigned long addr) { - bool rv = (GAddress_INET_SetHostAddress(m_address, addr) == GSOCK_NOERROR); + bool rv = (GAddress_INET_SetHostAddress(m_address, addr) == wxSOCKET_NOERROR); if (rv) m_origHostname = Hostname(); else @@ -160,17 +160,17 @@ bool wxIPV4address::Hostname(unsigned long addr) bool wxIPV4address::Service(const wxString& name) { - return (GAddress_INET_SetPortName(m_address, name.mb_str(), "tcp") == GSOCK_NOERROR); + return (GAddress_INET_SetPortName(m_address, name.mb_str(), "tcp") == wxSOCKET_NOERROR); } bool wxIPV4address::Service(unsigned short port) { - return (GAddress_INET_SetPort(m_address, port) == GSOCK_NOERROR); + return (GAddress_INET_SetPort(m_address, port) == wxSOCKET_NOERROR); } bool wxIPV4address::LocalHost() { - return (GAddress_INET_SetHostName(m_address, "localhost") == GSOCK_NOERROR); + return (GAddress_INET_SetHostName(m_address, "localhost") == wxSOCKET_NOERROR); } bool wxIPV4address::IsLocalHost() const @@ -180,12 +180,12 @@ bool wxIPV4address::IsLocalHost() const bool wxIPV4address::BroadcastAddress() { - return (GAddress_INET_SetBroadcastAddress(m_address) == GSOCK_NOERROR); + return (GAddress_INET_SetBroadcastAddress(m_address) == wxSOCKET_NOERROR); } bool wxIPV4address::AnyAddress() { - return (GAddress_INET_SetAnyAddress(m_address) == GSOCK_NOERROR); + return (GAddress_INET_SetAnyAddress(m_address) == wxSOCKET_NOERROR); } wxString wxIPV4address::Hostname() const @@ -253,7 +253,7 @@ bool wxIPV6address::Hostname(const wxString& name) return false; } m_origHostname = name; - return (GAddress_INET6_SetHostName(m_address, name.mb_str()) == GSOCK_NOERROR); + return (GAddress_INET6_SetHostName(m_address, name.mb_str()) == wxSOCKET_NOERROR); } bool wxIPV6address::Hostname(unsigned char addr[16]) @@ -273,17 +273,17 @@ bool wxIPV6address::Hostname(unsigned char addr[16]) bool wxIPV6address::Service(const wxString& name) { - return (GAddress_INET6_SetPortName(m_address, name.mb_str(), "tcp") == GSOCK_NOERROR); + return (GAddress_INET6_SetPortName(m_address, name.mb_str(), "tcp") == wxSOCKET_NOERROR); } bool wxIPV6address::Service(unsigned short port) { - return (GAddress_INET6_SetPort(m_address, port) == GSOCK_NOERROR); + return (GAddress_INET6_SetPort(m_address, port) == wxSOCKET_NOERROR); } bool wxIPV6address::LocalHost() { - return (GAddress_INET6_SetHostName(m_address, "localhost") == GSOCK_NOERROR); + return (GAddress_INET6_SetHostName(m_address, "localhost") == wxSOCKET_NOERROR); } bool wxIPV6address::IsLocalHost() const @@ -306,7 +306,7 @@ bool wxIPV6address::BroadcastAddress() bool wxIPV6address::AnyAddress() { - return (GAddress_INET6_SetAnyAddress(m_address) == GSOCK_NOERROR); + return (GAddress_INET6_SetAnyAddress(m_address) == wxSOCKET_NOERROR); } wxString wxIPV6address::IPAddress() const @@ -356,7 +356,7 @@ wxString wxIPV6address::Hostname() const if ( GAddress_INET6_GetHostName(m_address, hostname, - WXSIZEOF(hostname)) != GSOCK_NOERROR ) + WXSIZEOF(hostname)) != wxSOCKET_NOERROR ) return wxEmptyString; return wxString::FromAscii(hostname); @@ -369,7 +369,7 @@ unsigned short wxIPV6address::Service() const #endif // wxUSE_IPV6 -#if defined(__UNIX__) && !defined(__WINDOWS__) && !defined(__WINE__) && (!defined(__WXMAC__) || defined(__DARWIN__)) +#if defined(__UNIX__) && !defined(__WINDOWS__) && !defined(__WINE__) // --------------------------------------------------------------------------- // wxUNIXaddress