X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/489468feaa08b8f504735eecca522fb8d0f825d2..eea4d01c65f9b29baa1193db762b4c6b8144af24:/src/osx/core/utilsexc_cf.cpp diff --git a/src/osx/core/utilsexc_cf.cpp b/src/osx/core/utilsexc_cf.cpp index 2d95454fe9..fe010f63be 100644 --- a/src/osx/core/utilsexc_cf.cpp +++ b/src/osx/core/utilsexc_cf.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/mac/corefoundation/utilsexec_cf.cpp +// Name: src/osx/core/utilsexc_cf.cpp // Purpose: Execution-related utilities for Darwin // Author: David Elliott, Ryan Norton (wxMacExecute) // Modified by: Stefan Csomor (added necessary wxT for unicode builds) @@ -7,7 +7,7 @@ // RCS-ID: $Id$ // Copyright: (c) David Elliott, Ryan Norton // Licence: wxWindows licence -// Notes: This code comes from src/mac/carbon/utilsexc.cpp,1.11 +// Notes: This code comes from src/osx/carbon/utilsexc.cpp,1.11 ///////////////////////////////////////////////////////////////////////////// #include "wx/wxprec.h" @@ -110,9 +110,25 @@ int wxGUIAppTraits::AddProcessCallback(wxEndProcessData *proc_data, int fd) // put it in because it's already compiled for wxCocoa and wxMac GUI lib. #if wxUSE_STDPATHS static wxStandardPathsCF gs_stdPaths; -wxStandardPathsBase& wxGUIAppTraits::GetStandardPaths() +wxStandardPaths& wxGUIAppTraits::GetStandardPaths() { return gs_stdPaths; } #endif +#if wxUSE_SOCKETS + +// we need to implement this method in a file of the core library as it should +// only be used for the GUI applications but we can't use socket stuff from it +// directly as this would create unwanted dependencies of core on net library +// +// so we have this global pointer which is set from sockosx.cpp when it is +// linked in and we simply return it from here +extern WXDLLIMPEXP_BASE wxSocketManager *wxOSXSocketManagerCF; +wxSocketManager *wxGUIAppTraits::GetSocketManager() +{ + return wxOSXSocketManagerCF ? wxOSXSocketManagerCF + : wxGUIAppTraitsBase::GetSocketManager(); +} + +#endif // wxUSE_SOCKETS