diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-02-17 23:11:49 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-02-17 23:11:49 +0000 |
commit | b4f663a29bc1c9168108538d27c427a58c593668 (patch) | |
tree | 6507c1b3f0ac0ace859a109a49addbf4bc1f9c26 /config.h.win32 | |
parent | dae52000024e82dbb5ca4d1cf573b95d9a831330 (diff) |
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
Diffstat (limited to 'config.h.win32')
-rw-r--r-- | config.h.win32 | 11 |
1 files changed, 11 insertions, 0 deletions
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 */ |