mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-16 15:11:52 +00:00
Add __FBSDID.
Change __assert() function to print failing function name. #if 0 the sccsid block. This makes us C99 conforming.
This commit is contained in:
parent
8c825c1afd
commit
6cefb54a32
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=85422
@ -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 */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user