mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-10-15 07:14:50 +02:00
Correct Clang feature detection
Clang's __GNUC__ and __GNUC_MINOR__ definitions are not reliable and may not be defined at all when targeting the MSVC ABI. Use feature-checking macros when possible or check for __clang__. [guillem@hadrons.org: Update for __ protected keyword change. ] Signed-off-by: Guillem Jover <guillem@hadrons.org>
This commit is contained in:

committed by
Guillem Jover

parent
574c7a1365
commit
7cfa2d4530
@@ -39,11 +39,11 @@
|
||||
|
||||
#define minimum(a, b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
#if defined(__GNUC__) || defined(_MSC_VER)
|
||||
#if defined(__GNUC__) || defined(__clang__) || defined(_MSC_VER)
|
||||
#define inline __inline
|
||||
#else /* __GNUC__ || _MSC_VER */
|
||||
#else /* __GNUC__ || __clang__ || _MSC_VER */
|
||||
#define inline
|
||||
#endif /* !__GNUC__ && !_MSC_VER */
|
||||
#endif /* !__GNUC__ && !__clang__ && !_MSC_VER */
|
||||
|
||||
#define KEYSZ 32
|
||||
#define IVSZ 8
|
||||
|
Reference in New Issue
Block a user