diff options
author | Mystery Man <unknown@mandriva.org> | 2003-08-20 07:37:27 +0000 |
---|---|---|
committer | Mystery Man <unknown@mandriva.org> | 2003-08-20 07:37:27 +0000 |
commit | 7f2ac73888b8ef372ea597049981b27e7d810ac2 (patch) | |
tree | 354132889b63bbe5f446cb82869b3c3367135a80 /mdk-stage1/dietlibc/lib/assert_fail.c | |
parent | 327bd24f8e4291bd1882de1990dd7339f781a9cb (diff) | |
download | drakx-7f2ac73888b8ef372ea597049981b27e7d810ac2.tar drakx-7f2ac73888b8ef372ea597049981b27e7d810ac2.tar.gz drakx-7f2ac73888b8ef372ea597049981b27e7d810ac2.tar.bz2 drakx-7f2ac73888b8ef372ea597049981b27e7d810ac2.tar.xz drakx-7f2ac73888b8ef372ea597049981b27e7d810ac2.zip |
This commit was manufactured by cvs2svn to create branch 'MDKC_1_0'.topic/MDKC_1_0
Diffstat (limited to 'mdk-stage1/dietlibc/lib/assert_fail.c')
-rw-r--r-- | mdk-stage1/dietlibc/lib/assert_fail.c | 11 |
1 files changed, 6 insertions, 5 deletions
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 <string.h> #include <unistd.h> #include "dietwarning.h" +#include <write12.h> -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(); } |