~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/visibility.h

Renamed more stuff to drizzle.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
 
13
 
/**
14
 
 * @file
15
 
 * @brief Visibility Control Macros
16
 
 */
17
 
 
18
 
#ifndef __DRIZZLE_VISIBILITY_H
19
 
#define __DRIZZLE_VISIBILITY_H
20
 
 
21
 
/**
22
 
 *
23
 
 * DRIZZLE_API is used for the public API symbols. It either DLL imports or
24
 
 * DLL exports (or does nothing for static build).
25
 
 *
26
 
 * DRIZZLE_LOCAL is used for non-api symbols.
27
 
 */
28
 
 
29
 
#if defined(_WIN32)
30
 
# define DRIZZLE_API
31
 
# define DRIZZLE_LOCAL
32
 
#else
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
48
 
# else
49
 
#  define DRIZZLE_API
50
 
#  define DRIZZLE_LOCAL
51
 
# endif /* defined(_MSC_VER) */
52
 
#endif /* defined(BUILDING_LIBDRIZZLE) */
53
 
#endif /* _WIN32 */
54
 
 
55
 
#endif /* __DRIZZLE_VISIBILITY_H */