summaryrefslogtreecommitdiff
path: root/src/vim.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-10-28 21:11:06 +0200
committerBram Moolenaar <Bram@vim.org>2017-10-28 21:11:06 +0200
commitd057301b1f28736f094affa17b190244ad56e8d9 (patch)
treeae20801354321a5ff0d7d23b04d8d6018c57645a /src/vim.h
parentef83956e1e67736b4c6b886d897b74f022622a74 (diff)
downloadvim-git-d057301b1f28736f094affa17b190244ad56e8d9.tar.gz
patch 8.0.1236: Mac features are confusingv8.0.1236
Problem: Mac features are confusing. Solution: Make feature names more consistent, add "osxdarwin". Rename feature flags, cleanup Mac code. (Kazunobu Kuriyama, closes #2178)
Diffstat (limited to 'src/vim.h')
-rw-r--r--src/vim.h49
1 files changed, 14 insertions, 35 deletions
diff --git a/src/vim.h b/src/vim.h
index ed12b072f..d12c46cd8 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -85,28 +85,15 @@
#endif
/*
- * MACOS_CLASSIC compiling for MacOS prior to MacOS X
- * MACOS_X_UNIX compiling for MacOS X (using os_unix.c)
- * MACOS_X compiling for MacOS X (using os_unix.c)
- * MACOS compiling for either one
+ * MACOS_X compiling for Mac OS X
+ * MACOS_X_DARWIN integrating the darwin feature into MACOS_X
*/
-#if defined(macintosh) && !defined(MACOS_CLASSIC)
-# define MACOS_CLASSIC
-#endif
-#if defined(MACOS_X_UNIX)
+#if defined(MACOS_X_DARWIN) && !defined(MACOS_X)
# define MACOS_X
-# ifndef HAVE_CONFIG_H
-# define UNIX
-# endif
-#endif
-#if defined(MACOS_X) || defined(MACOS_CLASSIC)
-# define MACOS
-#endif
-#if defined(MACOS_X) && defined(MACOS_CLASSIC)
- Error: To compile for both MACOS X and Classic use a Classic Carbon
#endif
/* Unless made through the Makefile enforce GUI on Mac */
-#if defined(MACOS) && !defined(HAVE_CONFIG_H)
+#if defined(MACOS_X) && !defined(HAVE_CONFIG_H)
+# define UNIX
# define FEAT_GUI_MAC
#endif
@@ -164,23 +151,17 @@
# endif
# endif
#endif
-#ifdef MACOS
-# if defined(__POWERPC__) || defined(MACOS_X) || defined(__fourbyteints__) \
- || defined(__MRC__) || defined(__SC__) || defined(__APPLE_CC__)/* MPW Compilers */
-# define VIM_SIZEOF_INT 4
-# else
-# define VIM_SIZEOF_INT 2
-# endif
+#if defined(MACOS_X) && !defined(HAVE_CONFIG_H)
+# define VIM_SIZEOF_INT __SIZEOF_INT__
#endif
-
/*
* #defines for optionals and features
* Also defines FEAT_TINY, FEAT_SMALL, etc. when FEAT_HUGE is defined.
*/
#include "feature.h"
-#if defined(MACOS_X_UNIX)
+#if defined(MACOS_X_DARWIN)
# if defined(FEAT_SMALL) && !defined(FEAT_CLIPBOARD)
# define FEAT_CLIPBOARD
# endif
@@ -227,7 +208,7 @@
#endif
/* The Mac conversion stuff doesn't work under X11. */
-#if defined(FEAT_MBYTE) && defined(MACOS_X)
+#if defined(FEAT_MBYTE) && defined(MACOS_X_DARWIN)
# define MACOS_CONVERT
#endif
@@ -297,10 +278,7 @@
# include "os_mint.h"
#endif
-#if defined(MACOS)
-# if defined(__MRC__) || defined(__SC__) /* MPW Compilers */
-# define HAVE_SETENV
-# endif
+#if defined(MACOS_X)
# include "os_mac.h"
#endif
@@ -2358,9 +2336,10 @@ typedef enum {
# ifdef instr
# undef instr
# endif
- /* bool may cause trouble on MACOS but is required on a few other systems
- * and for Perl */
-# if defined(bool) && defined(MACOS) && !defined(FEAT_PERL)
+ /* bool may cause trouble on some old versions of Mac OS X but is required
+ * on a few other systems and for Perl */
+# if (defined(MACOS_X) && !defined(MAC_OS_X_VERSION_10_6)) \
+ && defined(bool) && !defined(FEAT_PERL)
# undef bool
# endif