summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-15 20:56:03 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-15 20:56:03 +0000
commit1a906b693827363e1544cee57fceff7d32f9ee39 (patch)
tree5955af17e192fc9ec8c9e9f346d43e66905fadc6
parent2311cce91f024eb5c4990b97ea80e8447596780f (diff)
parent290610c1527c2206e1c1c99a7cef2c1c0bb50120 (diff)
sorry. I made wrong tags.v1_8_5_69
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_8_5_69@12995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--version.h2
-rw-r--r--win32/win32.c29
3 files changed, 11 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index c107c6e936..ec215b89d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,3 @@
-Thu Aug 16 04:56:35 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * win32/win32.c (CreateChild): enclose command line except for
- command.com which can not handle quotes. [ruby-talk:258939]
-
Thu Aug 16 04:54:45 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/mkmf.rb (link_command, cc_command, cpp_command): do not expand
diff --git a/version.h b/version.h
index f1f4693832..bb42a94697 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2007-08-16"
#define RUBY_VERSION_CODE 185
#define RUBY_RELEASE_CODE 20070816
-#define RUBY_PATCHLEVEL 70
+#define RUBY_PATCHLEVEL 69
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
diff --git a/win32/win32.c b/win32/win32.c
index cdb5b61bc9..b88c136467 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -528,7 +528,7 @@ SafeFree(char **vec, int vecc)
-e 'END{$cmds.sort.each{|n,f|puts " \"\\#{f.to_s(8)}\" #{n.dump} + 1,"}}'
98cmd ntcmd
*/
-static const char *const szInternalCmds[] = {
+static char *szInternalCmds[] = {
"\2" "assoc" + 1,
"\3" "break" + 1,
"\3" "call" + 1,
@@ -587,22 +587,16 @@ internal_match(const void *key, const void *elem)
}
static int
-is_command_com(const char *interp)
+isInternalCmd(const char *cmd, const char *interp)
{
- int i = strlen(interp) - 11;
+ int i, nt = 1;
+ char cmdname[9], *b = cmdname, c, **nm;
+ i = strlen(interp) - 11;
if ((i == 0 || i > 0 && isdirsep(interp[i-1])) &&
strcasecmp(interp+i, "command.com") == 0) {
- return 1;
+ nt = 0;
}
- return 0;
-}
-
-static int
-is_internal_cmd(const char *cmd, int nt)
-{
- char cmdname[9], *b = cmdname, c, **nm;
-
do {
if (!(c = *cmd++)) return 0;
} while (isspace(c));
@@ -970,7 +964,6 @@ CreateChild(const char *cmd, const char *prog, SECURITY_ATTRIBUTES *psa,
else {
int redir = -1;
int len = 0;
- int nt;
while (ISSPACE(*cmd)) cmd++;
for (prog = cmd; *prog; prog = CharNext(prog)) {
if (ISSPACE(*prog)) {
@@ -989,12 +982,10 @@ CreateChild(const char *cmd, const char *prog, SECURITY_ATTRIBUTES *psa,
cmd = tmp;
}
else if ((shell = getenv("COMSPEC")) &&
- (nt = !is_command_com(shell),
- (redir < 0 ? has_redirection(cmd) : redir) ||
- is_internal_cmd(cmd, nt))) {
- char *tmp = ALLOCA_N(char, strlen(shell) + len + sizeof(" /c ")
- + (nt ? 2 : 0));
- sprintf(tmp, nt ? "%s /c \"%.*s\"" : "%s /c %.*s", shell, len, cmd);
+ ((redir < 0 ? has_redirection(cmd) : redir) ||
+ isInternalCmd(cmd, shell))) {
+ char *tmp = ALLOCA_N(char, strlen(shell) + len + sizeof(" /c "));
+ sprintf(tmp, "%s /c %.*s", shell, len, cmd);
cmd = tmp;
}
else {