summaryrefslogtreecommitdiff
path: root/src/job.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-12-09 13:16:13 +0100
committerBram Moolenaar <Bram@vim.org>2020-12-09 13:16:13 +0100
commitf46bf5204c3c55d23921b501db21a906d526eb45 (patch)
treea7ed0501c46123a0af70b780940b8c4ac0a50f2e /src/job.c
parent7bb4e74c38642682cfdd0cb4052adfa5efdd7dd1 (diff)
downloadvim-git-f46bf5204c3c55d23921b501db21a906d526eb45.tar.gz
patch 8.2.2118: dead code in the job supportv8.2.2118
Problem: Dead code in the job support. (Dominique Pellé) Solution: Define USE_ARGV before checking for it.
Diffstat (limited to 'src/job.c')
-rw-r--r--src/job.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/job.c b/src/job.c
index 16fc7c767..aeb2af7b5 100644
--- 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;