From 9ddc65812d3ddc2054823e084d0f148246a87b0e Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 29 Aug 2015 23:29:45 +0200 Subject: m err.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- include/err.h | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'include/err.h') diff --git a/include/err.h b/include/err.h index 2599feb..dd81a4f 100644 --- a/include/err.h +++ b/include/err.h @@ -34,6 +34,8 @@ * Print a warning to stderr, followed by a description * of the value of `errno`. * + * This is a non-standard BSD extension. + * * @param format Formatting-string for the warning. * @param ... Formatting-arguments. */ @@ -44,16 +46,19 @@ void warn(const char* format, ...) * Print a warning to stderr, followed by a description * of the value of `errno`. * + * This is a non-standard BSD extension. + * * @param format Formatting-string for the warning. * @param args Formatting-arguments. */ -void vwarn(const char* format, va_list args) - __GCC_ONLY(__attribute__((format(printf, 1, 2)))); +void vwarn(const char* format, va_list args); /** * Print a warning to stderr, but do not print a * description of the value of `errno`. * + * This is a non-standard BSD extension. + * * @param format Formatting-string for the warning. * @param ... Formatting-arguments. */ @@ -64,16 +69,19 @@ void warnx(const char* format, ...) * Print a warning to stderr, but do not print a * description of the value of `errno`. * + * This is a non-standard BSD extension. + * * @param format Formatting-string for the warning. * @param args Formatting-arguments. */ -void vwarnx(const char* format, va_list args) - __GCC_ONLY(__attribute__((format(printf, 1, 2)))); +void vwarnx(const char* format, va_list args); /** * Print an error message to stderr, followed by a * description of the value of `errno`. Then exit the process. * + * This is a non-standard BSD extension. + * * @parma status The exit status the process should have. * @param format Formatting-string for the warning. * @param ... Formatting-arguments. @@ -85,17 +93,20 @@ void err(int status, const char* format, ...) * Print an error message to stderr, followed by a * description of the value of `errno`. Then exit the process. * + * This is a non-standard BSD extension. + * * @parma status The exit status the process should have. * @param format Formatting-string for the warning. * @param args Formatting-arguments. */ -void verr(int status, const char* format, va_list args) - __noreturn __GCC_ONLY(__attribute__((format(printf, 2, 3)))); +void verr(int status, const char* format, va_list args) __noreturn; /** * Print an error message to stderr, but do not print a * description of the value of `errno`. Then exit the process. * + * This is a non-standard BSD extension. + * * @parma status The exit status the process should have. * @param format Formatting-string for the warning. * @param ... Formatting-arguments. @@ -107,12 +118,13 @@ void errx(int status, const char* format, ...) * Print an error message to stderr, but do not print a * description of the value of `errno`. Then exit the process. * + * This is a non-standard BSD extension. + * * @parma status The exit status the process should have. * @param format Formatting-string for the warning. * @param args Formatting-arguments. */ -void verrx(int status, const char* format, va_list args) - __noreturn __GCC_ONLY(__attribute__((format(printf, 2, 3)))); +void verrx(int status, const char* format, va_list args) __noreturn; -- cgit v1.2.3-70-g09d2