diff options
author | E. Westbrook <github@westbrook.io> | 2019-02-25 15:54:09 -0700 |
---|---|---|
committer | E. Westbrook <github@westbrook.io> | 2019-02-25 15:54:09 -0700 |
commit | f06b17c4c918e1132ae78d1075c8c9654fdc016d (patch) | |
tree | 5a6b31714fcc634970a26a6ccd2ede02fc16432e | |
parent | 9b3f7a430454dc9568dfb063fbc324b29c5134d7 (diff) | |
download | luasocket-f06b17c4c918e1132ae78d1075c8c9654fdc016d.tar.gz luasocket-f06b17c4c918e1132ae78d1075c8c9654fdc016d.tar.bz2 luasocket-f06b17c4c918e1132ae78d1075c8c9654fdc016d.zip |
luasocket.h: define LUASOCKET_API and LUASOCKET_PRIVATE for export visibility
-rw-r--r-- | src/luasocket.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/luasocket.h b/src/luasocket.h index f75d21f..0121a15 100644 --- a/src/luasocket.h +++ b/src/luasocket.h | |||
@@ -18,7 +18,19 @@ | |||
18 | * This macro prefixes all exported API functions | 18 | * This macro prefixes all exported API functions |
19 | \*-------------------------------------------------------------------------*/ | 19 | \*-------------------------------------------------------------------------*/ |
20 | #ifndef LUASOCKET_API | 20 | #ifndef LUASOCKET_API |
21 | #define LUASOCKET_API extern | 21 | #ifdef _WIN32 |
22 | #define LUASOCKET_API __declspec(dllexport) | ||
23 | #else | ||
24 | #define LUASOCKET_API __attribute__ ((visibility ("default"))) | ||
25 | #endif | ||
26 | #endif | ||
27 | |||
28 | #ifndef LUASOCKET_PRIVATE | ||
29 | #ifdef _WIN32 | ||
30 | #define LUASOCKET_PRIVATE | ||
31 | #else | ||
32 | #define LUASOCKET_PRIVATE __attribute__ ((visibility ("hidden"))) | ||
33 | #endif | ||
22 | #endif | 34 | #endif |
23 | 35 | ||
24 | /*-------------------------------------------------------------------------*\ | 36 | /*-------------------------------------------------------------------------*\ |