Skip to content

Commit 163f6a8

Browse files
committed
compat.zlib: note the LP64-only agreement is preserved, not introduced
Follow-up to 1844867, from review: the withdrawn `-include unistd.h` was package-private in exactly the same way the hoisted `-include mcpp_zlib_config.h` is, so the library and the consumer already computed z_off_t by two different routes before this change, and already agreed only because every measured target is LP64. Added one clause saying so, so the comment does not read as if this PR introduced the asymmetry it documents. Re-verified: mcpp xpkg parse, lua syntax, and mcpp test for the zlib member.
1 parent cc4402c commit 163f6a8

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

‎pkgs/c/compat.zlib.lua‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,15 @@ package = {
7171
-- and long long agree in size on every target this index measures --
7272
-- all of them LP64 (x86_64-linux-gnu, x86_64-windows-gnu; see
7373
-- tests/openkal/pins.toml and the platforms xpm above) -- which is
74-
-- why this is safe today rather than merely untested. On an ILP32
75-
-- target without _LARGEFILE64_SOURCE, off_t is 4 bytes and long long
74+
-- why this is safe today rather than merely untested. This is not a
75+
-- new asymmetry introduced by hoisting the `-include`: the withdrawn
76+
-- `-include unistd.h` it replaced was package-private in exactly the
77+
-- same way, so the library and the consumer already reached z_off_t
78+
-- by two different routes before this change, and already agreed
79+
-- only because every measured target is LP64. This comment preserves
80+
-- that property, and the note about it, rather than introducing
81+
-- either. On an ILP32 target without _LARGEFILE64_SOURCE, off_t is
82+
-- 4 bytes and long long
7683
-- is 8: the two sides of this same split would disagree, silently,
7784
-- in the type gzseek/gztell pass across the package boundary. Rule 3
7885
-- of docs/openkal-compat.md is exactly this situation (a macro that

0 commit comments

Comments
 (0)