libdrizzle Developer Documentation

visibility.h
Go to the documentation of this file.
1/*
2 * Drizzle Client & Protocol Library
3 *
4 * Copyright (C) 2008 Eric Day (eday@oddments.org)
5 * All rights reserved.
6 *
7 * Use and distribution licensed under the BSD license. See
8 * the COPYING file in this directory for full text.
9 *
10 * Implementation drawn from visibility.texi in gnulib.
11 */
12
18#ifndef __DRIZZLE_VISIBILITY_H
19#define __DRIZZLE_VISIBILITY_H
20
29#if defined(BUILDING_LIBDRIZZLE)
30# if defined(HAVE_VISIBILITY)
31# define DRIZZLE_API __attribute__ ((visibility("default")))
32# define DRIZZLE_LOCAL __attribute__ ((visibility("hidden")))
33# elif defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550)
34# define DRIZZLE_API __global
35# define DRIZZLE_API __hidden
36# elif defined(_MSC_VER)
37# define DRIZZLE_API extern __declspec(dllexport)
38# define DRIZZLE_LOCAL
39# endif /* defined(HAVE_VISIBILITY) */
40#else /* defined(BUILDING_LIBDRIZZLE) */
41# if defined(_MSC_VER)
42# define DRIZZLE_API extern __declspec(dllimport)
43# define DRIZZLE_LOCAL
44# else
45# define DRIZZLE_API
46# define DRIZZLE_LOCAL
47# endif /* defined(_MSC_VER) */
48#endif /* defined(BUILDING_LIBDRIZZLE) */
49
50#endif /* __DRIZZLE_VISIBILITY_H */