windows needs timeval struct too
parent
f1205587a1
commit
7c9d7f476a
|
@ -1,8 +1,8 @@
|
||||||
! Copyright (C) 2006 Mackenzie Straight, Doug Coleman.
|
! 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
|
USING: alien alien.c-types alien.strings alien.syntax arrays
|
||||||
byte-arrays kernel math sequences windows.types windows.kernel32
|
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
|
IN: windows.winsock
|
||||||
|
|
||||||
USE: libc
|
USE: libc
|
||||||
|
@ -138,6 +138,10 @@ C-STRUCT: addrinfo
|
||||||
{ "sockaddr*" "addr" }
|
{ "sockaddr*" "addr" }
|
||||||
{ "addrinfo*" "next" } ;
|
{ "addrinfo*" "next" } ;
|
||||||
|
|
||||||
|
C-STRUCT: timeval
|
||||||
|
{ "long" "sec" }
|
||||||
|
{ "long" "usec" } ;
|
||||||
|
|
||||||
: hostent-addr ( hostent -- addr ) hostent-addr-list *void* ; ! *uint ;
|
: hostent-addr ( hostent -- addr ) hostent-addr-list *void* ; ! *uint ;
|
||||||
|
|
||||||
LIBRARY: winsock
|
LIBRARY: winsock
|
||||||
|
@ -440,4 +444,3 @@ FUNCTION: void GetAcceptExSockaddrs ( void* a, int b, int c, int d, void* e, voi
|
||||||
|
|
||||||
: init-winsock ( -- )
|
: init-winsock ( -- )
|
||||||
HEX: 0202 <wsadata> WSAStartup winsock-return-check ;
|
HEX: 0202 <wsadata> WSAStartup winsock-return-check ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue