Browse Source

Hiding again

Peter S. Mazinger 19 years ago
parent
commit
d24608f995

+ 9 - 2
libc/inet/resolv.c

@@ -137,6 +137,7 @@
 #define strnlen __strnlen
 #define strnlen __strnlen
 #define strncat __strncat
 #define strncat __strncat
 #define strstr __strstr
 #define strstr __strstr
+#define random __random
 
 
 #define __FORCE_GLIBC
 #define __FORCE_GLIBC
 #include <features.h>
 #include <features.h>
@@ -279,6 +280,11 @@ extern int __libc_ns_name_unpack(const u_char *, const u_char *, const u_char *,
                u_char *, size_t) attribute_hidden;
                u_char *, size_t) attribute_hidden;
 
 
 
 
+extern int __gethostent_r (struct hostent *__restrict __result_buf,
+			 char *__restrict __buf, size_t __buflen,
+			 struct hostent **__restrict __result,
+			 int *__restrict __h_errnop) attribute_hidden;
+
 #ifdef L_encodeh
 #ifdef L_encodeh
 int attribute_hidden __encode_header(struct resolv_header *h, unsigned char *dest, int maxlen)
 int attribute_hidden __encode_header(struct resolv_header *h, unsigned char *dest, int maxlen)
 {
 {
@@ -1604,7 +1610,7 @@ void sethostent (int stay_open)
     UNLOCK;
     UNLOCK;
 }
 }
 
 
-int gethostent_r(struct hostent *result_buf, char *buf, size_t buflen,
+int attribute_hidden __gethostent_r(struct hostent *result_buf, char *buf, size_t buflen,
 	struct hostent **result, int *h_errnop)
 	struct hostent **result, int *h_errnop)
 {
 {
     int ret;
     int ret;
@@ -1627,6 +1633,7 @@ int gethostent_r(struct hostent *result_buf, char *buf, size_t buflen,
     UNLOCK;
     UNLOCK;
     return(ret);
     return(ret);
 }
 }
+strong_alias(__gethostent_r,gethostent_r)
 
 
 struct hostent *gethostent (void)
 struct hostent *gethostent (void)
 {
 {
@@ -1642,7 +1649,7 @@ struct hostent *gethostent (void)
     struct hostent *host;
     struct hostent *host;
 
 
     LOCK;
     LOCK;
-    gethostent_r(&h, buf, sizeof(buf), &host, &h_errno);
+    __gethostent_r(&h, buf, sizeof(buf), &host, &h_errno);
     UNLOCK;
     UNLOCK;
     return(host);
     return(host);
 }
 }

+ 3 - 0
libc/inet/rpc/auth_unix.c

@@ -38,6 +38,9 @@
  * for the credentials.
  * for the credentials.
  */
  */
 
 
+#define sysconf __sysconf
+#define getegid __getegid
+
 #define __FORCE_GLIBC
 #define __FORCE_GLIBC
 #include <features.h>
 #include <features.h>
 
 

+ 1 - 0
libc/inet/rpc/clnt_tcp.c

@@ -51,6 +51,7 @@ static char sccsid[] = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro";
  */
  */
 
 
 #define authnone_create __authnone_create
 #define authnone_create __authnone_create
+#define xdrrec_create __xdrrec_create
 
 
 #define __FORCE_GLIBC
 #define __FORCE_GLIBC
 #include <features.h>
 #include <features.h>

+ 2 - 0
libc/inet/rpc/clnt_unix.c

@@ -47,6 +47,8 @@
  */
  */
 
 
 #define authnone_create __authnone_create
 #define authnone_create __authnone_create
+#define xdrrec_create __xdrrec_create
+#define getegid __getegid
 
 
 #define __FORCE_GLIBC
 #define __FORCE_GLIBC
 #include <features.h>
 #include <features.h>

+ 1 - 0
libc/inet/rpc/rcmd.c

@@ -36,6 +36,7 @@ static char sccsid[] = "@(#)rcmd.c	8.3 (Berkeley) 3/26/94";
 #endif /* LIBC_SCCS and not lint */
 #endif /* LIBC_SCCS and not lint */
 
 
 #define bcopy __bcopy
 #define bcopy __bcopy
+#define sysconf __sysconf
 
 
 #define __FORCE_GLIBC
 #define __FORCE_GLIBC
 #include <features.h>
 #include <features.h>

+ 2 - 0
libc/inet/rpc/ruserpass.c

@@ -28,6 +28,8 @@
  */
  */
 
 
 #define __fsetlocking __libc_fsetlocking
 #define __fsetlocking __libc_fsetlocking
+#define getgid __getgid
+#define getegid __getegid
 
 
 #define __FORCE_GLIBC
 #define __FORCE_GLIBC
 #include <features.h>
 #include <features.h>

+ 3 - 2
libc/inet/rpc/svc.c

@@ -85,8 +85,8 @@ static struct svc_callout *svc_head;
 /* ***************  SVCXPRT related stuff **************** */
 /* ***************  SVCXPRT related stuff **************** */
 
 
 /* Activate a transport handle. */
 /* Activate a transport handle. */
-void
+void attribute_hidden
-xprt_register (SVCXPRT *xprt)
+__xprt_register (SVCXPRT *xprt)
 {
 {
   register int sock = xprt->xp_sock;
   register int sock = xprt->xp_sock;
   register int i;
   register int i;
@@ -125,6 +125,7 @@ xprt_register (SVCXPRT *xprt)
 					       POLLRDNORM | POLLRDBAND);
 					       POLLRDNORM | POLLRDBAND);
     }
     }
 }
 }
