[glib/wip/3v1n0/add-darwin-os] gio, glib: Use G_OS_DARWIN for code that is for such environments
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/3v1n0/add-darwin-os] gio, glib: Use G_OS_DARWIN for code that is for such environments
- Date: Tue, 18 Oct 2022 20:15:32 +0000 (UTC)
commit eb384bdb31deec9b28b3b52c6899607f64415cfa
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Tue Oct 18 22:14:38 2022 +0200
gio, glib: Use G_OS_DARWIN for code that is for such environments
While we preserved the COCOA/CARBON cases when specific libraries are
needed.
gio/gio-tool-launch.c | 6 +++---
gio/gio-tool-open.c | 2 +-
gio/giomodule.c | 4 ++--
gio/glocalfileinfo.c | 2 +-
glib/gutils.c | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/gio/gio-tool-launch.c b/gio/gio-tool-launch.c
index 18a9c5fb99..a272e3a4cd 100644
--- a/gio/gio-tool-launch.c
+++ b/gio/gio-tool-launch.c
@@ -23,7 +23,7 @@
#include <gio/gio.h>
-#if defined(G_OS_UNIX) && !defined(HAVE_COCOA)
+#if defined(G_OS_UNIX) && !defined(G_OS_DARWIN)
#include <gio/gdesktopappinfo.h>
#endif
@@ -40,7 +40,7 @@ handle_launch (int argc, char *argv[], gboolean do_help)
{
GOptionContext *context;
GError *error = NULL;
-#if defined(G_OS_UNIX) && !defined(HAVE_COCOA)
+#if defined(G_OS_UNIX) && !defined(G_OS_DARWIN)
int i;
GAppInfo *app = NULL;
GAppLaunchContext *app_context = NULL;
@@ -83,7 +83,7 @@ handle_launch (int argc, char *argv[], gboolean do_help)
g_option_context_free (context);
-#if !defined(G_OS_UNIX) || defined(HAVE_COCOA)
+#if !defined(G_OS_UNIX) || defined(G_OS_DARWIN)
print_error (_("The launch command is not currently supported on this platform"));
retval = 1;
#else
diff --git a/gio/gio-tool-open.c b/gio/gio-tool-open.c
index da8914a7cf..1bd1d197ba 100644
--- a/gio/gio-tool-open.c
+++ b/gio/gio-tool-open.c
@@ -23,7 +23,7 @@
#include <gio/gio.h>
-#if defined(G_OS_UNIX) && !defined(HAVE_COCOA)
+#if defined(G_OS_UNIX) && !defined(G_OS_DARWIN)
#include <gio/gdesktopappinfo.h>
#endif
diff --git a/gio/giomodule.c b/gio/giomodule.c
index 1c4b654c0d..86070ae3b3 100644
--- a/gio/giomodule.c
+++ b/gio/giomodule.c
@@ -61,7 +61,7 @@
#endif
#include <glib/gstdio.h>
-#if defined(G_OS_UNIX) && !defined(HAVE_COCOA)
+#if defined(G_OS_UNIX) && !defined(G_OS_DARWIN)
#include "gdesktopappinfo.h"
#endif
#ifdef HAVE_COCOA
@@ -1185,7 +1185,7 @@ _g_io_modules_ensure_extension_points_registered (void)
if (g_once_init_enter (®istered_extensions))
{
-#if defined(G_OS_UNIX) && !defined(HAVE_COCOA)
+#if defined(G_OS_UNIX) && !defined(G_OS_DARWIN)
#if !GLIB_CHECK_VERSION (3, 0, 0)
ep = g_io_extension_point_register (G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME);
g_io_extension_point_set_required_type (ep, G_TYPE_DESKTOP_APP_INFO_LOOKUP);
diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c
index 661d2266ab..628ea236b5 100644
--- a/gio/glocalfileinfo.c
+++ b/gio/glocalfileinfo.c
@@ -1380,7 +1380,7 @@ get_content_type (const char *basename,
content_type = g_content_type_guess (basename, NULL, 0, &result_uncertain);
-#if !defined(G_OS_WIN32) && !defined(HAVE_COCOA)
+#if !defined(G_OS_WIN32) && !defined(G_OS_DARWIN)
if (!fast && result_uncertain && path != NULL)
{
guchar sniff_buffer[4096];
diff --git a/glib/gutils.c b/glib/gutils.c
index 78ccd61214..736515f512 100644
--- a/glib/gutils.c
+++ b/glib/gutils.c
@@ -2080,7 +2080,7 @@ g_get_user_runtime_dir (void)
return user_runtime_dir;
}
-#ifdef HAVE_COCOA
+#ifdef G_OS_DARWIN
/* Implemented in gutils-macos.m */
void load_user_special_dirs_macos (gchar **table);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]