diff --git a/toonz/sources/common/tfx/ttzpimagefx.cpp b/toonz/sources/common/tfx/ttzpimagefx.cpp index e9c16b8..9779846 100644 --- a/toonz/sources/common/tfx/ttzpimagefx.cpp +++ b/toonz/sources/common/tfx/ttzpimagefx.cpp @@ -11,7 +11,7 @@ void parseIndexes(string indexes, vector &items) { -#ifndef MACOSX +#ifdef WIN32 char seps[] = " ,;"; char *token; if (indexes == "all" || indexes == "All" || indexes == "ALL") @@ -39,7 +39,7 @@ void parseIndexes(string indexes, vector &items) void insertIndexes(vector items, PaletteFilterFxRenderData *t) { -#ifndef MACOSX +#ifdef WIN32 for (int i = 0; i < (int)items.size(); i++) { char *starttoken, *endtoken; char subseps[] = "-"; diff --git a/toonz/sources/common/tgl/tgl.cpp b/toonz/sources/common/tgl/tgl.cpp index 4dad3e4..687fe0a 100644 --- a/toonz/sources/common/tgl/tgl.cpp +++ b/toonz/sources/common/tgl/tgl.cpp @@ -11,12 +11,14 @@ #ifndef __sgi #ifdef WIN32 #include +#elif defined(LINUX) +#include #else #include #endif #endif -#ifdef MACOSX +#if defined(MACOSX) || defined(LINUX) #include #endif diff --git a/toonz/sources/common/tiio/compatibility/tfile_io.h b/toonz/sources/common/tiio/compatibility/tfile_io.h index c40ea20..2c3fe91 100644 --- a/toonz/sources/common/tiio/compatibility/tfile_io.h +++ b/toonz/sources/common/tiio/compatibility/tfile_io.h @@ -9,7 +9,7 @@ extern "C" { #include -#ifdef MACOSX +#if defined(MACOSX) || defined(LINUX) #include #endif diff --git a/toonz/sources/common/tipc/tipc.cpp b/toonz/sources/common/tipc/tipc.cpp index 3c6f7ec..3fca4bf 100644 --- a/toonz/sources/common/tipc/tipc.cpp +++ b/toonz/sources/common/tipc/tipc.cpp @@ -18,6 +18,9 @@ #elif MACOSX #include #include +#elif LINUX +#include +#include #endif #include "tipc.h" diff --git a/toonz/sources/common/tsystem/tpluginmanager.cpp b/toonz/sources/common/tsystem/tpluginmanager.cpp index 0d5daef..0e002aa 100644 --- a/toonz/sources/common/tsystem/tpluginmanager.cpp +++ b/toonz/sources/common/tsystem/tpluginmanager.cpp @@ -21,7 +21,9 @@ #include #include #include // for getfsstat +#ifdef MACOSX #include +#endif #include #include #include @@ -63,7 +65,7 @@ typedef const TPluginInfo *TnzLibMainProcType(); namespace { const char *TnzLibMainProcName = "TLibMain"; -#ifdef MACOSX +#if !defined(WIN32) const char *TnzLibMainProcName2 = "_TLibMain"; #endif } diff --git a/toonz/sources/common/tsystem/tsystempd.cpp b/toonz/sources/common/tsystem/tsystempd.cpp index cb2a332..f1db615 100644 --- a/toonz/sources/common/tsystem/tsystempd.cpp +++ b/toonz/sources/common/tsystem/tsystempd.cpp @@ -186,6 +186,11 @@ bool TSystem::memoryShortage() // to be done... return false; +#elif defined(LINUX) + + // to be done... + return false; + #else @ @ @ERROR : PLATFORM NOT SUPPORTED diff --git a/toonz/sources/common/ttest/ttest.cpp b/toonz/sources/common/ttest/ttest.cpp index 303fa41..568bf80 100644 --- a/toonz/sources/common/ttest/ttest.cpp +++ b/toonz/sources/common/ttest/ttest.cpp @@ -15,6 +15,10 @@ #include +#if defined(LINUX) +#include +#endif + using namespace std; namespace diff --git a/toonz/sources/common/tvrender/ttessellator.cpp b/toonz/sources/common/tvrender/ttessellator.cpp index f516003..ab48aae 100644 --- a/toonz/sources/common/tvrender/ttessellator.cpp +++ b/toonz/sources/common/tvrender/ttessellator.cpp @@ -97,7 +97,7 @@ extern "C" void CALLBACK myCombine(GLdouble coords[3], GLdouble *d[4], typedef GLvoid(CALLBACK *GluCallback)(void); #endif -#ifdef MACOSX +#if defined(MACOSX) || defined(LINUX) typedef GLvoid (*GluCallback)(); diff --git a/toonz/sources/common/twain/twain.h b/toonz/sources/common/twain/twain.h index 8a27515..84ae0a1 100644 --- a/toonz/sources/common/twain/twain.h +++ b/toonz/sources/common/twain/twain.h @@ -97,6 +97,11 @@ * Platform Dependent Definitions and Typedefs * ****************************************************************************/ + +#ifdef LINUX +#include +#endif + /* Microsoft C/C++ Compiler */ #if defined(WIN32) || defined(WIN64) || defined(_WINDOWS) #define TWH_CMP_MSC diff --git a/toonz/sources/image/compatibility/tfile_io.h b/toonz/sources/image/compatibility/tfile_io.h index c40ea20..3a0c139 100644 --- a/toonz/sources/image/compatibility/tfile_io.h +++ b/toonz/sources/image/compatibility/tfile_io.h @@ -13,6 +13,10 @@ extern "C" { #include #endif +#ifdef LINUX +#include +#endif + char *convertWCHAR2CHAR(const wchar_t *fname); #if defined(MACOSX) || defined(LINUX) diff --git a/toonz/sources/include/tcg/hpp/triangulate.hpp b/toonz/sources/include/tcg/hpp/triangulate.hpp index 7230e83..5b51bd9 100644 --- a/toonz/sources/include/tcg/hpp/triangulate.hpp +++ b/toonz/sources/include/tcg/hpp/triangulate.hpp @@ -13,6 +13,8 @@ #include #elif MACOSX #include +#elif LINUX +#include #endif #ifndef TCG_GLU_CALLBACK diff --git a/toonz/sources/include/tnztypes.h b/toonz/sources/include/tnztypes.h index c37c657..3e70dfc 100644 --- a/toonz/sources/include/tnztypes.h +++ b/toonz/sources/include/tnztypes.h @@ -18,7 +18,7 @@ typedef uint32_t TUINT32; typedef int64_t TINT64; typedef uint64_t TUINT64; -#elif defined(__LP64__) +#elif defined(__LP64__) && (!defined(LINUX)) #define TINT32 \ ; \ diff --git a/toonz/sources/include/tpixel.h b/toonz/sources/include/tpixel.h index 49ba0d3..4014f18 100644 --- a/toonz/sources/include/tpixel.h +++ b/toonz/sources/include/tpixel.h @@ -154,6 +154,8 @@ public: Channel b, g, r, m; #elif TNZ_MACHINE_CHANNEL_ORDER_MRGB Channel m, r, g, b; +#elif TNZ_MACHINE_CHANNEL_ORDER_RGBM + Channel r, g, b, m; #else undefined machine order !!!! #endif diff --git a/toonz/sources/include/tsound_t.h b/toonz/sources/include/tsound_t.h index 1c1e794..9f4690b 100644 --- a/toonz/sources/include/tsound_t.h +++ b/toonz/sources/include/tsound_t.h @@ -162,9 +162,9 @@ public: //---------------------------------------------------------------------------- //!Applies a trasformation (echo, reverb, ect) to the object and returns the transformed soundtrack -#ifdef MACOSX +#if defined(MACOSX) || defined(LINUX) TSoundTrackP apply(TSoundTransform *transform); -#else +#else // WIN32 TSoundTrackP apply(TSoundTransform *transform) { assert(transform); diff --git a/toonz/sources/include/tthread.h b/toonz/sources/include/tthread.h index d9209da..4798608 100644 --- a/toonz/sources/include/tthread.h +++ b/toonz/sources/include/tthread.h @@ -35,7 +35,7 @@ void DVAPI shutdown(); class ExecutorId; //Private class Runnable; -#ifndef MACOSX +#if !(defined(MACOSX) || defined(LINUX)) template class TSmartPointerT; #endif typedef TSmartPointerT RunnableP; diff --git a/toonz/sources/stdfx/igs_motion_blur.cpp b/toonz/sources/stdfx/igs_motion_blur.cpp index 9daed9f..defd02d 100644 --- a/toonz/sources/stdfx/igs_motion_blur.cpp +++ b/toonz/sources/stdfx/igs_motion_blur.cpp @@ -2,6 +2,7 @@ #include /* std::domain_error(-) */ #include /* std::numeric_limits */ #include /* pow(-),abs(-) */ +#include /* memmove */ #include "igs_ifx_common.h" /* igs::image::rgba */ #include "igs_motion_blur.h" diff --git a/toonz/sources/stdfx/igs_resource_msg_from_err_unix.cpp b/toonz/sources/stdfx/igs_resource_msg_from_err_unix.cpp index 0098245..4958fee 100644 --- a/toonz/sources/stdfx/igs_resource_msg_from_err_unix.cpp +++ b/toonz/sources/stdfx/igs_resource_msg_from_err_unix.cpp @@ -1,4 +1,5 @@ #include +#include /* memset */ #include #include // std::domain_error(-) #include diff --git a/toonz/sources/tnzbase/tscanner/tscannerutil.cpp b/toonz/sources/tnzbase/tscanner/tscannerutil.cpp index 6da313e..9d5d3fc 100644 --- a/toonz/sources/tnzbase/tscanner/tscannerutil.cpp +++ b/toonz/sources/tnzbase/tscanner/tscannerutil.cpp @@ -2,6 +2,8 @@ #include "tscannerutil.h" +#include + #define BUFBYTE(X, Y, BUF, BYTEWRAP, BITOFFS) \ (((UCHAR *)(BUF))[(((X) + (BITOFFS)) >> 3) + (Y) * (BYTEWRAP)]) diff --git a/toonz/sources/tnzext/plasticdeformer.cpp b/toonz/sources/tnzext/plasticdeformer.cpp index 6ded943..bdab0f4 100644 --- a/toonz/sources/tnzext/plasticdeformer.cpp +++ b/toonz/sources/tnzext/plasticdeformer.cpp @@ -12,6 +12,8 @@ #include "ext/plasticdeformer.h" +#include + /*! \file plasticdeformer.cpp This file contains the implementation of a Mesh Deformer as specified in the diff --git a/toonz/sources/tnzext/plastichandle.cpp b/toonz/sources/tnzext/plastichandle.cpp index efe294c..46351a1 100644 --- a/toonz/sources/tnzext/plastichandle.cpp +++ b/toonz/sources/tnzext/plastichandle.cpp @@ -18,6 +18,8 @@ using namespace tcg::bgl; #include "ext/plastichandle.h" +#include + //*********************************************************************************************** // Distance building //*********************************************************************************************** diff --git a/toonz/sources/tnzext/tlin/tlin_cblas_wrap.cpp b/toonz/sources/tnzext/tlin/tlin_cblas_wrap.cpp index 171245f..d10f473 100644 --- a/toonz/sources/tnzext/tlin/tlin_cblas_wrap.cpp +++ b/toonz/sources/tnzext/tlin/tlin_cblas_wrap.cpp @@ -3,6 +3,7 @@ #include #include #include +#include //blasint may either be common 4 bytes or extended 8 (long)... //Replace this and REBUILD the CBLAS with extended int if needed. diff --git a/toonz/sources/toonzfarm/tfarm/tfarmtask.cpp b/toonz/sources/toonzfarm/tfarm/tfarmtask.cpp index bf79bb8..04fb70e 100644 --- a/toonz/sources/toonzfarm/tfarm/tfarmtask.cpp +++ b/toonz/sources/toonzfarm/tfarm/tfarmtask.cpp @@ -17,7 +17,7 @@ #include // MACOSX includes -#ifdef MACOSX +#if defined(MACOSX) || defined(LINUX) #include // gethostbyname #include // inet_ntoa #endif diff --git a/toonz/sources/toonzlib/autopos.cpp b/toonz/sources/toonzlib/autopos.cpp index 18f8c34..9c5e403 100644 --- a/toonz/sources/toonzlib/autopos.cpp +++ b/toonz/sources/toonzlib/autopos.cpp @@ -14,7 +14,7 @@ fare resize e realloc size dello stack a 65000 unita' */ -#ifdef MACOSX +#if defined(MACOSX) || defined(LINUX) #define TRUE 1 #define FALSE 0 #endif diff --git a/toonz/sources/toonzlib/trastercentroid.cpp b/toonz/sources/toonzlib/trastercentroid.cpp index 8d05019..7110b4e 100644 --- a/toonz/sources/toonzlib/trastercentroid.cpp +++ b/toonz/sources/toonzlib/trastercentroid.cpp @@ -15,7 +15,7 @@ #include "tmsg.h" #include "copP.h"*/ -#ifdef MACOSX +#if defined(MACOSX) || defined(LINUX) #define TRUE 1 #define FALSE 0 #endif