diff options
author | 2002-04-17 16:00:34 +0000 | |
---|---|---|
committer | 2002-04-17 16:00:34 +0000 | |
commit | bcb9deaf80dc2518313660ef808c075803b6597f (patch) | |
tree | 441f060c6a1dcf706fa9eb2c801378a3cdc06e1e /lib/libc/gen/assert.c | |
parent | Ld speed-up patch. (diff) | |
download | wireguard-openbsd-bcb9deaf80dc2518313660ef808c075803b6597f.tar.xz wireguard-openbsd-bcb9deaf80dc2518313660ef808c075803b6597f.zip |
Use __func__ in assert.
ok millert@
Diffstat (limited to 'lib/libc/gen/assert.c')
-rw-r--r-- | lib/libc/gen/assert.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/libc/gen/assert.c b/lib/libc/gen/assert.c index ed0ca708aba..62f56686649 100644 --- a/lib/libc/gen/assert.c +++ b/lib/libc/gen/assert.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: assert.c,v 1.2 1996/08/19 08:21:46 tholo Exp $"; +static char *rcsid = "$OpenBSD: assert.c,v 1.3 2002/04/17 16:00:34 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -51,3 +51,13 @@ __assert(file, line, failedexpr) abort(); /* NOTREACHED */ } + +void +__assert2(const char *file, int line, const char *func, const char *failedexpr) +{ + (void)fprintf(stderr, + "assertion \"%s\" failed: file \"%s\", line %d, function \"%s\"\n", + failedexpr, file, line, func); + abort(); + /* NOTREACHED */ +} |