Introduce Linux platform and prepare for compiling chomp on Linux#11
Merged
Conversation
benstone
reviewed
Nov 18, 2025
For platforms that are not (Classic) Mac, use the same behaviour as for the Windows platform.
For platforms that are not (Classic) Mac, use the same behaviour as for the Windows platform.
For non-Windows platforms declare Debugger() as extern so that a per-platform implementation can be used instead.
When attempting to compile kauai/src/base.cpp GCC issues the following warning: kauai/src/base.cpp: In static member function ‘static void BASE::operator delete(void*)’: kauai/src/base.cpp:279:15: warning: deleting ‘void*’ is undefined [-Wdelete-incomplete] 279 | ::delete (pv); Instead of calling delete on the void pointer which is an incomplete type, use malloc() and free() in a similar way to Windows. Note that we also set the newly allocated memory to zero to match the behaviour of the GMEM_ZEROINIT flag on Windows.
Use separate #ifdefs as required for each platform.
For platforms that are not (Classic) Mac, use the same behaviour as for the Windows platform.
…() and LowerRgchs() The native C implementation can be used for platforms that are not (Classic) Mac or Windows.
…orms With the latest changes it is now possible to use the memwin.cpp implementation for both Windows and non-Classic Mac platform implementations. Add an explicit entry for Linux in kauai/CMakeLists.txt so it is included when trying to build on Linux.
This file provides a Linux platform implementation.
Ensure the header can be included when KAUAI_SDL is defined but WIN is undefined.
…orms There is no default picture format on Linux, so provided a dummy typedef as a placeholder.
This function is intended to create a new GPT for a Windows device context but is unused except for in the portfolio on Windows.
The gfx region code is currently unused and so this is not required for non-Windows builds.
…ic) Mac platforms On Windows a HCTL represents an underlying HWND, so use our own KWND as an alternative instead.
For platforms that are not (Classic) Mac, use the same behaviour as for the Windows platform.
The _hnExport variable is of type HN (HANDLE) which is only used on Windows platforms.
For platforms that are not (Classic) Mac, use the same behaviour as for the Windows platform. Also define the CF_TEXT and CF_UNICODETEXT constants for non-Windows platforms which are listed in the online Windows API documentation.
For platforms that are not (Classic) Mac, use the same behaviour as for the Windows platform.
…atforms These stubs replace the existing CSAPI-based implementation for non-Windows and non-Classic Mac platforms.
The _luVolSys variable is of type DWORD which is only used on Windows platforms.
For platforms that are not (Classic) Mac, use the same behaviour as for the Windows platform.
The byte order of the chunk data is dependent upon the endian of the architecture as opposed to the platform.
For platforms that are not (Classic) Mac, use the same behaviour as for the Windows platform.
The byte order of the chunk data is dependent upon the endian of the architecture as opposed to the platform.
27985de to
6a3ad75
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now we can start to introduce the concept of a Linux platform (
platlinux.cpp) and begin building the core low-level static kauai libraries.With this series applied it is possible to build the
KauaiChcmtarget in cmake on Linux using gcc, which is a significant step towards gettingchomp(the chunk compiler) running to build the .chk data files used by 3DMMEx.