From 8a0efa53e44919bcf5ccb1d3353618a82afdf8bc Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 17 Feb 2000 19:39:52 +0000 Subject: import newlib-2000-02-17 snapshot --- newlib/libc/stdlib/eprintf.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 newlib/libc/stdlib/eprintf.c (limited to 'newlib/libc/stdlib/eprintf.c') diff --git a/newlib/libc/stdlib/eprintf.c b/newlib/libc/stdlib/eprintf.c new file mode 100644 index 000000000..46cf8104b --- /dev/null +++ b/newlib/libc/stdlib/eprintf.c @@ -0,0 +1,26 @@ +/* This is an implementation of the __eprintf function which is + compatible with the assert.h which is distributed with gcc. + + This function is provided because in some cases libgcc.a will not + provide __eprintf. This will happen if inhibit_libc is defined, + which is done because at the time that libgcc2.c is compiled, the + correct may not be available. newlib provides its own + copy of assert.h, which calls __assert, not __eprintf. However, in + some cases you may accidentally wind up compiling with the gcc + assert.h. In such a case, this __eprintf will be used if there + does not happen to be one in libgcc2.c. */ + +#include +#include + +void +__eprintf (format, file, line, expression) + const char *format; + const char *file; + unsigned int line; + const char *expression; +{ + (void) fiprintf (stderr, format, file, line, expression); + abort (); + /*NOTREACHED*/ +} -- cgit v1.2.3