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>
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;
(*argv)[*argc] = NULL;
return OK;
}
-# endif
#endif
/*
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.
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)
{
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 251,
/**/
250,
/**/