X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9d86099269660fb9eab4d146e625cb2a5fff9c14..3871d4ca7599c1156e4cca908ebdeb1474608650:/src/common/sckipc.cpp diff --git a/src/common/sckipc.cpp b/src/common/sckipc.cpp index ec50c99fc9..9787f76858 100644 --- a/src/common/sckipc.cpp +++ b/src/common/sckipc.cpp @@ -22,10 +22,6 @@ // headers // -------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "sckipc.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -89,7 +85,7 @@ static wxSockAddress * GetAddressFromName(const wxString& serverName, const wxString& host = wxEmptyString) { // we always use INET sockets under non-Unix systems -#if defined(__UNIX__) && !defined(__WINDOWS__) && !defined(__WXMAC__) && !defined(__WINE__) +#if defined(__UNIX__) && !defined(__WINDOWS__) && !defined(__WINE__) && (!defined(__WXMAC__) || defined(__DARWIN__)) // under Unix, if the server name looks like a path, create a AF_UNIX // socket instead of AF_INET one if ( serverName.Find(_T('/')) != wxNOT_FOUND ) @@ -167,15 +163,15 @@ wxConnectionBase *wxTCPClient::MakeConnection (const wxString& host, const wxString& serverName, const wxString& topic) { + wxSockAddress *addr = GetAddressFromName(serverName, host); + if ( !addr ) + return NULL; + wxSocketClient *client = new wxSocketClient(SCKIPC_FLAGS); wxSocketStream *stream = new wxSocketStream(*client); wxDataInputStream *data_is = new wxDataInputStream(*stream); wxDataOutputStream *data_os = new wxDataOutputStream(*stream); - wxSockAddress *addr = GetAddressFromName(serverName, host); - if ( !addr ) - return NULL; - bool ok = client->Connect(*addr); delete addr;