]> granicus.if.org Git - vim/commitdiff
patch 8.0.0123 v8.0.0123
authorBram Moolenaar <Bram@vim.org>
Sat, 3 Dec 2016 15:40:51 +0000 (16:40 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 3 Dec 2016 15:40:51 +0000 (16:40 +0100)
Problem:    Modern Sun compilers define "__sun" instead of "sun".
Solution:   Use __sun. (closes #1296)

src/mbyte.c
src/os_unixx.h
src/pty.c
src/version.c
src/vim.h

index 646235feff42ccd91de45831348ccfac310c8f9f..ccf23e884e26729523398582e5d7e5779009b7f2 100644 (file)
@@ -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
 
index 8ed52d1209f37bd174fb73a5cbb1104df13b48b3..f1aad2c50c84fade681e548b97d7146e3be05b23 100644 (file)
@@ -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
 
index c07256fbd11d0325dcd78b76531a0a66695de33d..20ab65b2a941c5f5ecc6c4d8fc1e50f0bc599e7c 100644 (file)
--- 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
 # 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
             */
index 06986069d0847d4bfbf23b48350ba0ac2a8f4ce6..536d2182f27ab904e006d1d975d529a1b0df2e24 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    123,
 /**/
     122,
 /**/
index de26c63db49e56c52eda8309086b223902cf1de4..ef75ea2ca9f292847a1efcbfc3de4f03e7178116 100644 (file)
--- a/src/vim.h
+++ b/src/vim.h
 # 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