git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58059
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#include "wx/stopwatch.h"
#include "wx/thread.h"
#include "wx/evtloop.h"
#include "wx/stopwatch.h"
#include "wx/thread.h"
#include "wx/evtloop.h"
#include "wx/private/fd.h"
#include "wx/private/socket.h"
#include "wx/private/fd.h"
#include "wx/private/socket.h"
{
// this Initialize() will be undone by wxSocketModule::OnExit(), all
// the other calls to it should be matched by a call to Shutdown()
{
// this Initialize() will be undone by wxSocketModule::OnExit(), all
// the other calls to it should be matched by a call to Shutdown()
+ if (!Initialize())
+ wxLogError("Cannot initialize wxSocketBase");
IMPLEMENT_DYNAMIC_CLASS(wxSocketModule, wxModule)
IMPLEMENT_DYNAMIC_CLASS(wxSocketModule, wxModule)
+// NOTE: we need to force linking against socketiohandler.cpp otherwise in
+// static builds of wxWidgets the ManagerSetter::ManagerSetter ctor
+// contained there wouldn't be ever called
+wxFORCE_LINK_MODULE( socketiohandler )
+
#include "wx/apptrait.h"
#include "wx/private/socket.h"
#include "wx/apptrait.h"
#include "wx/private/socket.h"
// ============================================================================
// implementation
// ============================================================================
// implementation
+
+// see the relative linker macro in socket.cpp
+wxFORCE_LINK_THIS_MODULE( socketiohandler );
+
void wxSocketImplUnix::DoEnableEvents(int flags, bool enable)
{
wxSocketManager * const manager = wxSocketManager::Get();
void wxSocketImplUnix::DoEnableEvents(int flags, bool enable)
{
wxSocketManager * const manager = wxSocketManager::Get();
+ if (!manager)
+ return;
+
if ( enable )
{
if ( flags & wxSOCKET_INPUT_FLAG )
if ( enable )
{
if ( flags & wxSOCKET_INPUT_FLAG )