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:
Jacek Sieka 2017-04-13 05:10:54 +08:00 • committed by Andreas Rumpf
commit ce86b4ad78
12 changed files with 3438 additions and 3133 deletions

View file

@ -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