commit de41152255f0b01f8c28381e8e3c7bd450281b25
parent cda831ffcd5f4fe6138e86e5fab70d81f4cf3a18
Author: falkTX <falktx@gmail.com>
Date: Mon, 1 Aug 2016 00:42:31 +0200
Use linux as OS fallback if not mac or windows
Diffstat:
4 files changed, 7 insertions(+), 16 deletions(-)
diff --git a/dgl/src/Window.cpp b/dgl/src/Window.cpp
@@ -29,14 +29,12 @@
# include "pugl/pugl_win.cpp"
#elif defined(DISTRHO_OS_MAC)
# include "pugl/pugl_osx.m"
-#elif defined(DISTRHO_OS_LINUX)
+#else
# include <sys/types.h>
# include <unistd.h>
extern "C" {
# include "pugl/pugl_x11.c"
}
-#else
-# error Unsupported platform
#endif
#include "ApplicationPrivateData.hpp"
diff --git a/distrho/extra/ExternalWindow.hpp b/distrho/extra/ExternalWindow.hpp
@@ -19,13 +19,13 @@
#include "String.hpp"
-#ifdef DISTRHO_OS_UNIX
+#ifdef DISTRHO_OS_WINDOWS
+# error Unsupported platform!
+#else
# include <cerrno>
# include <signal.h>
# include <sys/wait.h>
# include <unistd.h>
-#else
-# error Unsupported platform!
#endif
START_NAMESPACE_DISTRHO
diff --git a/distrho/extra/Thread.hpp b/distrho/extra/Thread.hpp
@@ -21,7 +21,7 @@
#include "Sleep.hpp"
#include "String.hpp"
-#ifdef DISTRHO_OS_LINUX_FULL
+#ifdef DISTRHO_OS_LINUX
# include <sys/prctl.h>
#endif
@@ -198,7 +198,7 @@ public:
{
DISTRHO_SAFE_ASSERT_RETURN(name != nullptr && name[0] != '\0',);
-#ifdef DISTRHO_OS_LINUX_FULL
+#ifdef DISTRHO_OS_LINUX
prctl(PR_SET_NAME, name, 0, 0, 0);
#endif
#if defined(__GLIBC__) && (__GLIBC__ * 1000 + __GLIBC_MINOR__) >= 2012
diff --git a/distrho/src/DistrhoDefines.h b/distrho/src/DistrhoDefines.h
@@ -38,17 +38,10 @@
# elif defined(__HAIKU__)
# define DISTRHO_OS_HAIKU 1
# elif defined(__linux__) || defined(__linux)
-# define DISTRHO_OS_LINUX 1
-# define DISTRHO_OS_LINUX_FULL 1
-# elif defined(__FreeBSD__) || defined(__GNU__)
-# define DISTRHO_OS_LINUX 1
+# define DISTRHO_OS_LINUX 1
# endif
#endif
-#if defined(DISTRHO_OS_LINUX) || defined(DISTRHO_OS_MAC)
-# define DISTRHO_OS_UNIX
-#endif
-
#ifndef DISTRHO_DLL_EXTENSION
# define DISTRHO_DLL_EXTENSION "so"
#endif