luasocket.h: define LUASOCKET_API and LUASOCKET_PRIVATE for export visibility

This commit is contained in:
E. Westbrook 2019-02-25 15:54:09 -07:00
parent 9b3f7a4304
commit f06b17c4c9

View File

@ -18,7 +18,19 @@
* This macro prefixes all exported API functions * This macro prefixes all exported API functions
\*-------------------------------------------------------------------------*/ \*-------------------------------------------------------------------------*/
#ifndef LUASOCKET_API #ifndef LUASOCKET_API
#define LUASOCKET_API extern #ifdef _WIN32
#define LUASOCKET_API __declspec(dllexport)
#else
#define LUASOCKET_API __attribute__ ((visibility ("default")))
#endif
#endif
#ifndef LUASOCKET_PRIVATE
#ifdef _WIN32
#define LUASOCKET_PRIVATE
#else
#define LUASOCKET_PRIVATE __attribute__ ((visibility ("hidden")))
#endif
#endif #endif
/*-------------------------------------------------------------------------*\ /*-------------------------------------------------------------------------*\