summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-12-03 16:40:51 +0100
committerBram Moolenaar <Bram@vim.org>2016-12-03 16:40:51 +0100
commita899e6ecc4523c7e411eaf6fbaa4197d70f6f39e (patch)
treed477a022d1581e56239dbff5de3778c9470aaee3 /src
parent3fad98e8af247af8ebc49730646282a71ccdd47a (diff)
downloadvim-git-a899e6ecc4523c7e411eaf6fbaa4197d70f6f39e.tar.gz
patch 8.0.0123v8.0.0123
Problem: Modern Sun compilers define "__sun" instead of "sun". Solution: Use __sun. (closes #1296)
Diffstat (limited to 'src')
-rw-r--r--src/mbyte.c2
-rw-r--r--src/os_unixx.h4
-rw-r--r--src/pty.c10
-rw-r--r--src/version.c2
-rw-r--r--src/vim.h7
5 files changed, 16 insertions, 9 deletions
diff --git a/src/mbyte.c b/src/mbyte.c
index 646235fef..ccf23e884 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -5735,7 +5735,7 @@ static char e_xim[] = N_("E285: Failed to create input context");
#endif
#if defined(FEAT_GUI_X11) || defined(PROTO)
-# if defined(XtSpecificationRelease) && XtSpecificationRelease >= 6 && !defined(sun)
+# if defined(XtSpecificationRelease) && XtSpecificationRelease >= 6 && !defined(SUN_SYSTEM)
# define USE_X11R6_XIM
# endif
diff --git a/src/os_unixx.h b/src/os_unixx.h
index 8ed52d120..f1aad2c50 100644
--- a/src/os_unixx.h
+++ b/src/os_unixx.h
@@ -17,8 +17,8 @@
# define signal sigset
#endif
- /* sun's sys/ioctl.h redefines symbols from termio world */
-#if defined(HAVE_SYS_IOCTL_H) && !defined(sun)
+ /* Sun's sys/ioctl.h redefines symbols from termio world */
+#if defined(HAVE_SYS_IOCTL_H) && !defined(SUN_SYSTEM)
# include <sys/ioctl.h>
#endif
diff --git a/src/pty.c b/src/pty.c
index c07256fbd..20ab65b2a 100644
--- a/src/pty.c
+++ b/src/pty.c
@@ -62,7 +62,7 @@
#ifdef sinix
#undef buf_T
#endif
-# ifdef sun
+# ifdef SUN_SYSTEM
# include <sys/conf.h>
# endif
#endif
@@ -87,11 +87,11 @@
# include <sys/ptem.h>
#endif
-#if !defined(sun) && !defined(VMS) && !defined(MACOS)
+#if !defined(SUN_SYSTEM) && !defined(VMS) && !defined(MACOS)
# include <sys/ioctl.h>
#endif
-#if defined(sun) && defined(LOCKPTY) && !defined(TIOCEXCL)
+#if defined(SUN_SYSTEM) && defined(LOCKPTY) && !defined(TIOCEXCL)
# include <sys/ttold.h>
#endif
@@ -166,7 +166,7 @@ SetupSlavePTY(int fd)
# endif
if (ioctl(fd, I_PUSH, "ldterm") != 0)
return -1;
-# ifdef sun
+# ifdef SUN_SYSTEM
if (ioctl(fd, I_PUSH, "ttcompat") != 0)
return -1;
# endif
@@ -391,7 +391,7 @@ OpenPTY(char **ttyn)
continue;
}
#endif
-#if defined(sun) && defined(TIOCGPGRP) && !defined(SUNOS3)
+#if defined(SUN_SYSTEM) && defined(TIOCGPGRP) && !defined(SUNOS3)
/* Hack to ensure that the slave side of the pty is
* unused. May not work in anything other than SunOS4.1
*/
diff --git a/src/version.c b/src/version.c
index 06986069d..536d2182f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 123,
+/**/
122,
/**/
121,
diff --git a/src/vim.h b/src/vim.h
index de26c63db..ef75ea2ca 100644
--- 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