Skip to content

Commit 613fe7a

Browse files
committed
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.
1 parent 6ed8069 commit 613fe7a

4 files changed

Lines changed: 13 additions & 5 deletions

File tree

src/misc2.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6050,6 +6050,9 @@ moreenv(void)
60506050
}
60516051

60526052
# ifdef USE_VIMPTY_GETENV
6053+
/*
6054+
* Used for mch_getenv() for Mac.
6055+
*/
60536056
char_u *
60546057
vimpty_getenv(const char_u *string)
60556058
{

src/proto.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,15 +212,18 @@ void qsort(void *base, size_t elm_count, size_t elm_size, int (*cmp)(const void
212212
# include "channel.pro"
213213
# endif
214214

215-
# ifdef FEAT_GUI
216-
# include "gui.pro"
215+
# if defined(FEAT_GUI) || defined(FEAT_JOB_CHANNEL)
217216
# if defined(UNIX) || defined(MACOS)
218217
# include "pty.pro"
219218
# endif
219+
# endif
220+
221+
# ifdef FEAT_GUI
222+
# include "gui.pro"
220223
# if !defined(HAVE_SETENV) && !defined(HAVE_PUTENV) && !defined(VMS)
221-
extern int putenv(const char *string); /* from pty.c */
224+
extern int putenv(const char *string); /* in misc2.c */
222225
# ifdef USE_VIMPTY_GETENV
223-
extern char_u *vimpty_getenv(const char_u *string); /* from pty.c */
226+
extern char_u *vimpty_getenv(const char_u *string); /* in misc2.c */
224227
# endif
225228
# endif
226229
# ifdef FEAT_GUI_W32

src/pty.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
#include "vim.h"
4545

46-
#if defined(FEAT_GUI) || defined(FEAT_TERMINAL)
46+
#if defined(FEAT_GUI) || defined(FEAT_JOB_CHANNEL)
4747

4848
#include <signal.h>
4949

src/version.c

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

770770
static int included_patches[] =
771771
{ /* Add new patch number below this line */
772+
/**/
773+
751,
772774
/**/
773775
750,
774776
/**/

0 commit comments

Comments
 (0)