]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
feat: Phase 1 — critical ulibc gaps + uname syscall + new smoke test
authorTulio A M Mendes <[email protected]>
Sat, 14 Mar 2026 07:47:11 +0000 (04:47 -0300)
committerTulio A M Mendes <[email protected]>
Sat, 14 Mar 2026 07:47:11 +0000 (04:47 -0300)
commit1cc82e1979bfc0ea795e8620d71185026c3de0ad
tree8c4ab80f82ef352fe4e95aa83dd77d2df1c9e65c
parent760380fbdb7cac80218b057fdc61e376a024efd0
feat: Phase 1 — critical ulibc gaps + uname syscall + new smoke test

Kernel:
- Add SYSCALL_UNAME (136) with struct utsname (sysname=AdrOS, machine=i686)

ulibc headers:
- signal.h: Add sigset_t typedef, sigemptyset/sigfillset/sigaddset/sigdelset/
  sigismember inline functions, SIG_BLOCK/SIG_UNBLOCK/SIG_SETMASK constants
- poll.h: New header with struct pollfd, POLLIN/POLLOUT/POLLERR/POLLHUP/POLLNVAL
- sys/utsname.h: New header with struct utsname + uname() declaration
- dirent.h: Add DIR typedef, opendir/readdir/closedir/rewinddir declarations
- unistd.h: Add sysconf/pathconf/fpathconf + _SC_*/_PC_* constants,
  gethostname, ttyname, pipe2 declarations
- stdio.h: Add clearerr, ungetc, getc, putc, getline, getdelim, popen,
  pclose, tmpfile, tmpnam declarations + ssize_t typedef
- syscall.h: Add SYS_UNAME (136)

ulibc implementations:
- poll.c: poll() syscall wrapper
- utsname.c: uname() syscall wrapper
- dirent.c: opendir/readdir/closedir/rewinddir wrapping getdents syscall
- sysconf.c: sysconf/pathconf/fpathconf returning compile-time constants
- stdio.c: clearerr, ungetc, getc, putc, getdelim, getline, popen/pclose,
  tmpfile, tmpnam implementations

Tests:
- fulltest.c: Add uname syscall test (G1) verifying sysname=AdrOS, machine=i686
- smoke_test.exp: Add uname test pattern (101 total tests)

Tests: 101/101 smoke, 64/64 host utils, cppcheck clean
17 files changed:
.gitignore
include/syscall.h
src/kernel/syscall.c
tests/smoke_test.exp
user/fulltest.c
user/ulibc/include/dirent.h
user/ulibc/include/poll.h [new file with mode: 0644]
user/ulibc/include/signal.h
user/ulibc/include/stdio.h
user/ulibc/include/sys/utsname.h [new file with mode: 0644]
user/ulibc/include/syscall.h
user/ulibc/include/unistd.h
user/ulibc/src/dirent.c [new file with mode: 0644]
user/ulibc/src/poll.c [new file with mode: 0644]
user/ulibc/src/stdio.c
user/ulibc/src/sysconf.c [new file with mode: 0644]
user/ulibc/src/utsname.c [new file with mode: 0644]