citrun

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

commit 500cdfc8837f2710adae0c356f7ef4013dd4d3c2
parent 4dedb0e666370ad61ab4a92ac44ec1a2560fad33
Author: Kyle Milz <kyle@windows.krwm.net>
Date:   Sat, 31 Dec 2016 00:02:36 -0800

src/inst_log: add windows compat bits

Diffstat:
Msrc/inst_log.h | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/inst_log.h b/src/inst_log.h @@ -5,7 +5,11 @@ #include <llvm/Support/raw_ostream.h> #include <llvm/Support/FileSystem.h> // llvm::sys::fs::F_Append #include <sstream> -#include <unistd.h> // pid_t +#ifdef WIN32 +#include <process.h> // getpid +#else +#include <unistd.h> // getpid +#endif // // Taken from StackOverflow user Loki Astari. Thanks. @@ -14,7 +18,7 @@ class InstrumentLogger : public std::ostream { class LogBuffer : public std::stringbuf { - pid_t m_pid; + int m_pid; std::error_code m_ec; llvm::raw_fd_ostream m_outfile; public: