public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] iconvconfig: Use the public feof_unlocked
@ 2021-07-02  9:42 Siddhesh Poyarekar
  2021-07-02 10:59 ` Szabolcs Nagy
  0 siblings, 1 reply; 2+ messages in thread
From: Siddhesh Poyarekar @ 2021-07-02  9:42 UTC (permalink / raw)
  To: libc-alpha; +Cc: Szabolcs Nagy

Build of iconvconfig failed with CFLAGS=-Os since __feof_unlocked is
not a public symbol.  Replace with feof_unlocked (defined to
__feof_unlocked when IS_IN (libc)) to fix this.

Reported-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
---
 iconv/gconv_parseconfdir.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/iconv/gconv_parseconfdir.h b/iconv/gconv_parseconfdir.h
index e73ea0ff5c..915b60845c 100644
--- a/iconv/gconv_parseconfdir.h
+++ b/iconv/gconv_parseconfdir.h
@@ -33,6 +33,7 @@
 # define closedir __closedir
 # define mempcpy __mempcpy
 # define lstat64 __lstat64
+# define feof_unlocked __feof_unlocked
 #endif
 
 /* Name of the file containing the module information in the directories
@@ -64,7 +65,7 @@ read_conf_file (const char *filename, const char *directory, size_t dir_len)
 
   /* Process the known entries of the file.  Comments start with `#' and
      end with the end of the line.  Empty lines are ignored.  */
-  while (!__feof_unlocked (fp))
+  while (!feof_unlocked (fp))
     {
       char *rp, *endp, *word;
       ssize_t n = __getdelim (&line, &line_len, '\n', fp);
-- 
2.31.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] iconvconfig: Use the public feof_unlocked
  2021-07-02  9:42 [PATCH] iconvconfig: Use the public feof_unlocked Siddhesh Poyarekar
@ 2021-07-02 10:59 ` Szabolcs Nagy
  0 siblings, 0 replies; 2+ messages in thread
From: Szabolcs Nagy @ 2021-07-02 10:59 UTC (permalink / raw)
  To: Siddhesh Poyarekar; +Cc: libc-alpha

The 07/02/2021 15:12, Siddhesh Poyarekar via Libc-alpha wrote:
> Build of iconvconfig failed with CFLAGS=-Os since __feof_unlocked is
> not a public symbol.  Replace with feof_unlocked (defined to
> __feof_unlocked when IS_IN (libc)) to fix this.
> 
> Reported-by: Szabolcs Nagy <szabolcs.nagy@arm.com>

Thanks, this looks right.

Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>

> ---
>  iconv/gconv_parseconfdir.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/iconv/gconv_parseconfdir.h b/iconv/gconv_parseconfdir.h
> index e73ea0ff5c..915b60845c 100644
> --- a/iconv/gconv_parseconfdir.h
> +++ b/iconv/gconv_parseconfdir.h
> @@ -33,6 +33,7 @@
>  # define closedir __closedir
>  # define mempcpy __mempcpy
>  # define lstat64 __lstat64
> +# define feof_unlocked __feof_unlocked
>  #endif
>  
>  /* Name of the file containing the module information in the directories
> @@ -64,7 +65,7 @@ read_conf_file (const char *filename, const char *directory, size_t dir_len)
>  
>    /* Process the known entries of the file.  Comments start with `#' and
>       end with the end of the line.  Empty lines are ignored.  */
> -  while (!__feof_unlocked (fp))
> +  while (!feof_unlocked (fp))
>      {
>        char *rp, *endp, *word;
>        ssize_t n = __getdelim (&line, &line_len, '\n', fp);
> -- 
> 2.31.1
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-02 10:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-02  9:42 [PATCH] iconvconfig: Use the public feof_unlocked Siddhesh Poyarekar
2021-07-02 10:59 ` Szabolcs Nagy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).