+strong_alias(__xprt_register,xprt_register)
 
 
 /* De-activate a transport handle. */
 /* De-activate a transport handle. */
 void
 void

+ 3 - 0
libc/inet/rpc/svc_tcp.c

@@ -41,6 +41,9 @@ static char sccsid[] = "@(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro";
  * and a record/tcp stream.
  * and a record/tcp stream.
  */
  */
 
 
+#define xdrrec_create __xdrrec_create
+#define xprt_register __xprt_register
+
 #define __FORCE_GLIBC
 #define __FORCE_GLIBC
 #define _GNU_SOURCE
 #define _GNU_SOURCE
 #include <features.h>
 #include <features.h>

+ 2 - 0
libc/inet/rpc/svc_udp.c

@@ -39,6 +39,8 @@ static char sccsid[] = "@(#)svc_udp.c 1.24 87/08/11 Copyr 1984 Sun Micro";
  * Copyright (C) 1984, Sun Microsystems, Inc.
  * Copyright (C) 1984, Sun Microsystems, Inc.
  */
  */
 
 
+#define xprt_register __xprt_register
+
 #define __FORCE_GLIBC
 #define __FORCE_GLIBC
 #define _GNU_SOURCE
 #define _GNU_SOURCE
 #include <features.h>
 #include <features.h>

+ 4 - 0
libc/inet/rpc/svc_unix.c

@@ -37,6 +37,10 @@
  * and a record/unix stream.
  * and a record/unix stream.
  */
  */
 
 
+#define xdrrec_create __xdrrec_create
+#define xprt_register __xprt_register
+#define getegid __getegid
+
 #define __FORCE_GLIBC
 #define __FORCE_GLIBC
 #include <features.h>
 #include <features.h>
 
 

+ 3 - 2
libc/inet/rpc/xdr_rec.c

@@ -142,8 +142,8 @@ static bool_t get_input_bytes (RECSTREAM *, caddr_t, int) internal_function;
  * write respectively.   They are like the system
  * write respectively.   They are like the system
  * calls expect that they take an opaque handle rather than an fd.
  * calls expect that they take an opaque handle rather than an fd.
  */
  */
-void
+void attribute_hidden
-xdrrec_create (XDR *xdrs, u_int sendsize,
+__xdrrec_create (XDR *xdrs, u_int sendsize,
 	       u_int recvsize, caddr_t tcp_handle,
 	       u_int recvsize, caddr_t tcp_handle,
 	       int (*readit) (char *, char *, int),
 	       int (*readit) (char *, char *, int),
 	       int (*writeit) (char *, char *, int))
 	       int (*writeit) (char *, char *, int))
@@ -204,6 +204,7 @@ xdrrec_create (XDR *xdrs, u_int sendsize,
   rstrm->fbtbc = 0;
   rstrm->fbtbc = 0;
   rstrm->last_frag = TRUE;
   rstrm->last_frag = TRUE;
 }
 }
+strong_alias(__xdrrec_create,xdrrec_create)
 
 
 
 
 /*
 /*

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

@@ -19,6 +19,7 @@
    02111-1307 USA.  */
    02111-1307 USA.  */
 
 
 #define mempcpy __libc_mempcpy
 #define mempcpy __libc_mempcpy
+#define tsearch __tsearch
 
 
 #define _GNU_SOURCE
 #define _GNU_SOURCE
 #include <features.h>
 #include <features.h>

+ 3 - 0
libc/misc/internals/__uClibc_main.c

@@ -13,6 +13,9 @@
  * avoided in the static library case.
  * avoided in the static library case.
  */
  */
 
 
+#define getgid __getgid
+#define getegid __getegid
+
 #define	_ERRNO_H
 #define	_ERRNO_H
 #include <features.h>
 #include <features.h>
 #include <unistd.h>
 #include <unistd.h>

+ 2 - 2
libc/misc/locale/locale.c

