Define LUASOCKET_API macro in header file instead of build time argument

--HG--
branch : minor
This commit is contained in:
James Watkins-Harvey
2016-10-25 10:34:17 -04:00
parent 7b513ea1a4
commit bdc653d9a5
2 changed files with 6 additions and 1 deletions
@@ -18,7 +18,11 @@
* This macro prefixes all exported API functions
\*-------------------------------------------------------------------------*/
#ifndef LUASOCKET_API
#define LUASOCKET_API extern
#if defined(WIN32) || defined(_WIN32)
# define LUASOCKET_API __declspec(dllexport)
#else
# define LUASOCKET_API __attribute__((visibility("default")))
#endif
#endif
/*-------------------------------------------------------------------------*\
@@ -6,6 +6,7 @@
#include "lua.h"
#include "lauxlib.h"
#include "luasocket.h"
#include "auxiliar.h"
#include "socket.h"