public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] stdio: Refactor getc_unlocked, putc_unlocked,  and fputc_unlocked
@ 2022-03-31 19:06 Adhemerval Zanella
  0 siblings, 0 replies; 12+ messages in thread
From: Adhemerval Zanella @ 2022-03-31 19:06 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bcd7be83aa3f2437a91c03890009139bb22cd399

commit bcd7be83aa3f2437a91c03890009139bb22cd399
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Mar 14 15:34:50 2022 -0300

    stdio: Refactor getc_unlocked, putc_unlocked, and fputc_unlocked

Diff:
---
 include/stdio.h | 13 ++++---------
 libio/fputc_u.c |  1 -
 libio/getc_u.c  |  7 +++----
 libio/putc_u.c  |  5 ++---
 4 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/include/stdio.h b/include/stdio.h
index edb8f12e8a..421eb1f2af 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -169,7 +169,6 @@ extern void __funlockfile (FILE *__stream) attribute_hidden;
    possible.  */
 extern int __ftrylockfile (FILE *__stream);
 
-extern int __getc_unlocked (FILE *__fp) attribute_hidden;
 extern wint_t __getwc_unlocked (FILE *__fp);
 
 extern int __fxprintf (FILE *__fp, const char *__fmt, ...)
@@ -243,10 +242,8 @@ extern __typeof (fputs_unlocked) __fputs_unlocked;
 libc_hidden_proto (__fputs_unlocked)
 extern __typeof (feof_unlocked) __libc_feof_unlocked;
 extern __typeof (ferror_unlocked) __libc_ferror_unlocked;
-libc_hidden_proto (getc_unlocked)
-libc_hidden_proto (fputc_unlocked)
-libc_hidden_proto (putc_unlocked)
-extern __typeof (putc_unlocked) __putc_unlocked attribute_hidden;
+extern __typeof (getc_unlocked) __libc_getc_unlocked;
+extern __typeof (putc_unlocked) __libc_putc_unlocked;
 libc_hidden_proto (fmemopen)
 /* The prototype needs repeating instead of using __typeof to use
    __THROW in C++ tests.  */
@@ -274,19 +271,17 @@ __ferror_unlocked (FILE *__stream)
   return __ferror_unlocked_body (__stream);
 }
 
-#  ifdef __USE_EXTERN_INLINES
-__extern_inline int
+static inline int
 __getc_unlocked (FILE *__fp)
 {
   return __getc_unlocked_body (__fp);
 }
 
-__extern_inline int
+static inline int
 __putc_unlocked (int __c, FILE *__stream)
 {
   return __putc_unlocked_body (__c, __stream);
 }
-#  endif
 
 extern __typeof (renameat) __renameat;
 libc_hidden_proto (__renameat)
diff --git a/libio/fputc_u.c b/libio/fputc_u.c
index a479c8bf23..0d5998a728 100644
--- a/libio/fputc_u.c
+++ b/libio/fputc_u.c
@@ -35,4 +35,3 @@ fputc_unlocked (int c, FILE *fp)
   CHECK_FILE (fp, EOF);
   return _IO_putc_unlocked (c, fp);
 }
-libc_hidden_def (fputc_unlocked)
diff --git a/libio/getc_u.c b/libio/getc_u.c
index 6757a1795e..e53ef66735 100644
--- a/libio/getc_u.c
+++ b/libio/getc_u.c
@@ -30,12 +30,11 @@
 #undef getc_unlocked
 
 int
-__getc_unlocked (FILE *fp)
+__libc_getc_unlocked (FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_getc_unlocked (fp);
 }
 
-weak_alias (__getc_unlocked, getc_unlocked)
-libc_hidden_weak (getc_unlocked)
-weak_alias (__getc_unlocked, fgetc_unlocked)
+weak_alias (__libc_getc_unlocked, getc_unlocked)
+weak_alias (__libc_getc_unlocked, fgetc_unlocked)
diff --git a/libio/putc_u.c b/libio/putc_u.c
index e518685ca2..c6936b57bc 100644
--- a/libio/putc_u.c
+++ b/libio/putc_u.c
@@ -21,10 +21,9 @@
 #undef putc_unlocked
 
 int
-__putc_unlocked (int c, FILE *fp)
+__libc_putc_unlocked (int c, FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_putc_unlocked (c, fp);
 }
-weak_alias (__putc_unlocked, putc_unlocked)
-libc_hidden_weak (putc_unlocked)
+weak_alias (__libc_putc_unlocked, putc_unlocked)


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

* [glibc/azanella/clang] stdio: Refactor getc_unlocked, putc_unlocked,  and fputc_unlocked
@ 2022-06-09 21:20 Adhemerval Zanella
  0 siblings, 0 replies; 12+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 21:20 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e771c8025b09465370a56814740469b0d8d993dc

commit e771c8025b09465370a56814740469b0d8d993dc
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Mar 14 15:34:50 2022 -0300

    stdio: Refactor getc_unlocked, putc_unlocked, and fputc_unlocked

Diff:
---
 include/stdio.h | 13 ++++---------
 libio/fputc_u.c |  1 -
 libio/getc_u.c  |  7 +++----
 libio/putc_u.c  |  5 ++---
 4 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/include/stdio.h b/include/stdio.h
index f1e388523b..561c9b14bb 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -169,7 +169,6 @@ extern void __funlockfile (FILE *__stream) attribute_hidden;
    possible.  */
 extern int __ftrylockfile (FILE *__stream);
 
-extern int __getc_unlocked (FILE *__fp) attribute_hidden;
 extern wint_t __getwc_unlocked (FILE *__fp);
 
 extern int __fxprintf (FILE *__fp, const char *__fmt, ...)
@@ -244,10 +243,8 @@ extern __typeof (fputs_unlocked) __fputs_unlocked;
 libc_hidden_proto (__fputs_unlocked)
 extern __typeof (feof_unlocked) __libc_feof_unlocked;
 extern __typeof (ferror_unlocked) __libc_ferror_unlocked;
-libc_hidden_proto (getc_unlocked)
-libc_hidden_proto (fputc_unlocked)
-libc_hidden_proto (putc_unlocked)
-extern __typeof (putc_unlocked) __putc_unlocked attribute_hidden;
+extern __typeof (getc_unlocked) __libc_getc_unlocked;
+extern __typeof (putc_unlocked) __libc_putc_unlocked;
 libc_hidden_proto (fmemopen)
 /* The prototype needs repeating instead of using __typeof to use
    __THROW in C++ tests.  */
@@ -275,19 +272,17 @@ __ferror_unlocked (FILE *__stream)
   return __ferror_unlocked_body (__stream);
 }
 
-#  ifdef __USE_EXTERN_INLINES
-__extern_inline int
+static inline int
 __getc_unlocked (FILE *__fp)
 {
   return __getc_unlocked_body (__fp);
 }
 
