increase portability of NORETURN declarations
Some compilers (including at least MSVC) support NORETURN on function declarations, but only before the function-name. This patch makes it possible to define NORETURN to something meaningful for those compilers. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
This commit is contained in:
committed by
Jeff King
parent
1be224ba6e
commit
a4f3131c07
@ -186,13 +186,13 @@ extern char *gitbasename(char *);
|
||||
#include "compat/bswap.h"
|
||||
|
||||
/* General helper functions */
|
||||
extern void usage(const char *err) NORETURN;
|
||||
extern void die(const char *err, ...) NORETURN __attribute__((format (printf, 1, 2)));
|
||||
extern void die_errno(const char *err, ...) NORETURN __attribute__((format (printf, 1, 2)));
|
||||
extern NORETURN void usage(const char *err);
|
||||
extern NORETURN void die(const char *err, ...) __attribute__((format (printf, 1, 2)));
|
||||
extern NORETURN void die_errno(const char *err, ...) __attribute__((format (printf, 1, 2)));
|
||||
extern int error(const char *err, ...) __attribute__((format (printf, 1, 2)));
|
||||
extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2)));
|
||||
|
||||
extern void set_die_routine(void (*routine)(const char *err, va_list params) NORETURN);
|
||||
extern void set_die_routine(NORETURN void (*routine)(const char *err, va_list params));
|
||||
|
||||
extern int prefixcmp(const char *str, const char *prefix);
|
||||
extern time_t tm_to_time_t(const struct tm *tm);
|
||||
|
||||
Reference in New Issue
Block a user