This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 19/31] Remove hidden_def and hidden_proto from cvt functions


From: "Gabriel F. T. Gomes" <gabrielftg@linux.ibm.com>

Some *cvt functions are not called from within libc, yet they use
hidden_def and hidden_proto.  This patch cleans this up and adds
attribute_hidden to the declarations, for architectures that need it.

Tested for powerpc64le and x86_64.
---
 include/stdlib.h | 16 ++++++++--------
 misc/efgcvt_r.c  |  3 ---
 2 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/include/stdlib.h b/include/stdlib.h
index 114e12d255..089607dbf9 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -260,12 +260,12 @@ extern char *__fcvt (double __value, int __ndigit, int *__restrict __decpt,
 extern char *__gcvt (double __value, int __ndigit, char *__buf);
 extern int __ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
 		     int *__restrict __sign, char *__restrict __buf,
-		     size_t __len);
-libc_hidden_proto (__ecvt_r)
+		     size_t __len)
+  attribute_hidden;
 extern int __fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
 		     int *__restrict __sign, char *__restrict __buf,
-		     size_t __len);
-libc_hidden_proto (__fcvt_r)
+		     size_t __len)
+  attribute_hidden;
 extern char *__qecvt (long double __value, int __ndigit,
 		      int *__restrict __decpt, int *__restrict __sign);
 extern char *__qfcvt (long double __value, int __ndigit,
@@ -273,12 +273,12 @@ extern char *__qfcvt (long double __value, int __ndigit,
 extern char *__qgcvt (long double __value, int __ndigit, char *__buf);
 extern int __qecvt_r (long double __value, int __ndigit,
 		      int *__restrict __decpt, int *__restrict __sign,
-		      char *__restrict __buf, size_t __len);
-libc_hidden_proto (__qecvt_r)
+		      char *__restrict __buf, size_t __len)
+  attribute_hidden;
 extern int __qfcvt_r (long double __value, int __ndigit,
 		      int *__restrict __decpt, int *__restrict __sign,
-		      char *__restrict __buf, size_t __len);
-libc_hidden_proto (__qfcvt_r)
+		      char *__restrict __buf, size_t __len)
+  attribute_hidden;
 
 # if IS_IN (libc)
 #  undef MB_CUR_MAX
diff --git a/misc/efgcvt_r.c b/misc/efgcvt_r.c
index 981249850c..30d25ff114 100644
--- a/misc/efgcvt_r.c
+++ b/misc/efgcvt_r.c
@@ -240,7 +240,6 @@ __APPEND (FUNC_PREFIX, ecvt_r) (FLOAT_TYPE value, int ndigit, int *decpt,
   cvt_symbol_1 (libc, __APPEND (FUNC_PREFIX, symbol), \
 	      APPEND (FUNC_PREFIX, symbol), GLIBC_2_4)
 #  define cvt_symbol_1(lib, local, symbol, version) \
-    libc_hidden_def (local) \
     versioned_symbol (lib, local, symbol, version)
 # else
 #  define cvt_symbol(symbol) \
@@ -248,14 +247,12 @@ __APPEND (FUNC_PREFIX, ecvt_r) (FLOAT_TYPE value, int ndigit, int *decpt,
 	      APPEND (q, symbol), GLIBC_2_0); \
   weak_alias (__APPEND (FUNC_PREFIX, symbol), APPEND (FUNC_PREFIX, symbol))
 #  define cvt_symbol_1(lib, local, symbol, version) \
-  libc_hidden_def (local) \
   compat_symbol (lib, local, symbol, version)
 # endif
 #else
 # define cvt_symbol(symbol) \
   cvt_symbol_1 (__APPEND (FUNC_PREFIX, symbol), APPEND (FUNC_PREFIX, symbol))
 #  define cvt_symbol_1(local, symbol) \
-  libc_hidden_def (local) \
   weak_alias (local, symbol)
 #endif
 cvt_symbol(fcvt_r);
-- 
2.21.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]