summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/getdelim.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r320472,r320508,r320509:Konstantin Belousov2017-07-171-6/+7
| | | | | | | | | Make stdio deferred cancel-safe. Requested by: eugen Notes: svn path=/stable/10/; revision=321074
* MFC r304810Andrey A. Chernov2016-08-271-2/+2
| | | | | | | | | | | Don't check for __SERR which may stick from one of any previous stdio functions. __SERR is for user and the rest of stdio code do not check it for error sensing internally, only set it. In vf(w)printf.c here it is more easy to save __SERR, clear and restore it. Notes: svn path=/stable/10/; revision=304888
* Better glibc compatibility for getline/getdelim:David Schultz2009-10-041-2/+2
| | | | | | | | | | | | | | | | | - Tolerate applications that pass a NULL pointer for the buffer and claim that the capacity of the buffer is nonzero. - If an application passes in a non-NULL buffer pointer and claims the buffer has zero capacity, we should free (well, realloc) it anyway. It could have been obtained from malloc(0), so failing to free it would be a small memory leak. MFC After: 2 weeks Reported by: naddy PR: ports/138320 Notes: svn path=/head/; revision=197752
* Return -1 instead of 0 upon reaching EOF. This is somewhat ill-advisedDavid Schultz2009-04-061-2/+4
| | | | | | | | | | | because it means getdelim() returns -1 for both error and EOF, and never returns 0. However, this is what the original GNU implementation does, and POSIX inherited the bug. Reported by: marcus@ Notes: svn path=/head/; revision=190773
* - Add getdelim(), getline(), stpncpy(), strnlen(), wcsnlen(),David Schultz2009-02-281-0/+158
wcscasecmp(), and wcsncasecmp(). - Make some previously non-standard extensions visible if POSIX_VISIBLE >= 200809. - Use restrict qualifiers in stpcpy(). - Declare off_t and size_t in stdio.h. - Bump __FreeBSD_version in case the new symbols (particularly getline()) cause issues with ports. Reviewed by: standards@ Notes: svn path=/head/; revision=189136