mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +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:
@@ -2472,7 +2472,7 @@ get_size_from_du (const gchar *path, guint64 *size)
|
||||
GError *error = NULL;
|
||||
gchar *du_path = NULL;
|
||||
|
||||
#ifndef HAVE_COCOA
|
||||
#ifndef __APPLE__
|
||||
du_path = g_find_program_in_path ("du");
|
||||
#endif
|
||||
|
||||
@@ -3556,7 +3556,7 @@ test_query_zero_length_content_type (void)
|
||||
NULL, &error);
|
||||
g_assert_no_error (error);
|
||||
|
||||
#ifndef HAVE_COCOA
|
||||
#ifndef __APPLE__
|
||||
g_assert_cmpstr (g_file_info_get_content_type (file_info), ==, "text/plain");
|
||||
#else
|
||||
g_assert_cmpstr (g_file_info_get_content_type (file_info), ==, "public.text");
|
||||
|
Reference in New Issue
Block a user