Bump for 3.6-28
[LibreOffice.git] / bridges / source / cpp_uno / mingw_intel / share.hxx
blob46252e4f847a4b7211fbc107b137bd90a92bf1a5
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #include "uno/mapping.h"
31 #include <typeinfo>
32 #include <exception>
33 #include <cstddef>
35 #include "cppu/macros.hxx"
36 #include "uno/any2.h"
38 namespace CPPU_CURRENT_NAMESPACE
41 void dummy_can_throw_anything( char const * );
43 // ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h
45 struct _Unwind_Exception
47 unsigned exception_class __attribute__((__mode__(__DI__)));
48 void * exception_cleanup;
49 unsigned private_1 __attribute__((__mode__(__word__)));
50 unsigned private_2 __attribute__((__mode__(__word__)));
51 } __attribute__((__aligned__));
53 struct __cxa_exception
55 ::std::type_info *exceptionType;
56 void (*exceptionDestructor)(void *);
58 ::std::unexpected_handler unexpectedHandler;
59 ::std::terminate_handler terminateHandler;
61 __cxa_exception *nextException;
63 int handlerCount;
65 int handlerSwitchValue;
66 const unsigned char *actionRecord;
67 const unsigned char *languageSpecificData;
68 void *catchTemp;
69 void *adjustedPtr;
71 _Unwind_Exception unwindHeader;
74 struct __cxa_eh_globals
76 __cxa_exception *caughtExceptions;
77 unsigned int uncaughtExceptions;
82 extern "C" CPPU_CURRENT_NAMESPACE::__cxa_eh_globals *__cxa_get_globals () throw();
84 namespace CPPU_CURRENT_NAMESPACE
87 // The following are in cxxabi.h since GCC 4.7 (they are wrapped in
88 // CPPU_CURRENT_NAMESPACE here as different GCC versions have slightly different
89 // declarations for them, e.g., with or without throw() specification, so would
90 // complain about redeclarations of these somewhat implicitly declared
91 // functions):
92 #if __GNUC__ == 4 && __GNUC_MINOR__ <= 6
93 extern "C" void *__cxa_allocate_exception(
94 std::size_t thrown_size ) throw();
95 extern "C" void __cxa_throw (
96 void *thrown_exception, void *tinfo, void (*dest) (void *) ) __attribute__((noreturn));
97 #endif
99 // -----
101 //==================================================================================================
102 void raiseException(
103 uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );
104 //==================================================================================================
105 void fillUnoException(
106 __cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */