delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/10/16/01:27:59

From: sos AT prospect DOT com DOT ru (Sergey Okhapkin)
Subject: build_argv fix.
16 Oct 1998 01:27:59 -0700 :
Message-ID: <01BDF8FC.88D57720.cygnus.cygwin32.developers@sos>
To: "'cygwin32-developers AT cygnus DOT com'" <cygwin32-developers AT cygnus DOT com>

Hi!

dcrt0.cc	(build_argv): only space and tab are command line separators, but not 		all characters returned by isspace().

With this fix sed problems while configuring cdk are gone, but if CONFIG_SHELL is bash, ash still reports:

$ nice /usr/src/cygnus/src/configure --host=i586-cygwin32 --prefix=/usr --exec-prefix=/usr/H-i386-cygwin32 -v
/usr/src/cygnus/src/configure: 679: Syntax error: EOF in backquote substitution
$ 

--- dcrt0.cc.orig       Fri Oct 09 01:40:51 1998
+++ dcrt0.cc    Fri Oct 16 11:29:39 1998
@@ -372,6 +372,12 @@ globify (char *word, char **&argv, int &

 /* Build argv, argc from string passed from Windows.  */

+#define issep(c) \
+  ({ \
+    char ch = c; \
+    (ch == ' ' || ch == '\t'); \
+  })
+
 static void
 build_argv (char *cmd, char **&argv, int &argc, int winshell)
 {
@@ -387,7 +393,7 @@ build_argv (char *cmd, char **&argv, int
   while (*cmd)
     {
       /* Ignore spaces */
-      if (isspace (*cmd))
+      if (issep (*cmd))
        {
          cmd++;
          continue;
@@ -406,7 +412,7 @@ build_argv (char *cmd, char **&argv, int
              sawquote = cmd;
              cmd = quoted (word, cmd, winshell);
            }
-         if (isspace (*cmd))   // End of argument if space
+         if (issep (*cmd))     // End of argument if space
            break;
        }
       if (*cmd)



-- 
Sergey Okhapkin, http://www.lexa.ru/sos
Moscow, Russia


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019