The bundled minizip in xlswriter has K&R C function declarations in
multiple files (mztools.c, ioapi.c). Apple Clang (Xcode 16+) defaults
to C23, which removed K&R from the standard, causing hard build errors.
Instead of patching individual files, downgrade the C standard to gnu17
for the whole build when xlswriter is enabled. This covers all K&R
occurrences in the bundled code.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The bundled minizip in xlswriter (pinned at libxlsxwriter RELEASE_1.0.0)
uses a K&R-style function declaration in mztools.c. Modern Clang on macOS
(defaulting to C23) rejects this as a hard syntax error since K&R
declarations were removed from the C23 standard.
The upstream libxlsxwriter has already fixed this on their main branch.
This patch applies the same fix during the build process.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add missing SOURCE_PATH before making cmake toolchain
* Fix windows xlswriter duplicate md5 symbol bug
* Add detection for patchFile to prevent duplicate patches
* Add tests