The current libstdc++ basic_file_stdio.cc code assumes a POSIX API underneath the stdio implementation provided by the host libc. This means that the host must provide a fairly broad POSIX file API, including read, write, open, close, lseek and ioctl.
This patch changes basic_file_stdio.cc to only use basic ANSI-C stdio functions, allowing it to be used with libc implementations like picolibc which may not have a POSIX operating system underneath.