source: trunk/libs/newlib/src/newlib/libc/stdlib/eprintf.c @ 577

Last change on this file since 577 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 936 bytes
Line 
1/* This is an implementation of the __eprintf function which is
2   compatible with the assert.h which is distributed with gcc.
3
4   This function is provided because in some cases libgcc.a will not
5   provide __eprintf.  This will happen if inhibit_libc is defined,
6   which is done because at the time that libgcc2.c is compiled, the
7   correct <stdio.h> may not be available.  newlib provides its own
8   copy of assert.h, which calls __assert, not __eprintf.  However, in
9   some cases you may accidentally wind up compiling with the gcc
10   assert.h.  In such a case, this __eprintf will be used if there
11   does not happen to be one in libgcc2.c.  */
12
13#include <stdlib.h>
14#include <stdio.h>
15
16void
17__eprintf (format, file, line, expression)
18     const char *format;
19     const char *file;
20     unsigned int line;
21     const char *expression;
22{
23  (void) fiprintf (stderr, format, file, line, expression);
24  abort ();
25  /*NOTREACHED*/
26}
Note: See TracBrowser for help on using the repository browser.