include/msvcrt: Add noreturn attributes.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
stable
Alexandre Julliard 2019-04-22 13:55:43 +02:00
parent ca6478b2a3
commit 52bc3abb1b
4 changed files with 21 additions and 11 deletions

View File

@ -117,6 +117,16 @@
# endif
#endif
#ifndef DECLSPEC_NORETURN
# if defined(_MSC_VER) && (_MSC_VER >= 1200) && !defined(MIDL_PASS)
# define DECLSPEC_NORETURN __declspec(noreturn)
# elif defined(__GNUC__)
# define DECLSPEC_NORETURN __attribute__((noreturn))
# else
# define DECLSPEC_NORETURN
# endif
#endif
#ifndef DECLSPEC_ALIGN
# if defined(_MSC_VER) && (_MSC_VER >= 1300) && !defined(MIDL_PASS)
# define DECLSPEC_ALIGN(x) __declspec(align(x))

View File

@ -40,8 +40,8 @@ terminate_function __cdecl set_terminate(terminate_function func);
unexpected_function __cdecl set_unexpected(unexpected_function func);
_se_translator_function __cdecl set_se_translator(_se_translator_function func);
void __cdecl terminate(void);
void __cdecl unexpected(void);
void __cdecl terminate(void) DECLSPEC_NORETURN;
void __cdecl unexpected(void) DECLSPEC_NORETURN;
#include <poppack.h>

View File

@ -30,8 +30,8 @@ typedef unsigned int (__stdcall *_beginthreadex_start_routine_t)(void *);
uintptr_t __cdecl _beginthread(_beginthread_start_routine_t,unsigned int,void*);
uintptr_t __cdecl _beginthreadex(void*,unsigned int,_beginthreadex_start_routine_t,void*,unsigned int,unsigned int*);
intptr_t __cdecl _cwait(int*,intptr_t,int);
void __cdecl _endthread(void);
void __cdecl _endthreadex(unsigned int);
void __cdecl _endthread(void) DECLSPEC_NORETURN;
void __cdecl _endthreadex(unsigned int) DECLSPEC_NORETURN;
intptr_t WINAPIV _execl(const char*,const char*,...);
intptr_t WINAPIV _execle(const char*,const char*,...);
intptr_t WINAPIV _execlp(const char*,const char*,...);
@ -52,9 +52,9 @@ intptr_t __cdecl _spawnvpe(int,const char*,const char* const *,const char* cons
void __cdecl _c_exit(void);
void __cdecl _cexit(void);
void __cdecl _exit(int);
void __cdecl abort(void);
void __cdecl exit(int);
void __cdecl _exit(int) DECLSPEC_NORETURN;
void __cdecl abort(void) DECLSPEC_NORETURN;
void __cdecl exit(int) DECLSPEC_NORETURN;
int __cdecl system(const char*);
#ifndef _WPROCESS_DEFINED

View File

@ -184,9 +184,9 @@ errno_t __cdecl _ui64toa_s(unsigned __int64,char*,size_t,int);
char* __cdecl _ultoa(__msvcrt_ulong,char*,int);
errno_t __cdecl _ultoa_s(__msvcrt_ulong,char*,size_t,int);
void __cdecl _Exit(int);
void __cdecl _exit(int);
void __cdecl abort(void);
void __cdecl _Exit(int) DECLSPEC_NORETURN;
void __cdecl _exit(int) DECLSPEC_NORETURN;
void __cdecl abort(void) DECLSPEC_NORETURN;
int __cdecl abs(int);
int __cdecl atexit(void (__cdecl *)(void));
double __cdecl atof(const char*);
@ -200,7 +200,7 @@ div_t __cdecl div(int,int);
ldiv_t __cdecl ldiv(__msvcrt_long,__msvcrt_long);
#endif
lldiv_t __cdecl lldiv(__int64,__int64);
void __cdecl exit(int);
void __cdecl exit(int) DECLSPEC_NORETURN;
void __cdecl free(void*);
char* __cdecl getenv(const char*);
__msvcrt_long __cdecl labs(__msvcrt_long);