From b4f663a29bc1c9168108538d27c427a58c593668 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 17 Feb 2011 23:11:49 +0000 Subject: On Windows, try putting __declspec(noreturn) in front of declarations of routines that don't return. (This requires that some files include config.h to get WS_MSVC_NORETURN declared properly.) svn path=/trunk/; revision=35989 --- config.h.win32 | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'config.h.win32') diff --git a/config.h.win32 b/config.h.win32 index 92f7057a16..bfed02b776 100644 --- a/config.h.win32 +++ b/config.h.win32 @@ -85,6 +85,17 @@ # define WS_VAR_IMPORT extern #endif +/* + * Define WS_MSVC_NORETURN appropriately for declarations of routines that + * never return (just like Charlie on the MTA). + * + * Note that MSVC++ expects __declspec(noreturn) to precede the function + * name and GCC, as far as I know, expects __attribute__((noreturn)) to + * follow the function name, so we need two different flavors of + * noreturn tag. + */ +#define WS_MSVC_NORETURN __declspec(noreturn) + /* Define if you have the gethostbyname2 function. */ /* #undef HAVE_GETHOSTBYNAME2 */ -- cgit v1.2.3