From 86c5b12b21333e9817bd2d0c21458308390e1524 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 28 Nov 2008 13:37:19 +0000 Subject: [PATCH] also rename gsocketiohandler.* to socketiohandler.* and move it to wxNet where it belongs git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- Makefile.in | 83 +++++++++---------- build/bakefiles/files.bkl | 3 +- .../{gsocketiohandler.h => socketiohandler.h} | 0 include/wx/unix/apptbase.h | 12 --- ...ocketiohandler.cpp => socketiohandler.cpp} | 20 +++-- src/unix/sockunix.cpp | 1 - 6 files changed, 55 insertions(+), 64 deletions(-) rename include/wx/private/{gsocketiohandler.h => socketiohandler.h} (100%) rename src/common/{gsocketiohandler.cpp => socketiohandler.cpp} (90%) diff --git a/Makefile.in b/Makefile.in index 225c4b4b71..8913819b39 100644 --- a/Makefile.in +++ b/Makefile.in @@ -741,7 +741,6 @@ ALL_BASE_SOURCES = \ src/unix/stackwalk.cpp \ src/unix/utilsunx.cpp \ src/unix/mimetype.cpp \ - src/common/gsocketiohandler.cpp \ src/msw/basemsw.cpp \ src/msw/crashrpt.cpp \ src/msw/debughlp.cpp \ @@ -763,7 +762,6 @@ ALL_BASE_SOURCES = \ $(BASE_OSX_SRC) \ src/common/fdiodispatcher.cpp \ src/common/selectdispatcher.cpp \ - src/common/gsocketiohandler.cpp \ src/unix/appunix.cpp \ src/unix/evtloopunix.cpp \ src/unix/timerunx.cpp \ @@ -805,6 +803,7 @@ ALL_BASE_SOURCES = \ src/common/sckstrm.cpp \ src/common/socket.cpp \ src/common/url.cpp \ + src/common/socketiohandler.cpp \ src/unix/sockunix.cpp \ src/osx/core/sockosx.cpp \ src/msw/gsocket.cpp \ @@ -3978,7 +3977,6 @@ COND_PLATFORM_MACOSX_1___BASE_PLATFORM_SRC_OBJECTS = \ COND_PLATFORM_OS2_1___BASE_PLATFORM_SRC_OBJECTS = \ monodll_fdiodispatcher.o \ monodll_selectdispatcher.o \ - monodll_gsocketiohandler.o \ monodll_appunix.o \ monodll_evtloopunix.o \ monodll_timerunx.o \ @@ -4003,8 +4001,7 @@ COND_PLATFORM_UNIX_1___BASE_PLATFORM_SRC_OBJECTS = \ monodll_threadpsx.o \ monodll_unix_stackwalk.o \ monodll_utilsunx.o \ - monodll_unix_mimetype.o \ - monodll_gsocketiohandler.o + monodll_unix_mimetype.o @COND_PLATFORM_UNIX_1@__BASE_PLATFORM_SRC_OBJECTS = $(COND_PLATFORM_UNIX_1___BASE_PLATFORM_SRC_OBJECTS) COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS = \ monodll_basemsw.o \ @@ -4036,9 +4033,11 @@ COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS = \ @COND_TOOLKIT_OSX_COCOA@__BASE_AND_GUI_TOOLKIT_SRC_OBJECTS \ @COND_TOOLKIT_OSX_COCOA@ = monodll_osx_cocoa_utils.o @COND_PLATFORM_MACOSX_1@__NET_PLATFORM_SRC_OBJECTS \ -@COND_PLATFORM_MACOSX_1@ = monodll_sockunix.o monodll_sockosx.o +@COND_PLATFORM_MACOSX_1@ = monodll_socketiohandler.o monodll_sockunix.o \ +@COND_PLATFORM_MACOSX_1@ monodll_sockosx.o @COND_PLATFORM_OS2_1@__NET_PLATFORM_SRC_OBJECTS = monodll_sockunix.o -@COND_PLATFORM_UNIX_1@__NET_PLATFORM_SRC_OBJECTS = monodll_sockunix.o +@COND_PLATFORM_UNIX_1@__NET_PLATFORM_SRC_OBJECTS = \ +@COND_PLATFORM_UNIX_1@ monodll_socketiohandler.o monodll_sockunix.o COND_PLATFORM_WIN32_1___NET_PLATFORM_SRC_OBJECTS = \ monodll_gsocket.o \ monodll_gsockmsw.o \ @@ -5790,7 +5789,6 @@ COND_PLATFORM_MACOSX_1___BASE_PLATFORM_SRC_OBJECTS_1 = \ COND_PLATFORM_OS2_1___BASE_PLATFORM_SRC_OBJECTS_1 = \ monolib_fdiodispatcher.o \ monolib_selectdispatcher.o \ - monolib_gsocketiohandler.o \ monolib_appunix.o \ monolib_evtloopunix.o \ monolib_timerunx.o \ @@ -5815,8 +5813,7 @@ COND_PLATFORM_UNIX_1___BASE_PLATFORM_SRC_OBJECTS_1 = \ monolib_threadpsx.o \ monolib_unix_stackwalk.o \ monolib_utilsunx.o \ - monolib_unix_mimetype.o \ - monolib_gsocketiohandler.o + monolib_unix_mimetype.o @COND_PLATFORM_UNIX_1@__BASE_PLATFORM_SRC_OBJECTS_1 = $(COND_PLATFORM_UNIX_1___BASE_PLATFORM_SRC_OBJECTS_1) COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_1 = \ monolib_basemsw.o \ @@ -5848,9 +5845,11 @@ COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_1 = \ @COND_TOOLKIT_OSX_COCOA@__BASE_AND_GUI_TOOLKIT_SRC_OBJECTS_1 \ @COND_TOOLKIT_OSX_COCOA@ = monolib_osx_cocoa_utils.o @COND_PLATFORM_MACOSX_1@__NET_PLATFORM_SRC_OBJECTS_1 \ -@COND_PLATFORM_MACOSX_1@ = monolib_sockunix.o monolib_sockosx.o +@COND_PLATFORM_MACOSX_1@ = monolib_socketiohandler.o monolib_sockunix.o \ +@COND_PLATFORM_MACOSX_1@ monolib_sockosx.o @COND_PLATFORM_OS2_1@__NET_PLATFORM_SRC_OBJECTS_1 = monolib_sockunix.o -@COND_PLATFORM_UNIX_1@__NET_PLATFORM_SRC_OBJECTS_1 = monolib_sockunix.o +@COND_PLATFORM_UNIX_1@__NET_PLATFORM_SRC_OBJECTS_1 = \ +@COND_PLATFORM_UNIX_1@ monolib_socketiohandler.o monolib_sockunix.o COND_PLATFORM_WIN32_1___NET_PLATFORM_SRC_OBJECTS_1 = \ monolib_gsocket.o \ monolib_gsockmsw.o \ @@ -7639,7 +7638,6 @@ COND_PLATFORM_MACOSX_1___BASE_PLATFORM_SRC_OBJECTS_2 = \ COND_PLATFORM_OS2_1___BASE_PLATFORM_SRC_OBJECTS_2 = \ basedll_fdiodispatcher.o \ basedll_selectdispatcher.o \ - basedll_gsocketiohandler.o \ basedll_appunix.o \ basedll_evtloopunix.o \ basedll_timerunx.o \ @@ -7664,8 +7662,7 @@ COND_PLATFORM_UNIX_1___BASE_PLATFORM_SRC_OBJECTS_2 = \ basedll_threadpsx.o \ basedll_unix_stackwalk.o \ basedll_utilsunx.o \ - basedll_unix_mimetype.o \ - basedll_gsocketiohandler.o + basedll_unix_mimetype.o @COND_PLATFORM_UNIX_1@__BASE_PLATFORM_SRC_OBJECTS_2 = $(COND_PLATFORM_UNIX_1___BASE_PLATFORM_SRC_OBJECTS_2) COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_2 = \ basedll_basemsw.o \ @@ -7733,7 +7730,6 @@ COND_PLATFORM_MACOSX_1___BASE_PLATFORM_SRC_OBJECTS_3 = \ COND_PLATFORM_OS2_1___BASE_PLATFORM_SRC_OBJECTS_3 = \ baselib_fdiodispatcher.o \ baselib_selectdispatcher.o \ - baselib_gsocketiohandler.o \ baselib_appunix.o \ baselib_evtloopunix.o \ baselib_timerunx.o \ @@ -7758,8 +7754,7 @@ COND_PLATFORM_UNIX_1___BASE_PLATFORM_SRC_OBJECTS_3 = \ baselib_threadpsx.o \ baselib_unix_stackwalk.o \ baselib_utilsunx.o \ - baselib_unix_mimetype.o \ - baselib_gsocketiohandler.o + baselib_unix_mimetype.o @COND_PLATFORM_UNIX_1@__BASE_PLATFORM_SRC_OBJECTS_3 = $(COND_PLATFORM_UNIX_1___BASE_PLATFORM_SRC_OBJECTS_3) COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_3 = \ baselib_basemsw.o \ @@ -7843,9 +7838,11 @@ COND_USE_SOSYMLINKS_1___netdll___so_symlinks_uninst_cmd = rm -f \ @COND_USE_SOSYMLINKS_1@__netdll___so_symlinks_uninst_cmd = $(COND_USE_SOSYMLINKS_1___netdll___so_symlinks_uninst_cmd) @COND_PLATFORM_WIN32_1@__netdll___win32rc = netdll_version_rc.o @COND_PLATFORM_MACOSX_1@__NET_PLATFORM_SRC_OBJECTS_2 \ -@COND_PLATFORM_MACOSX_1@ = netdll_sockunix.o netdll_sockosx.o +@COND_PLATFORM_MACOSX_1@ = netdll_socketiohandler.o netdll_sockunix.o \ +@COND_PLATFORM_MACOSX_1@ netdll_sockosx.o @COND_PLATFORM_OS2_1@__NET_PLATFORM_SRC_OBJECTS_2 = netdll_sockunix.o -@COND_PLATFORM_UNIX_1@__NET_PLATFORM_SRC_OBJECTS_2 = netdll_sockunix.o +@COND_PLATFORM_UNIX_1@__NET_PLATFORM_SRC_OBJECTS_2 = \ +@COND_PLATFORM_UNIX_1@ netdll_socketiohandler.o netdll_sockunix.o COND_PLATFORM_WIN32_1___NET_PLATFORM_SRC_OBJECTS_2 = \ netdll_gsocket.o \ netdll_gsockmsw.o \ @@ -7864,9 +7861,11 @@ COND_MONOLITHIC_0_SHARED_0___netlib___depname = \ @COND_USE_PCH_1@_____pch_wxprec_netlib_wx_wxprec_h_gch___depname \ @COND_USE_PCH_1@ = ./.pch/wxprec_netlib/wx/wxprec.h.gch @COND_PLATFORM_MACOSX_1@__NET_PLATFORM_SRC_OBJECTS_3 \ -@COND_PLATFORM_MACOSX_1@ = netlib_sockunix.o netlib_sockosx.o +@COND_PLATFORM_MACOSX_1@ = netlib_socketiohandler.o netlib_sockunix.o \ +@COND_PLATFORM_MACOSX_1@ netlib_sockosx.o @COND_PLATFORM_OS2_1@__NET_PLATFORM_SRC_OBJECTS_3 = netlib_sockunix.o -@COND_PLATFORM_UNIX_1@__NET_PLATFORM_SRC_OBJECTS_3 = netlib_sockunix.o +@COND_PLATFORM_UNIX_1@__NET_PLATFORM_SRC_OBJECTS_3 = \ +@COND_PLATFORM_UNIX_1@ netlib_socketiohandler.o netlib_sockunix.o COND_PLATFORM_WIN32_1___NET_PLATFORM_SRC_OBJECTS_3 = \ netlib_gsocket.o \ netlib_gsockmsw.o \ @@ -16151,11 +16150,11 @@ monodll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONODLL_ODEP) @COND_PLATFORM_MACOSX_1@monodll_utilsunx.o: $(srcdir)/src/unix/utilsunx.cpp $(MONODLL_ODEP) @COND_PLATFORM_MACOSX_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/unix/utilsunx.cpp -@COND_PLATFORM_UNIX_1@monodll_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(MONODLL_ODEP) -@COND_PLATFORM_UNIX_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp +@COND_PLATFORM_UNIX_1@monodll_socketiohandler.o: $(srcdir)/src/common/socketiohandler.cpp $(MONODLL_ODEP) +@COND_PLATFORM_UNIX_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/socketiohandler.cpp -@COND_PLATFORM_OS2_1@monodll_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(MONODLL_ODEP) -@COND_PLATFORM_OS2_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp +@COND_PLATFORM_MACOSX_1@monodll_socketiohandler.o: $(srcdir)/src/common/socketiohandler.cpp $(MONODLL_ODEP) +@COND_PLATFORM_MACOSX_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/socketiohandler.cpp @COND_PLATFORM_UNIX_1@monodll_sockunix.o: $(srcdir)/src/unix/sockunix.cpp $(MONODLL_ODEP) @COND_PLATFORM_UNIX_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/unix/sockunix.cpp @@ -20831,11 +20830,11 @@ monolib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONOLIB_ODEP) @COND_PLATFORM_MACOSX_1@monolib_utilsunx.o: $(srcdir)/src/unix/utilsunx.cpp $(MONOLIB_ODEP) @COND_PLATFORM_MACOSX_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/unix/utilsunx.cpp -@COND_PLATFORM_UNIX_1@monolib_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(MONOLIB_ODEP) -@COND_PLATFORM_UNIX_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp +@COND_PLATFORM_UNIX_1@monolib_socketiohandler.o: $(srcdir)/src/common/socketiohandler.cpp $(MONOLIB_ODEP) +@COND_PLATFORM_UNIX_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/socketiohandler.cpp -@COND_PLATFORM_OS2_1@monolib_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(MONOLIB_ODEP) -@COND_PLATFORM_OS2_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp +@COND_PLATFORM_MACOSX_1@monolib_socketiohandler.o: $(srcdir)/src/common/socketiohandler.cpp $(MONOLIB_ODEP) +@COND_PLATFORM_MACOSX_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/socketiohandler.cpp @COND_PLATFORM_UNIX_1@monolib_sockunix.o: $(srcdir)/src/unix/sockunix.cpp $(MONOLIB_ODEP) @COND_PLATFORM_UNIX_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/unix/sockunix.cpp @@ -23927,12 +23926,6 @@ basedll_cocoa_utils.o: $(srcdir)/src/osx/cocoa/utils.mm $(BASEDLL_ODEP) @COND_PLATFORM_MACOSX_1@basedll_utilsunx.o: $(srcdir)/src/unix/utilsunx.cpp $(BASEDLL_ODEP) @COND_PLATFORM_MACOSX_1@ $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/unix/utilsunx.cpp -@COND_PLATFORM_UNIX_1@basedll_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(BASEDLL_ODEP) -@COND_PLATFORM_UNIX_1@ $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp - -@COND_PLATFORM_OS2_1@basedll_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(BASEDLL_ODEP) -@COND_PLATFORM_OS2_1@ $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp - baselib_appbase.o: $(srcdir)/src/common/appbase.cpp $(BASELIB_ODEP) $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/common/appbase.cpp @@ -24389,12 +24382,6 @@ baselib_cocoa_utils.o: $(srcdir)/src/osx/cocoa/utils.mm $(BASELIB_ODEP) @COND_PLATFORM_MACOSX_1@baselib_utilsunx.o: $(srcdir)/src/unix/utilsunx.cpp $(BASELIB_ODEP) @COND_PLATFORM_MACOSX_1@ $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/unix/utilsunx.cpp -@COND_PLATFORM_UNIX_1@baselib_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(BASELIB_ODEP) -@COND_PLATFORM_UNIX_1@ $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp - -@COND_PLATFORM_OS2_1@baselib_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(BASELIB_ODEP) -@COND_PLATFORM_OS2_1@ $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp - netdll_version_rc.o: $(srcdir)/src/msw/version.rc $(NETDLL_ODEP) $(WINDRES) -i$< -o$@ --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_58) $(__EXCEPTIONS_DEFINE_p_57) $(__RTTI_DEFINE_p_57) $(__THREAD_DEFINE_p_57) --define WXBUILDING --define WXDLLNAME=$(WXDLLNAMEPREFIX)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG) $(__RCDEFDIR_p) --include-dir $(top_srcdir)/include $(__INC_TIFF_BUILD_p_58) $(__INC_TIFF_p_58) $(__INC_JPEG_p_58) $(__INC_PNG_p_57) $(__INC_ZLIB_p_59) $(__INC_REGEX_p_57) $(__INC_EXPAT_p_57) --define wxUSE_GUI=0 --define WXUSINGDLL --define WXMAKINGDLL_NET @@ -24443,6 +24430,12 @@ netdll_net.o: $(srcdir)/src/msw/wince/net.cpp $(NETDLL_ODEP) netdll_sockosx.o: $(srcdir)/src/osx/core/sockosx.cpp $(NETDLL_ODEP) $(CXXC) -c -o $@ $(NETDLL_CXXFLAGS) $(srcdir)/src/osx/core/sockosx.cpp +@COND_PLATFORM_UNIX_1@netdll_socketiohandler.o: $(srcdir)/src/common/socketiohandler.cpp $(NETDLL_ODEP) +@COND_PLATFORM_UNIX_1@ $(CXXC) -c -o $@ $(NETDLL_CXXFLAGS) $(srcdir)/src/common/socketiohandler.cpp + +@COND_PLATFORM_MACOSX_1@netdll_socketiohandler.o: $(srcdir)/src/common/socketiohandler.cpp $(NETDLL_ODEP) +@COND_PLATFORM_MACOSX_1@ $(CXXC) -c -o $@ $(NETDLL_CXXFLAGS) $(srcdir)/src/common/socketiohandler.cpp + @COND_PLATFORM_UNIX_1@netdll_sockunix.o: $(srcdir)/src/unix/sockunix.cpp $(NETDLL_ODEP) @COND_PLATFORM_UNIX_1@ $(CXXC) -c -o $@ $(NETDLL_CXXFLAGS) $(srcdir)/src/unix/sockunix.cpp @@ -24497,6 +24490,12 @@ netlib_net.o: $(srcdir)/src/msw/wince/net.cpp $(NETLIB_ODEP) netlib_sockosx.o: $(srcdir)/src/osx/core/sockosx.cpp $(NETLIB_ODEP) $(CXXC) -c -o $@ $(NETLIB_CXXFLAGS) $(srcdir)/src/osx/core/sockosx.cpp +@COND_PLATFORM_UNIX_1@netlib_socketiohandler.o: $(srcdir)/src/common/socketiohandler.cpp $(NETLIB_ODEP) +@COND_PLATFORM_UNIX_1@ $(CXXC) -c -o $@ $(NETLIB_CXXFLAGS) $(srcdir)/src/common/socketiohandler.cpp + +@COND_PLATFORM_MACOSX_1@netlib_socketiohandler.o: $(srcdir)/src/common/socketiohandler.cpp $(NETLIB_ODEP) +@COND_PLATFORM_MACOSX_1@ $(CXXC) -c -o $@ $(NETLIB_CXXFLAGS) $(srcdir)/src/common/socketiohandler.cpp + @COND_PLATFORM_UNIX_1@netlib_sockunix.o: $(srcdir)/src/unix/sockunix.cpp $(NETLIB_ODEP) @COND_PLATFORM_UNIX_1@ $(CXXC) -c -o $@ $(NETLIB_CXXFLAGS) $(srcdir)/src/unix/sockunix.cpp diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl index 084b122472..4a8dd29745 100644 --- a/build/bakefiles/files.bkl +++ b/build/bakefiles/files.bkl @@ -109,7 +109,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! --> $(BASE_UNIX_AND_DARWIN_NOTWXMAC_SRC) - src/common/gsocketiohandler.cpp $(BASE_UNIX_AND_DARWIN_NOTWXMAC_HDR) @@ -233,7 +232,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! src/common/fdiodispatcher.cpp src/common/selectdispatcher.cpp - src/common/gsocketiohandler.cpp src/unix/appunix.cpp src/unix/evtloopunix.cpp src/unix/timerunx.cpp @@ -535,6 +533,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! + src/common/socketiohandler.cpp src/unix/sockunix.cpp diff --git a/include/wx/private/gsocketiohandler.h b/include/wx/private/socketiohandler.h similarity index 100% rename from include/wx/private/gsocketiohandler.h rename to include/wx/private/socketiohandler.h diff --git a/include/wx/unix/apptbase.h b/include/wx/unix/apptbase.h index a91141b860..4ec132c140 100644 --- a/include/wx/unix/apptbase.h +++ b/include/wx/unix/apptbase.h @@ -43,18 +43,6 @@ public: virtual int AddProcessCallback(wxEndProcessData *data, int fd); - // wxThread helpers - // ---------------- - - // Darwin uses the same wxSocketManager in console and GUI and, like MSW, - // uses SetDefaultSocketManager() to initialize it -#if wxUSE_SOCKETS && !defined(__DARWIN__) - // returns the select()-based socket manager for console applications which - // is also used by some ports (wxX11, wxDFB) in the GUI build (hence it is - // here and not in wxConsoleAppTraits) - virtual wxSocketManager *GetSocketManager(); -#endif - protected: // a helper for the implementation of WaitForChild() in wxGUIAppTraits: // checks the streams used for redirected IO in execData and returns true diff --git a/src/common/gsocketiohandler.cpp b/src/common/socketiohandler.cpp similarity index 90% rename from src/common/gsocketiohandler.cpp rename to src/common/socketiohandler.cpp index f0ea86537e..baa797a74e 100644 --- a/src/common/gsocketiohandler.cpp +++ b/src/common/socketiohandler.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: src/common/gsocketiohandler.cpp +// Name: src/common/socketiohandler.cpp // Purpose: implementation of wxFDIOHandler for wxSocket // Author: Angel Vidal, Lukasz Michalski // Created: 08.24.06 @@ -24,7 +24,7 @@ #include "wx/apptrait.h" #include "wx/unix/private.h" -#include "wx/private/gsocketiohandler.h" +#include "wx/private/socketiohandler.h" // ============================================================================ // implementation @@ -155,11 +155,17 @@ void wxSocketSelectManager::Uninstall_Callback(wxSocketImpl *socket_, } } -wxSocketManager *wxAppTraits::GetSocketManager() +// set the wxBase variable to point to our wxSocketManager implementation +// +// see comments in wx/apptrait.h for the explanation of why do we do it +// like this +static struct ManagerSetter { - static wxSocketSelectManager s_manager; - - return &s_manager; -} + ManagerSetter() + { + static wxSocketSelectManager s_manager; + wxAppTraits::SetDefaultSocketManager(&s_manager); + } +} gs_managerSetter; #endif // wxUSE_SOCKETS diff --git a/src/unix/sockunix.cpp b/src/unix/sockunix.cpp index 0a0fbac716..7fa43200ce 100644 --- a/src/unix/sockunix.cpp +++ b/src/unix/sockunix.cpp @@ -18,7 +18,6 @@ #include "wx/private/fd.h" #include "wx/private/socket.h" #include "wx/unix/private/sockunix.h" -#include "wx/private/gsocketiohandler.h" #if defined(__VISAGECPP__) #define BSD_SELECT /* use Berkeley Sockets select */ -- 2.45.2