1
0
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:
dmiller
2014-11-17 13:25:32 +00:00
parent 07bb3c4439
commit 85bb2d388d
6 changed files with 29 additions and 34 deletions

View File

@@ -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 */