Skip to content

Commit 51d130a

Browse files
author
Daniel Kroening
committed
use run() in ansi-c/c_preprocess
1 parent 0e31f73 commit 51d130a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/ansi-c/c_preprocess.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Author: Daniel Kroening, [email protected]
1010

1111
#include <util/c_types.h>
1212
#include <util/config.h>
13+
#include <util/run.h>
1314
#include <util/suffix.h>
1415
#include <util/tempfile.h>
1516
#include <util/unicode.h>
@@ -383,8 +384,9 @@ bool c_preprocess_visual_studio(
383384
command += " 2> \"" + stderr_file() + "\"";
384385

385386
// _popen isn't very reliable on WIN32
386-
// that's why we use system()
387-
int result=system(command.c_str());
387+
// that's why we use run()
388+
int result =
389+
run("cl", {"cl", "@" + command_file_name()}, "", tmpi(), stderr_file());
388390

389391
std::ifstream instream(tmpi());
390392

@@ -486,7 +488,7 @@ bool c_preprocess_codewarrior(
486488
command += " -o \"" + tmpi() + "\"";
487489
command += " 2> \"" + stderr_file() + "\"";
488490

489-
result=system(command.c_str());
491+
result = system(command.c_str());
490492

491493
std::ifstream stream_i(tmpi());
492494

0 commit comments

Comments
 (0)