From 6cefb54a32297dc02286e02a646ec3da1d902ecd Mon Sep 17 00:00:00 2001 From: Jeroen Ruigrok van der Werven Date: Wed, 24 Oct 2001 18:12:18 +0000 Subject: [PATCH] Add __FBSDID. Change __assert() function to print failing function name. #if 0 the sccsid block. This makes us C99 conforming. --- lib/libc/gen/assert.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/libc/gen/assert.c b/lib/libc/gen/assert.c index eb2748ce6d44..35e096b2ad78 100644 --- a/lib/libc/gen/assert.c +++ b/lib/libc/gen/assert.c @@ -31,22 +31,27 @@ * SUCH DAMAGE. */ +#if 0 #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)assert.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ +#endif + +#include +__FBSDID("$FreeBSD$"); #include #include #include void -__assert(file, line, failedexpr) - const char *file, *failedexpr; - int line; +__assert(function, file, line, failedexpr) + const char *failedexpr, *file, *function; + int line; { (void)fprintf(stderr, - "assertion \"%s\" failed: file \"%s\", line %d\n", - failedexpr, file, line); + "assertion (%s) failed: function %s(), file %s:%d\n", + failedexpr, function, file, line); abort(); /* NOTREACHED */ }