fix vendored libdeflate _rotr* macros vs mingw stdlib.h #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/mingw-rotr64-stdlib-collision"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
common/compiler_gcc.hdefined_rotl/_rotr/_rotl64/_rotr64as macros before mingw's<stdlib.h>could declare them as functions.lib_common.h(and thuscompiler_gcc.h) and later<stdlib.h>— e.g.lib/utils.c— saw the function declarations textually substituted by the macros, producing a syntax error on x86_64-w64-mingw32.<stdlib.h>in fromcompiler_gcc.hon mingw so the declarations are parsed before the macro names shadow them. The later#include <stdlib.h>inutils.cbecomes a no-op via the header guard; call sites still expand the macros, so generated code is identical on every other compiler/target.Why this matters
Crafter.Build's CI Windows cross-compile job (
--target=x86_64-w64-mingw32) has been failing for a while at this exact spot — no Windows artifact has been produced since the failure started. Catcrafts/Crafter.Build#6.Test plan
Build Windows x86-64-v2 (mingw)(and v3/v4) once this is merged and a corresponding Crafter.Build change pins the fixed commit.🤖 Generated with Claude Code