Fix cmake defaults, msvc log thread
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
f7696dca5e
commit
1a75fc6b19
|
@ -37,8 +37,8 @@ else()
|
||||||
set(CARLA_USE_OSC_DEFAULT TRUE)
|
set(CARLA_USE_OSC_DEFAULT TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CARLA_USE_JACK TRUE CACHE ${CARLA_USE_JACK_DEFAULT} "Enable JACK")
|
set(CARLA_USE_JACK ${CARLA_USE_JACK_DEFAULT} CACHE BOOL "Enable JACK")
|
||||||
set(CARLA_USE_OSC TRUE CACHE ${CARLA_USE_OSC_DEFAULT} "Enable OSC")
|
set(CARLA_USE_OSC ${CARLA_USE_OSC_DEFAULT} CACHE BOOL "Enable OSC")
|
||||||
|
|
||||||
#######################################################################################################################
|
#######################################################################################################################
|
||||||
# required dependencies
|
# required dependencies
|
||||||
|
|
|
@ -24,6 +24,13 @@
|
||||||
|
|
||||||
#include <fcntl.h>
|
#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;
|
using CARLA_BACKEND_NAMESPACE::EngineCallbackFunc;
|
||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
@ -82,7 +89,7 @@ public:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
fStdOut = dup(stdout_fileno);
|
fStdOut = dup(stdout_fileno);
|
||||||
fStdErr = dup(STDERR_FILENO);
|
fStdErr = dup(stderr_fileno);
|
||||||
|
|
||||||
dup2(pipe1, stdout_fileno);
|
dup2(pipe1, stdout_fileno);
|
||||||
dup2(pipe1, stderr_fileno);
|
dup2(pipe1, stderr_fileno);
|
||||||
|
@ -114,8 +121,8 @@ public:
|
||||||
const int stderr_fileno = STDERR_FILENO;
|
const int stderr_fileno = STDERR_FILENO;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
dup2(fStdOut, STDOUT_FILENO);
|
dup2(fStdOut, stdout_fileno);
|
||||||
dup2(fStdErr, STDERR_FILENO);
|
dup2(fStdErr, stderr_fileno);
|
||||||
close(fStdOut);
|
close(fStdOut);
|
||||||
close(fStdErr);
|
close(fStdErr);
|
||||||
fStdOut = -1;
|
fStdOut = -1;
|
||||||
|
@ -224,6 +231,7 @@ private:
|
||||||
|
|
||||||
#ifdef CARLA_OS_WIN
|
#ifdef CARLA_OS_WIN
|
||||||
# undef close
|
# undef close
|
||||||
|
# undef dup
|
||||||
# undef dup2
|
# undef dup2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue