Merge remote-tracking branch 'offical/master'

This commit is contained in:
ed
2025-10-12 00:52:35 -04:00
272 changed files with 4127 additions and 2670 deletions
+1
View File
@@ -1,3 +1,4 @@
// Cross-platform `OS` interactions like file `I/O`.
package os
import "base:intrinsics"
+1 -1
View File
@@ -199,7 +199,7 @@ _get_full_path :: proc(fd: linux.Fd, allocator: runtime.Allocator) -> (fullpath:
buf: [32]u8
copy(buf[:], PROC_FD_PATH)
strconv.itoa(buf[len(PROC_FD_PATH):], int(fd))
strconv.write_int(buf[len(PROC_FD_PATH):], i64(fd), 10)
if fullpath, err = _read_link_cstr(cstring(&buf[0]), allocator); err != nil || fullpath[0] != '/' {
delete(fullpath, allocator)
+1 -1
View File
@@ -908,7 +908,7 @@ _dup :: proc(fd: Handle) -> (Handle, Error) {
@(require_results)
absolute_path_from_handle :: proc(fd: Handle) -> (string, Error) {
buf : [256]byte
fd_str := strconv.itoa( buf[:], cast(int)fd )
fd_str := strconv.write_int( buf[:], cast(i64)fd, 10 )
procfs_path := strings.concatenate( []string{ "/proc/self/fd/", fd_str } )
defer delete(procfs_path)