libdrizzle Developer Documentation

libdrizzle/visibility.h
Go to the documentation of this file.
00001 /*
00002  * Drizzle Client & Protocol Library
00003  *
00004  * Copyright (C) 2008 Eric Day (eday@oddments.org)
00005  * All rights reserved.
00006  *
00007  * Use and distribution licensed under the BSD license.  See
00008  * the COPYING file in this directory for full text.
00009  * 
00010  * Implementation drawn from visibility.texi in gnulib.
00011  */
00012 
00018 #ifndef __DRIZZLE_VISIBILITY_H
00019 #define __DRIZZLE_VISIBILITY_H
00020 
00029 #if defined(BUILDING_LIBDRIZZLE)
00030 # if defined(HAVE_VISIBILITY)
00031 #  define DRIZZLE_API __attribute__ ((visibility("default")))
00032 #  define DRIZZLE_LOCAL  __attribute__ ((visibility("hidden")))
00033 # elif defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550)
00034 #  define DRIZZLE_API __global
00035 #  define DRIZZLE_API __hidden
00036 # elif defined(_MSC_VER)
00037 #  define DRIZZLE_API extern __declspec(dllexport) 
00038 #  define DRIZZLE_LOCAL
00039 # endif /* defined(HAVE_VISIBILITY) */
00040 #else  /* defined(BUILDING_LIBDRIZZLE) */
00041 # if defined(_MSC_VER)
00042 #  define DRIZZLE_API extern __declspec(dllimport) 
00043 #  define DRIZZLE_LOCAL
00044 # else
00045 #  define DRIZZLE_API
00046 #  define DRIZZLE_LOCAL
00047 # endif /* defined(_MSC_VER) */
00048 #endif /* defined(BUILDING_LIBDRIZZLE) */
00049 
00050 #endif /* __DRIZZLE_VISIBILITY_H */