aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--makefile.dist6
-rw-r--r--src/makefile2
-rw-r--r--test/test_socket_error.lua8
3 files changed, 12 insertions, 4 deletions
diff --git a/makefile.dist b/makefile.dist
index 2c6137b..799cd21 100644
--- a/makefile.dist
+++ b/makefile.dist
@@ -1,7 +1,7 @@
1#-------------------------------------------------------------------------- 1#--------------------------------------------------------------------------
2# Distribution makefile 2# Distribution makefile
3#-------------------------------------------------------------------------- 3#--------------------------------------------------------------------------
4DIST = luasocket-2.1-rc1 4DIST = luasocket-3.0-rc1
5 5
6TEST = \ 6TEST = \
7 test/README \ 7 test/README \
@@ -83,6 +83,10 @@ SRC = \
83MAKE = \ 83MAKE = \
84 makefile \ 84 makefile \
85 luasocket.sln \ 85 luasocket.sln \
86 Lua51.props \
87 Lua52.props \
88 socket.vcproj.filters \
89 mime.vcproj.filters \
86 socket.vcproj \ 90 socket.vcproj \
87 mime.vcproj 91 mime.vcproj
88 92
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 \
135 -DMIME_API='__attribute__((visibility("default")))' 135 -DMIME_API='__attribute__((visibility("default")))'
136CFLAGS_macosx= -I$(LUAINC) $(DEF) -pedantic -Wall -O2 -fno-common \ 136CFLAGS_macosx= -I$(LUAINC) $(DEF) -pedantic -Wall -O2 -fno-common \
137 -fvisibility=hidden 137 -fvisibility=hidden
138LDFLAGS_macosx= -bundle -undefined dynamic_lookup -o 138LDFLAGS_macosx= -bundle -undefined dynamic_lookup -o
139LD_macosx= export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc 139LD_macosx= export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc
140SOCKET_macosx=usocket.o 140SOCKET_macosx=usocket.o
141 141
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)
14for i = 1, 10 do 14for i = 1, 10 do
15 -- select pass even if socket has error 15 -- select pass even if socket has error
16 local _, rec, err = socket.select(nil, {sock}, 1) 16 local _, rec, err = socket.select(nil, {sock}, 1)
17 assert('timeout' == err) 17 local _, ss = next(rec)
18 assert(not next(rec)) 18 if ss then
19 assert(ss == sock)
20 else
21 assert('timeout' == err, 'unexpected error :' .. tostring(err))
22 end
19 err = sock:getoption("error") -- i get 'connection refused' on WinXP 23 err = sock:getoption("error") -- i get 'connection refused' on WinXP
20 if err then 24 if err then
21 print("Passed! Error is '" .. err .. "'.") 25 print("Passed! Error is '" .. err .. "'.")