Fix cmake defaults, msvc log thread

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2023-05-26 00:39:29 +02:00
parent f7696dca5e
commit 1a75fc6b19
No known key found for this signature in database
GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 13 additions and 5 deletions

View File

@ -37,8 +37,8 @@ else()
set(CARLA_USE_OSC_DEFAULT TRUE)
endif()
set(CARLA_USE_JACK TRUE CACHE ${CARLA_USE_JACK_DEFAULT} "Enable JACK")
set(CARLA_USE_OSC TRUE CACHE ${CARLA_USE_OSC_DEFAULT} "Enable OSC")
set(CARLA_USE_JACK ${CARLA_USE_JACK_DEFAULT} CACHE BOOL "Enable JACK")
set(CARLA_USE_OSC ${CARLA_USE_OSC_DEFAULT} CACHE BOOL "Enable OSC")
#######################################################################################################################
# required dependencies

View File

@ -24,6 +24,13 @@
#include <fcntl.h>
#ifdef CARLA_OS_WIN
# include <io.h>
# define close _close
# define dup _dup
# define dup2 _dup2
#endif
using CARLA_BACKEND_NAMESPACE::EngineCallbackFunc;
// -----------------------------------------------------------------------
@ -82,7 +89,7 @@ public:
#endif
fStdOut = dup(stdout_fileno);
fStdErr = dup(STDERR_FILENO);
fStdErr = dup(stderr_fileno);
dup2(pipe1, stdout_fileno);
dup2(pipe1, stderr_fileno);
@ -114,8 +121,8 @@ public:
const int stderr_fileno = STDERR_FILENO;
#endif
dup2(fStdOut, STDOUT_FILENO);
dup2(fStdErr, STDERR_FILENO);
dup2(fStdOut, stdout_fileno);
dup2(fStdErr, stderr_fileno);
close(fStdOut);
close(fStdErr);
fStdOut = -1;
@ -224,6 +231,7 @@ private:
#ifdef CARLA_OS_WIN
# undef close
# undef dup
# undef dup2
#endif