diff src/vim.h @ 10460:7fd589f46801 v8.0.0123

commit https://github.com/vim/vim/commit/a899e6ecc4523c7e411eaf6fbaa4197d70f6f39e Author: Bram Moolenaar <Bram@vim.org> Date: Sat Dec 3 16:40:51 2016 +0100 patch 8.0.0123 Problem: Modern Sun compilers define "__sun" instead of "sun". Solution: Use __sun. (closes https://github.com/vim/vim/issues/1296)
author Christian Brabandt <cb@256bit.org>
date Sat, 03 Dec 2016 16:45:04 +0100
parents 37a441352da2
children b726d3ea70bc
line wrap: on
line diff
--- a/src/vim.h
+++ b/src/vim.h
@@ -268,6 +268,11 @@
 # define UNUSED
 #endif
 
+/* Used to check for "sun", "__sun" is used by newer compilers. */
+#if defined(__sun)
+# define SUN_SYSTEM
+#endif
+
 /* if we're compiling in C++ (currently only KVim), the system
  * headers must have the correct prototypes or nothing will build.
  * conversely, our prototypes might clash due to throw() specifiers and
@@ -2487,7 +2492,7 @@ typedef enum
 #define FNE_INCL_BR	1	/* include [] in name */
 #define FNE_CHECK_START	2	/* check name starts with valid character */
 
-#if (defined(sun) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) \
+#if (defined(SUN_SYSTEM) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) \
 	&& defined(S_ISCHR)
 # define OPEN_CHR_FILES
 #endif