aboutsummaryrefslogtreecommitdiff
path: root/src/unix.c
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2003-03-28 21:08:50 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2003-03-28 21:08:50 +0000
commitf18d1b7cd0ec4708518ab5e18ea33b6eadca0301 (patch)
treee831c6b1957af47db1301675b52c0d2a2e315fa7 /src/unix.c
parent307603b24dde69eac62d2cb52123488137520c9c (diff)
downloadluasocket-f18d1b7cd0ec4708518ab5e18ea33b6eadca0301.tar.gz
luasocket-f18d1b7cd0ec4708518ab5e18ea33b6eadca0301.tar.bz2
luasocket-f18d1b7cd0ec4708518ab5e18ea33b6eadca0301.zip
Closer to release...
Diffstat (limited to 'src/unix.c')
-rw-r--r--src/unix.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/unix.c b/src/unix.c
index 511a6bb..23984b0 100644
--- a/src/unix.c
+++ b/src/unix.c
@@ -1,8 +1,11 @@
1/*=========================================================================*\ 1/*=========================================================================*\
2* Network compatibilization module 2* Network compatibilization module: Unix version
3*
4* RCS ID: $Id$
3\*=========================================================================*/ 5\*=========================================================================*/
4#include <lua.h> 6#include <lua.h>
5#include <lauxlib.h> 7#include <lauxlib.h>
8#include <string.h>
6 9
7#include "lscompat.h" 10#include "lscompat.h"
8 11
@@ -26,7 +29,7 @@ int compat_open(lua_State *L)
26} 29}
27 30
28COMPAT_FD compat_accept(COMPAT_FD s, struct sockaddr *addr, 31COMPAT_FD compat_accept(COMPAT_FD s, struct sockaddr *addr,
29 int *len, int deadline) 32 size_t *len, int deadline)
30{ 33{
31 struct timeval tv; 34 struct timeval tv;
32 fd_set fds; 35 fd_set fds;
@@ -72,7 +75,7 @@ int compat_send(COMPAT_FD c, cchar *data, size_t count, size_t *sent,
72} 75}
73 76
74int compat_sendto(COMPAT_FD c, cchar *data, size_t count, size_t *sent, 77int compat_sendto(COMPAT_FD c, cchar *data, size_t count, size_t *sent,
75 int deadline, SA *addr, int len) 78 int deadline, SA *addr, size_t len)
76{ 79{
77 struct timeval tv; 80 struct timeval tv;
78 fd_set fds; 81 fd_set fds;
@@ -104,7 +107,7 @@ int compat_sendto(COMPAT_FD c, cchar *data, size_t count, size_t *sent,
104 } 107 }
105} 108}
106 109
107int compat_recv(COMPAT_FD c, uchar *data, size_t count, size_t *got, 110int compat_recv(COMPAT_FD c, char *data, size_t count, size_t *got,
108 int deadline) 111 int deadline)
109{ 112{
110 struct timeval tv; 113 struct timeval tv;
@@ -131,8 +134,8 @@ int compat_recv(COMPAT_FD c, uchar *data, size_t count, size_t *got,
131 } 134 }
132} 135}
133 136
134int compat_recvfrom(COMPAT_FD c, uchar *data, size_t count, size_t *got, 137int compat_recvfrom(COMPAT_FD c, char *data, size_t count, size_t *got,
135 int deadline, SA *addr, int *len) 138 int deadline, SA *addr, size_t *len)
136{ 139{
137 struct timeval tv; 140 struct timeval tv;
138 fd_set fds; 141 fd_set fds;