OpenToonz - An open-source full-featured 2D animation creation software
C
use _WIN32 instead of WIN32
Shinya Kitaoka9f5a1bd76069
diff --git a/toonz/sources/common/tapptools/tcolorutils.cpp b/toonz/sources/common/tapptools/tcolorutils.cppindex e2075b35b..b83d8fd8e 100644--- a/toonz/sources/common/tapptools/tcolorutils.cpp+++ b/toonz/sources/common/tapptools/tcolorutils.cpp@@ -10,7 +10,7 @@typedef float KEYER_FLOAT;//-------------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32#define ISNAN _isnan#elseextern "C" int isnan(double);diff --git a/toonz/sources/common/tapptools/tenv.cpp b/toonz/sources/common/tapptools/tenv.cppindex 6441e2373..c380469bf 100644--- a/toonz/sources/common/tapptools/tenv.cpp+++ b/toonz/sources/common/tapptools/tenv.cpp@@ -69,7 +69,7 @@ public:TFilePath getSystemVarPath(string varName){-#ifdef WIN32+#ifdef _WIN32return m_registryRoot + varName;#elseQString settingsPath = QString::fromStdString(getApplicationName()) + QString("_") +@@ -90,7 +90,7 @@ public:string getSystemVarValue(string varName){-#ifdef WIN32+#ifdef _WIN32return TSystem::getSystemValue(getSystemVarPath(varName)).toStdString();#elseTFilePath systemVarPath = getSystemVarPath(varName);@@ -146,7 +146,7 @@ public:m_applicationFullName = m_applicationName + " " + m_applicationVersion;m_moduleName = m_applicationName;m_rootVarName = toUpper(m_applicationName) + "ROOT";-#ifdef WIN32+#ifdef _WIN32m_registryRoot = TFilePath("SOFTWARE\\OpenToonz\\") + m_applicationName + m_applicationVersion;#endifm_systemVarPrefix = m_applicationName;diff --git a/toonz/sources/common/tapptools/ttimer.cpp b/toonz/sources/common/tapptools/ttimer.cppindex 0e631ee70..74820523f 100644--- a/toonz/sources/common/tapptools/ttimer.cpp+++ b/toonz/sources/common/tapptools/ttimer.cpp@@ -3,7 +3,7 @@#include "ttimer.h"#include "texception.h"-#ifdef WIN32+#ifdef _WIN32#include <windows.h>diff --git a/toonz/sources/common/tcache/timagecache.cpp b/toonz/sources/common/tcache/timagecache.cppindex 7b139efee..2ff378f1b 100644--- a/toonz/sources/common/tcache/timagecache.cpp+++ b/toonz/sources/common/tcache/timagecache.cpp@@ -41,7 +41,7 @@#include <deque>#include <numeric>#include <sstream>-#ifdef WIN32+#ifdef _WIN32#include <crtdbg.h>#endif@@ -121,7 +121,7 @@ public:bool m_modified;};-#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<CacheItem>;#endiftypedef TSmartPointerT<CacheItem> CacheItemP;@@ -368,7 +368,7 @@ public:TImageP m_image;};-#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<UncompressedOnMemoryCacheItem>;template class DVAPI TDerivedSmartPointerT<UncompressedOnMemoryCacheItem, CacheItem>;#endif@@ -417,7 +417,7 @@ public:TRasterP m_compressedRas;};-#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<CompressedOnMemoryCacheItem>;template class DVAPI TDerivedSmartPointerT<CompressedOnMemoryCacheItem, CacheItem>;#endif@@ -518,7 +518,7 @@ public:TFilePath m_fp;};-#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<CompressedOnDiskCacheItem>;template class DVAPI TDerivedSmartPointerT<CompressedOnDiskCacheItem, CacheItem>;#endif@@ -587,7 +587,7 @@ public:TFilePath m_fp;};-#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<UncompressedOnDiskCacheItem>;template class DVAPI TDerivedSmartPointerT<UncompressedOnDiskCacheItem, CacheItem>;#endif@@ -854,7 +854,7 @@ void TImageCache::Imp::doCompress()}string id = it->first;-#ifdef WIN32+#ifdef _WIN32assert(itu->first == it->second->m_historyCount);itu = m_itemHistory.erase(itu);m_itemsByImagePointer.erase(getPointer(item->getImage()));@@ -939,7 +939,7 @@ void TImageCache::Imp::doCompress(string id)return; // id not found: return// delete itu from m_itemHistory-#ifdef WIN32+#ifdef _WIN32assert(itu->first == it->second->m_historyCount);itu = m_itemHistory.erase(itu);m_itemsByImagePointer.erase(getPointer(item->getImage()));@@ -1044,7 +1044,7 @@ UCHAR *TImageCache::Imp::compressAndMalloc(TUINT32 size)m_compressedItems[it->first] = newItem;}-#ifdef WIN32+#ifdef _WIN32assert(itu->first == it->second->m_historyCount);itu = m_itemHistory.erase(itu);m_itemsByImagePointer.erase(getPointer(item->getImage()));diff --git a/toonz/sources/common/tcontenthistory.cpp b/toonz/sources/common/tcontenthistory.cppindex 6ae89fcd0..b4ad77621 100644--- a/toonz/sources/common/tcontenthistory.cpp+++ b/toonz/sources/common/tcontenthistory.cpp@@ -6,7 +6,7 @@#include <QStringList>#include <QProcess>#include <QTextStream>-#ifdef WIN32+#ifdef _WIN32#include <Windows.h>#endif#include <map>diff --git a/toonz/sources/common/tcore/tstopwatch.cpp b/toonz/sources/common/tcore/tstopwatch.cppindex dd0cb1663..6b49ee3aa 100644--- a/toonz/sources/common/tcore/tstopwatch.cpp+++ b/toonz/sources/common/tcore/tstopwatch.cpp@@ -17,7 +17,7 @@#include <time.h>#ifndef STW_TICKS_PER_SECOND-#ifndef WIN32+#ifndef _WIN32extern "C" long sysconf(int);#define STW_TICKS_PER_SECOND sysconf(_SC_CLK_TCK)#else@@ -36,7 +36,7 @@ enum TimerType { TTUUnknown,TTUTickCount };static void determineTimer();-#ifdef WIN32+#ifdef _WIN32static TimerType timerToUse = TTUUnknown;@@ -150,7 +150,7 @@ static void checkTime(START start, START_USER startUser, START_SYSTEM startSyste{assert(timerToUse == TTUTickCount);-#ifdef WIN32+#ifdef _WIN32DWORD tm_stop;FILETIME creationTime, exitTime, stopSystem, stopUser;@@ -166,7 +166,7 @@ static void checkTime(START start, START_USER startUser, START_SYSTEM startSystetmUser += FileTimeToInt64(&stopUser) - FileTimeToInt64(&startUser); //user elapsed timetmSystem += FileTimeToInt64(&stopSystem) - FileTimeToInt64(&startSystem); //system elapsed time-#else //WIN32+#else // _WIN32struct tms clk;clock_t tm_stop;@@ -176,12 +176,12 @@ static void checkTime(START start, START_USER startUser, START_SYSTEM startSystetmUser += clk.tms_utime - startUser;tmSystem += clk.tms_stime - startSystem;-#endif //WIN32+#endif // _WIN32}//------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32//// come checkTime, ma usa i timer ad alta risoluzione@@ -255,7 +255,7 @@ void hrCheckTime(LARGE_INTEGER start, START_USER startUser, START_SYSTEM startSy} //namespace-#endif //WIN32+#endif // _WIN32//-----------------------------------------------------------@@ -264,7 +264,7 @@ void TStopWatch::stop()if (!m_isRunning)return;m_isRunning = false;-#ifdef WIN32+#ifdef _WIN32if (timerToUse == TTUTickCount)checkTime(m_start, m_startUser, m_startSystem, m_tm, m_tmUser, m_tmSystem);else@@ -283,7 +283,7 @@ void TStopWatch::getElapsedTime(TM_TOTAL &tm, TM_USER &user, TM_SYSTEM &system)TM_USER cur_tmUser = 0;TM_SYSTEM cur_tmSystem = 0;-#ifdef WIN32+#ifdef _WIN32if (timerToUse == TTUTickCount)checkTime(m_start, m_startUser, m_startSystem, cur_tm, cur_tmUser, cur_tmSystem);else@@ -390,7 +390,7 @@ void TStopWatch::printGlobals()}//------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32void dummyFunction(){diff --git a/toonz/sources/common/tcore/tstring.cpp b/toonz/sources/common/tcore/tstring.cppindex 05a8d14e6..b2f1c93db 100644--- a/toonz/sources/common/tcore/tstring.cpp+++ b/toonz/sources/common/tcore/tstring.cpp@@ -8,7 +8,7 @@#include <QString>#endif-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#include "windows.h"#endif@@ -206,7 +206,7 @@ wstring toWideString(double v, int p)string toUpper(string a){-#ifdef WIN32+#ifdef _WIN32return _strupr(const_cast<char *>(a.c_str()));#elsestring ret = a;@@ -218,7 +218,7 @@ string toUpper(string a)string toLower(string a){-#ifdef WIN32+#ifdef _WIN32return _strlwr(const_cast<char *>(a.c_str()));#elsestring ret = a;@@ -230,7 +230,7 @@ string toLower(string a)wstring toUpper(wstring a){-#ifdef WIN32+#ifdef _WIN32return _wcsupr(const_cast<wchar_t *>(a.c_str()));#elsewstring ret;@@ -244,7 +244,7 @@ wstring toUpper(wstring a)wstring toLower(wstring a){-#ifdef WIN32+#ifdef _WIN32return _wcslwr(const_cast<wchar_t *>(a.c_str()));#elsewstring ret;diff --git a/toonz/sources/common/tfx/trenderer.cpp b/toonz/sources/common/tfx/trenderer.cppindex e61c5fc8b..eb3ad7103 100644--- a/toonz/sources/common/tfx/trenderer.cpp+++ b/toonz/sources/common/tfx/trenderer.cpp@@ -369,7 +369,7 @@ public:void quitWaitingLoops();};-#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TRendererImp>;#endifdiff --git a/toonz/sources/common/tfx/ttzpimagefx.cpp b/toonz/sources/common/tfx/ttzpimagefx.cppindex 977984665..5a1bf92da 100644--- a/toonz/sources/common/tfx/ttzpimagefx.cpp+++ b/toonz/sources/common/tfx/ttzpimagefx.cpp@@ -11,7 +11,7 @@void parseIndexes(string indexes, vector<string> &items){-#ifdef WIN32+#ifdef _WIN32char seps[] = " ,;";char *token;if (indexes == "all" || indexes == "All" || indexes == "ALL")@@ -39,7 +39,7 @@ void parseIndexes(string indexes, vector<string> &items)void insertIndexes(vector<string> items, PaletteFilterFxRenderData *t){-#ifdef WIN32+#ifdef _WIN32for (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.cppindex 687fe0a89..e4bfeeb44 100644--- a/toonz/sources/common/tgl/tgl.cpp+++ b/toonz/sources/common/tgl/tgl.cpp@@ -9,7 +9,7 @@#include "tcurves.h"#ifndef __sgi-#ifdef WIN32+#ifdef _WIN32#include <GL/glut.h>#elif defined(LINUX)#include <GL/glut.h>@@ -669,7 +669,7 @@ void tglBuildMipmaps(std::vector<TRaster32P> &rasters,//-----------------------------------------------------------------------------//Forse si potrebbe togliere l'ifdef ed usare QT-#if defined(WIN32)+#if defined(_WIN32)TGlContext tglGetCurrentContext(){diff --git a/toonz/sources/common/tiio/bmp/filebmp.c b/toonz/sources/common/tiio/bmp/filebmp.cindex c084a6bb5..363bf8464 100644--- a/toonz/sources/common/tiio/bmp/filebmp.c+++ b/toonz/sources/common/tiio/bmp/filebmp.c@@ -1,6 +1,6 @@-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#endifdiff --git a/toonz/sources/common/tiio/bmp/filebmp.h b/toonz/sources/common/tiio/bmp/filebmp.hindex 56562e062..436cba287 100644--- a/toonz/sources/common/tiio/bmp/filebmp.h+++ b/toonz/sources/common/tiio/bmp/filebmp.h@@ -7,7 +7,7 @@extern "C" {#endif/*-#if defined(WIN32)+#if defined(_WIN32)typedef struct {unsigned char b,g,r,m;} LPIXEL;#elif defined(__sgi)typedef struct { unsigned char m,b,g,r; } LPIXEL;diff --git a/toonz/sources/common/tiio/compatibility/tfile_io.c b/toonz/sources/common/tiio/compatibility/tfile_io.cindex 1995573fc..11c0cb5f9 100644--- a/toonz/sources/common/tiio/compatibility/tfile_io.c+++ b/toonz/sources/common/tiio/compatibility/tfile_io.c@@ -2,7 +2,7 @@#include "tfile_io.h"-#ifdef WIN32+#ifdef _WIN32#include <windows.h>#include <assert.h>diff --git a/toonz/sources/common/tiio/movsettings.cpp b/toonz/sources/common/tiio/movsettings.cppindex 5a52730f6..fb3a83fff 100644--- a/toonz/sources/common/tiio/movsettings.cpp+++ b/toonz/sources/common/tiio/movsettings.cpp@@ -13,8 +13,8 @@// 32-bit version//*******************************************************************************-#ifdef WIN32-#ifdef WIN32+#ifdef _WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#endif@@ -299,7 +299,7 @@ static Boolean QTCmpr_FilterProcvoid openMovSettingsPopup(TPropertyGroup *props, bool macBringToFront){-#ifdef WIN32+#ifdef _WIN32if (InitializeQTML(0) != noErr)return;#endifdiff --git a/toonz/sources/common/tiio/tiio.cpp b/toonz/sources/common/tiio/tiio.cppindex f60c8b2a5..4c3fe02c4 100644--- a/toonz/sources/common/tiio/tiio.cpp+++ b/toonz/sources/common/tiio/tiio.cpp@@ -13,7 +13,7 @@#include <sys/types.h>#include <sys/stat.h>-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4786)#include <io.h>#endif@@ -205,7 +205,7 @@ void Tiio::defineWriterProperties(const char *ext, TPropertyGroup *prop)}/*-#ifdef WIN32+#ifdef _WIN32int Tiio::openForReading(char *fn){int fd = _open(fn, _O_BINARY|_O_RDONLY);diff --git a/toonz/sources/common/tiio/tiio_bmp.cpp b/toonz/sources/common/tiio/tiio_bmp.cppindex 160de2bb7..d33948b93 100644--- a/toonz/sources/common/tiio/tiio_bmp.cpp+++ b/toonz/sources/common/tiio/tiio_bmp.cpp@@ -1,6 +1,6 @@-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#endifdiff --git a/toonz/sources/common/tiio/tiio_jpg.cpp b/toonz/sources/common/tiio/tiio_jpg.cppindex 56759a66e..c8e0ee2fc 100644--- a/toonz/sources/common/tiio/tiio_jpg.cpp+++ b/toonz/sources/common/tiio/tiio_jpg.cpp@@ -1,6 +1,6 @@-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#endif//#include "texception.h"diff --git a/toonz/sources/common/tiio/tiio_jpg_util.cpp b/toonz/sources/common/tiio/tiio_jpg_util.cppindex f782486f3..5d3af0946 100644--- a/toonz/sources/common/tiio/tiio_jpg_util.cpp+++ b/toonz/sources/common/tiio/tiio_jpg_util.cpp@@ -1,6 +1,6 @@-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#endifdiff --git a/toonz/sources/common/timage_io/timage_io.cpp b/toonz/sources/common/timage_io/timage_io.cppindex 1ed32f271..3fd2e6bc5 100644--- a/toonz/sources/common/timage_io/timage_io.cpp+++ b/toonz/sources/common/timage_io/timage_io.cpp@@ -16,7 +16,7 @@#include <boost/range.hpp>// OS-specific includes-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#include <io.h>#endifdiff --git a/toonz/sources/common/tipc/tipc.cpp b/toonz/sources/common/tipc/tipc.cppindex 3fca4bfda..2eb026485 100644--- a/toonz/sources/common/tipc/tipc.cpp+++ b/toonz/sources/common/tipc/tipc.cpp@@ -13,7 +13,7 @@#include <QTimer>//System-specific includes-#ifdef WIN32+#ifdef _WIN32#include <windows.h>#elif MACOSX#include <sys/sysctl.h>@@ -270,7 +270,7 @@ QString tipc::applicationSpecificServerName(QString srvName)bool tipc::startBackgroundProcess(QString cmdline){-#ifdef WIN32+#ifdef _WIN32QProcess *proc = new QProcess;proc->start(cmdline);if (proc->state() == QProcess::NotRunning) {@@ -317,7 +317,7 @@ bool tipc::startSlaveServer(QString srvName, QString cmdline)//Wait up to msecs until the socket is connecting. Wait a small amount of time//until the server is up and listening to connection (there is no other way to tell).while (dummySock->state() == QLocalSocket::UnconnectedState) {-#ifdef WIN32+#ifdef _WIN32Sleep(10);#elseusleep(10 << 10); //10.24 msecsdiff --git a/toonz/sources/common/traster/traster.cpp b/toonz/sources/common/traster/traster.cppindex e7f5b4876..aaf5624fc 100644--- a/toonz/sources/common/traster/traster.cpp+++ b/toonz/sources/common/traster/traster.cpp@@ -1,6 +1,6 @@-#ifdef WIN32+#ifdef _WIN32#ifndef UNICODE#define UNICODE#endif@@ -35,7 +35,7 @@ TRaster::TRaster(int lx, int ly, int pixelSize)//m_buffer = new UCHAR[lx*ly*pixelSize];if (!m_buffer) {-#ifdef WIN32+#ifdef _WIN32static bool firstTime = true;if (firstTime) {firstTime = false;@@ -57,7 +57,7 @@ TRaster::TRaster(int lx, int ly, int pixelSize)m_buffer = BigMemoryManager.getMemoryChunk(lx*ly*pixelSize, this);//m_buffer = new UCHAR[lx*ly*pixelSize];m_totalMemory += ((lx*ly*pixelSize)>>10);- #ifdef WIN32+ #ifdef _WIN32MessageBox( NULL, "Run out of contiguos phisical memory: please save all and restart toonz!", "Warning", MB_OK);#endif}*/diff --git a/toonz/sources/common/trop/runsmap.h b/toonz/sources/common/trop/runsmap.hindex 04e057a34..5d33dd4d5 100644--- a/toonz/sources/common/trop/runsmap.h+++ b/toonz/sources/common/trop/runsmap.h@@ -52,7 +52,7 @@ public://----------------------------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template class DV_EXPORT_API TSmartPointerT<RunsMap>;#endifdiff --git a/toonz/sources/common/trop/tblur.cpp b/toonz/sources/common/trop/tblur.cppindex 1fb354449..b4b87150d 100644--- a/toonz/sources/common/trop/tblur.cpp+++ b/toonz/sources/common/trop/tblur.cpp@@ -3,7 +3,7 @@#include "traster.h"#include "trop.h"#include "tpixelgr.h"-#ifdef WIN32+#ifdef _WIN32#include <emmintrin.h>#include <malloc.h>#endif@@ -11,7 +11,7 @@namespace{-#ifdef WIN32+#ifdef _WIN32template <class T>struct BlurPixel {T b;@@ -231,7 +231,7 @@ inline void blur_code(//--------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32//-------------------------------------------------------------------template <class T, class P>@@ -484,7 +484,7 @@ inline void blur_code_SSE2(}}-#endif // WIN32+#endif // _WIN32//-------------------------------------------------------------------@@ -574,7 +574,7 @@ template <class T, class Q, class P>void do_filtering_chan(BlurPixel<P> *row1, T *row2, int length,float coeff, float coeffq, int brad, float diff, bool useSSE){-#ifdef WIN32+#ifdef _WIN32if (useSSE && T::maxChannelValue == 255)blur_code_SSE2<T, P>(row1, row2, length, coeff, coeffq, brad, diff, 0.5);else@@ -769,7 +769,7 @@ void do_filtering_floatRgb(T *row1, BlurPixel<P> *row2, int length,BLUR_CODE(0, unsigned char)*/-#ifdef WIN32+#ifdef _WIN32if (useSSE)blur_code_SSE2<T, P>(row1, row2, length, coeff, coeffq, brad, diff, 0);else@@ -805,7 +805,7 @@ void doBlurRgb(TRasterPT<T> &dstRas, TRasterPT<T> &srcRas, double blur, int dx,BlurPixel<P> *row2, *col1, *fbuffer;TRasterGR8P r1;-#ifdef WIN32+#ifdef _WIN32if (useSSE) {fbuffer = (BlurPixel<P> *)_aligned_malloc(llx * ly * sizeof(BlurPixel<P>), 16);row1 = (T *)_aligned_malloc((llx + 2 * brad) * sizeof(T), 16);@@ -853,7 +853,7 @@ void doBlurRgb(TRasterPT<T> &dstRas, TRasterPT<T> &srcRas, double blur, int dx,dstRas->clear();}-#ifdef WIN32+#ifdef _WIN32if (useSSE) {_aligned_free(col2);_aligned_free(col1);diff --git a/toonz/sources/common/trop/toperators.cpp b/toonz/sources/common/trop/toperators.cppindex 4ef1fc804..384843c54 100644--- a/toonz/sources/common/trop/toperators.cpp+++ b/toonz/sources/common/trop/toperators.cpp@@ -4,7 +4,7 @@#include "tpixel.h"#include "tpixelutils.h"-#ifdef WIN32+#ifdef _WIN32#include <emmintrin.h> // per SSE2#endifdiff --git a/toonz/sources/common/trop/tover.cpp b/toonz/sources/common/trop/tover.cppindex 7346382f0..41dfb1277 100644--- a/toonz/sources/common/trop/tover.cpp+++ b/toonz/sources/common/trop/tover.cpp@@ -7,7 +7,7 @@#include "tropcm.h"#include "tpalette.h"-#ifdef WIN32+#ifdef _WIN32#include <emmintrin.h> // per SSE2#endif@@ -171,7 +171,7 @@ void do_overT2(TRasterPT<T> rout, const TRasterPT<T> &rup)//------------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32void do_over_SSE2(TRaster32P rout, const TRaster32P &rup){@@ -345,7 +345,7 @@ void TRop::over(const TRasterP &rout, const TRasterP &rup, const TPoint &pos)// TRaster64P rout64 = rout, rin64 = rin;if (rout32 && rup32) {-#ifdef WIN32+#ifdef _WIN32if (TSystem::getCPUExtensions() & TSystem::CpuSupportsSse2)do_over_SSE2(rout32, rup32);elsediff --git a/toonz/sources/common/trop/tresample.cpp b/toonz/sources/common/trop/tresample.cppindex 3051bab5c..c570ea296 100644--- a/toonz/sources/common/trop/tresample.cpp+++ b/toonz/sources/common/trop/tresample.cpp@@ -18,7 +18,7 @@using namespace TConsts;-#ifdef WIN32+#ifdef _WIN32#include <emmintrin.h> // per SSE2#endif@@ -841,7 +841,7 @@ inline void calcValueNoCalc(UINT &calc_value){//#define PIXVAL_EQ PIXVAL_EQ_EQUALtemplate <typename PixType>-#ifdef WIN32+#ifdef _WIN32__forceinline#endifvoid@@ -1511,7 +1511,7 @@ void resample_main_rgbm(TRasterPT<T> rout, const TRasterPT<T> &rin,//----------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32namespace{@@ -1808,7 +1808,7 @@ void inline blendBySSE2(__m128 &pix_out_packed,} // namespace-#endif // WIN32+#endif // _WIN32//---------------------------------------------------------------------------static void get_prow_gr8(const TRasterGR8P &rin,@@ -2747,7 +2747,7 @@ void rop_resample_rgbm(TRasterPT<T> rout, const TRasterPT<T> &rin,}}-#ifdef WIN32+#ifdef _WIN32if ((TSystem::getCPUExtensions() & TSystem::CpuSupportsSse2) && T::maxChannelValue == 255)resample_main_rgbm_SSE2<T>(rout, rin, aff_xy2uv, aff0_uv2fg,min_pix_ref_u, min_pix_ref_v,@@ -3651,7 +3651,7 @@ void do_resample(TRasterCM32P rout, const TRasterCM32P &rin, const TAffine &aff)//------------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template <class T>void resample_main_cm32_rgbm_SSE2(TRasterPT<T> rout, const TRasterCM32P &rin,const TAffine &aff_xy2uv,@@ -5082,7 +5082,7 @@ void rop_resample_rgbm_2(TRasterPT<T> rout, const TRasterCM32P &rin,}}-#ifdef WIN32+#ifdef _WIN32TRaster32P rout32 = rout;if ((TSystem::getCPUExtensions() & TSystem::CpuSupportsSse2) && rout32)resample_main_cm32_rgbm_SSE2<TPixel32>(rout32, rin, aff_xy2uv, aff0_uv2fg,diff --git a/toonz/sources/common/trop/tropcm.cpp b/toonz/sources/common/trop/tropcm.cppindex 8cfc930d7..f7c6911c0 100644--- a/toonz/sources/common/trop/tropcm.cpp+++ b/toonz/sources/common/trop/tropcm.cpp@@ -22,7 +22,7 @@ extern "C" {#include "toonz4.6/raster.h"}-#ifdef WIN32+#ifdef _WIN32#define USE_SSE2#endif@@ -78,7 +78,7 @@ void TRop::convert(const TRaster32P &rasOut,rasOut->lock();rasIn->lock();-#ifdef WIN32+#ifdef _WIN32if (TSystem::getCPUExtensions() & TSystem::CpuSupportsSse2) {__m128i zeros = _mm_setzero_si128();TPixelFloat *paints = (TPixelFloat *)_aligned_malloc(count2 * sizeof(TPixelFloat), 16);@@ -171,7 +171,7 @@ void TRop::convert(const TRaster32P &rasOut,_aligned_free(inks);} else // SSE2 not supported-#endif // WIN32+#endif // _WIN32{std::vector<TPixel32> paints(count2, TPixel32(255, 0, 0));diff --git a/toonz/sources/common/tsystem/cpuextensions.cpp b/toonz/sources/common/tsystem/cpuextensions.cppindex 5920ef43c..8423513c0 100644--- a/toonz/sources/common/tsystem/cpuextensions.cpp+++ b/toonz/sources/common/tsystem/cpuextensions.cpp@@ -1,7 +1,7 @@#include "tsystem.h"-#ifdef WIN32+#ifdef _WIN32#include <wtypes.h>#include <winnt.h>#include <emmintrin.h>@@ -16,7 +16,7 @@ long TSystem::getCPUExtensions()}#else-#ifndef WIN32+#ifndef _WIN32long TSystem::getCPUExtensions(){return TSystem::CPUExtensionsNone;@@ -29,7 +29,7 @@ long CPUExtensionsAvailable = TSystem::CPUExtensionsNone;bool CPUExtensionsEnabled = true;bool FistTime = true;-//#ifdef WIN32+//#ifdef _WIN32//------------------------------------------------------------------------------diff --git a/toonz/sources/common/tsystem/tfilepath.cpp b/toonz/sources/common/tsystem/tfilepath.cppindex ff579d02b..df7705bbf 100644--- a/toonz/sources/common/tsystem/tfilepath.cpp+++ b/toonz/sources/common/tsystem/tfilepath.cpp@@ -1,6 +1,6 @@-#ifdef WIN32+#ifdef _WIN32//#define UNICODE // per le funzioni di conversione da/a UNC#include <windows.h>#include <lm.h>@@ -128,7 +128,7 @@ bool isUncName = false;pos=2;if(path.length()==2 || !isSlash(path[pos])) m_path.append(1,slash);}-#ifdef WIN32+#ifdef _WIN32else //se si tratta di un path in formato UNC e' del tipo "\\\\MachineName"//RICONTROLLARE! SE SI HA IP ADDRESS FALLIVA!if (path.length() >= 3 && path[0] == '\\' && path[1] == '\\' && (isalpha(path[2]) || isdigit(path[2])) )@@ -287,7 +287,7 @@ TFilePath::TFilePath(const QString &path)bool TFilePath::operator==(const TFilePath &fp) const{-#ifdef WIN32+#ifdef _WIN32return _wcsicmp(m_path.c_str(), fp.m_path.c_str()) == 0;#elsereturn m_path == fp.m_path;@@ -304,7 +304,7 @@ bool TFilePath::operator<(const TFilePath &fp) constint i2 = m_path.find(L"\\");int j2 = fp.m_path.find(L"\\");if (i2 == j2 && j2 == -1)-#ifdef WIN32+#ifdef _WIN32return _wcsicmp(m_path.c_str(), fp.m_path.c_str()) < 0;#elsereturn m_path < fp.m_path;@@ -323,7 +323,7 @@ bool TFilePath::operator<(const TFilePath &fp) constjName = (j2 != -1) ? fp.m_path.substr(j1, j2 - j1) : fp.m_path;//se le due parti di path, conpresi tra slash sono uguali//itero il processo di confronto altrimenti ritorno-#ifdef WIN32+#ifdef _WIN32char differ;differ = _wcsicmp(iName.c_str(), jName.c_str());if (differ != 0)@@ -340,7 +340,7 @@ bool TFilePath::operator<(const TFilePath &fp) constiName = m_path.substr(i1, m_path.size() - i1);jName = fp.m_path.substr(j1, fp.m_path.size() - j1);-#ifdef WIN32+#ifdef _WIN32return _wcsicmp(iName.c_str(), jName.c_str()) < 0;#elsereturn TFilePath(iName) < TFilePath(jName);diff --git a/toonz/sources/common/tsystem/tfilepath_io.cpp b/toonz/sources/common/tsystem/tfilepath_io.cppindex d6ff84df2..7a5c410c7 100644--- a/toonz/sources/common/tsystem/tfilepath_io.cpp+++ b/toonz/sources/common/tsystem/tfilepath_io.cpp@@ -11,7 +11,7 @@#include <iostream>using namespace std;-#ifdef WIN32+#ifdef _WIN32#include <io.h>#include <windows.h>diff --git a/toonz/sources/common/tsystem/tpluginmanager.cpp b/toonz/sources/common/tsystem/tpluginmanager.cppindex 0e002aae0..b30f1918e 100644--- a/toonz/sources/common/tsystem/tpluginmanager.cpp+++ b/toonz/sources/common/tsystem/tpluginmanager.cpp@@ -5,7 +5,7 @@#include "tconvert.h"#include "tlogger.h"-#ifdef WIN32+#ifdef _WIN32#include <windows.h>#else@@ -34,7 +34,7 @@class TPluginManager::Plugin{public:-#ifdef WIN32+#ifdef _WIN32typedef HINSTANCE Handle;#elsetypedef void *Handle;@@ -65,7 +65,7 @@ typedef const TPluginInfo *TnzLibMainProcType();namespace{const char *TnzLibMainProcName = "TLibMain";-#if !defined(WIN32)+#if !defined(_WIN32)const char *TnzLibMainProcName2 = "_TLibMain";#endif}@@ -107,7 +107,7 @@ void TPluginManager::unloadPlugins()it != m_pluginTable.end(); ++it) {Plugin::Handle handle = (*it)->getHandle();#ifndef LINUX-#ifdef WIN32+#ifdef _WIN32FreeLibrary(handle);#elsedlclose(handle);@@ -133,7 +133,7 @@ void TPluginManager::loadPlugin(const TFilePath &fp)}TLogger::debug() << "Loading " << fp;-#ifdef WIN32+#ifdef _WIN32Plugin::Handle handle = LoadLibraryW(fp.getWideString().c_str());#elsewstring str_fp = fp.getWideString();@@ -142,7 +142,7 @@ void TPluginManager::loadPlugin(const TFilePath &fp)if (!handle) {// non riesce a caricare la libreria;TLogger::warning() << "Unable to load " << fp;-#ifdef WIN32+#ifdef _WIN32wstring getFormattedMessage(DWORD lastError);TLogger::warning() << toString(getFormattedMessage(GetLastError()));#else@@ -154,7 +154,7 @@ void TPluginManager::loadPlugin(const TFilePath &fp)m_pluginTable.push_back(plugin);//cout << "loaded" << endl;TnzLibMainProcType *tnzLibMain = 0;-#ifdef WIN32+#ifdef _WIN32tnzLibMain = (TnzLibMainProcType *)GetProcAddress(handle, TnzLibMainProcName);#else@@ -168,7 +168,7 @@ void TPluginManager::loadPlugin(const TFilePath &fp)// La libreria non esporta TLibMain;TLogger::warning() << "Corrupted " << fp;-#ifdef WIN32+#ifdef _WIN32FreeLibrary(handle);#elsedlclose(handle);@@ -185,7 +185,7 @@ void TPluginManager::loadPlugin(const TFilePath &fp)void TPluginManager::loadPlugins(const TFilePath &dir){-#if defined(WIN32)+#if defined(_WIN32)const string extension = "dll";#elif defined(LINUX) || defined(__sgi)const string extension = "so";@@ -204,7 +204,7 @@ void TPluginManager::loadPlugins(const TFilePath &dir)continue;wstring fullpath = fp.getWideString();-#ifdef WIN32+#ifdef _WIN32bool isDebugLibrary = (fullpath.find(L".d.") == fullpath.size() - (extension.size() + 3));diff --git a/toonz/sources/common/tsystem/tsystem.cpp b/toonz/sources/common/tsystem/tsystem.cppindex 1ceb34f74..019687ec7 100644--- a/toonz/sources/common/tsystem/tsystem.cpp+++ b/toonz/sources/common/tsystem/tsystem.cpp@@ -23,7 +23,7 @@ using namespace std;#include <QCoreApplication>#include <QUuid>-#ifdef WIN32+#ifdef _WIN32#include <qdesktopservices>#include <qhostinfo>#include <shlobj.h>@@ -165,7 +165,7 @@ QString TSystem::getUserName()for (j = 0; j < list.size(); j++) {QString value = list.at(j);QString user;-#ifdef WIN32+#ifdef _WIN32if (value.startsWith("USERNAME="))user = value.right(value.size() - 9);#else@@ -364,7 +364,7 @@ else*///------------------------------------------------------------/*-#ifdef WIN32+#ifdef _WIN32wstring getFormattedMessage(DWORD lastError){@@ -446,7 +446,7 @@ void TSystem::deleteFile(const TFilePath &fp)void TSystem::hideFile(const TFilePath &fp){-#ifdef WIN32+#ifdef _WIN32if (!SetFileAttributesW(fp.getWideString().c_str(), FILE_ATTRIBUTE_HIDDEN))throw TSystemException(fp, "can't hide file!");#else // MACOSX, and others@@ -931,7 +931,7 @@ bool TSystem::touchParentDir(const TFilePath &fp)bool TSystem::showDocument(const TFilePath &path){-#ifdef WIN32+#ifdef _WIN32int ret = (int)ShellExecuteW(0, L"open", path.getWideString().c_str(), 0, 0, SW_SHOWNORMAL);if (ret <= 32) {diff --git a/toonz/sources/common/tsystem/tsystempd.cpp b/toonz/sources/common/tsystem/tsystempd.cppindex f1db6155c..16b77c527 100644--- a/toonz/sources/common/tsystem/tsystempd.cpp+++ b/toonz/sources/common/tsystem/tsystempd.cpp@@ -1,6 +1,6 @@-#ifdef WIN32+#ifdef _WIN32#ifndef UNICODE#define UNICODE#endif@@ -21,7 +21,7 @@#undef PLATFORM-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#define PLATFORM WIN32#include <process.h>@@ -102,7 +102,7 @@ PLATFORM_NOT_SUPPORTEDusing namespace std;-#ifdef WIN32+#ifdef _WIN32wstring getFormattedMessage(DWORD lastError){@@ -138,7 +138,7 @@ wstring getFormattedMessage(DWORD lastError)void TSystem::outputDebug(string s){#ifdef TNZCORE_LIGHT-#ifdef WIN32+#ifdef _WIN32OutputDebugString((LPCWSTR)s.c_str());#elsecerr << s << endl;@@ -159,7 +159,7 @@ int TSystem::getProcessId()bool TSystem::memoryShortage(){-#ifdef WIN32+#ifdef _WIN32MEMORYSTATUSEX memStatus;memStatus.dwLength = sizeof(MEMORYSTATUSEX);@@ -205,7 +205,7 @@ TINT64 TSystem::getFreeMemorySize(bool onlyPhisicalMemory)TINT64 totalFree = 0;-#ifdef WIN32+#ifdef _WIN32MEMORYSTATUSEX buff;buff.dwLength = sizeof(MEMORYSTATUSEX);@@ -263,7 +263,7 @@ TINT64 TSystem::getFreeMemorySize(bool onlyPhisicalMemory)@ @ @ERROR : PLATFORM NOT SUPPORTED#endif-#ifndef WIN32+#ifndef _WIN32#else#endif@@ -287,7 +287,7 @@ TINT64 TSystem::getDiskSize(const TFilePath &diskName)assert(0);return 0;}-#ifndef WIN32+#ifndef _WIN32struct statfs buf;wstring str_diskname = diskName.getWideString();#ifdef __sgi@@ -327,7 +327,7 @@ TINT64 TSystem::getFreeDiskSize(const TFilePath &diskName)assert(0);return 0;}-#ifndef WIN32+#ifndef _WIN32struct statfs buf;wstring str_diskname = diskName.getWideString();#ifdef __sgi@@ -361,7 +361,7 @@ TINT64 TSystem::getFreeDiskSize(const TFilePath &diskName)TINT64 TSystem::getMemorySize(bool onlyPhisicalMemory){-#ifdef WIN32+#ifdef _WIN32MEMORYSTATUS buff;GlobalMemoryStatus(&buff);@@ -400,7 +400,7 @@ TINT64 TSystem::getMemorySize(bool onlyPhisicalMemory)@ @ @ERROR : PLATFORM NOT SUPPORTED#endif-#ifndef WIN32+#ifndef _WIN32#else#endif}@@ -409,7 +409,7 @@ TINT64 TSystem::getMemorySize(bool onlyPhisicalMemory)void TSystem::moveFileToRecycleBin(const TFilePath &fp){-#if defined(WIN32)+#if defined(_WIN32)//// from http://msdn.microsoft.com/msdnmag/issues/01/04/c/default.aspx//@@ -497,7 +497,7 @@ TString TSystemException::getMessage() constDEFAULT:msg = L": Unknown error";-#ifndef WIN32+#ifndef _WIN32CASE ELOOP : msg = L": Too many symbolic links were encountered in translating path.";#ifndef MACOSXCASE EMULTIHOP : msg = L": Components of path require hopping to multiple remote machines and the file system does not allow it.";diff --git a/toonz/sources/common/tsystem/uncpath.cpp b/toonz/sources/common/tsystem/uncpath.cppindex fb1205d63..92ed0ac9e 100644--- a/toonz/sources/common/tsystem/uncpath.cpp+++ b/toonz/sources/common/tsystem/uncpath.cpp@@ -3,7 +3,7 @@#include "tsystem.h"#include "tconvert.h"-#ifdef WIN32+#ifdef _WIN32#define UNICODE // per le funzioni di conversione da/a UNC#include <windows.h>#include <lm.h>@@ -22,7 +22,7 @@ bool TSystem::isUNC(const TFilePath &path)TFilePath TSystem::toUNC(const TFilePath &fp){-#ifdef WIN32+#ifdef _WIN32if (QString::fromStdWString(fp.getWideString()).startsWith('+'))return fp;if (isUNC(fp))@@ -146,7 +146,7 @@ TFilePath TSystem::toUNC(const TFilePath &fp)TFilePath TSystem::toLocalPath(const TFilePath &fp){-#ifdef WIN32+#ifdef _WIN32if (!isUNC(fp))return TFilePath(fp);diff --git a/toonz/sources/common/ttest/ttest.cpp b/toonz/sources/common/ttest/ttest.cppindex 568bf80a6..dba0d644d 100644--- a/toonz/sources/common/ttest/ttest.cpp+++ b/toonz/sources/common/ttest/ttest.cpp@@ -213,7 +213,7 @@ TFilePath getTestFile(string name)TFilePath testFile;TFilePath parentDir = TSystem::getBinDir().getParentDir();-#ifndef WIN32+#ifndef _WIN32parentDir = parentDir.getParentDir();#endifdiff --git a/toonz/sources/common/tvectorimage/tl2lautocloser.cpp b/toonz/sources/common/tvectorimage/tl2lautocloser.cppindex f91ee2b6b..4c285c607 100644--- a/toonz/sources/common/tvectorimage/tl2lautocloser.cpp+++ b/toonz/sources/common/tvectorimage/tl2lautocloser.cpp@@ -10,7 +10,7 @@#include <QDebug>//=============================================================================-#ifdef WIN32+#ifdef _WIN32class MyTimer{@@ -393,7 +393,7 @@ void TL2LAutocloser::Imp::search(if (strokea == 0 || strokeb == 0)return;/*-#ifdef WIN32+#ifdef _WIN32MyTimer timer;qDebug() << "search started";timer.start();@@ -511,7 +511,7 @@ void TL2LAutocloser::Imp::search(segments.push_back(segment);}/*-#ifdef WIN32+#ifdef _WIN32double elapsed = timer.elapsedSeconds();qDebug() << "search completed. time=" << elapsed << "s";#endifdiff --git a/toonz/sources/common/tvectorimage/tl2lautocloser.h b/toonz/sources/common/tvectorimage/tl2lautocloser.hindex 2a4cbbdb9..39f22cae3 100644--- a/toonz/sources/common/tvectorimage/tl2lautocloser.h+++ b/toonz/sources/common/tvectorimage/tl2lautocloser.h@@ -15,7 +15,7 @@#define DVVAR DV_IMPORT_VAR#endif-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4251)#endifdiff --git a/toonz/sources/common/tvectorimage/tsegmentadjuster.h b/toonz/sources/common/tvectorimage/tsegmentadjuster.hindex c0f21f1f5..8e0149c91 100644--- a/toonz/sources/common/tvectorimage/tsegmentadjuster.h+++ b/toonz/sources/common/tvectorimage/tsegmentadjuster.h@@ -16,7 +16,7 @@#define DVVAR DV_IMPORT_VAR#endif-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4251)#endifdiff --git a/toonz/sources/common/tvectorimage/tsweepboundary.cpp b/toonz/sources/common/tvectorimage/tsweepboundary.cppindex 03da58da3..cb963282a 100644--- a/toonz/sources/common/tvectorimage/tsweepboundary.cpp+++ b/toonz/sources/common/tvectorimage/tsweepboundary.cpp@@ -12,7 +12,7 @@//#include "drawutil.h"#include "tvectorimage.h"-#ifdef WIN32+#ifdef _WIN32#include <crtdbg.h>#include <Windows.h>#endif@@ -317,7 +317,7 @@ void removeFalseHoles(const vector<TStroke *> &strokes);inline void TraceLinkedQuadraticList(LinkedQuadraticList &quadraticList){-#ifdef WIN32+#ifdef _WIN32_RPT0(_CRT_WARN,"\n__________________________________________________\n");LinkedQuadraticList::iterator it = quadraticList.begin();diff --git a/toonz/sources/common/tvrender/qtofflinegl.cpp b/toonz/sources/common/tvrender/qtofflinegl.cppindex 4c4c4ff5e..60fbece02 100644--- a/toonz/sources/common/tvrender/qtofflinegl.cpp+++ b/toonz/sources/common/tvrender/qtofflinegl.cpp@@ -6,7 +6,7 @@//------------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32void swapRedBlueChannels(void *buffer, int bufferSize) // Flips The Red And Blue Bytes (WidthxHeight){@@ -127,7 +127,7 @@ void QtOfflineGL::createContext(TDimension rasterSize, std::shared_ptr<TOfflineGQGLFormat fmt;-#ifdef WIN32+#ifdef _WIN32fmt.setAlphaBufferSize(8);fmt.setAlpha(true);fmt.setRgba(true);@@ -280,7 +280,7 @@ void QtOfflineGLPBuffer::createContext(TDimension rasterSize)QGLFormat fmt;-#ifdef WIN32+#ifdef _WIN32fmt.setAlphaBufferSize(8);fmt.setAlpha(false);fmt.setRgba(true);diff --git a/toonz/sources/common/tvrender/tglregions.cpp b/toonz/sources/common/tvrender/tglregions.cppindex 5ef849331..746ef5994 100644--- a/toonz/sources/common/tvrender/tglregions.cpp+++ b/toonz/sources/common/tvrender/tglregions.cpp@@ -17,7 +17,7 @@#include "tcurves.h"#include "tstrokeoutline.h"-#ifndef WIN32+#ifndef _WIN32#define CALLBACK#endifdiff --git a/toonz/sources/common/tvrender/tofflinegl.cpp b/toonz/sources/common/tvrender/tofflinegl.cppindex bccfb7013..42737a3e4 100644--- a/toonz/sources/common/tvrender/tofflinegl.cpp+++ b/toonz/sources/common/tvrender/tofflinegl.cpp@@ -59,7 +59,7 @@ void TOfflineGL::setContextManager(TGLContextManager *contextManager)// WIN32Implementation : implementazione offlineGL WIN32//------------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32namespace{diff --git a/toonz/sources/common/tvrender/tregionprop.cpp b/toonz/sources/common/tvrender/tregionprop.cppindex 9559803ed..9fe775a7d 100644--- a/toonz/sources/common/tvrender/tregionprop.cpp+++ b/toonz/sources/common/tvrender/tregionprop.cpp@@ -15,7 +15,7 @@//#include "tdebugmessage.h"//#include "tflash.h"-#ifndef WIN32+#ifndef _WIN32#define CALLBACK#endifdiff --git a/toonz/sources/common/tvrender/tsimplecolorstyles.cpp b/toonz/sources/common/tvrender/tsimplecolorstyles.cppindex f9f96a933..dfb8b1f44 100644--- a/toonz/sources/common/tvrender/tsimplecolorstyles.cpp+++ b/toonz/sources/common/tvrender/tsimplecolorstyles.cpp@@ -28,7 +28,7 @@#include "tsimplecolorstyles.h"-#ifndef WIN32+#ifndef _WIN32#define CALLBACK#endif@@ -119,7 +119,7 @@ void drawAntialiasedOutline(const std::vector<TOutlinePoint> &_v, const TStroke// DisplayListManager definition//*************************************************************************************-#ifdef WIN32+#ifdef _WIN32namespace{@@ -292,7 +292,7 @@ public:} // namespace-#endif // WIN32+#endif // _WIN32//*************************************************************************************// TSimpleStrokeStyle implementation@@ -1460,7 +1460,7 @@ void TVectorImagePatternStrokeStyle::computeTransformations(vector<TAffine> &travoid TVectorImagePatternStrokeStyle::clearGlDisplayLists(){-#ifdef WIN32+#ifdef _WIN32DisplayListManager *pmgr = DisplayListManager::instance();assert(pmgr);pmgr->clearLists();@@ -1590,7 +1590,7 @@ void TVectorImagePatternStrokeStyle::drawStroke(const TVectorRenderData &rd, contglMultMatrix(totalTransformation);CHECK_GL_ERROR-#ifdef WIN32+#ifdef _WIN32GLuint listId = DisplayListManager::instance()->getDisplayListId(imgPointer, m_name, fid, rd);if (listId != 0) {diff --git a/toonz/sources/common/tvrender/ttessellator.cpp b/toonz/sources/common/tvrender/ttessellator.cppindex ab48aaee6..d91ada314 100644--- a/toonz/sources/common/tvrender/ttessellator.cpp+++ b/toonz/sources/common/tvrender/ttessellator.cpp@@ -12,7 +12,7 @@//#include "tlevel_io.h"-#ifndef WIN32+#ifndef _WIN32#define CALLBACK#endif// To avoid linking problems with HP ZX2000@@ -93,7 +93,7 @@ extern "C" void CALLBACK myCombine(GLdouble coords[3], GLdouble *d[4],//--------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32typedef GLvoid(CALLBACK *GluCallback)(void);#endifdiff --git a/toonz/sources/common/twain/ttwain.h b/toonz/sources/common/twain/ttwain.hindex b1ba6b806..5e5c98391 100644--- a/toonz/sources/common/twain/ttwain.h+++ b/toonz/sources/common/twain/ttwain.h@@ -3,7 +3,7 @@#ifndef __TTWAIN_H__#define __TTWAIN_H__-#ifdef WIN32+#ifdef _WIN32#include <windows.h>#else#ifndef _UNIX_diff --git a/toonz/sources/common/twain/ttwainP.h b/toonz/sources/common/twain/ttwainP.hindex 84ff96106..86e88ebc6 100644--- a/toonz/sources/common/twain/ttwainP.h+++ b/toonz/sources/common/twain/ttwainP.h@@ -25,7 +25,7 @@ typedef enum TWAINSTATE {TWAIN_TRANSFERRING /* image in transit */} TWAINSTATE;-#ifdef WIN32+#ifdef _WIN32#ifdef x64#define DSM_FILENAME "TWAINDSM.DLL"#elsediff --git a/toonz/sources/common/twain/ttwain_error.c b/toonz/sources/common/twain/ttwain_error.cindex 2df522d9e..0b2860bca 100644--- a/toonz/sources/common/twain/ttwain_error.c+++ b/toonz/sources/common/twain/ttwain_error.c@@ -1,6 +1,6 @@-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#endif@@ -128,7 +128,7 @@ void TTWAIN_RecordError(void)}if (TTwainData.ErrRC == TWRC_FAILURE && TTwainData.ErrCC == TWCC_OPERATIONERROR) {-#ifdef WIN32+#ifdef _WIN32OutputDebugString(Msg_out);#else#ifdef TOONZDEBUGdiff --git a/toonz/sources/common/twain/ttwain_global_def.h b/toonz/sources/common/twain/ttwain_global_def.hindex c0a740d48..994d46e17 100644--- a/toonz/sources/common/twain/ttwain_global_def.h+++ b/toonz/sources/common/twain/ttwain_global_def.h@@ -3,7 +3,7 @@/*max@home*/#ifndef __GLOBAL_DEF_H__#define __GLOBAL_DEF_H__-#ifdef WIN32+#ifdef _WIN32#define GLOBAL_LOCK(P) GlobalLock(P)#define GLOBAL_ALLOC(T, S) GlobalAlloc(T, S)#define GLOBAL_FREE(P) GlobalFree(P)diff --git a/toonz/sources/common/twain/ttwain_state.c b/toonz/sources/common/twain/ttwain_state.cindex a0c360e4d..28db0695a 100644--- a/toonz/sources/common/twain/ttwain_state.c+++ b/toonz/sources/common/twain/ttwain_state.c@@ -1,6 +1,6 @@-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#endif@@ -203,7 +203,7 @@ int TTWAIN_MessageHook(void *lpmsg)//printf("%s\n", __PRETTY_FUNCTION__);if (TTWAIN_GetState() >= TWAIN_SOURCE_ENABLED) {/* source enabled */-#ifdef WIN32+#ifdef _WIN32TW_EVENT twEvent;twEvent.pEvent = (TW_MEMREF)lpmsg;twEvent.TWMessage = MSG_NULL;@@ -639,7 +639,7 @@ void *TTWAIN_AcquireNative(void *hwnd)return hnative;}/*---------------------------------------------------------------------------*/-#ifdef WIN32+#ifdef _WIN32typedef void(MyFun)(HWND);diff --git a/toonz/sources/common/twain/ttwain_util.c b/toonz/sources/common/twain/ttwain_util.cindex d639227ba..af691b237 100644--- a/toonz/sources/common/twain/ttwain_util.c+++ b/toonz/sources/common/twain/ttwain_util.c@@ -1,6 +1,6 @@-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#endif@@ -782,7 +782,7 @@ l'immagine)if (!handle)return TRUE; /*non sono semplicamente riuscito a prendere info riguardoil pixelFlavor, ma setPixelType e' andato a buon fine */-#ifdef WIN32+#ifdef _WIN32container = (TW_ENUMERATION *)handle;#elsecontainer = (TW_ENUMERATION *)GLOBAL_LOCK(handle);diff --git a/toonz/sources/common/twain/twain.h b/toonz/sources/common/twain/twain.hindex 84ae0a1dc..771fdf2e7 100644--- a/toonz/sources/common/twain/twain.h+++ b/toonz/sources/common/twain/twain.h@@ -103,11 +103,11 @@#endif/* Microsoft C/C++ Compiler */-#if defined(WIN32) || defined(WIN64) || defined(_WINDOWS)+#if defined(_WIN32) || defined(WIN64) || defined(_WINDOWS)#define TWH_CMP_MSC#if defined(_WIN64) || defined(WIN64)#define TWH_64BIT-#elif defined(WIN32) || defined(_WIN32)+#elif defined(_WIN32) || defined(_WIN32)#define TWH_32BIT#endif@@ -1844,7 +1844,7 @@ typedef struct {* Depreciated Items *****************************************************************************/#ifdef _MSWIN_-#if defined(WIN32) || defined(WIN64)+#if defined(_WIN32) || defined(WIN64)#define TW_HUGE#elif !defined(TWH_CMP_GNU)#define TW_HUGE hugediff --git a/toonz/sources/image/avi/tiio_avi.cpp b/toonz/sources/image/avi/tiio_avi.cppindex cf852159e..9fae64e7c 100644--- a/toonz/sources/image/avi/tiio_avi.cpp+++ b/toonz/sources/image/avi/tiio_avi.cpp@@ -156,7 +156,7 @@ private:////===========================================================-#ifdef WIN32+#ifdef _WIN32TLevelWriterAvi::TLevelWriterAvi(const TFilePath &path, TPropertyGroup *winfo): TLevelWriter(path, winfo), m_aviFile(0), m_videoStream(0), m_audioStream(0), m_bitmapinfo(0), m_outputFmt(0), m_hic(0), m_initDone(false), IOError(0), m_st(0), m_bpp(32), m_maxDataSize(0), m_buffer(0), m_firstframe(-1)@@ -647,10 +647,10 @@ private:////===========================================================-#ifdef WIN32+#ifdef _WIN32TLevelReaderAvi::TLevelReaderAvi(const TFilePath &path): TLevelReader(path)-#ifdef WIN32+#ifdef _WIN32,m_srcBitmapInfo(0), m_dstBitmapInfo(0), m_hic(0), IOError(0), m_prevFrame(-1), m_decompressedBuffer(0)#endif@@ -1035,7 +1035,7 @@ TImageP TLevelReaderAvi::load(int frameIndex)////===========================================================-#ifdef WIN32+#ifdef _WIN32Tiio::AviWriterProperties::AviWriterProperties(): m_codec("Codec"){diff --git a/toonz/sources/image/avi/tiio_avi.h b/toonz/sources/image/avi/tiio_avi.hindex 0b7ebf83d..d69c3a3a7 100644--- a/toonz/sources/image/avi/tiio_avi.h+++ b/toonz/sources/image/avi/tiio_avi.h@@ -3,7 +3,7 @@#ifndef TIIO_AVI_H#define TIIO_AVI_H-#ifdef WIN32+#ifdef _WIN32#include <windows.h>#include <vfw.h>#endif@@ -33,7 +33,7 @@ public:private:TThread::Mutex m_mutex;-#ifdef WIN32+#ifdef _WIN32PAVIFILE m_aviFile;PAVISTREAM m_videoStream;PAVISTREAM m_audioStream;@@ -53,7 +53,7 @@ private:void doSaveSoundTrack();void searchForCodec();-#ifdef WIN32+#ifdef _WIN32int compressFrame(BITMAPINFOHEADER *outHeader, void **bufferOut, int frameIndex,DWORD flagsIn, DWORD &flagsOut);#endif@@ -80,7 +80,7 @@ public:TThread::Mutex m_mutex;void *m_decompressedBuffer;-#ifdef WIN32+#ifdef _WIN32private:PAVISTREAM m_videoStream;BITMAPINFO *m_srcBitmapInfo, *m_dstBitmapInfo;diff --git a/toonz/sources/image/compatibility/tfile_io.c b/toonz/sources/image/compatibility/tfile_io.cindex 1995573fc..11c0cb5f9 100644--- a/toonz/sources/image/compatibility/tfile_io.c+++ b/toonz/sources/image/compatibility/tfile_io.c@@ -2,7 +2,7 @@#include "tfile_io.h"-#ifdef WIN32+#ifdef _WIN32#include <windows.h>#include <assert.h>diff --git a/toonz/sources/image/compatibility/tnz4.h b/toonz/sources/image/compatibility/tnz4.hindex 52ef231d5..d84950c8d 100644--- a/toonz/sources/image/compatibility/tnz4.h+++ b/toonz/sources/image/compatibility/tnz4.h@@ -32,7 +32,7 @@ TNZ_LITTLE_ENDIAN undefined !!#define TBOOL inttypedef struct LPIXEL {-#ifdef WIN32+#ifdef _WIN32unsigned char b, g, r, m;#elif defined(__sgi)unsigned char m, b, g, r;@@ -46,7 +46,7 @@ TNZ_LITTLE_ENDIAN undefined !!} LPIXEL;typedef struct SPIXEL {-#ifdef WIN32+#ifdef _WIN32unsigned short b, g, r, m;#elif defined(__sgi)unsigned short m, b, g, r;@@ -121,7 +121,7 @@ typedef struct IMAGE {#define CROP(X, MIN, MAX) (X < MIN ? MIN : (X > MAX ? MAX : X))-#ifdef WIN32+#ifdef _WIN32#define LPIXEL_TO_BGRM(X) (X)#else#if TNZ_LITTLE_ENDIANdiff --git a/toonz/sources/image/compatibility/tnz4_cpp.cpp b/toonz/sources/image/compatibility/tnz4_cpp.cppindex c701a732d..6c083b977 100644--- a/toonz/sources/image/compatibility/tnz4_cpp.cpp+++ b/toonz/sources/image/compatibility/tnz4_cpp.cpp@@ -7,7 +7,7 @@ extern "C" {#include <stdio.h>#include <sys/types.h>#include <sys/stat.h>-#ifndef WIN32+#ifndef _WIN32#include <unistd.h>#endifdiff --git a/toonz/sources/image/mov/tiio_movW.cpp b/toonz/sources/image/mov/tiio_movW.cppindex 4e748c7eb..f41e61261 100644--- a/toonz/sources/image/mov/tiio_movW.cpp+++ b/toonz/sources/image/mov/tiio_movW.cpp@@ -326,7 +326,7 @@ Tiio::TifWriterProperties::TifWriterProperties(){m_byteOrdering.addValue(L"IBM PC");m_byteOrdering.addValue(L"Mac");-#ifdef WIN32+#ifdef _WIN32m_byteOrdering.setValue(L"IBM PC");#elsem_byteOrdering.setValue(L"Mac");diff --git a/toonz/sources/image/pli/pli_io.cpp b/toonz/sources/image/pli/pli_io.cppindex 3184d729a..c774fc947 100644--- a/toonz/sources/image/pli/pli_io.cpp+++ b/toonz/sources/image/pli/pli_io.cpp@@ -19,7 +19,7 @@#if defined(MACOSX)#include <architecture/i386/io.h>-#elif defined(WIN32)+#elif defined(_WIN32)#include <io.h>#endif@@ -304,7 +304,7 @@ UINT TStyleParam::getSize()/*=====================================================================*/-#ifdef WIN32+#ifdef _WIN32#define CHECK_FOR_READ_ERROR(filePath)#else#define CHECK_FOR_READ_ERROR(filePath) \@@ -545,7 +545,7 @@ ParsedPliImp::ParsedPliImp(const TFilePath &filename, bool readInfo)// cerr<<m_filePath<<endl;- //#ifdef WIN32+ //#ifdef _WIN32m_iChan.open(filename);//m_iChan.exceptions( ios::failbit | ios::badbit);diff --git a/toonz/sources/image/pli/pli_io.h b/toonz/sources/image/pli/pli_io.hindex b8bdf381a..1b5c9db4b 100644--- a/toonz/sources/image/pli/pli_io.h+++ b/toonz/sources/image/pli/pli_io.h@@ -3,7 +3,7 @@#ifndef _PLI_IO_H#define _PLI_IO_H-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4661)#pragma warning(disable : 4018)#endifdiff --git a/toonz/sources/image/pli/tags.cpp b/toonz/sources/image/pli/tags.cppindex 258868727..5d20f679f 100644--- a/toonz/sources/image/pli/tags.cpp+++ b/toonz/sources/image/pli/tags.cpp@@ -1,6 +1,6 @@-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4661)#endifdiff --git a/toonz/sources/image/quantel/filequantel.c b/toonz/sources/image/quantel/filequantel.cindex 839ed144e..bdaf2306c 100644--- a/toonz/sources/image/quantel/filequantel.c+++ b/toonz/sources/image/quantel/filequantel.c@@ -16,7 +16,7 @@#include "filequantel.h"#include "filequantelP.h"-#ifdef WIN32+#ifdef _WIN32#define STAT_BUF struct _stat#else#define STAT_BUF struct statdiff --git a/toonz/sources/image/sgi/filesgi.cpp b/toonz/sources/image/sgi/filesgi.cppindex 60aa8b56e..007321d38 100644--- a/toonz/sources/image/sgi/filesgi.cpp+++ b/toonz/sources/image/sgi/filesgi.cpp@@ -32,7 +32,7 @@#include <assert.h>-#ifdef WIN32+#ifdef _WIN32#include <io.h>#include <windows.h>#else@@ -291,7 +291,7 @@ static IMAGERGB *iopen(int fd, OpenMode openMode,tablesize = image->ysize * image->zsize * (int)sizeof(TINT32);lseek(f, 512L, 0);if (read(f, image->rowstart, tablesize) != tablesize) {-#ifdef WIN32+#ifdef _WIN32DWORD error;error = GetLastError();#endif@@ -302,7 +302,7 @@ static IMAGERGB *iopen(int fd, OpenMode openMode,if (image->dorev)cvtTINT32s(image->rowstart, tablesize);if (read(f, image->rowsize, tablesize) != tablesize) {-#ifdef WIN32+#ifdef _WIN32DWORD error;error = GetLastError();#endifdiff --git a/toonz/sources/image/tif/tiio_tif.cpp b/toonz/sources/image/tif/tiio_tif.cppindex 2864e59f6..1a7cbf509 100644--- a/toonz/sources/image/tif/tiio_tif.cpp+++ b/toonz/sources/image/tif/tiio_tif.cpp@@ -25,7 +25,7 @@ extern "C" {#include "tiio_tif.h"-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#include "windows.h"#endif@@ -658,7 +658,7 @@ Tiio::TifWriterProperties::TifWriterProperties(){m_byteOrdering.addValue(L"IBM PC");m_byteOrdering.addValue(L"Mac");-#ifdef WIN32+#ifdef _WIN32m_byteOrdering.setValue(L"IBM PC");#elsem_byteOrdering.setValue(L"Mac");diff --git a/toonz/sources/image/tiio.cpp b/toonz/sources/image/tiio.cppindex fd4a893ab..4507a632d 100644--- a/toonz/sources/image/tiio.cpp+++ b/toonz/sources/image/tiio.cpp@@ -17,7 +17,7 @@#include <math.h>//Platform-specific includes-#ifdef WIN32+#ifdef _WIN32#ifndef x64#define float_t Float_t@@ -153,14 +153,14 @@ void initImageIo(bool lightVersion)if (!lightVersion) {-#ifdef WIN32+#ifdef _WIN32TLevelWriter::define("avi", TLevelWriterAvi::create, true);TLevelReader::define("avi", TLevelReaderAvi::create);TFileType::declare("avi", TFileType::RASTER_LEVEL);Tiio::defineWriterProperties("avi", new Tiio::AviWriterProperties());-#endif // WIN32+#endif // _WIN32if (IsQuickTimeInstalled()) {TLevelWriter::define("mov", TLevelWriterMov::create, true);@@ -175,7 +175,7 @@ void initImageIo(bool lightVersion)}/*-#if (defined(WIN32) && !defined(x64))+#if (defined(_WIN32) && !defined(x64))TLevelWriter::define("pct", TLevelWriterPicPct::create, true);TLevelReader::define("pct", TLevelReaderPicPct::create);@@ -190,7 +190,7 @@ void initImageIo(bool lightVersion)TFileType::declare("pict", TFileType::RASTER_LEVEL);Tiio::defineWriterProperties("pict", new Tiio::PctWriterProperties());-#endif // WIN32 && 32-bit+#endif // _WIN32 && 32-bit*/}}diff --git a/toonz/sources/image/tzp/avl.c b/toonz/sources/image/tzp/avl.cindex f7a93044d..8e4999b54 100644--- a/toonz/sources/image/tzp/avl.c+++ b/toonz/sources/image/tzp/avl.c@@ -8,7 +8,7 @@| |*----------------------------------------------------------------------------*/-#ifdef WIN32+#ifdef _WIN32#pragma warning(push)#pragma warning(disable : 4113)#pragma warning(disable : 4996)diff --git a/toonz/sources/image/tzp/tiio_plt.cpp b/toonz/sources/image/tzp/tiio_plt.cppindex 019631ba3..a10beb6fb 100644--- a/toonz/sources/image/tzp/tiio_plt.cpp+++ b/toonz/sources/image/tzp/tiio_plt.cpp@@ -7,7 +7,7 @@#include "tiffio.h"-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#include "windows.h"#endifdiff --git a/toonz/sources/image/tzp/tiio_tzp.cpp b/toonz/sources/image/tzp/tiio_tzp.cppindex 80213dd5d..84d9c4aac 100644--- a/toonz/sources/image/tzp/tiio_tzp.cpp+++ b/toonz/sources/image/tzp/tiio_tzp.cpp@@ -11,7 +11,7 @@//#include "tspecialstyleid.h"#include <set>-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#include "windows.h"#endifdiff --git a/toonz/sources/include/ext/Potential.h b/toonz/sources/include/ext/Potential.hindex 35fbb6c5e..d8d224eda 100644--- a/toonz/sources/include/ext/Potential.h+++ b/toonz/sources/include/ext/Potential.h@@ -25,7 +25,7 @@class TStroke;-#if defined(WIN32) && (_MSC_VER <= 1200)+#if defined(_WIN32) && (_MSC_VER <= 1200)// to avoid annoying warning#pragma warning(push)#pragma warning(disable : 4290)@@ -96,7 +96,7 @@ public:};}-#if defined(WIN32) && (_MSC_VER <= 1200)+#if defined(_WIN32) && (_MSC_VER <= 1200)#pragma warning(pop)#endifdiff --git a/toonz/sources/include/ext/StrokeDeformation.h b/toonz/sources/include/ext/StrokeDeformation.hindex d4a306b30..19ac29b19 100644--- a/toonz/sources/include/ext/StrokeDeformation.h+++ b/toonz/sources/include/ext/StrokeDeformation.h@@ -30,7 +30,7 @@class TStroke;-#if defined(WIN32) && (_MSC_VER <= 1200)+#if defined(_WIN32) && (_MSC_VER <= 1200)// to avoid annoying warning#pragma warning(push)#pragma warning(disable : 4251)@@ -197,7 +197,7 @@ public:};}-#if defined(WIN32) && (_MSC_VER <= 1200)+#if defined(_WIN32) && (_MSC_VER <= 1200)#pragma warning(pop)#endifdiff --git a/toonz/sources/include/ext/StrokeDeformationImpl.h b/toonz/sources/include/ext/StrokeDeformationImpl.hindex febf72f3b..693c4a1fd 100644--- a/toonz/sources/include/ext/StrokeDeformationImpl.h+++ b/toonz/sources/include/ext/StrokeDeformationImpl.h@@ -21,7 +21,7 @@#include "ExtUtil.h"-#if defined(WIN32) && (_MSC_VER <= 1200)+#if defined(_WIN32) && (_MSC_VER <= 1200)// to avoid annoying warning#pragma warning(push)#pragma warning(disable : 4251)@@ -194,7 +194,7 @@ public:};}-#if defined(WIN32) && (_MSC_VER <= 1200)+#if defined(_WIN32) && (_MSC_VER <= 1200)#pragma warning(pop)#endifdiff --git a/toonz/sources/include/ext/StrokeParametricDeformer.h b/toonz/sources/include/ext/StrokeParametricDeformer.hindex abd321802..b32414ab9 100644--- a/toonz/sources/include/ext/StrokeParametricDeformer.h+++ b/toonz/sources/include/ext/StrokeParametricDeformer.h@@ -20,7 +20,7 @@#define DVVAR DV_IMPORT_VAR#endif-#if defined(WIN32) && (_MSC_VER <= 1200)+#if defined(_WIN32) && (_MSC_VER <= 1200)// to avoid annoying warning#pragma warning(push)#pragma warning(disable : 4290)@@ -154,7 +154,7 @@ private:};}-#if defined(WIN32) && (_MSC_VER <= 1200)+#if defined(_WIN32) && (_MSC_VER <= 1200)#pragma warning(pop)#endifdiff --git a/toonz/sources/include/ext/Types.h b/toonz/sources/include/ext/Types.hindex bd1ccfeb0..6a101a443 100644--- a/toonz/sources/include/ext/Types.h+++ b/toonz/sources/include/ext/Types.h@@ -24,7 +24,7 @@#include <stdexcept>#include <iostream>-#if defined(WIN32) && (_MSC_VER <= 1200)+#if defined(_WIN32) && (_MSC_VER <= 1200)// to avoid annoying warning#pragma warning(push)#pragma warning(disable : 4290)@@ -127,7 +127,7 @@ public:};}-#if defined(WIN32) && (_MSC_VER <= 1200)+#if defined(_WIN32) && (_MSC_VER <= 1200)#pragma warning(pop)#endifdiff --git a/toonz/sources/include/ext/plasticskeleton.h b/toonz/sources/include/ext/plasticskeleton.hindex 774ce798f..17fc47a8f 100644--- a/toonz/sources/include/ext/plasticskeleton.h+++ b/toonz/sources/include/ext/plasticskeleton.h@@ -152,7 +152,7 @@ private://===============================================================================-#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<PlasticSkeleton>;#endifdiff --git a/toonz/sources/include/ext/plasticskeletondeformation.h b/toonz/sources/include/ext/plasticskeletondeformation.hindex 17dad65d0..5776bab29 100644--- a/toonz/sources/include/ext/plasticskeletondeformation.h+++ b/toonz/sources/include/ext/plasticskeletondeformation.h@@ -251,7 +251,7 @@ typedef PlasticSkeletonDeformation SkD;//===============================================================================-#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<PlasticSkeletonDeformation>;#endifdiff --git a/toonz/sources/include/movsettings.h b/toonz/sources/include/movsettings.hindex a6eb7fb18..b75e0e35a 100644--- a/toonz/sources/include/movsettings.h+++ b/toonz/sources/include/movsettings.h@@ -15,7 +15,7 @@#if !(defined(x64) || defined(__LP64__))-#ifdef WIN32+#ifdef _WIN32#define list List#define map Map@@ -44,7 +44,7 @@//#include "tlevel_io.h"#include "tproperty.h"-#else //WIN32+#else // _WIN32#define list List#define map Map@@ -60,7 +60,7 @@#undef iterator#undef float_t-#endif //!WIN32+#endif // !_WIN32void DVAPI fromPropertiesToAtoms(TPropertyGroup &pg, QTAtomContainer &atoms);void DVAPI fromAtomsToProperties(const QTAtomContainer &atoms, TPropertyGroup &pg);diff --git a/toonz/sources/include/t32bitsrv_wrap.h b/toonz/sources/include/t32bitsrv_wrap.hindex 5e2a6da33..d12fc104b 100644--- a/toonz/sources/include/t32bitsrv_wrap.h+++ b/toonz/sources/include/t32bitsrv_wrap.h@@ -44,7 +44,7 @@ static QString srvName()return name;}-#ifdef WIN32+#ifdef _WIN32static QString srvCmdline(){static QString cmd("srv/t32bitsrv.exe " + srvName());diff --git a/toonz/sources/include/tatomicvar.h b/toonz/sources/include/tatomicvar.hindex a95ca8dff..9be77242e 100644--- a/toonz/sources/include/tatomicvar.h+++ b/toonz/sources/include/tatomicvar.h@@ -13,7 +13,7 @@#define DVVAR DV_IMPORT_VAR#endif-#ifdef WIN32+#ifdef _WIN32#include <windows.h>#elif defined(__sgi)#include <sys/atomic_ops.h>@@ -227,7 +227,7 @@ public:long operator++(){-#ifdef WIN32+#ifdef _WIN32return InterlockedIncrement(&m_var);#elif defined(__sgi)return ++m_var;@@ -244,7 +244,7 @@ public:long operator+=(long value){-#ifdef WIN32+#ifdef _WIN32InterlockedExchangeAdd(&m_var, value);return m_var;@@ -266,7 +266,7 @@ public:long operator--(){-#ifdef WIN32+#ifdef _WIN32return InterlockedDecrement(&m_var);#elif defined(__sgi)return --m_var;@@ -300,7 +300,7 @@ public:#endif};-#ifdef WIN32+#ifdef _WIN32long m_var;#elif defined(__sgi)long m_var;diff --git a/toonz/sources/include/tcachedlevel.h b/toonz/sources/include/tcachedlevel.hindex 992ec4f15..82584af59 100644--- a/toonz/sources/include/tcachedlevel.h+++ b/toonz/sources/include/tcachedlevel.h@@ -7,7 +7,7 @@PER ORA SI PUO' USARE LA CACHE SOLO CON WINDOWS*/-#ifdef WIN32+#ifdef _WIN32#include <windows.h>#endif@@ -292,7 +292,7 @@ private:int m_viewFrameMin,m_viewFrameMax;-#ifdef WIN32+#ifdef _WIN32HANDLE m_hFile, m_hMap;LPVOID m_fileMapAddress;diff --git a/toonz/sources/include/tcolorstyles.h b/toonz/sources/include/tcolorstyles.hindex 2700dbca1..7aa65fed6 100644--- a/toonz/sources/include/tcolorstyles.h+++ b/toonz/sources/include/tcolorstyles.h@@ -362,7 +362,7 @@ protected://---------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TColorStyle>;#endiftypedef TSmartPointerT<TColorStyle> TColorStyleP;diff --git a/toonz/sources/include/tcolumnset.h b/toonz/sources/include/tcolumnset.hindex 534f4bb95..4a8b61368 100644--- a/toonz/sources/include/tcolumnset.h+++ b/toonz/sources/include/tcolumnset.h@@ -54,7 +54,7 @@ private://----------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TColumnHeader>;#endifdiff --git a/toonz/sources/include/tcommon.h b/toonz/sources/include/tcommon.hindex 9bd6950e7..134430fb2 100644--- a/toonz/sources/include/tcommon.h+++ b/toonz/sources/include/tcommon.h@@ -3,7 +3,7 @@#ifndef T_COMMON_INCLUDED#define T_COMMON_INCLUDED-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4786)#pragma warning(disable : 4251)#pragma warning(disable : 4146)@@ -137,7 +137,7 @@ typedef unsigned short USHORT;typedef short SHORT;typedef unsigned int UINT;-#ifndef WIN32+#ifndef _WIN32typedef unsigned char BYTE;#endif@@ -232,7 +232,7 @@ const int c_minint = ~c_maxint;const unsigned int c_maxuint = (unsigned int)(~0U);-#ifdef WIN32+#ifdef _WIN32#define DV_EXPORT_API __declspec(dllexport)#define DV_IMPORT_API __declspec(dllimport)#define DV_EXPORT_VAR __declspec(dllexport)@@ -244,7 +244,7 @@ const unsigned int c_maxuint = (unsigned int)(~0U);#define DV_IMPORT_VAR#endif-#ifdef WIN32+#ifdef _WIN32#define DV_ALIGNED(val) __declspec(align(val))#else#define DV_ALIGNED(val) __attribute__((aligned(val)))diff --git a/toonz/sources/include/tdata.h b/toonz/sources/include/tdata.hindex 9ca398085..d34d8f9a2 100644--- a/toonz/sources/include/tdata.h+++ b/toonz/sources/include/tdata.h@@ -19,7 +19,7 @@//-------------------------------------------------------------------class TData;-#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TData>;#endif@@ -55,7 +55,7 @@ public://--------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32#pragma warning(push)#pragma warning(disable : 4251)#endif@@ -72,7 +72,7 @@ public:TFilePath getFilePath(int i) const;};-#ifdef WIN32+#ifdef _WIN32#pragma warning(pop)#endifdiff --git a/toonz/sources/include/tdoubleparam.h b/toonz/sources/include/tdoubleparam.hindex 3cc51f642..c3917092c 100644--- a/toonz/sources/include/tdoubleparam.h+++ b/toonz/sources/include/tdoubleparam.h@@ -40,7 +40,7 @@ class Grammar;class CalculatorNodeVisitor;}-#ifdef WIN32+#ifdef _WIN32template class DVAPI TPersistDeclarationT<TDoubleParam>;#endifdiff --git a/toonz/sources/include/tfarmcontroller.h b/toonz/sources/include/tfarmcontroller.hindex d48467347..81faf5f17 100644--- a/toonz/sources/include/tfarmcontroller.h+++ b/toonz/sources/include/tfarmcontroller.h@@ -18,7 +18,7 @@ class TFilePath;#undef TFARMAPI#endif-#ifdef WIN32+#ifdef _WIN32#ifdef TFARM_EXPORTS#define TFARMAPI __declspec(dllexport)#elsediff --git a/toonz/sources/include/tfarmserver.h b/toonz/sources/include/tfarmserver.hindex 3470f0448..9e57f89fa 100644--- a/toonz/sources/include/tfarmserver.h+++ b/toonz/sources/include/tfarmserver.h@@ -15,7 +15,7 @@#undef TFARMAPI#endif-#ifdef WIN32+#ifdef _WIN32#ifdef TFARM_EXPORTS#define TFARMAPI __declspec(dllexport)#elsediff --git a/toonz/sources/include/tfarmtask.h b/toonz/sources/include/tfarmtask.hindex aa0529835..26346bd6a 100644--- a/toonz/sources/include/tfarmtask.h+++ b/toonz/sources/include/tfarmtask.h@@ -12,7 +12,7 @@#undef TFARMAPI#endif-#ifdef WIN32+#ifdef _WIN32#ifdef TFARM_EXPORTS#define TFARMAPI __declspec(dllexport)#elsediff --git a/toonz/sources/include/tfont.h b/toonz/sources/include/tfont.hindex 84763e73f..6487c362a 100644--- a/toonz/sources/include/tfont.h+++ b/toonz/sources/include/tfont.h@@ -54,7 +54,7 @@ private:friend class TFontManager;Impl *m_pimpl;-#ifdef WIN32+#ifdef _WIN32TFont(const LOGFONTW &, HDC hdc);#elseTFont(ATSUFontID, int size);diff --git a/toonz/sources/include/tfx.h b/toonz/sources/include/tfx.hindex 4be1eaa2a..dc6807df9 100644--- a/toonz/sources/include/tfx.h+++ b/toonz/sources/include/tfx.h@@ -361,7 +361,7 @@ public://===================================================================-#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TFx>;#endiftypedef TSmartPointerT<TFx> TFxP;diff --git a/toonz/sources/include/tgeometry.h b/toonz/sources/include/tgeometry.hindex d689575c9..28ac4a6b3 100644--- a/toonz/sources/include/tgeometry.h+++ b/toonz/sources/include/tgeometry.h@@ -105,7 +105,7 @@ inline ostream &operator<<(ostream &out, const TPointT<T> &p)typedef TPointT<int> TPoint, TPointI;typedef TPointT<double> TPointD;-#ifdef WIN32+#ifdef _WIN32template class DVAPI TPointT<int>;template class DVAPI TPointT<double>;#endif@@ -330,7 +330,7 @@ inline ostream &operator<<(ostream &out, const T3DPointT<T> &p)typedef T3DPointT<int> T3DPoint, T3DPointI;typedef T3DPointT<double> T3DPointD;-#ifdef WIN32+#ifdef _WIN32template class DVAPI T3DPointT<int>;template class DVAPI T3DPointT<double>;#endif@@ -618,7 +618,7 @@ inline ostream &operator<<(ostream &out, const TDimensionT<T> &p)return out << "(" << p.lx << ", " << p.ly << ")";}-#ifdef WIN32+#ifdef _WIN32template class DVAPI TDimensionT<int>;template class DVAPI TDimensionT<double>;#endif@@ -786,7 +786,7 @@ public:typedef TRectT<int> TRect, TRectI;typedef TRectT<double> TRectD;-#ifdef WIN32+#ifdef _WIN32template class DVAPI TRectT<int>;template class DVAPI TRectT<double>;#endifdiff --git a/toonz/sources/include/tgl.h b/toonz/sources/include/tgl.hindex c41a05fb9..6f3e3cc9e 100644--- a/toonz/sources/include/tgl.h+++ b/toonz/sources/include/tgl.h@@ -6,7 +6,7 @@//#include "tgeometry.h"#include "tmachine.h"-#ifdef WIN32+#ifdef _WIN32#include <windows.h>//#endif@@ -247,7 +247,7 @@ void DVAPI tglBuildMipmaps(std::vector<TRaster32P> &rasters,//------------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32typedef std::pair<HDC, HGLRC> TGlContext;#elsetypedef void *TGlContext;diff --git a/toonz/sources/include/timage.h b/toonz/sources/include/timage.hindex 39129df1c..de5fa3356 100644--- a/toonz/sources/include/timage.h+++ b/toonz/sources/include/timage.h@@ -86,7 +86,7 @@ private://--------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TImage>;#endifdiff --git a/toonz/sources/include/timage_io.h b/toonz/sources/include/timage_io.hindex 5918f94f3..ac80f00ff 100644--- a/toonz/sources/include/timage_io.h+++ b/toonz/sources/include/timage_io.h@@ -181,7 +181,7 @@ public://------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TImageReader>;#endif@@ -248,7 +248,7 @@ public://------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TImageWriter>;#endifdiff --git a/toonz/sources/include/timagecache.h b/toonz/sources/include/timagecache.hindex ec44926ef..a9f8f9413 100644--- a/toonz/sources/include/timagecache.h+++ b/toonz/sources/include/timagecache.h@@ -169,7 +169,7 @@ public://------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TCachedImage>;#endifdiff --git a/toonz/sources/include/tlevel.h b/toonz/sources/include/tlevel.hindex cf9b240f7..80d7ade7c 100644--- a/toonz/sources/include/tlevel.h+++ b/toonz/sources/include/tlevel.h@@ -72,7 +72,7 @@ public://--------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TLevel>;#endifdiff --git a/toonz/sources/include/tlevel_io.h b/toonz/sources/include/tlevel_io.hindex 15d34eac0..034a14199 100644--- a/toonz/sources/include/tlevel_io.h+++ b/toonz/sources/include/tlevel_io.h@@ -7,7 +7,7 @@#include "timage_io.h"#include "tproperty.h"-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4290)#pragma warning(disable : 4251)@@ -113,7 +113,7 @@ private://------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TLevelReader>;#endif@@ -221,7 +221,7 @@ public://------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TLevelWriter>;#endifdiff --git a/toonz/sources/include/tmacrofx.h b/toonz/sources/include/tmacrofx.hindex 9e200fee5..23f4496cc 100644--- a/toonz/sources/include/tmacrofx.h+++ b/toonz/sources/include/tmacrofx.h@@ -15,7 +15,7 @@#define DVVAR DV_IMPORT_VAR#endif-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4251)#endifdiff --git a/toonz/sources/include/tmeshimage.h b/toonz/sources/include/tmeshimage.hindex 5c84e1215..8d9132817 100644--- a/toonz/sources/include/tmeshimage.h+++ b/toonz/sources/include/tmeshimage.h@@ -145,7 +145,7 @@ public://------------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TTextureMesh>;#endif@@ -204,7 +204,7 @@ public://------------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TMeshImage>;template class DVAPI TDerivedSmartPointerT<TMeshImage, TImage>;#endif@@ -215,7 +215,7 @@ public:TMeshImageP() {}TMeshImageP(TMeshImage *image) : DerivedSmartPointer(image) {}TMeshImageP(TImageP image) : DerivedSmartPointer(image) {}-#if !defined(WIN32)+#if !defined(_WIN32)TMeshImageP(TImage *image) : DerivedSmartPointer(TImageP(image)){}diff --git a/toonz/sources/include/tnotanimatableparam.h b/toonz/sources/include/tnotanimatableparam.hindex b4cab5726..d44b5c2e4 100644--- a/toonz/sources/include/tnotanimatableparam.h+++ b/toonz/sources/include/tnotanimatableparam.h@@ -26,7 +26,7 @@// TNotAnimatableParamChange//------------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32#pragma warning(push)#pragma warning(disable : 4251)#endif@@ -185,7 +185,7 @@ public:////=========================================================-#ifdef WIN32+#ifdef _WIN32template class DVAPI TNotAnimatableParam<int>;class TIntParam;template class DVAPI TPersistDeclarationT<TIntParam>;@@ -220,7 +220,7 @@ DEFINE_PARAM_SMARTPOINTER(TIntParam, int)////=========================================================-#ifdef WIN32+#ifdef _WIN32template class DVAPI TNotAnimatableParam<bool>;class TBoolParam;template class DVAPI TPersistDeclarationT<TBoolParam>;@@ -248,7 +248,7 @@ DEFINE_PARAM_SMARTPOINTER(TBoolParam, bool)////=========================================================-#ifdef WIN32+#ifdef _WIN32template class DVAPI TNotAnimatableParam<TFilePath>;class TFilePathParam;template class DVAPI TPersistDeclarationT<TFilePathParam>;@@ -274,7 +274,7 @@ DEFINE_PARAM_SMARTPOINTER(TFilePathParam, TFilePath)////=========================================================-#ifdef WIN32+#ifdef _WIN32template class DVAPI TNotAnimatableParam<std::wstring>;class TStringParam;template class DVAPI TPersistDeclarationT<TStringParam>;@@ -358,7 +358,7 @@ public:////=========================================================-#ifdef WIN32+#ifdef _WIN32template class DVAPI TNotAnimatableParam<double>;class TNADoubleParam;template class DVAPI TPersistDeclarationT<TNADoubleParam>;@@ -457,7 +457,7 @@ TUndo *TNotAnimatableParamChange<T>::createUndo() const//------------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32#pragma warning(pop)#endifdiff --git a/toonz/sources/include/tnztypes.h b/toonz/sources/include/tnztypes.hindex 3e70dfc8d..b6ada7e19 100644--- a/toonz/sources/include/tnztypes.h+++ b/toonz/sources/include/tnztypes.h@@ -3,7 +3,7 @@#ifndef TNZTYPES_H#define TNZTYPES_H-#ifdef WIN32+#ifdef _WIN32#define TINT32 __int32typedef unsigned __int32 TUINT32;typedef __int64 TINT64;diff --git a/toonz/sources/include/tools/cursors.h b/toonz/sources/include/tools/cursors.hindex 3311174f1..0bfe01dc1 100644--- a/toonz/sources/include/tools/cursors.h+++ b/toonz/sources/include/tools/cursors.h@@ -14,7 +14,7 @@ enum {CURSOR_HOURGLASS,CURSOR_NO,CURSOR_DUMMY,-#ifndef WIN32+#ifndef _WIN32CURSOR_DND,CURSOR_QUESTION,#endifdiff --git a/toonz/sources/include/toonz/imagemanager.h b/toonz/sources/include/toonz/imagemanager.hindex 273c0560a..94aa6c05b 100644--- a/toonz/sources/include/toonz/imagemanager.h+++ b/toonz/sources/include/toonz/imagemanager.h@@ -262,7 +262,7 @@ private://------------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template class DV_EXPORT_API TSmartPointerT<ImageBuilder>;#endifdiff --git a/toonz/sources/include/toonz/tproject.h b/toonz/sources/include/toonz/tproject.hindex bd52fed09..7be64a306 100644--- a/toonz/sources/include/toonz/tproject.h+++ b/toonz/sources/include/toonz/tproject.h@@ -95,7 +95,7 @@ private:TProject &operator=(const TProject &);};-#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TProject>;#endiftypedef TSmartPointerT<TProject> TProjectP;diff --git a/toonz/sources/include/toonz/tstageobject.h b/toonz/sources/include/toonz/tstageobject.hindex 4d25db06a..12177fc25 100644--- a/toonz/sources/include/toonz/tstageobject.h+++ b/toonz/sources/include/toonz/tstageobject.h@@ -547,7 +547,7 @@ private://------------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TStageObject>;#endifdiff --git a/toonz/sources/include/toonz/tstageobjectspline.h b/toonz/sources/include/toonz/tstageobjectspline.hindex b2b46f9cc..345798d7b 100644--- a/toonz/sources/include/toonz/tstageobjectspline.h+++ b/toonz/sources/include/toonz/tstageobjectspline.h@@ -92,7 +92,7 @@ private:void updatePosPathKeyframes(TStroke *oldSpline, TStroke *newSpline);};-#ifdef WIN32+#ifdef _WIN32template class TSmartPointerT<TStageObjectSpline>;#endifdiff --git a/toonz/sources/include/toonz/txshchildlevel.h b/toonz/sources/include/toonz/txshchildlevel.hindex f2613c373..846db0e63 100644--- a/toonz/sources/include/toonz/txshchildlevel.h+++ b/toonz/sources/include/toonz/txshchildlevel.h@@ -92,7 +92,7 @@ private:TXshChildLevel &operator=(const TXshChildLevel &);};-#ifdef WIN32+#ifdef _WIN32template class DV_EXPORT_API TSmartPointerT<TXshChildLevel>;#endiftypedef TSmartPointerT<TXshChildLevel> TXshChildLevelP;diff --git a/toonz/sources/include/toonz/txshcolumn.h b/toonz/sources/include/toonz/txshcolumn.hindex 93f0a1660..29f4a9560 100644--- a/toonz/sources/include/toonz/txshcolumn.h+++ b/toonz/sources/include/toonz/txshcolumn.h@@ -232,7 +232,7 @@ public:void setColorTag(int colorTag) { m_colorTag = colorTag; } //Usato solo in tabkids};-#ifdef WIN32+#ifdef _WIN32template class DV_EXPORT_API TSmartPointerT<TXshColumn>;#endiftypedef TSmartPointerT<TXshColumn> TXshColumnP;diff --git a/toonz/sources/include/toonz/txsheet.h b/toonz/sources/include/toonz/txsheet.hindex ee91d067f..9e2104f48 100644--- a/toonz/sources/include/toonz/txsheet.h+++ b/toonz/sources/include/toonz/txsheet.h@@ -456,7 +456,7 @@ private://------------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TXsheet>;#endiftypedef TSmartPointerT<TXsheet> TXsheetP;diff --git a/toonz/sources/include/toonz/txshlevel.h b/toonz/sources/include/toonz/txshlevel.hindex 6d04bd5b9..7ac5b88e0 100644--- a/toonz/sources/include/toonz/txshlevel.h+++ b/toonz/sources/include/toonz/txshlevel.h@@ -146,7 +146,7 @@ private:TXshLevel &operator=(const TXshLevel &);};-#ifdef WIN32+#ifdef _WIN32template class DV_EXPORT_API TSmartPointerT<TXshLevel>;#endifdiff --git a/toonz/sources/include/toonz/txshlevelcolumn.h b/toonz/sources/include/toonz/txshlevelcolumn.hindex 1a1c5c28c..fb2be4809 100644--- a/toonz/sources/include/toonz/txshlevelcolumn.h+++ b/toonz/sources/include/toonz/txshlevelcolumn.h@@ -90,7 +90,7 @@ private:TXshLevelColumn &operator=(const TXshLevelColumn &);};-#ifdef WIN32+#ifdef _WIN32template class DV_EXPORT_API TSmartPointerT<TXshLevelColumn>;#endifdiff --git a/toonz/sources/include/toonz/txshmeshcolumn.h b/toonz/sources/include/toonz/txshmeshcolumn.hindex d31129b5e..e7b88d56a 100644--- a/toonz/sources/include/toonz/txshmeshcolumn.h+++ b/toonz/sources/include/toonz/txshmeshcolumn.h@@ -44,7 +44,7 @@ private://----------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TXshMeshColumn>;#endifdiff --git a/toonz/sources/include/toonz/txshpalettecolumn.h b/toonz/sources/include/toonz/txshpalettecolumn.hindex e633aeaf1..70e880239 100644--- a/toonz/sources/include/toonz/txshpalettecolumn.h+++ b/toonz/sources/include/toonz/txshpalettecolumn.h@@ -56,7 +56,7 @@ private:TXshPaletteColumn &operator=(const TXshPaletteColumn &);};-#ifdef WIN32+#ifdef _WIN32template class TSmartPointerT<TXshPaletteColumn>;#endifdiff --git a/toonz/sources/include/toonz/txshpalettelevel.h b/toonz/sources/include/toonz/txshpalettelevel.hindex 3f147143f..494e2a0a1 100644--- a/toonz/sources/include/toonz/txshpalettelevel.h+++ b/toonz/sources/include/toonz/txshpalettelevel.h@@ -106,7 +106,7 @@ private:TXshPaletteLevel &operator=(const TXshPaletteLevel &);};-#ifdef WIN32+#ifdef _WIN32template class DV_EXPORT_API TSmartPointerT<TXshPaletteLevel>;#endiftypedef TSmartPointerT<TXshPaletteLevel> TXshPaletteLevelP;diff --git a/toonz/sources/include/toonz/txshsimplelevel.h b/toonz/sources/include/toonz/txshsimplelevel.hindex 93eadb145..253478df8 100644--- a/toonz/sources/include/toonz/txshsimplelevel.h+++ b/toonz/sources/include/toonz/txshsimplelevel.h@@ -361,7 +361,7 @@ private://=====================================================================================-#ifdef WIN32+#ifdef _WIN32template class DV_EXPORT_API TSmartPointerT<TXshSimpleLevel>;#endiftypedef TSmartPointerT<TXshSimpleLevel> TXshSimpleLevelP;diff --git a/toonz/sources/include/toonz/txshsoundcolumn.h b/toonz/sources/include/toonz/txshsoundcolumn.hindex 4a62f9271..f121bd6f3 100644--- a/toonz/sources/include/toonz/txshsoundcolumn.h+++ b/toonz/sources/include/toonz/txshsoundcolumn.h@@ -149,7 +149,7 @@ protected slots:void onTimerOut();};-#ifdef WIN32+#ifdef _WIN32template class DV_EXPORT_API TSmartPointerT<TXshSoundColumn>;#endiftypedef TSmartPointerT<TXshSoundColumn> TXshSoundColumnP;diff --git a/toonz/sources/include/toonz/txshsoundlevel.h b/toonz/sources/include/toonz/txshsoundlevel.hindex 9340f3af9..9f4608c4e 100644--- a/toonz/sources/include/toonz/txshsoundlevel.h+++ b/toonz/sources/include/toonz/txshsoundlevel.h@@ -93,7 +93,7 @@ private:TXshSoundLevel &operator=(const TXshSoundLevel &);};-#ifdef WIN32+#ifdef _WIN32template class DV_EXPORT_API TSmartPointerT<TXshSoundLevel>;#endiftypedef TSmartPointerT<TXshSoundLevel> TXshSoundLevelP;diff --git a/toonz/sources/include/toonz/txshsoundtextcolumn.h b/toonz/sources/include/toonz/txshsoundtextcolumn.hindex bed8dfff2..fb7c88b3f 100644--- a/toonz/sources/include/toonz/txshsoundtextcolumn.h+++ b/toonz/sources/include/toonz/txshsoundtextcolumn.h@@ -44,7 +44,7 @@ public:void saveData(TOStream &os);};-#ifdef WIN32+#ifdef _WIN32template class DV_EXPORT_API TSmartPointerT<TXshSoundTextColumn>;#endiftypedef TSmartPointerT<TXshSoundTextColumn> TXshSoundTextColumnP;diff --git a/toonz/sources/include/toonz/txshsoundtextlevel.h b/toonz/sources/include/toonz/txshsoundtextlevel.hindex e9cfac8b2..17be83ba4 100644--- a/toonz/sources/include/toonz/txshsoundtextlevel.h+++ b/toonz/sources/include/toonz/txshsoundtextlevel.h@@ -55,7 +55,7 @@ private:TXshSoundTextLevel &operator=(const TXshSoundTextLevel &);};-#ifdef WIN32+#ifdef _WIN32template class DV_EXPORT_API TSmartPointerT<TXshSoundTextLevel>;#endiftypedef TSmartPointerT<TXshSoundTextLevel> TXshSoundTextLevelP;diff --git a/toonz/sources/include/toonz/txshzeraryfxcolumn.h b/toonz/sources/include/toonz/txshzeraryfxcolumn.hindex 6be833d37..37f73182a 100644--- a/toonz/sources/include/toonz/txshzeraryfxcolumn.h+++ b/toonz/sources/include/toonz/txshzeraryfxcolumn.h@@ -85,7 +85,7 @@ private:TXshZeraryFxColumn &operator=(const TXshZeraryFxColumn &);};-#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TXshZeraryFxColumn>;#endifdiff --git a/toonz/sources/include/toonzqt/camerasettingswidget.h b/toonz/sources/include/toonzqt/camerasettingswidget.hindex 9b863bed3..529de4f13 100644--- a/toonz/sources/include/toonzqt/camerasettingswidget.h+++ b/toonz/sources/include/toonzqt/camerasettingswidget.h@@ -3,7 +3,7 @@#ifndef CAMERASETTINGSWIDGET_H#define CAMERASETTINGSWIDGET_H-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4251)#endifdiff --git a/toonz/sources/include/toonzqt/cleanupcamerasettingswidget.h b/toonz/sources/include/toonzqt/cleanupcamerasettingswidget.hindex eee872c40..03d2047c5 100644--- a/toonz/sources/include/toonzqt/cleanupcamerasettingswidget.h+++ b/toonz/sources/include/toonzqt/cleanupcamerasettingswidget.h@@ -3,7 +3,7 @@#ifndef CLEANUPCAMERASETTINGSWIDGET_H#define CLEANUPCAMERASETTINGSWIDGET_H-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4251)#endifdiff --git a/toonz/sources/include/toonzqt/colorfield.h b/toonz/sources/include/toonzqt/colorfield.hindex 83cb8d0c4..f0abda3a1 100644--- a/toonz/sources/include/toonzqt/colorfield.h+++ b/toonz/sources/include/toonzqt/colorfield.h@@ -3,7 +3,7 @@#ifndef COLORFIELD_H#define COLORFIELD_H-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4251)#endifdiff --git a/toonz/sources/include/toonzqt/combohistogram.h b/toonz/sources/include/toonzqt/combohistogram.hindex 7f4f9dcb0..e65f2eda8 100644--- a/toonz/sources/include/toonzqt/combohistogram.h+++ b/toonz/sources/include/toonzqt/combohistogram.h@@ -19,7 +19,7 @@#define DVVAR DV_IMPORT_VAR#endif-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4251)#endifdiff --git a/toonz/sources/include/toonzqt/dvdialog.h b/toonz/sources/include/toonzqt/dvdialog.hindex b3bf8574f..fabd4cf54 100644--- a/toonz/sources/include/toonzqt/dvdialog.h+++ b/toonz/sources/include/toonzqt/dvdialog.h@@ -34,7 +34,7 @@ class QLabel;class TXsheetHandle;class TPalette;-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4251)#endifdiff --git a/toonz/sources/include/toonzqt/dvtextedit.h b/toonz/sources/include/toonzqt/dvtextedit.hindex 2b0f67e04..63310bd93 100644--- a/toonz/sources/include/toonzqt/dvtextedit.h+++ b/toonz/sources/include/toonzqt/dvtextedit.h@@ -3,7 +3,7 @@#ifndef DVTEXTEDIT_H#define DVTEXTEDIT_H-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4251)#endifdiff --git a/toonz/sources/include/toonzqt/fxsettings.h b/toonz/sources/include/toonzqt/fxsettings.hindex 1f2d5904a..fbec7b302 100644--- a/toonz/sources/include/toonzqt/fxsettings.h+++ b/toonz/sources/include/toonzqt/fxsettings.h@@ -3,7 +3,7 @@#ifndef FXSETTINGS_H#define FXSETTINGS_H-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4251)#endifdiff --git a/toonz/sources/include/toonzqt/histogram.h b/toonz/sources/include/toonzqt/histogram.hindex 15a7007f3..599bec84c 100644--- a/toonz/sources/include/toonzqt/histogram.h+++ b/toonz/sources/include/toonzqt/histogram.h@@ -21,7 +21,7 @@#define DVVAR DV_IMPORT_VAR#endif-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4251)#endifdiff --git a/toonz/sources/include/toonzqt/paramfield.h b/toonz/sources/include/toonzqt/paramfield.hindex a73236fa7..047e1e617 100644--- a/toonz/sources/include/toonzqt/paramfield.h+++ b/toonz/sources/include/toonzqt/paramfield.h@@ -3,7 +3,7 @@#ifndef PARAMFIELD_H#define PARAMFIELD_H-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4251)#endifdiff --git a/toonz/sources/include/toonzqt/swatchviewer.h b/toonz/sources/include/toonzqt/swatchviewer.hindex 5ac3151e1..7cd8f5ee0 100644--- a/toonz/sources/include/toonzqt/swatchviewer.h+++ b/toonz/sources/include/toonzqt/swatchviewer.h@@ -3,7 +3,7 @@#ifndef SWATCHVIEWER_H#define SWATCHVIEWER_H-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4251)#endifdiff --git a/toonz/sources/include/toonzqt/tabbar.h b/toonz/sources/include/toonzqt/tabbar.hindex 0b2b0334b..a2170b84c 100644--- a/toonz/sources/include/toonzqt/tabbar.h+++ b/toonz/sources/include/toonzqt/tabbar.h@@ -16,7 +16,7 @@#define DVVAR DV_IMPORT_VAR#endif-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4251)#endifdiff --git a/toonz/sources/include/tpalette.h b/toonz/sources/include/tpalette.hindex f641467cf..6d506f9d6 100644--- a/toonz/sources/include/tpalette.h+++ b/toonz/sources/include/tpalette.h@@ -23,7 +23,7 @@#define DVVAR DV_IMPORT_VAR#endif-#ifdef WIN32+#ifdef _WIN32#pragma warning(push)#pragma warning(disable : 4251)#endif@@ -315,13 +315,13 @@ private://--------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TPalette>;#endif//--------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32#pragma warning(pop)#endifdiff --git a/toonz/sources/include/tparam.h b/toonz/sources/include/tparam.hindex 639861ab6..dc34bade3 100644--- a/toonz/sources/include/tparam.h+++ b/toonz/sources/include/tparam.h@@ -153,14 +153,14 @@ private://----------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TParam>;#endiftypedef TSmartPointerT<TParam> TParamP;//=========================================================-#ifdef WIN32+#ifdef _WIN32#define DVAPI_PARAM_SMARTPOINTER(PARAM) \template class DVAPI TSmartPointerT<PARAM>; \template class DVAPI TDerivedSmartPointerT<PARAM, TParam>;diff --git a/toonz/sources/include/tparamset.h b/toonz/sources/include/tparamset.hindex 9b1337597..8b68c2aa0 100644--- a/toonz/sources/include/tparamset.h+++ b/toonz/sources/include/tparamset.h@@ -42,7 +42,7 @@ public://-------------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32#pragma warning(push)#pragma warning(disable : 4251)#endif@@ -107,11 +107,11 @@ private:TParamSetImp *m_imp;};-#ifdef WIN32+#ifdef _WIN32#pragma warning(pop)#endif-#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TParamSet>;template class DVAPI TDerivedSmartPointerT<TParamSet, TParam>;#endif@@ -131,7 +131,7 @@ public://-------------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32class TPointParam;template class DVAPI TPersistDeclarationT<TPointParam>;#endif@@ -173,7 +173,7 @@ DEFINE_PARAM_SMARTPOINTER(TPointParam, TPointD)//-------------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32class TPixelParam;template class DVAPI TPersistDeclarationT<TPixelParam>;#endif@@ -240,7 +240,7 @@ public://-------------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32class TRangeParam;template class DVAPI TPersistDeclarationT<TRangeParam>;#endifdiff --git a/toonz/sources/include/tpixel.h b/toonz/sources/include/tpixel.hindex 4014f18c6..a866945a7 100644--- a/toonz/sources/include/tpixel.h+++ b/toonz/sources/include/tpixel.h@@ -160,7 +160,7 @@ public:undefined machine order !!!!#endif-#ifdef WIN32+#ifdef _WIN32TPixelRGBM64() : r(0), g(0), b(0), m(maxChannelValue){};TPixelRGBM64(int rr, int gg, int bb, int mm = maxChannelValue): r(rr), g(gg), b(bb), m(mm){};diff --git a/toonz/sources/include/tpluginmanager.h b/toonz/sources/include/tpluginmanager.hindex 9aa65987d..e4c01f6d2 100644--- a/toonz/sources/include/tpluginmanager.h+++ b/toonz/sources/include/tpluginmanager.h@@ -55,7 +55,7 @@ public://// L'entry point del plugin e' TLIBMAIN {....}//-#ifdef WIN32+#ifdef _WIN32#define TLIBMAIN \extern "C" __declspec(dllexport) \const TPluginInfo * \diff --git a/toonz/sources/include/tproperty.h b/toonz/sources/include/tproperty.hindex f844562f6..98cc3fb14 100644--- a/toonz/sources/include/tproperty.h+++ b/toonz/sources/include/tproperty.h@@ -16,7 +16,7 @@#define DVVAR DV_IMPORT_VAR#endif-#ifdef WIN32+#ifdef _WIN32#pragma warning(push)#pragma warning(disable : 4251)#endif@@ -163,7 +163,7 @@ private:};//----------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template class DVAPI TRangeProperty<int>;template class DVAPI TRangeProperty<double>;#endif@@ -503,7 +503,7 @@ private://----------------------------------------------------------#ifdef WIN32+#ifdef _WIN32#pragma warning(pop)#endifdiff --git a/toonz/sources/include/traster.h b/toonz/sources/include/traster.hindex cc35663b2..9596a0dd4 100644--- a/toonz/sources/include/traster.h+++ b/toonz/sources/include/traster.h@@ -212,7 +212,7 @@ private:// Smart Pointer a TRaster//-#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TRaster>;#endif@@ -440,7 +440,7 @@ inline TRasterPT<T>::TRasterPT(int lx, int ly, int wrap, T *buffer, bool bufferO//----------------------------------------------------------#ifdef WIN32+#ifdef _WIN32// su NT e' necessario per evitare un warning nelle classi// esportate che si riferiscono a TRaster32P/TRaster64P// su IRIX non compila perche' non riesce ad instanziare lediff --git a/toonz/sources/include/trastercm.h b/toonz/sources/include/trastercm.hindex 513c239e0..852d9732b 100644--- a/toonz/sources/include/trastercm.h+++ b/toonz/sources/include/trastercm.h@@ -18,7 +18,7 @@typedef TRasterT<TPixelCM32> TRasterCM32;-#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TRasterT<TPixelCM32>>;template class DVAPI TRasterPT<TPixelCM32>;#endifdiff --git a/toonz/sources/include/trasterfx.h b/toonz/sources/include/trasterfx.hindex 94f9f47af..92778fa05 100644--- a/toonz/sources/include/trasterfx.h+++ b/toonz/sources/include/trasterfx.h@@ -20,7 +20,7 @@#define DVVAR DV_IMPORT_VAR#endif-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4251)#endif@@ -266,7 +266,7 @@ public://--------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TRasterFx>;template class DVAPI TDerivedSmartPointerT<TRasterFx, TFx>;#endif@@ -285,7 +285,7 @@ public://===================================================================-#ifdef WIN32+#ifdef _WIN32template class DVAPI TFxPortT<TRasterFx>;#endiftypedef TFxPortT<TRasterFx> TRasterFxPort;@@ -321,7 +321,7 @@ public://--------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TGeometryFx>;template class DVAPI TDerivedSmartPointerT<TGeometryFx, TFx>;#endif@@ -343,7 +343,7 @@ public://===================================================================-#ifdef WIN32+#ifdef _WIN32template class DVAPI TFxPortT<TGeometryFx>;#endif@@ -409,12 +409,12 @@ void DVAPI removeRenderCache(const std::string &alias);//--------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32#pragma warning(push)#pragma warning(disable : 4251)#endif-#ifdef WIN32+#ifdef _WIN32#pragma warning(pop)#endifdiff --git a/toonz/sources/include/trasterimage.h b/toonz/sources/include/trasterimage.hindex fc62a454a..90bd423a0 100644--- a/toonz/sources/include/trasterimage.h+++ b/toonz/sources/include/trasterimage.h@@ -146,7 +146,7 @@ public://--------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TRasterImage>;template class DVAPI TDerivedSmartPointerT<TRasterImage, TImage>;#endifdiff --git a/toonz/sources/include/tregion.h b/toonz/sources/include/tregion.hindex 2ac3e02a5..8c849b823 100644--- a/toonz/sources/include/tregion.h+++ b/toonz/sources/include/tregion.h@@ -150,7 +150,7 @@ private:};/*-#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TEdge>;#endifdiff --git a/toonz/sources/include/trop_borders.h b/toonz/sources/include/trop_borders.hindex c58359eed..f98735b5c 100644--- a/toonz/sources/include/trop_borders.h+++ b/toonz/sources/include/trop_borders.h@@ -147,7 +147,7 @@ class ImageMesh : public TSmartObject, public tcg::Mesh<Vertex, Edge, Face>//---------------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template class TSmartPointerT<ImageMesh>;#endiftypedef TSmartPointerT<ImageMesh> ImageMeshP;diff --git a/toonz/sources/include/tscanner.h b/toonz/sources/include/tscanner.hindex 4444c744d..f34b7c3d0 100644--- a/toonz/sources/include/tscanner.h+++ b/toonz/sources/include/tscanner.h@@ -3,7 +3,7 @@#ifndef TSCANNER_H#define TSCANNER_H-#ifdef WIN32+#ifdef _WIN32#define NOMINMAX#endifdiff --git a/toonz/sources/include/tsound.h b/toonz/sources/include/tsound.hindex 192080595..0000b0d98 100644--- a/toonz/sources/include/tsound.h+++ b/toonz/sources/include/tsound.h@@ -35,7 +35,7 @@ const int RIGHT = LEFT + 1;class TSoundTrack;class TSoundTransform;-#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TSoundTrack>;#endifdiff --git a/toonz/sources/include/tsound_io.h b/toonz/sources/include/tsound_io.hindex 52cbbba3e..1f992008a 100644--- a/toonz/sources/include/tsound_io.h+++ b/toonz/sources/include/tsound_io.h@@ -54,7 +54,7 @@ public:TSoundTrackReaderCreateProc *proc);};-#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TSoundTrackReader>;#endif@@ -98,7 +98,7 @@ public:TSoundTrackWriterCreateProc *proc);};-#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TSoundTrackWriter>;#endifdiff --git a/toonz/sources/include/tsound_t.h b/toonz/sources/include/tsound_t.hindex 9f4690b3d..f22de2499 100644--- a/toonz/sources/include/tsound_t.h+++ b/toonz/sources/include/tsound_t.h@@ -164,7 +164,7 @@ public://!Applies a trasformation (echo, reverb, ect) to the object and returns the transformed soundtrack#if defined(MACOSX) || defined(LINUX)TSoundTrackP apply(TSoundTransform *transform);-#else // WIN32+#else // _WIN32TSoundTrackP apply(TSoundTransform *transform){assert(transform);@@ -392,7 +392,7 @@ public://==============================================================================-#ifdef WIN32+#ifdef _WIN32template class DVAPI TSoundTrackT<TMono8SignedSample>;template class DVAPI TSoundTrackT<TMono8UnsignedSample>;template class DVAPI TSoundTrackT<TStereo8SignedSample>;diff --git a/toonz/sources/include/tspectrum.h b/toonz/sources/include/tspectrum.hindex d8fa40fb3..2a947497e 100644--- a/toonz/sources/include/tspectrum.h+++ b/toonz/sources/include/tspectrum.h@@ -16,7 +16,7 @@#define DVVAR DV_IMPORT_VAR#endif-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4251)#endif@@ -193,7 +193,7 @@ public:}};-#ifdef WIN32+#ifdef _WIN32template class DVAPI TSpectrumT<TPixel32>;template class DVAPI TSpectrumT<TPixel64>;#endif@@ -201,7 +201,7 @@ template class DVAPI TSpectrumT<TPixel64>;typedef TSpectrumT<TPixel32> TSpectrum;typedef TSpectrumT<TPixel64> TSpectrum64;-#ifdef WIN32+#ifdef _WIN32#pragma warning(default : 4251)#endifdiff --git a/toonz/sources/include/tspectrumparam.h b/toonz/sources/include/tspectrumparam.hindex 6ea7433b8..5627e2e63 100644--- a/toonz/sources/include/tspectrumparam.h+++ b/toonz/sources/include/tspectrumparam.h@@ -26,7 +26,7 @@ class TPixelParamP;//=============================================================-#ifdef WIN32+#ifdef _WIN32class TSpectrumParam;template class DVAPI TPersistDeclarationT<TSpectrumParam>;#endif@@ -93,7 +93,7 @@ public:double keyframeIndexToFrame(int index) const;};-#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TSpectrumParam>;template class DVAPI TDerivedSmartPointerT<TSpectrumParam, TParam>;#endifdiff --git a/toonz/sources/include/tstepparam.h b/toonz/sources/include/tstepparam.hindex 61b9156be..35c46325e 100644--- a/toonz/sources/include/tstepparam.h+++ b/toonz/sources/include/tstepparam.h@@ -24,7 +24,7 @@#endifclass TDoubleStepParam;-#ifdef WIN32+#ifdef _WIN32template class DVAPI TPersistDeclarationT<TDoubleStepParam>;#endifdiff --git a/toonz/sources/include/tstopwatch.h b/toonz/sources/include/tstopwatch.hindex 141ab1d32..e15b4e0f3 100644--- a/toonz/sources/include/tstopwatch.h+++ b/toonz/sources/include/tstopwatch.h@@ -58,7 +58,7 @@ class DVAPI TStopWatchSTART_USER m_startUser; //process starting reference time (unit=100-nanosecond)START_SYSTEM m_startSystem; //system starting reference time (unit=100-nanosecond)-#ifdef WIN32+#ifdef _WIN32LARGE_INTEGER m_hrStart; // high resolution starting reference (total) time#endifdiff --git a/toonz/sources/include/tstrokeoutline.h b/toonz/sources/include/tstrokeoutline.hindex 952910d94..b57012877 100644--- a/toonz/sources/include/tstrokeoutline.h+++ b/toonz/sources/include/tstrokeoutline.h@@ -18,7 +18,7 @@#define DVVAR DV_IMPORT_VAR#endif-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4251)#endifdiff --git a/toonz/sources/include/tsystem.h b/toonz/sources/include/tsystem.hindex b7209d478..ec888ef1f 100644--- a/toonz/sources/include/tsystem.h+++ b/toonz/sources/include/tsystem.h@@ -5,7 +5,7 @@//#include "texception.h"-#ifndef WIN32+#ifndef _WIN32#include <sys/stat.h>#endifdiff --git a/toonz/sources/include/ttokenizer.h b/toonz/sources/include/ttokenizer.hindex cd20ea790..9a70ad306 100644--- a/toonz/sources/include/ttokenizer.h+++ b/toonz/sources/include/ttokenizer.h@@ -5,7 +5,7 @@#include "tcommon.h"-#ifdef WIN32+#ifdef _WIN32#pragma warning(push)#pragma warning(disable : 4251)#endif@@ -107,7 +107,7 @@ public:} // namespace TSyntax-#ifdef WIN32+#ifdef _WIN32#pragma warning(pop)#endifdiff --git a/toonz/sources/include/ttonecurveparam.h b/toonz/sources/include/ttonecurveparam.hindex 6f40f0392..f09ada7ec 100644--- a/toonz/sources/include/ttonecurveparam.h+++ b/toonz/sources/include/ttonecurveparam.h@@ -10,7 +10,7 @@#include <QList>-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4251)#endif@@ -99,7 +99,7 @@ public:void saveData(TOStream &os);};-#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TToneCurveParam>;template class DVAPI TDerivedSmartPointerT<TToneCurveParam, TParam>;#endifdiff --git a/toonz/sources/include/ttoonzimage.h b/toonz/sources/include/ttoonzimage.hindex c84faf59c..0dd93d219 100644--- a/toonz/sources/include/ttoonzimage.h+++ b/toonz/sources/include/ttoonzimage.h@@ -120,7 +120,7 @@ private://--------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TToonzImage>;template class DVAPI TDerivedSmartPointerT<TToonzImage, TImage>;#endifdiff --git a/toonz/sources/include/tunit.h b/toonz/sources/include/tunit.hindex 768a3ffa7..6f11b6a6b 100644--- a/toonz/sources/include/tunit.h+++ b/toonz/sources/include/tunit.h@@ -15,7 +15,7 @@#define DVVAR DV_IMPORT_VAR#endif-#ifdef WIN32+#ifdef _WIN32#pragma warning(push)#pragma warning(disable : 4251)#endif@@ -191,7 +191,7 @@ DVAPI void setCurrentDpiGetter(CurrentDpiGetter f);//----------------------------#ifdef WIN32+#ifdef _WIN32#pragma warning(pop)#endifdiff --git a/toonz/sources/include/tutil.h b/toonz/sources/include/tutil.hindex 3ef19bc6a..208b5a7a8 100644--- a/toonz/sources/include/tutil.h+++ b/toonz/sources/include/tutil.h@@ -6,7 +6,7 @@#include "tcommon.h"#include <math.h>-#ifdef WIN32+#ifdef _WIN32#include <windows.h>#include <winbase.h>#endifdiff --git a/toonz/sources/include/tvectorgl.h b/toonz/sources/include/tvectorgl.hindex f5b54d80c..28945ef6e 100644--- a/toonz/sources/include/tvectorgl.h+++ b/toonz/sources/include/tvectorgl.h@@ -3,7 +3,7 @@#ifndef TVECTORGL_INCLUDED#define TVECTORGL_INCLUDED-#ifdef WIN32+#ifdef _WIN32#include <windows.h>// #endifdiff --git a/toonz/sources/include/tvectorimage.h b/toonz/sources/include/tvectorimage.hindex f80f239a6..669ecbabd 100644--- a/toonz/sources/include/tvectorimage.h+++ b/toonz/sources/include/tvectorimage.h@@ -368,7 +368,7 @@ DVAPI void getClosingPoints(const TRectD &rect, double fac, const TVectorImageP//------------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template class DVAPI TSmartPointerT<TVectorImage>;template class DVAPI TDerivedSmartPointerT<TVectorImage, TImage>;#endif@@ -379,7 +379,7 @@ public:TVectorImageP() {}TVectorImageP(TVectorImage *image) : DerivedSmartPointer(image) {}TVectorImageP(TImageP image) : DerivedSmartPointer(image) {}-#if !defined(WIN32)+#if !defined(_WIN32)TVectorImageP(TImage *image) : DerivedSmartPointer(TImageP(image)){}diff --git a/toonz/sources/stdfx/artcontourfx.cpp b/toonz/sources/stdfx/artcontourfx.cppindex 7c0cae22a..b884a10b5 100644--- a/toonz/sources/stdfx/artcontourfx.cpp+++ b/toonz/sources/stdfx/artcontourfx.cpp@@ -1,6 +1,6 @@-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#define NOMINMAX#endifdiff --git a/toonz/sources/stdfx/blendtzfx.cpp b/toonz/sources/stdfx/blendtzfx.cppindex c7b9e72a8..b05f2e3a1 100644--- a/toonz/sources/stdfx/blendtzfx.cpp+++ b/toonz/sources/stdfx/blendtzfx.cpp@@ -1,6 +1,6 @@-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#define NOMINMAX#endifdiff --git a/toonz/sources/stdfx/blurfx.cpp b/toonz/sources/stdfx/blurfx.cppindex 514f5b16f..27801c55e 100644--- a/toonz/sources/stdfx/blurfx.cpp+++ b/toonz/sources/stdfx/blurfx.cpp@@ -1,6 +1,6 @@-#ifdef WIN32+#ifdef _WIN32#define NOMINMAX#endifdiff --git a/toonz/sources/stdfx/calligraphicfx.cpp b/toonz/sources/stdfx/calligraphicfx.cppindex ab9c900dd..c7166b08a 100644--- a/toonz/sources/stdfx/calligraphicfx.cpp+++ b/toonz/sources/stdfx/calligraphicfx.cpp@@ -2,7 +2,7 @@#include "stdfx.h"-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#include "windows.h"#endifdiff --git a/toonz/sources/stdfx/offscreengl.h b/toonz/sources/stdfx/offscreengl.hindex 8164f2994..5a721704c 100644--- a/toonz/sources/stdfx/offscreengl.h+++ b/toonz/sources/stdfx/offscreengl.h@@ -14,7 +14,7 @@ public:// ----------------------------------------------------------------------------------- //// creo il contesto openGL //// ----------------------------------------------------------------------------------- //-#ifdef WIN32+#ifdef _WIN32initBITMAPINFO(m_info, width, height, bpp);m_offData = 0; // a pointer to buffer@@ -80,7 +80,7 @@ public:// ----------------------------------------------------------------------------------- //// cancello il contesto openGL //// ----------------------------------------------------------------------------------- //-#ifdef WIN32+#ifdef _WIN32wglDeleteContext(m_hglRC);// release object@@ -99,7 +99,7 @@ public:public:// init a BITMAPINFO structure-#ifdef WIN32+#ifdef _WIN32void initBITMAPINFO(BITMAPINFO &info, int width, int height, int bpp){memset(&info, 0, sizeof(BITMAPINFOHEADER));diff --git a/toonz/sources/stdfx/pins.cpp b/toonz/sources/stdfx/pins.cppindex d4d6fbaee..e0e7944a0 100644--- a/toonz/sources/stdfx/pins.cpp+++ b/toonz/sources/stdfx/pins.cpp@@ -7,7 +7,7 @@#include "tofflinegl.h"//-------------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32#define ISNAN _isnan#elseextern "C" int isnan(double);@@ -141,7 +141,7 @@ void subCompute(TRasterFxPort &m_input, TTile &tile, double frame, const TRenderassert(ret == TRUE);#elseTOfflineGL offScreenRendering(TDimension(rasterWidth, rasterHeight));- //#ifdef WIN32+ //#ifdef _WIN32offScreenRendering.makeCurrent();//#else//#if defined(LINUX) || defined(MACOSX)diff --git a/toonz/sources/stdfx/pins.h b/toonz/sources/stdfx/pins.hindex ffda93215..7e52c0f88 100644--- a/toonz/sources/stdfx/pins.h+++ b/toonz/sources/stdfx/pins.h@@ -13,7 +13,7 @@//#include "tparamset.h"#include "tgl.h"-#ifdef WIN32+#ifdef _WIN32#include <GL/gl.h>#include <GL/glu.h>#endifdiff --git a/toonz/sources/stdfx/stdfx.cpp b/toonz/sources/stdfx/stdfx.cppindex 8743fe9f4..4f462640f 100644--- a/toonz/sources/stdfx/stdfx.cpp+++ b/toonz/sources/stdfx/stdfx.cpp@@ -13,7 +13,7 @@#include <QCoreApplication>-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#endif#undef maxdiff --git a/toonz/sources/stdfx/stdfx.h b/toonz/sources/stdfx/stdfx.hindex 3aba595ec..2a4e1cf6c 100644--- a/toonz/sources/stdfx/stdfx.h+++ b/toonz/sources/stdfx/stdfx.h@@ -18,7 +18,7 @@ static const string PLUGIN_PREFIX("STD");public: \const TPersistDeclaration *getDeclaration() const;-#ifdef WIN32+#ifdef _WIN32#ifdef TNZSTDFX_EXPORTSdiff --git a/toonz/sources/tcleanupper/tcleanupper.cpp b/toonz/sources/tcleanupper/tcleanupper.cppindex 9cbe93e06..3dffc5ef7 100644--- a/toonz/sources/tcleanupper/tcleanupper.cpp+++ b/toonz/sources/tcleanupper/tcleanupper.cpp@@ -127,7 +127,7 @@ void restoreGlobalSettings(CleanupParameters *cp)void fatalError(string msg){-#ifdef WIN32+#ifdef _WIN32msg = "Application can't start:\n" + msg;DVGui::MsgBox(CRITICAL, QString::fromStdString(msg));//MessageBox(0,msg.c_str(),"Fatal error",MB_ICONERROR);diff --git a/toonz/sources/tcomposer/tcomposer.cpp b/toonz/sources/tcomposer/tcomposer.cppindex 1cd3a5b65..600c57c01 100644--- a/toonz/sources/tcomposer/tcomposer.cpp+++ b/toonz/sources/tcomposer/tcomposer.cpp@@ -38,7 +38,7 @@#include "tnzimage.h"#include "tflash.h"-#ifdef WIN32+#ifdef _WIN32#include "avicodecrestrictions.h"#endif@@ -153,7 +153,7 @@ const char *systemVarPrefix = "TOONZ";void fatalError(string msg){-#ifdef WIN32+#ifdef _WIN32std::cout << msg << std::endl;//MessageBox(0,msg.c_str(),"Fatal error",MB_ICONERROR);exit(1);@@ -462,7 +462,7 @@ std::pair<int, int> generateMovie(ToonzScene *scene,string ext = fp.getType();-#ifdef WIN32+#ifdef _WIN32if (ext == "avi") {TPropertyGroup *props = scene->getProperties()->getOutputProperties()->getFileFormatProperties(ext);string codecName = props->getProperty(0)->getValueAsString();@@ -600,7 +600,7 @@ int main(int argc, char *argv[])std::auto_ptr<QObject> mainScope(new QObject(&app));mainScope->setObjectName("mainScope");-#ifdef WIN32+#ifdef _WIN32#ifndef x64//Store the floating point control word. It will be re-set before Toonz initialization//has ended.@@ -616,7 +616,7 @@ int main(int argc, char *argv[])// Install run out of contiguous memory callbackTBigMemoryManager::instance()->setRunOutOfContiguousMemoryHandler(&tcomposerRunOutOfContMemHandler);-#ifdef WIN32+#ifdef _WIN32//Define 64-bit precision for floating-point arithmetic. Please observe that the//initImageIo() call below would already impose this precision. This just wants to be//explicit.@@ -1003,7 +1003,7 @@ int main(int argc, char *argv[])//TCacheResourcePool::instance(); //Needs to be instanced before TPassiveCacheManager...TPassiveCacheManager::instance()->setEnabled(false);-#ifdef WIN32+#ifdef _WIN32#ifndef x64//On 32-bit architecture, there could be cases in which initialization could alter the//FPU floating point control word. I've seen this happen when loading some AVI coded (VFAPI),diff --git a/toonz/sources/tnzbase/texternfx.cpp b/toonz/sources/tnzbase/texternfx.cppindex 55ceaf783..1524b086f 100644--- a/toonz/sources/tnzbase/texternfx.cpp+++ b/toonz/sources/tnzbase/texternfx.cpp@@ -293,7 +293,7 @@ void TExternalProgramFx::doCompute(TTile &tile, double frame, const TRenderSetti// poi cancellare tuttostring expandedargs;char buffer[1024];-#ifdef WIN32+#ifdef _WIN32ExpandEnvironmentStrings(args.c_str(), buffer, 1024);STARTUPINFO si;@@ -486,7 +486,7 @@ void ExternalProgramFx::doCompute(TTile &tile, double frame, const TRenderSettinarglist += " " + outname;string cmdline = program + arglist;-#ifdef WIN32+#ifdef _WIN32STARTUPINFO si;PROCESS_INFORMATION pinfo;diff --git a/toonz/sources/tnzbase/tscanner/tscannerepson.cpp b/toonz/sources/tnzbase/tscanner/tscannerepson.cppindex e566d338a..9c8d0ef4e 100644--- a/toonz/sources/tnzbase/tscanner/tscannerepson.cpp+++ b/toonz/sources/tnzbase/tscanner/tscannerepson.cpp@@ -24,7 +24,7 @@ int scsi_maxlen()#define BW_USES_GRAYTONES-#ifndef WIN32+#ifndef _WIN32#define SWAPIT#endifdiff --git a/toonz/sources/tnzext/NotSimmetricBezierPotential.cpp b/toonz/sources/tnzext/NotSimmetricBezierPotential.cppindex 9e1ce6b32..e8a3a5e36 100644--- a/toonz/sources/tnzext/NotSimmetricBezierPotential.cpp+++ b/toonz/sources/tnzext/NotSimmetricBezierPotential.cpp@@ -1,6 +1,6 @@-#ifdef WIN32+#ifdef _WIN32#define NOMINMAX#endifdiff --git a/toonz/sources/tnzext/OverallDesigner.cpp b/toonz/sources/tnzext/OverallDesigner.cppindex 8b286c776..4240a1f2a 100644--- a/toonz/sources/tnzext/OverallDesigner.cpp+++ b/toonz/sources/tnzext/OverallDesigner.cpp@@ -1,6 +1,6 @@-#ifdef WIN32+#ifdef _WIN32#define NOMINMAX#endifdiff --git a/toonz/sources/tnzext/Potential.cpp b/toonz/sources/tnzext/Potential.cppindex 151627050..7a39e6302 100644--- a/toonz/sources/tnzext/Potential.cpp+++ b/toonz/sources/tnzext/Potential.cpp@@ -3,7 +3,7 @@#include "ext/Potential.h"#include <algorithm>-#if defined(WIN32) && (_MSC_VER <= 1200)+#if defined(_WIN32) && (_MSC_VER <= 1200)#pragma warning(push)#pragma warning(disable : 4290)#endif@@ -67,6 +67,6 @@ ToonzExt::Potential::value(double at) const// End Of File//------------------------------------------------------------------------------#if defined(WIN32) && (_MSC_VER <= 1200)+#if defined(_WIN32) && (_MSC_VER <= 1200)#pragma warning(pop)#endifdiff --git a/toonz/sources/tnzext/Selector.cpp b/toonz/sources/tnzext/Selector.cppindex 2b7f3c71f..d98caab83 100644--- a/toonz/sources/tnzext/Selector.cpp+++ b/toonz/sources/tnzext/Selector.cpp@@ -1,6 +1,6 @@-#ifdef WIN32+#ifdef _WIN32#define NOMINMAX#endifdiff --git a/toonz/sources/tnzext/StrokeDeformationImpl.cpp b/toonz/sources/tnzext/StrokeDeformationImpl.cppindex 614b9ab16..0e651c596 100644--- a/toonz/sources/tnzext/StrokeDeformationImpl.cpp+++ b/toonz/sources/tnzext/StrokeDeformationImpl.cpp@@ -6,7 +6,7 @@#ifdef _DEBUG#define _STLP_DEBUG 1#endif-#ifdef WIN32+#ifdef _WIN32#define NOMINMAX#endifdiff --git a/toonz/sources/tnzext/Types.cpp b/toonz/sources/tnzext/Types.cppindex 7ba9e577b..2d6aa2883 100644--- a/toonz/sources/tnzext/Types.cpp+++ b/toonz/sources/tnzext/Types.cpp@@ -5,7 +5,7 @@#endif#include "ext/Types.h"-#if defined(WIN32) && (_MSC_VER <= 1200)+#if defined(_WIN32) && (_MSC_VER <= 1200)// to avoid annoying warning#pragma warning(push)#pragma warning(disable : 4290)@@ -85,7 +85,7 @@ bool ToonzExt::EvenInt::isEven() const//------------------------------------------------------------------------------#if defined(WIN32) && (_MSC_VER <= 1200)+#if defined(_WIN32) && (_MSC_VER <= 1200)#pragma warning(pop)#endifdiff --git a/toonz/sources/tnztools/pinchtool.cpp b/toonz/sources/tnztools/pinchtool.cppindex 2866bf536..5cb69eaf2 100644--- a/toonz/sources/tnztools/pinchtool.cpp+++ b/toonz/sources/tnztools/pinchtool.cpp@@ -347,7 +347,7 @@ void PinchTool::leftButtonUp(const TPointD &pos,m_undo = 0;// to avoid red line tool on stroke-#ifdef WIN32+#ifdef _WIN32invalidate(status->stroke2change_->getBBox().enlarge(status->pixelSize_ * 13));#elseinvalidate();diff --git a/toonz/sources/toonz/batches.cpp b/toonz/sources/toonz/batches.cppindex 4a9c5e65b..66c52b0d8 100644--- a/toonz/sources/toonz/batches.cpp+++ b/toonz/sources/toonz/batches.cpp@@ -1,6 +1,6 @@-#ifdef WIN32+#ifdef _WIN32#define _WIN32_WINNT 0x0500 // per CreateJobObject e affini#endifdiff --git a/toonz/sources/toonz/batches.h b/toonz/sources/toonz/batches.hindex 1b67d2440..6ff544e78 100644--- a/toonz/sources/toonz/batches.h+++ b/toonz/sources/toonz/batches.h@@ -20,7 +20,7 @@ class TFarmController;//-------------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32#pragma warning(push)#pragma warning(disable : 4786)#endif@@ -147,7 +147,7 @@ public://-------------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32#pragma warning(pop)#endifdiff --git a/toonz/sources/toonz/batchserversviewer.cpp b/toonz/sources/toonz/batchserversviewer.cppindex 8290dcacc..9def75e05 100644--- a/toonz/sources/toonz/batchserversviewer.cpp+++ b/toonz/sources/toonz/batchserversviewer.cpp@@ -159,7 +159,7 @@ void BatchServersViewer::updateServerInfo(const QString &id)m_tasks->setText("");m_cpu->setText(QString::number(TSystem::getProcessorCount()));-#ifdef WIN32+#ifdef _WIN32//Please observe that the commented value is NOT the same reported by tfarmserver...MEMORYSTATUSEX buff;buff.dwLength = sizeof(MEMORYSTATUSEX);diff --git a/toonz/sources/toonz/filebrowser.cpp b/toonz/sources/toonz/filebrowser.cppindex ff15d793e..0cda4ee71 100644--- a/toonz/sources/toonz/filebrowser.cpp+++ b/toonz/sources/toonz/filebrowser.cpp@@ -1091,7 +1091,7 @@ QMenu *FileBrowser::getContextMenu(QWidget *parent, int index)menu->addAction(cm->getAction(MI_LoadScene));}-#ifdef WIN32+#ifdef _WIN32else if (files.size() == 1 && files[0].getType() == "scr") {QAction *action;action = new QAction(tr("Preview Screensaver"), menu);diff --git a/toonz/sources/toonz/filebrowsermodel.cpp b/toonz/sources/toonz/filebrowsermodel.cppindex 58f32c48e..e6daed95b 100644--- a/toonz/sources/toonz/filebrowsermodel.cpp+++ b/toonz/sources/toonz/filebrowsermodel.cpp@@ -16,7 +16,7 @@#include <QFileInfo>#include <QDir>-#ifdef WIN32+#ifdef _WIN32#include <shlobj.h>#include <Winnetwk.h>#endif@@ -32,7 +32,7 @@ namespace{TFilePath getMyDocumentsPath(){-#ifdef WIN32+#ifdef _WIN32WCHAR szPath[MAX_PATH];if (SHGetSpecialFolderPath(NULL, szPath, CSIDL_PERSONAL, 0)) {return TFilePath(szPath);@@ -1101,7 +1101,7 @@ void DvDirModelNetworkNode::refreshChildren()if (!m_children.empty())clearPointerContainer(m_children);-#ifdef WIN32+#ifdef _WIN32// Enumerate network nodesHANDLE enumHandle;@@ -1179,7 +1179,7 @@ void DvDirModelRootNode::refreshChildren()if (m_children.empty()) {addChild(m_myComputerNode = new DvDirModelMyComputerNode(this));-#ifdef WIN32+#ifdef _WIN32addChild(m_networkNode = new DvDirModelNetworkNode(this));#endifdiff --git a/toonz/sources/toonz/flipbook.cpp b/toonz/sources/toonz/flipbook.cppindex caa980c42..8d834413e 100644--- a/toonz/sources/toonz/flipbook.cpp+++ b/toonz/sources/toonz/flipbook.cpp@@ -93,7 +93,7 @@#include <stdint.h> // for uintptr_t-#ifdef WIN32+#ifdef _WIN32#include "avicodecrestrictions.h"#endif;@@ -365,7 +365,7 @@ LoadImagesPopup::LoadImagesPopup(FlipBook *flip)<< "rgb"<< "nol";-#ifdef WIN32+#ifdef _WIN32m_appendFilterTypes << "avi";#endif@@ -609,7 +609,7 @@ bool FlipBook::doSaveImages(TFilePath fp)return false;}-#ifdef WIN32+#ifdef _WIN32if (ext == "avi") {TPropertyGroup *props = outputSettings->getFileFormatProperties(ext);string codecName = props->getProperty(0)->getValueAsString();diff --git a/toonz/sources/toonz/formatsettingspopups.cpp b/toonz/sources/toonz/formatsettingspopups.cppindex aa0aa1867..eb073fb30 100644--- a/toonz/sources/toonz/formatsettingspopups.cpp+++ b/toonz/sources/toonz/formatsettingspopups.cpp@@ -13,7 +13,7 @@#include "toonz/tcamera.h"#include "toutputproperties.h"-#ifdef WIN32+#ifdef _WIN32#include "avicodecrestrictions.h"#endif;@@ -37,7 +37,7 @@FormatSettingsPopup::FormatSettingsPopup(QWidget *parent, const std::string &format, TPropertyGroup *props): Dialog(parent), m_format(format), m_props(props), m_levelPath(TFilePath())-#ifdef WIN32+#ifdef _WIN32,m_codecRestriction(0), m_codecComboBox(0), m_configureCodec(0)#endif@@ -67,7 +67,7 @@ FormatSettingsPopup::FormatSettingsPopup(assert(false);}-#ifdef WIN32+#ifdef _WIN32if (format == "avi") {m_codecRestriction = new QLabel(this);m_codecRestriction->setMinimumHeight(70);@@ -131,7 +131,7 @@ void FormatSettingsPopup::buildPropertyComboBox(int index, TPropertyGroup *propsm_mainLayout->addWidget(new QLabel(tr(prop->getName().c_str()) + ":", this), row, 0, Qt::AlignRight | Qt::AlignVCenter);m_mainLayout->addWidget(comboBox, row, 1);-#ifdef WIN32+#ifdef _WIN32if (m_format == "avi")m_codecComboBox = comboBox;#endif;@@ -187,7 +187,7 @@ void FormatSettingsPopup::buildPropertyLineEdit(int index, TPropertyGroup *props//------------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32void FormatSettingsPopup::onComboBoxIndexChanged(const QString codecName){@@ -214,7 +214,7 @@ void FormatSettingsPopup::onAviCodecConfigure()void FormatSettingsPopup::showEvent(QShowEvent *se){-#ifdef WIN32+#ifdef _WIN32if (m_format == "avi") {assert(m_codecComboBox);m_codecComboBox->blockSignals(true);diff --git a/toonz/sources/toonz/formatsettingspopups.h b/toonz/sources/toonz/formatsettingspopups.hindex a1a63fb9f..39513855b 100644--- a/toonz/sources/toonz/formatsettingspopups.h+++ b/toonz/sources/toonz/formatsettingspopups.h@@ -50,7 +50,7 @@ private:QGridLayout *m_mainLayout;-#ifdef WIN32+#ifdef _WIN32// AVI codec - related membersQLabel *m_codecRestriction;@@ -66,7 +66,7 @@ private:void buildPropertyLineEdit(int index, TPropertyGroup *props);void showEvent(QShowEvent *se);-#ifdef WIN32+#ifdef _WIN32private slots:diff --git a/toonz/sources/toonz/imageviewer.cpp b/toonz/sources/toonz/imageviewer.cppindex f3dc6c667..cde3e2919 100644--- a/toonz/sources/toonz/imageviewer.cpp+++ b/toonz/sources/toonz/imageviewer.cpp@@ -291,7 +291,7 @@ void ImageViewer::contextMenuEvent(QContextMenuEvent *event)fit->setShortcut(QKeySequence(CommandManager::instance()->getKeyFromId(V_ZoomFit)));connect(fit, SIGNAL(triggered()), SLOT(fitView()));-#ifdef WIN32+#ifdef _WIN32if (ImageUtils::FullScreenWidget *fsWidget =dynamic_cast<ImageUtils::FullScreenWidget *>(parentWidget())) {diff --git a/toonz/sources/toonz/main.cpp b/toonz/sources/toonz/main.cppindex e34742b72..e596b6ea1 100644--- a/toonz/sources/toonz/main.cpp+++ b/toonz/sources/toonz/main.cpp@@ -132,7 +132,7 @@ const char *applicationName = "OpenToonz";const char *applicationVersion = "1.0";const char *dllRelativePath = "./toonz6.app/Contents/Frameworks";-#ifdef WIN32+#ifdef _WIN32TEnv::StringVar EnvSoftwareCurrentFont("SoftwareCurrentFont", "Arial");#elseTEnv::StringVar EnvSoftwareCurrentFont("SoftwareCurrentFont", "Hervetica");@@ -201,7 +201,7 @@ extern "C" void licenseObserverCB(char *msg)void toonzRunOutOfContMemHandler(unsigned long size){-#ifdef WIN32+#ifdef _WIN32static bool firstTime = true;if (firstTime) {MessageBox(NULL, (LPCWSTR)L"Run out of contiguous physical memory: please save all and restart Toonz!",@@ -380,7 +380,7 @@ int main(int argc, char *argv[])std::auto_ptr<QObject> mainScope(new QObject(&a)); // A QObject destroyed before the qApp is therefore explicitlymainScope->setObjectName("mainScope"); // provided. It can be accessed by looking in the qApp's children.-#ifdef WIN32+#ifdef _WIN32#ifndef x64//Store the floating point control word. It will be re-set before Toonz initialization//has ended.@@ -389,7 +389,7 @@ int main(int argc, char *argv[])#endif#endif-#ifdef WIN32+#ifdef _WIN32//At least on windows, Qt's 4.5.2 native windows feature tend to create//weird flickering effects when dragging panel separators.a.setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);@@ -412,7 +412,7 @@ int main(int argc, char *argv[])// splash screenQPixmap splashPixmap(":Resources/splash.png");-#ifdef WIN32+#ifdef _WIN32a.setFont(QFont("Arial", 10));#elsea.setFont(QFont("Helvetica", 10));@@ -696,7 +696,7 @@ int main(int argc, char *argv[])TUndoManager::manager(), SIGNAL(somethingChanged()),TApp::instance()->getCurrentScene(), SLOT(setDirtyFlag()));-#ifdef WIN32+#ifdef _WIN32#ifndef x64//On 32-bit architecture, there could be cases in which initialization could alter the//FPU floating point control word. I've seen this happen when loading some AVI coded (VFAPI),@@ -716,7 +716,7 @@ int main(int argc, char *argv[])TUndoManager::manager()->reset();PreviewFxManager::instance()->reset();-#ifdef WIN32+#ifdef _WIN32if (consoleAttached) {::FreeConsole();}diff --git a/toonz/sources/toonz/rendercommand.cpp b/toonz/sources/toonz/rendercommand.cppindex 4efcfb76b..dc13df14e 100644--- a/toonz/sources/toonz/rendercommand.cpp+++ b/toonz/sources/toonz/rendercommand.cpp@@ -31,7 +31,7 @@#include "toonz/multimediarenderer.h"#include "toutputproperties.h"-#ifdef WIN32+#ifdef _WIN32#include "avicodecrestrictions.h"#endif@@ -530,7 +530,7 @@ void RenderCommand::rasterRender(bool isPreview)string ext = m_fp.getType();-#ifdef WIN32+#ifdef _WIN32if (ext == "avi" && !isPreview) {TPropertyGroup *props = scene->getProperties()->getOutputProperties()->getFileFormatProperties(ext);string codecName = props->getProperty(0)->getValueAsString();@@ -740,7 +740,7 @@ void RenderCommand::multimediaRender()ToonzScene *scene = TApp::instance()->getCurrentScene()->getScene();string ext = m_fp.getType();-#ifdef WIN32+#ifdef _WIN32if (ext == "avi") {TPropertyGroup *props = scene->getProperties()->getOutputProperties()->getFileFormatProperties(ext);string codecName = props->getProperty(0)->getValueAsString();diff --git a/toonz/sources/toonz/sceneviewer.cpp b/toonz/sources/toonz/sceneviewer.cppindex 29467a990..efa7560be 100644--- a/toonz/sources/toonz/sceneviewer.cpp+++ b/toonz/sources/toonz/sceneviewer.cpp@@ -1015,7 +1015,7 @@ void SceneViewer::drawBackground()if (glGetError() == GL_INVALID_FRAMEBUFFER_OPERATION) {/* 起動時一回目になぜか GL_FRAMEBUFFER_COMPLETE なのに invalid operation が出る */GLenum status = 0;-#if WIN32+#ifdef _WIN32PROC proc = wglGetProcAddress("glCheckFramebufferStatusEXT");if (proc != nullptr)status = reinterpret_cast<PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC>(proc)(GL_FRAMEBUFFER);@@ -1028,7 +1028,7 @@ void SceneViewer::drawBackground()bool check_framebuffer_status(){-#if WIN32+#ifdef _WIN32PROC proc = wglGetProcAddress("glCheckFramebufferStatusEXT");if (proc == nullptr)return true;diff --git a/toonz/sources/toonz/sceneviewerevents.cpp b/toonz/sources/toonz/sceneviewerevents.cppindex cbee6af7f..9a2003459 100644--- a/toonz/sources/toonz/sceneviewerevents.cpp+++ b/toonz/sources/toonz/sceneviewerevents.cpp@@ -957,7 +957,7 @@ using namespace ImageUtils;void SceneViewer::contextMenuEvent(QContextMenuEvent *e){-#ifndef WIN32+#ifndef _WIN32/* On windows the widget receive the release event before the menuis shown, on linux and osx the release event is lost, neverreceived by the widget */diff --git a/toonz/sources/toonz/xshcellviewer.cpp b/toonz/sources/toonz/xshcellviewer.cppindex 52254077f..b771c3fa6 100644--- a/toonz/sources/toonz/xshcellviewer.cpp+++ b/toonz/sources/toonz/xshcellviewer.cpp@@ -1048,7 +1048,7 @@ void CellArea::drawLevelCell(QPainter &p, int row, int col, bool isReference)isRed = true;p.setPen(isRed ? m_viewer->getSelectedColumnTextColor() : m_viewer->getTextColor());-#ifdef WIN32+#ifdef _WIN32static QFont font("Arial", XSHEET_FONT_SIZE, QFont::Normal);#elsestatic QFont font("Helvetica", XSHEET_FONT_SIZE, QFont::Normal);@@ -1256,7 +1256,7 @@ void CellArea::drawPaletteCell(QPainter &p, int row, int col, bool isReference)p.setPen(isRed ? m_viewer->getSelectedColumnTextColor() : m_viewer->getTextColor());// il nome va scritto se e' diverso dalla cella precedente oppure se// siamo su una marker line-#ifndef WIN32+#ifndef _WIN32static QFont font("Arial", XSHEET_FONT_SIZE, QFont::Normal);#elsestatic QFont font("Helvetica", XSHEET_FONT_SIZE, QFont::Normal);diff --git a/toonz/sources/toonz/xshcolumnviewer.cpp b/toonz/sources/toonz/xshcolumnviewer.cppindex c5e60e9e2..0a28dc247 100644--- a/toonz/sources/toonz/xshcolumnviewer.cpp+++ b/toonz/sources/toonz/xshcolumnviewer.cpp@@ -597,7 +597,7 @@ void ColumnArea::drawLevelColumnHead(QPainter &p, int col)TColumnSelection *selection = m_viewer->getColumnSelection();// Preparing painter-#ifdef WIN32+#ifdef _WIN32QFont font("Arial", XSHEET_FONT_SIZE, QFont::Normal);#elseQFont font("Helvetica", XSHEET_FONT_SIZE, QFont::Normal);@@ -942,7 +942,7 @@ void ColumnArea::drawPaletteColumnHead(QPainter &p, int col){TColumnSelection *selection = m_viewer->getColumnSelection();-#ifdef WIN32+#ifdef _WIN32QFont font("Arial", XSHEET_FONT_SIZE, QFont::Normal);#elseQFont font("Helvetica", XSHEET_FONT_SIZE, QFont::Normal);diff --git a/toonz/sources/toonz/xsheetviewer.h b/toonz/sources/toonz/xsheetviewer.hindex b40f36faf..464826a7c 100644--- a/toonz/sources/toonz/xsheetviewer.h+++ b/toonz/sources/toonz/xsheetviewer.h@@ -13,7 +13,7 @@#include "cellkeyframeselection.h"#include "toonzqt/spreadsheetviewer.h"-#ifdef WIN32+#ifdef _WIN32#define XSHEET_FONT_SIZE 9#define H_ADJUST 2#elsediff --git a/toonz/sources/toonz/xshrowviewer.cpp b/toonz/sources/toonz/xshrowviewer.cppindex 4cf586057..c53fe61ea 100644--- a/toonz/sources/toonz/xshrowviewer.cpp+++ b/toonz/sources/toonz/xshrowviewer.cpp@@ -71,7 +71,7 @@ void RowArea::drawRows(QPainter &p, int r0, int r1)playR0 = 0;}-#ifdef WIN32+#ifdef _WIN32static QFont font("Arial", XSHEET_FONT_SIZE, QFont::Bold);#elsestatic QFont font("Helvetica", XSHEET_FONT_SIZE, QFont::Normal);diff --git a/toonz/sources/toonzfarm/include/service.h b/toonz/sources/toonzfarm/include/service.hindex 5e20d3d2a..9390df2c8 100644--- a/toonz/sources/toonzfarm/include/service.h+++ b/toonz/sources/toonzfarm/include/service.h@@ -15,7 +15,7 @@ using namespace std;#undef TFARMAPI#endif-#ifdef WIN32+#ifdef _WIN32#ifdef TFARM_EXPORTS#define TFARMAPI __declspec(dllexport)#elsediff --git a/toonz/sources/toonzfarm/include/tfarmexecutor.h b/toonz/sources/toonzfarm/include/tfarmexecutor.hindex b39c0faaf..d1c2da70b 100644--- a/toonz/sources/toonzfarm/include/tfarmexecutor.h+++ b/toonz/sources/toonzfarm/include/tfarmexecutor.h@@ -14,7 +14,7 @@ using std::string;#undef TFARMAPI#endif-#ifdef WIN32+#ifdef _WIN32#ifdef TFARM_EXPORTS#define TFARMAPI __declspec(dllexport)#elsediff --git a/toonz/sources/toonzfarm/include/tfarmproxy.h b/toonz/sources/toonzfarm/include/tfarmproxy.hindex cd8c5a87c..dd1d95523 100644--- a/toonz/sources/toonzfarm/include/tfarmproxy.h+++ b/toonz/sources/toonzfarm/include/tfarmproxy.h@@ -14,7 +14,7 @@ using std::vector;#include "texception.h"-#ifdef WIN32+#ifdef _WIN32#ifdef TFARM_EXPORTS#define TFARMAPI __declspec(dllexport)#elsediff --git a/toonz/sources/toonzfarm/include/tlog.h b/toonz/sources/toonzfarm/include/tlog.hindex a489eea88..ecc6e4954 100644--- a/toonz/sources/toonzfarm/include/tlog.h+++ b/toonz/sources/toonzfarm/include/tlog.h@@ -12,7 +12,7 @@ class TFilePath;#undef TFARMAPI#endif-#ifdef WIN32+#ifdef _WIN32#ifdef TFARM_EXPORTS#define TFARMAPI __declspec(dllexport)#elsediff --git a/toonz/sources/toonzfarm/tfarm/service.cpp b/toonz/sources/toonzfarm/tfarm/service.cppindex 7fcc4eb94..141c55155 100644--- a/toonz/sources/toonzfarm/tfarm/service.cpp+++ b/toonz/sources/toonzfarm/tfarm/service.cpp@@ -6,7 +6,7 @@#include "tfilepath.h"-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#include <windows.h>#include <stdio.h>@@ -20,7 +20,7 @@#define SZDEPENDENCIES ""-#ifdef WIN32+#ifdef _WIN32//------------------------------------------------------------------------------@@ -52,14 +52,14 @@ LPTSTR GetLastErrorText(LPTSTR lpszBuf, DWORD dwSize)return lpszBuf;}-#endif // WIN32+#endif // _WIN32//------------------------------------------------------------------------------string getLastErrorText(){string errText;-#ifdef WIN32+#ifdef _WIN32char errBuff[256];errText = GetLastErrorText(errBuff, sizeof(errBuff));#else@@ -79,7 +79,7 @@ class TService::Imppublic:Imp() {}-#ifdef WIN32+#ifdef _WIN32static void WINAPI serviceMain(DWORD dwArgc, LPTSTR *lpszArgv);static void WINAPI serviceCtrl(DWORD dwCtrlCode);@@ -93,7 +93,7 @@ public:string m_displayName;static bool m_console;-#ifdef WIN32+#ifdef _WIN32static SERVICE_STATUS_HANDLE m_hService;static SERVICE_STATUS m_ssStatus; // current status of the servicestatic DWORD m_dwErr;@@ -101,7 +101,7 @@ public:#endif};-#ifdef WIN32+#ifdef _WIN32SERVICE_STATUS_HANDLE TService::Imp::m_hService = 0;SERVICE_STATUS TService::Imp::m_ssStatus;DWORD TService::Imp::m_dwErr = 0;@@ -140,7 +140,7 @@ TService *TService::m_instance = 0;void TService::setStatus(Status status, long exitCode, long waitHint){-#ifdef WIN32+#ifdef _WIN32if (!isRunningAsConsoleApp())TService::Imp::reportStatusToSCMgr(status, exitCode, waitHint);else {@@ -169,7 +169,7 @@ string TService::getDisplayName() const//-------------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32void WINAPI TService::Imp::serviceCtrl(DWORD dwCtrlCode){@@ -379,7 +379,7 @@ void TService::run(int argc, char *argv[], bool console)#endif*/-#ifdef WIN32+#ifdef _WIN32if (console) {_tprintf(TEXT("Starting %s.\n"), TService::instance()->getDisplayName().c_str());@@ -427,7 +427,7 @@ bool TService::isRunningAsConsoleApp() constvoid TService::install(const string &name, const string &displayName, const TFilePath &appPath){-#ifdef WIN32+#ifdef _WIN32SC_HANDLE schService;SC_HANDLE schSCManager;@@ -469,7 +469,7 @@ void TService::install(const string &name, const string &displayName, const TFilvoid TService::remove(const string &name){-#ifdef WIN32+#ifdef _WIN32string displayName = name;SC_HANDLE schService;@@ -531,7 +531,7 @@ void TService::addToMessageLog(const QString &msg)void TService::addToMessageLog(const string &msg){-#ifdef WIN32+#ifdef _WIN32TCHAR szMsg[256];HANDLE hEventSource;LPCTSTR lpszStrings[2];diff --git a/toonz/sources/toonzfarm/tfarm/tfarmtask.cpp b/toonz/sources/toonzfarm/tfarm/tfarmtask.cppindex 2e366c94e..3c5838f23 100644--- a/toonz/sources/toonzfarm/tfarm/tfarmtask.cpp+++ b/toonz/sources/toonzfarm/tfarm/tfarmtask.cpp@@ -342,7 +342,7 @@ QString getExeName(bool isComposer){QString name = isComposer ? "tcomposer" : "tcleanup";-#ifdef WIN32+#ifdef _WIN32return name + ".exe ";#elsereturn "\"./Toonz 7.1.app/Contents/MacOS/" + name + "\" ";diff --git a/toonz/sources/toonzfarm/tfarm/tlog.cpp b/toonz/sources/toonzfarm/tfarm/tlog.cppindex 1c7457c2b..ed687f092 100644--- a/toonz/sources/toonzfarm/tfarm/tlog.cpp+++ b/toonz/sources/toonzfarm/tfarm/tlog.cpp@@ -5,7 +5,7 @@#include "tfilepath_io.h"#include <QDateTime>-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#include <windows.h>#include <stdio.h>@@ -33,7 +33,7 @@ enum LEVEL {LEVEL_INFO};-#ifdef WIN32+#ifdef _WIN32WORD Level2WinEventType(LEVEL level){switch (level) {@@ -71,7 +71,7 @@ int Level2XPriority(LEVEL level)void notify(LEVEL level, const QString &msg){-#ifdef WIN32+#ifdef _WIN32TCHAR buf[_MAX_PATH + 1];GetModuleFileName(0, buf, _MAX_PATH);diff --git a/toonz/sources/toonzfarm/tfarm/ttcpipclient.cpp b/toonz/sources/toonzfarm/tfarm/ttcpipclient.cppindex 1abe3614d..0ae72e5eb 100644--- a/toonz/sources/toonzfarm/tfarm/ttcpipclient.cpp+++ b/toonz/sources/toonzfarm/tfarm/ttcpipclient.cpp@@ -3,7 +3,7 @@#include "ttcpip.h"#include "tconvert.h"-#ifdef WIN32+#ifdef _WIN32#include <Winsock2.h>#else#include <errno.h> /* obligatory includes */@@ -17,7 +17,7 @@#include <netdb.h>#endif-#ifndef WIN32+#ifndef _WIN32#define SOCKET_ERROR -1#endif@@ -25,7 +25,7 @@TTcpIpClient::TTcpIpClient(){-#ifdef WIN32+#ifdef _WIN32WSADATA wsaData;WORD wVersionRequested = MAKEWORD(1, 1);int irc = WSAStartup(wVersionRequested, &wsaData);@@ -36,7 +36,7 @@ TTcpIpClient::TTcpIpClient()TTcpIpClient::~TTcpIpClient(){-#ifdef WIN32+#ifdef _WIN32WSACleanup();#endif}@@ -57,7 +57,7 @@ int TTcpIpClient::connect(const QString &hostName, const QString &addrStr, int pstruct hostent *he = gethostbyname(hostName.toAscii());#endifif (!he) {-#ifdef WIN32+#ifdef _WIN32int err = WSAGetLastError();#else#endif@@ -76,7 +76,7 @@ int TTcpIpClient::connect(const QString &hostName, const QString &addrStr, int pif (rcConnect == SOCKET_ERROR) {sock = -1;-#ifdef WIN32+#ifdef _WIN32int err = WSAGetLastError();switch (err) {case WSAECONNREFUSED:@@ -108,7 +108,7 @@ int TTcpIpClient::connect(const string &hostName, const string &addrStr, int porstruct hostent *he = gethostbyname (hostName.c_str());if (!he){-#ifdef WIN32+#ifdef _WIN32int err = WSAGetLastError();#else#endif@@ -127,7 +127,7 @@ int TTcpIpClient::connect(const string &hostName, const string &addrStr, int porif (rcConnect == SOCKET_ERROR){sock = -1;-#ifdef WIN32+#ifdef _WIN32int err = WSAGetLastError();switch (err){@@ -152,7 +152,7 @@ int TTcpIpClient::connect(const string &hostName, const string &addrStr, int porint TTcpIpClient::disconnect(int sock){-#ifdef WIN32+#ifdef _WIN32closesocket(sock);#elseclose(sock);@@ -178,7 +178,7 @@ int TTcpIpClient::send(int sock, const QString &data)int nLeft = packet.size();int idx = 0;while (nLeft > 0) {-#ifdef WIN32+#ifdef _WIN32int ret = ::send(sock, packet.c_str() + idx, nLeft, 0);#elseint ret = write(sock, packet.c_str() + idx, nLeft);@@ -186,7 +186,7 @@ int TTcpIpClient::send(int sock, const QString &data)if (ret == SOCKET_ERROR) {// Error-#ifdef WIN32+#ifdef _WIN32int err = WSAGetLastError();#else#endif@@ -208,7 +208,7 @@ int readData(int sock, QString &data)char buff[1024];memset(buff, 0, sizeof(buff));-#ifdef WIN32+#ifdef _WIN32if ((cnt = recv(sock, buff, sizeof(buff), 0)) < 0) {int err = WSAGetLastError();// GESTIRE L'ERRORE SPECIFICO@@ -243,7 +243,7 @@ int readData(int sock, QString &data)while (size > 0) {memset(buff, 0, sizeof(buff));-#ifdef WIN32+#ifdef _WIN32if ((cnt = recv(sock, buff, sizeof(buff), 0)) < 0) {int err = WSAGetLastError();// GESTIRE L'ERRORE SPECIFICO@@ -286,7 +286,7 @@ int readData(int sock, string &data){memset (buff,0,sizeof(buff));-#ifdef WIN32+#ifdef _WIN32if (( cnt = recv(sock, buff, sizeof(buff), 0)) < 0 ){int err = WSAGetLastError();@@ -327,7 +327,7 @@ int readData(int sock, string &data)do {memset(buff, 0, sizeof(buff));-#ifdef WIN32+#ifdef _WIN32if ((cnt = recv(sock, buff, sizeof(buff), 0)) < 0) {int err = WSAGetLastError();// GESTIRE L'ERRORE SPECIFICOdiff --git a/toonz/sources/toonzfarm/tfarm/ttcpipserver.cpp b/toonz/sources/toonzfarm/tfarm/ttcpipserver.cppindex 8b200ce38..d78f8da89 100644--- a/toonz/sources/toonzfarm/tfarm/ttcpipserver.cpp+++ b/toonz/sources/toonzfarm/tfarm/ttcpipserver.cpp@@ -3,7 +3,7 @@#include "ttcpip.h"#include "tconvert.h"-#ifdef WIN32+#ifdef _WIN32#include <Winsock2.h>#else#include <errno.h> /* obligatory includes */@@ -19,7 +19,7 @@#include "tthreadmessage.h"#include "tthread.h"-#ifndef WIN32+#ifndef _WIN32#define SOCKET_ERROR -1#endif@@ -62,7 +62,7 @@ int TTcpIpServerImp::readData(int sock, QString &data)char buff[1025];memset(buff, 0, sizeof(buff));-#ifdef WIN32+#ifdef _WIN32if ((cnt = recv(sock, buff, sizeof(buff) - 1, 0)) < 0) {int err = WSAGetLastError();// GESTIRE L'ERRORE SPECIFICO@@ -103,7 +103,7 @@ int TTcpIpServerImp::readData(int sock, QString &data)while (size > 0) {memset(buff, 0, sizeof(buff));-#ifdef WIN32+#ifdef _WIN32if ((cnt = recv(sock, buff, sizeof(buff) - 1, 0)) < 0) {int err = WSAGetLastError();// GESTIRE L'ERRORE SPECIFICO@@ -161,7 +161,7 @@ int TTcpIpServerImp::readData(int sock, string &data){memset (buff,0,sizeof(buff));-#ifdef WIN32+#ifdef _WIN32if (( cnt = recv(sock, buff, sizeof(buff), 0)) < 0 ){int err = WSAGetLastError();@@ -202,7 +202,7 @@ int TTcpIpServerImp::readData(int sock, string &data)do {memset(buff, 0, sizeof(buff));-#ifdef WIN32+#ifdef _WIN32if ((cnt = recv(sock, buff, sizeof(buff), 0)) < 0) {int err = WSAGetLastError();// GESTIRE L'ERRORE SPECIFICO@@ -246,7 +246,7 @@ TTcpIpServer::TTcpIpServer(int port){m_imp->m_server = this;-#ifdef WIN32+#ifdef _WIN32// Windows Socket startupWSADATA wsaData;WORD wVersionRequested = MAKEWORD(1, 1);@@ -261,7 +261,7 @@ TTcpIpServer::TTcpIpServer(int port)TTcpIpServer::~TTcpIpServer(){if (m_imp->m_s != -1)-#ifdef WIN32+#ifdef _WIN32closesocket(m_imp->m_s);WSACleanup();#else@@ -307,7 +307,7 @@ void DataReader::run()Sthutdown = true;elsem_serverImp->onReceive(m_clientSocket, data);-#ifdef WIN32+#ifdef _WIN32closesocket(m_clientSocket);#elseclose(m_clientSocket);@@ -335,7 +335,7 @@ public:void DataReceiver::run(){m_serverImp->onReceive(m_clientSocket, m_data);-#ifdef WIN32+#ifdef _WIN32closesocket(m_clientSocket);#elseclose(m_clientSocket);@@ -347,7 +347,7 @@ void DataReceiver::run()void TTcpIpServer::run(){try {-#ifdef WIN32+#ifdef _WIN32int err = establish(m_imp->m_port, m_imp->m_s);if (!err && m_imp->m_s != -1) {@@ -382,7 +382,7 @@ void TTcpIpServer::run()return;}-#else // !WIN32+#else // !_WIN32int err = establish(m_imp->m_port, m_imp->m_s);if (!err && m_imp->m_s != -1) {@@ -417,7 +417,7 @@ void TTcpIpServer::run()return;}-#endif // WIN32+#endif // _WIN32} catch (...) {m_exitCode = 2000;return;@@ -450,7 +450,7 @@ void TTcpIpServer::sendReply(int socket, const QString &reply)int nLeft = packet.size();int idx = 0;while (nLeft > 0) {-#ifdef WIN32+#ifdef _WIN32int ret = send(socket, packet.c_str() + idx, nLeft, 0);#elseint ret = write(socket, packet.c_str() + idx, nLeft);@@ -485,7 +485,7 @@ int establish(unsigned short portnum, int &sock)sa.sin_port = htons(portnum); /* this is our port number */if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) /* create socket */{-#ifdef WIN32+#ifdef _WIN32int err = WSAGetLastError();return err;#else@@ -494,7 +494,7 @@ int establish(unsigned short portnum, int &sock)}if (::bind(sock, (struct sockaddr *)&sa, sizeof(struct sockaddr_in)) < 0) {-#ifdef WIN32+#ifdef _WIN32int err = WSAGetLastError();closesocket(sock);return err;@@ -519,7 +519,7 @@ int get_connection(int s)return (t);}-#ifndef WIN32+#ifndef _WIN32//-----------------------------------------------------------------------/* as children die we should get catch their returns or else we get* zombies, A Bad Thing. fireman() catches falling children.diff --git a/toonz/sources/toonzfarm/tfarmcontroller/tfarmcontroller.cpp b/toonz/sources/toonzfarm/tfarmcontroller/tfarmcontroller.cppindex 5a9f70ff9..6f55f5602 100644--- a/toonz/sources/toonzfarm/tfarmcontroller/tfarmcontroller.cpp+++ b/toonz/sources/toonzfarm/tfarmcontroller/tfarmcontroller.cpp@@ -23,7 +23,7 @@#include <string>using namespace std;-#ifndef WIN32+#ifndef _WIN32#include <sys/param.h>#include <unistd.h>#include <sys/timeb.h>@@ -39,14 +39,14 @@ int inline STRICMP(const char *a, const char *b)return str.compare(QString(b), Qt::CaseSensitive);}/*-#ifdef WIN32+#ifdef _WIN32#define STRICMP stricmp#else#define STRICMP strcasecmp#endif*/-#ifndef WIN32+#ifndef _WIN32#define NO_ERROR 0#endif@@ -59,7 +59,7 @@ TFilePath getGlobalRoot(){TFilePath rootDir;-#ifdef WIN32+#ifdef _WIN32TFilePath name(L"SOFTWARE\\OpenToonz\\OpenToonz\\1.0\\FARMROOT");rootDir = TFilePath(TSystem::getSystemValue(name).toStdString());#else@@ -94,7 +94,7 @@ TFilePath getLocalRoot(){TFilePath lroot;-#ifdef WIN32+#ifdef _WIN32TFilePath name(L"SOFTWARE\\OpenToonz\\OpenToonz\\1.0\\TOONZROOT");lroot = TFilePath(TSystem::getSystemValue(name).toStdString()) + TFilePath("toonzfarm");#else@@ -132,7 +132,7 @@ TFilePath getLocalRoot()bool myDoesExists(const TFilePath &fp){bool exists = false;-#ifdef WIN32+#ifdef _WIN32TFileStatus fs(fp);exists = fs.doesExist();#else@@ -147,7 +147,7 @@ bool myDoesExists(const TFilePath &fp)bool dirExists(const TFilePath &dirFp){bool exists = false;-#ifdef WIN32+#ifdef _WIN32TFileStatus fs(dirFp);exists = fs.isDirectory();#else@@ -179,7 +179,7 @@ bool isAScript(TFarmTask *task){return false; //todo per gli script/*-#ifdef WIN32+#ifdef _WIN32return task->m_cmdline.contains(".bat");#elsereturn (task->m_cmdline.contains(".csh")||@@ -483,7 +483,7 @@ bool doTestConnection(const QString &hostName, const QString &addr, int port)int sock;int ret = client.connect(hostName, addr, port, sock);if (ret == OK) {-#ifdef WIN32+#ifdef _WIN32closesocket(sock);#elseclose(sock);@@ -494,7 +494,7 @@ bool doTestConnection(const QString &hostName, const QString &addr, int port)}//-------------------------------------------------------------------------------#ifdef WIN32+#ifdef _WIN32class ConnectionTest : public TThread::Runnable{public:@@ -521,7 +521,7 @@ void ConnectionTest::run()bool FarmServerProxy::testConnection(int timeout){-#ifdef WIN32+#ifdef _WIN32HANDLE hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);if (!hEvent) {@@ -550,7 +550,7 @@ bool FarmServerProxy::testConnection(int timeout)int sock;int ret = client.connect(m_hostName, m_addr, m_port, sock);if (ret == OK) {-#ifdef WIN32+#ifdef _WIN32closesocket(sock);#elseclose(sock);@@ -2524,7 +2524,7 @@ int main(int argc, char **argv)if (!usage.parse(argc, argv))exit(1);-#ifdef WIN32+#ifdef _WIN32if (installQualifier.isSelected()) {char szPath[512];diff --git a/toonz/sources/toonzfarm/tfarmserver/tfarmserver.cpp b/toonz/sources/toonzfarm/tfarmserver/tfarmserver.cppindex fc74e179f..f0b2b4a55 100644--- a/toonz/sources/toonzfarm/tfarmserver/tfarmserver.cpp+++ b/toonz/sources/toonzfarm/tfarmserver/tfarmserver.cpp@@ -22,7 +22,7 @@#include "tthread.h"-#ifdef WIN32+#ifdef _WIN32#include <iostream>using namespace std;#else@@ -33,7 +33,7 @@ using namespace std;//#define REDIRECT_OUPUT-#ifdef WIN32+#ifdef _WIN32#define QUOTE_STR "\""#define CASMPMETER "casmpmeter.exe"#else@@ -41,7 +41,7 @@ using namespace std;#define CASMPMETER "casmpmeter"#endif-#ifndef WIN32+#ifndef _WIN32#define NO_ERROR 0#endif@@ -66,7 +66,7 @@ TFilePath getGlobalRoot(){TFilePath rootDir;-#ifdef WIN32+#ifdef _WIN32TFilePath name(L"SOFTWARE\\OpenToonz\\OpenToonz\\1.0\\FARMROOT");rootDir = TFilePath(TSystem::getSystemValue(name).toStdString());#else@@ -101,7 +101,7 @@ TFilePath getLocalRoot(){TFilePath lroot;-#ifdef WIN32+#ifdef _WIN32TFilePath name("SOFTWARE\\OpenToonz\\OpenToonz\\1.0\\TOONZROOT");lroot = TFilePath(TSystem::getSystemValue(name).toStdString()) + TFilePath("toonzfarm");#else@@ -140,7 +140,7 @@ TFilePath getAppsCfgFilePath()TFilePath getBinRoot(){-#ifdef WIN32+#ifdef _WIN32return TSystem::getBinDir();#elsereturn getLocalRoot() + "bin";@@ -151,7 +151,7 @@ TFilePath getBinRoot()/*string myGetHostName(){-#ifdef WIN32+#ifdef _WIN32return TSystem::getHostName();#elsechar hostName[MAXHOSTNAMELEN];@@ -165,7 +165,7 @@ string myGetHostName()bool dirExists(const TFilePath &dirFp){bool exists = false;-#ifdef WIN32+#ifdef _WIN32TFileStatus fs(dirFp);exists = fs.isDirectory();#else@@ -180,7 +180,7 @@ bool dirExists(const TFilePath &dirFp)bool myDoesExists(const TFilePath &fp){bool exists = false;-#ifdef WIN32+#ifdef _WIN32TFileStatus fs(fp);exists = fs.doesExist();#else@@ -217,7 +217,7 @@ public:void onStop();void loadControllerData(QString &hostName, string &ipAddr, int &port);-#ifdef WIN32+#ifdef _WIN32void loadDiskMountingPoints(const TFilePath &fp);void mountDisks();@@ -421,7 +421,7 @@ void Task::run()// ===========-#ifdef WIN32+#ifdef _WIN32if (m_cmdline.contains("runcasm"))service.mountDisks();#endif@@ -648,7 +648,7 @@ int FarmServer::addTask(const QString &id, const QString &cmdline)int FarmServer::terminateTask(const QString &taskid){-#ifdef WIN32+#ifdef _WIN32HANDLE hJob = OpenJobObject(MAXIMUM_ALLOWED, // access rightTRUE, // inheritance state@@ -681,7 +681,7 @@ int FarmServer::getTasks(vector<QString> &tasks)void FarmServer::queryHwInfo(HwInfo &hwInfo){-#ifdef WIN32+#ifdef _WIN32MEMORYSTATUS buff;GlobalMemoryStatus(&buff);@@ -790,7 +790,7 @@ bool loadServerData(const QString &hostname, QString &addr, int &port)TFilePath fp = rootDir + "config" + "servers.txt";-#ifndef WIN32+#ifndef _WIN32int acc = access(toString(fp.getWideString()).c_str(), 00); // 00 == solo esistenzabool fileExists = acc != -1;if (!fileExists)@@ -834,7 +834,7 @@ void FarmServerService::onStart(int argc, char *argv[])// Initialize thread componentsTThread::init();-#ifdef WIN32+#ifdef _WIN32// DebugBreak();#endif@@ -950,7 +950,7 @@ void FarmServerService::onStart(int argc, char *argv[])} catch (TException & /*e*/) {}-#ifdef WIN32+#ifdef _WIN32TFilePath diskMountingsFilePath = lRootDir + "config" + "diskmap.cfg";if (myDoesExists(diskMountingsFilePath)) {loadDiskMountingPoints(diskMountingsFilePath);@@ -1008,7 +1008,7 @@ void FarmServerService::onStart(int argc, char *argv[])string msg("An error occurred starting the ToonzFarm Server");msg += "\n";-#ifdef WIN32+#ifdef _WIN32LPVOID lpMsgBuf;FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |@@ -1051,7 +1051,7 @@ void FarmServerService::onStop()// i dischi vengono montati al primo task di tipo "runcasm"// e smontati allo stop del servizio-#ifdef WIN32+#ifdef _WIN32unmountDisks();#endif@@ -1064,7 +1064,7 @@ void FarmServerService::onStop()}}-#ifdef WIN32+#ifdef _WIN32//------------------------------------------------------------------------------@@ -1210,7 +1210,7 @@ int main(int argc, char **argv)if (!usage.parse(argc, argv))exit(1);-#ifdef WIN32+#ifdef _WIN32if (installQualifier.isSelected()) {char szPath[512];diff --git a/toonz/sources/toonzlib/cleanupparameters.cpp b/toonz/sources/toonzlib/cleanupparameters.cppindex 5f0720803..5692ce6db 100644--- a/toonz/sources/toonzlib/cleanupparameters.cpp+++ b/toonz/sources/toonzlib/cleanupparameters.cpp@@ -12,7 +12,7 @@#include "cleanuppalette.h"#include "tpalette.h"-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#endifdiff --git a/toonz/sources/toonzlib/sandor_fxs/BlurMatrix.cpp b/toonz/sources/toonzlib/sandor_fxs/BlurMatrix.cppindex 82410be78..0af80d183 100644--- a/toonz/sources/toonzlib/sandor_fxs/BlurMatrix.cpp+++ b/toonz/sources/toonzlib/sandor_fxs/BlurMatrix.cpp@@ -3,7 +3,7 @@// BlurMatrix.cpp: implementation of the CBlurMatrix class.////////////////////////////////////////////////////////////////////////-#ifdef WIN32+#ifdef _WIN32#include "Windows.h"#else#ifdef __sgidiff --git a/toonz/sources/toonzlib/sandor_fxs/CIL.cpp b/toonz/sources/toonzlib/sandor_fxs/CIL.cppindex 564fd8527..09912759e 100644--- a/toonz/sources/toonzlib/sandor_fxs/CIL.cpp+++ b/toonz/sources/toonzlib/sandor_fxs/CIL.cpp@@ -3,7 +3,7 @@// CIL.cpp: implementation of the CCIL class.////////////////////////////////////////////////////////////////////////-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#endifdiff --git a/toonz/sources/toonzlib/sandor_fxs/InputParam.h b/toonz/sources/toonzlib/sandor_fxs/InputParam.hindex 06cd8bea7..f7d2366aa 100644--- a/toonz/sources/toonzlib/sandor_fxs/InputParam.h+++ b/toonz/sources/toonzlib/sandor_fxs/InputParam.h@@ -11,7 +11,7 @@#pragma once#endif // _MSC_VER > 1000-#ifdef WIN32+#ifdef _WIN32#include "Windows.h"#endif#include <algorithm>diff --git a/toonz/sources/toonzlib/sandor_fxs/Params.h b/toonz/sources/toonzlib/sandor_fxs/Params.hindex 1541b1193..9a487407b 100644--- a/toonz/sources/toonzlib/sandor_fxs/Params.h+++ b/toonz/sources/toonzlib/sandor_fxs/Params.h@@ -11,7 +11,7 @@#pragma once#endif // _MSC_VER > 1000-#ifdef WIN32+#ifdef _WIN32#include "Windows.h"#endif#include <fstream>diff --git a/toonz/sources/toonzlib/sandor_fxs/Pattern.cpp b/toonz/sources/toonzlib/sandor_fxs/Pattern.cppindex c8ebad38b..905d0fb13 100644--- a/toonz/sources/toonzlib/sandor_fxs/Pattern.cpp+++ b/toonz/sources/toonzlib/sandor_fxs/Pattern.cpp@@ -3,7 +3,7 @@// Pattern.cpp: implementation of the CPattern class.////////////////////////////////////////////////////////////////////////-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#endifdiff --git a/toonz/sources/toonzlib/sandor_fxs/PatternMapParam.cpp b/toonz/sources/toonzlib/sandor_fxs/PatternMapParam.cppindex a2d8f3426..74ecf2b2a 100644--- a/toonz/sources/toonzlib/sandor_fxs/PatternMapParam.cpp+++ b/toonz/sources/toonzlib/sandor_fxs/PatternMapParam.cpp@@ -4,7 +4,7 @@////////////////////////////////////////////////////////////////////////-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#endif#include <math.h>diff --git a/toonz/sources/toonzlib/sandor_fxs/PatternPosition.cpp b/toonz/sources/toonzlib/sandor_fxs/PatternPosition.cppindex 5a9bd42ed..fa158a3c1 100644--- a/toonz/sources/toonzlib/sandor_fxs/PatternPosition.cpp+++ b/toonz/sources/toonzlib/sandor_fxs/PatternPosition.cpp@@ -4,7 +4,7 @@////////////////////////////////////////////////////////////////////////-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#endifdiff --git a/toonz/sources/toonzlib/sandor_fxs/STColSelPic.h b/toonz/sources/toonzlib/sandor_fxs/STColSelPic.hindex 6d1b2372f..a2a6ea856 100644--- a/toonz/sources/toonzlib/sandor_fxs/STColSelPic.h+++ b/toonz/sources/toonzlib/sandor_fxs/STColSelPic.h@@ -15,7 +15,7 @@#pragma once#endif // _MSC_VER > 1000-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#endif#include <streambuf>diff --git a/toonz/sources/toonzlib/sandor_fxs/YOMBInputParam.cpp b/toonz/sources/toonzlib/sandor_fxs/YOMBInputParam.cppindex 43573334d..a4b6a1e3b 100644--- a/toonz/sources/toonzlib/sandor_fxs/YOMBInputParam.cpp+++ b/toonz/sources/toonzlib/sandor_fxs/YOMBInputParam.cpp@@ -10,7 +10,7 @@#include <search.h>#include "YOMBInputParam.h"//#include "tmsg.h"-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#endif//////////////////////////////////////////////////////////////////////diff --git a/toonz/sources/toonzlib/sandor_fxs/YOMBParam.cpp b/toonz/sources/toonzlib/sandor_fxs/YOMBParam.cppindex e1aa37a48..da2fdb8fb 100644--- a/toonz/sources/toonzlib/sandor_fxs/YOMBParam.cpp+++ b/toonz/sources/toonzlib/sandor_fxs/YOMBParam.cpp@@ -3,7 +3,7 @@// YOMBParam.cpp: implementation of the CYOMBParam class.////////////////////////////////////////////////////////////////////////-#ifdef WIN32+#ifdef _WIN32#include "Windows.h"#endif#include <iostream>@@ -72,7 +72,7 @@ void CYOMBParam::null()m_color.resize(0);}-#ifdef WIN32+#ifdef _WIN32bool CYOMBParam::read(basic_ifstream<char> &in){char token[1000] = "";diff --git a/toonz/sources/toonzlib/sandor_fxs/YOMBParam.h b/toonz/sources/toonzlib/sandor_fxs/YOMBParam.hindex bcce4cc8c..1c92e8ef1 100644--- a/toonz/sources/toonzlib/sandor_fxs/YOMBParam.h+++ b/toonz/sources/toonzlib/sandor_fxs/YOMBParam.h@@ -80,7 +80,7 @@ public:void print();void null();void read(const CInputParam &ip);-#ifdef WIN32+#ifdef _WIN32bool read(basic_ifstream<char> &in);#endifvoid makeColorsUS();diff --git a/toonz/sources/toonzlib/sandor_fxs/calligraph.cpp b/toonz/sources/toonzlib/sandor_fxs/calligraph.cppindex 6e290954a..b2a20848b 100644--- a/toonz/sources/toonzlib/sandor_fxs/calligraph.cpp+++ b/toonz/sources/toonzlib/sandor_fxs/calligraph.cpp@@ -1,6 +1,6 @@-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#include "windows.h"#endifdiff --git a/toonz/sources/toonzlib/sandor_fxs/patternmap.cpp b/toonz/sources/toonzlib/sandor_fxs/patternmap.cppindex 83fc4d60c..9ef7c5d9d 100644--- a/toonz/sources/toonzlib/sandor_fxs/patternmap.cpp+++ b/toonz/sources/toonzlib/sandor_fxs/patternmap.cpp@@ -1,6 +1,6 @@-#ifdef WIN32+#ifdef _WIN32#include "Windows.h"#endif#include <vector>diff --git a/toonz/sources/toonzlib/sandor_fxs/toonz4_6staff.cpp b/toonz/sources/toonzlib/sandor_fxs/toonz4_6staff.cppindex 53baf0584..0d8f851f9 100644--- a/toonz/sources/toonzlib/sandor_fxs/toonz4_6staff.cpp+++ b/toonz/sources/toonzlib/sandor_fxs/toonz4_6staff.cpp@@ -5,7 +5,7 @@#include "tconvert.h"#include "toonz4.6/toonz.h"-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#endif//---------------------------------------------------------------------diff --git a/toonz/sources/toonzlib/screensavermaker.cpp b/toonz/sources/toonzlib/screensavermaker.cppindex 1234e9247..360aff874 100644--- a/toonz/sources/toonzlib/screensavermaker.cpp+++ b/toonz/sources/toonzlib/screensavermaker.cpp@@ -5,7 +5,7 @@#include "tsystem.h"-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#include <windows.h>diff --git a/toonz/sources/toonzlib/tcolumnfx.cpp b/toonz/sources/toonzlib/tcolumnfx.cppindex 2d75e7d3e..be906063e 100644--- a/toonz/sources/toonzlib/tcolumnfx.cpp+++ b/toonz/sources/toonzlib/tcolumnfx.cpp@@ -65,7 +65,7 @@ extern "C" {// Preliminaries//****************************************************************************************-#ifdef WIN32+#ifdef _WIN32template class DV_EXPORT_API TFxDeclarationT<TLevelColumnFx>;template class DV_EXPORT_API TFxDeclarationT<TZeraryColumnFx>;template class DV_EXPORT_API TFxDeclarationT<TXsheetFx>;diff --git a/toonz/sources/toonzlib/texturemanager.cpp b/toonz/sources/toonzlib/texturemanager.cppindex fb9f9e32c..37ab2f9d5 100644--- a/toonz/sources/toonzlib/texturemanager.cpp+++ b/toonz/sources/toonzlib/texturemanager.cpp@@ -17,7 +17,7 @@ TextureManager *TextureManager::instance()return m_instance;}-#ifdef WIN32+#ifdef _WIN32TDimensionI TextureManager::getMaxSize(bool isRGBM){GLenum fmt, type;diff --git a/toonz/sources/toonzlib/tlog.cpp b/toonz/sources/toonzlib/tlog.cppindex 64204d1c2..4aa6a4671 100644--- a/toonz/sources/toonzlib/tlog.cpp+++ b/toonz/sources/toonzlib/tlog.cpp@@ -6,7 +6,7 @@#include <QDateTime>-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4996)#include <windows.h>#include <stdio.h>@@ -35,7 +35,7 @@ enum LEVEL {LEVEL_INFO};-#ifdef WIN32+#ifdef _WIN32WORD Level2WinEventType(LEVEL level){switch (level) {@@ -73,7 +73,7 @@ int Level2XPriority(LEVEL level)void notify(LEVEL level, const string &msg){-#ifdef WIN32+#ifdef _WIN32TCHAR buf[_MAX_PATH + 1];GetModuleFileName(0, buf, _MAX_PATH);diff --git a/toonz/sources/toonzlib/toutlinevectorizer.cpp b/toonz/sources/toonzlib/toutlinevectorizer.cppindex 6b391b346..425c04ef8 100644--- a/toonz/sources/toonzlib/toutlinevectorizer.cpp+++ b/toonz/sources/toonzlib/toutlinevectorizer.cpp@@ -59,7 +59,7 @@ public:};//----------------------------------------------------------#ifdef WIN32+#ifdef _WIN32template class DV_EXPORT_API TSmartPointerT<TRasterT<DataPixel>>;#endiftypedef TRasterPT<DataPixel> DataRasterP;diff --git a/toonz/sources/toonzlib/tstageobject.cpp b/toonz/sources/toonzlib/tstageobject.cppindex 92ba32c40..67fb3d75e 100644--- a/toonz/sources/toonzlib/tstageobject.cpp+++ b/toonz/sources/toonzlib/tstageobject.cpp@@ -43,14 +43,14 @@ using namespace std;// il problema si verifica ruotando gli oggetti sul camera stand//-#ifdef WIN32+#ifdef _WIN32#pragma optimize("", off)#endifTAffine makeRotation(double ang){return TRotation(ang);}-#ifdef WIN32+#ifdef _WIN32#pragma optimize("", on)#endifdiff --git a/toonz/sources/toonzlib/txshsimplelevel.cpp b/toonz/sources/toonzlib/txshsimplelevel.cppindex de6ac66ed..567097ccf 100644--- a/toonz/sources/toonzlib/txshsimplelevel.cpp+++ b/toonz/sources/toonzlib/txshsimplelevel.cpp@@ -1510,7 +1510,7 @@ void TXshSimpleLevel::save(const TFilePath &fp, const TFilePath &oldFp, bool ove// Copy mesh levelsl->save(app);-#ifdef WIN32+#ifdef _WIN32//hides filesoldFilePaths.clear();@@ -1767,7 +1767,7 @@ void TXshSimpleLevel::saveSimpleLevel(const TFilePath &decodedFp, bool overwritehookSet = getHookSet();}-#ifdef WIN32+#ifdef _WIN32// Remove the hidden attribute (since TOStream's fopen fails on hidden files)if (getType() == OVL_XSHLEVEL && !m_editableRange.empty())SetFileAttributesW(hookFile.getWideString().c_str(), FILE_ATTRIBUTE_NORMAL);@@ -1785,7 +1785,7 @@ void TXshSimpleLevel::saveSimpleLevel(const TFilePath &decodedFp, bool overwrite}}-#ifdef WIN32+#ifdef _WIN32if (getType() == OVL_XSHLEVEL && !m_editableRange.empty())TSystem::hideFileOrLevel(hookFile);#endifdiff --git a/toonz/sources/toonzqt/flipconsole.cpp b/toonz/sources/toonzqt/flipconsole.cppindex 873a54957..b8f163a99 100644--- a/toonz/sources/toonzqt/flipconsole.cpp+++ b/toonz/sources/toonzqt/flipconsole.cpp@@ -1334,7 +1334,7 @@ void FlipConsole::onLoadBox(bool isDefine)Preferences::instance()->getViewValues(shrink, dummy);if (shrink != 1) {-#ifdef WIN32+#ifdef _WIN32MessageBox(0, "Cannot use loading box with a shrink factor! ", "Warning", MB_OK);#endifsetChecked(eUseLoadBox, false);diff --git a/toonz/sources/toonzqt/functionsheet.cpp b/toonz/sources/toonzqt/functionsheet.cppindex ef49b13a2..3635b39f7 100644--- a/toonz/sources/toonzqt/functionsheet.cpp+++ b/toonz/sources/toonzqt/functionsheet.cpp@@ -664,7 +664,7 @@ void FunctionSheetCellViewer::drawCells(QPainter &painter, int r0, int c0, int rtext.append("~");}-#ifdef WIN32+#ifdef _WIN32static QFont font("Arial", 9, QFont::Normal);#elsestatic QFont font("Helvetica", 9, QFont::Normal);@@ -712,7 +712,7 @@ void FunctionSheetCellViewer::mouseDoubleClickEvent(QMouseEvent *e)} elsem_lineEdit->setText("");-#ifdef WIN32+#ifdef _WIN32static QFont font("Arial", 9, QFont::Normal);#elsestatic QFont font("Helvetica", 9, QFont::Normal);diff --git a/toonz/sources/toonzqt/imageutils.cpp b/toonz/sources/toonzqt/imageutils.cppindex 2ef497ee4..67be463ac 100644--- a/toonz/sources/toonzqt/imageutils.cpp+++ b/toonz/sources/toonzqt/imageutils.cpp@@ -14,7 +14,7 @@#include "toonz/tproject.h"#include "toonz/Naa2TlvConverter.h"-#ifdef WIN32+#ifdef _WIN32#include "avicodecrestrictions.h"#endif@@ -602,7 +602,7 @@ void convert(const TFilePath &source, const TFilePath &dest,TLevelReaderP lr(source);TLevelP level = lr->loadInfo();-#ifdef WIN32+#ifdef _WIN32if (dstExt == "avi") {TDimension res(0, 0);diff --git a/toonz/sources/toonzqt/keyframenavigator.cpp b/toonz/sources/toonzqt/keyframenavigator.cppindex 1666a22dc..d8431cdbd 100644--- a/toonz/sources/toonzqt/keyframenavigator.cpp+++ b/toonz/sources/toonzqt/keyframenavigator.cpp@@ -19,7 +19,7 @@#include <QPixmap>#include <QIcon>-#ifdef WIN32+#ifdef _WIN32#pragma warning(disable : 4251)#endifdiff --git a/toonz/sources/toonzqt/spreadsheetviewer.cpp b/toonz/sources/toonzqt/spreadsheetviewer.cppindex 7a9a4c119..06bf19ec0 100644--- a/toonz/sources/toonzqt/spreadsheetviewer.cpp+++ b/toonz/sources/toonzqt/spreadsheetviewer.cpp@@ -285,7 +285,7 @@ DragTool *RowPanel::createDragTool(QMouseEvent *)void RowPanel::drawRows(QPainter &p, int r0, int r1){-#ifdef WIN32+#ifdef _WIN32static QFont font("Arial", 9, QFont::Bold);#elsestatic QFont font("Helvetica", 9, QFont::Bold);