Qpid Proton C API  0.24.0
import_export.h
1 #ifndef PROTON_IMPORT_EXPORT_H
2 #define PROTON_IMPORT_EXPORT_H 1
3 
4 /*
5  *
6  * Licensed to the Apache Software Foundation (ASF) under one
7  * or more contributor license agreements. See the NOTICE file
8  * distributed with this work for additional information
9  * regarding copyright ownership. The ASF licenses this file
10  * to you under the Apache License, Version 2.0 (the
11  * "License"); you may not use this file except in compliance
12  * with the License. You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing,
17  * software distributed under the License is distributed on an
18  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19  * KIND, either express or implied. See the License for the
20  * specific language governing permissions and limitations
21  * under the License.
22  *
23  */
24 
29 /*
30  Compiler specific mechanisms for managing the import and export of
31  symbols between shared objects.
32  PN_EXPORT - Export declaration
33  PN_IMPORT - Import declaration
34 */
35 
36 #if defined(WIN32) && !defined(PROTON_DECLARE_STATIC)
37 /* Import and Export definitions for Windows: */
38 # define PN_EXPORT __declspec(dllexport)
39 # define PN_IMPORT __declspec(dllimport)
40 #else
41 /* Non-Windows (Linux, etc.) definitions */
42 # define PN_EXPORT __attribute ((visibility ("default")))
43 # define PN_IMPORT
44 #endif
45 
46 
47 /* For core proton library symbols */
48 #if defined(qpid_proton_core_EXPORTS) || defined(qpid_proton_EXPORTS)
49 # define PN_EXTERN PN_EXPORT
50 #else
51 # define PN_EXTERN PN_IMPORT
52 #endif
53 
54 /* For proactor proton symbols */
55 #if defined(qpid_proton_proactor_EXPORTS) || defined(qpid_proton_EXPORTS)
56 # define PNP_EXTERN PN_EXPORT
57 #else
58 # define PNP_EXTERN PN_IMPORT
59 #endif
60 
61 /* For extra proton symbols */
62 #if defined(qpid_proton_EXPORTS)
63 # define PNX_EXTERN PN_EXPORT
64 #else
65 # define PNX_EXTERN PN_IMPORT
66 #endif
67 
68 #if ! defined(PN_USE_DEPRECATED_API)
69 # if defined(WIN32)
70 # define PN_DEPRECATED(message) __declspec(deprecated(message))
71 # elif defined __GNUC__
72 # if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40500
73 # define PN_DEPRECATED(message) __attribute__((deprecated))
74 # else
75 # define PN_DEPRECATED(message) __attribute__((deprecated(message)))
76 # endif
77 # endif
78 #endif
79 #ifndef PN_DEPRECATED
80 # define PN_DEPRECATED(message)
81 #endif
82 
86 #endif /* import_export.h */