From de47eb59bb829423b1d0f47ba13099073999b3cb Mon Sep 17 00:00:00 2001 From: Nicolas Planel Date: Wed, 29 Oct 2003 16:07:11 +0000 Subject: Corporate Server 2.1.1 release --- mdk-stage1/dietlibc/lib/assert_fail.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'mdk-stage1/dietlibc/lib/assert_fail.c') diff --git a/mdk-stage1/dietlibc/lib/assert_fail.c b/mdk-stage1/dietlibc/lib/assert_fail.c index 3d6ba65c1..35b8b186a 100644 --- a/mdk-stage1/dietlibc/lib/assert_fail.c +++ b/mdk-stage1/dietlibc/lib/assert_fail.c @@ -2,14 +2,15 @@ #include #include #include "dietwarning.h" +#include -extern int __ltostr(char *s, int size, unsigned long i, int base, char UpCase); +void __assert_fail (const char *assertion, const char *file, unsigned int line, const char *function); void __assert_fail (const char *assertion, const char *file, unsigned int line, const char *function) { - int alen=strlen(assertion); - int flen=strlen(file); - int fulen=strlen(function); + unsigned int alen=strlen(assertion); + unsigned int flen=strlen(file); + unsigned int fulen=function?strlen(function):0; char *buf=(char*)alloca(alen+flen+fulen+50); if (buf) { char *tmp; @@ -22,7 +23,7 @@ void __assert_fail (const char *assertion, const char *file, unsigned int line, strcat(buf,"Assertion `"); strcat(buf,assertion); strcat(buf,"' failed.\n"); - write(2,buf,strlen(buf)); + __write2(buf); } abort(); } -- cgit v1.2.1