mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-22 00:41:28 +00:00
prefer consts to importing #defines from headers
to be completed - better would be to have a libc wrapper that deals with all pesky C ABI details
This commit is contained in:
@@ -87,6 +87,8 @@ elif defined(posix):
|
||||
const MAP_ANONYMOUS = 0x1000
|
||||
elif defined(solaris):
|
||||
const MAP_ANONYMOUS = 0x100
|
||||
elif defined(linux):
|
||||
const MAP_ANONYMOUS = 0x20
|
||||
else:
|
||||
var
|
||||
MAP_ANONYMOUS {.importc: "MAP_ANONYMOUS", header: "<sys/mman.h>".}: cint
|
||||
|
||||
Reference in New Issue
Block a user