|
From: <sv...@va...> - 2008-05-10 05:49:59
|
Author: bart
Date: 2008-05-10 06:49:58 +0100 (Sat, 10 May 2008)
New Revision: 8022
Log:
Converted VG_(assert_fail)() to ANSI C.
Modified:
trunk/exp-drd/tests/drd_bitmap_test.c
Modified: trunk/exp-drd/tests/drd_bitmap_test.c
===================================================================
--- trunk/exp-drd/tests/drd_bitmap_test.c 2008-05-09 23:26:19 UTC (rev 8021)
+++ trunk/exp-drd/tests/drd_bitmap_test.c 2008-05-10 05:49:58 UTC (rev 8022)
@@ -14,13 +14,19 @@
{ return malloc(nbytes); }
void VG_(free)(void* p)
{ return free(p); }
-void VG_(assert_fail)(Bool isCore, const Char* expr, const Char* file,
- Int line, const Char* fn, const HChar* format, ...) {
-#if defined(__linux__)
-__assert_fail(expr, file, line, fn); abort();
-#else
-assert(0);
-#endif /* __linux__ */
+void VG_(assert_fail)(Bool isCore, const Char* assertion, const Char* file,
+ Int line, const Char* function, const HChar* format,
+ ...)
+{
+ fprintf(stderr,
+ "%s:%u: %s%sAssertion `%s' failed.\n",
+ file,
+ line,
+ function ? (char*)function : "",
+ function ? ": " : "",
+ assertion);
+ fflush(stderr);
+ abort();
}
void* VG_(memset)(void *s, Int c, SizeT sz)
|