2 * Copyright 2001-2007 Internet2
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 * Base header file definitions
21 * Must be included prior to including any other header
24 #ifndef __saml_base_h__
25 #define __saml_base_h__
27 #include <xmltooling/base.h>
29 // Windows and GCC4 Symbol Visibility Macros
31 #define SAML_IMPORT __declspec(dllimport)
32 #define SAML_EXPORT __declspec(dllexport)
34 #define SAML_DLLPUBLIC
37 #ifdef GCC_HASCLASSVISIBILITY
38 #define SAML_EXPORT __attribute__ ((visibility("default")))
39 #define SAML_DLLLOCAL __attribute__ ((visibility("hidden")))
40 #define SAML_DLLPUBLIC __attribute__ ((visibility("default")))
44 #define SAML_DLLPUBLIC
48 // Define SAML_API for DLL builds
50 #define SAML_API SAML_EXPORT
52 #define SAML_API SAML_IMPORT
55 // Throwable classes must always be visible on GCC in all binaries
57 #define SAML_EXCEPTIONAPI(api) api
58 #elif defined(GCC_HASCLASSVISIBILITY)
59 #define SAML_EXCEPTIONAPI(api) SAML_EXPORT
61 #define SAML_EXCEPTIONAPI(api)
64 #endif /* __saml_base_h__ */