1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-19 21:10:12 +02:00

Replaced usage of DLL_LINKAGE with ELF_VISIBILITY in netpacks. Please make sure that compilation now works on all platforms

This commit is contained in:
Ivan Savenko 2014-06-26 18:34:54 +03:00
parent af1ce59ab4
commit 00b6232ff6
2 changed files with 8 additions and 9 deletions

View File

@ -152,9 +152,11 @@ typedef boost::lock_guard<boost::recursive_mutex> TLockGuardRec;
# else
# define DLL_EXPORT __declspec(dllexport)
# endif
# define ELF_VISIBILITY
#else
# ifdef __GNUC__
# define DLL_EXPORT __attribute__ ((visibility("default")))
# define DLL_EXPORT __attribute__ ((visibility("default")))
# define ELF_VISIBILITY __attribute__ ((visibility("default")))
# endif
#endif
@ -164,9 +166,11 @@ typedef boost::lock_guard<boost::recursive_mutex> TLockGuardRec;
# else
# define DLL_IMPORT __declspec(dllimport)
# endif
# define ELF_VISIBILITY
#else
# ifdef __GNUC__
# define DLL_IMPORT __attribute__ ((visibility("default")))
# define ELF_VISIBILITY __attribute__ ((visibility("default")))
# endif
#endif

View File

@ -1515,12 +1515,7 @@ struct ObstaclesRemoved : public CPackForClient //3014
}
};
//FIXME: figure out why gcc fails to find type_info for this class with -fvisibility=hidden flag set
#if defined(__linux__) || defined(__APPLE__)
struct DLL_LINKAGE CatapultAttack : public CPackForClient //3015
#else
struct CatapultAttack : public CPackForClient //3015
#endif
struct ELF_VISIBILITY CatapultAttack : public CPackForClient //3015
{
struct AttackInfo
@ -2130,7 +2125,7 @@ struct PlayerJoined : public CPregamePackToHost
}
};
struct DLL_LINKAGE SelectMap : public CPregamePackToPropagate
struct ELF_VISIBILITY SelectMap : public CPregamePackToPropagate
{
const CMapInfo *mapInfo;
bool free;
@ -2156,7 +2151,7 @@ struct DLL_LINKAGE SelectMap : public CPregamePackToPropagate
};
struct DLL_LINKAGE UpdateStartOptions : public CPregamePackToPropagate
struct ELF_VISIBILITY UpdateStartOptions : public CPregamePackToPropagate
{
StartInfo *options;
bool free;