2
* Drizzle Client & Protocol Library
4
* Copyright (C) 2008 Eric Day (eday@oddments.org)
7
* Use and distribution licensed under the BSD license. See
8
* the COPYING file in this directory for full text.
10
* Implementation drawn from visibility.texi in gnulib.
15
* @brief Visibility Control Macros
18
#ifndef __DRIZZLE_VISIBILITY_H
19
#define __DRIZZLE_VISIBILITY_H
23
* DRIZZLE_API is used for the public API symbols. It either DLL imports or
24
* DLL exports (or does nothing for static build).
26
* DRIZZLE_LOCAL is used for non-api symbols.
31
# define DRIZZLE_LOCAL
33
#if defined(BUILDING_LIBDRIZZLE)
34
# if defined(HAVE_VISIBILITY)
35
# define DRIZZLE_API __attribute__ ((visibility("default")))
36
# define DRIZZLE_LOCAL __attribute__ ((visibility("hidden")))
37
# elif defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550)
38
# define DRIZZLE_API __global
39
# define DRIZZLE_API __hidden
40
# elif defined(_MSC_VER)
41
# define DRIZZLE_API extern __declspec(dllexport)
42
# define DRIZZLE_LOCAL
43
# endif /* defined(HAVE_VISIBILITY) */
44
#else /* defined(BUILDING_LIBDRIZZLE) */
45
# if defined(_MSC_VER)
46
# define DRIZZLE_API extern __declspec(dllimport)
47
# define DRIZZLE_LOCAL
50
# define DRIZZLE_LOCAL
51
# endif /* defined(_MSC_VER) */
52
#endif /* defined(BUILDING_LIBDRIZZLE) */
55
#endif /* __DRIZZLE_VISIBILITY_H */