Make DragonFlyBSD a first class BSD-like OS (#5548)

This commit is contained in:
Eugene Kabanov 2017-03-16 15:47:53 +02:00 • committed by Andreas Rumpf
commit 9c99973ff8
4 changed files with 15 additions and 6 deletions

View file

@ -41,9 +41,9 @@ proc isDefined*(symbol: string): bool =
result = targetOS in {osLinux, osMorphos, osSkyos, osIrix, osPalmos,
osQnx, osAtari, osAix,
osHaiku, osVxWorks, osSolaris, osNetbsd,
osFreebsd, osOpenbsd, osMacosx}
osFreebsd, osOpenbsd, osDragonfly, osMacosx}
of "bsd":
result = targetOS in {osNetbsd, osFreebsd, osOpenbsd}
result = targetOS in {osNetbsd, osFreebsd, osOpenbsd, osDragonfly}
of "emulatedthreadvars":
result = platform.OS[targetOS].props.contains(ospLacksThreadVars)
of "msdos": result = targetOS == osDos
@ -57,7 +57,8 @@ proc isDefined*(symbol: string): bool =
of "cpu32": result = CPU[targetCPU].bit == 32
of "cpu64": result = CPU[targetCPU].bit == 64
of "nimrawsetjmp":
result = targetOS in {osSolaris, osNetbsd, osFreebsd, osOpenbsd, osMacosx}
result = targetOS in {osSolaris, osNetbsd, osFreebsd, osOpenbsd,
osDragonfly, osMacosx}
else: discard
proc isDefined*(symbol: PIdent): bool = isDefined(symbol.s)