-__extern_inline int
+static inline int
 __putc_unlocked (int __c, FILE *__stream)
 {
   return __putc_unlocked_body (__c, __stream);
 }
-#  endif
 
 extern __typeof (renameat) __renameat;
 libc_hidden_proto (__renameat)
diff --git a/libio/fputc_u.c b/libio/fputc_u.c
index a479c8bf23..0d5998a728 100644
--- a/libio/fputc_u.c
+++ b/libio/fputc_u.c
@@ -35,4 +35,3 @@ fputc_unlocked (int c, FILE *fp)
   CHECK_FILE (fp, EOF);
   return _IO_putc_unlocked (c, fp);
 }
-libc_hidden_def (fputc_unlocked)
diff --git a/libio/getc_u.c b/libio/getc_u.c
index 6757a1795e..e53ef66735 100644
--- a/libio/getc_u.c
+++ b/libio/getc_u.c
@@ -30,12 +30,11 @@
 #undef getc_unlocked
 
 int
-__getc_unlocked (FILE *fp)
+__libc_getc_unlocked (FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_getc_unlocked (fp);
 }
 
-weak_alias (__getc_unlocked, getc_unlocked)
-libc_hidden_weak (getc_unlocked)
-weak_alias (__getc_unlocked, fgetc_unlocked)
+weak_alias (__libc_getc_unlocked, getc_unlocked)
+weak_alias (__libc_getc_unlocked, fgetc_unlocked)
diff --git a/libio/putc_u.c b/libio/putc_u.c
index e518685ca2..c6936b57bc 100644
--- a/libio/putc_u.c
+++ b/libio/putc_u.c
@@ -21,10 +21,9 @@
 #undef putc_unlocked
 
 int
-__putc_unlocked (int c, FILE *fp)
+__libc_putc_unlocked (int c, FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_putc_unlocked (c, fp);
 }
-weak_alias (__putc_unlocked, putc_unlocked)
-libc_hidden_weak (putc_unlocked)
+weak_alias (__libc_putc_unlocked, putc_unlocked)


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

* [glibc/azanella/clang] stdio: Refactor getc_unlocked, putc_unlocked,  and fputc_unlocked
@ 2022-06-09 13:16 Adhemerval Zanella
  0 siblings, 0 replies; 12+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 13:16 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e771c8025b09465370a56814740469b0d8d993dc

commit e771c8025b09465370a56814740469b0d8d993dc
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Mar 14 15:34:50 2022 -0300

    stdio: Refactor getc_unlocked, putc_unlocked, and fputc_unlocked

Diff:
---
 include/stdio.h | 13 ++++---------
 libio/fputc_u.c |  1 -
 libio/getc_u.c  |  7 +++----
 libio/putc_u.c  |  5 ++---
 4 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/include/stdio.h b/include/stdio.h
index f1e388523b..561c9b14bb 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -169,7 +169,6 @@ extern void __funlockfile (FILE *__stream) attribute_hidden;
    possible.  */
 extern int __ftrylockfile (FILE *__stream);
 
-extern int __getc_unlocked (FILE *__fp) attribute_hidden;
 extern wint_t __getwc_unlocked (FILE *__fp);
 
 extern int __fxprintf (FILE *__fp, const char *__fmt, ...)
@@ -244,10 +243,8 @@ extern __typeof (fputs_unlocked) __fputs_unlocked;
 libc_hidden_proto (__fputs_unlocked)
 extern __typeof (feof_unlocked) __libc_feof_unlocked;
 extern __typeof (ferror_unlocked) __libc_ferror_unlocked;
-libc_hidden_proto (getc_unlocked)
-libc_hidden_proto (fputc_unlocked)
-libc_hidden_proto (putc_unlocked)
-extern __typeof (putc_unlocked) __putc_unlocked attribute_hidden;
+extern __typeof (getc_unlocked) __libc_getc_unlocked;
+extern __typeof (putc_unlocked) __libc_putc_unlocked;
 libc_hidden_proto (fmemopen)
 /* The prototype needs repeating instead of using __typeof to use
    __THROW in C++ tests.  */
@@ -275,19 +272,17 @@ __ferror_unlocked (FILE *__stream)
   return __ferror_unlocked_body (__stream);
 }
 
-#  ifdef __USE_EXTERN_INLINES
-__extern_inline int
+static inline int
 __getc_unlocked (FILE *__fp)
 {
   return __getc_unlocked_body (__fp);
 }
 
-__extern_inline int
+static inline int
 __putc_unlocked (int __c, FILE *__stream)
 {
   return __putc_unlocked_body (__c, __stream);
 }
-#  endif
 
 extern __typeof (renameat) __renameat;
 libc_hidden_proto (__renameat)
diff --git a/libio/fputc_u.c b/libio/fputc_u.c
index a479c8bf23..0d5998a728 100644
--- a/libio/fputc_u.c
+++ b/libio/fputc_u.c
@@ -35,4 +35,3 @@ fputc_unlocked (int c, FILE *fp)
   CHECK_FILE (fp, EOF);
   return _IO_putc_unlocked (c, fp);
 }
-libc_hidden_def (fputc_unlocked)
diff --git a/libio/getc_u.c b/libio/getc_u.c
index 6757a1795e..e53ef66735 100644
--- a/libio/getc_u.c
+++ b/libio/getc_u.c
@@ -30,12 +30,11 @@
 #undef getc_unlocked
 
 int
-__getc_unlocked (FILE *fp)
+__libc_getc_unlocked (FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_getc_unlocked (fp);
 }
 
-weak_alias (__getc_unlocked, getc_unlocked)
-libc_hidden_weak (getc_unlocked)
-weak_alias (__getc_unlocked, fgetc_unlocked)
+weak_alias (__libc_getc_unlocked, getc_unlocked)
+weak_alias (__libc_getc_unlocked, fgetc_unlocked)
diff --git a/libio/putc_u.c b/libio/putc_u.c
index e518685ca2..c6936b57bc 100644
--- a/libio/putc_u.c
+++ b/libio/putc_u.c
@@ -21,10 +21,9 @@
 #undef putc_unlocked
 
 int
-__putc_unlocked (int c, FILE *fp)
+__libc_putc_unlocked (int c, FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_putc_unlocked (c, fp);
 }
-weak_alias (__putc_unlocked, putc_unlocked)
-libc_hidden_weak (putc_unlocked)
+weak_alias (__libc_putc_unlocked, putc_unlocked)


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

* [glibc/azanella/clang] stdio: Refactor getc_unlocked, putc_unlocked,  and fputc_unlocked
@ 2022-06-03 14:06 Adhemerval Zanella
  0 siblings, 0 replies; 12+ messages in thread
From: Adhemerval Zanella @ 2022-06-03 14:06 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3cc55214632f39ec88130779b80ef4ba7bfbdd37

