summary refs log tree commit diff stats
path: root/lib/wrappers/libuv.nim
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2011-10-12 22:40:01 +0300
committerZahary Karadjov <zahary@gmail.com>2011-10-12 22:40:01 +0300
commitb7e8daf65dedda6b1a4563bf58a30c821045cc14 (patch)
treef81fd16ebecf0f3c162de811057456c9e468d048 /lib/wrappers/libuv.nim
parent49d924c20b97699d3cdf559d890c9c02606c7df4 (diff)
downloadNim-b7e8daf65dedda6b1a4563bf58a30c821045cc14.tar.gz
libuv working on windows too
Added: vcc compilation flags for proper debug symbol generation
Diffstat (limited to 'lib/wrappers/libuv.nim')
-rw-r--r--lib/wrappers/libuv.nim33
1 files changed, 17 insertions, 16 deletions
diff --git a/lib/wrappers/libuv.nim b/lib/wrappers/libuv.nim
index f2d15bdae..1b6416982 100644
--- a/lib/wrappers/libuv.nim
+++ b/lib/wrappers/libuv.nim
@@ -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
-
-  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)
+  cssize = int
+  coff = int
+  csize = int
+
+  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