diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-01-09 15:40:19 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-01-09 15:40:19 +0000 |
commit | b36dc03c90d9b460bd5aabb6e75ff0d232e0e2f1 (patch) | |
tree | 12d5996cdcf4523854ac5c3419352188f463f3a2 /cpukit/libcsupport | |
parent | 2008-01-08 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-b36dc03c90d9b460bd5aabb6e75ff0d232e0e2f1.tar.bz2 |
2008-01-09 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/__assert.c: Newlib 1.16.0 adds __assert_func(). We
need to have it also.
Diffstat (limited to 'cpukit/libcsupport')
-rw-r--r-- | cpukit/libcsupport/src/__assert.c | 35 |
1 files changed, 31 insertions, 4 deletions
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 <rtems/bspIo.h> #include <rtems.h> -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); } |