Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  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.  
  16. void
  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. }
  27.