opnsense-src/lib/libc/tests/stdio
Bryan Drewery 8f8a794775 getdelim(3): Fix losing data on [EAGAIN]
Currently when an [EAGAIN] is encountered we return a partial result
that does not contain the delimeter.  On the next (successful) read we
were returning the next part of the line without the preceding string
from the first failed call.

Fix this by using the same mechanism as ungetc(3) does.  For the buffered
case we could simply set fp->_r and fp->_p back to their values before
sappend() is ran but for simplicity ungetc(3) is done in there as well.

Reviewed by:	kib
Differential Revision: https://reviews.freebsd.org/D31687
2021-09-02 11:26:26 -07:00
..
fdopen_test.c
fmemopen2_test.c
fopen_test.c
freopen_test.c
getdelim_test.c getdelim(3): Fix losing data on [EAGAIN] 2021-09-02 11:26:26 -07:00
gets_s_test.c Conform to Berne Convention. 2018-05-22 06:22:58 +00:00
Makefile Add new gets_s(3) stdio function. 2018-04-03 18:52:38 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
mkostemp_test.c
open_memstream2_test.c Similar to r305920, remove spurious newlines from ATF_REQUIRE_MSG calls 2016-09-18 06:00:07 +00:00
open_wmemstream_test.c Similar to r305920, remove spurious newlines from ATF_REQUIRE_MSG calls 2016-09-18 06:00:07 +00:00
perror_test.c
print_positional_test.c
printbasic_test.c Expect :int_within_limits to fail when ptrdiff_t/*intmax_t differ in base type 2017-02-07 05:39:00 +00:00
printfloat_test.c AArch64: Don't set flush-subnormals-to-zero flag on startup 2021-03-01 14:27:30 +00:00
scanfloat_test.c