diff options
author | asmodai <asmodai@FreeBSD.org> | 2001-10-24 18:12:18 +0000 |
---|---|---|
committer | asmodai <asmodai@FreeBSD.org> | 2001-10-24 18:12:18 +0000 |
commit | 578c2da5ee90ee6cc900482a1b488af7cad9275a (patch) | |
tree | 1d0a8fb610d84cdf893d39e3471a7aca28e44f2c /lib/libc/gen/assert.c | |
parent | 48519c4a69fa20f0ed35edb7c56b2b0bea366e68 (diff) | |
download | FreeBSD-src-578c2da5ee90ee6cc900482a1b488af7cad9275a.zip FreeBSD-src-578c2da5ee90ee6cc900482a1b488af7cad9275a.tar.gz |
Add __FBSDID.
Change __assert() function to print failing function name.
#if 0 the sccsid block.
This makes us C99 conforming.
Diffstat (limited to 'lib/libc/gen/assert.c')
-rw-r--r-- | lib/libc/gen/assert.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/libc/gen/assert.c b/lib/libc/gen/assert.c index eb2748c..35e096b 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 <sys/cdefs.h> +__FBSDID("$FreeBSD$"); #include <assert.h> #include <stdio.h> #include <stdlib.h> 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 */ } |