]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: defaults: use __WORDSIZE not LONGBITS for MAX_THREADS_PER_GROUP
authorWilly Tarreau <w@1wt.eu>
Sat, 12 Aug 2023 17:01:10 +0000 (19:01 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 12 Aug 2023 17:04:34 +0000 (19:04 +0200)
commit59c347c15e909cac33e451543ca7cd68abac670e
tree6c13b49b411ea71f9abe7a80f473b8bed9d4aaa7
parent9e52c35de4bda277292f25fb987b1500b90f0a68
BUILD: defaults: use __WORDSIZE not LONGBITS for MAX_THREADS_PER_GROUP

LONGBITS was defined long ago with old compilers that didn't provide the
word size. It's still present as being referenced in various places in the
code, but we must not use it to define other macros that may be evaluated
at pre-processing time since it contains sizeof() and casts that are not
compatible with preprocessor conditions. Let's switch MAX_THREADS_PER_GROUP
to __WORDSIZE so that we can condition blocks of code on it if needed.

LONGBITS should really be removed by now, given that we don't support
compilers not providing __WORDSIZE anymore (gcc < 4.2).
include/haproxy/defaults.h