From b36dc03c90d9b460bd5aabb6e75ff0d232e0e2f1 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 9 Jan 2008 15:40:19 +0000 Subject: 2008-01-09 Joel Sherrill * libcsupport/src/__assert.c: Newlib 1.16.0 adds __assert_func(). We need to have it also. --- cpukit/ChangeLog | 5 +++++ cpukit/libcsupport/src/__assert.c | 35 +++++++++++++++++++++++++++++++---- 2 files changed, 36 insertions(+), 4 deletions(-) (limited to 'cpukit') diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 89c6582515..4a6d00591c 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,8 @@ +2008-01-09 Joel Sherrill + + * libcsupport/src/__assert.c: Newlib 1.16.0 adds __assert_func(). We + need to have it also. + 2008-01-08 Joel Sherrill * libcsupport/Makefile.am: Add malloc_sbrk_helpers.c. diff --git a/cpukit/libcsupport/src/__assert.c b/cpukit/libcsupport/src/__assert.c index f6da15f2c9..3a93d32ed7 100644 --- a/cpukit/libcsupport/src/__assert.c +++ b/cpukit/libcsupport/src/__assert.c @@ -17,9 +17,36 @@ #include #include -void __assert(const char *file, int line, const char *failedexpr) +void __assert( + const char *file, + int line, + +const char *failedexpr) { - printk("assertion \"%s\" failed: file \"%s\", line %d\n", - failedexpr, file, line); - rtems_fatal_error_occurred(0); + printk( + "assertion \"%s\" failed: file \"%s\", line %d\n", + failedexpr, + file, + line + ); + rtems_fatal_error_occurred(0); +} + +/* + * Newlib 1.16.0 added this method + */ +void __assert_func( + const char *file, + int line, + const char *func, + const char *failedexpr +) +{ + printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", + failedexpr, + file, + line, + func ? ", function: " : "", func ? func : "" + ); + rtems_fatal_error_occurred(0); } -- cgit v1.2.3