mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-25 03:58:21 +01:00
Out of the box support for Lua 5.3.
This commit is contained in:
parent
5edf093643
commit
ddf4292824
8
makefile
8
makefile
@ -5,7 +5,7 @@
|
||||
# Targets:
|
||||
# install install system independent support
|
||||
# install-unix also install unix-only support
|
||||
# install-both install for both lua5.1 and lua5.2
|
||||
# install-both install for lua51 lua52 lua53
|
||||
# install-both-unix also install unix-only
|
||||
# print print the build settings
|
||||
|
||||
@ -30,6 +30,9 @@ install-both:
|
||||
$(MAKE) clean
|
||||
@cd src; $(MAKE) $(PLAT) LUAV=5.2
|
||||
@cd src; $(MAKE) install LUAV=5.2
|
||||
$(MAKE) clean
|
||||
@cd src; $(MAKE) $(PLAT) LUAV=5.3
|
||||
@cd src; $(MAKE) install LUAV=5.3
|
||||
|
||||
install-both-unix:
|
||||
$(MAKE) clean
|
||||
@ -38,6 +41,9 @@ install-both-unix:
|
||||
$(MAKE) clean
|
||||
@cd src; $(MAKE) $(PLAT) LUAV=5.2
|
||||
@cd src; $(MAKE) install-unix LUAV=5.2
|
||||
$(MAKE) clean
|
||||
@cd src; $(MAKE) $(PLAT) LUAV=5.3
|
||||
@cd src; $(MAKE) install-unix LUAV=5.3
|
||||
|
||||
.PHONY: test
|
||||
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include "lua.h"
|
||||
#include "lauxlib.h"
|
||||
|
||||
|
||||
/*=========================================================================*\
|
||||
* LuaSocket includes
|
||||
\*=========================================================================*/
|
||||
@ -32,6 +31,11 @@
|
||||
#include "udp.h"
|
||||
#include "select.h"
|
||||
|
||||
#if LUA_VERSION_NUM > 502 && !defined(LUA_COMPAT_APIINTCASTS)
|
||||
#define luaL_checkint(L,n) ((int)luaL_checkinteger(L, (n)))
|
||||
#define luaL_optint(L,n,d) ((int)luaL_optinteger(L, (n), (d)))
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------*\
|
||||
* Internal function prototypes
|
||||
\*-------------------------------------------------------------------------*/
|
||||
@ -78,14 +82,6 @@ static int global_unload(lua_State *L) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if LUA_VERSION_NUM > 501
|
||||
int luaL_typerror (lua_State *L, int narg, const char *tname) {
|
||||
const char *msg = lua_pushfstring(L, "%s expected, got %s",
|
||||
tname, luaL_typename(L, narg));
|
||||
return luaL_argerror(L, narg, msg);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------*\
|
||||
* Setup basic stuff.
|
||||
\*-------------------------------------------------------------------------*/
|
||||
|
@ -147,7 +147,7 @@ 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 \
|
||||
CFLAGS_macosx= -I$(LUAINC) $(DEF) -Wall -O2 -fno-common \
|
||||
-fvisibility=hidden
|
||||
LDFLAGS_macosx= -bundle -undefined dynamic_lookup -o
|
||||
LD_macosx= export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc
|
||||
@ -163,7 +163,7 @@ 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 \
|
||||
CFLAGS_linux= -I$(LUAINC) $(DEF) -Wall -Wshadow -Wextra \
|
||||
-Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden
|
||||
LDFLAGS_linux=-O -shared -fpic -o
|
||||
LD_linux=gcc
|
||||
@ -179,7 +179,7 @@ DEF_freebsd=-DLUASOCKET_$(DEBUG) -DLUA_$(COMPAT)_MODULE \
|
||||
-DLUASOCKET_API='__attribute__((visibility("default")))' \
|
||||
-DUNIX_API='__attribute__((visibility("default")))' \
|
||||
-DMIME_API='__attribute__((visibility("default")))'
|
||||
CFLAGS_freebsd= -I$(LUAINC) $(DEF) -pedantic -Wall -Wshadow -Wextra \
|
||||
CFLAGS_freebsd= -I$(LUAINC) $(DEF) -Wall -Wshadow -Wextra \
|
||||
-Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden
|
||||
LDFLAGS_freebsd=-O -shared -fpic -o
|
||||
LD_freebsd=gcc
|
||||
@ -194,7 +194,7 @@ CC_mingw=gcc
|
||||
DEF_mingw= -DLUASOCKET_INET_PTON -DLUASOCKET_$(DEBUG) -DLUA_$(COMPAT)_MODULE \
|
||||
-DWINVER=0x0501 -DLUASOCKET_API='__declspec(dllexport)' \
|
||||
-DMIME_API='__declspec(dllexport)'
|
||||
CFLAGS_mingw= -I$(LUAINC) $(DEF) -pedantic -Wall -O2 -fno-common \
|
||||
CFLAGS_mingw= -I$(LUAINC) $(DEF) -Wall -O2 -fno-common \
|
||||
-fvisibility=hidden
|
||||
LDFLAGS_mingw= $(LUALIB) -shared -Wl,-s -lws2_32 -o
|
||||
LD_mingw=gcc
|
||||
|
@ -13,6 +13,11 @@
|
||||
|
||||
#include "mime.h"
|
||||
|
||||
#if LUA_VERSION_NUM > 502 && !defined(LUA_COMPAT_APIINTCASTS)
|
||||
#define luaL_checkint(L,n) ((int)luaL_checkinteger(L, (n)))
|
||||
#define luaL_optint(L,n,d) ((int)luaL_optinteger(L, (n), (d)))
|
||||
#endif
|
||||
|
||||
/*=========================================================================*\
|
||||
* Don't want to trust escape character constants
|
||||
\*=========================================================================*/
|
||||
|
4
test/auth/.htaccess
Normal file
4
test/auth/.htaccess
Normal file
@ -0,0 +1,4 @@
|
||||
AuthName "test-auth"
|
||||
AuthType Basic
|
||||
AuthUserFile /Users/diego/impa/luasocket/test/auth/.htpasswd
|
||||
Require valid-user
|
@ -1 +1 @@
|
||||
luasocket:l8n2npozPB.sQ
|
||||
luasocket:$apr1$47u2O.Me$.m/5BWAtt7GVoxsouIPBR1
|
||||
|
Loading…
Reference in New Issue
Block a user