diff --git a/config/nimrod.cfg b/config/nimrod.cfg index f7f11d5b29..65076c7da1 100755 --- a/config/nimrod.cfg +++ b/config/nimrod.cfg @@ -106,8 +106,8 @@ clang.options.speed = "-O3" clang.options.size = "-Os" # Configuration for the Visual C/C++ compiler: -vcc.options.linker = r"/F33554432" # set the stack size to 8 MB -vcc.options.debug = "/RTC1 /ZI" +vcc.options.linker = "/DEBUG /Zi /Fd\"$projectName.pdb\" /F33554432" # set the stack size to 8 MB +vcc.options.debug = "/RTC1 /Zi /Fd\"$projectName.pdb\"" vcc.options.always = "/nologo" vcc.options.speed = "/Ox /arch:SSE2" vcc.options.size = "/O1" diff --git a/doc/lib.txt b/doc/lib.txt index 179861d010..47e53af3e7 100755 --- a/doc/lib.txt +++ b/doc/lib.txt @@ -516,11 +516,17 @@ XML Processing Wrapper of the expat XML parser. -Internet Protocols and Support ------------------------------- +Network Programming and Internet Protocols +------------------------------------------ + +* `libuv `_ + Wrapper for the libuv library used for async I/O programming. + +* `joyent_http_parser `_ + Wrapper for the joyent's high-performance HTTP parser. * `libcurl `_ - Contains a wrapper for the libcurl library. + Wrapper for the libcurl library. * `openssl `_ Wrapper for OpenSSL. diff --git a/lib/system.nim b/lib/system.nim index 51ec0e66cb..7a7a1c33b5 100755 --- a/lib/system.nim +++ b/lib/system.nim @@ -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 diff --git a/lib/windows/winlean.nim b/lib/windows/winlean.nim index 75f2fc4df4..a997b0e1cc 100755 --- a/lib/windows/winlean.nim +++ b/lib/windows/winlean.nim @@ -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 diff --git a/lib/wrappers/joyent_http_parser.nim b/lib/wrappers/joyent_http_parser.nim index 401685c39d..a008da43eb 100644 --- a/lib/wrappers/joyent_http_parser.nim +++ b/lib/wrappers/joyent_http_parser.nim @@ -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, diff --git a/lib/wrappers/libuv.nim b/lib/wrappers/libuv.nim index f2d15bdae4..1b6416982e 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 + 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 diff --git a/web/nimrod.ini b/web/nimrod.ini index f2719ae4f6..3b596a7c2c 100755 --- a/web/nimrod.ini +++ b/web/nimrod.ini @@ -47,6 +47,7 @@ webdoc: "wrappers/libcurl;pure/md5;wrappers/mysql;wrappers/iup" webdoc: "wrappers/sqlite3;wrappers/postgres;wrappers/tinyc" webdoc: "wrappers/python;wrappers/tcl;wrappers/expat;wrappers/pcre" webdoc: "wrappers/tre;wrappers/openssl" +webdoc: "wrappers/libuv;wrappers/joyent_http_parser" webdoc: "posix/posix;wrappers/odbcsql;impure/dialogs" webdoc: "wrappers/zip/zlib;wrappers/zip/libzip"