Convert *_family fields to cushort

Fixes #9008
This commit is contained in:
LemonBoy 2018-09-19 09:24:30 +02:00
commit a27429304e
14 changed files with 61 additions and 71 deletions

View file

@ -440,8 +440,7 @@ const Sockaddr_un_path_length* = 108
type
Socklen* {.importc: "socklen_t", header: "<sys/socket.h>".} = cuint
# cushort really
TSa_Family* {.importc: "sa_family_t", header: "<sys/socket.h>".} = cshort
TSa_Family* {.importc: "sa_family_t", header: "<sys/socket.h>".} = cushort
SockAddr* {.importc: "struct sockaddr", header: "<sys/socket.h>",
pure, final.} = object ## struct sockaddr

View file

@ -472,10 +472,10 @@ const MSG_NOSIGNAL* = cint(16384)
const MSG_PEEK* = cint(2)
const MSG_TRUNC* = cint(32)
const MSG_WAITALL* = cint(256)
const AF_INET* = TSa_Family(2)
const AF_INET6* = TSa_Family(10)
const AF_UNIX* = TSa_Family(1)
const AF_UNSPEC* = TSa_Family(0)
const AF_INET* = cint(2)
const AF_INET6* = cint(10)
const AF_UNIX* = cint(1)
const AF_UNSPEC* = cint(0)
const SHUT_RD* = cint(0)
const SHUT_RDWR* = cint(2)
const SHUT_WR* = cint(1)

View file

@ -371,10 +371,10 @@ const MSG_NOSIGNAL* = cint(131072)
const MSG_PEEK* = cint(2)
const MSG_TRUNC* = cint(16)
const MSG_WAITALL* = cint(64)
const AF_INET* = TSa_Family(2)
const AF_INET6* = TSa_Family(28)
const AF_UNIX* = TSa_Family(1)
const AF_UNSPEC* = TSa_Family(0)
const AF_INET* = cint(2)
const AF_INET6* = cint(28)
const AF_UNIX* = cint(1)
const AF_UNSPEC* = cint(0)
const SHUT_RD* = cint(0)
const SHUT_RDWR* = cint(2)
const SHUT_WR* = cint(1)

View file

@ -410,7 +410,7 @@ else:
type
Socklen* {.importc: "socklen_t", header: "<sys/socket.h>".} = cuint
TSa_Family* {.importc: "sa_family_t", header: "<sys/socket.h>".} = cint
TSa_Family* {.importc: "sa_family_t", header: "<sys/socket.h>".} = cushort
SockAddr* {.importc: "struct sockaddr", header: "<sys/socket.h>",
pure, final.} = object ## struct sockaddr

View file

@ -488,10 +488,10 @@ var SOMAXCONN* {.importc: "SOMAXCONN", header: "<sys/socket.h>".}: cint
var MSG_PEEK* {.importc: "MSG_PEEK", header: "<sys/socket.h>".}: cint
var MSG_TRUNC* {.importc: "MSG_TRUNC", header: "<sys/socket.h>".}: cint
var MSG_WAITALL* {.importc: "MSG_WAITALL", header: "<sys/socket.h>".}: cint
var AF_INET* {.importc: "AF_INET", header: "<sys/socket.h>".}: TSa_Family
var AF_INET6* {.importc: "AF_INET6", header: "<sys/socket.h>".}: TSa_Family
var AF_UNIX* {.importc: "AF_UNIX", header: "<sys/socket.h>".}: TSa_Family
var AF_UNSPEC* {.importc: "AF_UNSPEC", header: "<sys/socket.h>".}: TSa_Family
var AF_INET* {.importc: "AF_INET", header: "<sys/socket.h>".}: cint
var AF_INET6* {.importc: "AF_INET6", header: "<sys/socket.h>".}: cint
var AF_UNIX* {.importc: "AF_UNIX", header: "<sys/socket.h>".}: cint
var AF_UNSPEC* {.importc: "AF_UNSPEC", header: "<sys/socket.h>".}: cint
var SHUT_RD* {.importc: "SHUT_RD", header: "<sys/socket.h>".}: cint
var SHUT_RDWR* {.importc: "SHUT_RDWR", header: "<sys/socket.h>".}: cint
var SHUT_WR* {.importc: "SHUT_WR", header: "<sys/socket.h>".}: cint