Files
RedBear-OS/local/recipes/dev/libclc/source/libc/include/unistd.yaml
T
vasilito cb424d7448 build: static patch-sanity linter (shift-left the malformed-patch class)
verify-patch-sanity.py validates every active recipe .patch has internally-
consistent hunk line counts — catching the 'malformed patch at line N' failure
at commit/CI/preflight time instead of hours into a cook. This cycle hit that
class three times (qtwaylandscanner, sddm, xwayland), each only discovered when
cookbook tried to apply the patch.

Running it across the repo found 29 latent malformed patches (validated against
GNU patch: e.g. relibc/P3-sysv-ipc reproduces 'malformed patch at line 22').
They were harmless only because they sit in vendored recipes (baked, not re-
applied) — but would fail on any version-bump re-derivation. --fix recounts the
hunk headers (body untouched) and repaired all 29.

Wired into build-preflight.sh (Phase 1.0D) and redbear-ci.yml, with a unit test
(test-patch-sanity.sh). Skips archived/legacy trees and unvalidatable formats
(empty placeholders, bare-@@ git hunks).
2026-08-01 05:13:02 +03:00

343 lines
6.2 KiB
YAML

header: unistd.h
header_template: unistd.h.def
macros: []
types:
- type_name: uid_t
- type_name: ssize_t
- type_name: size_t
- type_name: pid_t
- type_name: off_t
- type_name: __getoptargv_t
- type_name: __exec_envp_t
- type_name: __exec_argv_t
enums: []
objects:
- object_name: environ
object_type: char **
- object_name: optarg
object_type: char *
- object_name: optind
object_type: int
- object_name: opterr
object_type: int
- object_name: optopt
object_type: int
functions:
- name: __llvm_libc_syscall
standards:
- POSIX
return_type: long
arguments:
- type: long
- type: long
- type: long
- type: long
- type: long
- type: long
- type: long
- name: _exit
standards:
- POSIX
return_type: _Noreturn void
arguments:
- type: int
- name: access
standards:
- POSIX
return_type: int
arguments:
- type: const char *
- type: int
- name: chdir
standards:
- POSIX
return_type: int
arguments:
- type: const char *
- name: close
standards:
- POSIX
return_type: int
arguments:
- type: int
- name: dup
standards:
- POSIX
return_type: int
arguments:
- type: int
- name: dup2
standards:
- POSIX
return_type: int
arguments:
- type: int
- type: int
- name: dup3
standards:
- POSIX
return_type: int
arguments:
- type: int
- type: int
- type: int
- name: execv
standards:
- POSIX
return_type: int
arguments:
- type: const char *
- type: __exec_argv_t
- name: execve
standards:
- POSIX
return_type: int
arguments:
- type: const char *
- type: __exec_argv_t
- type: __exec_envp_t
- name: fchdir
standards:
- POSIX
return_type: int
arguments:
- type: int
- name: fork
standards:
- POSIX
return_type: pid_t
arguments:
- type: void
- name: fsync
standards:
- POSIX
return_type: int
arguments:
- type: int
- name: ftruncate
standards:
- POSIX
return_type: int
arguments:
- type: int
- type: off_t
- name: getcwd
standards:
- POSIX
return_type: char *
arguments:
- type: char *
- type: size_t
- name: getentropy
standards:
- GNUExtensions
return_type: int
arguments:
- type: void *
- type: size_t
- name: geteuid
standards:
- POSIX
return_type: uid_t
arguments:
- type: void
- name: getopt
standards:
- POSIX
return_type: int
arguments:
- type: int
- type: __getoptargv_t
- type: const char *
- name: getpid
standards:
- POSIX
return_type: int
arguments:
- type: void
- name: getppid
standards:
- POSIX
return_type: int
arguments:
- type: void
- name: getsid
standards:
- POSIX
return_type: pid_t
arguments:
- type: pid_t
- name: gettid
standards:
- Linux
return_type: pid_t
arguments:
- type: void
- name: getuid
standards:
- POSIX
return_type: uid_t
arguments:
- type: void
- name: isatty
standards:
- POSIX
return_type: int
arguments:
- type: int
guard: null
attributes: []
- name: link
standards:
- POSIX
return_type: int
arguments:
- type: const char *
- type: const char *
- name: linkat
standards:
- POSIX
return_type: int
arguments:
- type: int
- type: const char *
- type: int
- type: const char *
- type: int
- name: lseek
standards:
- POSIX
return_type: off_t
arguments:
- type: int
- type: off_t
- type: int
- name: pipe
standards:
- POSIX
return_type: int
arguments:
- type: int *
- name: pipe2
standards:
- Linux
return_type: int
arguments:
- type: int *
- type: int
- name: pread
standards:
- POSIX
return_type: ssize_t
arguments:
- type: int
- type: void *
- type: size_t
- type: off_t
- name: pwrite
standards:
- POSIX
return_type: ssize_t
arguments:
- type: int
- type: const void *
- type: size_t
- type: off_t
- name: read
standards:
- POSIX
return_type: ssize_t
arguments:
- type: int
- type: void *
- type: size_t
- name: readlink
standards:
- POSIX
return_type: ssize_t
arguments:
- type: const char *__restrict
- type: char *__restrict
- type: size_t
- name: readlinkat
standards:
- POSIX
return_type: ssize_t
arguments:
- type: const char *__restrict
- type: char *__restrict
- type: size_t
- name: rmdir
standards:
- POSIX
return_type: int
arguments:
- type: const char *
- name: swab
standards:
- POSIX
return_type: void
arguments:
- type: const void *__restrict
- type: void *
- type: ssize_t
- name: setsid
standards:
- POSIX
return_type: pid_t
arguments:
- type: void
- name: symlink
standards:
- POSIX
return_type: int
arguments:
- type: const char *
- type: const char *
- name: symlinkat
standards:
- POSIX
return_type: int
arguments:
- type: int
- type: const char *
- type: int
- type: const char *
- name: sysconf
standards:
- POSIX
return_type: int
arguments:
- type: int
- name: truncate
standards:
- POSIX
return_type: int
arguments:
- type: const char *
- type: off_t
- name: unlink
standards:
- POSIX
return_type: int
arguments:
- type: const char *
- name: unlinkat
standards:
- POSIX
return_type: int
arguments:
- type: int
- type: const char *
- type: int
- name: write
standards:
- POSIX
return_type: ssize_t
arguments:
- type: int
- type: const void *
- type: size_t
guard: null
attributes: []