citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit ab598bc610b0b409d03affdf25c6b40a58fc560b
parent 78ad6ae422cebafc403169a371bb3fbbf83e6d5c
Author: Kyle Milz <kyle@windows.krwm.net>
Date:   Sun,  1 Jan 2017 21:15:55 -0800

src/inst: add win32 headers

Diffstat:
Msrc/inst_frontend.cc | 19+++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/src/inst_frontend.cc b/src/inst_frontend.cc @@ -17,20 +17,31 @@ #include "lib.h" // citrun_major, citrun_minor #include <sys/stat.h> // stat -#include <sys/time.h> // utimes -#include <sys/utsname.h> // uname -#include <sys/wait.h> // waitpid #include <clang/Frontend/TextDiagnosticBuffer.h> #include <clang/Tooling/CommonOptionsParser.h> #include <clang/Tooling/Tooling.h> #include <cstdio> // tmpnam #include <cstring> // strcmp -#include <err.h> #include <fstream> // ifstream, ofstream #include <sstream> // ostringstream + +#ifdef _WIN32 +#include <windows.h> // CreateProcess +#include <Shlwapi.h> // PathFindOnPath + +#define PATH_SEP ';' +#else // _WIN32 +#include <sys/time.h> // utimes +#include <sys/utsname.h> // uname +#include <sys/wait.h> // waitpid + +#include <err.h> #include <unistd.h> // execvp, fork, getpid, unlink +#define PATH_SEP ':' +#endif // _WIN32 + static llvm::cl::OptionCategory ToolingCategory("citrun_inst options");