Skip to content

Revert "meson: Define G_OS_DARWIN when compiling under OSX or iOS"

Philip Withnall requested to merge pwithnall/glib:2802-drop-g-os-darwin into main
  • docs: Mention __APPLE__ instead of G_OS_DARWIN for detecting Darwin

    See discussion on #2802 (closed) and in the previous two commits.

  • Revert "meson: Define G_OS_DARWIN when compiling under OSX or iOS"

    This reverts commit e85635da.

    See the previous revert for rationale.

  • Revert "gio, glib: Use G_OS_DARWIN for code that is for such environments"

    This reverts commit 476e33c3.

    We’ve decided to remove G_OS_DARWIN in favour of recommending people use __APPLE__ instead. As per the discussion on #2802 (closed) and linked issues,

    • Adding a new define shifts the complexity from “which of these platform-provided defines do I use” to “which platform-provided defines does G_OS_DARWIN use”
    • There should ideally be no cases where a user of GLib has to use their own platform-specific code, since GLib should be providing appropriate abstractions
    • Providing a single G_OS_DARWIN to cover all Apple products (macOS and iOS) hides the complexity of what the user is actually testing: are they testing for the Mach kernel, the Carbon and/or Cocoa user space toolkits, macOS vs iOS vs tvOS, etc

    Helps: #2802 (closed)

Closes #2802 (closed)

Merge request reports