2 * Copyright (C) 2006-2009 Brian Aker
5 * Use and distribution licensed under the BSD license. See
6 * the COPYING file in the parent directory for full text.
8 * Summary: Interface for memcached server.
10 * Author: Trond Norbye
16 * @brief Visibility control macros
19 #ifndef __LIBMEMCACHED_VISIBILITY_H__
20 #define __LIBMEMCACHED_VISIBILITY_H__
24 * LIBMEMCACHED_API is used for the public API symbols. It either DLL imports or
25 * DLL exports (or does nothing for static build).
27 * LIBMEMCACHED_LOCAL is used for non-api symbols.
30 #if defined(BUILDING_LIBMEMCACHED)
31 # if defined(HAVE_VISIBILITY) && HAVE_VISIBILITY
32 # define LIBMEMCACHED_API __attribute__ ((visibility("default")))
33 # define LIBMEMCACHED_LOCAL __attribute__ ((visibility("hidden")))
34 # elif defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550)
35 # define LIBMEMCACHED_API __global
36 # define LIBMEMCACHED_LOCAL __hidden
37 # elif defined(_MSC_VER)
38 # define LIBMEMCACHED_API extern __declspec(dllexport)
39 # define LIBMEMCACHED_LOCAL
41 # define LIBMEMCACHED_API
42 # define LIBMEMCACHED_LOCAL
43 # endif /* defined(HAVE_VISIBILITY) */
44 #else /* defined(BUILDING_LIBMEMCACHED) */
45 # if defined(_MSC_VER)
46 # define LIBMEMCACHED_API extern __declspec(dllimport)
47 # define LIBMEMCACHED_LOCAL
49 # define LIBMEMCACHED_API
50 # define LIBMEMCACHED_LOCAL
51 # endif /* defined(_MSC_VER) */
52 #endif /* defined(BUILDING_LIBMEMCACHED) */
54 #endif /* __LIBMEMCACHED_VISIBILITY_H__ */