Skip to content

Commit

Permalink
Change _MSC_VER to PLATFORM_WINDOWS for some exec.
Browse files Browse the repository at this point in the history
  • Loading branch information
lerno committed Jan 21, 2025
1 parent 3221180 commit 5d7a8d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/file_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ bool execute_cmd_failable(const char *cmd, char **result, const char *stdin_stri
{
cmd = strdup(cmd);
scratch_buffer_clear();
#if (_MSC_VER)
#if (PLATFORM_WINDOWS)
scratch_buffer_printf("%s < __c3temp.bin", cmd);
#else
scratch_buffer_printf("cat __c3temp.bin | %s", cmd);
Expand All @@ -737,7 +737,7 @@ bool execute_cmd_failable(const char *cmd, char **result, const char *stdin_stri
fputs(stdin_string, f);
fclose(f);
}
#if (_MSC_VER)
#if (PLATFORM_WINDOWS)
if (!(process = _wpopen(win_utf8to16(cmd), L"rb"))) return false;
#else
if (!(process = popen(cmd, "r"))) return false;
Expand Down

0 comments on commit 5d7a8d2

Please sign in to comment.