IMPORT: slz: get rid of the bogus USE_64BIT_QUEUE and check siezof(long) instead
The USE_64BIT_QUEUE was set when it was suggested to rely on 64-bit operations on the queue and dump 32 bits at once (thus never keeping more than 32 bits in the queue). It was also used to decide whether the queue was stored as u32 or u64. However, this check in the public part (slz.h) depends on a definition in the private part (slz-prv.h) that cannot be seen by application code. Luckily, slz.c includes its headers in the wrong order so it gets the public part before the private one, and uses the same layout, which is why it was not detected earlier. Let's just get rid of this USE_64BIT_QUEUE definition. It's not accurate and cannot be matched between public and private code. Let's instead rely on __SIZEOF_LONG__ which conveys the info we need: is the CPU efficient when working on 64-bit integers. The comments were adjusted to explain the difference and why it's not dramatic to fall back to the 32-bit queue (in effect it's around a 1% perf loss). This must be backported to 1.3. This is libslz upstream commit 54cf477a1736b3e747af14ce1ec38d7c28b34cfc
W
Willy Tarreau committed
818cd155e990042e19a4c63f39923f1661ffdc3c
Parent: e0fe1be
Committed by William Lallemand <wlallemand@haproxy.com>
on 9/1/2026, 11:47:07 AM