[gtk/gtk-3-24: 13/20] Replace deprecated gestalt for 10.10 and later.
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24: 13/20] Replace deprecated gestalt for 10.10 and later.
- Date: Sat, 8 Dec 2018 19:43:42 +0000 (UTC)
commit 1165ab9d27574445489b21ed9beb4b8a7f872907
Author: John Ralls <jralls ceridwen us>
Date: Fri Nov 23 10:23:02 2018 +0900
Replace deprecated gestalt for 10.10 and later.
It was deprecated in 10.8 but no replacement until 10.10.
gdk/quartz/gdkglobals-quartz.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/gdk/quartz/gdkglobals-quartz.c b/gdk/quartz/gdkglobals-quartz.c
index efcf73c391..81cd4632e8 100644
--- a/gdk/quartz/gdkglobals-quartz.c
+++ b/gdk/quartz/gdkglobals-quartz.c
@@ -32,9 +32,16 @@ gdk_quartz_osx_version (void)
if (minor == GDK_OSX_UNSUPPORTED)
{
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 101000
OSErr err = Gestalt (gestaltSystemVersionMinor, (SInt32*)&minor);
g_return_val_if_fail (err == noErr, GDK_OSX_UNSUPPORTED);
+#else
+ NSOperatingSystemVersion version;
+
+ version = [[NSProcessInfo processInfo] operatingSystemVersion];
+ minor = version.minorVersion;
+#endif
}
if (minor < GDK_OSX_MIN)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]