Posix from detect (#5697)
* refactor posix.nim
* types move to separate files for platform-specifc and generic
("other')
* consts move to separate files that get autogenerated by detect.nim
* proc's stay where they are for now, though in a second stage might
move as well
* fix missing when
This commit is contained in:
parent
e512358bc9
commit
ce86b4ad78
12 changed files with 3438 additions and 3133 deletions
|
|
@ -219,7 +219,7 @@ template htons(x: uint16): expr =
|
|||
sockets.ntohs(x)
|
||||
|
||||
when defined(Posix):
|
||||
proc toInt(domain: Domain): cint =
|
||||
proc toInt(domain: Domain): TSa_Family =
|
||||
case domain
|
||||
of AF_UNIX: result = posix.AF_UNIX
|
||||
of AF_INET: result = posix.AF_INET
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue