bump product version to 6.3.0.0.beta1
[LibreOffice.git] / bridges / source / cpp_uno / gcc3_solaris_sparc / share.hxx
blob60ed7a0e5b137af3c9bd7b007d2ed304b05012ff
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_BRIDGES_SOURCE_CPP_UNO_GCC3_SOLARIS_SPARC_SHARE_HXX
20 #define INCLUDED_BRIDGES_SOURCE_CPP_UNO_GCC3_SOLARIS_SPARC_SHARE_HXX
22 #include "uno/mapping.h"
23 #include <typeinfo>
24 #include <exception>
25 #include <cstddef>
26 namespace CPPU_CURRENT_NAMESPACE
28 void dummy_can_throw_anything( char const * );
29 // ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h
31 struct _Unwind_Exception
33 unsigned exception_class __attribute__((__mode__(__DI__)));
34 void * exception_cleanup;
35 unsigned private_1 __attribute__((__mode__(__word__)));
36 unsigned private_2 __attribute__((__mode__(__word__)));
37 } __attribute__((__aligned__));
39 struct __cxa_exception
41 std::type_info *exceptionType;
42 void (*exceptionDestructor)(void *);
44 void (*unexpectedHandler)(); // std::unexpected_handler dropped from C++17
45 std::terminate_handler terminateHandler;
47 __cxa_exception *nextException;
49 int handlerCount;
51 int handlerSwitchValue;
52 const unsigned char *actionRecord;
53 const unsigned char *languageSpecificData;
54 void *catchTemp;
55 void *adjustedPtr;
57 _Unwind_Exception unwindHeader;
60 extern "C" void *__cxa_allocate_exception(
61 std::size_t thrown_size ) throw();
62 extern "C" void __cxa_throw (
63 void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ) __attribute__((noreturn));
65 struct __cxa_eh_globals
67 __cxa_exception *caughtExceptions;
68 unsigned int uncaughtExceptions;
70 extern "C" __cxa_eh_globals *__cxa_get_globals () throw();
71 extern "C" std::type_info *__cxa_current_exception_type() throw();
73 void raiseException(
74 uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );
76 void fillUnoException(uno_Any *, uno_Mapping * pCpp2Uno);
78 inline char* adjustPointer( char* pIn, typelib_TypeDescription* pType )
80 switch( pType->nSize )
82 case 1: return pIn + 3;
83 case 2: return pIn + 2;
84 case 3: return pIn + 1;
85 // Huh ? perhaps a char[3] ? Though that would be a pointer
86 // well, we have it anyway for symmetry
88 return pIn;
93 #endif
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */