1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-24 16:39:03 +00:00

Define a NORETURN macro

This commit is contained in:
dmiller
2014-11-17 13:25:32 +00:00
parent 07bb3c4439
commit 85bb2d388d
6 changed files with 29 additions and 34 deletions

View File

@@ -162,11 +162,15 @@ struct abstract_ip_hdr {
u32 ipid; /* IPv4 IP ID or IPv6 flow label. */
};
#ifdef WIN32
__declspec(noreturn)
#if defined(__GNUC__)
#define NORETURN __attribute__((noreturn))
#elif defined(_MSC_VER)
#define NORETURN __declspec((noreturn))
#else
#define NORETURN
#endif
void netutil_fatal(const char *str, ...)
__attribute__ ((noreturn))
NORETURN void netutil_fatal(const char *str, ...)
__attribute__ ((format (printf, 1, 2)));
int netutil_error(const char *str, ...)