I fixed my problem. The posix
library has the file-read
function that does what I want, albeit on a file descriptor. Fortunately, ports in Chicken are just thin wrappers around file descriptors; there is a port to file descriptor converter in the posix
library as well.
Interestingly, these functions work on Windows as well. posix
seems to not be limited to POSIX systems.