Drizzled Public API Documentation

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  * Redistribution and use in source and binary forms, with or without
00008  * modification, are permitted provided that the following conditions are
00009  * met:
00010  *
00011  *     * Redistributions of source code must retain the above copyright
00012  * notice, this list of conditions and the following disclaimer.
00013  *
00014  *     * Redistributions in binary form must reproduce the above
00015  * copyright notice, this list of conditions and the following disclaimer
00016  * in the documentation and/or other materials provided with the
00017  * distribution.
00018  *
00019  *     * The names of its contributors may not be used to endorse or
00020  * promote products derived from this software without specific prior
00021  * written permission.
00022  *
00023  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00024  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00025  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00026  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
00027  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00028  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00029  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00030  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00031  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00032  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00033  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00034  *
00035  * 
00036  * Implementation drawn from visibility.texi in gnulib.
00037  */
00038 
00044 #ifndef __DRIZZLE_VISIBILITY_H
00045 #define __DRIZZLE_VISIBILITY_H
00046 
00055 #if defined(_WIN32)
00056 # define DRIZZLE_API
00057 # define DRIZZLE_LOCAL
00058 #else
00059 #if defined(BUILDING_LIBDRIZZLE)
00060 # if defined(HAVE_VISIBILITY)
00061 #  define DRIZZLE_API __attribute__ ((visibility("default")))
00062 #  define DRIZZLE_LOCAL  __attribute__ ((visibility("hidden")))
00063 # elif defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550)
00064 #  define DRIZZLE_API __global
00065 #  define DRIZZLE_API __hidden
00066 # elif defined(_MSC_VER)
00067 #  define DRIZZLE_API extern __declspec(dllexport) 
00068 #  define DRIZZLE_LOCAL
00069 # endif /* defined(HAVE_VISIBILITY) */
00070 #else  /* defined(BUILDING_LIBDRIZZLE) */
00071 # if defined(_MSC_VER)
00072 #  define DRIZZLE_API extern __declspec(dllimport) 
00073 #  define DRIZZLE_LOCAL
00074 # else
00075 #  define DRIZZLE_API
00076 #  define DRIZZLE_LOCAL
00077 # endif /* defined(_MSC_VER) */
00078 #endif /* defined(BUILDING_LIBDRIZZLE) */
00079 #endif /* _WIN32 */
00080 
00081 #endif /* __DRIZZLE_VISIBILITY_H */