1 | #ifndef AWS_COMMON_EXPORTS_H |
2 | #define AWS_COMMON_EXPORTS_H |
3 | /* |
4 | * Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
5 | * |
6 | * Licensed under the Apache License, Version 2.0 (the "License"). |
7 | * You may not use this file except in compliance with the License. |
8 | * A copy of the License is located at |
9 | * |
10 | * http://aws.amazon.com/apache2.0 |
11 | * |
12 | * or in the "license" file accompanying this file. This file is distributed |
13 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either |
14 | * express or implied. See the License for the specific language governing |
15 | * permissions and limitations under the License. |
16 | */ |
17 | #if defined(AWS_C_RT_USE_WINDOWS_DLL_SEMANTICS) || defined(WIN32) |
18 | # ifdef AWS_COMMON_USE_IMPORT_EXPORT |
19 | # ifdef AWS_COMMON_EXPORTS |
20 | # define AWS_COMMON_API __declspec(dllexport) |
21 | # else |
22 | # define AWS_COMMON_API __declspec(dllimport) |
23 | # endif /* AWS_COMMON_EXPORTS */ |
24 | # else |
25 | # define AWS_COMMON_API |
26 | # endif /* AWS_COMMON_USE_IMPORT_EXPORT */ |
27 | |
28 | #else /* defined (AWS_C_RT_USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32) */ |
29 | |
30 | # if ((__GNUC__ >= 4) || defined(__clang__)) && defined(AWS_COMMON_USE_IMPORT_EXPORT) && defined(AWS_COMMON_EXPORTS) |
31 | # define AWS_COMMON_API __attribute__((visibility("default"))) |
32 | # else |
33 | # define AWS_COMMON_API |
34 | # endif /* __GNUC__ >= 4 || defined(__clang__) */ |
35 | |
36 | #endif /* defined (AWS_C_RT_USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32) */ |
37 | |
38 | #ifdef AWS_NO_STATIC_IMPL |
39 | # define AWS_STATIC_IMPL AWS_COMMON_API |
40 | #endif |
41 | |
42 | #ifndef AWS_STATIC_IMPL |
43 | /* |
44 | * In order to allow us to export our inlinable methods in a DLL/.so, we have a designated .c |
45 | * file where this AWS_STATIC_IMPL macro will be redefined to be non-static. |
46 | */ |
47 | # define AWS_STATIC_IMPL static inline |
48 | #endif |
49 | |
50 | #endif /* AWS_COMMON_EXPORTS_H */ |
51 | |