comparison src/os_macosx.m @ 14911:73162bc0b21f v8.1.0467

patch 8.1.0467: cannot build with Mac OS X 10.5 commit https://github.com/vim/vim/commit/1d3dbcf743be9c72a0df5fc0711553fce287d3f8 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Oct 8 20:07:39 2018 +0200 patch 8.1.0467: cannot build with Mac OS X 10.5 Problem: Cannot build with Mac OS X 10.5. Solution: Change #ifdef into #if. (Akshay Hegde, closes https://github.com/vim/vim/issues/3022)
author Bram Moolenaar <Bram@vim.org>
date Mon, 08 Oct 2018 20:15:06 +0200
parents 616dc84228b7
children 2dcaa860e3fc
comparison
equal deleted inserted replaced
14910:69e45d17a823 14911:73162bc0b21f
61 clip_mch_request_selection(VimClipboard *cbd) 61 clip_mch_request_selection(VimClipboard *cbd)
62 { 62 {
63 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 63 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
64 64
65 NSPasteboard *pb = [NSPasteboard generalPasteboard]; 65 NSPasteboard *pb = [NSPasteboard generalPasteboard];
66 #ifdef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER 66 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
67 NSArray *supportedTypes = [NSArray arrayWithObjects:VimPboardType, 67 NSArray *supportedTypes = [NSArray arrayWithObjects:VimPboardType,
68 NSPasteboardTypeString, nil]; 68 NSPasteboardTypeString, nil];
69 #else 69 #else
70 NSArray *supportedTypes = [NSArray arrayWithObjects:VimPboardType, 70 NSArray *supportedTypes = [NSArray arrayWithObjects:VimPboardType,
71 NSStringPboardType, nil]; 71 NSStringPboardType, nil];
97 97
98 if (!string) 98 if (!string)
99 { 99 {
100 /* Use NSPasteboardTypeString. The motion type is detected automatically. 100 /* Use NSPasteboardTypeString. The motion type is detected automatically.
101 */ 101 */
102 #ifdef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER 102 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
103 NSMutableString *mstring = 103 NSMutableString *mstring =
104 [[pb stringForType:NSPasteboardTypeString] mutableCopy]; 104 [[pb stringForType:NSPasteboardTypeString] mutableCopy];
105 #else 105 #else
106 NSMutableString *mstring = 106 NSMutableString *mstring =
107 [[pb stringForType:NSStringPboardType] mutableCopy]; 107 [[pb stringForType:NSStringPboardType] mutableCopy];
186 NSString *string = [[NSString alloc] 186 NSString *string = [[NSString alloc]
187 initWithBytes:str length:len encoding:NSUTF8StringEncoding]; 187 initWithBytes:str length:len encoding:NSUTF8StringEncoding];
188 188
189 /* See clip_mch_request_selection() for info on pasteboard types. */ 189 /* See clip_mch_request_selection() for info on pasteboard types. */
190 NSPasteboard *pb = [NSPasteboard generalPasteboard]; 190 NSPasteboard *pb = [NSPasteboard generalPasteboard];
191 #ifdef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER 191 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
192 NSArray *supportedTypes = [NSArray arrayWithObjects:VimPboardType, 192 NSArray *supportedTypes = [NSArray arrayWithObjects:VimPboardType,
193 NSPasteboardTypeString, nil]; 193 NSPasteboardTypeString, nil];
194 #else 194 #else
195 NSArray *supportedTypes = [NSArray arrayWithObjects:VimPboardType, 195 NSArray *supportedTypes = [NSArray arrayWithObjects:VimPboardType,
196 NSStringPboardType, nil]; 196 NSStringPboardType, nil];
199 199
200 NSNumber *motion = [NSNumber numberWithInt:motion_type]; 200 NSNumber *motion = [NSNumber numberWithInt:motion_type];
201 NSArray *plist = [NSArray arrayWithObjects:motion, string, nil]; 201 NSArray *plist = [NSArray arrayWithObjects:motion, string, nil];
202 [pb setPropertyList:plist forType:VimPboardType]; 202 [pb setPropertyList:plist forType:VimPboardType];
203 203
204 #ifdef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER 204 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
205 [pb setString:string forType:NSPasteboardTypeString]; 205 [pb setString:string forType:NSPasteboardTypeString];
206 #else 206 #else
207 [pb setString:string forType:NSStringPboardType]; 207 [pb setString:string forType:NSStringPboardType];
208 #endif 208 #endif
209 209