OSXPPC compatibility maintenance

This commit is contained in:
Iliyas Jorio 2024-04-06 13:32:26 +02:00
parent ef94150e2d
commit 1acfd09704
4 changed files with 42 additions and 3 deletions

2
.gitignore vendored
View File

@ -1 +1,3 @@
/out /out
.DS_Store

View File

@ -2,17 +2,25 @@
// PowerPC systems that have a genuine Carbon implementation // PowerPC systems that have a genuine Carbon implementation
#define AddResource Pomme_AddResource #define AddResource Pomme_AddResource
#define BackColor Pomme_BackColor
#define BlockMove Pomme_BlockMove #define BlockMove Pomme_BlockMove
#define BlockMoveData Pomme_BlockMoveData #define BlockMoveData Pomme_BlockMoveData
#define ChangedResource Pomme_ChangedResource #define ChangedResource Pomme_ChangedResource
#define ClearPortDamage Pomme_ClearPortDamage
#define CloseResFile Pomme_CloseResFile #define CloseResFile Pomme_CloseResFile
#define CopyBits Pomme_CopyBits
#define Count1Resources Pomme_Count1Resources #define Count1Resources Pomme_Count1Resources
#define Count1Types Pomme_Count1Types #define Count1Types Pomme_Count1Types
#define CurResFile Pomme_CurResFile #define CurResFile Pomme_CurResFile
#define DamagePortRegion Pomme_DamagePortRegion
#define DetachResource Pomme_DetachResource #define DetachResource Pomme_DetachResource
#define DirCreate Pomme_DirCreate #define DirCreate Pomme_DirCreate
#define DisposeGWorld Pomme_DisposeGWorld
#define DisposeHandle Pomme_DisposeHandle #define DisposeHandle Pomme_DisposeHandle
#define DisposePtr Pomme_DisposePtr #define DisposePtr Pomme_DisposePtr
#define DrawChar Pomme_DrawChar
#define DrawPicture Pomme_DrawPicture
#define EraseRect Pomme_EraseRect
#define ExitToShell Pomme_ExitToShell #define ExitToShell Pomme_ExitToShell
#define FSClose Pomme_FSClose #define FSClose Pomme_FSClose
#define FSMakeFSSpec Pomme_FSMakeFSSpec #define FSMakeFSSpec Pomme_FSMakeFSSpec
@ -25,27 +33,52 @@
#define FSpOpenResFile Pomme_FSpOpenResFile #define FSpOpenResFile Pomme_FSpOpenResFile
#define FindFolder Pomme_FindFolder #define FindFolder Pomme_FindFolder
#define FlushEvents Pomme_FlushEvents #define FlushEvents Pomme_FlushEvents
#define ForeColor Pomme_ForeColor
#define FrameArc Pomme_FrameArc
#define FrameRect Pomme_FrameRect
#define Get1IndResource Pomme_Get1IndResource #define Get1IndResource Pomme_Get1IndResource
#define Get1IndType Pomme_Get1IndType #define Get1IndType Pomme_Get1IndType
#define GetDamagePortRegion Pomme_GetDamagePortRegion
#define GetDateTime Pomme_GetDateTime #define GetDateTime Pomme_GetDateTime
#define GetDefaultOutputVolume Pomme_GetDefaultOutputVolume #define GetDefaultOutputVolume Pomme_GetDefaultOutputVolume
#define GetEOF Pomme_GetEOF #define GetEOF Pomme_GetEOF
#define GetFPos Pomme_GetFPos #define GetFPos Pomme_GetFPos
#define GetForeColor Pomme_GetForeColor
#define GetGWorld Pomme_GetGWorld
#define GetGWorldPixMap Pomme_GetGWorldPixMap
#define GetHandleSize Pomme_GetHandleSize #define GetHandleSize Pomme_GetHandleSize
#define GetPicture Pomme_GetPicture
#define GetPixBaseAddr Pomme_GetPixBaseAddr
#define GetPort Pomme_GetPort
#define GetPortBitMapForCopyBits Pomme_GetPortBitMapForCopyBits
#define GetPortBounds Pomme_GetPortBounds
#define GetPtrSize Pomme_GetPtrSize #define GetPtrSize Pomme_GetPtrSize
#define GetResInfo Pomme_GetResInfo #define GetResInfo Pomme_GetResInfo
#define GetResource Pomme_GetResource #define GetResource Pomme_GetResource
#define GetResourceSizeOnDisk Pomme_GetResourceSizeOnDisk #define GetResourceSizeOnDisk Pomme_GetResourceSizeOnDisk
#define GetScreenPort Pomme_GetScreenPort
#define GetSoundHeaderOffset Pomme_GetSoundHeaderOffset #define GetSoundHeaderOffset Pomme_GetSoundHeaderOffset
#define GetWindowPort Pomme_GetWindowPort
#define HideCursor Pomme_HideCursor #define HideCursor Pomme_HideCursor
#define InitCursor Pomme_InitCursor #define InitCursor Pomme_InitCursor
#define IsPortDamaged Pomme_IsPortDamaged
#define LineTo Pomme_LineTo
#define Microseconds Pomme_Microseconds #define Microseconds Pomme_Microseconds
#define MoveTo Pomme_MoveTo
#define NewGWorld Pomme_NewGWorld
#define NewHandle Pomme_NewHandle #define NewHandle Pomme_NewHandle
#define NewHandleClear Pomme_NewHandleClear #define NewHandleClear Pomme_NewHandleClear
#define NewPtr Pomme_NewPtr #define NewPtr Pomme_NewPtr
#define NewPtrClear Pomme_NewPtrClear #define NewPtrClear Pomme_NewPtrClear
#define NumToString Pomme_NumToString #define NumToString Pomme_NumToString
#define OffsetRect Pomme_OffsetRect
#define PaintRect Pomme_PaintRect
#define PenNormal Pomme_PenNormal
#define PenSize Pomme_PenSize
#define PtrToHand Pomme_PtrToHand #define PtrToHand Pomme_PtrToHand
#define QDError Pomme_QDError
#define RGBBackColor Pomme_RGBBackColor
#define RGBForeColor Pomme_RGBForeColor
#define ReleaseResource Pomme_ReleaseResource #define ReleaseResource Pomme_ReleaseResource
#define RemoveResource Pomme_RemoveResource #define RemoveResource Pomme_RemoveResource
#define ResError Pomme_ResError #define ResError Pomme_ResError
@ -53,7 +86,10 @@
#define SetDefaultOutputVolume Pomme_SetDefaultOutputVolume #define SetDefaultOutputVolume Pomme_SetDefaultOutputVolume
#define SetEOF Pomme_SetEOF #define SetEOF Pomme_SetEOF
#define SetFPos Pomme_SetFPos #define SetFPos Pomme_SetFPos
#define SetGWorld Pomme_SetGWorld
#define SetHandleSize Pomme_SetHandleSize #define SetHandleSize Pomme_SetHandleSize
#define SetPort Pomme_SetPort
#define SetRect Pomme_SetRect
#define ShowCursor Pomme_ShowCursor #define ShowCursor Pomme_ShowCursor
#define SndChannelStatus Pomme_SndChannelStatus #define SndChannelStatus Pomme_SndChannelStatus
#define SndDisposeChannel Pomme_SndDisposeChannel #define SndDisposeChannel Pomme_SndDisposeChannel

