1 /* Copyright (C) 1996 Robert de Bath <rdebath@cix.compulink.co.uk> 2 * This file is part of the Linux-8086 C library and is distributed 3 * under the GNU Library General Public License. 4 */ 5 6 #include <unistd.h> 7 errput(str)8static void errput(str) 9 const char * str; 10 { 11 write(2, str, strlen(str)); 12 } 13 14 void __assert(assertion,filename,linenumber)15__assert(assertion, filename, linenumber) 16 const char * assertion; 17 const char * filename; 18 int linenumber; 19 { 20 errput("Failed assertion '"); 21 errput(assertion); 22 errput("' in file "); 23 errput(filename); 24 errput(" at line "); 25 errput(itoa(linenumber)); 26 errput(".\n"); 27 abort(); 28 } 29