Browse Source

Add errc/verrc/warnc/vwarnc family: versions of err/... that take the errno

value to use for the strerror() message as an argument.  Originally from
FreeBSD 3.0
Patch from Steffen Nurpmeso (sdaoden (at) gmail.com) with minor tweaks.
OPENBSD_5_6
guenther 10 years ago
parent
commit
3010025998
1 changed files with 17 additions and 1 deletions
  1. +17
    -1
      src/include/err.h

+ 17
- 1
src/include/err.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: err.h,v 1.11 2014/04/21 16:13:24 guenther Exp $ */
/* $OpenBSD: err.h,v 1.12 2014/04/22 00:33:02 guenther Exp $ */
/* $NetBSD: err.h,v 1.11 1994/10/26 00:55:52 cgd Exp $ */
/*-
@ -44,6 +44,10 @@ __dead void err(int, const char *, ...)
__attribute__((__format__ (printf, 2, 3)));
__dead void verr(int, const char *, __va_list)
__attribute__((__format__ (printf, 2, 0)));
__dead void errc(int, int, const char *, ...)
__attribute__((__format__ (printf, 3, 4)));
__dead void verrc(int, int, const char *, __va_list)
__attribute__((__format__ (printf, 3, 0)));
__dead void errx(int, const char *, ...)
__attribute__((__format__ (printf, 2, 3)));
__dead void verrx(int, const char *, __va_list)
@ -52,6 +56,10 @@ void warn(const char *, ...)
__attribute__((__format__ (printf, 1, 2)));
void vwarn(const char *, __va_list)
__attribute__((__format__ (printf, 1, 0)));
void warnc(int, const char *, ...)
__attribute__((__format__ (printf, 2, 3)));
void vwarnc(int, const char *, __va_list)
__attribute__((__format__ (printf, 2, 0)));
void warnx(const char *, ...)
__attribute__((__format__ (printf, 1, 2)));
void vwarnx(const char *, __va_list)
@ -64,6 +72,10 @@ __dead void _err(int, const char *, ...)
__attribute__((__format__ (printf, 2, 3)));
__dead void _verr(int, const char *, __va_list)
__attribute__((__format__ (printf, 2, 0)));
__dead void _errc(int, int, const char *, ...)
__attribute__((__format__ (printf, 3, 4)));
__dead void _verrc(int, int, const char *, __va_list)
__attribute__((__format__ (printf, 3, 0)));
__dead void _errx(int, const char *, ...)
__attribute__((__format__ (printf, 2, 3)));
__dead void _verrx(int, const char *, __va_list)
@ -72,6 +84,10 @@ void _warn(const char *, ...)
__attribute__((__format__ (printf, 1, 2)));
void _vwarn(const char *, __va_list)
__attribute__((__format__ (printf, 1, 0)));
void _warnc(int, const char *, ...)
__attribute__((__format__ (printf, 2, 3)));
void _vwarnc(int, const char *, __va_list)
__attribute__((__format__ (printf, 2, 0)));
void _warnx(const char *, ...)
__attribute__((__format__ (printf, 1, 2)));
void _vwarnx(const char *, __va_list)


Loading…
Cancel
Save