commit 3cc55214632f39ec88130779b80ef4ba7bfbdd37
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Mar 14 15:34:50 2022 -0300

    stdio: Refactor getc_unlocked, putc_unlocked, and fputc_unlocked

Diff:
---
 include/stdio.h | 13 ++++---------
 libio/fputc_u.c |  1 -
 libio/getc_u.c  |  7 +++----
 libio/putc_u.c  |  5 ++---
 4 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/include/stdio.h b/include/stdio.h
index f1e388523b..561c9b14bb 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -169,7 +169,6 @@ extern void __funlockfile (FILE *__stream) attribute_hidden;
    possible.  */
 extern int __ftrylockfile (FILE *__stream);
 
-extern int __getc_unlocked (FILE *__fp) attribute_hidden;
 extern wint_t __getwc_unlocked (FILE *__fp);
 
 extern int __fxprintf (FILE *__fp, const char *__fmt, ...)
@@ -244,10 +243,8 @@ extern __typeof (fputs_unlocked) __fputs_unlocked;
 libc_hidden_proto (__fputs_unlocked)
 extern __typeof (feof_unlocked) __libc_feof_unlocked;
 extern __typeof (ferror_unlocked) __libc_ferror_unlocked;
-libc_hidden_proto (getc_unlocked)
-libc_hidden_proto (fputc_unlocked)
-libc_hidden_proto (putc_unlocked)
-extern __typeof (putc_unlocked) __putc_unlocked attribute_hidden;
+extern __typeof (getc_unlocked) __libc_getc_unlocked;
+extern __typeof (putc_unlocked) __libc_putc_unlocked;
 libc_hidden_proto (fmemopen)
 /* The prototype needs repeating instead of using __typeof to use
    __THROW in C++ tests.  */
@@ -275,19 +272,17 @@ __ferror_unlocked (FILE *__stream)
   return __ferror_unlocked_body (__stream);
 }
 
-#  ifdef __USE_EXTERN_INLINES
-__extern_inline int
+static inline int
 __getc_unlocked (FILE *__fp)
 {
   return __getc_unlocked_body (__fp);
 }
 
-__extern_inline int
+static inline int
 __putc_unlocked (int __c, FILE *__stream)
 {
   return __putc_unlocked_body (__c, __stream);
 }
-#  endif
 
 extern __typeof (renameat) __renameat;
 libc_hidden_proto (__renameat)
diff --git a/libio/fputc_u.c b/libio/fputc_u.c
index a479c8bf23..0d5998a728 100644
--- a/libio/fputc_u.c
+++ b/libio/fputc_u.c
@@ -35,4 +35,3 @@ fputc_unlocked (int c, FILE *fp)
   CHECK_FILE (fp, EOF);
   return _IO_putc_unlocked (c, fp);
 }
-libc_hidden_def (fputc_unlocked)
diff --git a/libio/getc_u.c b/libio/getc_u.c
index 6757a1795e..e53ef66735 100644
--- a/libio/getc_u.c
+++ b/libio/getc_u.c
@@ -30,12 +30,11 @@
 #undef getc_unlocked
 
 int
-__getc_unlocked (FILE *fp)
+__libc_getc_unlocked (FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_getc_unlocked (fp);
 }
 
-weak_alias (__getc_unlocked, getc_unlocked)
-libc_hidden_weak (getc_unlocked)
-weak_alias (__getc_unlocked, fgetc_unlocked)
+weak_alias (__libc_getc_unlocked, getc_unlocked)
+weak_alias (__libc_getc_unlocked, fgetc_unlocked)
diff --git a/libio/putc_u.c b/libio/putc_u.c
index e518685ca2..c6936b57bc 100644
--- a/libio/putc_u.c
+++ b/libio/putc_u.c
@@ -21,10 +21,9 @@
 #undef putc_unlocked
 
 int
-__putc_unlocked (int c, FILE *fp)
+__libc_putc_unlocked (int c, FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_putc_unlocked (c, fp);
 }
-weak_alias (__putc_unlocked, putc_unlocked)
-libc_hidden_weak (putc_unlocked)
+weak_alias (__libc_putc_unlocked, putc_unlocked)


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

* [glibc/azanella/clang] stdio: Refactor getc_unlocked, putc_unlocked,  and fputc_unlocked
@ 2022-05-13 14:20 Adhemerval Zanella
  0 siblings, 0 replies; 12+ messages in thread
From: Adhemerval Zanella @ 2022-05-13 14:20 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=06567e8730f43fd449d698091d3c2ee59fa2777b

commit 06567e8730f43fd449d698091d3c2ee59fa2777b
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Mar 14 15:34:50 2022 -0300

    stdio: Refactor getc_unlocked, putc_unlocked, and fputc_unlocked

Diff:
---
 include/stdio.h | 13 ++++---------
 libio/fputc_u.c |  1 -
 libio/getc_u.c  |  7 +++----
 libio/putc_u.c  |  5 ++---
 4 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/include/stdio.h b/include/stdio.h
index f1e388523b..561c9b14bb 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -169,7 +169,6 @@ extern void __funlockfile (FILE *__stream) attribute_hidden;
    possible.  */
 extern int __ftrylockfile (FILE *__stream);
 
-extern int __getc_unlocked (FILE *__fp) attribute_hidden;
 extern wint_t __getwc_unlocked (FILE *__fp);
 
 extern int __fxprintf (FILE *__fp, const char *__fmt, ...)
@@ -244,10 +243,8 @@ extern __typeof (fputs_unlocked) __fputs_unlocked;
 libc_hidden_proto (__fputs_unlocked)
 extern __typeof (feof_unlocked) __libc_feof_unlocked;
 extern __typeof (ferror_unlocked) __libc_ferror_unlocked;
-libc_hidden_proto (getc_unlocked)
-libc_hidden_proto (fputc_unlocked)
-libc_hidden_proto (putc_unlocked)
-extern __typeof (putc_unlocked) __putc_unlocked attribute_hidden;
+extern __typeof (getc_unlocked) __libc_getc_unlocked;
+extern __typeof (putc_unlocked) __libc_putc_unlocked;
 libc_hidden_proto (fmemopen)
 /* The prototype needs repeating instead of using __typeof to use
    __THROW in C++ tests.  */
@@ -275,19 +272,17 @@ __ferror_unlocked (FILE *__stream)
   return __ferror_unlocked_body (__stream);
 }
 
-#  ifdef __USE_EXTERN_INLINES
-__extern_inline int
+static inline int
 __getc_unlocked (FILE *__fp)
 {
   return __getc_unlocked_body (__fp);
 }
 
-__extern_inline int
+static inline int
 __putc_unlocked (int __c, FILE *__stream)
 {
   return __putc_unlocked_body (__c, __stream);
 }
-#  endif
 
 extern __typeof (renameat) __renameat;
 libc_hidden_proto (__renameat)
