• src/hash/crc32.csrc/hash/crc32_slicing.h

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Fri Jul 24 00:10:51 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/2a3f59d762ea3821c549f964
    Modified Files:
    src/hash/crc32.c
    Removed Files:
    src/hash/crc32_slicing.h
    Log Message:
    hash: define the slicing-by-4 CRC-32 tables in crc32.c, not a header

    crc32_slicing.h defined crc32tbl_slicing[3][256] with external linkage in
    a header, so a second translation unit including it would have produced a duplicate-symbol link error. The header was also not self-contained (it
    used uint32_t without including <stdint.h>), and under C++ a file-scope
    const has internal linkage, which would not have satisfied crc32.h's
    extern declaration.

    Move the definition next to crc32tbl[] in crc32.c and drop the header.
    The extern declaration and the ucrc32_4() inline stay in crc32.h, so
    callers are unaffected and the inlining is preserved.

    Verified: both tables still regenerate exactly from the reflected
    0xedb88320 polynomial (crc32tbl_slicing[0]/[1]/[2] advance a byte by two/three/four positions), and a 256 MB sexyz -8 send to lrz matches byte-for-byte.

    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net