summaryrefslogtreecommitdiffhomepage
path: root/libtomcrypt/src
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2015-02-28 09:06:40 +0800
committerMatt Johnston <matt@ucc.asn.au>2015-02-28 09:06:40 +0800
commit31e379c300c69f1a628c74a3226346a48416e568 (patch)
tree629758aafe9ce42ce0061bebd7253ec7b49d65f2 /libtomcrypt/src
parent843953379c1f6ce56e993c82d97c268e31a86e6e (diff)
parent59bb1777be18b8f1b263aaeabe54a32933fc871d (diff)
merge from default
--HG-- branch : fastopen
Diffstat (limited to 'libtomcrypt/src')
-rw-r--r--libtomcrypt/src/headers/tomcrypt_argchk.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/libtomcrypt/src/headers/tomcrypt_argchk.h b/libtomcrypt/src/headers/tomcrypt_argchk.h
index cfc93ad..38e1bdd 100644
--- a/libtomcrypt/src/headers/tomcrypt_argchk.h
+++ b/libtomcrypt/src/headers/tomcrypt_argchk.h
@@ -4,8 +4,16 @@
#include <signal.h>
+/* portability macros for compiler-specific code attributes */
+#ifdef __GNUC__
+#define ATTRIB_NORETURN __attribute__((noreturn))
+#else
+#define ATTRIB_NORETURN
+#endif
+
+
/* this is the default LibTomCrypt macro */
-void crypt_argchk(char *v, char *s, int d);
+void crypt_argchk(char *v, char *s, int d) ATTRIB_NORETURN;
#define LTC_ARGCHK(x) if (!(x)) { crypt_argchk(#x, __FILE__, __LINE__); }
#define LTC_ARGCHKVD(x) LTC_ARGCHK(x)