summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/getdelim.c
Commit message (Collapse)AuthorAgeFilesLines
* Better glibc compatibility for getline/getdelim:das2009-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
* Return -1 instead of 0 upon reaching EOF. This is somewhat ill-adviseddas2009-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@
* - Add getdelim(), getline(), stpncpy(), strnlen(), wcsnlen(),das2009-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@
OpenPOWER on IntegriCloud