mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
libio: Replace internal _IO_getdelim symbol with __getdelim
__getdelim is exported, _IO_getdelim is not. Add a hidden prototype for __getdelim. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
parent
771473a8c4
commit
7fcdb53253
@ -23,7 +23,7 @@
|
||||
|
||||
#if IS_IN (libc)
|
||||
# include <libio/libioP.h>
|
||||
# define __getdelim(line, len, c, fp) _IO_getdelim (line, len, c, fp)
|
||||
# define __getdelim(line, len, c, fp) __getdelim (line, len, c, fp)
|
||||
|
||||
# undef isspace
|
||||
# define isspace(__c) __isspace_l ((__c), _nl_C_locobj_ptr)
|
||||
|
@ -213,6 +213,7 @@ libc_hidden_ldbl_proto (fprintf)
|
||||
libc_hidden_ldbl_proto (vfprintf)
|
||||
libc_hidden_ldbl_proto (sprintf)
|
||||
libc_hidden_proto (ungetc)
|
||||
libc_hidden_proto (__getdelim)
|
||||
libc_hidden_proto (fwrite)
|
||||
libc_hidden_proto (perror)
|
||||
libc_hidden_proto (remove)
|
||||
|
@ -37,7 +37,7 @@
|
||||
null terminator), or -1 on error or EOF. */
|
||||
|
||||
ssize_t
|
||||
_IO_getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp)
|
||||
__getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp)
|
||||
{
|
||||
ssize_t result;
|
||||
ssize_t cur_len = 0;
|
||||
@ -122,6 +122,5 @@ unlock_return:
|
||||
_IO_release_lock (fp);
|
||||
return result;
|
||||
}
|
||||
|
||||
weak_alias (_IO_getdelim, __getdelim)
|
||||
weak_alias (_IO_getdelim, getdelim)
|
||||
libc_hidden_def (__getdelim)
|
||||
weak_alias (__getdelim, getdelim)
|
||||
|
@ -734,7 +734,6 @@ libc_hidden_proto (_IO_getline)
|
||||
extern size_t _IO_getline_info (FILE *,char *, size_t,
|
||||
int, int, int *);
|
||||
libc_hidden_proto (_IO_getline_info)
|
||||
extern ssize_t _IO_getdelim (char **, size_t *, int, FILE *);
|
||||
extern size_t _IO_getwline (FILE *,wchar_t *, size_t, wint_t, int);
|
||||
extern size_t _IO_getwline_info (FILE *,wchar_t *, size_t,
|
||||
wint_t, int, wint_t *);
|
||||
|
@ -25,7 +25,7 @@
|
||||
ssize_t
|
||||
__getline (char **lineptr, size_t *n, FILE *stream)
|
||||
{
|
||||
return _IO_getdelim (lineptr, n, '\n', stream);
|
||||
return __getdelim (lineptr, n, '\n', stream);
|
||||
}
|
||||
|
||||
weak_alias (__getline, getline)
|
||||
|
@ -55,7 +55,7 @@ __readonly_area (const char *ptr, size_t size)
|
||||
|
||||
while (! __feof_unlocked (fp))
|
||||
{
|
||||
if (_IO_getdelim (&line, &linelen, '\n', fp) <= 0)
|
||||
if (__getdelim (&line, &linelen, '\n', fp) <= 0)
|
||||
break;
|
||||
|
||||
char *p;
|
||||
|
Loading…
Reference in New Issue
Block a user