Skip to content

Commit 6025571

Browse files
committed
options/posix: add some more feature test macros
os-test shows we don't define these even though we support everything needed for them.
1 parent a7f1ca6 commit 6025571

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

options/posix/include/unistd.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,17 @@ extern "C" {
3737
#define _POSIX_THREAD_SAFE_FUNCTIONS _POSIX_VERSION
3838
#define _POSIX_MONOTONIC_CLOCK 0
3939

40+
// mmap, msync, munmap
41+
#define _POSIX_MAPPED_FILES _POSIX_VERSION
42+
// mlockall, munlockall
43+
#define _POSIX_MEMLOCK _POSIX_VERSION
44+
// mlock, munlock
45+
#define _POSIX_MEMLOCK_RANGE _POSIX_VERSION
46+
// mmap, munmap, shm_open, shm_unlink
47+
#define _POSIX_SHARED_MEMORY_OBJECTS _POSIX_VERSION
48+
// open, msync, fsync, fdatasync
49+
#define _POSIX_SYNCHRONIZED_IO _POSIX_VERSION
50+
4051
/* MISSING: additional _POSIX and _XOPEN feature macros */
4152
/* MISSING: _POSIX_TIMESTAMP_RESOLUTION and _POSIX2_SYMLINKS */
4253

0 commit comments

Comments
 (0)