From 1ab457f72672b34ddacefa658a5c593fa9492bc8 Mon Sep 17 00:00:00 2001 From: Robert Kausch Date: Wed, 25 Nov 2020 01:10:32 +0100 Subject: mac: update to 5.65 --- mac/mac-sdk-5.64-gcc.patch | 294 --------------------------------------------- mac/mac-sdk-5.65-gcc.patch | 127 ++++++++++++++++++++ mac/mac.json | 6 +- 3 files changed, 130 insertions(+), 297 deletions(-) delete mode 100644 mac/mac-sdk-5.64-gcc.patch create mode 100644 mac/mac-sdk-5.65-gcc.patch diff --git a/mac/mac-sdk-5.64-gcc.patch b/mac/mac-sdk-5.64-gcc.patch deleted file mode 100644 index d95601c..0000000 --- a/mac/mac-sdk-5.64-gcc.patch +++ /dev/null @@ -1,294 +0,0 @@ -diff -Naur mac-sdk-5.64/Makefile mac-sdk-5.64-gcc/Makefile ---- mac-sdk-5.64/Makefile 1970-01-01 00:00:00 +0000 -+++ mac-sdk-5.64-gcc/Makefile 2019-11-21 21:28:57 +0000 -@@ -0,0 +1,8 @@ -+all: -+ $(MAKE) -f Source/Projects/NonWindows/Makefile -+ -+install: -+ $(MAKE) -f Source/Projects/NonWindows/Makefile install -+ -+clean: -+ $(MAKE) -f Source/Projects/NonWindows/Makefile clean -diff -Naur mac-sdk-5.64/Shared/All.h mac-sdk-5.64-gcc/Shared/All.h ---- mac-sdk-5.64/Shared/All.h 2020-11-06 16:17:42 +0000 -+++ mac-sdk-5.64-gcc/Shared/All.h 2020-11-06 19:59:10 +0000 -@@ -121,46 +121,17 @@ - #define ENABLE_COMPRESSION_MODE_HIGH - #define ENABLE_COMPRESSION_MODE_EXTRA_HIGH - --// 64 bit platform --#ifdef PLATFORM_64BIT -- #ifndef PLATFORM_x64 -- #define PLATFORM_x64 -- #endif --#endif -- --#if __x86_64__ || __aarch64__ -- #ifndef PLATFORM_x64 -- #define PLATFORM_x64 -- #endif --#endif -- - /***************************************************************************************** - Global types - *****************************************************************************************/ - namespace APE - { - // integer types --#if defined(PLATFORM_x64) -- typedef int64_t int64; // native integer, can safely hold a pointer - typedef int32_t int32; --#else -- typedef intptr_t int32; // native integer, can safely hold a pointer - typedef int64_t int64; --#endif - --#if defined(PLATFORM_x64) --// DO NOT CHANGE THE FOLLOWING 6 LINES! They are necessary for building Media Center 64 bit on non-windows platforms! -- #ifndef PLATFORM_WINDOWS -- typedef long long intn; -- typedef unsigned long long uintn; -- #else -- typedef int64_t intn; -- typedef uint64_t uintn; -- #endif --#else -- typedef int32_t intn; -- typedef uint32_t uintn; --#endif -+ typedef intptr_t intn; // native integer, can safely hold a pointer -+ typedef uintptr_t uintn; - - typedef uint64_t uint64; - typedef uint32_t uint32; -@@ -217,12 +188,22 @@ - #define TICK_COUNT_FREQ 1000000 - #undef ASSERT - #define ASSERT(e) -+#endif -+ -+#if !defined(PLATFORM_WINDOWS) || !defined(_MSC_VER) - #define wcsncpy_s(A, B, C, D) wcsncpy(A, C, D) - #define wcscpy_s(A, B, C) wcscpy(A, C) - #define wcscat_s(A, B, C) wcscat(A, C) -- #define sprintf_s(A, B, C, D) sprintf(A, C, D) -+ #define sprintf_s(A, B, C, ...) sprintf(A, C, __VA_ARGS__) -+ #define _stprintf_s(A, B, C, ...) _stprintf(A, C, __VA_ARGS__) - #define strcpy_s(A, B, C) strcpy(A, C) -- #define _tcscat_s(A, B, C) _tcscat(A, C) -+ -+ #if defined(PLATFORM_WINDOWS) -+ #define _tcsncpy_s(A, B, C, D) _tcsncpy(A, C, D) -+ #define _tcscpy_s(A, B, C) _tcscpy(A, C) -+ #define _tcscat_s(A, B, C) _tcscat(A, C) -+ #define strncpy_s(A, B, C, D) strncpy(A, C, D) -+ #endif - #endif - - /***************************************************************************************** -diff -Naur mac-sdk-5.64/Shared/NoWindows.h mac-sdk-5.64-gcc/Shared/NoWindows.h ---- mac-sdk-5.64/Shared/NoWindows.h 2020-11-09 20:13:40 +0000 -+++ mac-sdk-5.64-gcc/Shared/NoWindows.h 2020-11-10 16:17:10 +0000 -@@ -52,7 +52,7 @@ - - #define _strnicmp strncasecmp - #define _wtoi(x) wcstol(x, NULL, 10) --#define _tcscat wcscat -+#define _tcscat_s wcscat_s - #undef _totlower - #define _totlower towlower - #define _totupper towupper -@@ -60,7 +60,7 @@ - #ifdef _MSC_VER - #define _tcsicmp _wcsicmp - #else --#define _tcsicmp wcscasecmp -+#define _tcsicmp wcscmp - #endif - #define _tcscpy wcscpy - #define _tcslen wcslen -diff -Naur mac-sdk-5.64/Source/Console/Console.cpp mac-sdk-5.64-gcc/Source/Console/Console.cpp ---- mac-sdk-5.64/Source/Console/Console.cpp 2020-11-04 16:31:57 +0000 -+++ mac-sdk-5.64-gcc/Source/Console/Console.cpp 2020-11-06 19:08:17 +0000 -@@ -22,7 +22,7 @@ - #define TAG_MODE 4 - #define UNDEFINED_MODE -1 - --#ifndef _MSC_VER -+#ifndef PLATFORM_WINDOWS - #define TICK_COUNT_TYPE unsigned long long - #define TICK_COUNT_READ(VARIABLE) { struct timeval t; gettimeofday(&t, NULL); VARIABLE = t.tv_sec * 1000000LLU + t.tv_usec; } - #else -diff -Naur mac-sdk-5.64/Source/MACLib/APEDecompress.cpp mac-sdk-5.64-gcc/Source/MACLib/APEDecompress.cpp ---- mac-sdk-5.64/Source/MACLib/APEDecompress.cpp 2020-11-24 17:01:57 +0000 -+++ mac-sdk-5.64-gcc/Source/MACLib/APEDecompress.cpp 2020-11-24 19:48:33 +0000 -@@ -121,7 +121,7 @@ - nResult = nDecodeRetVal; - - // analyze how much to remove from the buffer -- const int64 nFrameBufferBlocks = min(m_nFrameBufferFinishedBlocks, m_cbFrameBuffer.MaxGet() / m_nBlockAlign); -+ const int64 nFrameBufferBlocks = ape_min(m_nFrameBufferFinishedBlocks, m_cbFrameBuffer.MaxGet() / m_nBlockAlign); - nBlocksThisPass = ape_min(nBlocksLeft, nFrameBufferBlocks); - - // remove as much as possible -diff -Naur mac-sdk-5.64/Source/MACLib/APEInfo.cpp mac-sdk-5.64-gcc/Source/MACLib/APEInfo.cpp ---- mac-sdk-5.64/Source/MACLib/APEInfo.cpp 2020-11-02 14:06:36 +0000 -+++ mac-sdk-5.64-gcc/Source/MACLib/APEInfo.cpp 2020-11-06 19:04:04 +0000 -@@ -15,7 +15,7 @@ - /***************************************************************************************** - Construction - *****************************************************************************************/ --CAPEInfo::CAPEInfo(int * pErrorCode, const wchar_t * pFilename, CAPETag * pTag, bool bAPL) -+CAPEInfo::CAPEInfo(int * pErrorCode, const wchar_t * pFilename, CAPETag * pTag, bool bAPL, bool bReadOnly) - { - *pErrorCode = ERROR_SUCCESS; - CloseFile(); -@@ -26,7 +26,7 @@ - // open the file - m_spIO.Assign(new IO_CLASS_NAME); - -- if (m_spIO->Open(pFilename) != 0) -+ if (m_spIO->Open(pFilename, bReadOnly) != 0) - { - CloseFile(); - *pErrorCode = ERROR_INVALID_INPUT_FILE; -diff -Naur mac-sdk-5.64/Source/MACLib/APEInfo.h mac-sdk-5.64-gcc/Source/MACLib/APEInfo.h ---- mac-sdk-5.64/Source/MACLib/APEInfo.h 2020-09-14 12:55:01 +0000 -+++ mac-sdk-5.64-gcc/Source/MACLib/APEInfo.h 2020-09-26 23:14:54 +0000 -@@ -75,7 +75,7 @@ - public: - - // construction and destruction -- CAPEInfo(int * pErrorCode, const wchar_t * pFilename, CAPETag * pTag = NULL, bool bAPL = false); -+ CAPEInfo(int * pErrorCode, const wchar_t * pFilename, CAPETag * pTag = NULL, bool bAPL = false, bool bReadOnly = false); - CAPEInfo(int * pErrorCode, APE::CIO * pIO, CAPETag * pTag = NULL); - virtual ~CAPEInfo(); - -diff -Naur mac-sdk-5.64/Source/MACLib/MACLib.cpp mac-sdk-5.64-gcc/Source/MACLib/MACLib.cpp ---- mac-sdk-5.64/Source/MACLib/MACLib.cpp 2020-11-02 14:06:36 +0000 -+++ mac-sdk-5.64-gcc/Source/MACLib/MACLib.cpp 2020-11-06 19:03:18 +0000 -@@ -94,7 +94,7 @@ - else if (StringIsEqual(pExtension, L".mac", false) || StringIsEqual(pExtension, L".ape", false)) - { - // plain .ape file -- pAPEInfo = new CAPEInfo(&nErrorCode, pFilename); -+ pAPEInfo = new CAPEInfo(&nErrorCode, pFilename, NULL, false, true); - } - - // fail if we couldn't get the file information -diff -Naur mac-sdk-5.64/Source/Projects/NonWindows/Makefile mac-sdk-5.64-gcc/Source/Projects/NonWindows/Makefile ---- mac-sdk-5.64/Source/Projects/NonWindows/Makefile 2020-04-24 21:09:10 +0000 -+++ mac-sdk-5.64-gcc/Source/Projects/NonWindows/Makefile 2020-08-29 17:45:44 +0000 -@@ -85,7 +85,7 @@ - $(CC) $(SHAREDOBJECTS) $(LIBOBJECTS) $(DLLOBJECTS) $(LDOPTS) $(LDFLAGS) $(DLLLDOPTS) -o $@ - - $(CMDNAME): $(DLLNAME) $(CMDOBJECTS) -- $(CC) $(SHAREDOBJECTS) $(CMDOBJECTS) $(DLLNAME) $(LDOPTS) $(LDFLAGS) $(CMDLDOPTS) -o $@ -+ $(CC) $(SHAREDOBJECTS) $(LIBOBJECTS) $(CMDOBJECTS) $(LDOPTS) $(LDFLAGS) $(CMDLDOPTS) -o $@ - - Source/Shared/%.o: Source/Shared/%.cpp - $(CXX) $(CXXOPTS) $(CXXFLAGS) $< -o $@ -diff -Naur mac-sdk-5.64/Source/Shared/All.h mac-sdk-5.64-gcc/Source/Shared/All.h ---- mac-sdk-5.64/Source/Shared/All.h 2020-11-06 16:17:42 +0000 -+++ mac-sdk-5.64-gcc/Source/Shared/All.h 2020-11-06 19:59:10 +0000 -@@ -121,46 +121,17 @@ - #define ENABLE_COMPRESSION_MODE_HIGH - #define ENABLE_COMPRESSION_MODE_EXTRA_HIGH - --// 64 bit platform --#ifdef PLATFORM_64BIT -- #ifndef PLATFORM_x64 -- #define PLATFORM_x64 -- #endif --#endif -- --#if __x86_64__ || __aarch64__ -- #ifndef PLATFORM_x64 -- #define PLATFORM_x64 -- #endif --#endif -- - /***************************************************************************************** - Global types - *****************************************************************************************/ - namespace APE - { - // integer types --#if defined(PLATFORM_x64) -- typedef int64_t int64; // native integer, can safely hold a pointer - typedef int32_t int32; --#else -- typedef intptr_t int32; // native integer, can safely hold a pointer - typedef int64_t int64; --#endif - --#if defined(PLATFORM_x64) --// DO NOT CHANGE THE FOLLOWING 6 LINES! They are necessary for building Media Center 64 bit on non-windows platforms! -- #ifndef PLATFORM_WINDOWS -- typedef long long intn; -- typedef unsigned long long uintn; -- #else -- typedef int64_t intn; -- typedef uint64_t uintn; -- #endif --#else -- typedef int32_t intn; -- typedef uint32_t uintn; --#endif -+ typedef intptr_t intn; // native integer, can safely hold a pointer -+ typedef uintptr_t uintn; - - typedef uint64_t uint64; - typedef uint32_t uint32; -@@ -217,12 +188,22 @@ - #define TICK_COUNT_FREQ 1000000 - #undef ASSERT - #define ASSERT(e) -+#endif -+ -+#if !defined(PLATFORM_WINDOWS) || !defined(_MSC_VER) - #define wcsncpy_s(A, B, C, D) wcsncpy(A, C, D) - #define wcscpy_s(A, B, C) wcscpy(A, C) - #define wcscat_s(A, B, C) wcscat(A, C) -- #define sprintf_s(A, B, C, D) sprintf(A, C, D) -+ #define sprintf_s(A, B, C, ...) sprintf(A, C, __VA_ARGS__) -+ #define _stprintf_s(A, B, C, ...) _stprintf(A, C, __VA_ARGS__) - #define strcpy_s(A, B, C) strcpy(A, C) -- #define _tcscat_s(A, B, C) _tcscat(A, C) -+ -+ #if defined(PLATFORM_WINDOWS) -+ #define _tcsncpy_s(A, B, C, D) _tcsncpy(A, C, D) -+ #define _tcscpy_s(A, B, C) _tcscpy(A, C) -+ #define _tcscat_s(A, B, C) _tcscat(A, C) -+ #define strncpy_s(A, B, C, D) strncpy(A, C, D) -+ #endif - #endif - - /***************************************************************************************** -diff -Naur mac-sdk-5.64/Source/Shared/NoWindows.h mac-sdk-5.64-gcc/Source/Shared/NoWindows.h ---- mac-sdk-5.64/Source/Shared/NoWindows.h 2020-11-09 20:13:40 +0000 -+++ mac-sdk-5.64-gcc/Source/Shared/NoWindows.h 2020-11-10 16:17:27 +0000 -@@ -52,7 +52,7 @@ - - #define _strnicmp strncasecmp - #define _wtoi(x) wcstol(x, NULL, 10) --#define _tcscat wcscat -+#define _tcscat_s wcscat_s - #undef _totlower - #define _totlower towlower - #define _totupper towupper -@@ -60,7 +60,7 @@ - #ifdef _MSC_VER - #define _tcsicmp _wcsicmp - #else --#define _tcsicmp wcscasecmp -+#define _tcsicmp wcscmp - #endif - #define _tcscpy wcscpy - #define _tcslen wcslen -diff -Naur mac-sdk-5.64/configure mac-sdk-5.64-gcc/configure ---- mac-sdk-5.64/configure 1970-01-01 00:00:00 +0000 -+++ mac-sdk-5.64-gcc/configure 2019-11-21 21:28:57 +0000 -@@ -0,0 +1 @@ -+#!/bin/sh diff --git a/mac/mac-sdk-5.65-gcc.patch b/mac/mac-sdk-5.65-gcc.patch new file mode 100644 index 0000000..da22322 --- /dev/null +++ b/mac/mac-sdk-5.65-gcc.patch @@ -0,0 +1,127 @@ +diff -Naur mac-sdk-5.65/Makefile mac-sdk-5.65-gcc/Makefile +--- mac-sdk-5.65/Makefile 1970-01-01 00:00:00 +0000 ++++ mac-sdk-5.65-gcc/Makefile 2019-11-21 21:28:57 +0000 +@@ -0,0 +1,8 @@ ++all: ++ $(MAKE) -f Source/Projects/NonWindows/Makefile ++ ++install: ++ $(MAKE) -f Source/Projects/NonWindows/Makefile install ++ ++clean: ++ $(MAKE) -f Source/Projects/NonWindows/Makefile clean +diff -Naur mac-sdk-5.65/Shared/All.h mac-sdk-5.65-gcc/Shared/All.h +--- mac-sdk-5.65/Shared/All.h 2020-11-24 21:26:30 +0000 ++++ mac-sdk-5.65-gcc/Shared/All.h 2020-11-25 00:03:32 +0000 +@@ -188,12 +188,22 @@ + #define TICK_COUNT_FREQ 1000000 + #undef ASSERT + #define ASSERT(e) ++#endif ++ ++#if !defined(PLATFORM_WINDOWS) || !defined(_MSC_VER) + #define wcsncpy_s(A, B, C, D) wcsncpy(A, C, D) + #define wcscpy_s(A, B, C) wcscpy(A, C) + #define wcscat_s(A, B, C) wcscat(A, C) +- #define sprintf_s(A, B, C, D) sprintf(A, C, D) ++ #define sprintf_s(A, B, C, ...) sprintf(A, C, __VA_ARGS__) ++ #define _stprintf_s(A, B, C, ...) _stprintf(A, C, __VA_ARGS__) + #define strcpy_s(A, B, C) strcpy(A, C) +- #define _tcscat_s(A, B, C) _tcscat(A, C) ++ ++ #if defined(PLATFORM_WINDOWS) ++ #define _tcsncpy_s(A, B, C, D) _tcsncpy(A, C, D) ++ #define _tcscpy_s(A, B, C) _tcscpy(A, C) ++ #define _tcscat_s(A, B, C) _tcscat(A, C) ++ #define strncpy_s(A, B, C, D) strncpy(A, C, D) ++ #endif + #endif + + /***************************************************************************************** +diff -Naur mac-sdk-5.65/Shared/NoWindows.h mac-sdk-5.65-gcc/Shared/NoWindows.h +--- mac-sdk-5.65/Shared/NoWindows.h 2020-11-09 20:13:40 +0000 ++++ mac-sdk-5.65-gcc/Shared/NoWindows.h 2020-11-10 16:17:10 +0000 +@@ -52,7 +52,7 @@ + + #define _strnicmp strncasecmp + #define _wtoi(x) wcstol(x, NULL, 10) +-#define _tcscat wcscat ++#define _tcscat_s wcscat_s + #undef _totlower + #define _totlower towlower + #define _totupper towupper +@@ -60,7 +60,7 @@ + #ifdef _MSC_VER + #define _tcsicmp _wcsicmp + #else +-#define _tcsicmp wcscasecmp ++#define _tcsicmp wcscmp + #endif + #define _tcscpy wcscpy + #define _tcslen wcslen +diff -Naur mac-sdk-5.65/Source/Projects/NonWindows/Makefile mac-sdk-5.65-gcc/Source/Projects/NonWindows/Makefile +--- mac-sdk-5.65/Source/Projects/NonWindows/Makefile 2020-04-24 21:09:10 +0000 ++++ mac-sdk-5.65-gcc/Source/Projects/NonWindows/Makefile 2020-08-29 17:45:44 +0000 +@@ -85,7 +85,7 @@ + $(CC) $(SHAREDOBJECTS) $(LIBOBJECTS) $(DLLOBJECTS) $(LDOPTS) $(LDFLAGS) $(DLLLDOPTS) -o $@ + + $(CMDNAME): $(DLLNAME) $(CMDOBJECTS) +- $(CC) $(SHAREDOBJECTS) $(CMDOBJECTS) $(DLLNAME) $(LDOPTS) $(LDFLAGS) $(CMDLDOPTS) -o $@ ++ $(CC) $(SHAREDOBJECTS) $(LIBOBJECTS) $(CMDOBJECTS) $(LDOPTS) $(LDFLAGS) $(CMDLDOPTS) -o $@ + + Source/Shared/%.o: Source/Shared/%.cpp + $(CXX) $(CXXOPTS) $(CXXFLAGS) $< -o $@ +diff -Naur mac-sdk-5.65/Source/Shared/All.h mac-sdk-5.65-gcc/Source/Shared/All.h +--- mac-sdk-5.65/Source/Shared/All.h 2020-11-24 21:26:30 +0000 ++++ mac-sdk-5.65-gcc/Source/Shared/All.h 2020-11-25 00:03:32 +0000 +@@ -188,12 +188,22 @@ + #define TICK_COUNT_FREQ 1000000 + #undef ASSERT + #define ASSERT(e) ++#endif ++ ++#if !defined(PLATFORM_WINDOWS) || !defined(_MSC_VER) + #define wcsncpy_s(A, B, C, D) wcsncpy(A, C, D) + #define wcscpy_s(A, B, C) wcscpy(A, C) + #define wcscat_s(A, B, C) wcscat(A, C) +- #define sprintf_s(A, B, C, D) sprintf(A, C, D) ++ #define sprintf_s(A, B, C, ...) sprintf(A, C, __VA_ARGS__) ++ #define _stprintf_s(A, B, C, ...) _stprintf(A, C, __VA_ARGS__) + #define strcpy_s(A, B, C) strcpy(A, C) +- #define _tcscat_s(A, B, C) _tcscat(A, C) ++ ++ #if defined(PLATFORM_WINDOWS) ++ #define _tcsncpy_s(A, B, C, D) _tcsncpy(A, C, D) ++ #define _tcscpy_s(A, B, C) _tcscpy(A, C) ++ #define _tcscat_s(A, B, C) _tcscat(A, C) ++ #define strncpy_s(A, B, C, D) strncpy(A, C, D) ++ #endif + #endif + + /***************************************************************************************** +diff -Naur mac-sdk-5.65/Source/Shared/NoWindows.h mac-sdk-5.65-gcc/Source/Shared/NoWindows.h +--- mac-sdk-5.65/Source/Shared/NoWindows.h 2020-11-09 20:13:40 +0000 ++++ mac-sdk-5.65-gcc/Source/Shared/NoWindows.h 2020-11-10 16:17:27 +0000 +@@ -52,7 +52,7 @@ + + #define _strnicmp strncasecmp + #define _wtoi(x) wcstol(x, NULL, 10) +-#define _tcscat wcscat ++#define _tcscat_s wcscat_s + #undef _totlower + #define _totlower towlower + #define _totupper towupper +@@ -60,7 +60,7 @@ + #ifdef _MSC_VER + #define _tcsicmp _wcsicmp + #else +-#define _tcsicmp wcscasecmp ++#define _tcsicmp wcscmp + #endif + #define _tcscpy wcscpy + #define _tcslen wcslen +diff -Naur mac-sdk-5.65/configure mac-sdk-5.65-gcc/configure +--- mac-sdk-5.65/configure 1970-01-01 00:00:00 +0000 ++++ mac-sdk-5.65-gcc/configure 2019-11-21 21:28:57 +0000 +@@ -0,0 +1 @@ ++#!/bin/sh diff --git a/mac/mac.json b/mac/mac.json index ba32c5d..e8c3f7b 100644 --- a/mac/mac.json +++ b/mac/mac.json @@ -11,13 +11,13 @@ "sources": [ { "type": "archive", - "url": "https://freac.org/patches/MAC_SDK_564.zip", - "sha256": "dc5a0cafe06ae5ebc3bb4ce636e9771b4ab6c49a261c029c5a7f32729b795b49", + "url": "https://freac.org/patches/MAC_SDK_565.zip", + "sha256": "d035456eae1a3e8c58c91a57833e64e59dd43dba980373d007986587bb361fbc", "strip-components": 0 }, { "type": "patch", - "path": "mac-sdk-5.64-gcc.patch" + "path": "mac-sdk-5.65-gcc.patch" } ] } -- cgit v1.2.3