mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
util: detect_os: add DETECT_OS_FUCHSIA and DETECT_OS_POSIX_LITE
Fuchsia is a microkernel-like OS. It strategically implements some POSIX and Unix APIs to promote software re-use. It considers itself POSIX lite. "In order to reduce the amount of source modification needed to run on Fuchsia, Fuchsia offers a POSIX compatibility layer, POSIX Lite, that this software can target. POSIX Lite is layered on top of the underlying Fuchsia System ABI as a client library. However, POSIX Lite is not a complete implementation of POSIX." In the case of Fuchsia + src/util, these heavy-weight POSIX functions shouldn't be used: - file descriptors - syslog.h - signals - process creation To differentiate POSIX Lite, which Fuchsia and all heavy-weight POSIX implementations support, add DETECT_OS_POSIX_LITE. The use case is incrementally upstreaming functionality used in downstream drivers (lavapipe, ..). Being in-tree for obvious patches helps until the full driver can be merged. Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Eric Engestrom <eric@igalia.com> Acked-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29539>
This commit is contained in:
parent
9cdbb099ee
commit
ebe4a8d75f
1 changed files with 11 additions and 0 deletions
|
|
@ -52,6 +52,11 @@
|
|||
#define DETECT_OS_POSIX 1
|
||||
#endif
|
||||
|
||||
#if defined(__Fuchsia__)
|
||||
#define DETECT_OS_FUCHSIA 1
|
||||
#define DETECT_OS_POSIX_LITE 1
|
||||
#endif
|
||||
|
||||
#if defined(__GNU__)
|
||||
#define DETECT_OS_HURD 1
|
||||
#define DETECT_OS_POSIX 1
|
||||
|
|
@ -111,6 +116,9 @@
|
|||
#ifndef DETECT_OS_HAIKU
|
||||
#define DETECT_OS_HAIKU 0
|
||||
#endif
|
||||
#ifndef DETECT_OS_FUCHSIA
|
||||
#define DETECT_OS_FUCHSIA 0
|
||||
#endif
|
||||
#ifndef DETECT_OS_HURD
|
||||
#define DETECT_OS_HURD 0
|
||||
#endif
|
||||
|
|
@ -129,6 +137,9 @@
|
|||
#ifndef DETECT_OS_POSIX
|
||||
#define DETECT_OS_POSIX 0
|
||||
#endif
|
||||
#ifndef DETECT_OS_POSIX_LITE
|
||||
#define DETECT_OS_POSIX_LITE DETECT_OS_POSIX
|
||||
#endif
|
||||
#ifndef DETECT_OS_WINDOWS
|
||||
#define DETECT_OS_WINDOWS 0
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue