added system.appType magic

This commit is contained in:
Andreas Rumpf 2010-07-21 20:59:06 +02:00
commit cdf03b06b9
11 changed files with 49 additions and 14 deletions

View file

@ -813,11 +813,15 @@ const
hostOS* {.magic: "HostOS"}: string = ""
## a string that describes the host operating system. Possible values:
## "windows", "macosx", "linux", "netbsd", "freebsd", "openbsd", "solaris",
## "aix"
## "aix".
hostCPU* {.magic: "HostCPU"}: string = ""
## a string that describes the host CPU. Possible values:
## "i386", "alpha", "powerpc", "sparc", "amd64", "mips", "arm"
## "i386", "alpha", "powerpc", "sparc", "amd64", "mips", "arm".
appType* {.magic: "AppType"}: string = ""
## a string that describes the application type. Possible values:
## "console", "gui", "lib".
proc toFloat*(i: int): float {.
magic: "ToFloat", noSideEffect, importc: "toFloat".}
@ -1570,7 +1574,7 @@ when not defined(EcmaScript) and not defined(NimrodVM):
result = n.sons[n.len]
include "system/systhread"
include "system/mm"
include "system/mmdisp"
include "system/sysstr"
include "system/assign"
include "system/repr"

View file

@ -130,6 +130,12 @@ when defined(boehmgc):
include "system/cellsets"
elif defined(nogc):
# Even though we don't want the GC, we cannot simply use C's memory manager
# because Nimrod's runtime wants ``realloc`` to zero out the additional
# space which C's ``realloc`` does not. And we cannot get the old size of an
# object, because C does not support this operation... Even though every
# possible implementation has to have a way to determine the object's size.
# C just sucks.
include "system/alloc"
when false: