]> git.ipfire.org Git - thirdparty/make.git/commitdiff
* src/job.c (construct_command_argv): Remove unused VMS code
authorPaul Smith <psmith@gnu.org>
Sat, 24 Aug 2019 21:41:45 +0000 (17:41 -0400)
committerPaul Smith <psmith@gnu.org>
Sun, 25 Aug 2019 21:17:36 +0000 (17:17 -0400)
src/job.c

index 604b1d1063f1e79b8d9c61934a61795371279576..e0b21c1337780f72577c1aba6a4f4e6c4bd399dd 100644 (file)
--- a/src/job.c
+++ b/src/job.c
@@ -2463,7 +2463,7 @@ exec_command (char **argv, char **envp)
       break;
     case ENOEXEC:
       {
-        /* The file is not executable.  Try it as a shell script.  */
+        /* The file was not a program.  Try it as a shell script.  */
         const char *shell;
         char **new_argv;
         int argc;
@@ -3537,43 +3537,6 @@ construct_command_argv (char *line, char **restp, struct file *file,
   char *shell, *ifs, *shellflags;
   char **argv;
 
-#ifdef VMS
-  char *cptr;
-  int argc;
-
-  argc = 0;
-  cptr = line;
-  for (;;)
-    {
-      while ((*cptr != 0) && (ISSPACE (*cptr)))
-        cptr++;
-      if (*cptr == 0)
-        break;
-      while ((*cptr != 0) && (!ISSPACE (*cptr)))
-        cptr++;
-      argc++;
-    }
-
-  argv = xmalloc (argc * sizeof (char *));
-  if (argv == 0)
-    abort ();
-
-  cptr = line;
-  argc = 0;
-  for (;;)
-    {
-      while ((*cptr != 0) && (ISSPACE (*cptr)))
-        cptr++;
-      if (*cptr == 0)
-        break;
-      DB (DB_JOBS, ("argv[%d] = [%s]\n", argc, cptr));
-      argv[argc++] = cptr;
-      while ((*cptr != 0) && (!ISSPACE (*cptr)))
-        cptr++;
-      if (*cptr != 0)
-        *cptr++ = 0;
-    }
-#else
   {
     /* Turn off --warn-undefined-variables while we expand SHELL and IFS.  */
     int save = warn_undefined_variables_flag;
@@ -3648,7 +3611,7 @@ construct_command_argv (char *line, char **restp, struct file *file,
   free (shell);
   free (shellflags);
   free (ifs);
-#endif /* !VMS */
+
   return argv;
 }
 \f