diff --git a/makefile.dist b/makefile.dist index 2c6137b..799cd21 100644 --- a/makefile.dist +++ b/makefile.dist @@ -1,7 +1,7 @@ #-------------------------------------------------------------------------- # Distribution makefile #-------------------------------------------------------------------------- -DIST = luasocket-2.1-rc1 +DIST = luasocket-3.0-rc1 TEST = \ test/README \ @@ -83,6 +83,10 @@ SRC = \ MAKE = \ makefile \ luasocket.sln \ + Lua51.props \ + Lua52.props \ + socket.vcproj.filters \ + mime.vcproj.filters \ socket.vcproj \ mime.vcproj diff --git a/src/makefile b/src/makefile index 50d5cc1..c24e61b 100644 --- a/src/makefile +++ b/src/makefile @@ -135,7 +135,7 @@ DEF_macosx= -DLUASOCKET_$(DEBUG) -DUNIX_HAS_SUN_LEN -DLUA_$(COMPAT)_MODULE \ -DMIME_API='__attribute__((visibility("default")))' CFLAGS_macosx= -I$(LUAINC) $(DEF) -pedantic -Wall -O2 -fno-common \ -fvisibility=hidden -LDFLAGS_macosx= -bundle -undefined dynamic_lookup -o +LDFLAGS_macosx= -bundle -undefined dynamic_lookup -o LD_macosx= export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc SOCKET_macosx=usocket.o diff --git a/test/test_socket_error.lua b/test/test_socket_error.lua index 9bd0bc7..bda6408 100644 --- a/test/test_socket_error.lua +++ b/test/test_socket_error.lua @@ -14,8 +14,12 @@ assert('timeout' == err) for i = 1, 10 do -- select pass even if socket has error local _, rec, err = socket.select(nil, {sock}, 1) - assert('timeout' == err) - assert(not next(rec)) + local _, ss = next(rec) + if ss then + assert(ss == sock) + else + assert('timeout' == err, 'unexpected error :' .. tostring(err)) + end err = sock:getoption("error") -- i get 'connection refused' on WinXP if err then print("Passed! Error is '" .. err .. "'.")