#include <assert.h>
#include <stdio.h>
-#ifndef __NBSD_LIBC
-#include <minix/config.h>
-#include <minix/const.h>
-#include <minix/sysutil.h>
-
-void __bad_assertion(const char *mess) {
- panic("%s", mess);
-}
-
-#else /* NBSD_LIBC */
-
#include <sys/types.h>
#include <stdlib.h>
const char *file, *function, *failedexpr;
int line;
{
-
- (void)fprintf(stderr,
- "assertion \"%s\" failed: file \"%s\", line %d%s%s%s\n",
- failedexpr, file, line,
- function ? ", function \"" : "",
- function ? function : "",
- function ? "\"" : "");
- abort();
+ (void)printf("%s:%d: assert \"%s\" failed", file, line, failedexpr);
+ if(function) printf(", function \"%s\"", function);
+ printf("\n");
+ panic("assert failed");
/* NOTREACHED */
}
__assert13(file, line, NULL, failedexpr);
/* NOTREACHED */
}
-
-#endif /* NBSD_LIBC */