OpenToonz - An open-source full-featured 2D animation creation software
C
Linux ifdef and defines (#454)
Campbell Bartondeffae335950
diff --git a/toonz/sources/common/tvrender/tfont_proxy.cpp b/toonz/sources/common/tvrender/tfont_proxy.cppindex 77c572694..6a3b24a88 100644--- a/toonz/sources/common/tvrender/tfont_proxy.cpp+++ b/toonz/sources/common/tvrender/tfont_proxy.cpp@@ -1,6 +1,6 @@-#ifdef __LP64__+#if defined(__LP64__) && !defined(LINUX)// Toonz includes#include "tvectorimage.h"diff --git a/toonz/sources/common/twain/ttwain_global_def.h b/toonz/sources/common/twain/ttwain_global_def.hindex 2f07a12a7..61db04860 100644--- a/toonz/sources/common/twain/ttwain_global_def.h+++ b/toonz/sources/common/twain/ttwain_global_def.h@@ -9,6 +9,7 @@#define GLOBAL_FREE(P) GlobalFree(P)#define GLOBAL_UNLOCK(P) GlobalUnlock(P)#else+#ifdef __APPLE__/*#define GLOBAL_LOCK(P) *(P)//#define GLOBAL_ALLOC(T, S) NewHandle(S)@@ -34,6 +35,18 @@ TW_HANDLE GLOBAL_LOCK(TW_HANDLE S);#endif#define GLOBAL_UNLOCK(P) HUnlock((TW_HANDLE)P)++#else /* UNIX */++#include <stdlib.h>+/* just some hack to get it built */+typedef void *TW_HANDLE;+#define GLOBAL_LOCK(P) (P)+#define GLOBAL_ALLOC(T, S) malloc(S)+#define GLOBAL_FREE(P) free(P)+#define GLOBAL_UNLOCK(P) (P)++#endif#endif#endif /*__GLOBAL_DEF_H__*/diff --git a/toonz/sources/image/3gp/tiio_3gp_proxy.cpp b/toonz/sources/image/3gp/tiio_3gp_proxy.cppindex f95478f2e..4f7e0e4f9 100644--- a/toonz/sources/image/3gp/tiio_3gp_proxy.cpp+++ b/toonz/sources/image/3gp/tiio_3gp_proxy.cpp@@ -1,6 +1,6 @@-#if (defined(x64) || defined(__LP64__))+#if (defined(x64) || defined(__LP64__) || defined(LINUX))// Toonz includes#include "tfilepath.h"diff --git a/toonz/sources/image/3gp/tiio_3gp_proxy.h b/toonz/sources/image/3gp/tiio_3gp_proxy.hindex f4005e033..7cb06cdac 100644--- a/toonz/sources/image/3gp/tiio_3gp_proxy.h+++ b/toonz/sources/image/3gp/tiio_3gp_proxy.h@@ -3,7 +3,7 @@#ifndef TIIO_3GP_PROXY_H#define TIIO_3GP_PROXY_H-#if defined(x64) || defined(__LP64__)+#if defined(x64) || defined(__LP64__) || defined(LINUX)// Qt includes#include <QString>diff --git a/toonz/sources/image/mov/tiio_mov_proxy.cpp b/toonz/sources/image/mov/tiio_mov_proxy.cppindex 6d9d528f2..c513962a6 100644--- a/toonz/sources/image/mov/tiio_mov_proxy.cpp+++ b/toonz/sources/image/mov/tiio_mov_proxy.cpp@@ -1,6 +1,6 @@-#if (defined(x64) || defined(__LP64__))+#if (defined(x64) || defined(__LP64__) || defined(LINUX))// Toonz includes#include "tfilepath.h"diff --git a/toonz/sources/image/mov/tiio_mov_proxy.h b/toonz/sources/image/mov/tiio_mov_proxy.hindex 9a8b82ddb..661e376e8 100644--- a/toonz/sources/image/mov/tiio_mov_proxy.h+++ b/toonz/sources/image/mov/tiio_mov_proxy.h@@ -3,7 +3,7 @@#ifndef TIIO_MOV_PROXY_H#define TIIO_MOV_PROXY_H-#if defined(x64) || defined(__LP64__)+#if defined(x64) || defined(__LP64__) || defined(LINUX)// Qt includes#include <QString>diff --git a/toonz/sources/include/tfont.h b/toonz/sources/include/tfont.hindex f70f97ad2..2fd180f9d 100644--- a/toonz/sources/include/tfont.h+++ b/toonz/sources/include/tfont.h@@ -31,7 +31,7 @@ class TFont;// TFont declaration. The class is currently not directly available under 64-bit// MAC OSX.-#ifndef __LP64__+#if !defined(__LP64__) || !defined(MACOSX)#ifdef MACOSX#include <ApplicationServices/ApplicationServices.h>@@ -52,8 +52,10 @@ private:#ifdef _WIN32TFont(const LOGFONTW &, HDC hdc);-#else+#elif defined(MACOSX)TFont(ATSUFontID, int size);+#else+ TFont(const std::wstring family, const std::wstring face, int size);#endifpublic:@@ -87,7 +89,7 @@ private:TFont &operator=(const TFont &);};-#endif //!__LP64__+#endif //!__LP64__ || !MACOSX//-----------------------------------------------------------------------------@@ -138,7 +140,7 @@ public:// --------- TFont methods called on curren font ------------#ifndef __LP64__+#if !defined(__LP64__) || defined(LINUX)TPoint drawChar(TVectorImageP &outImage, wchar_t charcode,wchar_t nextCode = 0) {