From c16b6d931243bed0d41f2fe1b7fced48fa493268 Mon Sep 17 00:00:00 2001 From: Diego Nehab Date: Tue, 19 Jun 2001 19:31:22 +0000 Subject: LUASOCKET_API now prefixes all exported function declarations. --- src/luasocket.c | 2 +- src/luasocket.h | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/luasocket.c b/src/luasocket.c index 96733b5..f72615a 100644 --- a/src/luasocket.c +++ b/src/luasocket.c @@ -1660,7 +1660,7 @@ static int receive_word(lua_State *L, p_sock sock) * Initializes the library interface with Lua and the socket library. * Defines the symbols exported to Lua. \*-------------------------------------------------------------------------*/ -void lua_socketlibopen(lua_State *L) +LUASOCKET_API void lua_socketlibopen(lua_State *L) { struct luaL_reg funcs[] = { {"bind", global_tcpbind}, diff --git a/src/luasocket.h b/src/luasocket.h index 4402c02..a580b2c 100644 --- a/src/luasocket.h +++ b/src/luasocket.h @@ -20,10 +20,17 @@ #define LUASOCKET_UDPBUFFERSIZE 4096 /* note that 576 bytes is the maximum safe value */ +/*-------------------------------------------------------------------------*\ +* This macro prefixes all exported API functions +\*-------------------------------------------------------------------------*/ +#ifndef LUASOCKET_API +#define LUASOCKET_API extern +#endif + /*-------------------------------------------------------------------------*\ * Initializes the library interface with Lua and the socket library. * Defines the symbols exported to Lua. \*-------------------------------------------------------------------------*/ -void lua_socketlibopen(lua_State *L); +LUASOCKET_API void lua_socketlibopen(lua_State *L); #endif /* _LUASOCKET_H_ */ -- cgit v1.2.3-55-g6feb