Updating for 1.0.2 release
[awesomized/libmemcached] / libhashkit-1.0 / visibility.h
1 /*
2 * Summary: interface for HashKit functions
3 * Description: visibitliy macros for HashKit library
4 *
5 * Use and distribution licensed under the BSD license. See
6 * the COPYING file in this directory for full text.
7 *
8 * Author: Monty Taylor
9 */
10
11 /**
12 * @file
13 * @brief Visibility control macros
14 */
15
16 #pragma once
17
18 /**
19 *
20 * HASHKIT_API is used for the public API symbols. It either DLL imports or
21 * DLL exports (or does nothing for static build).
22 *
23 * HASHKIT_LOCAL is used for non-api symbols.
24 */
25
26 #if defined(BUILDING_HASHKIT)
27 # if defined(HAVE_VISIBILITY) && HAVE_VISIBILITY
28 # define HASHKIT_API __attribute__ ((visibility("default")))
29 # define HASHKIT_LOCAL __attribute__ ((visibility("hidden")))
30 # elif defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550)
31 # define HASHKIT_API __global
32 # define HASHKIT_LOCAL __hidden
33 # elif defined(_MSC_VER)
34 # define HASHKIT_API extern __declspec(dllexport)
35 # define HASHKIT_LOCAL
36 # else
37 # define HASHKIT_API
38 # define HASHKIT_LOCAL
39 # endif /* defined(HAVE_VISIBILITY) */
40 #else /* defined(BUILDING_HASHKIT) */
41 # if defined(_MSC_VER)
42 # define HASHKIT_API extern __declspec(dllimport)
43 # define HASHKIT_LOCAL
44 # else
45 # define HASHKIT_API
46 # define HASHKIT_LOCAL
47 # endif /* defined(_MSC_VER) */
48 #endif /* defined(BUILDING_HASHKIT) */