mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-21 13:16:57 +00:00
MINOR: compiler: always define __has_feature()
This macro is provided by clang but gcc lacks it. Not having it makes it painful to test features on both compilers. Better define it to zero when not available so that __has_feature(foo) never errors.
This commit is contained in:
parent
88bd9ee6a3
commit
6d4c81db96
@ -243,4 +243,12 @@
|
||||
#define __decl_thread(decl)
|
||||
#endif
|
||||
|
||||
/* clang has a __has_feature() macro which reports true/false on a number of
|
||||
* internally supported features. Let's make sure this macro is always defined
|
||||
* and returns zero when not supported.
|
||||
*/
|
||||
#ifndef __has_feature
|
||||
#define __has_feature(x) 0
|
||||
#endif
|
||||
|
||||
#endif /* _HAPROXY_COMPILER_H */
|
||||
|
Loading…
Reference in New Issue
Block a user