mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 23:27:04 +02:00
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).
This commit is contained in:
parent
9e52c35de4
commit
59c347c15e
@ -45,7 +45,7 @@
|
||||
#define MAX_TGROUPS 16
|
||||
#endif
|
||||
|
||||
#define MAX_THREADS_PER_GROUP LONGBITS
|
||||
#define MAX_THREADS_PER_GROUP __WORDSIZE
|
||||
|
||||
/* threads enabled, max_threads defaults to long bits for 1 tgroup or 4 times
|
||||
* long bits if more tgroups are enabled.
|
||||
|
Loading…
Reference in New Issue
Block a user