posix: add full Haiku support (#13931)
* posix: add full Haiku support This commit provides a posix_haiku derived from posix_other, with types following Haiku's definition. This fixes cases where the compiler generates type check for the wrong types (ie. checks where generated for an int-derived type but it's actually implemented as an uint instead). * tools/kochdocs: welcome posix_haiku to the blacklist
This commit is contained in:
parent
7b582fd6a6
commit
cc3f5d21b2
3 changed files with 609 additions and 2 deletions
|
|
@ -88,7 +88,7 @@ const
|
|||
type Sighandler = proc (a: cint) {.noconv.}
|
||||
|
||||
const StatHasNanoseconds* = defined(linux) or defined(freebsd) or
|
||||
defined(osx) or defined(openbsd) or defined(dragonfly) ## \
|
||||
defined(osx) or defined(openbsd) or defined(dragonfly) or defined(haiku) ## \
|
||||
## Boolean flag that indicates if the system supports nanosecond time
|
||||
## resolution in the fields of ``Stat``. Note that the nanosecond based fields
|
||||
## (``Stat.st_atim``, ``Stat.st_mtim`` and ``Stat.st_ctim``) can be accessed
|
||||
|
|
@ -105,6 +105,8 @@ elif (defined(macos) or defined(macosx) or defined(bsd)) and defined(cpu64):
|
|||
include posix_macos_amd64
|
||||
elif defined(nintendoswitch):
|
||||
include posix_nintendoswitch
|
||||
elif defined(haiku):
|
||||
include posix_haiku
|
||||
else:
|
||||
include posix_other
|
||||
|
||||
|
|
@ -636,7 +638,8 @@ proc posix_madvise*(a1: pointer, a2: int, a3: cint): cint {.
|
|||
importc, header: "<sys/mman.h>".}
|
||||
proc posix_mem_offset*(a1: pointer, a2: int, a3: var Off,
|
||||
a4: var int, a5: var cint): cint {.importc, header: "<sys/mman.h>".}
|
||||
when not (defined(linux) and defined(amd64)) and not defined(nintendoswitch):
|
||||
when not (defined(linux) and defined(amd64)) and not defined(nintendoswitch) and
|
||||
not defined(haiku):
|
||||
proc posix_typed_mem_get_info*(a1: cint,
|
||||
a2: var Posix_typed_mem_info): cint {.importc, header: "<sys/mman.h>".}
|
||||
proc posix_typed_mem_open*(a1: cstring, a2, a3: cint): cint {.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue