X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=include%2Ferr.h;h=a6505c366820cd74007bd83007f957e6257692ba;hp=5e33f9e42e4508e2c6c53214e714388d73923471;hb=780aede41913528781bbc8ff0d0e27505595f7c0;hpb=39e48531eff4e3c3e3e6d1339ff6085f1e2f69bc diff --git a/include/err.h b/include/err.h index 5e33f9e4..a6505c36 100644 --- a/include/err.h +++ b/include/err.h @@ -1,6 +1,13 @@ #ifndef _ERR_H #define _ERR_H +#if __STDC_VERSION__ >= 201112L +#elif defined(__GNUC__) +#define _Noreturn __attribute__((__noreturn__)) +#else +#define _Noreturn +#endif + #include #ifdef __cplusplus @@ -12,10 +19,10 @@ void vwarn(const char *, va_list); void warnx(const char *, ...); void vwarnx(const char *, va_list); -void err(int, const char *, ...); -void verr(int, const char *, va_list); -void errx(int, const char *, ...); -void verrx(int, const char *, va_list); +_Noreturn void err(int, const char *, ...); +_Noreturn void verr(int, const char *, va_list); +_Noreturn void errx(int, const char *, ...); +_Noreturn void verrx(int, const char *, va_list); #ifdef __cplusplus }