]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.2118: dead code in the job support v8.2.2118
authorBram Moolenaar <Bram@vim.org>
Wed, 9 Dec 2020 12:16:13 +0000 (13:16 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 9 Dec 2020 12:16:13 +0000 (13:16 +0100)
Problem:    Dead code in the job support. (Dominique PellĂ©)
Solution:   Define USE_ARGV before checking for it.

src/job.c
src/version.c

index 16fc7c767bb7be86a5bd5a6a4344d8ed88d33cc3..aeb2af7b532673baaa96baface5ee3eb5e765918 100644 (file)
--- a/src/job.c
+++ b/src/job.c
@@ -887,6 +887,11 @@ job_any_running()
 }
 #endif
 
+// Unix uses argv[] for the command, other systems use a string.
+#if defined(UNIX)
+# define USE_ARGV
+#endif
+
 #if !defined(USE_ARGV) || defined(PROTO)
 /*
  * Escape one argument for an external command.
@@ -1269,9 +1274,7 @@ job_start(
     char       **argv = NULL;
     int                argc = 0;
     int                i;
-#if defined(UNIX)
-# define USE_ARGV
-#else
+#ifndef USE_ARGV
     garray_T   ga;
 #endif
     jobopt_T   opt;
index 21d051e05d73eccb378fc86352da1791a1f95a03..7554fb3b7ceeb322a4f9dfa2c28af61e3314f524 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2118,
 /**/
     2117,
 /**/