Gearman Developer Documentation

libgearman/visibility.h
Go to the documentation of this file.
00001 /* Gearman server and library
00002  * Copyright (C) 2008 Brian Aker, Eric Day
00003  * All rights reserved.
00004  *
00005  * Use and distribution licensed under the BSD license.  See
00006  * the COPYING file in this directory for full text.
00007  *
00008  * Implementation drawn from visibility.texi in gnulib.
00009  */
00010 
00016 #ifndef __GEARMAN_VISIBILITY_H
00017 #define __GEARMAN_VISIBILITY_H
00018 
00026 #if defined(BUILDING_LIBGEARMAN)
00027 # if defined(HAVE_VISIBILITY)
00028 #  define GEARMAN_API __attribute__ ((visibility("default")))
00029 #  define GEARMAN_INTERNAL_API __attribute__ ((visibility("hidden")))
00030 #  define GEARMAN_API_DEPRECATED __attribute__ ((deprecated,visibility("default")))
00031 #  define GEARMAN_LOCAL  __attribute__ ((visibility("hidden")))
00032 # elif defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550)
00033 #  define GEARMAN_API __global
00034 #  define GEARMAN_INTERNAL_API __hidden
00035 #  define GEARMAN_API_DEPRECATED __global
00036 #  define GEARMAN_LOCAL __hidden
00037 # elif defined(_MSC_VER)
00038 #  define GEARMAN_API extern __declspec(dllexport)
00039 #  define GEARMAN_INTERNAL_API extern __declspec(dllexport)
00040 #  define GEARMAN_DEPRECATED_API extern __declspec(dllexport)
00041 #  define GEARMAN_LOCAL
00042 # endif /* defined(HAVE_VISIBILITY) */
00043 #else  /* defined(BUILDING_LIBGEARMAN) */
00044 # if defined(_MSC_VER)
00045 #  define GEARMAN_API extern __declspec(dllimport)
00046 #  define GEARMAN_INTERNAL_API extern __declspec(dllimport)
00047 #  define GEARMAN_API_DEPRECATED extern __declspec(dllimport)
00048 #  define GEARMAN_LOCAL
00049 # else
00050 #  define GEARMAN_API
00051 #  define GEARMAN_INTERNAL_API
00052 #  define GEARMAN_API_DEPRECATED
00053 #  define GEARMAN_LOCAL
00054 # endif /* defined(_MSC_VER) */
00055 #endif /* defined(BUILDING_LIBGEARMAN) */
00056 
00057 #endif /* __GEARMAN_VISIBILITY_H */