@@ -1415,8 +1415,8 @@ __locale_t weak_function __curlocale_set(__locale_t newloc)
 #define Cc2wc_ROW_LEN		__LOCALE_DATA_Cc2wc_ROW_LEN
 #define Cc2wc_ROW_LEN		__LOCALE_DATA_Cc2wc_ROW_LEN
 
 
 extern size_t _wchar_utf8sntowcs(wchar_t *__restrict pwc, size_t wn,
 extern size_t _wchar_utf8sntowcs(wchar_t *__restrict pwc, size_t wn,
-								 const char **__restrict src, size_t n,
+						 const char **__restrict src, size_t n,
-								 mbstate_t *ps, int allow_continuation);
+						 mbstate_t *ps, int allow_continuation) attribute_hidden;
 
 
 int __locale_mbrtowc_l(wchar_t *__restrict dst,
 int __locale_mbrtowc_l(wchar_t *__restrict dst,
 					   const char *__restrict src,
 					   const char *__restrict src,

+ 2 - 1
libc/misc/search/tsearch.c

@@ -51,7 +51,7 @@ register node	**rootp;	 address of tree root
 int	(*compar)();		 ordering function
 int	(*compar)();		 ordering function
 */
 */
 
 
-void *tsearch(__const void *key, void **vrootp, __compar_fn_t compar)
+void attribute_hidden *__tsearch(__const void *key, void **vrootp, __compar_fn_t compar)
 {
 {
     register node *q;
     register node *q;
     register node **rootp = (node **) vrootp;
     register node **rootp = (node **) vrootp;
@@ -77,6 +77,7 @@ void *tsearch(__const void *key, void **vrootp, __compar_fn_t compar)
     }
     }
     return (q);
     return (q);
 }
 }
+strong_alias(__tsearch,tsearch)
 #endif
 #endif
 
 
 #ifdef L_tfind
 #ifdef L_tfind

+ 13 - 5
libc/misc/time/time.c

@@ -131,6 +131,7 @@
 
 
 #define _uintmaxtostr __libc__uintmaxtostr
 #define _uintmaxtostr __libc__uintmaxtostr
 #define strnlen __strnlen
 #define strnlen __strnlen
+#define memcpy __memcpy
 
 
 #define _GNU_SOURCE
 #define _GNU_SOURCE
 #include <stdio.h>
 #include <stdio.h>
@@ -224,15 +225,21 @@ extern struct tm *__time_localtime_tzi(const time_t *__restrict timer,
 extern time_t _time_mktime_tzi(struct tm *timeptr, int store_on_success,
 extern time_t _time_mktime_tzi(struct tm *timeptr, int store_on_success,
 					rule_struct *tzi) attribute_hidden;
 					rule_struct *tzi) attribute_hidden;
 
 
+extern char *__asctime (__const struct tm *__tp) attribute_hidden;
+
+extern char *__asctime_r (__const struct tm *__restrict __tp,
+			char *__restrict __buf) attribute_hidden;
+
 /**********************************************************************/
 /**********************************************************************/
 #ifdef L_asctime
 #ifdef L_asctime
 
 
 static char __time_str[26];
 static char __time_str[26];
 
 
-char *asctime(const struct tm *__restrict ptm)
+char attribute_hidden *__asctime(const struct tm *ptm)
 {
 {
-	return asctime_r(ptm, __time_str);
+	return __asctime_r(ptm, __time_str);
 }
 }
+strong_alias(__asctime,asctime)
 
 
 #endif
 #endif
 /**********************************************************************/
 /**********************************************************************/
@@ -300,7 +307,7 @@ static const unsigned char at_data[] = {
 	' ', '?', '?', '?', '?', '\n', 0
 	' ', '?', '?', '?', '?', '\n', 0
 };
 };
 
 
-char *asctime_r(register const struct tm *__restrict ptm,
+char attribute_hidden *__asctime_r(register const struct tm *__restrict ptm,
 				register char *__restrict buffer)
 				register char *__restrict buffer)
 {
 {
 	int tmp;
 	int tmp;
@@ -374,6 +381,7 @@ char *asctime_r(register const struct tm *__restrict ptm,
 
 
 	return buffer - 8;
 	return buffer - 8;
 }
 }
+strong_alias(__asctime_r,asctime_r)
 
 
 #endif
 #endif
 /**********************************************************************/
 /**********************************************************************/
@@ -448,7 +456,7 @@ clock_t clock(void)
 char *ctime(const time_t *clock)
 char *ctime(const time_t *clock)
 {
 {
 	/* ANSI/ISO/SUSv3 say that ctime is equivalent to the following. */
 	/* ANSI/ISO/SUSv3 say that ctime is equivalent to the following. */
-	return asctime(localtime(clock));
+	return __asctime(localtime(clock));
 }
 }
 
 
 #endif
 #endif
@@ -459,7 +467,7 @@ char *ctime_r(const time_t *clock, char *buf)
 {
 {
 	struct tm xtm;
 	struct tm xtm;
 
 
-	return asctime_r(localtime_r(clock, &xtm), buf);
+	return __asctime_r(localtime_r(clock, &xtm), buf);
 }
 }
 
 
 #endif
 #endif

+ 5 - 2
libc/misc/utmp/utent.c

@@ -108,7 +108,7 @@ struct utmp *getutent(void)
 }
 }
 
 
 /* Locking is done in __getutent */
 /* Locking is done in __getutent */
-struct utmp *getutid (const struct utmp *utmp_entry)
+struct utmp attribute_hidden *__getutid (const struct utmp *utmp_entry)
 {
 {
     struct utmp *lutmp;
     struct utmp *lutmp;
 
 
@@ -133,6 +133,7 @@ struct utmp *getutid (const struct utmp *utmp_entry)
 
 
     return NULL;
     return NULL;
 }
 }
