1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef _CPPU_MACROS_HXX_ 24 #define _CPPU_MACROS_HXX_ 25 26 #include <sal/types.h> 27 #include <uno/lbnames.h> 28 29 /** Namespace name for compiler/ platform, e.g. gcc3, msci */ 30 #define CPPU_CURRENT_NAMESPACE CPPU_ENV 31 32 /** Patching the GCC 3 incomatible alignment change for Linux. 33 34 This macro is appended by cppumaker to every first member of a struct, if 35 the struct inherits from a base struct and the first member is neither 36 double nor sal_[u]Int64. (The double/sal_[u]Int64 restriction is due to a 37 bug in GCC prior to version 3.3, which would cause __alignof__ of such a 38 struct to become 8 instead of 4 if CPPU_GCC3_ALIGN were added to its first 39 member.) 40 41 @internal 42 */ 43 #if defined(__GNUC__) && (__GNUC__ >= 3) 44 #define CPPU_GCC3_ALIGN( base_struct ) __attribute__ ((aligned (__alignof__ (base_struct)))) 45 #else 46 #define CPPU_GCC3_ALIGN( base_struct ) 47 #endif 48 49 /** 50 Exporting the symbols necessary for exception handling on GCC. 51 52 These macros are used in the headers generated by cppumaker for UNO exception 53 types, to ensure that exception handling does not fail on GCC. 54 55 @internal 56 */ 57 #define CPPU_GCC_DLLPUBLIC_EXPORT SAL_EXCEPTION_DLLPUBLIC_EXPORT 58 #define CPPU_GCC_DLLPRIVATE SAL_EXCEPTION_DLLPRIVATE 59 60 #endif // _CPPU_MACROS_HXX_ 61 62