00001 00019 /* 00020 * The contents of this file are subject to the Mozilla Public License 00021 * Version 1.0 (the "License"); you may not use this file except in 00022 * compliance with the License. You may obtain a copy of the License at 00023 * http://www.mozilla.org/MPL/ 00024 * 00025 * Software distributed under the License is distributed on an "AS IS" 00026 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the 00027 * License for the specific language governing rights and limitations 00028 * under the License. 00029 * 00030 * The Original Code is legOS code, released October 17, 1999. 00031 * 00032 * The Initial Developer of the Original Code is Markus L. Noga. 00033 * Portions created by Markus L. Noga are Copyright (C) 1999 00034 * Markus L. Noga. All Rights Reserved. 00035 * 00036 * Contributor(s): Markus L. Noga <markus@noga.de> 00037 * Lars Berntzon <lasse@cecilia-data.se> 00038 */ 00039 00040 #include <stdlib.h> // for malloc(), free(), size_t def'ns 00041 00042 // NOTE: use explicit def'n versus <unistd.h> due to it's use of config.h (not avail. here) 00043 extern void exit(int) __attribute__ ((noreturn)); 00044 00046 00048 void __terminate() { 00049 exit(-1); 00050 } 00051 00053 00055 void __sjthrow() { 00056 __terminate(); 00057 } 00058 00060 00062 void* __get_eh_context() { 00063 return (void*) 0; 00064 } 00066 int __rtti_si() { 00067 return 0; 00068 } 00070 int __rtti_user() { 00071 return 0; 00072 } 00073 00074 // if we are using 2.95 compiler then define old style new/delete 00075 #if __GNUC__ < 3 00076 00077 00080 void __builtin_delete(void* ptr) { 00081 free(ptr); 00082 } 00083 00085 00088 void *__builtin_new(unsigned int size) { 00089 return malloc(size); 00090 } 00091 #endif 00092 00093 void 00094 __pure_virtual() 00095 { 00096 __terminate(); 00097 } 00098