From 16e7819ad8ba1645ff71e5b769f92119a5975a12 Mon Sep 17 00:00:00 2001 From: antopilo Date: Thu, 30 Jan 2025 22:43:03 -0500 Subject: [PATCH] Fixed compilation issue --- Nuake/Source/Nuake/Core/OS.cpp | 65 +++++++++++++++++----------------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/Nuake/Source/Nuake/Core/OS.cpp b/Nuake/Source/Nuake/Core/OS.cpp index da27d8da..f7b7c33b 100644 --- a/Nuake/Source/Nuake/Core/OS.cpp +++ b/Nuake/Source/Nuake/Core/OS.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +//#include namespace Nuake { @@ -176,38 +176,39 @@ namespace Nuake { command_line.back() = nullptr; - struct subprocess_s subprocess; + int result = 0; + //struct subprocess_s subprocess; char output[1024]; - int result = subprocess_create(command_line.data(), subprocess_option_inherit_environment, &subprocess); - if (0 != result) { - // an error occurred! - } - - int process_return; - result = subprocess_join(&subprocess, &process_return); - if (0 != result) { - // an error occurred! - } - - FILE* p_stdout = subprocess_stdout(&subprocess); - - std::string stdout_output; - fgets(output, 1024, p_stdout); - while (fgets(output, sizeof(output), p_stdout)) - { - stdout_output += output; - } - - FILE* p_stderr = subprocess_stderr(&subprocess); - std::string stderr_output; - char errOutput[1024]; - while (fgets(errOutput, sizeof(errOutput), p_stderr)) - { - stderr_output += errOutput; - } - - out = stdout_output; - err = stderr_output; + //int result = subprocess_create(command_line.data(), subprocess_option_inherit_environment, &subprocess); + //if (0 != result) { + // // an error occurred! + //} + // + //int process_return; + //result = subprocess_join(&subprocess, &process_return); + //if (0 != result) { + // // an error occurred! + //} + // + //FILE* p_stdout = subprocess_stdout(&subprocess); + // + //std::string stdout_output; + //fgets(output, 1024, p_stdout); + //while (fgets(output, sizeof(output), p_stdout)) + //{ + // stdout_output += output; + //} + // + //FILE* p_stderr = subprocess_stderr(&subprocess); + //std::string stderr_output; + //char errOutput[1024]; + //while (fgets(errOutput, sizeof(errOutput), p_stderr)) + //{ + // stderr_output += errOutput; + //} + // + //out = stdout_output; + //err = stderr_output; return result; }