commit | 2b080f713f61d19a91a1ef27ec0505c20739d508 | [log] [tgz] |
---|---|---|
author | Willy Tarreau <w@1wt.eu> | Sun Nov 13 11:39:18 2022 +0100 |
committer | Willy Tarreau <w@1wt.eu> | Mon Nov 14 11:14:02 2022 +0100 |
tree | 3ae7fdf75a324e58be9ef1c74991f629e9cc4794 | |
parent | 08e09f0b3c5803286fb1db13f56273a793a5826e [diff] |
BUILD: compiler: add a default definition for __has_attribute() It happens that gcc since 5.x has this macro which is only mentioned once in the doc, associated with __builtin_has_attribute(). Clang had it at least since 3.0. In addition it validates #ifdef when present, so it's easy to detect it. Here we're providing a fallback to another macro __has_attribute_<name> so that it's possible to define that macro to the value 1 for older compilers when the attribute is supported.