summaryrefslogtreecommitdiffstats
blob: 09131816c1c59c8d60f4e2a2ff38a9154a7999a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
 * Copyright (c) 2012-2014 Remko Tronçon
 * Licensed under the GNU General Public License v3.
 * See Documentation/Licenses/GPLv3.txt for more information.
 */

#pragma once

#include <Swiften/Base/Platform.h>
#include <boost/config.hpp>

#ifdef SWIFTEN_STATIC
# define SWIFTEN_API 
#else
# ifdef SWIFTEN_PLATFORM_WINDOWS
#  ifdef SWIFTEN_BUILDING
#   define SWIFTEN_API __declspec(dllexport)
#  else
#   define SWIFTEN_API __declspec(dllimport)
#  endif
# elif __GNUC__ >= 4
#  define SWIFTEN_API __attribute__((visibility("default")))
# else
#  define SWIFTEN_API 
# endif
#endif

#ifdef BOOST_NO_DEFAULTED_FUNCTIONS
#  define SWIFTEN_DEFAULT_COPY_CONSTRUCTOR(cls)
#  define SWIFTEN_DEFAULT_COPY_ASSIGMNENT_OPERATOR(cls)
#else
#  define SWIFTEN_DEFAULT_COPY_CONSTRUCTOR(cls) \
		cls(const cls&) = default;
#  define SWIFTEN_DEFAULT_COPY_ASSIGMNENT_OPERATOR(cls) \
		cls& operator=(const cls&) = default;
#endif

#ifdef BOOST_NO_NOEXCEPT
#define SWIFTEN_NOEXCEPT throw()
#else
#define SWIFTEN_NOEXCEPT noexcept
#endif