libstatistics_collector  master
Lightweight aggregation utilities to collect statistics and measure message metrics.
visibility_control.hpp
Go to the documentation of this file.
1 // Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef LIBSTATISTICS_COLLECTOR__VISIBILITY_CONTROL_HPP_
16 #define LIBSTATISTICS_COLLECTOR__VISIBILITY_CONTROL_HPP_
17 
18 #if defined _WIN32 || defined __CYGWIN__
19  #ifdef __GNUC__
20  #define LIBSTATISTICS_COLLECTOR_EXPORT __attribute__ ((dllexport))
21  #define LIBSTATISTICS_COLLECTOR_IMPORT __attribute__ ((dllimport))
22  #else
23  #define LIBSTATISTICS_COLLECTOR_EXPORT __declspec(dllexport)
24  #define LIBSTATISTICS_COLLECTOR_IMPORT __declspec(dllimport)
25  #endif
26  #ifdef LIBSTATISTICS_COLLECTOR_BUILDING_LIBRARY
27  #define LIBSTATISTICS_COLLECTOR_PUBLIC LIBSTATISTICS_COLLECTOR_EXPORT
28  #else
29  #define LIBSTATISTICS_COLLECTOR_PUBLIC LIBSTATISTICS_COLLECTOR_IMPORT
30  #endif
31  #define LIBSTATISTICS_COLLECTOR_PUBLIC_TYPE LIBSTATISTICS_COLLECTOR_PUBLIC
32  #define LIBSTATISTICS_COLLECTOR_LOCAL
33 #else
34  #define LIBSTATISTICS_COLLECTOR_EXPORT __attribute__ ((visibility("default")))
35  #define LIBSTATISTICS_COLLECTOR_IMPORT
36  #if __GNUC__ >= 4
37  #define LIBSTATISTICS_COLLECTOR_PUBLIC __attribute__ ((visibility("default")))
38  #define LIBSTATISTICS_COLLECTOR_LOCAL __attribute__ ((visibility("hidden")))
39  #else
40  #define LIBSTATISTICS_COLLECTOR_PUBLIC
41  #define LIBSTATISTICS_COLLECTOR_LOCAL
42  #endif
43  #define LIBSTATISTICS_COLLECTOR_PUBLIC_TYPE
44 #endif
45 
46 #endif // LIBSTATISTICS_COLLECTOR__VISIBILITY_CONTROL_HPP_