From 984a311dce67a9025145243a7b71b42b7412d776 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 26 Jul 2023 01:29:30 -0400 Subject: [PATCH] make compatible with windows cross-compiler --- tools/lammps-gui/stdcapture.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/lammps-gui/stdcapture.cpp b/tools/lammps-gui/stdcapture.cpp index 4932ef3d27..610f08b92b 100644 --- a/tools/lammps-gui/stdcapture.cpp +++ b/tools/lammps-gui/stdcapture.cpp @@ -15,7 +15,7 @@ #include "stdcapture.h" -#ifdef _MSC_VER +#ifdef _WIN32 #include #define popen _popen #define pclose _pclose @@ -43,7 +43,7 @@ StdCapture::StdCapture() : m_capturing(false), m_oldStdOut(0) m_pipe[READ] = 0; m_pipe[WRITE] = 0; -#if _MSC_VER +#if _WIN32 if (pipe(m_pipe, 65536, O_BINARY) == -1) return; #else if (pipe(m_pipe) == -1) return; @@ -84,7 +84,7 @@ bool StdCapture::EndCapture() bytesRead = 0; fd_blocked = false; -#ifdef _MSC_VER +#ifdef _WIN32 if (!eof(m_pipe[READ])) { bytesRead = read(m_pipe[READ], buf, bufSize - 1); }