mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
<stdio.h>: Acknowledge that getdelim/getline are in POSIX
These comments were written in 2003 (added in 2c008571c3
), predating
the addition of getdelim(3)/getline(3) in POSIX.1-2008.
Reviewed-by: Sam James <sam@gentoo.org>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
This commit is contained in:
parent
10733d6a72
commit
e7ac92e6ca
@ -685,12 +685,7 @@ extern char *fgets_unlocked (char *__restrict __s, int __n,
|
|||||||
(and null-terminate it). *LINEPTR is a pointer returned from malloc (or
|
(and null-terminate it). *LINEPTR is a pointer returned from malloc (or
|
||||||
NULL), pointing to *N characters of space. It is realloc'd as
|
NULL), pointing to *N characters of space. It is realloc'd as
|
||||||
necessary. Returns the number of characters read (not including the
|
necessary. Returns the number of characters read (not including the
|
||||||
null terminator), or -1 on error or EOF.
|
null terminator), or -1 on error or EOF. */
|
||||||
|
|
||||||
These functions are not part of POSIX and therefore no official
|
|
||||||
cancellation point. But due to similarity with an POSIX interface
|
|
||||||
or due to the implementation they are cancellation points and
|
|
||||||
therefore not marked with __THROW. */
|
|
||||||
extern __ssize_t __getdelim (char **__restrict __lineptr,
|
extern __ssize_t __getdelim (char **__restrict __lineptr,
|
||||||
size_t *__restrict __n, int __delimiter,
|
size_t *__restrict __n, int __delimiter,
|
||||||
FILE *__restrict __stream) __wur __nonnull ((4));
|
FILE *__restrict __stream) __wur __nonnull ((4));
|
||||||
@ -698,12 +693,7 @@ extern __ssize_t getdelim (char **__restrict __lineptr,
|
|||||||
size_t *__restrict __n, int __delimiter,
|
size_t *__restrict __n, int __delimiter,
|
||||||
FILE *__restrict __stream) __wur __nonnull ((4));
|
FILE *__restrict __stream) __wur __nonnull ((4));
|
||||||
|
|
||||||
/* Like `getdelim', but reads up to a newline.
|
/* Like `getdelim', but reads up to a newline. */
|
||||||
|
|
||||||
This function is not part of POSIX and therefore no official
|
|
||||||
cancellation point. But due to similarity with an POSIX interface
|
|
||||||
or due to the implementation it is a cancellation point and
|
|
||||||
therefore not marked with __THROW. */
|
|
||||||
extern __ssize_t getline (char **__restrict __lineptr,
|
extern __ssize_t getline (char **__restrict __lineptr,
|
||||||
size_t *__restrict __n,
|
size_t *__restrict __n,
|
||||||
FILE *__restrict __stream) __wur __nonnull ((3));
|
FILE *__restrict __stream) __wur __nonnull ((3));
|
||||||
|
Loading…
Reference in New Issue
Block a user