Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vim: fix test for SDK newer than 10.6
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
editors/vim/files/patch-vim-src-os_macosx-availability.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
diff --git src/os_macosx.m src/os_macosx.m | ||
index 752bdae..50ca361 100644 | ||
--- src/os_macosx.m | ||
+++ src/os_macosx.m | ||
@@ -63,7 +63,7 @@ clip_mch_request_selection(VimClipboard *cbd) | ||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | ||
|
||
NSPasteboard *pb = [NSPasteboard generalPasteboard]; | ||
-#ifdef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 | ||
NSArray *supportedTypes = [NSArray arrayWithObjects:VimPboardType, | ||
NSPasteboardTypeString, nil]; | ||
#else | ||
@@ -99,7 +99,7 @@ clip_mch_request_selection(VimClipboard *cbd) | ||
{ | ||
/* Use NSPasteboardTypeString. The motion type is detected automatically. | ||
*/ | ||
-#ifdef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 | ||
NSMutableString *mstring = | ||
[[pb stringForType:NSPasteboardTypeString] mutableCopy]; | ||
#else | ||
@@ -188,7 +188,7 @@ clip_mch_set_selection(VimClipboard *cbd) | ||
|
||
/* See clip_mch_request_selection() for info on pasteboard types. */ | ||
NSPasteboard *pb = [NSPasteboard generalPasteboard]; | ||
-#ifdef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 | ||
NSArray *supportedTypes = [NSArray arrayWithObjects:VimPboardType, | ||
NSPasteboardTypeString, nil]; | ||
#else | ||
@@ -201,7 +201,7 @@ clip_mch_set_selection(VimClipboard *cbd) | ||
NSArray *plist = [NSArray arrayWithObjects:motion, string, nil]; | ||
[pb setPropertyList:plist forType:VimPboardType]; | ||
|
||
-#ifdef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 | ||
[pb setString:string forType:NSPasteboardTypeString]; | ||
#else | ||
[pb setString:string forType:NSStringPboardType]; |