Jeff Bailey 4dbcc3f029
[libc] implement fflush(NULL) support (#188217)
Implement support for flushing all open streams when fflush is called
with a NULL pointer.

* Added a global linked list to track all open File objects.
* Updated File class to include prev/next pointers and list management
methods.
* Implemented POSIX requirement for fflush to sync seekable input
streams back to the host environment.
* Updated Linux-specific file creation to register new files in the
global list.
* Fixed a memory safety bug in create_file_from_fd using delete instead
of free.
* Added unit test for fflush(NULL).
* Added explanatory comments to fflush.cpp and file.cpp.
2026-03-25 14:51:57 +00:00
..