Fix unix export marker.

This commit is contained in:
Diego Nehab 2013-06-11 17:20:27 +08:00
parent bc709ac7b7
commit 906abf29d1
2 changed files with 7 additions and 1 deletions

View File

@ -131,6 +131,7 @@ O_macosx=o
CC_macosx=gcc
DEF_macosx= -DLUASOCKET_$(DEBUG) -DUNIX_HAS_SUN_LEN -DLUA_$(COMPAT)_MODULE \
-DLUASOCKET_API='__attribute__((visibility("default")))' \
-DUNIX_API='__attribute__((visibility("default")))' \
-DMIME_API='__attribute__((visibility("default")))'
CFLAGS_macosx= -I$(LUAINC) $(DEF) -pedantic -Wall -O2 -fno-common \
-fvisibility=hidden
@ -146,6 +147,7 @@ O_linux=o
CC_linux=gcc
DEF_linux=-DLUASOCKET_$(DEBUG) -DLUA_$(COMPAT)_MODULE \
-DLUASOCKET_API='__attribute__((visibility("default")))' \
-DUNIX_API='__attribute__((visibility("default")))' \
-DMIME_API='__attribute__((visibility("default")))'
CFLAGS_linux= -I$(LUAINC) $(DEF) -pedantic -Wall -Wshadow -Wextra \
-Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden

View File

@ -13,6 +13,10 @@
#include "timeout.h"
#include "socket.h"
#ifndef UNIX_API
#define UNIX_API extern
#endif
typedef struct t_unix_ {
t_socket sock;
t_io io;
@ -21,6 +25,6 @@ typedef struct t_unix_ {
} t_unix;
typedef t_unix *p_unix;
LUASOCKET_API int luaopen_socket_unix(lua_State *L);
UNIX_API int luaopen_socket_unix(lua_State *L);
#endif /* UNIX_H */