]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
feat: Phase 0 — convert libgloss posix_stubs.c from ENOSYS to real AdrOS syscalls
authorTulio A M Mendes <[email protected]>
Sat, 14 Mar 2026 07:34:43 +0000 (04:34 -0300)
committerTulio A M Mendes <[email protected]>
Sat, 14 Mar 2026 07:34:43 +0000 (04:34 -0300)
commit760380fbdb7cac80218b057fdc61e376a024efd0
treee539f80bfb9c653d1d7c68d5b03225679b0ead17
parentf2506b750de91549d96d0a097aa29d1454cfe16b
feat: Phase 0 — convert libgloss posix_stubs.c from ENOSYS to real AdrOS syscalls

Convert ~30 POSIX stub functions in newlib/libgloss/adros/posix_stubs.c from
returning ENOSYS to making real AdrOS kernel syscalls via INT 0x80.

Functions now making real syscalls:
- File ops: dup, dup2, fcntl, pipe, chown, chmod, access, chdir, getcwd
- Process: waitpid, setpgid, setsid, getpgrp, getppid, getuid/geteuid/
  getgid/getegid, setuid/setgid, setreuid/setregid, umask, alarm, sleep
- Signals: sigaction, sigprocmask
- Terminal: tcgetattr, tcsetattr, tcgetpgrp, tcsetpgrp, ioctl
- I/O mux: select, pselect (wraps select)
- Directory: opendir/readdir/closedir/rewinddir (wraps getdents)
- Improved fnmatch with proper * and ? wildcard support

Also adds docs/SELF_HOSTING_ANALYSIS.md with comprehensive POSIX gap
analysis, self-hosting assessment, and prioritized implementation plan.

Bash 5.2.21 rebuilt against new libadros.a (1.7MB static ELF i386).

Tests: 100/100 smoke, 64/64 host utils, cppcheck clean
docs/SELF_HOSTING_ANALYSIS.md [new file with mode: 0644]
newlib/libgloss/adros/posix_stubs.c