some fixes for Haiku

This commit is contained in:
Araq 2013-09-01 17:29:29 +02:00
commit a95c0608b9
2 changed files with 50 additions and 45 deletions

View file

@ -67,7 +67,8 @@ hint[LineTooLong]=off
gpp.options.linker = "-ldl" gpp.options.linker = "-ldl"
clang.options.linker = "-ldl" clang.options.linker = "-ldl"
tcc.options.linker = "-ldl" tcc.options.linker = "-ldl"
@else: @end
@if bsd or haiku:
# BSD got posix_spawn only recently, so we deactivate it for osproc: # BSD got posix_spawn only recently, so we deactivate it for osproc:
define:useFork define:useFork
# at least NetBSD has problems with thread local storage: # at least NetBSD has problems with thread local storage:

View file

@ -30,7 +30,7 @@
from times import TTime from times import TTime
const const
hasSpawnH = true # should exist for every Posix system really nowadays hasSpawnH = not defined(haiku) # should exist for every Posix system nowadays
hasAioH = defined(linux) hasAioH = defined(linux)
when false: when false:
@ -842,6 +842,8 @@ var
FE_UPWARD* {.importc, header: "<fenv.h>".}: cint FE_UPWARD* {.importc, header: "<fenv.h>".}: cint
FE_DFL_ENV* {.importc, header: "<fenv.h>".}: cint FE_DFL_ENV* {.importc, header: "<fenv.h>".}: cint
when not defined(haiku):
var
MM_HARD* {.importc, header: "<fmtmsg.h>".}: cint MM_HARD* {.importc, header: "<fmtmsg.h>".}: cint
## Source of the condition is hardware. ## Source of the condition is hardware.
MM_SOFT* {.importc, header: "<fmtmsg.h>".}: cint MM_SOFT* {.importc, header: "<fmtmsg.h>".}: cint
@ -884,6 +886,7 @@ var
## The function was unable to generate a console message, but ## The function was unable to generate a console message, but
## otherwise succeeded. ## otherwise succeeded.
var
FNM_NOMATCH* {.importc, header: "<fnmatch.h>".}: cint FNM_NOMATCH* {.importc, header: "<fnmatch.h>".}: cint
## The string does not match the specified pattern. ## The string does not match the specified pattern.
FNM_PATHNAME* {.importc, header: "<fnmatch.h>".}: cint FNM_PATHNAME* {.importc, header: "<fnmatch.h>".}: cint
@ -1809,7 +1812,8 @@ proc feholdexcept*(a1: ptr Tfenv): cint {.importc, header: "<fenv.h>".}
proc fesetenv*(a1: ptr Tfenv): cint {.importc, header: "<fenv.h>".} proc fesetenv*(a1: ptr Tfenv): cint {.importc, header: "<fenv.h>".}
proc feupdateenv*(a1: ptr TFenv): cint {.importc, header: "<fenv.h>".} proc feupdateenv*(a1: ptr TFenv): cint {.importc, header: "<fenv.h>".}
proc fmtmsg*(a1: int, a2: cstring, a3: cint, when not defined(haiku):
proc fmtmsg*(a1: int, a2: cstring, a3: cint,
a4, a5, a6: cstring): cint {.importc, header: "<fmtmsg.h>".} a4, a5, a6: cstring): cint {.importc, header: "<fmtmsg.h>".}
proc fnmatch*(a1, a2: cstring, a3: cint): cint {.importc, header: "<fnmatch.h>".} proc fnmatch*(a1, a2: cstring, a3: cint): cint {.importc, header: "<fnmatch.h>".}