diff options
author | Remko Tronçon <git@el-tramo.be> | 2013-08-27 21:05:25 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2013-08-27 21:09:35 (GMT) |
commit | acf8da81e5c8c735848b1eff2b7928632ee89714 (patch) | |
tree | 9291a13ad5a16be0dd35262ef41b471dacefa601 | |
parent | 1bb607f96e79845ce30dd5590b0d53cc394ac150 (diff) | |
download | swift-acf8da81e5c8c735848b1eff2b7928632ee89714.zip swift-acf8da81e5c8c735848b1eff2b7928632ee89714.tar.bz2 |
Set visibility of exported functions when using GCC/CLang.
This currently has no effect yet, but when we will add the flag
-fvisibility=hidden, this will give the same results when building
DLLs on Linux, Mac OS X and Windows with respect to exporting of
symbols.
Change-Id: I9ab65b2f9ca78ec242ddac5a14d0f8d72721a6ca
-rw-r--r-- | Sluift/sluift.h | 2 | ||||
-rw-r--r-- | Swiften/Base/API.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/Sluift/sluift.h b/Sluift/sluift.h index 4e0f5ee..b82e1c4 100644 --- a/Sluift/sluift.h +++ b/Sluift/sluift.h @@ -8,6 +8,8 @@ #if defined(SLUIFT_BUILD_DLL) #define SLUIFT_API __declspec(dllexport) +#elif __GNUC__ >= 4 +#define SLUIFT_API __attribute__((visibility("default"))) #else #define SLUIFT_API #endif diff --git a/Swiften/Base/API.h b/Swiften/Base/API.h index 8f19446..388ad0a 100644 --- a/Swiften/Base/API.h +++ b/Swiften/Base/API.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 Remko Tronçon + * Copyright (c) 2012-2013 Remko Tronçon * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ @@ -17,6 +17,8 @@ # else # define SWIFTEN_API __declspec(dllimport) # endif +# elif __GNUC__ >= 4 +# define SWIFTEN_API __attribute__((visibility("default"))) # else # define SWIFTEN_API # endif |