فهرست منبع

Some fixes to make it compile for win32.

mingodad 13 سال پیش
والد
کامیت
f9eed58aaa
1فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 3 3
      ext/lua_socket.cpp

+ 3 - 3
ext/lua_socket.cpp

@@ -104,7 +104,7 @@ int lua_socket_waitfd(p_socket ps, int sw, p_timeout tm){
     }
     }
     if (sw & WAITFD_W) { FD_ZERO(&wfds); FD_SET(*ps, &wfds); wp = &wfds; }
     if (sw & WAITFD_W) { FD_ZERO(&wfds); FD_SET(*ps, &wfds); wp = &wfds; }
     if (sw & WAITFD_C) { FD_ZERO(&efds); FD_SET(*ps, &efds); ep = &efds; }
     if (sw & WAITFD_C) { FD_ZERO(&efds); FD_SET(*ps, &efds); ep = &efds; }
-    if ((t = timeout_get(tm)) >= 0.0) {
+    if ((t = lua_timeout_get(tm)) >= 0.0) {
         tv.tv_sec = (int) t;
         tv.tv_sec = (int) t;
         tv.tv_usec = (int) ((t-tv.tv_sec)*1.0e6);
         tv.tv_usec = (int) ((t-tv.tv_sec)*1.0e6);
         tp = &tv;
         tp = &tv;
@@ -253,7 +253,7 @@ int lua_socket_select(t_socket n, fd_set *rfds, fd_set *wfds, fd_set *efds,
         p_timeout tm){
         p_timeout tm){
 #ifdef WIN32
 #ifdef WIN32
     struct timeval tv;
     struct timeval tv;
-    double t = timeout_get(tm);
+    double t = lua_timeout_get(tm);
     tv.tv_sec = (int) t;
     tv.tv_sec = (int) t;
     tv.tv_usec = (int) ((t - tv.tv_sec) * 1.0e6);
     tv.tv_usec = (int) ((t - tv.tv_sec) * 1.0e6);
     if (n <= 0) {
     if (n <= 0) {
@@ -290,7 +290,7 @@ int lua_socket_connect(p_socket ps, SA *addr, socklen_t addr_len, p_timeout tm){
     /* zero timeout case optimization */
     /* zero timeout case optimization */
     if (timeout_iszero(tm)) return IO_TIMEOUT;
     if (timeout_iszero(tm)) return IO_TIMEOUT;
     /* we wait until something happens */
     /* we wait until something happens */
-    err = socket_waitfd(ps, WAITFD_C, tm);
+    err = lua_socket_waitfd(ps, WAITFD_C, tm);
     if (err == IO_CLOSED) {
     if (err == IO_CLOSED) {
         int addr_len = sizeof(err);
         int addr_len = sizeof(err);
         /* give windows time to set the error (yes, disgusting) */
         /* give windows time to set the error (yes, disgusting) */