Skip to content

Commit a899e6e

Browse files
committed
patch 8.0.0123
Problem: Modern Sun compilers define "__sun" instead of "sun". Solution: Use __sun. (closes #1296)
1 parent 3fad98e commit a899e6e

File tree

5 files changed

+16
-9
lines changed

5 files changed

+16
-9
lines changed

src/mbyte.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5735,7 +5735,7 @@ static char e_xim[] = N_("E285: Failed to create input context");
57355735
#endif
57365736

57375737
#if defined(FEAT_GUI_X11) || defined(PROTO)
5738-
# if defined(XtSpecificationRelease) && XtSpecificationRelease >= 6 && !defined(sun)
5738+
# if defined(XtSpecificationRelease) && XtSpecificationRelease >= 6 && !defined(SUN_SYSTEM)
57395739
# define USE_X11R6_XIM
57405740
# endif
57415741

src/os_unixx.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
# define signal sigset
1818
#endif
1919

20-
/* sun's sys/ioctl.h redefines symbols from termio world */
21-
#if defined(HAVE_SYS_IOCTL_H) && !defined(sun)
20+
/* Sun's sys/ioctl.h redefines symbols from termio world */
21+
#if defined(HAVE_SYS_IOCTL_H) && !defined(SUN_SYSTEM)
2222
# include <sys/ioctl.h>
2323
#endif
2424

src/pty.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
#ifdef sinix
6363
#undef buf_T
6464
#endif
65-
# ifdef sun
65+
# ifdef SUN_SYSTEM
6666
# include <sys/conf.h>
6767
# endif
6868
#endif
@@ -87,11 +87,11 @@
8787
# include <sys/ptem.h>
8888
#endif
8989

90-
#if !defined(sun) && !defined(VMS) && !defined(MACOS)
90+
#if !defined(SUN_SYSTEM) && !defined(VMS) && !defined(MACOS)
9191
# include <sys/ioctl.h>
9292
#endif
9393

94-
#if defined(sun) && defined(LOCKPTY) && !defined(TIOCEXCL)
94+
#if defined(SUN_SYSTEM) && defined(LOCKPTY) && !defined(TIOCEXCL)
9595
# include <sys/ttold.h>
9696
#endif
9797

@@ -166,7 +166,7 @@ SetupSlavePTY(int fd)
166166
# endif
167167
if (ioctl(fd, I_PUSH, "ldterm") != 0)
168168
return -1;
169-
# ifdef sun
169+
# ifdef SUN_SYSTEM
170170
if (ioctl(fd, I_PUSH, "ttcompat") != 0)
171171
return -1;
172172
# endif
@@ -391,7 +391,7 @@ OpenPTY(char **ttyn)
391391
continue;
392392
}
393393
#endif
394-
#if defined(sun) && defined(TIOCGPGRP) && !defined(SUNOS3)
394+
#if defined(SUN_SYSTEM) && defined(TIOCGPGRP) && !defined(SUNOS3)
395395
/* Hack to ensure that the slave side of the pty is
396396
* unused. May not work in anything other than SunOS4.1
397397
*/

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
123,
767769
/**/
768770
122,
769771
/**/

src/vim.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,11 @@
268268
# define UNUSED
269269
#endif
270270

271+
/* Used to check for "sun", "__sun" is used by newer compilers. */
272+
#if defined(__sun)
273+
# define SUN_SYSTEM
274+
#endif
275+
271276
/* if we're compiling in C++ (currently only KVim), the system
272277
* headers must have the correct prototypes or nothing will build.
273278
* conversely, our prototypes might clash due to throw() specifiers and
@@ -2487,7 +2492,7 @@ typedef enum
24872492
#define FNE_INCL_BR 1 /* include [] in name */
24882493
#define FNE_CHECK_START 2 /* check name starts with valid character */
24892494

2490-
#if (defined(sun) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) \
2495+
#if (defined(SUN_SYSTEM) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) \
24912496
&& defined(S_ISCHR)
24922497
# define OPEN_CHR_FILES
24932498
#endif

0 commit comments

Comments
 (0)