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