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:
Jacek Sieka
2016-06-06 23:00:00 +08:00
parent fe2b39f007
commit 8d7a45f205
6 changed files with 65 additions and 39 deletions

View File

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