diff options
| author | 2023-05-07 15:41:21 +0200 | |
|---|---|---|
| committer | 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 @@ | |||
| 2 | * libirecovery.h | 2 | * libirecovery.h |
| 3 | * Communication to iBoot/iBSS on Apple iOS devices via USB | 3 | * Communication to iBoot/iBSS on Apple iOS devices via USB |
| 4 | * | 4 | * |
| 5 | * Copyright (c) 2012-2019 Nikias Bassen <nikias@gmx.li> | 5 | * Copyright (c) 2012-2023 Nikias Bassen <nikias@gmx.li> |
| 6 | * Copyright (c) 2012-2013 Martin Szulecki <m.szulecki@libimobiledevice.org> | 6 | * Copyright (c) 2012-2013 Martin Szulecki <m.szulecki@libimobiledevice.org> |
| 7 | * Copyright (c) 2010 Chronic-Dev Team | 7 | * Copyright (c) 2010 Chronic-Dev Team |
| 8 | * Copyright (c) 2010 Joshua Hill | 8 | * Copyright (c) 2010 Joshua Hill |
| @@ -27,14 +27,20 @@ extern "C" { | |||
| 27 | 27 | ||
| 28 | #include <stdint.h> | 28 | #include <stdint.h> |
| 29 | 29 | ||
| 30 | #ifdef WIN32 | 30 | #ifdef IRECV_STATIC |
| 31 | #define IRECV_API __declspec( dllexport ) | 31 | #define IRECV_API |
| 32 | #elif defined(_WIN32) | ||
| 33 | #ifdef DLL_EXPORT | ||
| 34 | #define IRECV_API __declspec(dllexport) | ||
| 35 | #else | ||
| 36 | #define IRECV_API __declspec(dllimport) | ||
| 37 | #endif | ||
| 32 | #else | 38 | #else |
| 33 | #ifdef HAVE_FVISIBILITY | 39 | #if __GNUC__ >= 4 |
| 34 | #define IRECV_API __attribute__((visibility("default"))) | 40 | #define IRECV_API __attribute__((visibility("default"))) |
| 35 | #else | 41 | #else |
| 36 | #define IRECV_API | 42 | #define IRECV_API |
| 37 | #endif | 43 | #endif |
| 38 | #endif | 44 | #endif |
| 39 | 45 | ||
| 40 | enum irecv_mode { | 46 | enum irecv_mode { |
