]> gitweb.factorcode.org Git - factor.git/commitdiff
windows needs timeval struct too
authorDoug Coleman <doug.coleman@gmail.com>
Mon, 6 Oct 2008 23:28:10 +0000 (18:28 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Mon, 6 Oct 2008 23:28:10 +0000 (18:28 -0500)
basis/windows/winsock/winsock.factor

index 3c4230e21e4f338c4de8a04a05f998e91965d67e..4ca07ce85088e19baef7fc23ac68085f15c8ec97 100644 (file)
@@ -1,8 +1,8 @@
 ! Copyright (C) 2006 Mackenzie Straight, Doug Coleman.
-
+! See http://factorcode.org/license.txt for BSD license.
 USING: alien alien.c-types alien.strings alien.syntax arrays
 byte-arrays kernel math sequences windows.types windows.kernel32
-windows.errors structs windows math.bitwise alias ;
+windows.errors windows math.bitwise alias ;
 IN: windows.winsock
 
 USE: libc
@@ -138,6 +138,10 @@ C-STRUCT: addrinfo
     { "sockaddr*" "addr" }
     { "addrinfo*" "next" } ;
 
+C-STRUCT: timeval
+    { "long" "sec" }
+    { "long" "usec" } ;
+
 : hostent-addr ( hostent -- addr ) hostent-addr-list *void* ; ! *uint ;
 
 LIBRARY: winsock
@@ -440,4 +444,3 @@ FUNCTION: void GetAcceptExSockaddrs ( void* a, int b, int c, int d, void* e, voi
 
 : init-winsock ( -- )
     HEX: 0202 <wsadata> WSAStartup winsock-return-check ;
-