Files
AnyPS5/docs/dev/debt/libScePosixForWebKit.md
T
juanpimg 1f1add461e feat(prx): declare the missing PS5 3.20 system exports in the next tier of libraries
AnyPS5 resolves a title's imports by NID, so a title that imports a system
function that no AnyPS5 library provides fails to load with an unresolved
import. This declares 222 such exports across 11 PS5 system libraries that
AnyPS5 implements but does not provide.

Each declaration calls NotImplemented_nid_no_patch and returns 0; none of
them implements the function. A declaration with a credible prototype uses
it and cites the source with a pinned commit; the rest are declared without
parameters, which resolves the import without making an ABI claim. The
technical-debt files record the limitation per library.

The list is the intersection of the export table of the console's library
(function symbols only), the pinned aerolib names and the functions not yet
defined anywhere in the repo. Every name recomputes to its NID with
tools/nid_names.py.

libSceAudio3d and libSceVoice are left out because #8331 declares them.
2026-10-20 23:22:17 +02:00

4.2 KiB

libScePosixForWebKit technical debt

Unknown function info

Functional

  • mkstemp and isatty (libScePosixForWebKit) follow FreeBSD's temporary-file API and terminal check, without console verification. mkstemp replaces all trailing X characters, accepts a fixed name, and creates files through the guest path resolver with exclusive read/write access and mode 0600. Windows file permissions follow the existing kernel file implementation. isatty tests Windows console handles rather than all character devices; files, pipes and guest sockets return ENOTTY, closed descriptors return EBADF.
  • arc4random (libScePosixForWebKit) returns four bytes of host OS entropy (getentropy, rand_s on Windows), as arc4random_buf does, uniform over the 32-bit range like FreeBSD 11.4's RC4 keystream in arc4random.c. The console's generator and its reseeding are unknown; arc4random_uniform, arc4random_stir and arc4random_addrandom are not in the module's export set and are absent
  • fnmatch (libScePosixForWebKit) follows FreeBSD 11 fnmatch.c in the C locale: each byte is one character, FNM_CASEFOLD folds ASCII letters only, and bracket ranges compare byte values. [:class:] names are not character classes: as in FreeBSD 11 through 14, [[:digit:]] is the set of [, :, d, i, g, t followed by a literal ] (classes were added to fnmatch.c after 14). Multibyte characters and locale collation are not modelled. A null pattern or string throws
  • getservbyname (libScePosixForWebKit) searches a built-in copy of 37 lines of FreeBSD 11.4's etc/services (ftp-data, ftp, ssh, telnet, smtp, domain, tftp, http, pop3, ntp, imap, https, rtsp, submission, imaps, pop3s with their aliases and protocols, in file order) the way getservent.c searches the file: case-sensitive name or alias, a null protocol takes the first match, the port in network byte order, the result in per-thread storage. The console's /etc/services is unknown, so any other service returns null without setting errno, as for a name the file lacks. getaddrinfo still resolves service names through the host's service database