Ziti C SDK
Loading...
Searching...
No Matches
externs.h
Go to the documentation of this file.
1// Copyright (c) 2020-2023. NetFoundry Inc.
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// https://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
16#ifndef ZITI_SDK_EXTERNS_H
17#define ZITI_SDK_EXTERNS_H
18
19#if defined(BUILDING_ZITI_SHARED) && defined(USING_ZITI_SHARED)
20#error "Define either BUILDING_ZITI_SHARED or USING_ZITI_SHARED, not both."
21#endif
22
23#ifndef ZITI_FUNC
24
25#ifdef _WIN32
26# define ZITI_DEPRECATED(msg) __declspec(deprecated(msg))
27# if defined(BUILDING_ZITI_SHARED)
28# define ZITI_FUNC __declspec(dllexport)
29# elif defined(USING_ZITI_SHARED)
30# define ZITI_FUNC __declspec(dllimport)
31# else
32# define ZITI_FUNC /* nothing */
33# endif
34#elif __GNUC__ >= 4
35# define ZITI_FUNC __attribute__((visibility("default")))
36# define ZITI_DEPRECATED(msg) __attribute((deprecated((msg))))
37#else
38# define ZITI_FUNC /* nothing */
39# define ZITI_DEPRECATED(msg)
40#endif
41
42#endif
43
44#endif //ZITI_SDK_EXTERNS_H