From e77e17a94afaf39a4c1b0d5af9848d99dab439a8 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Mon, 3 Nov 2025 22:51:51 +0100 Subject: [PATCH 45/48] start using __WXDARWIN_OSX__ --- include/wx/platform.h | 12 +++--------- src/osx/cocoa/utils_base.mm | 8 ++++---- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/include/wx/platform.h b/include/wx/platform.h index 34f607c488..4273857913 100644 --- a/include/wx/platform.h +++ b/include/wx/platform.h @@ -421,19 +421,13 @@ #ifdef __DARWIN__ # if defined(__MACH__) -# ifndef __WXDARWIN__ -# define __WXDARWIN__ 1 -# endif +# define __WXDARWIN__ 1 # include # if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE /* this branch is also true for tv, catalyst, watch and vision */ -# ifndef __WXDARWIN_IPHONE__ -# define __WXDARWIN_IPHONE__ 1 -# endif +# define __WXDARWIN_IPHONE__ 1 # elif defined(TARGET_OS_OSX) && TARGET_OS_OSX -# ifndef __WXDARWIN_IPHONE__ -# define __WXDARWIN_OSX__ 1 -# endif +# define __WXDARWIN_OSX__ 1 # endif # include diff --git a/src/osx/cocoa/utils_base.mm b/src/osx/cocoa/utils_base.mm index 5976b37ffd..dfafab25ee 100644 --- a/src/osx/cocoa/utils_base.mm +++ b/src/osx/cocoa/utils_base.mm @@ -96,7 +96,7 @@ wxString wxGetOsDescription() int majorVer, minorVer; wxGetOsVersion(&majorVer, &minorVer); -#ifndef __WXOSX_IPHONE__ +#ifdef __WXDARWIN_OSX__ // Notice that neither the OS name itself nor the code names seem to be // ever translated, OS X itself uses the English words even for the // languages not using Roman alphabet. @@ -197,7 +197,7 @@ wxString wxGetOsDescription() } #endif // wxUSE_DATETIME -#ifndef __WXOSX_IPHONE__ +#ifdef __WXDARWIN_OSX__ #include @@ -379,7 +379,7 @@ wxString wxStringWithNSString(NSString *nsstring) // helper when starting as a command line tool without an NSApp running at all //---------------------------------------------------------------------------- -#if !defined(__WXOSX_IPHONE__) +#ifdef __WXDARWIN_OSX__ bool wxMacInitCocoa() { @@ -388,4 +388,4 @@ bool wxMacInitCocoa() return cocoaLoaded; } -#endif // !defined(__WXOSX_IPHONE__) +#endif // __WXDARWIN_OSX__ -- 2.24.3 (Apple Git-128)