]> 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)
commita0624d435d6d7f1d6b0763bf00214bbea78b6355
tree30d8daa337b9a7ececd95f3db64c555a885ef389
parent3c27b3f6dd9c12a63a3efb7f8ecb52586625c20f
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