summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorErik Faye-Lund <kusmabite@googlemail.com>2009-09-30 18:05:49 (GMT)
committerJeff King <peff@peff.net>2009-10-01 08:12:21 (GMT)
commita4f3131c07c1f601be1e24b2143ca7e2deea09b5 (patch)
tree2586a271cd7cd125af045dff2a741b5d7e7c6a23 /git-compat-util.h
parent1be224ba6e99f0ab34c998d7fa8023b76a15c8b6 (diff)
downloadgit-a4f3131c07c1f601be1e24b2143ca7e2deea09b5.zip
git-a4f3131c07c1f601be1e24b2143ca7e2deea09b5.tar.gz
git-a4f3131c07c1f601be1e24b2143ca7e2deea09b5.tar.bz2
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>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index 8d6e29c..bac376f 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -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);