8#ifndef BOTAN_UTIL_COMPILER_FLAGS_H_
9#define BOTAN_UTIL_COMPILER_FLAGS_H_
12#include <botan/build.h>
19#if defined(__has_builtin)
20 #define BOTAN_COMPILER_HAS_BUILTIN(x) __has_builtin(x)
22 #define BOTAN_COMPILER_HAS_BUILTIN(x) 0
28#if defined(__has_attribute)
29 #define BOTAN_COMPILER_HAS_ATTRIBUTE(x) __has_attribute(x)
30 #define BOTAN_COMPILER_ATTRIBUTE(x) __attribute__((x))
32 #define BOTAN_COMPILER_HAS_ATTRIBUTE(x) 0
33 #define BOTAN_COMPILER_ATTRIBUTE(x)
39#if BOTAN_COMPILER_HAS_ATTRIBUTE(target)
40 #define BOTAN_FUNC_ISA(isa) BOTAN_COMPILER_ATTRIBUTE(target(isa))
42 #define BOTAN_FUNC_ISA(isa)
48#define BOTAN_FUNC_ISA_INLINE(isa) BOTAN_FUNC_ISA(isa) BOTAN_FORCE_INLINE
53#if BOTAN_COMPILER_HAS_ATTRIBUTE(init_priority)
54 #define BOTAN_EARLY_INIT(prio) BOTAN_COMPILER_ATTRIBUTE(init_priority(prio))
56 #define BOTAN_EARLY_INIT(prio)
62#if !defined(BOTAN_FORCE_INLINE)
64 #if BOTAN_COMPILER_HAS_ATTRIBUTE(always_inline)
65 #define BOTAN_FORCE_INLINE inline BOTAN_COMPILER_ATTRIBUTE(always_inline)
67 #elif defined(_MSC_VER)
68 #define BOTAN_FORCE_INLINE __forceinline
71 #define BOTAN_FORCE_INLINE inline
#define BOTAN_FUTURE_INTERNAL_HEADER(hdr)