feat(libc): export tzname #5009
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5009"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by p3n1cillin on 2026-10-13T08:03:44Z.
What
ES-DE, the second frontend in RetroArch (PPSA99169,
/app0/es-de/es-de.bin), importstznamefromlibSceLibcInternal, which nothing exports. Its relinked executable stops at load:(
BAYjQubSZT8istznamein the aerolib NID list;tools/import_audit.pyreports it as the only absent import ofes-de.bin.)The only code in
es-de.binthat reads it (0xF13ADB–0xF13C0C) is ICU'suprv_tzname: twolocaltime_rprobes, thetm_isdst > 0checks, thentzname[0]andtzname[1]passed toremapShortTimeZone, andtzname[n]returned when that finds nothing. ICU falls back to it when detecting the default time zone.tznameis now achar*[2]data export oflibc, next totzset, which ES-DE also imports fromlibSceLibcInternaland which already resolves there. It points at the host's zone names (_tznameon Windows,tznameon Linux). It is filled when the library loads, after the existing LinuxTZsetup, and refreshed bytzset, because glibc can move its strings when the zone changes.tm_zoneand%Zalready come from the same host names. The Windows full names withoutTZ, the empty or repeated daylight name of a zone without daylight-saving time, and the unknown console values are recorded indocs/dev/debt/libc.md.Tested
guest_time_conversion(all 83 libc tests pass on Windows): aftertzsetwithTZ=UTC-5,tzname[0]isUTCandtzname[1]is set; withTZ=EST5EDT, they areESTandEDT. Without the export the test does not link. glibc gives the same names for both strings (checked in Ubuntu/WSL with a C program); the full Linux build was not run locally.es-de.binconverted and started through #4786: before, the load fails as above. After, ES-DE starts and its own log recordsstart: arguments for ES-DE 1. It creates its Vulkan device and swapchain and then stops in the AGC translator (last provoking vertex with explicit per-vertex triangle-strip interpolation is unsupported).python tools/check_conventions.py --base origin/mainpasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by p3n1cillin on 2026-10-13T09:07:48Z.
Follow-up Linux validation of this change on current
main4bb2c7f3947440d513b1dbd12143ec55b250495a: cleanly cherry-picked PR head8d6b8df72c9c059d63a805791b9363a85651cc4cinto an isolated local branch, alongside the independent Windows pipe-selection change from #5013. Exact integration head:2e3b9eb35c775e1d429f6c42144a701a632859ae.Ubuntu 26.04.1 / WSL2, GCC 15.2.0, Ninja Release, bundled dependencies,
BUILD_TESTING=ON. Built the real libc and libkernel libraries and all their Linux-registered test targets. All 187 scoped tests passed (66 libc, 121 libkernel), no skips or failures, 3.73 s.guest_time_conversionpassed in 0.11 s, checking zone changes and bothEST/EDTnames through the actual new data export.Removing this change from
Time.cppwhile keeping the new test caused the test link to fail with undefined references totzname_nid_postfix. Restored the exact source bytes, rebuilt the real library and test, and confirmedguest_time_conversionpassed again. Conventions and whitespace checks passed on the integration branch.This was a scoped library build and native Linux test run, not a full Linux application build or a Linux ES-DE run. No further game run was performed. AI-assisted validation with Codex; Claude's original implementation remains unchanged.
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-13T09:08:49Z.
Windows test of this PR.
Environment: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release,
BUILD_TESTING=ON,-j2,libusb-cmakefrom a local checkout. Built frommainad653c9bcwith this PR and #5004 merged together; the merge had no conflict.Result: guest_time_conversion (1 of 1) passes.
Not checked: whether the test fails without the change in the library code; the PR was not tested alone, only in the combined merge; no title run; Linux not tested.
AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by p3n1cillin on 2026-10-13T11:34:36Z.
Rebased onto
main5d50886ee, whereTime.cppchanged with the FreeBSD 11strftimerewrite (d0df62bd1). The change is the same: theHostZoneNameshelper now sits afterformatGuestTime. All 87 libc tests pass on Windows, includingguest_time_conversion; conventions pass.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-13T11:36:53Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)docs/dev/debt/libc.mdL58docs/dev/debt/libc.mdL58