Mercurial > vim
comparison src/vim.h @ 12716:351cf7c67bbe v8.0.1236
patch 8.0.1236: Mac features are confusing
commit https://github.com/vim/vim/commit/d057301b1f28736f094affa17b190244ad56e8d9
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Oct 28 21:11:06 2017 +0200
patch 8.0.1236: Mac features are confusing
Problem: Mac features are confusing.
Solution: Make feature names more consistent, add "osxdarwin". Rename
feature flags, cleanup Mac code. (Kazunobu Kuriyama, closes #2178)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 28 Oct 2017 21:15:35 +0200 |
parents | 0a9dacb8826a |
children | 6c199b02c933 |
comparison
equal
deleted
inserted
replaced
12715:279ec0abb4ac | 12716:351cf7c67bbe |
---|---|
83 #else | 83 #else |
84 # define ROOT_UID 0 | 84 # define ROOT_UID 0 |
85 #endif | 85 #endif |
86 | 86 |
87 /* | 87 /* |
88 * MACOS_CLASSIC compiling for MacOS prior to MacOS X | 88 * MACOS_X compiling for Mac OS X |
89 * MACOS_X_UNIX compiling for MacOS X (using os_unix.c) | 89 * MACOS_X_DARWIN integrating the darwin feature into MACOS_X |
90 * MACOS_X compiling for MacOS X (using os_unix.c) | 90 */ |
91 * MACOS compiling for either one | 91 #if defined(MACOS_X_DARWIN) && !defined(MACOS_X) |
92 */ | |
93 #if defined(macintosh) && !defined(MACOS_CLASSIC) | |
94 # define MACOS_CLASSIC | |
95 #endif | |
96 #if defined(MACOS_X_UNIX) | |
97 # define MACOS_X | 92 # define MACOS_X |
98 # ifndef HAVE_CONFIG_H | |
99 # define UNIX | |
100 # endif | |
101 #endif | |
102 #if defined(MACOS_X) || defined(MACOS_CLASSIC) | |
103 # define MACOS | |
104 #endif | |
105 #if defined(MACOS_X) && defined(MACOS_CLASSIC) | |
106 Error: To compile for both MACOS X and Classic use a Classic Carbon | |
107 #endif | 93 #endif |
108 /* Unless made through the Makefile enforce GUI on Mac */ | 94 /* Unless made through the Makefile enforce GUI on Mac */ |
109 #if defined(MACOS) && !defined(HAVE_CONFIG_H) | 95 #if defined(MACOS_X) && !defined(HAVE_CONFIG_H) |
96 # define UNIX | |
110 # define FEAT_GUI_MAC | 97 # define FEAT_GUI_MAC |
111 #endif | 98 #endif |
112 | 99 |
113 #if defined(FEAT_GUI_MOTIF) \ | 100 #if defined(FEAT_GUI_MOTIF) \ |
114 || defined(FEAT_GUI_GTK) \ | 101 || defined(FEAT_GUI_GTK) \ |
162 # else | 149 # else |
163 # define VIM_SIZEOF_INT 2 | 150 # define VIM_SIZEOF_INT 2 |
164 # endif | 151 # endif |
165 # endif | 152 # endif |
166 #endif | 153 #endif |
167 #ifdef MACOS | 154 #if defined(MACOS_X) && !defined(HAVE_CONFIG_H) |
168 # if defined(__POWERPC__) || defined(MACOS_X) || defined(__fourbyteints__) \ | 155 # define VIM_SIZEOF_INT __SIZEOF_INT__ |
169 || defined(__MRC__) || defined(__SC__) || defined(__APPLE_CC__)/* MPW Compilers */ | 156 #endif |
170 # define VIM_SIZEOF_INT 4 | |
171 # else | |
172 # define VIM_SIZEOF_INT 2 | |
173 # endif | |
174 #endif | |
175 | |
176 | 157 |
177 /* | 158 /* |
178 * #defines for optionals and features | 159 * #defines for optionals and features |
179 * Also defines FEAT_TINY, FEAT_SMALL, etc. when FEAT_HUGE is defined. | 160 * Also defines FEAT_TINY, FEAT_SMALL, etc. when FEAT_HUGE is defined. |
180 */ | 161 */ |
181 #include "feature.h" | 162 #include "feature.h" |
182 | 163 |
183 #if defined(MACOS_X_UNIX) | 164 #if defined(MACOS_X_DARWIN) |
184 # if defined(FEAT_SMALL) && !defined(FEAT_CLIPBOARD) | 165 # if defined(FEAT_SMALL) && !defined(FEAT_CLIPBOARD) |
185 # define FEAT_CLIPBOARD | 166 # define FEAT_CLIPBOARD |
186 # endif | 167 # endif |
187 # if defined(FEAT_SMALL) && !defined(FEAT_MOUSE) | 168 # if defined(FEAT_SMALL) && !defined(FEAT_MOUSE) |
188 # define FEAT_MOUSE | 169 # define FEAT_MOUSE |
225 # undef FEAT_CLIENTSERVER | 206 # undef FEAT_CLIENTSERVER |
226 # endif | 207 # endif |
227 #endif | 208 #endif |
228 | 209 |
229 /* The Mac conversion stuff doesn't work under X11. */ | 210 /* The Mac conversion stuff doesn't work under X11. */ |
230 #if defined(FEAT_MBYTE) && defined(MACOS_X) | 211 #if defined(FEAT_MBYTE) && defined(MACOS_X_DARWIN) |
231 # define MACOS_CONVERT | 212 # define MACOS_CONVERT |
232 #endif | 213 #endif |
233 | 214 |
234 /* Can't use "PACKAGE" here, conflicts with a Perl include file. */ | 215 /* Can't use "PACKAGE" here, conflicts with a Perl include file. */ |
235 #ifndef VIMPACKAGE | 216 #ifndef VIMPACKAGE |
295 | 276 |
296 #ifdef __MINT__ | 277 #ifdef __MINT__ |
297 # include "os_mint.h" | 278 # include "os_mint.h" |
298 #endif | 279 #endif |
299 | 280 |
300 #if defined(MACOS) | 281 #if defined(MACOS_X) |
301 # if defined(__MRC__) || defined(__SC__) /* MPW Compilers */ | |
302 # define HAVE_SETENV | |
303 # endif | |
304 # include "os_mac.h" | 282 # include "os_mac.h" |
305 #endif | 283 #endif |
306 | 284 |
307 #ifdef __QNX__ | 285 #ifdef __QNX__ |
308 # include "os_qnx.h" | 286 # include "os_qnx.h" |
2356 # undef _DEBUG | 2334 # undef _DEBUG |
2357 # endif | 2335 # endif |
2358 # ifdef instr | 2336 # ifdef instr |
2359 # undef instr | 2337 # undef instr |
2360 # endif | 2338 # endif |
2361 /* bool may cause trouble on MACOS but is required on a few other systems | 2339 /* bool may cause trouble on some old versions of Mac OS X but is required |
2362 * and for Perl */ | 2340 * on a few other systems and for Perl */ |
2363 # if defined(bool) && defined(MACOS) && !defined(FEAT_PERL) | 2341 # if (defined(MACOS_X) && !defined(MAC_OS_X_VERSION_10_6)) \ |
2342 && defined(bool) && !defined(FEAT_PERL) | |
2364 # undef bool | 2343 # undef bool |
2365 # endif | 2344 # endif |
2366 | 2345 |
2367 # ifdef __BORLANDC__ | 2346 # ifdef __BORLANDC__ |
2368 /* Borland has the structure stati64 but not _stati64 */ | 2347 /* Borland has the structure stati64 but not _stati64 */ |