]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.1910: Mac OS X: missing sound support on older versions v9.0.1910
authorSevan Janiyan <venture37@geeklan.co.uk>
Mon, 18 Sep 2023 18:04:32 +0000 (20:04 +0200)
committerChristian Brabandt <cb@256bit.org>
Mon, 18 Sep 2023 18:04:32 +0000 (20:04 +0200)
Problem:  Mac OS X: missing sound support on older versions
Solution: Check Macro MAC_OS_X_VERSION_MIN_REQUIRED

Extend guard for sound support on OS X

Fixes build on legacy versions where required coreaudio functionality
may not be available. NSSoundDelegate apparently was introduced in Snow
Leopard yet the build breaks on it. Guarding off enabling sound support
to El Capitan as that's the next version I had access to for testing (it
may work on earlier versions)
https://developer.apple.com/documentation/appkit/nssounddelegate Vim
builds on OS X Tiger 10.4 and newer with this change.

closes: #13115

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Sevan Janiyan <venture37@geeklan.co.uk>
src/version.c
src/vim.h

index 7670cddde68a06ea0c8df1240ff77dd34bd5b980..c2bef2ff57447bb99aff1b0898250eaeb738f398 100644 (file)
@@ -699,6 +699,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1910,
 /**/
     1909,
 /**/
index 6b05a2ae6783bdd4528d39631274f08c67103b18..cd54d69ab6e6125679b59e59f67dd1c2b261ca54 100644 (file)
--- a/src/vim.h
+++ b/src/vim.h
 # define ROOT_UID 0
 #endif
 
+/* Include MAC_OS_X_VERSION_* macros */
+#ifdef HAVE_AVAILABILITYMACROS_H
+# include <AvailabilityMacros.h>
+#endif
+
 /*
  * MACOS_X         compiling for Mac OS X
  * MACOS_X_DARWIN   integrating the darwin feature into MACOS_X
 # if defined(FEAT_NORMAL) && !defined(FEAT_CLIPBOARD)
 #  define FEAT_CLIPBOARD
 # endif
-# if defined(FEAT_HUGE) && !defined(FEAT_SOUND)
+# if defined(FEAT_HUGE) && !defined(FEAT_SOUND) && \
+   defined(MAC_OS_X_VERSION_MIN_REQUIRED) && \
+    MAC_OS_X_VERSION_MIN_REQUIRED >= 101100
 #  define FEAT_SOUND
 # endif
 # if defined(FEAT_SOUND)