diff --git a/libio/fputc_u.c b/libio/fputc_u.c
index a479c8bf23..0d5998a728 100644
--- a/libio/fputc_u.c
+++ b/libio/fputc_u.c
@@ -35,4 +35,3 @@ fputc_unlocked (int c, FILE *fp)
   CHECK_FILE (fp, EOF);
   return _IO_putc_unlocked (c, fp);
 }
-libc_hidden_def (fputc_unlocked)
diff --git a/libio/getc_u.c b/libio/getc_u.c
index 6757a1795e..e53ef66735 100644
--- a/libio/getc_u.c
+++ b/libio/getc_u.c
@@ -30,12 +30,11 @@
 #undef getc_unlocked
 
 int
-__getc_unlocked (FILE *fp)
+__libc_getc_unlocked (FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_getc_unlocked (fp);
 }
 
-weak_alias (__getc_unlocked, getc_unlocked)
-libc_hidden_weak (getc_unlocked)
-weak_alias (__getc_unlocked, fgetc_unlocked)
+weak_alias (__libc_getc_unlocked, getc_unlocked)
+weak_alias (__libc_getc_unlocked, fgetc_unlocked)
diff --git a/libio/putc_u.c b/libio/putc_u.c
index e518685ca2..c6936b57bc 100644
--- a/libio/putc_u.c
+++ b/libio/putc_u.c
@@ -21,10 +21,9 @@
 #undef putc_unlocked
 
 int
-__putc_unlocked (int c, FILE *fp)
+__libc_putc_unlocked (int c, FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_putc_unlocked (c, fp);
 }
-weak_alias (__putc_unlocked, putc_unlocked)
-libc_hidden_weak (putc_unlocked)
+weak_alias (__libc_putc_unlocked, putc_unlocked)


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

* [glibc/azanella/clang] stdio: Refactor getc_unlocked, putc_unlocked,  and fputc_unlocked
@ 2022-05-12 19:33 Adhemerval Zanella
  0 siblings, 0 replies; 12+ messages in thread
From: Adhemerval Zanella @ 2022-05-12 19:33 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b2c6aa55b2da238e94db937caccb1dec0f6aaf27

commit b2c6aa55b2da238e94db937caccb1dec0f6aaf27
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Mar 14 15:34:50 2022 -0300

    stdio: Refactor getc_unlocked, putc_unlocked, and fputc_unlocked

Diff:
---
 include/stdio.h | 13 ++++---------
 libio/fputc_u.c |  1 -
 libio/getc_u.c  |  7 +++----
 libio/putc_u.c  |  5 ++---
 4 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/include/stdio.h b/include/stdio.h
index f1e388523b..561c9b14bb 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -169,7 +169,6 @@ extern void __funlockfile (FILE *__stream) attribute_hidden;
    possible.  */
 extern int __ftrylockfile (FILE *__stream);
 
-extern int __getc_unlocked (FILE *__fp) attribute_hidden;
 extern wint_t __getwc_unlocked (FILE *__fp);
 
 extern int __fxprintf (FILE *__fp, const char *__fmt, ...)
@@ -244,10 +243,8 @@ extern __typeof (fputs_unlocked) __fputs_unlocked;
 libc_hidden_proto (__fputs_unlocked)
 extern __typeof (feof_unlocked) __libc_feof_unlocked;
 extern __typeof (ferror_unlocked) __libc_ferror_unlocked;
-libc_hidden_proto (getc_unlocked)
-libc_hidden_proto (fputc_unlocked)
-libc_hidden_proto (putc_unlocked)
-extern __typeof (putc_unlocked) __putc_unlocked attribute_hidden;
+extern __typeof (getc_unlocked) __libc_getc_unlocked;
+extern __typeof (putc_unlocked) __libc_putc_unlocked;
 libc_hidden_proto (fmemopen)
 /* The prototype needs repeating instead of using __typeof to use
    __THROW in C++ tests.  */
@@ -275,19 +272,17 @@ __ferror_unlocked (FILE *__stream)
   return __ferror_unlocked_body (__stream);
 }
 
-#  ifdef __USE_EXTERN_INLINES
-__extern_inline int
+static inline int
 __getc_unlocked (FILE *__fp)
 {
   return __getc_unlocked_body (__fp);
 }
 
-__extern_inline int
+static inline int
 __putc_unlocked (int __c, FILE *__stream)
 {
   return __putc_unlocked_body (__c, __stream);
 }
-#  endif
 
 extern __typeof (renameat) __renameat;
 libc_hidden_proto (__renameat)
diff --git a/libio/fputc_u.c b/libio/fputc_u.c
index a479c8bf23..0d5998a728 100644
--- a/libio/fputc_u.c
+++ b/libio/fputc_u.c
@@ -35,4 +35,3 @@ fputc_unlocked (int c, FILE *fp)
   CHECK_FILE (fp, EOF);
   return _IO_putc_unlocked (c, fp);
 }
-libc_hidden_def (fputc_unlocked)
diff --git a/libio/getc_u.c b/libio/getc_u.c
index 6757a1795e..e53ef66735 100644
--- a/libio/getc_u.c
+++ b/libio/getc_u.c
@@ -30,12 +30,11 @@
 #undef getc_unlocked
 
 int
-__getc_unlocked (FILE *fp)
+__libc_getc_unlocked (FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_getc_unlocked (fp);
 }
 
-weak_alias (__getc_unlocked, getc_unlocked)
-libc_hidden_weak (getc_unlocked)
-weak_alias (__getc_unlocked, fgetc_unlocked)
+weak_alias (__libc_getc_unlocked, getc_unlocked)
+weak_alias (__libc_getc_unlocked, fgetc_unlocked)
diff --git a/libio/putc_u.c b/libio/putc_u.c
index e518685ca2..c6936b57bc 100644
--- a/libio/putc_u.c
+++ b/libio/putc_u.c
@@ -21,10 +21,9 @@
 #undef putc_unlocked
 
 int
-__putc_unlocked (int c, FILE *fp)
+__libc_putc_unlocked (int c, FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_putc_unlocked (c, fp);
 }
-weak_alias (__putc_unlocked, putc_unlocked)
-libc_hidden_weak (putc_unlocked)
+weak_alias (__libc_putc_unlocked, putc_unlocked)


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

* [glibc/azanella/clang] stdio: Refactor getc_unlocked, putc_unlocked,  and fputc_unlocked
@ 2022-05-10 18:24 Adhemerval Zanella
  0 siblings, 0 replies; 12+ messages in thread
From: Adhemerval Zanella @ 2022-05-10 18:24 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0ca6c5564702c910f21e3599c7578f343bf5f8c2

commit 0ca6c5564702c910f21e3599c7578f343bf5f8c2
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Mar 14 15:34:50 2022 -0300

    stdio: Refactor getc_unlocked, putc_unlocked, and fputc_unlocked