View File

@ -181,7 +181,7 @@
#include <langinfo.h> #include <langinfo.h>
#endif #endif
#endif #endif
#ifdef GHC_OS_MACOS #if defined(GHC_OS_MACOS) && !OSXPPC
#include <Availability.h> #include <Availability.h>
#endif #endif
@ -4651,6 +4651,7 @@ GHC_INLINE void last_write_time(const path& p, file_time_type new_time, std::err
ec = detail::make_system_error(); ec = detail::make_system_error();
} }
#elif defined(GHC_OS_MACOS) && \ #elif defined(GHC_OS_MACOS) && \
OSXPPC || \
(__MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_13) || (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_11_0) || \ (__MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_13) || (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_11_0) || \
(__TV_OS_VERSION_MIN_REQUIRED < __TVOS_11_0) || (__WATCH_OS_VERSION_MIN_REQUIRED < __WATCHOS_4_0) (__TV_OS_VERSION_MIN_REQUIRED < __TVOS_11_0) || (__WATCH_OS_VERSION_MIN_REQUIRED < __WATCHOS_4_0)
struct ::stat fs; struct ::stat fs;

View File

@ -3,9 +3,9 @@
#include <algorithm> #include <algorithm>
#include <iterator> #include <iterator>
std::u8string UppercaseCopy(const u8string& in) u8string UppercaseCopy(const u8string& in)
{ {
std::u8string out; u8string out;
std::transform( std::transform(
in.begin(), in.begin(),
in.end(), in.end(),