]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: compiler: fix __equals_1() on older compilers
authorWilly Tarreau <w@1wt.eu>
Fri, 7 Apr 2023 12:34:38 +0000 (14:34 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 7 Apr 2023 16:14:28 +0000 (18:14 +0200)
commit988e19c60715f8f19a9ecee8fbf647bf9d846c95
tree61fea26655e171350b01ef5eb0cc8f5bd217ab75
parentad44939e402554c4a5775c3192614cb474180d28
BUILD: compiler: fix __equals_1() on older compilers

It appeared that __has_attribute() doesn't work on gcc 4.4 and older
because the concatenation of __has_attribute##x isn't resolved as a one
before being passed to __equals_1() which immediately concatenates it to
comma_for_one. We first need to pass it through an extra layer to resolve
this name to a value. The new version was tested with gcc 4.2 to 11.3.

This may be backported though it's pretty minor.
include/haproxy/compiler.h