Diff:
---
 include/stdio.h | 13 ++++---------
 libio/fputc_u.c |  1 -
 libio/getc_u.c  |  7 +++----
 libio/putc_u.c  |  5 ++---
 4 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/include/stdio.h b/include/stdio.h
index f1e388523b..561c9b14bb 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -169,7 +169,6 @@ extern void __funlockfile (FILE *__stream) attribute_hidden;
    possible.  */
 extern int __ftrylockfile (FILE *__stream);
 
-extern int __getc_unlocked (FILE *__fp) attribute_hidden;
 extern wint_t __getwc_unlocked (FILE *__fp);
 
 extern int __fxprintf (FILE *__fp, const char *__fmt, ...)
@@ -244,10 +243,8 @@ extern __typeof (fputs_unlocked) __fputs_unlocked;
 libc_hidden_proto (__fputs_unlocked)
 extern __typeof (feof_unlocked) __libc_feof_unlocked;
 extern __typeof (ferror_unlocked) __libc_ferror_unlocked;
-libc_hidden_proto (getc_unlocked)
-libc_hidden_proto (fputc_unlocked)
-libc_hidden_proto (putc_unlocked)
-extern __typeof (putc_unlocked) __putc_unlocked attribute_hidden;
+extern __typeof (getc_unlocked) __libc_getc_unlocked;
+extern __typeof (putc_unlocked) __libc_putc_unlocked;
 libc_hidden_proto (fmemopen)
 /* The prototype needs repeating instead of using __typeof to use
    __THROW in C++ tests.  */
@@ -275,19 +272,17 @@ __ferror_unlocked (FILE *__stream)
   return __ferror_unlocked_body (__stream);
 }
 
-#  ifdef __USE_EXTERN_INLINES
-__extern_inline int
+static inline int
 __getc_unlocked (FILE *__fp)
 {
   return __getc_unlocked_body (__fp);
 }
 
-__extern_inline int
+static inline int
 __putc_unlocked (int __c, FILE *__stream)
 {
   return __putc_unlocked_body (__c, __stream);
 }
-#  endif
 
 extern __typeof (renameat) __renameat;
 libc_hidden_proto (__renameat)
diff --git a/libio/fputc_u.c b/libio/fputc_u.c
index a479c8bf23..0d5998a728 100644
--- a/libio/fputc_u.c
+++ b/libio/fputc_u.c
@@ -35,4 +35,3 @@ fputc_unlocked (int c, FILE *fp)
   CHECK_FILE (fp, EOF);
   return _IO_putc_unlocked (c, fp);
 }
-libc_hidden_def (fputc_unlocked)
diff --git a/libio/getc_u.c b/libio/getc_u.c
index 6757a1795e..e53ef66735 100644
--- a/libio/getc_u.c
+++ b/libio/getc_u.c
@@ -30,12 +30,11 @@
 #undef getc_unlocked
 
 int
-__getc_unlocked (FILE *fp)
+__libc_getc_unlocked (FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_getc_unlocked (fp);
 }
 
-weak_alias (__getc_unlocked, getc_unlocked)
-libc_hidden_weak (getc_unlocked)
-weak_alias (__getc_unlocked, fgetc_unlocked)
+weak_alias (__libc_getc_unlocked, getc_unlocked)
+weak_alias (__libc_getc_unlocked, fgetc_unlocked)
diff --git a/libio/putc_u.c b/libio/putc_u.c
index e518685ca2..c6936b57bc 100644
--- a/libio/putc_u.c
+++ b/libio/putc_u.c
@@ -21,10 +21,9 @@
 #undef putc_unlocked
 
 int
-__putc_unlocked (int c, FILE *fp)
+__libc_putc_unlocked (int c, FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_putc_unlocked (c, fp);
 }
-weak_alias (__putc_unlocked, putc_unlocked)
-libc_hidden_weak (putc_unlocked)
+weak_alias (__libc_putc_unlocked, putc_unlocked)


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

* [glibc/azanella/clang] stdio: Refactor getc_unlocked, putc_unlocked,  and fputc_unlocked
@ 2022-04-29 14:04 Adhemerval Zanella
  0 siblings, 0 replies; 12+ messages in thread
From: Adhemerval Zanella @ 2022-04-29 14:04 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5d928a8c98ff63afe9ef5a6d5d1521cefb482b94

commit 5d928a8c98ff63afe9ef5a6d5d1521cefb482b94
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Mar 14 15:34:50 2022 -0300

    stdio: Refactor getc_unlocked, putc_unlocked, and fputc_unlocked

Diff:
---
 include/stdio.h | 13 ++++---------
 libio/fputc_u.c |  1 -
 libio/getc_u.c  |  7 +++----
 libio/putc_u.c  |  5 ++---
 4 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/include/stdio.h b/include/stdio.h
index f1e388523b..561c9b14bb 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -169,7 +169,6 @@ extern void __funlockfile (FILE *__stream) attribute_hidden;
    possible.  */
 extern int __ftrylockfile (FILE *__stream);
 
-extern int __getc_unlocked (FILE *__fp) attribute_hidden;
 extern wint_t __getwc_unlocked (FILE *__fp);
 
 extern int __fxprintf (FILE *__fp, const char *__fmt, ...)
@@ -244,10 +243,8 @@ extern __typeof (fputs_unlocked) __fputs_unlocked;
 libc_hidden_proto (__fputs_unlocked)
 extern __typeof (feof_unlocked) __libc_feof_unlocked;
 extern __typeof (ferror_unlocked) __libc_ferror_unlocked;
-libc_hidden_proto (getc_unlocked)
-libc_hidden_proto (fputc_unlocked)
-libc_hidden_proto (putc_unlocked)
-extern __typeof (putc_unlocked) __putc_unlocked attribute_hidden;
+extern __typeof (getc_unlocked) __libc_getc_unlocked;
+extern __typeof (putc_unlocked) __libc_putc_unlocked;
 libc_hidden_proto (fmemopen)
 /* The prototype needs repeating instead of using __typeof to use
    __THROW in C++ tests.  */
@@ -275,19 +272,17 @@ __ferror_unlocked (FILE *__stream)
   return __ferror_unlocked_body (__stream);
 }
 
-#  ifdef __USE_EXTERN_INLINES
-__extern_inline int
+static inline int
 __getc_unlocked (FILE *__fp)
 {
   return __getc_unlocked_body (__fp);
 }
 
-__extern_inline int
+static inline int
 __putc_unlocked (int __c, FILE *__stream)
 {
   return __putc_unlocked_body (__c, __stream);
 }
-#  endif
 
 extern __typeof (renameat) __renameat;
 libc_hidden_proto (__renameat)
