patch 9.2.0251: Link error when building without channel feature

Problem:  Compile error when building without channel feature
          (John Marriott, after v9.2.0250)
Solution: Update ifdefs and move implementation out of FEAT_JOB_CHANNEL
          (Yasuhiro Matsumoto)

Move build_argv_from_list() and mch_get_cmd_output_direct() out of
FEAT_JOB_CHANNEL guards so that system() with a List argument works
in builds that have FEAT_EVAL but not FEAT_JOB_CHANNEL (e.g.
FEAT_NORMAL without GUI).

related: #19791
closes:  #19826

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Yasuhiro Matsumoto
2026-03-26 19:32:49 +00:00
committed by Christian Brabandt
parent c84526dd29
commit 68b3585e1d
3 changed files with 10 additions and 4 deletions
+3 -2
View File
@@ -3095,7 +3095,9 @@ build_argv_from_string(char_u *cmd, char ***argv, int *argc)
return OK;
}
# if defined(FEAT_JOB_CHANNEL)
#endif
#if defined(FEAT_EVAL)
/*
* Build "argv[argc]" from the list "l".
* "argv[argc]" is set to NULL;
@@ -3130,7 +3132,6 @@ build_argv_from_list(list_T *l, char ***argv, int *argc)
(*argv)[*argc] = NULL;
return OK;
}
# endif
#endif
/*
+5 -2
View File
@@ -5960,7 +5960,9 @@ create_pipe_pair(HANDLE handles[2])
return TRUE;
}
# if defined(FEAT_EVAL)
#endif // FEAT_JOB_CHANNEL
#if defined(FEAT_EVAL)
/*
* Execute "argv" directly without the shell and return the output.
* Used by system() and systemlist() when the command is a List.
@@ -6171,8 +6173,9 @@ done:
CloseHandle(hChildStdinRd);
return buffer;
}
# endif
#endif // FEAT_EVAL
#if defined(FEAT_JOB_CHANNEL)
void
mch_job_start(char *cmd, job_T *job, jobopt_T *options)
{
+2
View File
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
251,
/**/
250,
/**/