mirror of
https://github.com/MacosPorters/betterxen.git
synced 2026-11-26 20:10:44 +00:00
A program built with the mingw-w64 runtime imports fopen, fclose, fgets and perror, and writes to the stream fopen returns with fprintf, fwrite and fputs. The four did not resolve, and the output functions accepted only stdout and stderr. Adds the four services and file streams for the output functions. The files are the ones on the in-memory C: drive behind CreateFileW, so a file written through a C stream is the file ReadFile reads. Text mode, the default, translates line ends as the fopen documentation describes. Built on the standard streams from #400. Part of Gate A2. Signed-off-by: zachdoxsee <zachdoxsee36@gmail.com>
51 lines
4.6 KiB
Markdown
51 lines
4.6 KiB
Markdown
# Typed runtime services
|
|
|
|
Generated by `xenora-runtime-gen` from `crates/loader/runtime/services.txt`. Do not edit.
|
|
|
|
A declared service is not a claim of compatibility. `implemented` and `partial` describe behaviour against the documented contract for the synthetic guest. No service has been independently accepted.
|
|
|
|
| Measure | Count |
|
|
| --- | ---: |
|
|
| Services with a declared ABI | 30 |
|
|
| Generated adapters | 30 |
|
|
| Unique handler implementations | 30 |
|
|
| Implemented | 7 |
|
|
| Partial | 23 |
|
|
| Stub | 0 |
|
|
| Conformance-tested through guest dispatch | 30 |
|
|
| API-set aliases (not services) | 30 |
|
|
| Independently accepted | 0 |
|
|
|
|
| Service | Signature | Status | Failure |
|
|
| --- | --- | --- | --- |
|
|
| `kernel32.dll!SetProcessPriorityBoost` | `(process: handle, disable: bool32) -> bool32` | partial | 0 with ERROR_INVALID_HANDLE |
|
|
| `kernel32.dll!GetProcessPriorityBoost` | `(process: handle, disabled: out<4>) -> bool32` | partial | 0 with ERROR_INVALID_HANDLE or ERROR_NOACCESS |
|
|
| `kernel32.dll!GetCurrentProcess` | `() -> handle` | implemented | never |
|
|
| `kernel32.dll!GetProcessId` | `(process: handle) -> u32` | partial | 0 with ERROR_INVALID_HANDLE |
|
|
| `kernel32.dll!GetCurrentThread` | `() -> handle` | implemented | never |
|
|
| `kernel32.dll!GetCurrentProcessId` | `() -> u32` | implemented | never |
|
|
| `kernel32.dll!GetCurrentThreadId` | `() -> u32` | implemented | never |
|
|
| `kernel32.dll!OpenThread` | `(access: u32, inherit: bool32, thread: u32) -> handle` | partial | 0 with ERROR_INVALID_PARAMETER, ERROR_NOT_SUPPORTED or ERROR_NOT_ENOUGH_MEMORY |
|
|
| `kernel32.dll!GetThreadPriority` | `(thread: handle) -> i32` | partial | THREAD_PRIORITY_ERROR_RETURN with ERROR_INVALID_HANDLE or ERROR_ACCESS_DENIED |
|
|
| `kernel32.dll!SetThreadPriority` | `(thread: handle, priority: i32) -> bool32` | partial | 0 with ERROR_INVALID_HANDLE, ERROR_ACCESS_DENIED, ERROR_NOT_SUPPORTED or ERROR_INVALID_PARAMETER |
|
|
| `kernel32.dll!CloseHandle` | `(object: handle) -> bool32` | partial | 0 with ERROR_INVALID_HANDLE |
|
|
| `kernel32.dll!GetSystemTimeAsFileTime` | `(time: out<8>) -> void` | implemented | guest fault on an invalid pointer |
|
|
| `ucrtbase.dll!__acrt_iob_func` | `(index: u32) -> ptr` | partial | stops the guest for an index above 2 or when the streams cannot be allocated |
|
|
| `ucrtbase.dll!__stdio_common_vfprintf` | `(options: u64, stream: ptr, format: ptr, locale: ptr, arguments: ptr) -> i32` | partial | -1 with errno EINVAL for a null stream or format or an invalid format; stops the guest for what is not modelled |
|
|
| `ucrtbase.dll!fwrite` | `(buffer: ptr, size: u64, count: u64, stream: ptr) -> u64` | partial | 0 with errno EINVAL for a null buffer or stream, or EBADF or ENOSPC for a file; stops the guest for stdin or a pointer that is no stream |
|
|
| `ucrtbase.dll!fputs` | `(text: ptr, stream: ptr) -> i32` | partial | EOF with errno EINVAL for a null string or stream, or EBADF or ENOSPC for a file; stops the guest for stdin or a pointer that is no stream |
|
|
| `ucrtbase.dll!fflush` | `(stream: ptr) -> i32` | partial | stops the guest for a pointer that is no stream |
|
|
| `ucrtbase.dll!setvbuf` | `(stream: ptr, buffer: ptr, mode: i32, size: u64) -> i32` | partial | -1 with errno EINVAL for a null stream, an unknown mode or a size outside 2 to INT_MAX; stops the guest for a pointer that is no stream |
|
|
| `ucrtbase.dll!fopen` | `(name: ptr, mode: ptr) -> ptr` | partial | null with errno EINVAL, ENOENT, EACCES, EMFILE, ENOSPC or ENOMEM |
|
|
| `ucrtbase.dll!fclose` | `(stream: ptr) -> i32` | partial | EOF with errno EINVAL for a null stream; stops the guest for a standard stream or a pointer that is no stream |
|
|
| `ucrtbase.dll!fgets` | `(buffer: ptr, count: i32, stream: ptr) -> ptr` | partial | null at end of file; null with errno EINVAL or EBADF; stops the guest for stdin or a pointer that is no stream |
|
|
| `ucrtbase.dll!perror` | `(message: ptr) -> void` | partial | never |
|
|
| `kernel32.dll!GetLastError` | `() -> u32` | partial | never |
|
|
| `kernel32.dll!SetLastError` | `(code: u32) -> void` | partial | never |
|
|
| `kernel32.dll!VirtualAlloc` | `(address: ptr, size: u64, kind: u32, protect: u32) -> ptr` | partial | 0 with ERROR_INVALID_PARAMETER, ERROR_NOT_SUPPORTED, ERROR_INVALID_ADDRESS or ERROR_NOT_ENOUGH_MEMORY |
|
|
| `kernel32.dll!VirtualFree` | `(address: ptr, size: u64, kind: u32) -> bool32` | partial | 0 with ERROR_NOT_SUPPORTED, ERROR_INVALID_PARAMETER or ERROR_INVALID_ADDRESS |
|
|
| `ucrtbase.dll!sqrt` | `(x: f64) -> f64` | partial | NaN for a negative argument; errno is not set |
|
|
| `ucrtbase.dll!sqrtf` | `(x: f32) -> f32` | partial | NaN for a negative argument; errno is not set |
|
|
| `ucrtbase.dll!fabs` | `(x: f64) -> f64` | implemented | never |
|
|
| `ucrtbase.dll!fabsf` | `(x: f32) -> f32` | implemented | never |
|