diff --git a/libio/fputc_u.c b/libio/fputc_u.c
index a479c8bf23..0d5998a728 100644
--- a/libio/fputc_u.c
+++ b/libio/fputc_u.c
@@ -35,4 +35,3 @@ fputc_unlocked (int c, FILE *fp)
   CHECK_FILE (fp, EOF);
   return _IO_putc_unlocked (c, fp);
 }
-libc_hidden_def (fputc_unlocked)
diff --git a/libio/getc_u.c b/libio/getc_u.c
index 6757a1795e..e53ef66735 100644
--- a/libio/getc_u.c
+++ b/libio/getc_u.c
@@ -30,12 +30,11 @@
 #undef getc_unlocked
 
 int
-__getc_unlocked (FILE *fp)
+__libc_getc_unlocked (FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_getc_unlocked (fp);
 }
 
-weak_alias (__getc_unlocked, getc_unlocked)
-libc_hidden_weak (getc_unlocked)
-weak_alias (__getc_unlocked, fgetc_unlocked)
+weak_alias (__libc_getc_unlocked, getc_unlocked)
+weak_alias (__libc_getc_unlocked, fgetc_unlocked)
diff --git a/libio/putc_u.c b/libio/putc_u.c
index e518685ca2..c6936b57bc 100644
--- a/libio/putc_u.c
+++ b/libio/putc_u.c
@@ -21,10 +21,9 @@
 #undef putc_unlocked
 
 int
-__putc_unlocked (int c, FILE *fp)
+__libc_putc_unlocked (int c, FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_putc_unlocked (c, fp);
 }
-weak_alias (__putc_unlocked, putc_unlocked)
-libc_hidden_weak (putc_unlocked)
+weak_alias (__libc_putc_unlocked, putc_unlocked)


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

* [glibc/azanella/clang] stdio: Refactor getc_unlocked, putc_unlocked,  and fputc_unlocked
@ 2022-04-04 12:54 Adhemerval Zanella
  0 siblings, 0 replies; 12+ messages in thread
From: Adhemerval Zanella @ 2022-04-04 12:54 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9a2b07052ba7f669d8a043b65d1266553b1780f9

commit 9a2b07052ba7f669d8a043b65d1266553b1780f9
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Mar 14 15:34:50 2022 -0300

    stdio: Refactor getc_unlocked, putc_unlocked, and fputc_unlocked

Diff:
---
 include/stdio.h | 13 ++++---------
 libio/fputc_u.c |  1 -
 libio/getc_u.c  |  7 +++----
 libio/putc_u.c  |  5 ++---
 4 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/include/stdio.h b/include/stdio.h
index edb8f12e8a..421eb1f2af 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -169,7 +169,6 @@ extern void __funlockfile (FILE *__stream) attribute_hidden;
    possible.  */
 extern int __ftrylockfile (FILE *__stream);
 
-extern int __getc_unlocked (FILE *__fp) attribute_hidden;
 extern wint_t __getwc_unlocked (FILE *__fp);
 
 extern int __fxprintf (FILE *__fp, const char *__fmt, ...)
@@ -243,10 +242,8 @@ extern __typeof (fputs_unlocked) __fputs_unlocked;
 libc_hidden_proto (__fputs_unlocked)
 extern __typeof (feof_unlocked) __libc_feof_unlocked;
 extern __typeof (ferror_unlocked) __libc_ferror_unlocked;
-libc_hidden_proto (getc_unlocked)
-libc_hidden_proto (fputc_unlocked)
-libc_hidden_proto (putc_unlocked)
-extern __typeof (putc_unlocked) __putc_unlocked attribute_hidden;
+extern __typeof (getc_unlocked) __libc_getc_unlocked;
+extern __typeof (putc_unlocked) __libc_putc_unlocked;
 libc_hidden_proto (fmemopen)
 /* The prototype needs repeating instead of using __typeof to use
    __THROW in C++ tests.  */
@@ -274,19 +271,17 @@ __ferror_unlocked (FILE *__stream)
   return __ferror_unlocked_body (__stream);
 }
 
-#  ifdef __USE_EXTERN_INLINES
-__extern_inline int
+static inline int
 __getc_unlocked (FILE *__fp)
 {
   return __getc_unlocked_body (__fp);
 }
 
-__extern_inline int
+static inline int
 __putc_unlocked (int __c, FILE *__stream)
 {
   return __putc_unlocked_body (__c, __stream);
 }
-#  endif
 
 extern __typeof (renameat) __renameat;
 libc_hidden_proto (__renameat)
diff --git a/libio/fputc_u.c b/libio/fputc_u.c
index a479c8bf23..0d5998a728 100644
--- a/libio/fputc_u.c
+++ b/libio/fputc_u.c
@@ -35,4 +35,3 @@ fputc_unlocked (int c, FILE *fp)
   CHECK_FILE (fp, EOF);
   return _IO_putc_unlocked (c, fp);
 }
-libc_hidden_def (fputc_unlocked)
diff --git a/libio/getc_u.c b/libio/getc_u.c
index 6757a1795e..e53ef66735 100644
--- a/libio/getc_u.c
+++ b/libio/getc_u.c
@@ -30,12 +30,11 @@
 #undef getc_unlocked
 
 int
-__getc_unlocked (FILE *fp)
+__libc_getc_unlocked (FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_getc_unlocked (fp);
 }
 
-weak_alias (__getc_unlocked, getc_unlocked)
-libc_hidden_weak (getc_unlocked)
-weak_alias (__getc_unlocked, fgetc_unlocked)
+weak_alias (__libc_getc_unlocked, getc_unlocked)
+weak_alias (__libc_getc_unlocked, fgetc_unlocked)
diff --git a/libio/putc_u.c b/libio/putc_u.c
index e518685ca2..c6936b57bc 100644
--- a/libio/putc_u.c
+++ b/libio/putc_u.c
@@ -21,10 +21,9 @@
 #undef putc_unlocked
 
 int
-__putc_unlocked (int c, FILE *fp)
+__libc_putc_unlocked (int c, FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_putc_unlocked (c, fp);
 }
-weak_alias (__putc_unlocked, putc_unlocked)
-libc_hidden_weak (putc_unlocked)
+weak_alias (__libc_putc_unlocked, putc_unlocked)


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

* [glibc/azanella/clang] stdio: Refactor getc_unlocked, putc_unlocked,  and fputc_unlocked
@ 2022-03-29 20:30 Adhemerval Zanella
  0 siblings, 0 replies; 12+ messages in thread
From: Adhemerval Zanella @ 2022-03-29 20:30 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=11c67e2ce5a5735700d3cfbbb9c4e360e0b48a6b

commit 11c67e2ce5a5735700d3cfbbb9c4e360e0b48a6b
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Mar 14 15:34:50 2022 -0300

    stdio: Refactor getc_unlocked, putc_unlocked, and fputc_unlocked

Diff:
---
 include/stdio.h | 13 ++++---------
 libio/fputc_u.c |  1 -
 libio/getc_u.c  |  7 +++----
 libio/putc_u.c  |  5 ++---
 4 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/include/stdio.h b/include/stdio.h
index edb8f12e8a..421eb1f2af 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -169,7 +169,6 @@ extern void __funlockfile (FILE *__stream) attribute_hidden;
    possible.  */
 extern int __ftrylockfile (FILE *__stream);
 
-extern int __getc_unlocked (FILE *__fp) attribute_hidden;
 extern wint_t __getwc_unlocked (FILE *__fp);
 
 extern int __fxprintf (FILE *__fp, const char *__fmt, ...)
@@ -243,10 +242,8 @@ extern __typeof (fputs_unlocked) __fputs_unlocked;
 libc_hidden_proto (__fputs_unlocked)
 extern __typeof (feof_unlocked) __libc_feof_unlocked;
 extern __typeof (ferror_unlocked) __libc_ferror_unlocked;
-libc_hidden_proto (getc_unlocked)
-libc_hidden_proto (fputc_unlocked)
-libc_hidden_proto (putc_unlocked)
-extern __typeof (putc_unlocked) __putc_unlocked attribute_hidden;
+extern __typeof (getc_unlocked) __libc_getc_unlocked;
+extern __typeof (putc_unlocked) __libc_putc_unlocked;
 libc_hidden_proto (fmemopen)
 /* The prototype needs repeating instead of using __typeof to use
    __THROW in C++ tests.  */
@@ -274,19 +271,17 @@ __ferror_unlocked (FILE *__stream)
   return __ferror_unlocked_body (__stream);
 }
 
-#  ifdef __USE_EXTERN_INLINES
-__extern_inline int
+static inline int
 __getc_unlocked (FILE *__fp)
 {
   return __getc_unlocked_body (__fp);
 }
 
-__extern_inline int
+static inline int
 __putc_unlocked (int __c, FILE *__stream)
 {
   return __putc_unlocked_body (__c, __stream);
 }
-#  endif
 
 extern __typeof (renameat) __renameat;
 libc_hidden_proto (__renameat)
diff --git a/libio/fputc_u.c b/libio/fputc_u.c
index a479c8bf23..0d5998a728 100644
--- a/libio/fputc_u.c
+++ b/libio/fputc_u.c
@@ -35,4 +35,3 @@ fputc_unlocked (int c, FILE *fp)
   CHECK_FILE (fp, EOF);
   return _IO_putc_unlocked (c, fp);
 }
-libc_hidden_def (fputc_unlocked)
diff --git a/libio/getc_u.c b/libio/getc_u.c
index 6757a1795e..e53ef66735 100644
--- a/libio/getc_u.c
+++ b/libio/getc_u.c
@@ -30,12 +30,11 @@
 #undef getc_unlocked
 
 int
-__getc_unlocked (FILE *fp)
+__libc_getc_unlocked (FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_getc_unlocked (fp);
 }
 
-weak_alias (__getc_unlocked, getc_unlocked)
-libc_hidden_weak (getc_unlocked)
-weak_alias (__getc_unlocked, fgetc_unlocked)
+weak_alias (__libc_getc_unlocked, getc_unlocked)
+weak_alias (__libc_getc_unlocked, fgetc_unlocked)
diff --git a/libio/putc_u.c b/libio/putc_u.c
index e518685ca2..c6936b57bc 100644
--- a/libio/putc_u.c
+++ b/libio/putc_u.c
@@ -21,10 +21,9 @@
 #undef putc_unlocked
 
 int
-__putc_unlocked (int c, FILE *fp)
+__libc_putc_unlocked (int c, FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_putc_unlocked (c, fp);
 }
-weak_alias (__putc_unlocked, putc_unlocked)
-libc_hidden_weak (putc_unlocked)
+weak_alias (__libc_putc_unlocked, putc_unlocked)


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

* [glibc/azanella/clang] stdio: Refactor getc_unlocked, putc_unlocked,  and fputc_unlocked
@ 2022-03-16 18:04 Adhemerval Zanella
  0 siblings, 0 replies; 12+ messages in thread
From: Adhemerval Zanella @ 2022-03-16 18:04 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f66709f69d3636c470868877cba74dfb99f15d5a

commit f66709f69d3636c470868877cba74dfb99f15d5a
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Mar 14 15:34:50 2022 -0300

    stdio: Refactor getc_unlocked, putc_unlocked, and fputc_unlocked

Diff:
---
 include/stdio.h | 13 ++++---------
 libio/fputc_u.c |  1 -
 libio/getc_u.c  |  7 +++----
 libio/putc_u.c  |  5 ++---
 4 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/include/stdio.h b/include/stdio.h
index edb8f12e8a..421eb1f2af 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -169,7 +169,6 @@ extern void __funlockfile (FILE *__stream) attribute_hidden;
    possible.  */
 extern int __ftrylockfile (FILE *__stream);
 
-extern int __getc_unlocked (FILE *__fp) attribute_hidden;
 extern wint_t __getwc_unlocked (FILE *__fp);
 
 extern int __fxprintf (FILE *__fp, const char *__fmt, ...)
@@ -243,10 +242,8 @@ extern __typeof (fputs_unlocked) __fputs_unlocked;
 libc_hidden_proto (__fputs_unlocked)
 extern __typeof (feof_unlocked) __libc_feof_unlocked;
 extern __typeof (ferror_unlocked) __libc_ferror_unlocked;
-libc_hidden_proto (getc_unlocked)
-libc_hidden_proto (fputc_unlocked)
-libc_hidden_proto (putc_unlocked)
-extern __typeof (putc_unlocked) __putc_unlocked attribute_hidden;
+extern __typeof (getc_unlocked) __libc_getc_unlocked;
+extern __typeof (putc_unlocked) __libc_putc_unlocked;
 libc_hidden_proto (fmemopen)
 /* The prototype needs repeating instead of using __typeof to use
    __THROW in C++ tests.  */
@@ -274,19 +271,17 @@ __ferror_unlocked (FILE *__stream)
   return __ferror_unlocked_body (__stream);
 }
 
-#  ifdef __USE_EXTERN_INLINES
-__extern_inline int
+static inline int
 __getc_unlocked (FILE *__fp)
 {
   return __getc_unlocked_body (__fp);
 }
 
-__extern_inline int
+static inline int
 __putc_unlocked (int __c, FILE *__stream)
 {
   return __putc_unlocked_body (__c, __stream);
 }
-#  endif
 
 extern __typeof (renameat) __renameat;
 libc_hidden_proto (__renameat)
diff --git a/libio/fputc_u.c b/libio/fputc_u.c
index a479c8bf23..0d5998a728 100644
--- a/libio/fputc_u.c
+++ b/libio/fputc_u.c
@@ -35,4 +35,3 @@ fputc_unlocked (int c, FILE *fp)
   CHECK_FILE (fp, EOF);
   return _IO_putc_unlocked (c, fp);
 }
-libc_hidden_def (fputc_unlocked)
diff --git a/libio/getc_u.c b/libio/getc_u.c
index 6757a1795e..e53ef66735 100644
--- a/libio/getc_u.c
+++ b/libio/getc_u.c
@@ -30,12 +30,11 @@
 #undef getc_unlocked
 
 int
-__getc_unlocked (FILE *fp)
+__libc_getc_unlocked (FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_getc_unlocked (fp);
 }
 
-weak_alias (__getc_unlocked, getc_unlocked)
-libc_hidden_weak (getc_unlocked)
-weak_alias (__getc_unlocked, fgetc_unlocked)
+weak_alias (__libc_getc_unlocked, getc_unlocked)
+weak_alias (__libc_getc_unlocked, fgetc_unlocked)
diff --git a/libio/putc_u.c b/libio/putc_u.c
index e518685ca2..c6936b57bc 100644
--- a/libio/putc_u.c
+++ b/libio/putc_u.c
@@ -21,10 +21,9 @@
 #undef putc_unlocked
 
 int
-__putc_unlocked (int c, FILE *fp)
+__libc_putc_unlocked (int c, FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_putc_unlocked (c, fp);
 }
-weak_alias (__putc_unlocked, putc_unlocked)
-libc_hidden_weak (putc_unlocked)
+weak_alias (__libc_putc_unlocked, putc_unlocked)


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

* [glibc/azanella/clang] stdio: Refactor getc_unlocked, putc_unlocked,  and fputc_unlocked
@ 2022-03-15 18:41 Adhemerval Zanella
  0 siblings, 0 replies; 12+ messages in thread
From: Adhemerval Zanella @ 2022-03-15 18:41 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d9a569eb923ede7e67534f926b62c612971c3084

commit d9a569eb923ede7e67534f926b62c612971c3084
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Mar 14 15:34:50 2022 -0300

    stdio: Refactor getc_unlocked, putc_unlocked, and fputc_unlocked

Diff:
---
 include/stdio.h | 13 ++++---------
 libio/fputc_u.c |  1 -
 libio/getc_u.c  |  7 +++----
 libio/putc_u.c  |  5 ++---
 4 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/include/stdio.h b/include/stdio.h
index edb8f12e8a..421eb1f2af 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -169,7 +169,6 @@ extern void __funlockfile (FILE *__stream) attribute_hidden;
    possible.  */
 extern int __ftrylockfile (FILE *__stream);
 
-extern int __getc_unlocked (FILE *__fp) attribute_hidden;
 extern wint_t __getwc_unlocked (FILE *__fp);
 
 extern int __fxprintf (FILE *__fp, const char *__fmt, ...)
@@ -243,10 +242,8 @@ extern __typeof (fputs_unlocked) __fputs_unlocked;
 libc_hidden_proto (__fputs_unlocked)
 extern __typeof (feof_unlocked) __libc_feof_unlocked;
 extern __typeof (ferror_unlocked) __libc_ferror_unlocked;
-libc_hidden_proto (getc_unlocked)
-libc_hidden_proto (fputc_unlocked)
-libc_hidden_proto (putc_unlocked)
-extern __typeof (putc_unlocked) __putc_unlocked attribute_hidden;
+extern __typeof (getc_unlocked) __libc_getc_unlocked;
+extern __typeof (putc_unlocked) __libc_putc_unlocked;
 libc_hidden_proto (fmemopen)
 /* The prototype needs repeating instead of using __typeof to use
    __THROW in C++ tests.  */
@@ -274,19 +271,17 @@ __ferror_unlocked (FILE *__stream)
   return __ferror_unlocked_body (__stream);
 }
 
-#  ifdef __USE_EXTERN_INLINES
-__extern_inline int
+static inline int
 __getc_unlocked (FILE *__fp)
 {
   return __getc_unlocked_body (__fp);
 }
 
-__extern_inline int
+static inline int
 __putc_unlocked (int __c, FILE *__stream)
 {
   return __putc_unlocked_body (__c, __stream);
 }
-#  endif
 
 extern __typeof (renameat) __renameat;
 libc_hidden_proto (__renameat)
diff --git a/libio/fputc_u.c b/libio/fputc_u.c
index a479c8bf23..0d5998a728 100644
--- a/libio/fputc_u.c
+++ b/libio/fputc_u.c
@@ -35,4 +35,3 @@ fputc_unlocked (int c, FILE *fp)
   CHECK_FILE (fp, EOF);
   return _IO_putc_unlocked (c, fp);
 }
-libc_hidden_def (fputc_unlocked)
diff --git a/libio/getc_u.c b/libio/getc_u.c
index 6757a1795e..e53ef66735 100644
--- a/libio/getc_u.c
+++ b/libio/getc_u.c
@@ -30,12 +30,11 @@
 #undef getc_unlocked
 
 int
-__getc_unlocked (FILE *fp)
+__libc_getc_unlocked (FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_getc_unlocked (fp);
 }
 
-weak_alias (__getc_unlocked, getc_unlocked)
-libc_hidden_weak (getc_unlocked)
-weak_alias (__getc_unlocked, fgetc_unlocked)
+weak_alias (__libc_getc_unlocked, getc_unlocked)
+weak_alias (__libc_getc_unlocked, fgetc_unlocked)
diff --git a/libio/putc_u.c b/libio/putc_u.c
index e518685ca2..c6936b57bc 100644
--- a/libio/putc_u.c
+++ b/libio/putc_u.c
@@ -21,10 +21,9 @@
 #undef putc_unlocked
 
 int
-__putc_unlocked (int c, FILE *fp)
+__libc_putc_unlocked (int c, FILE *fp)
 {
   CHECK_FILE (fp, EOF);
   return _IO_putc_unlocked (c, fp);
 }
-weak_alias (__putc_unlocked, putc_unlocked)
-libc_hidden_weak (putc_unlocked)
+weak_alias (__libc_putc_unlocked, putc_unlocked)


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

end of thread, other threads:[~2022-06-09 21:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-31 19:06 [glibc/azanella/clang] stdio: Refactor getc_unlocked, putc_unlocked, and fputc_unlocked Adhemerval Zanella
  -- strict thread matches above, loose matches on Subject: below --
2022-06-09 21:20 Adhemerval Zanella
2022-06-09 13:16 Adhemerval Zanella
2022-06-03 14:06 Adhemerval Zanella
2022-05-13 14:20 Adhemerval Zanella
2022-05-12 19:33 Adhemerval Zanella
2022-05-10 18:24 Adhemerval Zanella
2022-04-29 14:04 Adhemerval Zanella
2022-04-04 12:54 Adhemerval Zanella
2022-03-29 20:30 Adhemerval Zanella
2022-03-16 18:04 Adhemerval Zanella
2022-03-15 18:41 Adhemerval Zanella

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).