1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-21 21:17:49 +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

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

@ -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 struct ELF_VISIBILITY CatapultAttack : public CPackForClient //3015
#if defined(__linux__) || defined(__APPLE__)
struct DLL_LINKAGE CatapultAttack : public CPackForClient //3015
#else
struct CatapultAttack : public CPackForClient //3015
#endif
{ {
struct AttackInfo 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; const CMapInfo *mapInfo;
bool free; 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; StartInfo *options;
bool free; bool free;