mirror of
https://github.com/apple/swift-system
synced 2026-11-25 04:47:55 +00:00
v2: Use statfs on Linux and Android, make StatFS unavailable on WASI, omit Linux flags the kernel never reports, add descriptions for MountFlags and FileSystemID, and back-deploy CInterop.StatFS with CInterop.statfs(_:_:) for migration
This commit is contained in:
16 files changed
+958
-627
No files matched your search
@@ -21,9 +21,8 @@
|
||||
#include <unistd.h>
|
||||
#include "io_uring.h"
|
||||
|
||||
// The `ST_*` mount-flag constants in <sys/statvfs.h> require _GNU_SOURCE.
|
||||
// Rather than define _GNU_SOURCE module-wide, which clashes with SwiftGlibc,
|
||||
// expose them through these getters, defined in shims.c under _GNU_SOURCE.
|
||||
// Test-only: libc's `ST_*` values, which glibc gates on _GNU_SOURCE. Defining
|
||||
// that here would clash with SwiftGlibc, so shims.c defines it instead.
|
||||
#include <stdint.h>
|
||||
uint64_t _system_get_ST_RDONLY(void);
|
||||
uint64_t _system_get_ST_NOSUID(void);
|
||||
@@ -35,10 +34,5 @@ uint64_t _system_get_ST_NOATIME(void);
|
||||
uint64_t _system_get_ST_NODIRATIME(void);
|
||||
uint64_t _system_get_ST_RELATIME(void);
|
||||
uint64_t _system_get_ST_NOSYMFOLLOW(void);
|
||||
#if !defined(__ANDROID__)
|
||||
uint64_t _system_get_ST_WRITE(void);
|
||||
uint64_t _system_get_ST_APPEND(void);
|
||||
uint64_t _system_get_ST_IMMUTABLE(void);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user