Skip to content

Commit 3b67747

Browse files
authored
Update client_cvar_value.h
1 parent 2cfb592 commit 3b67747

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

src/client_cvar_value.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,32 @@
2626
#include <string>
2727
#include <array>
2828

29+
#if defined _WIN32 || defined __CYGWIN__
30+
#ifdef BUILDING_DLL
31+
#ifdef __GNUC__
32+
#define DLL_PUBLIC __attribute__ ((dllexport))
33+
#else
34+
#define DLL_PUBLIC __declspec(dllexport) // Note: actually gcc seems to also supports this syntax.
35+
#endif
36+
#else
37+
#ifdef __GNUC__
38+
#define DLL_PUBLIC __attribute__ ((dllimport))
39+
#else
40+
#define DLL_PUBLIC __declspec(dllimport) // Note: actually gcc seems to also supports this syntax.
41+
#endif
42+
#endif
43+
#define DLL_LOCAL
44+
#else
45+
#if __GNUC__ >= 4
46+
#define DLL_PUBLIC __attribute__ ((visibility ("default")))
47+
#define DLL_LOCAL __attribute__ ((visibility ("hidden")))
48+
#else
49+
#define DLL_PUBLIC
50+
#define DLL_LOCAL
51+
#endif
52+
#endif
53+
#define EXPORTDLL extern "C" DLL_PUBLIC
54+
2955
class ClientCvarValue final : public ISmmPlugin, public IMetamodListener, public IClientCvarValue
3056
{
3157
public:

0 commit comments

Comments
 (0)