diff options
-rw-r--r-- | include/compat/err.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/compat/err.h b/include/compat/err.h index 65a760f..3a5e01f 100644 --- a/include/compat/err.h +++ b/include/compat/err.h | |||
@@ -18,6 +18,11 @@ | |||
18 | #include <stdio.h> | 18 | #include <stdio.h> |
19 | #include <string.h> | 19 | #include <string.h> |
20 | 20 | ||
21 | #if defined(_MSC_VER) | ||
22 | __declspec(noreturn) | ||
23 | #else | ||
24 | __attribute__((noreturn)) | ||
25 | #endif | ||
21 | static inline void | 26 | static inline void |
22 | err(int eval, const char *fmt, ...) | 27 | err(int eval, const char *fmt, ...) |
23 | { | 28 | { |
@@ -34,6 +39,11 @@ err(int eval, const char *fmt, ...) | |||
34 | va_end(ap); | 39 | va_end(ap); |
35 | } | 40 | } |
36 | 41 | ||
42 | #if defined(_MSC_VER) | ||
43 | __declspec(noreturn) | ||
44 | #else | ||
45 | __attribute__((noreturn)) | ||
46 | #endif | ||
37 | static inline void | 47 | static inline void |
38 | errx(int eval, const char *fmt, ...) | 48 | errx(int eval, const char *fmt, ...) |
39 | { | 49 | { |