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:
Jonathan Flat committed 2026-10-01 10:30:50 -06:00
1 parent 9a9b78e4e9
commit cf36a2fe7b
16 files changed
+958 -627

No files matched your search

+2 -8
View File
@@ -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