From a0dd75a011a708813d54431f96a0172c356f2285 Mon Sep 17 00:00:00 2001 From: auronandace Date: Fri, 3 Apr 2026 08:58:37 +0100 Subject: [PATCH] move unistd bits to cbindgen --- include/bits/unistd.h | 19 ------------------- src/header/unistd/cbindgen.toml | 15 ++++++++++++++- 2 files changed, 14 insertions(+), 20 deletions(-) delete mode 100644 include/bits/unistd.h diff --git a/include/bits/unistd.h b/include/bits/unistd.h deleted file mode 100644 index 1a2a89aec7..0000000000 --- a/include/bits/unistd.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _BITS_UNISTD_H -#define _BITS_UNISTD_H - -#define _POSIX_VERSION 200809L -#define _POSIX_BARRIERS 202405L -#define _POSIX_MONOTONIC_CLOCK 200112L -#define _POSIX_REALTIME_SIGNALS 202405L -#define _POSIX_SEMAPHORES 200112L -#define _POSIX_SHELL 1 -#define _POSIX_SHARED_MEMORY_OBJECTS 200112L -#define _POSIX_THREADS 202405L -#define _POSIX_THREAD_ATTR_STACKADDR 202405L -#define _POSIX_THREAD_ATTR_STACKSIZE 202405L -#define _POSIX_TIMEOUTS 202405L -#define _POSIX_TIMERS 202405L -#define _XOPEN_SHM 1 -#define _XOPEN_VERSION 700L - -#endif diff --git a/src/header/unistd/cbindgen.toml b/src/header/unistd/cbindgen.toml index aacfa7c907..f75a32a8c0 100644 --- a/src/header/unistd/cbindgen.toml +++ b/src/header/unistd/cbindgen.toml @@ -1,7 +1,20 @@ sys_includes = ["stddef.h", "stdint.h", "sys/types.h", "features.h"] include_guard = "_RELIBC_UNISTD_H" trailer = """ -#include +#define _POSIX_VERSION 200809L +#define _POSIX_BARRIERS 202405L +#define _POSIX_MONOTONIC_CLOCK 200112L +#define _POSIX_REALTIME_SIGNALS 202405L +#define _POSIX_SEMAPHORES 200112L +#define _POSIX_SHELL 1 +#define _POSIX_SHARED_MEMORY_OBJECTS 200112L +#define _POSIX_THREADS 202405L +#define _POSIX_THREAD_ATTR_STACKADDR 202405L +#define _POSIX_THREAD_ATTR_STACKSIZE 202405L +#define _POSIX_TIMEOUTS 202405L +#define _POSIX_TIMERS 202405L +#define _XOPEN_SHM 1 +#define _XOPEN_VERSION 700L """ language = "C" style = "Tag"