From 613fe7ad2b8e2d4e990cc56596590a23a42c3f7a Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 22 Jul 2017 21:11:53 +0200 Subject: patch 8.0.0751: OpenPTY missing with some combination of features Problem: OpenPTY missing with some combination of features. (Kazunobu Kuriyama) Solution: Adjust #ifdef. Also include pty.pro when needed. --- src/misc2.c | 3 +++ src/proto.h | 11 +++++++---- src/pty.c | 2 +- src/version.c | 2 ++ 4 files changed, 13 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/misc2.c b/src/misc2.c index 7014e1648d..541069e54b 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -6050,6 +6050,9 @@ moreenv(void) } # ifdef USE_VIMPTY_GETENV +/* + * Used for mch_getenv() for Mac. + */ char_u * vimpty_getenv(const char_u *string) { diff --git a/src/proto.h b/src/proto.h index b5a6224a96..92e3f60552 100644 --- a/src/proto.h +++ b/src/proto.h @@ -212,15 +212,18 @@ void qsort(void *base, size_t elm_count, size_t elm_size, int (*cmp)(const void # include "channel.pro" # endif -# ifdef FEAT_GUI -# include "gui.pro" +# if defined(FEAT_GUI) || defined(FEAT_JOB_CHANNEL) # if defined(UNIX) || defined(MACOS) # include "pty.pro" # endif +# endif + +# ifdef FEAT_GUI +# include "gui.pro" # if !defined(HAVE_SETENV) && !defined(HAVE_PUTENV) && !defined(VMS) -extern int putenv(const char *string); /* from pty.c */ +extern int putenv(const char *string); /* in misc2.c */ # ifdef USE_VIMPTY_GETENV -extern char_u *vimpty_getenv(const char_u *string); /* from pty.c */ +extern char_u *vimpty_getenv(const char_u *string); /* in misc2.c */ # endif # endif # ifdef FEAT_GUI_W32 diff --git a/src/pty.c b/src/pty.c index a738ac158d..9b03612227 100644 --- a/src/pty.c +++ b/src/pty.c @@ -43,7 +43,7 @@ #include "vim.h" -#if defined(FEAT_GUI) || defined(FEAT_TERMINAL) +#if defined(FEAT_GUI) || defined(FEAT_JOB_CHANNEL) #include diff --git a/src/version.c b/src/version.c index 78a552dd96..174fc0d2e4 100644 --- a/src/version.c +++ b/src/version.c @@ -769,6 +769,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 751, /**/ 750, /**/ -- cgit v1.2.3