Update from trunk to launchpad
[m6w6/libmemcached] / libtest / visibility.h
1 /* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
2 *
3 * libtest
4 *
5 * Copyright (C) 2011 Data Differential, http://datadifferential.com/
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 3 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22
23 #pragma once
24
25 #if defined(BUILDING_LIBTEST)
26 # if defined(HAVE_VISIBILITY)
27 # define LIBTEST_API __attribute__ ((visibility("default")))
28 # define LIBTEST_INTERNAL_API __attribute__ ((visibility("hidden")))
29 # define LIBTEST_API_DEPRECATED __attribute__ ((deprecated,visibility("default")))
30 # define LIBTEST_LOCAL __attribute__ ((visibility("hidden")))
31 # elif defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550)
32 # define LIBTEST_API __global
33 # define LIBTEST_INTERNAL_API __hidden
34 # define LIBTEST_API_DEPRECATED __global
35 # define LIBTEST_LOCAL __hidden
36 # elif defined(_MSC_VER)
37 # define LIBTEST_API extern __declspec(dllexport)
38 # define LIBTEST_INTERNAL_API extern __declspec(dllexport)
39 # define LIBTEST_DEPRECATED_API extern __declspec(dllexport)
40 # define LIBTEST_LOCAL
41 # endif /* defined(HAVE_VISIBILITY) */
42 #else /* defined(BUILDING_LIBTEST) */
43 # if defined(_MSC_VER)
44 # define LIBTEST_API extern __declspec(dllimport)
45 # define LIBTEST_INTERNAL_API extern __declspec(dllimport)
46 # define LIBTEST_API_DEPRECATED extern __declspec(dllimport)
47 # define LIBTEST_LOCAL
48 # else
49 # define LIBTEST_API
50 # define LIBTEST_INTERNAL_API
51 # define LIBTEST_API_DEPRECATED
52 # define LIBTEST_LOCAL
53 # endif /* defined(_MSC_VER) */
54 #endif /* defined(BUILDING_LIBTEST) */