Missing POSIX APIs
While Redox's aim is not full POSIX compatibility, there are lots of missing APIs that generally only come with benefits.
Non-exhaustive list:
-
UTIME_OMIT
andUTIME_NOW
(#172 (closed)) -
some networking constants (#164 (closed))
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_mman.h.html
-
some sys/mman.h
defs (#73)
https://pubs.opengroup.org/onlinepubs/009604499/functions/wcswcs.html
-
wcswcs
considered legacy, callswcsstr
https://pubs.opengroup.org/onlinepubs/9799919799/functions/wcsstr.html
-
wcsstr
(0b2c3fe5)
https://pubs.opengroup.org/onlinepubs/9799919799/functions/wcsxfrm.html
-
wcsxfrm
-
wcsxfrm_l
https://pubs.opengroup.org/onlinepubs/9799919799/functions/wcsftime.html
-
wcsftime
https://pubs.opengroup.org/onlinepubs/9799919799/functions/mknod.html
-
mknod
(!442 (merged)) -
mknodat
(!442 (merged))
https://pubs.opengroup.org/onlinepubs/9799919799/functions/wctrans.html
-
wctrans
(!356 (merged))
https://pubs.opengroup.org/onlinepubs/9799919799/functions/towctrans.html
-
towctrans
(!356 (merged))
https://pubs.opengroup.org/onlinepubs/9799919799/functions/ungetwc.html
-
ungetwc
(!390 (merged))
https://pubs.opengroup.org/onlinepubs/9799919799/functions/wcsrtombs.html
-
wcsrtombs
(!388 (merged)) -
wcsnrtombs
(!426 (merged))
https://pubs.opengroup.org/onlinepubs/9799919799/functions/fwprintf.html
-
wprintf
(!352 (merged)) -
swprintf
callsvswprintf
? -
fwprintf
callsvfwprintf
https://pubs.opengroup.org/onlinepubs/9799919799/functions/vfwprintf.html
-
vfwprintf
(!352 (merged)) -
vwprintf
callsvfwprintf
-
vswprintf
https://pubs.opengroup.org/onlinepubs/9799919799/functions/fwscanf.html
-
wscanf
(!613 (merged)) -
swscanf
(!472 (merged)) -
fwscanf
https://pubs.opengroup.org/onlinepubs/9799919799/functions/vfwscanf.html
-
vfwscanf
-
vswscanf
(!472 (merged)) -
vwscanf
(!613 (merged))
https://pubs.opengroup.org/onlinepubs/9799919799/functions/alarm.html
-
alarm
callssetitimer
which is depreciated (#210)
https://pubs.opengroup.org/onlinepubs/9799919799/functions/timer_create.html
-
timer_create
https://pubs.opengroup.org/onlinepubs/9799919799/functions/confstr.html
-
confstr
(!364 & !694 (merged))
https://pubs.opengroup.org/onlinepubs/9799919799/functions/waitid.html
-
waitid
(!402)
https://pubs.opengroup.org/onlinepubs/9799919799/functions/posix_spawn.html
-
posix_spawn
(#192) -
posix_spawnp
https://pubs.opengroup.org/onlinepubs/9799919799/functions/shm_open.html
-
shm_open
(cea5101c) callsfcntl
https://pubs.opengroup.org/onlinepubs/9799919799/functions/fcntl.html
-
fcntl
(!440 (merged))
https://pubs.opengroup.org/onlinepubs/9799919799/functions/mkdir.html
-
mkdir
-
mkdirat
(#103)
https://pubs.opengroup.org/onlinepubs/9799919799/functions/getgroups.html
-
getgroups
https://pubs.opengroup.org/onlinepubs/9799919799/functions/getrlimit.html
-
getrlimit
-
setrlimit
https://pubs.opengroup.org/onlinepubs/9799919799/functions/getrusage.html
-
getrusage
https://pubs.opengroup.org/onlinepubs/9799919799/functions/getpriority.html
-
getpriority
-
setpriority
https://pubs.opengroup.org/onlinepubs/9799919799/functions/clock_getres.html
-
clock_getres
(!389 (merged)) -
clock_gettime
(libredox@9904ebe0) -
clock_settime
(!389 (merged))
https://pubs.opengroup.org/onlinepubs/9799919799/functions/posix_madvise.html
-
posix_madvise
(!357 (merged))
https://pubs.opengroup.org/onlinepubs/9799919799/functions/msync.html
-
msync
(2ac349d2)
https://pubs.opengroup.org/onlinepubs/9799919799/functions/open.html
-
open
-
openat
(!668)
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/utmpx.h.html
-
utmpx.h
(redox#1716 (moved))
https://pubs.opengroup.org/onlinepubs/9799919799/functions/fstatat.html
-
fstatat
(#103 & !695 (merged)) -
lstat
(ff32c8cb) -
stat
(ff32c8cb)
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/dirent.h.html
-
finish implementation (#220)
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fcntl.h.html
-
finish implementation (#221)
Crates that need fixing
-
fs_at
(redox#1461) -
interprocess
(redox#1488) -
systemstat
(redox#1485) -
if-addrs
(redox#1483) -
realm_syscall
(redox#1475) -
pnet_sys
(redox#1474)
Non POSIX
-
wait3
BSD extension to POSIXwaitpid
(#170) -
malloc.h
Non standard, platform specific. Should use POSIXstdlib.h
instead. (#136)
Not all POSIX APIs are available as stubs, but those that are, can be found by looking for commented-out #[no_mangle]
, e.g. via rg '^.*//.*#\[no_mangle\]'
.
There are some POSIX requirements that will be much harder to fix. First, the current context=process=thread assumption must be dealt with. Second, POSIX appears to allow all characters but NUL and '/', which conflicts with how schemes work (even returning an error due to lack of support for : in the filesystem, doesn't apply, as it will work but the behavior will be different).
Reference
Almost all POSIX functions are well-documented on the following links: