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
23 * LIBMEMCACHED_API is used for the public API symbols. It either DLL imports or
24 * DLL exports (or does nothing for static build).
26 * LIBMEMCACHED_LOCAL is used for non-api symbols.
29 #if defined(BUILDING_LIBMEMCACHED)
30 # if defined(HAVE_VISIBILITY) && HAVE_VISIBILITY
31 # define LIBMEMCACHED_API __attribute__ ((visibility("default")))
32 # define LIBMEMCACHED_LOCAL __attribute__ ((visibility("hidden")))
33 # elif defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550)
34 # define LIBMEMCACHED_API __global
35 # define LIBMEMCACHED_LOCAL __hidden
36 # elif defined(_MSC_VER)
37 # define LIBMEMCACHED_API extern __declspec(dllexport)
38 # define LIBMEMCACHED_LOCAL
40 # define LIBMEMCACHED_API
41 # define LIBMEMCACHED_LOCAL
42 # endif /* defined(HAVE_VISIBILITY) */
43 #else /* defined(BUILDING_LIBMEMCACHED) */
44 # if defined(_MSC_VER)
45 # define LIBMEMCACHED_API extern __declspec(dllimport)
46 # define LIBMEMCACHED_LOCAL
48 # define LIBMEMCACHED_API
49 # define LIBMEMCACHED_LOCAL
50 # endif /* defined(_MSC_VER) */
51 #endif /* defined(BUILDING_LIBMEMCACHED) */