AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
PlatformDefinitions.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
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  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_PLATFORMDEFINITIONS_H_
17 #define ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_PLATFORMDEFINITIONS_H_
18 
25 #include <AVSCommon/Utils/SDKConfig.h>
26 
27 #if defined(_MSC_VER)
28 #include <BaseTsd.h>
29 typedef SSIZE_T ssize_t;
30 #endif
31 
32 #if defined(_MSC_VER) && defined(ACSDK_CONFIG_SHARED_LIBS)
33 #if defined(IN_AVSCOMMON)
34 #define avscommon_EXPORT __declspec(dllexport)
35 #else
36 #define avscommon_EXPORT __declspec(dllimport)
37 #endif
38 #else
39 #define avscommon_EXPORT
40 #endif
41 
42 #if defined(_MSC_VER)
43 #ifndef ACSDK_USE_RTTI
44 #define ACSDK_USE_RTTI ON
45 #endif
46 #endif
47 
79 #if defined(_MSC_VER)
80 #define ACSDK_ALWAYS_INLINE __forceinline
81 #define ACSDK_NO_INLINE __declspec(noinline)
82 #define ACSDK_HIDDEN
83 #define ACSDK_INTERNAL_LINKAGE ACSDK_ALWAYS_INLINE
84 #elif defined(__GNUC__)
85 
86 #ifndef __has_attribute
87 #define __has_attribute(x) 0
88 #endif
89 
90 #define ACSDK_ALWAYS_INLINE inline __attribute__((__always_inline__))
91 #define ACSDK_NO_INLINE __attribute__((__noinline__))
92 #define ACSDK_HIDDEN __attribute__((__visibility__("hidden")))
93 
94 #if defined(__clang__)
95 #if __has_attribute(internal_linkage)
96 #define ACSDK_INTERNAL_LINKAGE __attribute__((internal_linkage))
97 #else
98 #define ACSDK_INTERNAL_LINKAGE __attribute__((__visibility__("hidden")))
99 #endif
100 #else
101 #define ACSDK_INTERNAL_LINKAGE __attribute__((__visibility__("internal")))
102 #endif
103 #else
104 #define ACSDK_ALWAYS_INLINE inline
105 #define ACSDK_NO_INLINE
106 #define ACSDK_HIDDEN
107 #define ACSDK_INTERNAL_LINKAGE ACSDK_ALWAYS_INLINE
108 #endif
109 #define ACSDK_HIDE_FROM_ABI ACSDK_INTERNAL_LINKAGE
110 
116 #define ACSDK_INLINE_VISIBILITY ACSDK_HIDE_FROM_ABI
117 
118 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_PLATFORMDEFINITIONS_H_

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0