From 401db82da42117744cede7ce1888d76f98072bcd Mon Sep 17 00:00:00 2001 From: Daniel Neus Date: Fri, 8 Jan 2016 21:45:48 +0100 Subject: add BOTAN_NORETURN macro and mark those functions that do not return with it --- src/build-data/buildh.in | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/build-data/buildh.in') diff --git a/src/build-data/buildh.in b/src/build-data/buildh.in index a1febe102..66696de00 100644 --- a/src/build-data/buildh.in +++ b/src/build-data/buildh.in @@ -245,6 +245,22 @@ softare-based entropy polling is still used. #endif +#if !defined(BOTAN_NORETURN) + + #if defined (__clang__) || defined (__GNUG__) + #define BOTAN_NORETURN __attribute__ ((__noreturn__)) + + #elif defined (_MSC_VER) + #define BOTAN_NORETURN __declspec(noreturn) + + #else + define BOTAN_NORETURN + + #endif + +#endif + + #if defined(_MSC_VER) #define BOTAN_CURRENT_FUNCTION __FUNCTION__ #else -- cgit v1.2.3