Repository: lucy-clownfish Updated Branches: refs/heads/master 2d1687d48 -> fd9b4c044
Regenerate charmonizer.c for Windows fix Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/fd9b4c04 Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/fd9b4c04 Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/fd9b4c04 Branch: refs/heads/master Commit: fd9b4c04475d0c8c31b34bc72ee6cd25d644507f Parents: 2d1687d Author: Nick Wellnhofer <[email protected]> Authored: Mon Jul 4 20:20:32 2016 +0200 Committer: Nick Wellnhofer <[email protected]> Committed: Mon Jul 4 20:20:32 2016 +0200 ---------------------------------------------------------------------- compiler/common/charmonizer.c | 6 ++++-- runtime/common/charmonizer.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/fd9b4c04/compiler/common/charmonizer.c ---------------------------------------------------------------------- diff --git a/compiler/common/charmonizer.c b/compiler/common/charmonizer.c index dc42893..46d0610 100644 --- a/compiler/common/charmonizer.c +++ b/compiler/common/charmonizer.c @@ -5500,6 +5500,9 @@ chaz_OS_init(void) { chaz_OS.shell_type = CHAZ_OS_CMD_EXE; chaz_OS.run_sh_via_cmd_exe = 0; } + + /* Redirection is always run through cmd.exe. */ + strcpy(chaz_OS.dev_null, "nul"); } else if (output_len >= 7 && memcmp(output, "foo^bar", 7) == 0) { /* Escape character is backslash. */ @@ -5507,17 +5510,16 @@ chaz_OS_init(void) { printf("Detected POSIX shell\n"); } chaz_OS.shell_type = CHAZ_OS_POSIX; + strcpy(chaz_OS.dev_null, "/dev/null"); } if (chaz_OS.shell_type == CHAZ_OS_CMD_EXE) { strcpy(chaz_OS.dir_sep, "\\"); - strcpy(chaz_OS.dev_null, "nul"); /* Empty string should work, too. */ strcpy(chaz_OS.local_command_start, ".\\"); } else if (chaz_OS.shell_type == CHAZ_OS_POSIX) { strcpy(chaz_OS.dir_sep, "/"); - strcpy(chaz_OS.dev_null, "/dev/null"); strcpy(chaz_OS.local_command_start, "./"); } else { http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/fd9b4c04/runtime/common/charmonizer.c ---------------------------------------------------------------------- diff --git a/runtime/common/charmonizer.c b/runtime/common/charmonizer.c index 7aed304..d25ffa4 100644 --- a/runtime/common/charmonizer.c +++ b/runtime/common/charmonizer.c @@ -5500,6 +5500,9 @@ chaz_OS_init(void) { chaz_OS.shell_type = CHAZ_OS_CMD_EXE; chaz_OS.run_sh_via_cmd_exe = 0; } + + /* Redirection is always run through cmd.exe. */ + strcpy(chaz_OS.dev_null, "nul"); } else if (output_len >= 7 && memcmp(output, "foo^bar", 7) == 0) { /* Escape character is backslash. */ @@ -5507,17 +5510,16 @@ chaz_OS_init(void) { printf("Detected POSIX shell\n"); } chaz_OS.shell_type = CHAZ_OS_POSIX; + strcpy(chaz_OS.dev_null, "/dev/null"); } if (chaz_OS.shell_type == CHAZ_OS_CMD_EXE) { strcpy(chaz_OS.dir_sep, "\\"); - strcpy(chaz_OS.dev_null, "nul"); /* Empty string should work, too. */ strcpy(chaz_OS.local_command_start, ".\\"); } else if (chaz_OS.shell_type == CHAZ_OS_POSIX) { strcpy(chaz_OS.dir_sep, "/"); - strcpy(chaz_OS.dev_null, "/dev/null"); strcpy(chaz_OS.local_command_start, "./"); } else {
