diff options
author | 2002-06-10 14:59:01 +0000 | |
---|---|---|
committer | 2002-06-10 14:59:01 +0000 | |
commit | 023a5a1dbfd4a4c673730a9cc966bb0910a92153 (patch) | |
tree | b6a0ea0ada406534ee6527d1ce1cb461d96b3b0d /lib/libc/gen/assert.c | |
parent | disable all auto* stuff explicitly, which is a heck of a lot easier to do (diff) | |
download | wireguard-openbsd-023a5a1dbfd4a4c673730a9cc966bb0910a92153.tar.xz wireguard-openbsd-023a5a1dbfd4a4c673730a9cc966bb0910a92153.zip |
put back in the assert changes for ISO C 99 (put __func__ in it)
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 60d1ba1eecd..370e02279f6 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.4 2002/04/19 15:48:35 deraadt Exp $"; +static char *rcsid = "$OpenBSD: assert.c,v 1.5 2002/06/10 14:59:01 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 */ +} |