mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 06:33:41 +02:00
gio: Check __APPLE__ in a few places instead of HAVE_COCOA
`HAVE_COCOA` should be used only in the places where we’re actually depending on the Cocoa toolkit. It should not be used as a general way of detecting building on a Darwin-based OS such as macOS. Conversely, there are a few places in the code where we do want to specifically detect the Cocoa toolkit (and others where we specifically want to detect Carbon), so keep `HAVE_COCOA` and `HAVE_CARBON` around. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #2802
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <gio/gio.h>
|
||||
|
||||
#if defined(G_OS_UNIX) && !defined(HAVE_COCOA)
|
||||
#if defined(G_OS_UNIX) && !defined(__APPLE__)
|
||||
#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(__APPLE__)
|
||||
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(__APPLE__)
|
||||
print_error (_("The launch command is not currently supported on this platform"));
|
||||
retval = 1;
|
||||
#else
|
||||
|
Reference in New Issue
Block a user