diff options
author | Transporter <ogre.transporter@gmail.com> | 2020-04-30 20:25:53 +0200 |
---|---|---|
committer | Transporter <ogre.transporter@gmail.com> | 2020-04-30 20:25:53 +0200 |
commit | 68a49a080cb7b9484b0c8330cf15a99084e5f63f (patch) | |
tree | 8821afe740571590ae68d9eaec4226af0d98728f /include/tgbot | |
parent | 2e8398bd6f9326651460992e6e3a0121df449e83 (diff) |
Indentations and GCC attribute added
Diffstat (limited to 'include/tgbot')
-rw-r--r-- | include/tgbot/export.h | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/include/tgbot/export.h b/include/tgbot/export.h index 3178a0e..b38f1fc 100644 --- a/include/tgbot/export.h +++ b/include/tgbot/export.h @@ -2,19 +2,27 @@ #define TGBOT_EXPORT_H #ifndef TGBOT_API -#ifdef _MSC_VER -#ifdef TGBOT_DLL -#ifdef TgBot_EXPORTS -#define TGBOT_API __declspec(dllexport) -#else -#define TGBOT_API __declspec(dllimport) -#endif -#else -#define TGBOT_API -#endif -#else -#define TGBOT_API -#endif + #ifdef TGBOT_DLL + #if defined _WIN32 || defined __CYGWIN__ + #define TGBOT_HELPER_DLL_IMPORT __declspec(dllimport) + #define TGBOT_HELPER_DLL_EXPORT __declspec(dllexport) + #else + #if __GNUC__ >= 4 + #define TGBOT_HELPER_DLL_IMPORT __attribute__ ((visibility ("default"))) + #define TGBOT_HELPER_DLL_EXPORT __attribute__ ((visibility ("default"))) + #else + #define TGBOT_HELPER_DLL_IMPORT + #define TGBOT_HELPER_DLL_EXPORT + #endif + #endif + #ifdef TgBot_EXPORTS + #define TGBOT_API TGBOT_HELPER_DLL_EXPORT + #else + #define FOX_API TGBOT_HELPER_DLL_IMPORT + #endif + #else + #define TGBOT_API + #endif #endif #endif //TGBOT_EXPORT_H |