From 58ac8207eccbaf056cb1ae7a046bdef48a2483ad Mon Sep 17 00:00:00 2001 From: click Date: Wed, 27 Feb 2013 22:31:25 +0100 Subject: Core: Add support for compiling core in a cygwin-environment - rename/readd/add G3D-patches - give a history on the changes (some G3D-changes didn't even HAVE a patch - boo!) DON'T MESS ABOUT WITH CHANGING DEP/* LIBRARIES AND NOT LEAVING A DIFF IN THE SOURCETRE, MKAY!? --- dep/g3dlite/G3D-v8.0.diff | 520 ------------------------------------ dep/g3dlite/G3D-v8.0_extra.diff | 25 -- dep/g3dlite/G3D-v8.0_hotfix1.diff | 520 ++++++++++++++++++++++++++++++++++++ dep/g3dlite/G3D-v8.0_hotfix2.diff | 14 + dep/g3dlite/G3D-v8.0_hotfix3.diff | 12 + dep/g3dlite/G3D-v8.0_hotfix4.diff | 13 + dep/g3dlite/G3D-v8.0_hotfix5.diff | 71 +++++ dep/g3dlite/Readme.txt | 11 +- dep/g3dlite/include/G3D/System.h | 1 + dep/g3dlite/include/G3D/platform.h | 2 + dep/g3dlite/source/BinaryOutput.cpp | 4 + dep/g3dlite/source/FileSystem.cpp | 4 + dep/g3dlite/source/System.cpp | 4 + 13 files changed, 653 insertions(+), 548 deletions(-) delete mode 100644 dep/g3dlite/G3D-v8.0.diff delete mode 100644 dep/g3dlite/G3D-v8.0_extra.diff create mode 100644 dep/g3dlite/G3D-v8.0_hotfix1.diff create mode 100644 dep/g3dlite/G3D-v8.0_hotfix2.diff create mode 100644 dep/g3dlite/G3D-v8.0_hotfix3.diff create mode 100644 dep/g3dlite/G3D-v8.0_hotfix4.diff create mode 100644 dep/g3dlite/G3D-v8.0_hotfix5.diff (limited to 'dep') diff --git a/dep/g3dlite/G3D-v8.0.diff b/dep/g3dlite/G3D-v8.0.diff deleted file mode 100644 index a82d5378a8b..00000000000 --- a/dep/g3dlite/G3D-v8.0.diff +++ /dev/null @@ -1,520 +0,0 @@ -diff -urN g3d-beta4/include/G3D/debugAssert.h g3d-mangos/include/G3D/debugAssert.h ---- g3d-beta4/include/G3D/debugAssert.h 2010-02-07 23:39:20.000000000 +0100 -+++ g3d-mangos/include/G3D/debugAssert.h 2010-08-26 21:36:32.000000000 +0200 -@@ -39,10 +39,12 @@ - #ifdef G3D_LINUX - // Needed so we can define a global display - // pointer for debugAssert. -+#if 0 /* G3DFIX: Disabled to avoid requirement for X11 libraries */ - #include - #include - #include - #endif -+#endif - - - /** -@@ -178,6 +180,7 @@ - namespace G3D { namespace _internal { - - #ifdef G3D_LINUX -+#if 0 /* G3DFIX: Disabled to avoid requirement for X11 libraries */ - /** - A pointer to the X11 display. Initially NULL. If set to a - non-null value (e.g. by SDLWindow), debugAssert attempts to use -@@ -194,6 +197,7 @@ - */ - extern Window x11Window; - #endif -+#endif - - /** - Pops up an assertion dialog or prints an assertion -diff -urN g3d-beta4/include/G3D/g3dmath.h g3d-mangos/include/G3D/g3dmath.h ---- g3d-beta4/include/G3D/g3dmath.h 2010-02-07 23:39:20.000000000 +0100 -+++ g3d-mangos/include/G3D/g3dmath.h 2010-08-26 21:36:32.000000000 +0200 -@@ -65,6 +65,8 @@ - return ::rand() / double(RAND_MAX); - } - -+#if !defined(_WIN64) -+ - /** - Win32 implementation of the C99 fast rounding routines. - -@@ -99,6 +101,19 @@ - - return intgr; - } -+ -+#else -+ -+ __inline long int lrint (double flt) { -+ return (long int)floor(flt+0.5f); -+ } -+ -+ __inline long int lrintf(float flt) { -+ return (long int)floorf(flt+0.5f); -+ } -+ -+#endif -+ - #endif - - -diff -urN g3d-beta4/include/G3D/platform.h g3d-mangos/include/G3D/platform.h ---- g3d-beta4/include/G3D/platform.h 2010-02-07 23:39:20.000000000 +0100 -+++ g3d-mangos/include/G3D/platform.h 2010-08-26 21:36:32.000000000 +0200 -@@ -56,12 +57,15 @@ - // pi as a constant, which creates a conflict with G3D - #define __FP__ - #else -- #error Unknown platform -+ #error Unknown platform - #endif - - // Detect 64-bit under various compilers - #if (defined(_M_X64) || defined(_WIN64) || defined(__LP64__) || defined(_LP64)) - # define G3D_64BIT -+ #if defined(WIN32) -+ #include -+ #endif - #else - # define G3D_32BIT - #endif -@@ -126,13 +130,11 @@ - // TODO: remove - # pragma warning (disable : 4244) - --# define ZLIB_WINAPI -- - # define restrict - - /** @def G3D_CHECK_PRINTF_METHOD_ARGS() - Enables printf parameter validation on gcc. */ --# define G3D_CHECK_PRINTF_ARGS -+# define G3D_CHECK_PRINTF_ARGS - - /** @def G3D_CHECK_PRINTF_METHOD_ARGS() - Enables printf parameter validation on gcc. */ -diff -urN g3d-beta4/include/G3D/System.h g3d-mangos/include/G3D/System.h ---- g3d-beta4/include/G3D/System.h 2010-02-07 23:39:20.000000000 +0100 -+++ g3d-mangos/include/G3D/System.h 2010-08-26 21:36:32.000000000 +0200 -@@ -375,10 +375,10 @@ - // count now contains the cycle count for the intervening operation. - - */ -- static void beginCycleCount(uint64& cycleCount); -+ /* static void beginCycleCount(uint64& cycleCount); - static void endCycleCount(uint64& cycleCount); - -- static uint64 getCycleCount(); -+ static uint64 getCycleCount(); */ - - inline static void setOutOfMemoryCallback(OutOfMemoryCallback c) { - instance().m_outOfMemoryCallback = c; -@@ -438,7 +438,7 @@ - - }; - -- -+/* don't need that for MaNGOS, not portable to Win64... - #ifdef _MSC_VER - inline uint64 System::getCycleCount() { - uint32 timehi, timelo; -@@ -493,14 +493,14 @@ - cycleCount = getCycleCount() - cycleCount; - #else - AbsoluteTime end = UpTime(); -- Nanoseconds diffNS = -+ Nanoseconds diffNS = - AbsoluteDeltaToNanoseconds(end, UInt64ToUnsignedWide(cycleCount)); -- cycleCount = -- (uint64) ((double) (instance().m_OSXCPUSpeed) * -+ cycleCount = -+ (uint64) ((double) (instance().m_OSXCPUSpeed) * - (double) UnsignedWideToUInt64(diffNS) * instance().m_secondsPerNS); - #endif - } -- -+ */ - - } // namespace - -diff -urN g3d-beta4/source/BinaryInput.cpp g3d-mangos/source/BinaryInput.cpp ---- g3d-beta4/source/BinaryInput.cpp 2010-02-07 23:39:20.000000000 +0100 -+++ g3d-mangos/source/BinaryInput.cpp 2010-08-15 11:37:26.000000000 +0200 -@@ -39,7 +39,9 @@ - #include "G3D/Log.h" - #include "G3D/FileSystem.h" - #include --#include "zip.h" -+#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */ -+ #include "zip.h" -+#endif - #include - - namespace G3D { -@@ -273,6 +275,7 @@ BinaryInput::BinaryInput( - _internal::currentFilesUsed.insert(m_filename); - - -+#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */ - std::string zipfile; - if (FileSystem::inZipfile(m_filename, zipfile)) { - // Load from zipfile -@@ -304,6 +307,7 @@ BinaryInput::BinaryInput( - m_freeBuffer = true; - return; - } -+#endif - - // Figure out how big the file is and verify that it exists. - m_length = FileSystem::size(m_filename); -diff -urN g3d-beta4/source/debugAssert.cpp g3d-mangos/source/debugAssert.cpp ---- g3d-beta4/source/debugAssert.cpp 2010-02-07 23:39:20.000000000 +0100 -+++ g3d-mangos/source/debugAssert.cpp 2010-08-15 11:37:26.000000000 +0200 -@@ -37,9 +37,11 @@ - AssertionHook _failureHook = _handleErrorCheck_; - - #ifdef G3D_LINUX -+#if 0 /* G3DFIX: Disabled to avoid requirement for X11 libraries */ - Display* x11Display = NULL; - Window x11Window = 0; - #endif -+#endif - - - #ifdef G3D_WIN32 -@@ -250,6 +252,7 @@ - ClipCursor(NULL); - - #elif defined(G3D_LINUX) -+#if 0 /* G3DFIX: Disabled to avoid requirement for X11 libraries */ - if (x11Display != NULL) { - XUngrabPointer(x11Display, CurrentTime); - XUngrabKeyboard(x11Display, CurrentTime); -@@ -264,6 +267,7 @@ - XAllowEvents(x11Display, AsyncPointer, CurrentTime); - XFlush(x11Display); - } -+#endif - #elif defined(G3D_OSX) - // TODO: OS X - #endif -diff -urN g3d-beta4/source/FileSystem.cpp g3d-mangos/source/FileSystem.cpp ---- g3d-beta4/source/FileSystem.cpp 2010-02-07 23:39:20.000000000 +0100 -+++ g3d-mangos/source/FileSystem.cpp 2010-08-15 11:37:26.000000000 +0200 -@@ -12,7 +12,9 @@ - #include "G3D/fileutils.h" - #include - #include --#include "zip.h" -+#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */ -+ #include "zip.h" -+#endif - #include "G3D/g3dfnmatch.h" - #include "G3D/BinaryInput.h" - #include "G3D/BinaryOutput.h" -@@ -78,6 +80,7 @@ bool FileSystem::Dir::contains(const std - } - - void FileSystem::Dir::computeZipListing(const std::string& zipfile, const std::string& pathInsideZipfile) { -+#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */ - struct zip* z = zip_open( FilePath::removeTrailingSlash(zipfile).c_str(), ZIP_CHECKCONS, NULL ); - debugAssert(z); - -@@ -126,6 +129,7 @@ void FileSystem::Dir::computeZipListing( - - zip_close(z); - z = NULL; -+#endif - } - - -@@ -522,6 +526,7 @@ int64 FileSystem::_size(const std::strin - int result = stat64(filename.c_str(), &st); - - if (result == -1) { -+#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */ - std::string zip, contents; - if (zipfileExists(filename, zip, contents)) { - int64 requiredMem; -@@ -538,8 +543,11 @@ int64 FileSystem::_size(const std::strin - zip_close(z); - return requiredMem; - } else { -+#endif - return -1; -+#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */ - } -+#endif - } - - return st.st_size; -diff -urN g3d-beta4/source/fileutils.cpp g3d-mangos/source/fileutils.cpp ---- g3d-beta4/source/fileutils.cpp 2010-02-07 23:39:20.000000000 +0100 -+++ g3d-mangos/source/fileutils.cpp 2010-08-15 11:37:26.000000000 +0200 -@@ -20,7 +20,9 @@ - - #include - #include --#include "zip.h" -+#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */ -+ #include "zip.h" -+#endif - - #ifdef G3D_WIN32 - // Needed for _getcwd -@@ -144,7 +146,7 @@ - void*& data, - size_t& length) { - std::string zip, desiredFile; -- -+#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */ - if (zipfileExists(file, zip, desiredFile)) { - struct zip *z = zip_open( zip.c_str(), ZIP_CHECKCONS, NULL ); - { -@@ -167,6 +169,9 @@ - } else { - data = NULL; - } -+#else -+ data = NULL; -+#endif - } - - -@@ -180,6 +185,7 @@ - int result = _stat(filename.c_str(), &st); - - if (result == -1) { -+#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */ - std::string zip, contents; - if(zipfileExists(filename, zip, contents)){ - int64 requiredMem; -@@ -198,6 +204,9 @@ - } else { - return -1; - } -+#else -+ return -1; -+#endif - } - - return st.st_size; -@@ -518,6 +527,7 @@ - - /////////////////////////////////////////////////////////////////////////////// - -+#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */ - /* Helper methods for zipfileExists()*/ - // Given a string (the drive) and an array (the path), computes the directory - static void _zip_resolveDirectory(std::string& completeDir, const std::string& drive, const Array& path, const int length){ -@@ -551,12 +561,12 @@ - } - return true; - } -- -+#endif - - // If no zipfile exists, outZipfile and outInternalFile are unchanged - bool zipfileExists(const std::string& filename, std::string& outZipfile, - std::string& outInternalFile){ -- -+#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */ - Array path; - std::string drive, base, ext, zipfile, infile; - parseFilename(filename, drive, path, base, ext); -@@ -618,7 +628,7 @@ - } - - } -- -+#endif - // not a valid directory structure ever, - // obviously no .zip was found within the path - return false; -@@ -900,7 +910,7 @@ - # endif - } - -- -+#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */ - /** - @param path The zipfile name (no trailing slash) - @param prefix Directory inside the zipfile. No leading slash, must have trailing slash if non-empty. -@@ -951,13 +961,14 @@ - } - } - } -- -+#endif - - static void getFileOrDirListZip(const std::string& path, - const std::string& prefix, - Array& files, - bool wantFiles, - bool includePath){ -+#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */ - struct zip *z = zip_open( path.c_str(), ZIP_CHECKCONS, NULL ); - - Set fileSet; -@@ -973,6 +984,7 @@ - zip_close( z ); - - fileSet.getMembers(files); -+#endif - } - - -diff -urN g3d-beta4/source/prompt.cpp g3d-mangos/source/prompt.cpp ---- g3d-beta4/source/prompt.cpp 2010-02-07 23:39:20.000000000 +0100 -+++ g3d-mangos/source/prompt.cpp 2010-08-15 11:37:26.000000000 +0200 -@@ -21,6 +21,7 @@ - # define _getch getchar - #endif - -+#if 0 /* G3DFIX: exclude GUI prompt code */ - #ifdef G3D_OSX - - /*#ifdef __LP64__ -@@ -37,9 +38,11 @@ - */ - - #endif -+#endif /* G3DFIX: exclude GUI prompt code */ - - namespace G3D { - -+#if 0 /* G3DFIX: exclude GUI prompt code */ - #ifdef G3D_WIN32 - - namespace _internal { -@@ -469,6 +472,7 @@ - } - - #endif -+#endif /* G3DFIX: exclude GUI prompt code */ - - - /** -@@ -531,6 +535,8 @@ - return c; - } - -+#if 0 /* G3DFIX: exclude GUI prompt code */ -+ - #ifdef G3D_OSX - - // See http://developer.apple.com/documentation/Carbon/Reference/Carbon_Event_Manager_Ref/index.html -@@ -689,13 +695,15 @@ - - #endif - -+#endif /* G3DFIX: exclude GUI prompt code */ -+ - int prompt( - const char* windowTitle, - const char* prompt, - const char** choice, - int numChoices, - bool useGui) { -- -+#if 0 /* G3DFIX: exclude GUI prompt code */ - #ifdef G3D_WIN32 - if (useGui) { - // Build the message box -@@ -709,6 +717,7 @@ - return guiPrompt(windowTitle, prompt, choice, numChoices); - } - #endif -+#endif /* G3DFIX: exclude GUI prompt code */ - return textPrompt(windowTitle, prompt, choice, numChoices); - } - -diff -urN g3d-beta4/source/RegistryUtil.cpp g3d-mangos/source/RegistryUtil.cpp ---- g3d-beta4/source/RegistryUtil.cpp 2010-02-07 23:39:20.000000000 +0100 -+++ g3d-mangos/source/RegistryUtil.cpp 2010-08-15 11:37:26.000000000 +0200 -@@ -257,7 +257,7 @@ - - - // static helpers --static HKEY getRootKeyFromString(const char* str, uint32 length) { -+static HKEY getRootKeyFromString(const char* str, size_t length) { - debugAssert(str); - - if (str) { -diff -urN g3d-beta4/source/System.cpp g3d-mangos/source/System.cpp ---- g3d-beta4/source/System.cpp 2010-02-07 23:39:20.000000000 +0100 -+++ g3d-mangos/source/System.cpp 2010-08-15 11:37:26.000000000 +0200 -@@ -80,8 +80,9 @@ - #endif - - // SIMM include -+#ifdef __SSE__ - #include -- -+#endif - - namespace G3D { - -@@ -559,7 +560,7 @@ - #endif - } - --#if defined(G3D_WIN32) -+#if defined(G3D_WIN32) && !defined(G3D_64BIT) /* G3DFIX: Don't check if on 64-bit Windows platforms */ - #pragma message("Port System::memcpy SIMD to all platforms") - /** Michael Herf's fast memcpy */ - void memcpyMMX(void* dst, const void* src, int nbytes) { -@@ -610,7 +611,7 @@ - #endif - - void System::memcpy(void* dst, const void* src, size_t numBytes) { --#if defined(G3D_WIN32) -+#if defined(G3D_WIN32) && !defined(G3D_64BIT) /* G3DFIX: Don't check if on 64-bit Windows platforms */ - memcpyMMX(dst, src, numBytes); - #else - ::memcpy(dst, src, numBytes); -@@ -620,7 +621,7 @@ - - /** Michael Herf's fastest memset. n32 must be filled with the same - character repeated. */ --#if defined(G3D_WIN32) -+#if defined(G3D_WIN32) && !defined(G3D_64BIT) /* G3DFIX: Don't check if on 64-bit Windows platforms */ - #pragma message("Port System::memfill SIMD to all platforms") - - // On x86 processors, use MMX -@@ -659,7 +660,7 @@ - - - void System::memset(void* dst, uint8 value, size_t numBytes) { --#if defined(G3D_WIN32) -+#if defined(G3D_WIN32) && !defined(G3D_64BIT) /* G3DFIX: Don't check if on 64-bit Windows platforms */ - uint32 v = value; - v = v + (v << 8) + (v << 16) + (v << 24); - G3D::memfill(dst, v, numBytes); -@@ -1676,6 +1677,7 @@ - - // VC on Intel - void System::cpuid(CPUIDFunction func, uint32& areg, uint32& breg, uint32& creg, uint32& dreg) { -+#if !defined(G3D_64BIT) /* G3DFIX: Don't check if on 64-bit platform */ - // Can't copy from assembler direct to a function argument (which is on the stack) in VC. - uint32 a,b,c,d; - -@@ -1693,6 +1695,14 @@ - breg = b; - creg = c; - dreg = d; -+#else -+ int CPUInfo[4]; -+ __cpuid(CPUInfo, func); -+ memcpy(&areg, &CPUInfo[0], 4); -+ memcpy(&breg, &CPUInfo[1], 4); -+ memcpy(&creg, &CPUInfo[2], 4); -+ memcpy(&dreg, &CPUInfo[3], 4); -+#endif - } - - #elif defined(G3D_OSX) && ! defined(G3D_OSX_INTEL) diff --git a/dep/g3dlite/G3D-v8.0_extra.diff b/dep/g3dlite/G3D-v8.0_extra.diff deleted file mode 100644 index 62c513435b9..00000000000 --- a/dep/g3dlite/G3D-v8.0_extra.diff +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/dep/g3dlite/include/G3D/GMutex.h b/dep/g3dlite/include/G3D/GMutex.h -index 3469b81..9fe098d 100644 ---- a/dep/g3dlite/include/G3D/GMutex.h -+++ b/dep/g3dlite/include/G3D/GMutex.h -@@ -16,6 +16,7 @@ - #ifndef G3D_WIN32 - # include - # include -+# include - #endif - - -diff --git a/dep/g3dlite/include/G3D/platform.h b/dep/g3dlite/include/G3D/platform.h -index c8d2f0b..11093f4 100644 ---- a/dep/g3dlite/include/G3D/platform.h -+++ b/dep/g3dlite/include/G3D/platform.h -@@ -57,7 +57,7 @@ - #elif defined(__linux__) - #define G3D_LINUX - #elif defined(__APPLE__) -- #define G3D_OSX -+ #define G3D_LINUX - - // Prevent OS X fp.h header from being included; it defines - // pi as a constant, which creates a conflict with G3D diff --git a/dep/g3dlite/G3D-v8.0_hotfix1.diff b/dep/g3dlite/G3D-v8.0_hotfix1.diff new file mode 100644 index 00000000000..ec90cebbecf --- /dev/null +++ b/dep/g3dlite/G3D-v8.0_hotfix1.diff @@ -0,0 +1,520 @@ +diff -urN a/dep/g3dlite/include/G3D/debugAssert.h b/dep/g3dlite/include/G3D/debugAssert.h +--- a/dep/g3dlite/include/G3D/debugAssert.h 2010-02-07 23:39:20.000000000 +0100 ++++ b/dep/g3dlite/include/G3D/debugAssert.h 2010-08-26 21:36:32.000000000 +0200 +@@ -39,10 +39,12 @@ + #ifdef G3D_LINUX + // Needed so we can define a global display + // pointer for debugAssert. ++#if 0 /* G3DFIX: Disabled to avoid requirement for X11 libraries */ + #include + #include + #include + #endif ++#endif + + + /** +@@ -178,6 +180,7 @@ + namespace G3D { namespace _internal { + + #ifdef G3D_LINUX ++#if 0 /* G3DFIX: Disabled to avoid requirement for X11 libraries */ + /** + A pointer to the X11 display. Initially NULL. If set to a + non-null value (e.g. by SDLWindow), debugAssert attempts to use +@@ -194,6 +197,7 @@ + */ + extern Window x11Window; + #endif ++#endif + + /** + Pops up an assertion dialog or prints an assertion +diff -urN a/dep/g3dlite/include/G3D/g3dmath.h b/dep/g3dlite/include/G3D/g3dmath.h +--- a/dep/g3dlite/include/G3D/g3dmath.h 2010-02-07 23:39:20.000000000 +0100 ++++ b/dep/g3dlite/include/G3D/g3dmath.h 2010-08-26 21:36:32.000000000 +0200 +@@ -65,6 +65,8 @@ + return ::rand() / double(RAND_MAX); + } + ++#if !defined(_WIN64) ++ + /** + Win32 implementation of the C99 fast rounding routines. + +@@ -99,6 +101,19 @@ + + return intgr; + } ++ ++#else ++ ++ __inline long int lrint (double flt) { ++ return (long int)floor(flt+0.5f); ++ } ++ ++ __inline long int lrintf(float flt) { ++ return (long int)floorf(flt+0.5f); ++ } ++ ++#endif ++ + #endif + + +diff -urN a/dep/g3dlite/include/G3D/platform.h b/dep/g3dlite/include/G3D/platform.h +--- a/dep/g3dlite/include/G3D/platform.h 2010-02-07 23:39:20.000000000 +0100 ++++ b/dep/g3dlite/include/G3D/platform.h 2010-08-26 21:36:32.000000000 +0200 +@@ -56,12 +57,15 @@ + // pi as a constant, which creates a conflict with G3D + #define __FP__ + #else +- #error Unknown platform ++ #error Unknown platform + #endif + + // Detect 64-bit under various compilers + #if (defined(_M_X64) || defined(_WIN64) || defined(__LP64__) || defined(_LP64)) + # define G3D_64BIT ++ #if defined(WIN32) ++ #include ++ #endif + #else + # define G3D_32BIT + #endif +@@ -126,13 +130,11 @@ + // TODO: remove + # pragma warning (disable : 4244) + +-# define ZLIB_WINAPI +- + # define restrict + + /** @def G3D_CHECK_PRINTF_METHOD_ARGS() + Enables printf parameter validation on gcc. */ +-# define G3D_CHECK_PRINTF_ARGS ++# define G3D_CHECK_PRINTF_ARGS + + /** @def G3D_CHECK_PRINTF_METHOD_ARGS() + Enables printf parameter validation on gcc. */ +diff -urN a/dep/g3dlite/include/G3D/System.h b/dep/g3dlite/include/G3D/System.h +--- a/dep/g3dlite/include/G3D/System.h 2010-02-07 23:39:20.000000000 +0100 ++++ b/dep/g3dlite/include/G3D/System.h 2010-08-26 21:36:32.000000000 +0200 +@@ -375,10 +375,10 @@ + // count now contains the cycle count for the intervening operation. + + */ +- static void beginCycleCount(uint64& cycleCount); ++ /* static void beginCycleCount(uint64& cycleCount); + static void endCycleCount(uint64& cycleCount); + +- static uint64 getCycleCount(); ++ static uint64 getCycleCount(); */ + + inline static void setOutOfMemoryCallback(OutOfMemoryCallback c) { + instance().m_outOfMemoryCallback = c; +@@ -438,7 +438,7 @@ + + }; + +- ++/* don't need that for MaNGOS, not portable to Win64... + #ifdef _MSC_VER + inline uint64 System::getCycleCount() { + uint32 timehi, timelo; +@@ -493,14 +493,14 @@ + cycleCount = getCycleCount() - cycleCount; + #else + AbsoluteTime end = UpTime(); +- Nanoseconds diffNS = ++ Nanoseconds diffNS = + AbsoluteDeltaToNanoseconds(end, UInt64ToUnsignedWide(cycleCount)); +- cycleCount = +- (uint64) ((double) (instance().m_OSXCPUSpeed) * ++ cycleCount = ++ (uint64) ((double) (instance().m_OSXCPUSpeed) * + (double) UnsignedWideToUInt64(diffNS) * instance().m_secondsPerNS); + #endif + } +- ++ */ + + } // namespace + +diff -urN a/dep/g3dlite/source/BinaryInput.cpp b/dep/g3dlite/source/BinaryInput.cpp +--- a/dep/g3dlite/source/BinaryInput.cpp 2010-02-07 23:39:20.000000000 +0100 ++++ b/dep/g3dlite/source/BinaryInput.cpp 2010-08-15 11:37:26.000000000 +0200 +@@ -39,7 +39,9 @@ + #include "G3D/Log.h" + #include "G3D/FileSystem.h" + #include +-#include "zip.h" ++#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */ ++ #include "zip.h" ++#endif + #include + + namespace G3D { +@@ -273,6 +275,7 @@ BinaryInput::BinaryInput( + _internal::currentFilesUsed.insert(m_filename); + + ++#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */ + std::string zipfile; + if (FileSystem::inZipfile(m_filename, zipfile)) { + // Load from zipfile +@@ -304,6 +307,7 @@ BinaryInput::BinaryInput( + m_freeBuffer = true; + return; + } ++#endif + + // Figure out how big the file is and verify that it exists. + m_length = FileSystem::size(m_filename); +diff -urN a/dep/g3dlite/source/debugAssert.cpp b/dep/g3dlite/source/debugAssert.cpp +--- a/dep/g3dlite/source/debugAssert.cpp 2010-02-07 23:39:20.000000000 +0100 ++++ b/dep/g3dlite/source/debugAssert.cpp 2010-08-15 11:37:26.000000000 +0200 +@@ -37,9 +37,11 @@ + AssertionHook _failureHook = _handleErrorCheck_; + + #ifdef G3D_LINUX ++#if 0 /* G3DFIX: Disabled to avoid requirement for X11 libraries */ + Display* x11Display = NULL; + Window x11Window = 0; + #endif ++#endif + + + #ifdef G3D_WIN32 +@@ -250,6 +252,7 @@ + ClipCursor(NULL); + + #elif defined(G3D_LINUX) ++#if 0 /* G3DFIX: Disabled to avoid requirement for X11 libraries */ + if (x11Display != NULL) { + XUngrabPointer(x11Display, CurrentTime); + XUngrabKeyboard(x11Display, CurrentTime); +@@ -264,6 +267,7 @@ + XAllowEvents(x11Display, AsyncPointer, CurrentTime); + XFlush(x11Display); + } ++#endif + #elif defined(G3D_OSX) + // TODO: OS X + #endif +diff -urN a/dep/g3dlite/source/FileSystem.cpp b/dep/g3dlite/source/FileSystem.cpp +--- a/dep/g3dlite/source/FileSystem.cpp 2010-02-07 23:39:20.000000000 +0100 ++++ b/dep/g3dlite/source/FileSystem.cpp 2010-08-15 11:37:26.000000000 +0200 +@@ -12,7 +12,9 @@ + #include "G3D/fileutils.h" + #include + #include +-#include "zip.h" ++#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */ ++ #include "zip.h" ++#endif + #include "G3D/g3dfnmatch.h" + #include "G3D/BinaryInput.h" + #include "G3D/BinaryOutput.h" +@@ -78,6 +80,7 @@ bool FileSystem::Dir::contains(const std + } + + void FileSystem::Dir::computeZipListing(const std::string& zipfile, const std::string& pathInsideZipfile) { ++#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */ + struct zip* z = zip_open( FilePath::removeTrailingSlash(zipfile).c_str(), ZIP_CHECKCONS, NULL ); + debugAssert(z); + +@@ -126,6 +129,7 @@ void FileSystem::Dir::computeZipListing( + + zip_close(z); + z = NULL; ++#endif + } + + +@@ -522,6 +526,7 @@ int64 FileSystem::_size(const std::strin + int result = stat64(filename.c_str(), &st); + + if (result == -1) { ++#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */ + std::string zip, contents; + if (zipfileExists(filename, zip, contents)) { + int64 requiredMem; +@@ -538,8 +543,11 @@ int64 FileSystem::_size(const std::strin + zip_close(z); + return requiredMem; + } else { ++#endif + return -1; ++#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */ + } ++#endif + } + + return st.st_size; +diff -urN a/dep/g3dlite/source/fileutils.cpp b/dep/g3dlite/source/fileutils.cpp +--- a/dep/g3dlite/source/fileutils.cpp 2010-02-07 23:39:20.000000000 +0100 ++++ b/dep/g3dlite/source/fileutils.cpp 2010-08-15 11:37:26.000000000 +0200 +@@ -20,7 +20,9 @@ + + #include + #include +-#include "zip.h" ++#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */ ++ #include "zip.h" ++#endif + + #ifdef G3D_WIN32 + // Needed for _getcwd +@@ -144,7 +146,7 @@ + void*& data, + size_t& length) { + std::string zip, desiredFile; +- ++#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */ + if (zipfileExists(file, zip, desiredFile)) { + struct zip *z = zip_open( zip.c_str(), ZIP_CHECKCONS, NULL ); + { +@@ -167,6 +169,9 @@ + } else { + data = NULL; + } ++#else ++ data = NULL; ++#endif + } + + +@@ -180,6 +185,7 @@ + int result = _stat(filename.c_str(), &st); + + if (result == -1) { ++#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */ + std::string zip, contents; + if(zipfileExists(filename, zip, contents)){ + int64 requiredMem; +@@ -198,6 +204,9 @@ + } else { + return -1; + } ++#else ++ return -1; ++#endif + } + + return st.st_size; +@@ -518,6 +527,7 @@ + + /////////////////////////////////////////////////////////////////////////////// + ++#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */ + /* Helper methods for zipfileExists()*/ + // Given a string (the drive) and an array (the path), computes the directory + static void _zip_resolveDirectory(std::string& completeDir, const std::string& drive, const Array& path, const int length){ +@@ -551,12 +561,12 @@ + } + return true; + } +- ++#endif + + // If no zipfile exists, outZipfile and outInternalFile are unchanged + bool zipfileExists(const std::string& filename, std::string& outZipfile, + std::string& outInternalFile){ +- ++#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */ + Array path; + std::string drive, base, ext, zipfile, infile; + parseFilename(filename, drive, path, base, ext); +@@ -618,7 +628,7 @@ + } + + } +- ++#endif + // not a valid directory structure ever, + // obviously no .zip was found within the path + return false; +@@ -900,7 +910,7 @@ + # endif + } + +- ++#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */ + /** + @param path The zipfile name (no trailing slash) + @param prefix Directory inside the zipfile. No leading slash, must have trailing slash if non-empty. +@@ -951,13 +961,14 @@ + } + } + } +- ++#endif + + static void getFileOrDirListZip(const std::string& path, + const std::string& prefix, + Array& files, + bool wantFiles, + bool includePath){ ++#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */ + struct zip *z = zip_open( path.c_str(), ZIP_CHECKCONS, NULL ); + + Set fileSet; +@@ -973,6 +984,7 @@ + zip_close( z ); + + fileSet.getMembers(files); ++#endif + } + + +diff -urN a/dep/g3dlite/source/prompt.cpp b/dep/g3dlite/source/prompt.cpp +--- a/dep/g3dlite/source/prompt.cpp 2010-02-07 23:39:20.000000000 +0100 ++++ b/dep/g3dlite/source/prompt.cpp 2010-08-15 11:37:26.000000000 +0200 +@@ -21,6 +21,7 @@ + # define _getch getchar + #endif + ++#if 0 /* G3DFIX: exclude GUI prompt code */ + #ifdef G3D_OSX + + /*#ifdef __LP64__ +@@ -37,9 +38,11 @@ + */ + + #endif ++#endif /* G3DFIX: exclude GUI prompt code */ + + namespace G3D { + ++#if 0 /* G3DFIX: exclude GUI prompt code */ + #ifdef G3D_WIN32 + + namespace _internal { +@@ -469,6 +472,7 @@ + } + + #endif ++#endif /* G3DFIX: exclude GUI prompt code */ + + + /** +@@ -531,6 +535,8 @@ + return c; + } + ++#if 0 /* G3DFIX: exclude GUI prompt code */ ++ + #ifdef G3D_OSX + + // See http://developer.apple.com/documentation/Carbon/Reference/Carbon_Event_Manager_Ref/index.html +@@ -689,13 +695,15 @@ + + #endif + ++#endif /* G3DFIX: exclude GUI prompt code */ ++ + int prompt( + const char* windowTitle, + const char* prompt, + const char** choice, + int numChoices, + bool useGui) { +- ++#if 0 /* G3DFIX: exclude GUI prompt code */ + #ifdef G3D_WIN32 + if (useGui) { + // Build the message box +@@ -709,6 +717,7 @@ + return guiPrompt(windowTitle, prompt, choice, numChoices); + } + #endif ++#endif /* G3DFIX: exclude GUI prompt code */ + return textPrompt(windowTitle, prompt, choice, numChoices); + } + +diff -urN a/dep/g3dlite/source/RegistryUtil.cpp b/dep/g3dlite/source/RegistryUtil.cpp +--- a/dep/g3dlite/source/RegistryUtil.cpp 2010-02-07 23:39:20.000000000 +0100 ++++ b/dep/g3dlite/source/RegistryUtil.cpp 2010-08-15 11:37:26.000000000 +0200 +@@ -257,7 +257,7 @@ + + + // static helpers +-static HKEY getRootKeyFromString(const char* str, uint32 length) { ++static HKEY getRootKeyFromString(const char* str, size_t length) { + debugAssert(str); + + if (str) { +diff -urN a/dep/g3dlite/source/System.cpp b/dep/g3dlite/source/System.cpp +--- a/dep/g3dlite/source/System.cpp 2010-02-07 23:39:20.000000000 +0100 ++++ b/dep/g3dlite/source/System.cpp 2010-08-15 11:37:26.000000000 +0200 +@@ -80,8 +80,9 @@ + #endif + + // SIMM include ++#ifdef __SSE__ + #include +- ++#endif + + namespace G3D { + +@@ -559,7 +560,7 @@ + #endif + } + +-#if defined(G3D_WIN32) ++#if defined(G3D_WIN32) && !defined(G3D_64BIT) /* G3DFIX: Don't check if on 64-bit Windows platforms */ + #pragma message("Port System::memcpy SIMD to all platforms") + /** Michael Herf's fast memcpy */ + void memcpyMMX(void* dst, const void* src, int nbytes) { +@@ -610,7 +611,7 @@ + #endif + + void System::memcpy(void* dst, const void* src, size_t numBytes) { +-#if defined(G3D_WIN32) ++#if defined(G3D_WIN32) && !defined(G3D_64BIT) /* G3DFIX: Don't check if on 64-bit Windows platforms */ + memcpyMMX(dst, src, numBytes); + #else + ::memcpy(dst, src, numBytes); +@@ -620,7 +621,7 @@ + + /** Michael Herf's fastest memset. n32 must be filled with the same + character repeated. */ +-#if defined(G3D_WIN32) ++#if defined(G3D_WIN32) && !defined(G3D_64BIT) /* G3DFIX: Don't check if on 64-bit Windows platforms */ + #pragma message("Port System::memfill SIMD to all platforms") + + // On x86 processors, use MMX +@@ -659,7 +660,7 @@ + + + void System::memset(void* dst, uint8 value, size_t numBytes) { +-#if defined(G3D_WIN32) ++#if defined(G3D_WIN32) && !defined(G3D_64BIT) /* G3DFIX: Don't check if on 64-bit Windows platforms */ + uint32 v = value; + v = v + (v << 8) + (v << 16) + (v << 24); + G3D::memfill(dst, v, numBytes); +@@ -1676,6 +1677,7 @@ + + // VC on Intel + void System::cpuid(CPUIDFunction func, uint32& areg, uint32& breg, uint32& creg, uint32& dreg) { ++#if !defined(G3D_64BIT) /* G3DFIX: Don't check if on 64-bit platform */ + // Can't copy from assembler direct to a function argument (which is on the stack) in VC. + uint32 a,b,c,d; + +@@ -1693,6 +1695,14 @@ + breg = b; + creg = c; + dreg = d; ++#else ++ int CPUInfo[4]; ++ __cpuid(CPUInfo, func); ++ memcpy(&areg, &CPUInfo[0], 4); ++ memcpy(&breg, &CPUInfo[1], 4); ++ memcpy(&creg, &CPUInfo[2], 4); ++ memcpy(&dreg, &CPUInfo[3], 4); ++#endif + } + + #elif defined(G3D_OSX) && ! defined(G3D_OSX_INTEL) diff --git a/dep/g3dlite/G3D-v8.0_hotfix2.diff b/dep/g3dlite/G3D-v8.0_hotfix2.diff new file mode 100644 index 00000000000..bb66c4a6a29 --- /dev/null +++ b/dep/g3dlite/G3D-v8.0_hotfix2.diff @@ -0,0 +1,14 @@ +diff --git a/dep/g3dlite/source/g3dmath.cpp b/dep/g3dlite/source/g3dmath.cpp +index e846f8c..84e8345 100644 +--- a/dep/g3dlite/source/g3dmath.cpp ++++ b/dep/g3dlite/source/g3dmath.cpp +@@ -41,7 +41,7 @@ double inf() { + } + + bool isNaN(float x) { +- static const float n = nan(); ++ static const float n = fnan(); + return memcmp(&x, &n, sizeof(float)) == 0; + } + + diff --git a/dep/g3dlite/G3D-v8.0_hotfix3.diff b/dep/g3dlite/G3D-v8.0_hotfix3.diff new file mode 100644 index 00000000000..d556103c96d --- /dev/null +++ b/dep/g3dlite/G3D-v8.0_hotfix3.diff @@ -0,0 +1,12 @@ +diff --git a/dep/g3dlite/include/G3D/GMutex.h b/dep/g3dlite/include/G3D/GMutex.h +index 3469b81..9fe098d 100644 +--- a/dep/g3dlite/include/G3D/GMutex.h ++++ b/dep/g3dlite/include/G3D/GMutex.h +@@ -16,6 +16,7 @@ + #ifndef G3D_WIN32 + # include + # include ++# include + #endif + + diff --git a/dep/g3dlite/G3D-v8.0_hotfix4.diff b/dep/g3dlite/G3D-v8.0_hotfix4.diff new file mode 100644 index 00000000000..cae92747a9a --- /dev/null +++ b/dep/g3dlite/G3D-v8.0_hotfix4.diff @@ -0,0 +1,13 @@ +diff --git a/dep/g3dlite/include/G3D/platform.h b/dep/g3dlite/include/G3D/platform.h +index c8d2f0b..11093f4 100644 +--- a/dep/g3dlite/include/G3D/platform.h ++++ b/dep/g3dlite/include/G3D/platform.h +@@ -57,7 +57,7 @@ + #elif defined(__linux__) + #define G3D_LINUX + #elif defined(__APPLE__) +- #define G3D_OSX ++ #define G3D_LINUX + + // Prevent OS X fp.h header from being included; it defines + // pi as a constant, which creates a conflict with G3D diff --git a/dep/g3dlite/G3D-v8.0_hotfix5.diff b/dep/g3dlite/G3D-v8.0_hotfix5.diff new file mode 100644 index 00000000000..29b7eba811b --- /dev/null +++ b/dep/g3dlite/G3D-v8.0_hotfix5.diff @@ -0,0 +1,71 @@ +diff --git a/dep/g3dlite/include/G3D/System.h b/dep/g3dlite/include/G3D/System.h +index 1c0cf99..f160774 100644 +--- a/dep/g3dlite/include/G3D/System.h ++++ b/dep/g3dlite/include/G3D/System.h +@@ -19,6 +19,7 @@ + #include "G3D/G3DGameUnits.h" + #include "G3D/BinaryFormat.h" + #include ++#include + + #ifdef G3D_OSX + # include +diff --git a/dep/g3dlite/include/G3D/platform.h b/dep/g3dlite/include/G3D/platform.h +index 11093f4..614c0ed 100644 +--- a/dep/g3dlite/include/G3D/platform.h ++++ b/dep/g3dlite/include/G3D/platform.h +@@ -56,6 +56,8 @@ + #define G3D_LINUX + #elif defined(__linux__) + #define G3D_LINUX ++#elif defined(__CYGWIN__) ++ #define G3D_LINUX + #elif defined(__APPLE__) + #define G3D_LINUX + +diff --git a/dep/g3dlite/source/BinaryOutput.cpp b/dep/g3dlite/source/BinaryOutput.cpp +index 054211d..81fa982 100644 +--- a/dep/g3dlite/source/BinaryOutput.cpp ++++ b/dep/g3dlite/source/BinaryOutput.cpp +@@ -22,6 +22,10 @@ + # include + #endif + ++#ifdef __CYGWIN__ ++# include ++#endif ++ + // Largest memory buffer that the system will use for writing to + // disk. After this (or if the system runs out of memory) + // chunks of the file will be dumped to disk. +diff --git a/dep/g3dlite/source/FileSystem.cpp b/dep/g3dlite/source/FileSystem.cpp +index 2cf890a..76a3611 100644 +--- a/dep/g3dlite/source/FileSystem.cpp ++++ b/dep/g3dlite/source/FileSystem.cpp +@@ -35,6 +35,10 @@ + # define _stat stat + #endif + ++#ifdef __CYGWIN__ ++#define stat64 stat ++#endif ++ + namespace G3D { + + static FileSystem* common = NULL; +diff --git a/dep/g3dlite/source/System.cpp b/dep/g3dlite/source/System.cpp +index 809f05c..f6b0e03 100644 +--- a/dep/g3dlite/source/System.cpp ++++ b/dep/g3dlite/source/System.cpp +@@ -888,7 +888,11 @@ void System::initTime() { + + if (localTimeVals) { + // tm_gmtoff is already corrected for daylight savings. ++ #ifdef __CYGWIN__ ++ local = local + _timezone; ++ #else + local = local + localTimeVals->tm_gmtoff; ++ #endif + } + + m_realWorldGetTickTime0 = local; diff --git a/dep/g3dlite/Readme.txt b/dep/g3dlite/Readme.txt index b91c20dce38..055574ee654 100644 --- a/dep/g3dlite/Readme.txt +++ b/dep/g3dlite/Readme.txt @@ -1,3 +1,8 @@ - Due to issues with G3D (normally requiring X11 and the ZIP-library), the -sourcetree version contains a modified version. The applied patch is -commited to the repository for future reference. + Due to issues with G3D normally requiring X11 and the ZIP-library, the library version in this sourcetree contains a modified version. +The applied patches are added as .diff-files to the repository for future reference (knowing what was changed is quite handy). + +G3D-v8.0_hotfix1.diff - 2010-08-27 - remove dependency on zip/z11 libraries, add support for 64-bit arch +G3D-v8.0_hotfix2.diff - 2012-01-14 - fix typo in isNaN(float x) +G3D-v8.0_hotfix3.diff - 2012-08-26 - fix compilation on Fedora Linux +G3D-v8.0_hotfix4.diff - 2012-11-09 - fix compilation on OSX +G3D-v8.0_hotfix5.diff - 2013-02-27 - fix compilation in cygwin environments diff --git a/dep/g3dlite/include/G3D/System.h b/dep/g3dlite/include/G3D/System.h index 1c0cf99410c..f1607747bbe 100644 --- a/dep/g3dlite/include/G3D/System.h +++ b/dep/g3dlite/include/G3D/System.h @@ -19,6 +19,7 @@ #include "G3D/G3DGameUnits.h" #include "G3D/BinaryFormat.h" #include +#include #ifdef G3D_OSX # include diff --git a/dep/g3dlite/include/G3D/platform.h b/dep/g3dlite/include/G3D/platform.h index 11093f4a6ce..614c0ed7cad 100644 --- a/dep/g3dlite/include/G3D/platform.h +++ b/dep/g3dlite/include/G3D/platform.h @@ -56,6 +56,8 @@ #define G3D_LINUX #elif defined(__linux__) #define G3D_LINUX +#elif defined(__CYGWIN__) + #define G3D_LINUX #elif defined(__APPLE__) #define G3D_LINUX diff --git a/dep/g3dlite/source/BinaryOutput.cpp b/dep/g3dlite/source/BinaryOutput.cpp index 054211d906c..81fa9822206 100644 --- a/dep/g3dlite/source/BinaryOutput.cpp +++ b/dep/g3dlite/source/BinaryOutput.cpp @@ -22,6 +22,10 @@ # include #endif +#ifdef __CYGWIN__ +# include +#endif + // Largest memory buffer that the system will use for writing to // disk. After this (or if the system runs out of memory) // chunks of the file will be dumped to disk. diff --git a/dep/g3dlite/source/FileSystem.cpp b/dep/g3dlite/source/FileSystem.cpp index 2cf890a1cd5..76a361162c9 100644 --- a/dep/g3dlite/source/FileSystem.cpp +++ b/dep/g3dlite/source/FileSystem.cpp @@ -35,6 +35,10 @@ # define _stat stat #endif +#ifdef __CYGWIN__ +#define stat64 stat +#endif + namespace G3D { static FileSystem* common = NULL; diff --git a/dep/g3dlite/source/System.cpp b/dep/g3dlite/source/System.cpp index 809f05c0ab4..f6b0e038f27 100644 --- a/dep/g3dlite/source/System.cpp +++ b/dep/g3dlite/source/System.cpp @@ -888,7 +888,11 @@ void System::initTime() { if (localTimeVals) { // tm_gmtoff is already corrected for daylight savings. + #ifdef __CYGWIN__ + local = local + _timezone; + #else local = local + localTimeVals->tm_gmtoff; + #endif } m_realWorldGetTickTime0 = local; -- cgit v1.2.3 From 523e732c03b0cbd49aa367f435c75891167e7823 Mon Sep 17 00:00:00 2001 From: click Date: Thu, 28 Feb 2013 13:23:15 +0100 Subject: Core/Dep: G3D: Correction to patch G3D-v8.0_hotfix5.diff, add missing #ifdef -test (applied to sourcetree as well) --- dep/g3dlite/G3D-v8.0_hotfix5.diff | 6 ++++-- dep/g3dlite/include/G3D/System.h | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'dep') diff --git a/dep/g3dlite/G3D-v8.0_hotfix5.diff b/dep/g3dlite/G3D-v8.0_hotfix5.diff index 29b7eba811b..fd02b329c4a 100644 --- a/dep/g3dlite/G3D-v8.0_hotfix5.diff +++ b/dep/g3dlite/G3D-v8.0_hotfix5.diff @@ -2,11 +2,13 @@ diff --git a/dep/g3dlite/include/G3D/System.h b/dep/g3dlite/include/G3D/System.h index 1c0cf99..f160774 100644 --- a/dep/g3dlite/include/G3D/System.h +++ b/dep/g3dlite/include/G3D/System.h -@@ -19,6 +19,7 @@ +@@ -19,6 +19,9 @@ #include "G3D/G3DGameUnits.h" #include "G3D/BinaryFormat.h" #include -+#include ++#ifdef G3D_LINUX ++# include ++#endif #ifdef G3D_OSX # include diff --git a/dep/g3dlite/include/G3D/System.h b/dep/g3dlite/include/G3D/System.h index f1607747bbe..45aef1549b6 100644 --- a/dep/g3dlite/include/G3D/System.h +++ b/dep/g3dlite/include/G3D/System.h @@ -19,7 +19,9 @@ #include "G3D/G3DGameUnits.h" #include "G3D/BinaryFormat.h" #include -#include +#ifdef G3D_LINUX +# include +#endif #ifdef G3D_OSX # include -- cgit v1.2.3