diff options
| author | Diego Nehab <diego.nehab@gmail.com> | 2018-08-22 17:37:32 -0300 |
|---|---|---|
| committer | Diego Nehab <diego.nehab@gmail.com> | 2018-08-22 17:37:32 -0300 |
| commit | 288219fd6b53ce2e709745c9918aa4c4b7f715c9 (patch) | |
| tree | a41f0afa7e6a336e0e889356071d8428d4056484 /src | |
| parent | 648d81281f177f43de3d7b66e5923bdbaaeb25d9 (diff) | |
| download | luasocket-288219fd6b53ce2e709745c9918aa4c4b7f715c9.tar.gz luasocket-288219fd6b53ce2e709745c9918aa4c4b7f715c9.tar.bz2 luasocket-288219fd6b53ce2e709745c9918aa4c4b7f715c9.zip | |
Update to Visual Studio 2017.
Diffstat (limited to 'src')
| -rwxr-xr-x[-rw-r--r--] | src/luasocket.c | 2 | ||||
| -rw-r--r-- | src/makefile | 2 | ||||
| -rwxr-xr-x[-rw-r--r--] | src/mime.c | 2 | ||||
| -rwxr-xr-x[-rw-r--r--] | src/wsocket.c | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/luasocket.c b/src/luasocket.c index 7d9c802..d2752a7 100644..100755 --- a/src/luasocket.c +++ b/src/luasocket.c | |||
| @@ -64,7 +64,7 @@ static luaL_Reg func[] = { | |||
| 64 | * Skip a few arguments | 64 | * Skip a few arguments |
| 65 | \*-------------------------------------------------------------------------*/ | 65 | \*-------------------------------------------------------------------------*/ |
| 66 | static int global_skip(lua_State *L) { | 66 | static int global_skip(lua_State *L) { |
| 67 | int amount = luaL_checkinteger(L, 1); | 67 | int amount = (int) luaL_checkinteger(L, 1); |
| 68 | int ret = lua_gettop(L) - amount - 1; | 68 | int ret = lua_gettop(L) - amount - 1; |
| 69 | return ret >= 0 ? ret : 0; | 69 | return ret >= 0 ? ret : 0; |
| 70 | } | 70 | } |
diff --git a/src/makefile b/src/makefile index 494baab..1ed3f4f 100644 --- a/src/makefile +++ b/src/makefile | |||
| @@ -386,7 +386,7 @@ $(UNIX_SO): $(UNIX_OBJS) | |||
| 386 | $(SERIAL_SO): $(SERIAL_OBJS) | 386 | $(SERIAL_SO): $(SERIAL_OBJS) |
| 387 | $(LD) $(SERIAL_OBJS) $(LDFLAGS)$@ | 387 | $(LD) $(SERIAL_OBJS) $(LDFLAGS)$@ |
| 388 | 388 | ||
| 389 | install: | 389 | install: |
| 390 | $(INSTALL_DIR) $(INSTALL_TOP_LDIR) | 390 | $(INSTALL_DIR) $(INSTALL_TOP_LDIR) |
| 391 | $(INSTALL_DATA) $(TO_TOP_LDIR) $(INSTALL_TOP_LDIR) | 391 | $(INSTALL_DATA) $(TO_TOP_LDIR) $(INSTALL_TOP_LDIR) |
| 392 | $(INSTALL_DIR) $(INSTALL_SOCKET_LDIR) | 392 | $(INSTALL_DIR) $(INSTALL_SOCKET_LDIR) |
diff --git a/src/mime.c b/src/mime.c index db356fc..338ecd4 100644..100755 --- a/src/mime.c +++ b/src/mime.c | |||
| @@ -654,7 +654,7 @@ static int eolprocess(int c, int last, const char *marker, | |||
| 654 | \*-------------------------------------------------------------------------*/ | 654 | \*-------------------------------------------------------------------------*/ |
| 655 | static int mime_global_eol(lua_State *L) | 655 | static int mime_global_eol(lua_State *L) |
| 656 | { | 656 | { |
| 657 | int ctx = luaL_checkinteger(L, 1); | 657 | int ctx = (int) luaL_checkinteger(L, 1); |
| 658 | size_t isize = 0; | 658 | size_t isize = 0; |
| 659 | const char *input = luaL_optlstring(L, 2, NULL, &isize); | 659 | const char *input = luaL_optlstring(L, 2, NULL, &isize); |
| 660 | const char *last = input + isize; | 660 | const char *last = input + isize; |
diff --git a/src/wsocket.c b/src/wsocket.c index 8ecb0fc..ac8411f 100644..100755 --- a/src/wsocket.c +++ b/src/wsocket.c | |||
| @@ -131,11 +131,11 @@ int socket_connect(p_socket ps, SA *addr, socklen_t len, p_timeout tm) { | |||
| 131 | /* we wait until something happens */ | 131 | /* we wait until something happens */ |
| 132 | err = socket_waitfd(ps, WAITFD_C, tm); | 132 | err = socket_waitfd(ps, WAITFD_C, tm); |
| 133 | if (err == IO_CLOSED) { | 133 | if (err == IO_CLOSED) { |
| 134 | int len = sizeof(err); | 134 | int elen = sizeof(err); |
| 135 | /* give windows time to set the error (yes, disgusting) */ | 135 | /* give windows time to set the error (yes, disgusting) */ |
| 136 | Sleep(10); | 136 | Sleep(10); |
| 137 | /* find out why we failed */ | 137 | /* find out why we failed */ |
| 138 | getsockopt(*ps, SOL_SOCKET, SO_ERROR, (char *)&err, &len); | 138 | getsockopt(*ps, SOL_SOCKET, SO_ERROR, (char *)&err, &elen); |
| 139 | /* we KNOW there was an error. if 'why' is 0, we will return | 139 | /* we KNOW there was an error. if 'why' is 0, we will return |
| 140 | * "unknown error", but it's not really our fault */ | 140 | * "unknown error", but it's not really our fault */ |
| 141 | return err > 0? err: IO_UNKNOWN; | 141 | return err > 0? err: IO_UNKNOWN; |
