Browse Source

ctype.c, _collate.c, str[n]casecmp.c, strlcpy.c: remove unused hidden functions

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Peter S. Mazinger 13 years ago
parent
commit
f4ec824864

+ 0 - 1
include/ctype.h

@@ -354,7 +354,6 @@ libc_hidden_proto(tolower_l)
 /* Return the uppercase version of C.  */
 /*extern int __toupper_l (int __c, __locale_t __l) __THROW; */
 extern int toupper_l (int __c, __locale_t __l) __THROW;
-libc_hidden_proto(toupper_l)
 
 # if __GNUC__ >= 2 && defined __OPTIMIZE__ && !defined __cplusplus
 #  define tolower_l(c, locale) __tobody(c, tolower_l, (locale)->__ctype_tolower, (c, locale))

+ 0 - 1
include/string.h

@@ -124,7 +124,6 @@ libc_hidden_proto(strcoll)
 extern size_t strxfrm (char *__restrict __dest,
 		       __const char *__restrict __src, size_t __n)
      __THROW __nonnull ((2));
-libc_hidden_proto(strxfrm)
 __END_NAMESPACE_STD
 
 #if defined __USE_GNU && defined __UCLIBC_HAS_XLOCALE__

+ 0 - 5
include/wchar.h

@@ -170,12 +170,10 @@ __END_NAMESPACE_C99
 #ifdef __USE_GNU
 /* Compare S1 and S2, ignoring case.  */
 extern int wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) __THROW;
-libc_hidden_proto(wcscasecmp)
 
 /* Compare no more than N chars of S1 and S2, ignoring case.  */
 extern int wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2,
 			size_t __n) __THROW;
-libc_hidden_proto(wcsncasecmp)
 
 #ifdef __UCLIBC_HAS_XLOCALE__
 /* Similar to the two functions above but take the information from
@@ -184,11 +182,9 @@ libc_hidden_proto(wcsncasecmp)
 
 extern int wcscasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2,
 			 __locale_t __loc) __THROW;
-libc_hidden_proto(wcscasecmp_l)
 
 extern int wcsncasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2,
 			  size_t __n, __locale_t __loc) __THROW;
-libc_hidden_proto(wcsncasecmp_l)
 #endif /* __UCLIBC_HAS_XLOCALE__ */
 #endif
 
@@ -202,7 +198,6 @@ libc_hidden_proto(wcscoll)
    `wcscoll' to the original strings.  */
 extern size_t wcsxfrm (wchar_t *__restrict __s1,
 		       __const wchar_t *__restrict __s2, size_t __n) __THROW;
-libc_hidden_proto(wcsxfrm)
 __END_NAMESPACE_C99
 
 #ifdef __USE_GNU

+ 0 - 1
libc/misc/ctype/ctype.c

@@ -346,7 +346,6 @@ int toupper_l(int c, __locale_t l)
 #endif
 	return __UCLIBC_CTYPE_IN_TO_DOMAIN(c) ? l->__ctype_toupper[c] : c;
 }
-libc_hidden_def(toupper_l)
 /*remove after 0.9.31. See ctype.h for why.
  *weak_alias (toupper_l, __toupper_l) */
 

+ 4 - 3
libc/string/_collate.c

@@ -62,7 +62,6 @@ size_t wcsxfrm(Wchar *__restrict ws1, const Wchar *__restrict ws2, size_t n)
 {
 	return wcsxfrm_l(ws1, ws2, n, __UCLIBC_CURLOCALE );
 }
-libc_hidden_def(wcsxfrm)
 
 #else  /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */
 
@@ -541,7 +540,6 @@ libc_hidden_def(__XL_NPP(wcscoll))
 extern size_t __wcslcpy(wchar_t *__restrict dst,
 		const wchar_t *__restrict src, size_t n);
 
-libc_hidden_proto(__XL_NPP(wcsxfrm))
 size_t __XL_NPP(wcsxfrm)(wchar_t *__restrict ws1, const wchar_t *__restrict ws2,
 					 size_t n   __LOCALE_PARAM )
 {
@@ -579,7 +577,9 @@ size_t __XL_NPP(wcsxfrm)(wchar_t *__restrict ws1, const wchar_t *__restrict ws2,
 	}
 	return count-1;
 }
+#if defined L_strxfrm_l || defined L_wcsxfrm_l
 libc_hidden_def(__XL_NPP(wcsxfrm))
+#endif
 
 #else  /* WANT_WIDE */
 
@@ -623,7 +623,6 @@ static size_t store(unsigned char *s, size_t count, size_t n, __uwchar_t weight)
 	return r;
 }
 
-libc_hidden_proto(__XL_NPP(strxfrm))
 size_t __XL_NPP(strxfrm)(char *__restrict ws1, const char *__restrict ws2, size_t n
 					 __LOCALE_PARAM )
 {
@@ -661,7 +660,9 @@ size_t __XL_NPP(strxfrm)(char *__restrict ws1, const char *__restrict ws2, size_
 	}
 	return count-1;
 }
+#ifdef L_strxfrm_l
 libc_hidden_def(__XL_NPP(strxfrm))
+#endif
 
 #endif /* WANT_WIDE */
 

+ 4 - 0
libc/string/strcasecmp.c

@@ -31,7 +31,9 @@ int strcasecmp(register const Wchar *s1, register const Wchar *s2)
 {
 	return strcasecmp_l(s1, s2, __UCLIBC_CURLOCALE);
 }
+#ifndef WANT_WIDE
 libc_hidden_def(strcasecmp)
+#endif
 
 #else  /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */
 
@@ -59,6 +61,8 @@ int __XL_NPP(strcasecmp)(register const Wchar *s1, register const Wchar *s2
 	return r;
 #endif
 }
+#ifndef WANT_WIDE
 libc_hidden_def(__XL_NPP(strcasecmp))
+#endif
 
 #endif /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */

+ 0 - 2
libc/string/strlcpy.c

@@ -49,7 +49,6 @@ size_t Wstrlcpy(register Wchar *__restrict dst,
 
 #ifndef __UCLIBC_HAS_LOCALE__
 strong_alias(__wcslcpy,wcsxfrm)
-libc_hidden_def(wcsxfrm)
 #endif
 
 #else
@@ -57,7 +56,6 @@ libc_hidden_def(wcsxfrm)
 libc_hidden_def(strlcpy)
 #ifndef __UCLIBC_HAS_LOCALE__
 strong_alias(strlcpy,strxfrm)
-libc_hidden_def(strxfrm)
 #endif
 
 #endif

+ 4 - 0
libc/string/strncasecmp.c

@@ -31,7 +31,9 @@ int strncasecmp(register const Wchar *s1, register const Wchar *s2, size_t n)
 {
 	return strncasecmp_l(s1, s2, n, __UCLIBC_CURLOCALE);
 }
+#ifndef WANT_WIDE
 libc_hidden_def(strncasecmp)
+#endif
 
 #else  /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */
 
@@ -62,6 +64,8 @@ int __XL_NPP(strncasecmp)(register const Wchar *s1, register const Wchar *s2,
 	return r;
 #endif
 }
+#ifndef WANT_WIDE
 libc_hidden_def(__XL_NPP(strncasecmp))
+#endif
 
 #endif /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */