mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-18 06:51:18 +00:00
libuv working on windows too
Added: vcc compilation flags for proper debug symbol generation
This commit is contained in:
@@ -886,10 +886,6 @@ type # these work for most platforms:
|
||||
## This is the same as the type ``short`` in *C*.
|
||||
cint* {.importc: "int", nodecl.} = int32
|
||||
## This is the same as the type ``int`` in *C*.
|
||||
csize* {.importc: "size_t", nodecl.} = int
|
||||
## This is the same as the type ``size_t`` in *C*.
|
||||
cptrdiff* {.importc: "ptrdiff_t", nodecl.} = int
|
||||
## This is the same as the type ``ptrdiff_t`` in *C*.
|
||||
clong* {.importc: "long", nodecl.} = int
|
||||
## This is the same as the type ``long`` in *C*.
|
||||
clonglong* {.importc: "long long", nodecl.} = int64
|
||||
|
||||
@@ -224,31 +224,31 @@ const
|
||||
|
||||
proc WSAGetLastError*(): cint {.importc: "WSAGetLastError", dynlib: ws2dll.}
|
||||
|
||||
type
|
||||
TWSAData* {.pure, final.} = object
|
||||
type
|
||||
TWSAData* {.pure, final, importc: "WSADATA", header: "Winsock2.h".} = object
|
||||
wVersion, wHighVersion: int16
|
||||
szDescription: array[0..WSADESCRIPTION_LEN, char]
|
||||
szSystemStatus: array[0..WSASYS_STATUS_LEN, char]
|
||||
iMaxSockets, iMaxUdpDg: int16
|
||||
lpVendorInfo: cstring
|
||||
|
||||
TSockAddr* {.pure, final.} = object
|
||||
TSockAddr* {.pure, final, importc: "SOCKADDR", header: "Winsock2.h".} = object
|
||||
sa_family*: int16 # unsigned
|
||||
sa_data: array[0..13, char]
|
||||
|
||||
TInAddr* {.pure, final.} = object ## struct in_addr
|
||||
TInAddr* {.pure, final, importc: "IN_ADDR", header: "Winsock2.h".} = object
|
||||
s_addr*: int32 # IP address
|
||||
|
||||
Tsockaddr_in* {.pure, final.} = object
|
||||
Tsockaddr_in* {.pure, final, importc: "SOCKADDR_IN", header: "Winsock2.h".} = object
|
||||
sin_family*: int16
|
||||
sin_port*: int16 # unsigned
|
||||
sin_addr*: TInAddr
|
||||
sin_zero*: array[0..7, char]
|
||||
|
||||
Tin6_addr* {.pure, final.} = object
|
||||
Tin6_addr* {.pure, final, importc: "IN6_ADDR", header: "Winsock2.h".} = object
|
||||
bytes*: array[0..15, char]
|
||||
|
||||
Tsockaddr_in6* {.pure, final.} = object
|
||||
Tsockaddr_in6* {.pure, final, importc: "SOCKADDR_IN6", header: "Winsock2.h".} = object
|
||||
sin6_family*: int16
|
||||
sin6_port*: int16 # unsigned
|
||||
sin6_flowinfo*: int32 # unsigned
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
type
|
||||
HttpDataProc* = proc (a2: ptr THttpParser, at: cstring, length: csize): cint
|
||||
HttpProc* = proc (a2: ptr THttpParser): cint
|
||||
csize = int
|
||||
|
||||
HttpDataProc* = proc (a2: ptr THttpParser, at: cstring, length: csize): cint {.cdecl.}
|
||||
HttpProc* = proc (a2: ptr THttpParser): cint {.cdecl.}
|
||||
|
||||
THttpMethod* = enum
|
||||
HTTP_DELETE = 0, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_CONNECT,
|
||||
|
||||
@@ -12,22 +12,23 @@ else:
|
||||
type
|
||||
TPort* = distinct int16 ## port type
|
||||
|
||||
cssize* {.importc: "ssize_t", header: "stdint.h"} = int
|
||||
coff* {.importc: "off_t", header: "types.h"} = int
|
||||
cssize = int
|
||||
coff = int
|
||||
csize = int
|
||||
|
||||
AllocProc* = proc (handle: PHandle, suggested_size: csize): TBuf
|
||||
ReadProc* = proc (stream: PStream, nread: cssize, buf: TBuf)
|
||||
ReadProc2* = proc (stream: PPipe, nread: cssize, buf: TBuf, pending: THandleType)
|
||||
WriteProc* = proc (req: PWrite, status: cint)
|
||||
ConnectProc* = proc (req: PConnect, status: cint)
|
||||
ShutdownProc* = proc (req: PShutdown, status: cint)
|
||||
ConnectionProc* = proc (server: PStream, status: cint)
|
||||
CloseProc* = proc (handle: PHandle)
|
||||
TimerProc* = proc (handle: PTimer, status: cint)
|
||||
AsyncProc* = proc (handle: PAsync, status: cint)
|
||||
PrepareProc* = proc (handle: PPrepare, status: cint)
|
||||
CheckProc* = proc (handle: PCheck, status: cint)
|
||||
IdleProc* = proc (handle: PIdle, status: cint)
|
||||
AllocProc* = proc (handle: PHandle, suggested_size: csize): TBuf {.cdecl.}
|
||||
ReadProc* = proc (stream: PStream, nread: cssize, buf: TBuf) {.cdecl.}
|
||||
ReadProc2* = proc (stream: PPipe, nread: cssize, buf: TBuf, pending: THandleType) {.cdecl.}
|
||||
WriteProc* = proc (req: PWrite, status: cint) {.cdecl.}
|
||||
ConnectProc* = proc (req: PConnect, status: cint) {.cdecl.}
|
||||
ShutdownProc* = proc (req: PShutdown, status: cint) {.cdecl.}
|
||||
ConnectionProc* = proc (server: PStream, status: cint) {.cdecl.}
|
||||
CloseProc* = proc (handle: PHandle) {.cdecl.}
|
||||
TimerProc* = proc (handle: PTimer, status: cint) {.cdecl.}
|
||||
AsyncProc* = proc (handle: PAsync, status: cint) {.cdecl.}
|
||||
PrepareProc* = proc (handle: PPrepare, status: cint) {.cdecl.}
|
||||
CheckProc* = proc (handle: PCheck, status: cint) {.cdecl.}
|
||||
IdleProc* = proc (handle: PIdle, status: cint) {.cdecl.}
|
||||
|
||||
PSockAddr* = ptr TSockAddr
|
||||
|
||||
|
||||
Reference in New Issue
Block a user