From f5c6eb5c178b44f4400495e06274ffd130635190 Mon Sep 17 00:00:00 2001 From: Gilles Depeyrot Date: Sun, 15 Jul 2001 21:12:31 +0000 Subject: [PATCH] modified configure to allow configuration of wxMotif under Darwin/Mac OS X wxWindows can be configured as wxMac or wxMotif under Mac OS X replaced __WXMAC_X__ define by __DARWIN__ (general Darwin related issues) moved dlopen/dlerror code to dynlib.cpp to make it available for wxMotif git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/app.cpp | 12 ++++++------ src/mac/bitmap.cpp | 4 ++-- src/mac/button.cpp | 2 +- src/mac/carbon/app.cpp | 12 ++++++------ src/mac/carbon/bitmap.cpp | 4 ++-- src/mac/carbon/button.cpp | 2 +- src/mac/carbon/dc.cpp | 2 +- src/mac/carbon/dirdlg.cpp | 2 +- src/mac/carbon/dirmac.cpp | 6 +++--- src/mac/carbon/dnd.cpp | 8 ++++---- src/mac/carbon/gsocket.c | 6 +++--- src/mac/carbon/listbox.cpp | 2 +- src/mac/carbon/menu.cpp | 8 ++++---- src/mac/carbon/notebmac.cpp | 4 ++-- src/mac/carbon/pnghand.cpp | 2 +- src/mac/carbon/textctrl.cpp | 4 ++-- src/mac/carbon/uma.cpp | 4 ++-- src/mac/carbon/utils.cpp | 8 ++++---- src/mac/carbon/utilsexc.cpp | 8 ++++---- src/mac/dc.cpp | 2 +- src/mac/dirdlg.cpp | 2 +- src/mac/dirmac.cpp | 6 +++--- src/mac/dnd.cpp | 8 ++++---- src/mac/gsocket.c | 6 +++--- src/mac/listbox.cpp | 2 +- src/mac/menu.cpp | 8 ++++---- src/mac/notebmac.cpp | 4 ++-- src/mac/pnghand.cpp | 2 +- src/mac/textctrl.cpp | 4 ++-- src/mac/uma.cpp | 4 ++-- src/mac/utils.cpp | 8 ++++---- src/mac/utilsexc.cpp | 8 ++++---- 32 files changed, 82 insertions(+), 82 deletions(-) diff --git a/src/mac/app.cpp b/src/mac/app.cpp index 4e4699db1d..5cc6077376 100644 --- a/src/mac/app.cpp +++ b/src/mac/app.cpp @@ -40,7 +40,7 @@ // mac -#ifndef __UNIX__ +#ifndef __DARWIN__ #if __option(profile) #include #endif @@ -52,7 +52,7 @@ #include "wx/mac/macnotfy.h" #if wxUSE_SOCKETS - #ifdef __APPLE__ + #ifdef __DARWIN__ #include #else #include @@ -374,7 +374,7 @@ bool wxApp::Initialize() #endif -#ifndef __UNIX__ +#ifndef __DARWIN__ // test the minimal configuration necessary #if !TARGET_CARBON @@ -427,7 +427,7 @@ bool wxApp::Initialize() return FALSE ; } -#ifndef __UNIX__ +#ifndef __DARWIN__ #if __option(profile) ProfilerInit( collectDetailed, bestTimeBase , 20000 , 40 ) ; #endif @@ -435,7 +435,7 @@ bool wxApp::Initialize() // now avoid exceptions thrown for new (bad_alloc) -#ifndef __UNIX__ +#ifndef __DARWIN__ std::__throws_bad_alloc = FALSE ; #endif @@ -544,7 +544,7 @@ void wxApp::CleanUp() wxClassInfo::CleanUpClasses(); -#ifndef __UNIX__ +#ifndef __DARWIN__ #if __option(profile) ProfilerDump( "\papp.prof" ) ; ProfilerTerm() ; diff --git a/src/mac/bitmap.cpp b/src/mac/bitmap.cpp index 409d2fb3a8..ff66eaff0f 100644 --- a/src/mac/bitmap.cpp +++ b/src/mac/bitmap.cpp @@ -29,7 +29,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxBitmapBase , wxGDIObject ) IMPLEMENT_ABSTRACT_CLASS(wxBitmapHandlerBase, wxObject ) #endif -#ifdef __UNIX__ +#ifdef __DARWIN__ #include #else #include @@ -841,7 +841,7 @@ PicHandle wxBitmap::GetPict() const if( mask ) { -#ifdef __UNIX__ +#ifdef __DARWIN__ RGBColor trans = white; #else RGBBackColor( &gray ); diff --git a/src/mac/button.cpp b/src/mac/button.cpp index d4837fd54a..363789a945 100644 --- a/src/mac/button.cpp +++ b/src/mac/button.cpp @@ -57,7 +57,7 @@ void wxButton::SetDefault() panel->SetDefaultItem(this); } -#ifdef __UNIX__ +#ifdef __DARWIN__ Boolean inData; if ( btnOldDefault && btnOldDefault->m_macControl ) { diff --git a/src/mac/carbon/app.cpp b/src/mac/carbon/app.cpp index 4e4699db1d..5cc6077376 100644 --- a/src/mac/carbon/app.cpp +++ b/src/mac/carbon/app.cpp @@ -40,7 +40,7 @@ // mac -#ifndef __UNIX__ +#ifndef __DARWIN__ #if __option(profile) #include #endif @@ -52,7 +52,7 @@ #include "wx/mac/macnotfy.h" #if wxUSE_SOCKETS - #ifdef __APPLE__ + #ifdef __DARWIN__ #include #else #include @@ -374,7 +374,7 @@ bool wxApp::Initialize() #endif -#ifndef __UNIX__ +#ifndef __DARWIN__ // test the minimal configuration necessary #if !TARGET_CARBON @@ -427,7 +427,7 @@ bool wxApp::Initialize() return FALSE ; } -#ifndef __UNIX__ +#ifndef __DARWIN__ #if __option(profile) ProfilerInit( collectDetailed, bestTimeBase , 20000 , 40 ) ; #endif @@ -435,7 +435,7 @@ bool wxApp::Initialize() // now avoid exceptions thrown for new (bad_alloc) -#ifndef __UNIX__ +#ifndef __DARWIN__ std::__throws_bad_alloc = FALSE ; #endif @@ -544,7 +544,7 @@ void wxApp::CleanUp() wxClassInfo::CleanUpClasses(); -#ifndef __UNIX__ +#ifndef __DARWIN__ #if __option(profile) ProfilerDump( "\papp.prof" ) ; ProfilerTerm() ; diff --git a/src/mac/carbon/bitmap.cpp b/src/mac/carbon/bitmap.cpp index 409d2fb3a8..ff66eaff0f 100644 --- a/src/mac/carbon/bitmap.cpp +++ b/src/mac/carbon/bitmap.cpp @@ -29,7 +29,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxBitmapBase , wxGDIObject ) IMPLEMENT_ABSTRACT_CLASS(wxBitmapHandlerBase, wxObject ) #endif -#ifdef __UNIX__ +#ifdef __DARWIN__ #include #else #include @@ -841,7 +841,7 @@ PicHandle wxBitmap::GetPict() const if( mask ) { -#ifdef __UNIX__ +#ifdef __DARWIN__ RGBColor trans = white; #else RGBBackColor( &gray ); diff --git a/src/mac/carbon/button.cpp b/src/mac/carbon/button.cpp index d4837fd54a..363789a945 100644 --- a/src/mac/carbon/button.cpp +++ b/src/mac/carbon/button.cpp @@ -57,7 +57,7 @@ void wxButton::SetDefault() panel->SetDefaultItem(this); } -#ifdef __UNIX__ +#ifdef __DARWIN__ Boolean inData; if ( btnOldDefault && btnOldDefault->m_macControl ) { diff --git a/src/mac/carbon/dc.cpp b/src/mac/carbon/dc.cpp index f66cf27357..f4bf8ea95c 100644 --- a/src/mac/carbon/dc.cpp +++ b/src/mac/carbon/dc.cpp @@ -38,7 +38,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) #define twips2mm 0.0176388888889 #define mm2pt 2.83464566929 #define pt2mm 0.352777777778 -#ifndef __UNIX__ +#ifndef __DARWIN__ const double M_PI = 3.14159265358979 ; #endif const double RAD2DEG = 180.0 / M_PI; diff --git a/src/mac/carbon/dirdlg.cpp b/src/mac/carbon/dirdlg.cpp index d1d906478c..83533f1236 100644 --- a/src/mac/carbon/dirdlg.cpp +++ b/src/mac/carbon/dirdlg.cpp @@ -20,7 +20,7 @@ #include "wx/cmndata.h" -#if defined(__UNIX__) +#ifdef __DARWIN__ #include #else #include diff --git a/src/mac/carbon/dirmac.cpp b/src/mac/carbon/dirmac.cpp index 2a3e4c7221..36835cd68c 100644 --- a/src/mac/carbon/dirmac.cpp +++ b/src/mac/carbon/dirmac.cpp @@ -36,11 +36,11 @@ #include "wx/dir.h" #include "wx/filefn.h" // for wxPathExists() -#ifndef __WXMAC_X__ +#ifndef __DARWIN__ #include #endif -#if defined(__WXMAC__) && !defined(__UNIX__) +#ifndef __DARWIN__ #include "morefile.h" #include "moreextr.h" #include "fullpath.h" @@ -118,7 +118,7 @@ wxDirData::wxDirData(const wxString& dirname) m_CPB.hFileInfo.ioNamePtr = m_name ; m_index = 0 ; -#ifdef __WXMAC_X__ +#ifdef __DARWIN__ // TODO: what are we supposed to do for Mac OS X #else FSpGetDirectoryID( &fsspec , &m_dirId , &m_isDir ) ; diff --git a/src/mac/carbon/dnd.cpp b/src/mac/carbon/dnd.cpp index ece56ce7d3..42b397d590 100644 --- a/src/mac/carbon/dnd.cpp +++ b/src/mac/carbon/dnd.cpp @@ -39,7 +39,7 @@ wxDropTarget::~wxDropTarget() // ---------------------------------------------------------------------------- // wxTextDropTarget // ---------------------------------------------------------------------------- -#ifndef __WXMAC_X__ +#ifndef __DARWIN__ bool wxTextDropTarget::OnDrop( wxCoord x, wxCoord y, const void *pData ) { OnDropText( x, y, (const char*)pData ); @@ -54,7 +54,7 @@ bool wxTextDropTarget::OnDropText( wxCoord x, wxCoord y, const wxString &psz ) return TRUE; }; -#ifndef __WXMAC_X__ +#ifndef __DARWIN__ size_t wxTextDropTarget::GetFormatCount() const { return 1; @@ -70,7 +70,7 @@ wxDataFormat wxTextDropTarget::GetFormat(size_t WXUNUSED(n)) const // wxFileDropTarget // ---------------------------------------------------------------------------- -#ifndef __WXMAC_X__ +#ifndef __DARWIN__ bool wxFileDropTarget::OnDropFiles( wxCoord x, wxCoord y, size_t nFiles, const char * const WXUNUSED(aszFiles)[] ) { printf( "Got %d dropped files.\n", (int)nFiles ); @@ -84,7 +84,7 @@ bool wxFileDropTarget::OnDrop(wxCoord x, wxCoord y, const wxArrayString& filenam return OnDropFiles(x, y, 1, &filenames); } -#ifndef __WXMAC_X__ +#ifndef __DARWIN__ size_t wxFileDropTarget::GetFormatCount() const { return 1; diff --git a/src/mac/carbon/gsocket.c b/src/mac/carbon/gsocket.c index 20e4049f58..10ee5d838d 100644 --- a/src/mac/carbon/gsocket.c +++ b/src/mac/carbon/gsocket.c @@ -19,7 +19,7 @@ #if wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) -#ifdef __UNIX__ +#ifdef __DARWIN__ #include #ifndef FALSE @@ -80,7 +80,7 @@ void wxCYield() ; #define qDebug2 1 extern pascal void OTDebugStr(const char* str); #endif -#ifndef __UNIX__ +#ifndef __DARWIN__ #include #endif InetSvcRef gInetSvcRef = 0 ; @@ -121,7 +121,7 @@ OSStatus DoNegotiateIPReuseAddrOption(EndpointRef ep, Boolean enableReuseIPMode) ret.opt.maxlen = kOTFourByteOptionSize; opt->level = INET_IP; // dealing with an IP Level function -#ifdef __UNIX__ +#ifdef __DARWIN__ opt->name = kIP_REUSEADDR; #else opt->name = IP_REUSEADDR; diff --git a/src/mac/carbon/listbox.cpp b/src/mac/carbon/listbox.cpp index 4624d820db..4e737dc2f6 100644 --- a/src/mac/carbon/listbox.cpp +++ b/src/mac/carbon/listbox.cpp @@ -20,7 +20,7 @@ #include "wx/log.h" #include "wx/utils.h" -#ifdef __UNIX__ +#ifdef __DARWIN__ #include "ldef/extldef.h" #else #include "extldef.h" diff --git a/src/mac/carbon/menu.cpp b/src/mac/carbon/menu.cpp index d1d5a84771..6956a0987a 100644 --- a/src/mac/carbon/menu.cpp +++ b/src/mac/carbon/menu.cpp @@ -56,7 +56,7 @@ const short kwxMacAppleMenuId = 1 ; // Construct a menu with optional title (then use append) -#ifdef __UNIX__ +#ifdef __DARWIN__ short wxMenu::s_macNextMenuId = 3 ; #else short wxMenu::s_macNextMenuId = 2 ; @@ -450,7 +450,7 @@ bool wxMenu::MacMenuSelect( wxEvtHandler* handler, long when , int macMenuId, in return true ; } } -#ifndef __WXMAC_X__ +#ifndef __DARWIN__ else if ( macMenuId == kHMHelpMenuID ) { int menuItem = formerHelpMenuItems ; @@ -499,7 +499,7 @@ bool wxMenu::MacMenuSelect( wxEvtHandler* handler, long when , int macMenuId, in } } } -#endif // __WXMAC_X__ +#endif // __DARWIN__ for (pos = 0, node = GetMenuItems().First(); node; node = node->Next(), pos++) { @@ -898,7 +898,7 @@ void wxMenuBar::MacMenuSelect(wxEvtHandler* handler, long when , int macMenuId, for (int i = 0; i < m_menus.GetCount() ; i++) { if ( m_menus[i]->MacGetMenuId() == macMenuId -#ifndef __WXMAC_X__ +#ifndef __DARWIN__ || ( macMenuId == kHMHelpMenuID && ( m_titles[i] == "?" || m_titles[i] == "&?" || m_titles[i] == wxApp::s_macHelpMenuTitleName ) ) #endif diff --git a/src/mac/carbon/notebmac.cpp b/src/mac/carbon/notebmac.cpp index 496c75fe5b..6f555d06c9 100644 --- a/src/mac/carbon/notebmac.cpp +++ b/src/mac/carbon/notebmac.cpp @@ -32,7 +32,7 @@ // check that the page index is valid #define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((nPage) < GetPageCount())) -#ifdef __WXMAC_X__ +#ifdef __DARWIN__ // I got these values for Mac OS X from the Appearance mgr docs. (Mark Newsam) const short kwxMacTabLeftMargin = 20 ; const short kwxMacTabTopMargin = 38 ; @@ -76,7 +76,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxCommandEvent) // common part of all ctors void wxNotebook::Init() { -#ifdef __WXMAC_X__ +#ifdef __DARWIN__ m_macHorizontalBorder = 7; m_macVerticalBorder = 8; #endif diff --git a/src/mac/carbon/pnghand.cpp b/src/mac/carbon/pnghand.cpp index 90b59669f0..358515d283 100644 --- a/src/mac/carbon/pnghand.cpp +++ b/src/mac/carbon/pnghand.cpp @@ -31,7 +31,7 @@ # include #endif -#ifndef __WXMAC_X__ +#ifndef __DARWIN__ # include #endif #include "wx/msgdlg.h" diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index 0724fe9da9..cda4bcd0de 100644 --- a/src/mac/carbon/textctrl.cpp +++ b/src/mac/carbon/textctrl.cpp @@ -13,7 +13,7 @@ #pragma implementation "textctrl.h" #endif -#ifdef __UNIX__ +#ifdef __DARWIN__ #include #include #else @@ -34,7 +34,7 @@ #if defined(__BORLANDC__) && !defined(__WIN32__) #include -#elif !defined(__MWERKS__) && !defined(__GNUWIN32) && !defined(__WXMAC_X__) +#elif !defined(__MWERKS__) && !defined(__GNUWIN32) && !defined(__DARWIN__) #include #endif diff --git a/src/mac/carbon/uma.cpp b/src/mac/carbon/uma.cpp index 52e0497c55..2c70ef47b7 100644 --- a/src/mac/carbon/uma.cpp +++ b/src/mac/carbon/uma.cpp @@ -3,7 +3,7 @@ #include "wx/mac/uma.h" #include "wx/mac/aga.h" -#ifndef __UNIX__ +#ifndef __DARWIN__ #include #endif @@ -84,7 +84,7 @@ void UMAInitToolbox( UInt16 inMoreMastersCalls ) #endif // UMA_USE_WINDOWMGR #endif -#ifndef __UNIX__ +#ifndef __DARWIN__ #if TARGET_CARBON // Call currently implicitely done : InitFloatingWindows() ; #else diff --git a/src/mac/carbon/utils.cpp b/src/mac/carbon/utils.cpp index 1a71c0c784..6016d24d81 100644 --- a/src/mac/carbon/utils.cpp +++ b/src/mac/carbon/utils.cpp @@ -27,7 +27,7 @@ #include #include -#ifndef __UNIX__ +#ifndef __DARWIN__ // defined in unix/utilsunx.cpp for Mac OS X // get full hostname (with domain name if possible) @@ -178,7 +178,7 @@ void wxFatalError(const wxString& msg, const wxString& title) wxMessageBox(wxBuffer); wxExit(); } -#endif // !__UNIX__ +#endif // !__DARWIN__ // Emit a beeeeeep void wxBell() @@ -315,7 +315,7 @@ bool wxIsBusy() return (wxBusyCursorCount > 0); } -#ifndef __UNIX__ +#ifndef __DARWIN__ wxString wxMacFindFolder( short vol, OSType folderType, Boolean createFolder) @@ -336,7 +336,7 @@ wxString wxMacFindFolder( short vol, } #endif -#ifndef __UNIX__ +#ifndef __DARWIN__ char *wxGetUserHome (const wxString& user) { // TODO diff --git a/src/mac/carbon/utilsexc.cpp b/src/mac/carbon/utilsexc.cpp index 624a9c0524..3b4903212c 100644 --- a/src/mac/carbon/utilsexc.cpp +++ b/src/mac/carbon/utilsexc.cpp @@ -14,7 +14,7 @@ #endif #include "wx/utils.h" -#ifdef __UNIX__ +#ifdef __DARWIN__ #include "wx/unix/execute.h" #endif @@ -22,7 +22,7 @@ #include #include -#ifndef __UNIX__ +#ifndef __DARWIN__ #define wxEXECUTE_WIN_MESSAGE 10000 long wxExecute(const wxString& command, bool sync, wxProcess *handler) @@ -32,10 +32,10 @@ long wxExecute(const wxString& command, bool sync, wxProcess *handler) } #endif -#ifdef __UNIX__ +#ifdef __DARWIN__ int wxAddProcessCallback(wxEndProcessData *proc_data, int fd) { wxFAIL_MSG(wxT("wxAddProcessCallback() function not ready")); return 0; } -#endif \ No newline at end of file +#endif diff --git a/src/mac/dc.cpp b/src/mac/dc.cpp index f66cf27357..f4bf8ea95c 100644 --- a/src/mac/dc.cpp +++ b/src/mac/dc.cpp @@ -38,7 +38,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) #define twips2mm 0.0176388888889 #define mm2pt 2.83464566929 #define pt2mm 0.352777777778 -#ifndef __UNIX__ +#ifndef __DARWIN__ const double M_PI = 3.14159265358979 ; #endif const double RAD2DEG = 180.0 / M_PI; diff --git a/src/mac/dirdlg.cpp b/src/mac/dirdlg.cpp index d1d906478c..83533f1236 100644 --- a/src/mac/dirdlg.cpp +++ b/src/mac/dirdlg.cpp @@ -20,7 +20,7 @@ #include "wx/cmndata.h" -#if defined(__UNIX__) +#ifdef __DARWIN__ #include #else #include diff --git a/src/mac/dirmac.cpp b/src/mac/dirmac.cpp index 2a3e4c7221..36835cd68c 100644 --- a/src/mac/dirmac.cpp +++ b/src/mac/dirmac.cpp @@ -36,11 +36,11 @@ #include "wx/dir.h" #include "wx/filefn.h" // for wxPathExists() -#ifndef __WXMAC_X__ +#ifndef __DARWIN__ #include #endif -#if defined(__WXMAC__) && !defined(__UNIX__) +#ifndef __DARWIN__ #include "morefile.h" #include "moreextr.h" #include "fullpath.h" @@ -118,7 +118,7 @@ wxDirData::wxDirData(const wxString& dirname) m_CPB.hFileInfo.ioNamePtr = m_name ; m_index = 0 ; -#ifdef __WXMAC_X__ +#ifdef __DARWIN__ // TODO: what are we supposed to do for Mac OS X #else FSpGetDirectoryID( &fsspec , &m_dirId , &m_isDir ) ; diff --git a/src/mac/dnd.cpp b/src/mac/dnd.cpp index ece56ce7d3..42b397d590 100644 --- a/src/mac/dnd.cpp +++ b/src/mac/dnd.cpp @@ -39,7 +39,7 @@ wxDropTarget::~wxDropTarget() // ---------------------------------------------------------------------------- // wxTextDropTarget // ---------------------------------------------------------------------------- -#ifndef __WXMAC_X__ +#ifndef __DARWIN__ bool wxTextDropTarget::OnDrop( wxCoord x, wxCoord y, const void *pData ) { OnDropText( x, y, (const char*)pData ); @@ -54,7 +54,7 @@ bool wxTextDropTarget::OnDropText( wxCoord x, wxCoord y, const wxString &psz ) return TRUE; }; -#ifndef __WXMAC_X__ +#ifndef __DARWIN__ size_t wxTextDropTarget::GetFormatCount() const { return 1; @@ -70,7 +70,7 @@ wxDataFormat wxTextDropTarget::GetFormat(size_t WXUNUSED(n)) const // wxFileDropTarget // ---------------------------------------------------------------------------- -#ifndef __WXMAC_X__ +#ifndef __DARWIN__ bool wxFileDropTarget::OnDropFiles( wxCoord x, wxCoord y, size_t nFiles, const char * const WXUNUSED(aszFiles)[] ) { printf( "Got %d dropped files.\n", (int)nFiles ); @@ -84,7 +84,7 @@ bool wxFileDropTarget::OnDrop(wxCoord x, wxCoord y, const wxArrayString& filenam return OnDropFiles(x, y, 1, &filenames); } -#ifndef __WXMAC_X__ +#ifndef __DARWIN__ size_t wxFileDropTarget::GetFormatCount() const { return 1; diff --git a/src/mac/gsocket.c b/src/mac/gsocket.c index 20e4049f58..10ee5d838d 100644 --- a/src/mac/gsocket.c +++ b/src/mac/gsocket.c @@ -19,7 +19,7 @@ #if wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) -#ifdef __UNIX__ +#ifdef __DARWIN__ #include #ifndef FALSE @@ -80,7 +80,7 @@ void wxCYield() ; #define qDebug2 1 extern pascal void OTDebugStr(const char* str); #endif -#ifndef __UNIX__ +#ifndef __DARWIN__ #include #endif InetSvcRef gInetSvcRef = 0 ; @@ -121,7 +121,7 @@ OSStatus DoNegotiateIPReuseAddrOption(EndpointRef ep, Boolean enableReuseIPMode) ret.opt.maxlen = kOTFourByteOptionSize; opt->level = INET_IP; // dealing with an IP Level function -#ifdef __UNIX__ +#ifdef __DARWIN__ opt->name = kIP_REUSEADDR; #else opt->name = IP_REUSEADDR; diff --git a/src/mac/listbox.cpp b/src/mac/listbox.cpp index 4624d820db..4e737dc2f6 100644 --- a/src/mac/listbox.cpp +++ b/src/mac/listbox.cpp @@ -20,7 +20,7 @@ #include "wx/log.h" #include "wx/utils.h" -#ifdef __UNIX__ +#ifdef __DARWIN__ #include "ldef/extldef.h" #else #include "extldef.h" diff --git a/src/mac/menu.cpp b/src/mac/menu.cpp index d1d5a84771..6956a0987a 100644 --- a/src/mac/menu.cpp +++ b/src/mac/menu.cpp @@ -56,7 +56,7 @@ const short kwxMacAppleMenuId = 1 ; // Construct a menu with optional title (then use append) -#ifdef __UNIX__ +#ifdef __DARWIN__ short wxMenu::s_macNextMenuId = 3 ; #else short wxMenu::s_macNextMenuId = 2 ; @@ -450,7 +450,7 @@ bool wxMenu::MacMenuSelect( wxEvtHandler* handler, long when , int macMenuId, in return true ; } } -#ifndef __WXMAC_X__ +#ifndef __DARWIN__ else if ( macMenuId == kHMHelpMenuID ) { int menuItem = formerHelpMenuItems ; @@ -499,7 +499,7 @@ bool wxMenu::MacMenuSelect( wxEvtHandler* handler, long when , int macMenuId, in } } } -#endif // __WXMAC_X__ +#endif // __DARWIN__ for (pos = 0, node = GetMenuItems().First(); node; node = node->Next(), pos++) { @@ -898,7 +898,7 @@ void wxMenuBar::MacMenuSelect(wxEvtHandler* handler, long when , int macMenuId, for (int i = 0; i < m_menus.GetCount() ; i++) { if ( m_menus[i]->MacGetMenuId() == macMenuId -#ifndef __WXMAC_X__ +#ifndef __DARWIN__ || ( macMenuId == kHMHelpMenuID && ( m_titles[i] == "?" || m_titles[i] == "&?" || m_titles[i] == wxApp::s_macHelpMenuTitleName ) ) #endif diff --git a/src/mac/notebmac.cpp b/src/mac/notebmac.cpp index 496c75fe5b..6f555d06c9 100644 --- a/src/mac/notebmac.cpp +++ b/src/mac/notebmac.cpp @@ -32,7 +32,7 @@ // check that the page index is valid #define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((nPage) < GetPageCount())) -#ifdef __WXMAC_X__ +#ifdef __DARWIN__ // I got these values for Mac OS X from the Appearance mgr docs. (Mark Newsam) const short kwxMacTabLeftMargin = 20 ; const short kwxMacTabTopMargin = 38 ; @@ -76,7 +76,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxCommandEvent) // common part of all ctors void wxNotebook::Init() { -#ifdef __WXMAC_X__ +#ifdef __DARWIN__ m_macHorizontalBorder = 7; m_macVerticalBorder = 8; #endif diff --git a/src/mac/pnghand.cpp b/src/mac/pnghand.cpp index 90b59669f0..358515d283 100644 --- a/src/mac/pnghand.cpp +++ b/src/mac/pnghand.cpp @@ -31,7 +31,7 @@ # include #endif -#ifndef __WXMAC_X__ +#ifndef __DARWIN__ # include #endif #include "wx/msgdlg.h" diff --git a/src/mac/textctrl.cpp b/src/mac/textctrl.cpp index 0724fe9da9..cda4bcd0de 100644 --- a/src/mac/textctrl.cpp +++ b/src/mac/textctrl.cpp @@ -13,7 +13,7 @@ #pragma implementation "textctrl.h" #endif -#ifdef __UNIX__ +#ifdef __DARWIN__ #include #include #else @@ -34,7 +34,7 @@ #if defined(__BORLANDC__) && !defined(__WIN32__) #include -#elif !defined(__MWERKS__) && !defined(__GNUWIN32) && !defined(__WXMAC_X__) +#elif !defined(__MWERKS__) && !defined(__GNUWIN32) && !defined(__DARWIN__) #include #endif diff --git a/src/mac/uma.cpp b/src/mac/uma.cpp index 52e0497c55..2c70ef47b7 100644 --- a/src/mac/uma.cpp +++ b/src/mac/uma.cpp @@ -3,7 +3,7 @@ #include "wx/mac/uma.h" #include "wx/mac/aga.h" -#ifndef __UNIX__ +#ifndef __DARWIN__ #include #endif @@ -84,7 +84,7 @@ void UMAInitToolbox( UInt16 inMoreMastersCalls ) #endif // UMA_USE_WINDOWMGR #endif -#ifndef __UNIX__ +#ifndef __DARWIN__ #if TARGET_CARBON // Call currently implicitely done : InitFloatingWindows() ; #else diff --git a/src/mac/utils.cpp b/src/mac/utils.cpp index 1a71c0c784..6016d24d81 100644 --- a/src/mac/utils.cpp +++ b/src/mac/utils.cpp @@ -27,7 +27,7 @@ #include #include -#ifndef __UNIX__ +#ifndef __DARWIN__ // defined in unix/utilsunx.cpp for Mac OS X // get full hostname (with domain name if possible) @@ -178,7 +178,7 @@ void wxFatalError(const wxString& msg, const wxString& title) wxMessageBox(wxBuffer); wxExit(); } -#endif // !__UNIX__ +#endif // !__DARWIN__ // Emit a beeeeeep void wxBell() @@ -315,7 +315,7 @@ bool wxIsBusy() return (wxBusyCursorCount > 0); } -#ifndef __UNIX__ +#ifndef __DARWIN__ wxString wxMacFindFolder( short vol, OSType folderType, Boolean createFolder) @@ -336,7 +336,7 @@ wxString wxMacFindFolder( short vol, } #endif -#ifndef __UNIX__ +#ifndef __DARWIN__ char *wxGetUserHome (const wxString& user) { // TODO diff --git a/src/mac/utilsexc.cpp b/src/mac/utilsexc.cpp index 624a9c0524..3b4903212c 100644 --- a/src/mac/utilsexc.cpp +++ b/src/mac/utilsexc.cpp @@ -14,7 +14,7 @@ #endif #include "wx/utils.h" -#ifdef __UNIX__ +#ifdef __DARWIN__ #include "wx/unix/execute.h" #endif @@ -22,7 +22,7 @@ #include #include -#ifndef __UNIX__ +#ifndef __DARWIN__ #define wxEXECUTE_WIN_MESSAGE 10000 long wxExecute(const wxString& command, bool sync, wxProcess *handler) @@ -32,10 +32,10 @@ long wxExecute(const wxString& command, bool sync, wxProcess *handler) } #endif -#ifdef __UNIX__ +#ifdef __DARWIN__ int wxAddProcessCallback(wxEndProcessData *proc_data, int fd) { wxFAIL_MSG(wxT("wxAddProcessCallback() function not ready")); return 0; } -#endif \ No newline at end of file +#endif -- 2.47.2