1*ccec91a1Sjoerg /* 2*ccec91a1Sjoerg * Copyright 2010-2011 PathScale, Inc. All rights reserved. 3*ccec91a1Sjoerg * 4*ccec91a1Sjoerg * Redistribution and use in source and binary forms, with or without 5*ccec91a1Sjoerg * modification, are permitted provided that the following conditions are met: 6*ccec91a1Sjoerg * 7*ccec91a1Sjoerg * 1. Redistributions of source code must retain the above copyright notice, 8*ccec91a1Sjoerg * this list of conditions and the following disclaimer. 9*ccec91a1Sjoerg * 10*ccec91a1Sjoerg * 2. Redistributions in binary form must reproduce the above copyright notice, 11*ccec91a1Sjoerg * this list of conditions and the following disclaimer in the documentation 12*ccec91a1Sjoerg * and/or other materials provided with the distribution. 13*ccec91a1Sjoerg * 14*ccec91a1Sjoerg * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS 15*ccec91a1Sjoerg * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 16*ccec91a1Sjoerg * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 17*ccec91a1Sjoerg * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 18*ccec91a1Sjoerg * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 19*ccec91a1Sjoerg * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 20*ccec91a1Sjoerg * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 21*ccec91a1Sjoerg * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 22*ccec91a1Sjoerg * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 23*ccec91a1Sjoerg * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 24*ccec91a1Sjoerg * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25*ccec91a1Sjoerg */ 26*ccec91a1Sjoerg 27*ccec91a1Sjoerg #include <stdlib.h> 28*ccec91a1Sjoerg 29*ccec91a1Sjoerg namespace std 30*ccec91a1Sjoerg { 31*ccec91a1Sjoerg /** 32*ccec91a1Sjoerg * Stub implementation of std::terminate. Used when the STL implementation 33*ccec91a1Sjoerg * doesn't provide one. 34*ccec91a1Sjoerg */ 35*ccec91a1Sjoerg __attribute__((weak)) terminate()36*ccec91a1Sjoerg void terminate() 37*ccec91a1Sjoerg { 38*ccec91a1Sjoerg abort(); 39*ccec91a1Sjoerg } 40*ccec91a1Sjoerg } 41