BUG/MINOR: compat: make sure __WORDSIZE is always defined
authorWilly Tarreau <w@1wt.eu>
Wed, 15 Sep 2021 08:15:03 +0000 (10:15 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 15 Sep 2021 08:32:12 +0000 (10:32 +0200)
commit4f5485bfad8355b7cf2d62a36897558dfc44bcb6
tree22c6ab2f0960e23043d94a5fe9d88731f0ef78da
parent8ab941939480af65660182e343df22fcdced6005
BUG/MINOR: compat: make sure __WORDSIZE is always defined

-Wundef triggered on a MIPS-based musl build on __WORDSIZE that's used
in ultoa_o() and some Lua initialization. The former will fail to convert
integers larger to 1 billion to proper string in this case. Let's make
sure this macro is defined and fall back to values determined from
__SIZEOF_LONG__ otherwise. A cleaner long-term approach would consist
in removing all remaining occurrences of this macro.

This can be backported to all versions.
include/haproxy/compat.h