diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index d53dbcc819..41ac040846 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,10 @@ +2007-03-28 Joel Sherrill + + PR 1234/cpukit + * libcsupport/Makefile.am: Provide printk() based implementation of + __assert() to reduce dependencies in executables. + * libcsupport/src/__assert.c: New file. + 2007-03-28 Ralf Corsépius * librpc/src/rpc/clnt_tcp.c (clnttcp_create): diff --git a/cpukit/libcsupport/Makefile.am b/cpukit/libcsupport/Makefile.am index e91b7927da..add1f50e63 100644 --- a/cpukit/libcsupport/Makefile.am +++ b/cpukit/libcsupport/Makefile.am @@ -33,7 +33,7 @@ include_rtems_zilog_HEADERS = include/zilog/z8036.h include/zilog/z8530.h \ include/zilog/z8536.h ## General stuff -ERROR_C_FILES = src/error.c +ERROR_C_FILES = src/error.c src/__assert.c ASSOCIATION_C_FILES = src/assoc.c src/assoclocalbyname.c \ src/assoclocalbyremotebitfield.c src/assoclocalbyremote.c \ diff --git a/cpukit/libcsupport/src/__assert.c b/cpukit/libcsupport/src/__assert.c new file mode 100644 index 0000000000..18e62a75dc --- /dev/null +++ b/cpukit/libcsupport/src/__assert.c @@ -0,0 +1,21 @@ +/* __assert - small RTEMS Specific Implementation + * + * COPYRIGHT (c) 2007. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#include +#include + +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); +}