From c256490e6927539522e2433e3b300515f85a25bf Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 28 Jun 2013 12:51:28 +0100 Subject: Modify FZ_NORETURN to work on MSVC too. We need to have it as a prefix, not a postfix now, but it should work on both gcc and MSVC now. --- include/mupdf/fitz/context.h | 6 +++--- include/mupdf/fitz/system.h | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/mupdf/fitz/context.h b/include/mupdf/fitz/context.h index 5f5df366..d7365227 100644 --- a/include/mupdf/fitz/context.h +++ b/include/mupdf/fitz/context.h @@ -65,9 +65,9 @@ void fz_var_imp(void *); if (ctx->error->stack[ctx->error->top--].code > 1) int fz_push_try(fz_error_context *ex); -void fz_throw(fz_context *, int errcode, const char *, ...) __printflike(3, 4) FZ_NORETURN; -void fz_rethrow(fz_context *) FZ_NORETURN; -void fz_rethrow_message(fz_context *, const char *, ...) __printflike(2, 3) FZ_NORETURN; +FZ_NORETURN void fz_throw(fz_context *, int errcode, const char *, ...) __printflike(3, 4); +FZ_NORETURN void fz_rethrow(fz_context *); +FZ_NORETURN void fz_rethrow_message(fz_context *, const char *, ...) __printflike(2, 3); void fz_warn(fz_context *ctx, const char *fmt, ...) __printflike(2, 3); const char *fz_caught_message(fz_context *ctx); int fz_caught(fz_context *ctx); diff --git a/include/mupdf/fitz/system.h b/include/mupdf/fitz/system.h index 53d400dc..e9f337b5 100644 --- a/include/mupdf/fitz/system.h +++ b/include/mupdf/fitz/system.h @@ -155,8 +155,12 @@ void fz_free_argv(int argc, char **argv); #ifdef __GNUC__ #define FZ_NORETURN __attribute__((noreturn)) #else +#ifdef _MSC_VER +#define FZ_NORETURN __declspec(noreturn) +#else #define FZ_NORETURN #endif +#endif /* GCC can do type checking of printf strings -- cgit v1.2.3