diff options
-rw-r--r-- | include/err.h | 28 | ||||
-rw-r--r-- | src/err.c | 16 |
2 files changed, 36 insertions, 8 deletions
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; @@ -25,6 +25,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. */ @@ -41,6 +43,8 @@ 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. */ @@ -54,6 +58,8 @@ 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. */ @@ -70,6 +76,8 @@ 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. */ @@ -83,6 +91,8 @@ 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. @@ -100,6 +110,8 @@ 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. @@ -114,6 +126,8 @@ void verr(int status, const char* format, va_list args) * 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. @@ -131,6 +145,8 @@ 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. |