WIN32: hint noreturn functions
apply __declspec(noreturn) compiler hints to functions that do not return. Change-Id: I3c6c4703c7235d1df3e21dccad5272ea4cddfd36
This commit is contained in:
committed by
Nico Williams
parent
4d57ee72f3
commit
bec4818943
+19
-10
@@ -47,30 +47,39 @@
|
||||
#endif
|
||||
|
||||
#ifndef ROKEN_LIB_FUNCTION
|
||||
#ifdef _WIN32
|
||||
#define ROKEN_LIB_FUNCTION
|
||||
#define ROKEN_LIB_CALL __cdecl
|
||||
#else
|
||||
#define ROKEN_LIB_FUNCTION
|
||||
#define ROKEN_LIB_CALL
|
||||
#define ROKEN_LIB_FUNCTION
|
||||
#endif
|
||||
#ifndef ROKEN_LIB_NORETURN_FUNCTION
|
||||
#ifdef _WIN32
|
||||
#define ROKEN_LIB_NORETURN_FUNCTION _declspec(noreturn)
|
||||
#else
|
||||
#define ROKEN_LIB_NORETURN_FUNCTION
|
||||
#endif
|
||||
#endif
|
||||
#ifndef ROKEN_LIB_CALL
|
||||
#ifdef _WIN32
|
||||
#define ROKEN_LIB_CALL __cdecl
|
||||
#else
|
||||
#define ROKEN_LIB_CALL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
|
||||
ROKEN_LIB_NORETURN_FUNCTION void ROKEN_LIB_CALL
|
||||
verr(int eval, const char *fmt, va_list ap)
|
||||
__attribute__ ((__noreturn__, __format__ (__printf__, 2, 0)));
|
||||
|
||||
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
|
||||
ROKEN_LIB_NORETURN_FUNCTION void ROKEN_LIB_CALL
|
||||
err(int eval, const char *fmt, ...)
|
||||
__attribute__ ((__noreturn__, __format__ (__printf__, 2, 3)));
|
||||
|
||||
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
|
||||
ROKEN_LIB_NORETURN_FUNCTION void ROKEN_LIB_CALL
|
||||
verrx(int eval, const char *fmt, va_list ap)
|
||||
__attribute__ ((__noreturn__, __format__ (__printf__, 2, 0)));
|
||||
|
||||
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
|
||||
ROKEN_LIB_NORETURN_FUNCTION void ROKEN_LIB_CALL
|
||||
errx(int eval, const char *fmt, ...)
|
||||
__attribute__ ((__noreturn__, __format__ (__printf__, 2, 3)));
|
||||
|
||||
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
|
||||
vwarn(const char *fmt, va_list ap)
|
||||
__attribute__ ((__format__ (__printf__, 1, 0)));
|
||||
|
||||
Reference in New Issue
Block a user