Update ooo320-m1
[ooovba.git] / bridges / source / cpp_uno / gcc3_netbsd_intel / share.hxx
blob84ae70065e11af74c6d7ac4bb907d78e8f35078b
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: share.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #include <typeinfo>
32 #include <exception>
33 #include <cstddef>
35 namespace CPPU_CURRENT_NAMESPACE
38 // ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h
40 struct _Unwind_Exception
42 unsigned exception_class __attribute__((__mode__(__DI__)));
43 void * exception_cleanup;
44 unsigned private_1 __attribute__((__mode__(__word__)));
45 unsigned private_2 __attribute__((__mode__(__word__)));
46 } __attribute__((__aligned__));
48 struct __cxa_exception
50 ::std::type_info *exceptionType;
51 void (*exceptionDestructor)(void *);
53 ::std::unexpected_handler unexpectedHandler;
54 ::std::terminate_handler terminateHandler;
56 __cxa_exception *nextException;
58 int handlerCount;
60 int handlerSwitchValue;
61 const unsigned char *actionRecord;
62 const unsigned char *languageSpecificData;
63 void *catchTemp;
64 void *adjustedPtr;
66 _Unwind_Exception unwindHeader;
67 };
69 extern "C" void *__cxa_allocate_exception(
70 std::size_t thrown_size ) throw();
71 extern "C" void __cxa_throw (
72 void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ) __attribute__((noreturn));
74 struct __cxa_eh_globals
76 __cxa_exception *caughtExceptions;
77 unsigned int uncaughtExceptions;
79 extern "C" __cxa_eh_globals *__cxa_get_globals () throw();
81 // -----
83 //==================================================================================================
84 void raiseException(
85 uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );
86 //==================================================================================================
87 void fillUnoException(
88 __cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );