mirror of
https://github.com/nmap/nmap.git
synced 2026-02-08 14:36:33 +00:00
Define a NORETURN macro
This commit is contained in:
@@ -74,19 +74,18 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
__declspec(noreturn)
|
||||
#if defined(__GNUC__)
|
||||
#define NORETURN __attribute__((noreturn))
|
||||
#elif defined(_MSC_VER)
|
||||
#define NORETURN __declspec((noreturn))
|
||||
#else
|
||||
#define NORETURN
|
||||
#endif
|
||||
void fatal(char *fmt, ...)
|
||||
__attribute__ ((noreturn))
|
||||
|
||||
NORETURN void fatal(char *fmt, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
|
||||
#ifdef WIN32
|
||||
__declspec(noreturn)
|
||||
#endif
|
||||
void pfatal(char *fmt, ...)
|
||||
__attribute__ ((noreturn))
|
||||
NORETURN void pfatal(char *fmt, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
|
||||
#endif /* ERROR_H */
|
||||
|
||||
Reference in New Issue
Block a user