Couchbase C Client  3.3.14
Asynchronous C Client for Couchbase
visibility.h
1/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2/*
3 * Copyright (C) 2011 Couchbase, Inc
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17#ifndef LIBCOUCHBASE_VISIBILITY_H
18#define LIBCOUCHBASE_VISIBILITY_H
19
20#ifdef LIBCOUCHBASE_STATIC
21#define LIBCOUCHBASE_API
22#define LCB_EXTERN_VAR extern
23#define LCB_CLASS_EXPORT
24#else
25
26#ifdef LIBCOUCHBASE_INTERNAL
27#ifdef __SUNPRO_C
28#define LIBCOUCHBASE_API __global
29#define LCB_CLASS_EXPORT LIBCOUCHBASE_API
30#elif defined(HAVE_VISIBILITY) && HAVE_VISIBILITY
31#define LIBCOUCHBASE_API __attribute__((visibility("default")))
32#define LCB_CLASS_EXPORT LIBCOUCHBASE_API
33#elif defined(_MSC_VER)
34#define LIBCOUCHBASE_API extern __declspec(dllexport)
35#define LCB_CLASS_EXPORT __declspec(dllexport)
36#else
37#define LIBCOUCHBASE_API
38#define LCB_CLASS_EXPORT
39#endif /* compiler version */
40
41#else /* !LIBCOUCHBASE_INTERNAL */
42#ifdef _MSC_VER
43#define LIBCOUCHBASE_API extern __declspec(dllimport)
44#define LCB_CLASS_EXPORT __declspec(dllimport)
45#else
46#define LIBCOUCHBASE_API
47#define LCB_CLASS_EXPORT
48#endif
49#endif /* LIBCOUCHBASE_INTERNAL */
50
51/* Define LCB_EXTERN_VAR only if !LIBCOUCHBASE_STATIC */
52#ifdef _MSC_VER
53/* Already includes 'extern' in LIBCOUCHBASE_API def, don't use it twice! */
54#define LCB_EXTERN_VAR
55#else
56#define LCB_EXTERN_VAR extern
57#endif /* _MSC_VER */
58#endif /* !LIBCOUCHBASE_STATIC */
59
64#define LCB_INTERNAL_API LIBCOUCHBASE_API
65
66#endif