+strong_alias(__getutid,getutid)
 
 
 /* Locking is done in __getutent */
 /* Locking is done in __getutent */
 struct utmp *getutline(const struct utmp *utmp_entry)
 struct utmp *getutline(const struct utmp *utmp_entry)
@@ -150,6 +151,8 @@ struct utmp *getutline(const struct utmp *utmp_entry)
     return NULL;
     return NULL;
 }
 }
 
 
+extern struct utmp *getutid (__const struct utmp *__id) attribute_hidden;
+
 struct utmp *pututline (const struct utmp *utmp_entry)
 struct utmp *pututline (const struct utmp *utmp_entry)
 {
 {
     LOCK;
     LOCK;
@@ -157,7 +160,7 @@ struct utmp *pututline (const struct utmp *utmp_entry)
        the file pointer where they want it, everything will work out. */
        the file pointer where they want it, everything will work out. */
     lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR);
     lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR);
 
 
-    if (getutid(utmp_entry) != NULL) {
+    if (__getutid(utmp_entry) != NULL) {
 	lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR);
 	lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR);
 	if (write(static_fd, utmp_entry, sizeof(struct utmp)) != sizeof(struct utmp))
 	if (write(static_fd, utmp_entry, sizeof(struct utmp)) != sizeof(struct utmp))
 	    return NULL;
 	    return NULL;

+ 18 - 14
libc/misc/wchar/wchar.c

