Set fourth file version digit to signify rebuild.
[shibboleth/cpp-opensaml.git] / saml / base.h
1 /**
2  * Licensed to the University Corporation for Advanced Internet
3  * Development, Inc. (UCAID) under one or more contributor license
4  * agreements. See the NOTICE file distributed with this work for
5  * additional information regarding copyright ownership.
6  *
7  * UCAID licenses this file to you under the Apache License,
8  * Version 2.0 (the "License"); you may not use this file except
9  * in compliance with the License. You may obtain a copy of the
10  * License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing,
15  * software distributed under the License is distributed on an
16  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
17  * either express or implied. See the License for the specific
18  * language governing permissions and limitations under the License.
19  */
20
21 /**
22  * @file saml/base.h
23  * 
24  * Base header file definitions
25  * Must be included prior to including any other header
26  */
27
28 #ifndef __saml_base_h__
29 #define __saml_base_h__
30
31 #include <xmltooling/base.h>
32
33 // Windows and GCC4 Symbol Visibility Macros
34 #ifdef WIN32
35   #define SAML_IMPORT __declspec(dllimport)
36   #define SAML_EXPORT __declspec(dllexport)
37   #define SAML_DLLLOCAL
38   #define SAML_DLLPUBLIC
39 #else
40   #define SAML_IMPORT
41   #ifdef GCC_HASCLASSVISIBILITY
42     #define SAML_EXPORT __attribute__ ((visibility("default")))
43     #define SAML_DLLLOCAL __attribute__ ((visibility("hidden")))
44     #define SAML_DLLPUBLIC __attribute__ ((visibility("default")))
45   #else
46     #define SAML_EXPORT
47     #define SAML_DLLLOCAL
48     #define SAML_DLLPUBLIC
49   #endif
50 #endif
51
52 // Define SAML_API for DLL builds
53 #ifdef SAML_EXPORTS
54   #define SAML_API SAML_EXPORT
55 #else
56   #define SAML_API SAML_IMPORT
57 #endif
58
59 // Throwable classes must always be visible on GCC in all binaries
60 #ifdef WIN32
61   #define SAML_EXCEPTIONAPI(api) api
62 #elif defined(GCC_HASCLASSVISIBILITY)
63   #define SAML_EXCEPTIONAPI(api) SAML_EXPORT
64 #else
65   #define SAML_EXCEPTIONAPI(api)
66 #endif
67
68 #endif /* __saml_base_h__ */