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