diff options
author | Nikias Bassen | 2023-05-07 15:41:21 +0200 |
---|---|---|
committer | Nikias Bassen | 2023-05-07 15:41:21 +0200 |
commit | 4aad1bcdd9d9f499be5ed65b017965cbb54b8f3a (patch) | |
tree | 781fbcbf1400412b4147897eb0093d575c5a170d | |
parent | 14102fb7ef8737965c97836560eb3a287f480a25 (diff) | |
download | libirecovery-4aad1bcdd9d9f499be5ed65b017965cbb54b8f3a.tar.gz libirecovery-4aad1bcdd9d9f499be5ed65b017965cbb54b8f3a.tar.bz2 |
Fix dllexport/dllimport and visibility definitions
-rw-r--r-- | include/libirecovery.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/include/libirecovery.h b/include/libirecovery.h index 94522d7..33879a4 100644 --- a/include/libirecovery.h +++ b/include/libirecovery.h @@ -2,7 +2,7 @@ * libirecovery.h * Communication to iBoot/iBSS on Apple iOS devices via USB * - * Copyright (c) 2012-2019 Nikias Bassen <nikias@gmx.li> + * Copyright (c) 2012-2023 Nikias Bassen <nikias@gmx.li> * Copyright (c) 2012-2013 Martin Szulecki <m.szulecki@libimobiledevice.org> * Copyright (c) 2010 Chronic-Dev Team * Copyright (c) 2010 Joshua Hill @@ -27,14 +27,20 @@ extern "C" { #include <stdint.h> -#ifdef WIN32 -#define IRECV_API __declspec( dllexport ) +#ifdef IRECV_STATIC + #define IRECV_API +#elif defined(_WIN32) + #ifdef DLL_EXPORT + #define IRECV_API __declspec(dllexport) + #else + #define IRECV_API __declspec(dllimport) + #endif #else -#ifdef HAVE_FVISIBILITY -#define IRECV_API __attribute__((visibility("default"))) -#else -#define IRECV_API -#endif + #if __GNUC__ >= 4 + #define IRECV_API __attribute__((visibility("default"))) + #else + #define IRECV_API + #endif #endif enum irecv_mode { |