@@ -176,11 +176,11 @@ extern size_t __wcrtomb (char *__restrict __s, wchar_t __wc,
 /* Implementation-specific work functions. */
 /* Implementation-specific work functions. */
 
 
 extern size_t _wchar_utf8sntowcs(wchar_t *__restrict pwc, size_t wn,
 extern size_t _wchar_utf8sntowcs(wchar_t *__restrict pwc, size_t wn,
-								 const char **__restrict src, size_t n,
+					const char **__restrict src, size_t n,
-								 mbstate_t *ps, int allow_continuation);
+					mbstate_t *ps, int allow_continuation) attribute_hidden;
 
 
 extern size_t _wchar_wcsntoutf8s(char *__restrict s, size_t n,
 extern size_t _wchar_wcsntoutf8s(char *__restrict s, size_t n,
-								 const wchar_t **__restrict src, size_t wn);
+					const wchar_t **__restrict src, size_t wn) attribute_hidden;
 
 
 /* glibc extensions. */
 /* glibc extensions. */
 
 
@@ -271,15 +271,13 @@ int mbsinit(const mbstate_t *ps)
 /**********************************************************************/
 /**********************************************************************/
 #ifdef L_mbrlen
 #ifdef L_mbrlen
 
 
-size_t __mbrlen(const char *__restrict s, size_t n, mbstate_t *__restrict ps)
+size_t attribute_hidden __mbrlen(const char *__restrict s, size_t n, mbstate_t *__restrict ps)
 {
 {
 	static mbstate_t mbstate;	/* Rely on bss 0-init. */
 	static mbstate_t mbstate;	/* Rely on bss 0-init. */
 
 
 	return __mbrtowc(NULL, s, n, (ps != NULL) ? ps : &mbstate);
 	return __mbrtowc(NULL, s, n, (ps != NULL) ? ps : &mbstate);
 }
 }
-
+strong_alias(__mbrlen,mbrlen)
-size_t mbrlen(const char *__restrict s, size_t n, mbstate_t *__restrict ps)
-	 __attribute__ ((__weak__, __alias__("__mbrlen")));
 
 
 #endif
 #endif
 /**********************************************************************/
 /**********************************************************************/
@@ -372,7 +370,7 @@ strong_alias(__wcrtomb,wcrtomb)
 /**********************************************************************/
 /**********************************************************************/
 #ifdef L_mbsrtowcs
 #ifdef L_mbsrtowcs
 
 
-size_t mbsrtowcs(wchar_t *__restrict dst, const char **__restrict src,
+size_t attribute_hidden __mbsrtowcs(wchar_t *__restrict dst, const char **__restrict src,
 				 size_t len, mbstate_t *__restrict ps)
 				 size_t len, mbstate_t *__restrict ps)
 {
 {
 	static mbstate_t mbstate;	/* Rely on bss 0-init. */
 	static mbstate_t mbstate;	/* Rely on bss 0-init. */
@@ -380,6 +378,7 @@ size_t mbsrtowcs(wchar_t *__restrict dst, const char **__restrict src,
 	return __mbsnrtowcs(dst, src, SIZE_MAX, len,
 	return __mbsnrtowcs(dst, src, SIZE_MAX, len,
 						((ps != NULL) ? ps : &mbstate));
 						((ps != NULL) ? ps : &mbstate));
 }
 }
+strong_alias(__mbsrtowcs,mbsrtowcs)
 
 
 #endif
 #endif
 /**********************************************************************/
 /**********************************************************************/
@@ -389,11 +388,12 @@ size_t mbsrtowcs(wchar_t *__restrict dst, const char **__restrict src,
 
 
  * TODO: Check for valid state anyway? */
  * TODO: Check for valid state anyway? */
 
 
-size_t wcsrtombs(char *__restrict dst, const wchar_t **__restrict src,
+size_t attribute_hidden __wcsrtombs(char *__restrict dst, const wchar_t **__restrict src,
 				 size_t len, mbstate_t *__restrict ps)
 				 size_t len, mbstate_t *__restrict ps)
 {
 {
 	return __wcsnrtombs(dst, src, SIZE_MAX, len, ps);
 	return __wcsnrtombs(dst, src, SIZE_MAX, len, ps);
 }
 }
+strong_alias(__wcsrtombs,wcsrtombs)
 
 
 #endif
 #endif
 /**********************************************************************/
 /**********************************************************************/
@@ -410,7 +410,7 @@ size_t wcsrtombs(char *__restrict dst, const wchar_t **__restrict src,
 #endif
 #endif
 #endif
 #endif
 
 
-size_t _wchar_utf8sntowcs(wchar_t *__restrict pwc, size_t wn,
+size_t attribute_hidden _wchar_utf8sntowcs(wchar_t *__restrict pwc, size_t wn,
 						  const char **__restrict src, size_t n,
 						  const char **__restrict src, size_t n,
 						  mbstate_t *ps, int allow_continuation)
 						  mbstate_t *ps, int allow_continuation)
 {
 {
@@ -581,7 +581,7 @@ size_t _wchar_utf8sntowcs(wchar_t *__restrict pwc, size_t wn,
 /**********************************************************************/
 /**********************************************************************/
 #ifdef L__wchar_wcsntoutf8s
 #ifdef L__wchar_wcsntoutf8s
 
 
-size_t _wchar_wcsntoutf8s(char *__restrict s, size_t n,
+size_t attribute_hidden _wchar_wcsntoutf8s(char *__restrict s, size_t n,
 						  const wchar_t **__restrict src, size_t wn)
 						  const wchar_t **__restrict src, size_t wn)
 {
 {
 	register char *p;
 	register char *p;
@@ -1034,7 +1034,7 @@ static const signed char new_wtbl[] = {
 	0,    2,    1,    2,    1,    0,    1, 
 	0,    2,    1,    2,    1,    0,    1, 
 };
 };
 
 
-int wcswidth(const wchar_t *pwcs, size_t n)
+int attribute_hidden __wcswidth(const wchar_t *pwcs, size_t n)
 {
 {
     int h, l, m, count;
     int h, l, m, count;
     wchar_t wc;
     wchar_t wc;
@@ -1131,7 +1131,7 @@ int wcswidth(const wchar_t *pwcs, size_t n)
 
 
 #else  /*  __UCLIBC_HAS_LOCALE__ */
 #else  /*  __UCLIBC_HAS_LOCALE__ */
 
 
-int wcswidth(const wchar_t *pwcs, size_t n)
+int attribute_hidden __wcswidth(const wchar_t *pwcs, size_t n)
 {
 {
 	int count;
 	int count;
 	wchar_t wc;
 	wchar_t wc;
@@ -1154,13 +1154,17 @@ int wcswidth(const wchar_t *pwcs, size_t n)
 
 
 #endif /*  __UCLIBC_HAS_LOCALE__ */
 #endif /*  __UCLIBC_HAS_LOCALE__ */
 
 
+strong_alias(__wcswidth,wcswidth)
+
 #endif
 #endif
 /**********************************************************************/
 /**********************************************************************/
 #ifdef L_wcwidth
 #ifdef L_wcwidth
 
 
+extern int __wcswidth (__const wchar_t *__s, size_t __n) attribute_hidden;
+
 int wcwidth(wchar_t wc)
 int wcwidth(wchar_t wc)
 {
 {
-    return wcswidth(&wc, 1);
+    return __wcswidth(&wc, 1);
 }
 }
 
 
 #endif
 #endif

+ 2 - 0
libc/misc/wchar/wstdio.c

@@ -50,6 +50,8 @@
 */
 */
 
 
 #define wcslen __wcslen
 #define wcslen __wcslen
+#define wcsrtombs __wcsrtombs
+#define mbrtowc __mbrtowc
 
 
 #define _GNU_SOURCE
 #define _GNU_SOURCE
 #include <stdio.h>
 #include <stdio.h>

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

@@ -22,6 +22,7 @@
 #define mempcpy __libc_mempcpy
 #define mempcpy __libc_mempcpy
 #define strndup __strndup
 #define strndup __strndup
 #define strspn __strspn
 #define strspn __strspn
+#define unsetenv __unsetenv
 
 
 #define _GNU_SOURCE
 #define _GNU_SOURCE
 #include <sys/cdefs.h>
 #include <sys/cdefs.h>

+ 2 - 0
libc/stdio/fgetwc.c

@@ -5,6 +5,8 @@
  * Dedicated to Toni.  See uClibc/DEDICATION.mjn3 for details.
  * Dedicated to Toni.  See uClibc/DEDICATION.mjn3 for details.
  */
  */
 
 
+#define mbrtowc __mbrtowc
+
 #include "_stdio.h"
 #include "_stdio.h"
 
 
 #ifdef __DO_UNLOCKED
 #ifdef __DO_UNLOCKED

+ 2 - 0
libc/stdio/scanf.c

@@ -44,6 +44,8 @@
  */
  */
 
 
 #define wcslen __wcslen
 #define wcslen __wcslen
+#define mbsrtowcs __mbsrtowcs
+#define mbrtowc __mbrtowc
 
 
 #define _ISOC99_SOURCE			/* for LLONG_MAX primarily... */
 #define _ISOC99_SOURCE			/* for LLONG_MAX primarily... */
 #define _GNU_SOURCE
 #define _GNU_SOURCE

+ 2 - 0
libc/stdio/vfprintf.c

@@ -92,6 +92,8 @@
 #define strnlen __strnlen
 #define strnlen __strnlen
 #define wcslen __wcslen
 #define wcslen __wcslen
 #define wcsnlen __wcsnlen
 #define wcsnlen __wcsnlen
+#define wcsrtombs __wcsrtombs
+#define mbsrtowcs __mbsrtowcs
 
 
 #define _ISOC99_SOURCE			/* for ULLONG primarily... */
 #define _ISOC99_SOURCE			/* for ULLONG primarily... */
 #define _GNU_SOURCE
 #define _GNU_SOURCE

+ 2 - 0
libc/stdlib/malloc-standard/malloc.h

@@ -14,6 +14,8 @@
   Hacked up for uClibc by Erik Andersen <andersen@codepoet.org>
   Hacked up for uClibc by Erik Andersen <andersen@codepoet.org>
 */
 */
 
 
+#define sysconf __sysconf
+
 #include <features.h>
 #include <features.h>
 #include <stddef.h>
 #include <stddef.h>
 #include <unistd.h>
 #include <unistd.h>

+ 2 - 0
libc/stdlib/rand.c

@@ -17,6 +17,8 @@
  * write to the Free Software Foundation, Inc., 675 Mass Ave, 
  * write to the Free Software Foundation, Inc., 675 Mass Ave, 
  * Cambridge, MA 02139, USA.  */
  * Cambridge, MA 02139, USA.  */
 
 
+#define random __random
+
 #include <stdlib.h>
 #include <stdlib.h>
 
 
 int rand (void) 
 int rand (void) 

+ 5 - 2
libc/stdlib/random.c

@@ -22,6 +22,9 @@
  * Rewritten to use reentrant functions by Ulrich Drepper, 1995.
  * Rewritten to use reentrant functions by Ulrich Drepper, 1995.
  */
  */
 
 
+#define random_r __random_r
+#define srandom_r __srandom_r
+
 #define _GNU_SOURCE
 #define _GNU_SOURCE
 #include <features.h>
 #include <features.h>
 #include <limits.h>
 #include <limits.h>
@@ -243,7 +246,7 @@ char * setstate (char *arg_state)
    rear pointers can't wrap on the same call by not testing the rear
    rear pointers can't wrap on the same call by not testing the rear
    pointer if the front one has wrapped.  Returns a 31-bit random number.  */
    pointer if the front one has wrapped.  Returns a 31-bit random number.  */
 
 
-long int random ()
+long int attribute_hidden __random ()
 {
 {
   int32_t retval;
   int32_t retval;
 
 
@@ -252,4 +255,4 @@ long int random ()
   __pthread_mutex_unlock(&lock);
   __pthread_mutex_unlock(&lock);
   return retval;
   return retval;
 }
 }
-
+strong_alias(__random,random)

+ 6 - 5
libc/stdlib/random_r.c

@@ -131,7 +131,7 @@ static const struct random_poly_info random_poly_info =
    information a given number of times to get rid of any initial dependencies
    information a given number of times to get rid of any initial dependencies
    introduced by the L.C.R.N.G.  Note that the initialization of randtbl[]
    introduced by the L.C.R.N.G.  Note that the initialization of randtbl[]
    for default usage relies on values produced by this routine.  */
    for default usage relies on values produced by this routine.  */
-int srandom_r (unsigned int seed, struct random_data *buf)
+int attribute_hidden __srandom_r (unsigned int seed, struct random_data *buf)
 {
 {
     int type;
     int type;
     int32_t *state;
     int32_t *state;
@@ -176,7 +176,7 @@ int srandom_r (unsigned int seed, struct random_data *buf)
     while (--kc >= 0)
     while (--kc >= 0)
     {
     {
 	int32_t discard;
 	int32_t discard;
-	(void) random_r (buf, &discard);
+	(void) __random_r (buf, &discard);
     }
     }
 
 
 done:
 done:
@@ -185,6 +185,7 @@ done:
 fail:
 fail:
     return -1;
     return -1;
 }
 }
+strong_alias(__srandom_r,srandom_r)
 
 
 /* Initialize the state information in the given array of N bytes for
 /* Initialize the state information in the given array of N bytes for
    future random number generation.  Based on the number of bytes we
    future random number generation.  Based on the number of bytes we
@@ -237,7 +238,7 @@ int initstate_r (seed, arg_state, n, buf)
 
 
     buf->state = state;
     buf->state = state;
 
 
-    srandom_r (seed, buf);
+    __srandom_r (seed, buf);
 
 
     state[-1] = TYPE_0;
     state[-1] = TYPE_0;
     if (type != TYPE_0)
     if (type != TYPE_0)
@@ -313,7 +314,7 @@ fail:
    rear pointers can't wrap on the same call by not testing the rear
    rear pointers can't wrap on the same call by not testing the rear
    pointer if the front one has wrapped.  Returns a 31-bit random number.  */
    pointer if the front one has wrapped.  Returns a 31-bit random number.  */
 
 
-int random_r (buf, result)
+int attribute_hidden __random_r (buf, result)
      struct random_data *buf;
      struct random_data *buf;
      int32_t *result;
      int32_t *result;
 {
 {
@@ -362,4 +363,4 @@ fail:
     __set_errno (EINVAL);
     __set_errno (EINVAL);
     return -1;
     return -1;
 }
 }
-
+strong_alias(__random_r,random_r)

+ 2 - 0
libc/stdlib/seed48.c

@@ -17,6 +17,8 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
    02111-1307 USA.  */
 
 
+#define seed48_r __seed48_r
+
 #include <stdlib.h>
 #include <stdlib.h>
 
 
 /* Global state for non-reentrant functions.  Defined in drand48-iter.c.  */
 /* Global state for non-reentrant functions.  Defined in drand48-iter.c.  */

+ 4 - 1
libc/stdlib/seed48_r.c

@@ -17,11 +17,13 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
    02111-1307 USA.  */
 
 
+#define memcpy __memcpy
+
 #include <stdlib.h>
 #include <stdlib.h>
 #include <string.h>
 #include <string.h>
 #include <limits.h>
 #include <limits.h>
 
 
-int seed48_r (unsigned short int seed16v[3], struct drand48_data *buffer)
+int attribute_hidden __seed48_r (unsigned short int seed16v[3], struct drand48_data *buffer)
 {
 {
     /* Save old value at a private place to be used as return value.  */
     /* Save old value at a private place to be used as return value.  */
     memcpy (buffer->__old_x, buffer->__x, sizeof (buffer->__x));
     memcpy (buffer->__old_x, buffer->__x, sizeof (buffer->__x));
@@ -36,3 +38,4 @@ int seed48_r (unsigned short int seed16v[3], struct drand48_data *buffer)
 
 
     return 0;
     return 0;
 }
 }
+strong_alias(__seed48_r,seed48_r)

+ 4 - 2
libc/stdlib/setenv.c

@@ -38,6 +38,7 @@ static pthread_mutex_t mylock = PTHREAD_MUTEX_INITIALIZER;
 # define UNLOCK
 # define UNLOCK
 #endif
 #endif
 
 
+extern int __unsetenv (__const char *__name) attribute_hidden;
 
 
 /* If this variable is not a null pointer we allocated the current
 /* If this variable is not a null pointer we allocated the current
    environment.  */
    environment.  */
@@ -139,7 +140,7 @@ int setenv (const char *name, const char *value, int replace)
     return __add_to_environ (name, value, NULL, replace);
     return __add_to_environ (name, value, NULL, replace);
 }
 }
 
 
-int unsetenv (const char *name)
+int attribute_hidden __unsetenv (const char *name)
 {
 {
     size_t len;
     size_t len;
     char **ep;
     char **ep;
@@ -167,6 +168,7 @@ int unsetenv (const char *name)
     UNLOCK;
     UNLOCK;
     return 0;
     return 0;
 }
 }
+strong_alias(__unsetenv,unsetenv)
 
 
 /* The `clearenv' was planned to be added to POSIX.1 but probably
 /* The `clearenv' was planned to be added to POSIX.1 but probably
    never made it.  Nevertheless the POSIX.9 standard (POSIX bindings
    never made it.  Nevertheless the POSIX.9 standard (POSIX bindings
@@ -197,7 +199,7 @@ int putenv (char *string)
 	free(name);
 	free(name);
 	return(result);
 	return(result);
     }
     }
-    unsetenv (string);
+    __unsetenv (string);
     return 0;
     return 0;
 }
 }
 
 

+ 5 - 0
libc/stdlib/stdlib.c

@@ -32,6 +32,11 @@
  * Add wscto{inttype} functions.
  * Add wscto{inttype} functions.
  */
  */
 
 
+#define wcsrtombs __wcsrtombs
+#define mbsrtowcs __mbsrtowcs
+#define mbrtowc __mbrtowc
+#define mbrlen __mbrlen
+
 #define _ISOC99_SOURCE			/* for ULLONG primarily... */
 #define _ISOC99_SOURCE			/* for ULLONG primarily... */
 #define _GNU_SOURCE
 #define _GNU_SOURCE
 #include <limits.h>
 #include <limits.h>

+ 1 - 0
libc/stdlib/unix_grantpt.c

@@ -18,6 +18,7 @@
    Boston, MA 02111-1307, USA.  */
    Boston, MA 02111-1307, USA.  */
 
 
 #define memchr __memchr
 #define memchr __memchr
+#define getgid __getgid
 
 
 #include <assert.h>
 #include <assert.h>
 #include <errno.h>
 #include <errno.h>

+ 1 - 1
libc/string/generic/bp-checks.h

@@ -92,7 +92,7 @@ extern void *__unbounded __ubp_memchr (const void *__unbounded, int, unsigned);
    cover a region of NBYTES.  Such a vector occupies one byte per page
    cover a region of NBYTES.  Such a vector occupies one byte per page
    of memory.  */
    of memory.  */
 # define CHECK_N_PAGES(ARG, NBYTES)				\
 # define CHECK_N_PAGES(ARG, NBYTES)				\
-  ({ int _page_size_ = sysconf (_SC_PAGE_SIZE);			\
+  ({ int _page_size_ = __sysconf (_SC_PAGE_SIZE);			\
      CHECK_N ((const char *) (ARG),				\
      CHECK_N ((const char *) (ARG),				\
 	      ((NBYTES) + _page_size_ - 1) / _page_size_); })
 	      ((NBYTES) + _page_size_ - 1) / _page_size_); })
 
 

+ 2 - 0
libc/sysdeps/linux/common/clock_getres.c

@@ -19,6 +19,8 @@
  *
  *
  */
  */
 
 
+#define sysconf __sysconf
+
 #define _GNU_SOURCE
 #define _GNU_SOURCE
 #include "syscalls.h"
 #include "syscalls.h"
 #include <time.h>
 #include <time.h>

+ 5 - 2
libc/sysdeps/linux/common/getegid.c

@@ -7,19 +7,22 @@
  * GNU Library General Public License (LGPL) version 2 or later.
  * GNU Library General Public License (LGPL) version 2 or later.
  */
  */
 
 
+#define getgid __getgid
+
 #include "syscalls.h"
 #include "syscalls.h"
 #include <unistd.h>
 #include <unistd.h>
 
 
 #ifdef	__NR_getegid
 #ifdef	__NR_getegid
 #define __NR___syscall_getegid __NR_getegid
 #define __NR___syscall_getegid __NR_getegid
 static inline _syscall0(int, __syscall_getegid);
 static inline _syscall0(int, __syscall_getegid);
-gid_t getegid(void)
+gid_t attribute_hidden __getegid(void)
 {
 {
 	return (__syscall_getegid());
 	return (__syscall_getegid());
 }
 }
 #else
 #else
-gid_t getegid(void)
+gid_t attribute_hidden __getegid(void)
 {
 {
 	return (getgid());
 	return (getgid());
 }
 }
 #endif
 #endif
+strong_alias(__getegid,getegid)

+ 2 - 1
libc/sysdeps/linux/common/getgid.c

@@ -16,7 +16,8 @@
 #endif
 #endif
 
 
 static inline _syscall0(int, __syscall_getgid);
 static inline _syscall0(int, __syscall_getgid);
-gid_t getgid(void)
+gid_t attribute_hidden __getgid(void)
 {
 {
 	return (__syscall_getgid());
 	return (__syscall_getgid());
 }
 }
+strong_alias(__getgid,getgid)

+ 2 - 0
libc/sysdeps/linux/common/getgroups.c

@@ -7,6 +7,8 @@
  * GNU Library General Public License (LGPL) version 2 or later.
  * GNU Library General Public License (LGPL) version 2 or later.
  */
  */
 
 
+#define sysconf __sysconf
+
 #include "syscalls.h"
 #include "syscalls.h"
 #include <unistd.h>
 #include <unistd.h>
 
 

+ 2 - 0
libc/sysdeps/linux/common/setgroups.c

@@ -7,6 +7,8 @@
  * GNU Library General Public License (LGPL) version 2 or later.
  * GNU Library General Public License (LGPL) version 2 or later.
  */
  */
 
 
+#define sysconf __sysconf
+
 #include "syscalls.h"
 #include "syscalls.h"
 #include <unistd.h>
 #include <unistd.h>
 #include <grp.h>
 #include <grp.h>

+ 2 - 0
libc/sysdeps/linux/common/ulimit.c

@@ -18,6 +18,8 @@
  *
  *
  */
  */
 
 
+#define sysconf __sysconf
+
 #define _GNU_SOURCE
 #define _GNU_SOURCE
 #define _LARGEFILE64_SOURCE
 #define _LARGEFILE64_SOURCE
 #include <features.h>
 #include <features.h>

+ 2 - 3
libc/unistd/sysconf.c

@@ -70,7 +70,7 @@
 #endif /* _UCLIBC_GENERATE_SYSCONF_ARCH */
 #endif /* _UCLIBC_GENERATE_SYSCONF_ARCH */
 
 
 /* Get the value of the system variable NAME.  */
 /* Get the value of the system variable NAME.  */
-long int __sysconf(int name)
+long int attribute_hidden __sysconf(int name)
 {
 {
   switch (name)
   switch (name)
     {
     {
@@ -882,5 +882,4 @@ long int __sysconf(int name)
 #endif
 #endif
     }
     }
 }
 }
-weak_alias(__sysconf, sysconf);
+strong_alias(__sysconf,sysconf)
-