Make exit(), fclose(), fflush(), and freopen() comply with POSIX-2008
authorguenther <guenther@openbsd.org>
Mon, 12 Aug 2024 20:53:09 +0000 (20:53 +0000)
committerguenther <guenther@openbsd.org>
Mon, 12 Aug 2024 20:53:09 +0000 (20:53 +0000)
commite7b257687548726747a5be4765460de4eccc2915
tree04dead3b63b82b384e9841268d05abbf8aacf4d5
parent9e0435787d35ad132d96b81731cfb025f77172cd
Make exit(), fclose(), fflush(), and freopen() comply with POSIX-2008
requirements for setting the underlying file position when flushing
read-mode streams, and make an fseek()-after-fflush() not change the
underlying file position.

Much testing, review, and assistance from tb@
ok tb@ millert@
lib/libc/stdio/fclose.3
lib/libc/stdio/fclose.c
lib/libc/stdio/fflush.3
lib/libc/stdio/fflush.c
lib/libc/stdio/freopen.c
lib/libc/stdio/fseek.c
lib/libc/stdio/ftell.c
lib/libc/stdlib/exit.3