diff options
author | Christopher Faylor <me@cgf.cx> | 2000-02-17 19:39:52 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-02-17 19:39:52 +0000 |
commit | 8a0efa53e44919bcf5ccb1d3353618a82afdf8bc (patch) | |
tree | 68c3dbf3f2c6fd5d49777def9914d77b5cd4589d /newlib/libc/stdlib/eprintf.c | |
parent | 1fd5e000ace55b323124c7e556a7a864b972a5c4 (diff) | |
download | newlib-8a0efa53e44919bcf5ccb1d3353618a82afdf8bc.zip newlib-8a0efa53e44919bcf5ccb1d3353618a82afdf8bc.tar.gz newlib-8a0efa53e44919bcf5ccb1d3353618a82afdf8bc.tar.bz2 |
import newlib-2000-02-17 snapshot
Diffstat (limited to 'newlib/libc/stdlib/eprintf.c')
-rw-r--r-- | newlib/libc/stdlib/eprintf.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/newlib/libc/stdlib/eprintf.c b/newlib/libc/stdlib/eprintf.c new file mode 100644 index 0000000..46cf810 --- /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 <stdio.h> 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 <stdlib.h> +#include <stdio.h> + +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*/ +} |