diff --git a/include/libtorrent/config.hpp b/include/libtorrent/config.hpp index 6d0e11e83..b36d4da22 100755 --- a/include/libtorrent/config.hpp +++ b/include/libtorrent/config.hpp @@ -35,14 +35,10 @@ POSSIBILITY OF SUCH DAMAGE. #include -#if defined(__GNUC__) -#define TORRENT_DEPRECATED __attribute__ ((deprecated)) -#else -#define TORRENT_DEPRECATED -#endif - #if defined(__GNUC__) && __GNUC__ >= 4 +#define TORRENT_DEPRECATED __attribute__ ((deprecated)) + # if defined(TORRENT_BUILDING_SHARED) || defined(TORRENT_LINKING_SHARED) # define TORRENT_EXPORT __attribute__ ((visibility("default"))) # else @@ -67,6 +63,9 @@ POSSIBILITY OF SUCH DAMAGE. # define TORRENT_EXPORT #endif +#ifndef TORRENT_DEPRECATED +#define TORRENT_DEPRECATED +#endif #endif // TORRENT_CONFIG_HPP_INCLUDED