summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2013-06-28 12:51:28 +0100
committerRobin Watts <robin.watts@artifex.com>2013-06-28 12:53:33 +0100
commitc256490e6927539522e2433e3b300515f85a25bf (patch)
tree22ba904b93cea85b0df223cf4f7bd1a3e0111b00 /include
parent9df3a0615a1fa7745160c099e1ac7cd4dfcbc86e (diff)
downloadmupdf-c256490e6927539522e2433e3b300515f85a25bf.tar.xz
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.
Diffstat (limited to 'include')
-rw-r--r--include/mupdf/fitz/context.h6
-rw-r--r--include/mupdf/fitz/system.h4
2 files changed, 7 insertions, 3 deletions
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