summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-12-04 01:08:42 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-12-04 01:08:42 +0000
commit765696aac59b7146777e4dfda0d8d35df0bb29e1 (patch)
treea1f2f8ce19de35f8030e8e388a3b962a2bff8cc7 /libc
parent855dca36fe7aa348dc56996385fbbb77fbf3e83d (diff)
More hiding, 300 left
Diffstat (limited to 'libc')
-rw-r--r--libc/inet/hostid.c3
-rw-r--r--libc/inet/rpc/auth_unix.c1
-rw-r--r--libc/inet/rpc/clnt_perror.c9
-rw-r--r--libc/inet/rpc/clnt_tcp.c1
-rw-r--r--libc/inet/rpc/clnt_udp.c2
-rw-r--r--libc/inet/rpc/clnt_unix.c1
-rw-r--r--libc/inet/rpc/getrpcport.c2
-rw-r--r--libc/inet/rpc/pmap_getport.c9
-rw-r--r--libc/inet/rpc/rcmd.c1
-rw-r--r--libc/inet/rpc/rexec.c16
-rw-r--r--libc/inet/rpc/ruserpass.c5
-rw-r--r--libc/inet/rpc/svc.c14
-rw-r--r--libc/inet/rpc/svc_simple.c3
-rw-r--r--libc/inet/rpc/svc_unix.c1
-rw-r--r--libc/inet/rpc/xdr.c14
-rw-r--r--libc/misc/dirent/scandir.c2
-rw-r--r--libc/misc/dirent/scandir64.c2
-rw-r--r--libc/misc/ftw/ftw.c1
-rw-r--r--libc/misc/glob/glob.c1
-rw-r--r--libc/misc/internals/__uClibc_main.c2
-rw-r--r--libc/misc/ttyent/getttyent.c66
-rw-r--r--libc/misc/wordexp/wordexp.c2
-rw-r--r--libc/stdio/_stdio.h2
-rw-r--r--libc/stdio/popen.c1
-rw-r--r--libc/stdio/scanf.c1
-rw-r--r--libc/stdio/setbuf.c2
-rw-r--r--libc/stdio/setbuffer.c2
-rw-r--r--libc/stdio/setlinebuf.c2
-rw-r--r--libc/stdio/setvbuf.c3
-rw-r--r--libc/stdio/ungetc.c3
-rw-r--r--libc/stdlib/malloc-simple/alloc.c2
-rw-r--r--libc/stdlib/malloc-standard/free.c2
-rw-r--r--libc/stdlib/malloc/free.c2
-rw-r--r--libc/stdlib/stdlib.c3
-rw-r--r--libc/stdlib/system.c1
-rw-r--r--libc/stdlib/unix_grantpt.c1
-rw-r--r--libc/sysdeps/linux/common/execve.c3
-rw-r--r--libc/sysdeps/linux/common/fchdir.c4
-rw-r--r--libc/sysdeps/linux/common/geteuid.c7
-rw-r--r--libc/sysdeps/linux/common/getuid.c3
-rw-r--r--libc/sysdeps/linux/common/munmap.c4
-rw-r--r--libc/unistd/exec.c11
-rw-r--r--libc/unistd/getpass.c2
43 files changed, 140 insertions, 79 deletions
diff --git a/libc/inet/hostid.c b/libc/inet/hostid.c
index be3bacb96..1a3e05113 100644
--- a/libc/inet/hostid.c
+++ b/libc/inet/hostid.c
@@ -1,3 +1,6 @@
+#define geteuid __geteuid
+#define getuid __getuid
+
#define __FORCE_GLIBC
#include <features.h>
#include <stdio.h>
diff --git a/libc/inet/rpc/auth_unix.c b/libc/inet/rpc/auth_unix.c
index 0ae5fe6a9..9c16774fd 100644
--- a/libc/inet/rpc/auth_unix.c
+++ b/libc/inet/rpc/auth_unix.c
@@ -40,6 +40,7 @@
#define sysconf __sysconf
#define getegid __getegid
+#define geteuid __geteuid
#define xdrmem_create __xdrmem_create
#define __FORCE_GLIBC
diff --git a/libc/inet/rpc/clnt_perror.c b/libc/inet/rpc/clnt_perror.c
index 595ddde9a..6561e2631 100644
--- a/libc/inet/rpc/clnt_perror.c
+++ b/libc/inet/rpc/clnt_perror.c
@@ -302,8 +302,8 @@ clnt_perrno (enum clnt_stat num)
}
-char *
-clnt_spcreateerror (const char *msg)
+char attribute_hidden *
+__clnt_spcreateerror (const char *msg)
{
char chrbuf[1024];
char *str = _buf ();
@@ -345,16 +345,17 @@ clnt_spcreateerror (const char *msg)
*++cp = '\0';
return str;
}
+strong_alias(__clnt_spcreateerror,clnt_spcreateerror)
void
clnt_pcreateerror (const char *msg)
{
#ifdef USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
- (void) __fwprintf (stderr, L"%s", clnt_spcreateerror (msg));
+ (void) __fwprintf (stderr, L"%s", __clnt_spcreateerror (msg));
else
#endif
- (void) fputs (clnt_spcreateerror (msg), stderr);
+ (void) fputs (__clnt_spcreateerror (msg), stderr);
}
struct auth_errtab
diff --git a/libc/inet/rpc/clnt_tcp.c b/libc/inet/rpc/clnt_tcp.c
index 11f790529..c04265d8f 100644
--- a/libc/inet/rpc/clnt_tcp.c
+++ b/libc/inet/rpc/clnt_tcp.c
@@ -53,6 +53,7 @@ static char sccsid[] = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro";
#define authnone_create __authnone_create
#define xdrrec_create __xdrrec_create
#define xdrmem_create __xdrmem_create
+#define pmap_getport __pmap_getport
#define __FORCE_GLIBC
#include <features.h>
diff --git a/libc/inet/rpc/clnt_udp.c b/libc/inet/rpc/clnt_udp.c
index 2b84f5b82..4aba505b2 100644
--- a/libc/inet/rpc/clnt_udp.c
+++ b/libc/inet/rpc/clnt_udp.c
@@ -43,6 +43,8 @@ static char sccsid[] = "@(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro";
#define authnone_create __authnone_create
#define xdrmem_create __xdrmem_create
+#define pmap_getport __pmap_getport
+
#define __FORCE_GLIBC
#include <features.h>
diff --git a/libc/inet/rpc/clnt_unix.c b/libc/inet/rpc/clnt_unix.c
index 7372e51b9..3af68d9c8 100644
--- a/libc/inet/rpc/clnt_unix.c
+++ b/libc/inet/rpc/clnt_unix.c
@@ -50,6 +50,7 @@
#define xdrrec_create __xdrrec_create
#define xdrmem_create __xdrmem_create
#define getegid __getegid
+#define geteuid __geteuid
#define __FORCE_GLIBC
#include <features.h>
diff --git a/libc/inet/rpc/getrpcport.c b/libc/inet/rpc/getrpcport.c
index 5470fbff6..518d190f8 100644
--- a/libc/inet/rpc/getrpcport.c
+++ b/libc/inet/rpc/getrpcport.c
@@ -35,6 +35,8 @@ static char sccsid[] = "@(#)getrpcport.c 1.3 87/08/11 SMI";
* Copyright (c) 1985 by Sun Microsystems, Inc.
*/
+#define pmap_getport __pmap_getport
+
#define __FORCE_GLIBC
#include <features.h>
diff --git a/libc/inet/rpc/pmap_getport.c b/libc/inet/rpc/pmap_getport.c
index 45ed4eae8..79492747b 100644
--- a/libc/inet/rpc/pmap_getport.c
+++ b/libc/inet/rpc/pmap_getport.c
@@ -53,12 +53,8 @@ static const struct timeval tottimeout =
* Calls the pmap service remotely to do the lookup.
* Returns 0 if no map exists.
*/
-u_short
-pmap_getport (address, program, version, protocol)
- struct sockaddr_in *address;
- u_long program;
- u_long version;
- u_int protocol;
+u_short attribute_hidden
+__pmap_getport (struct sockaddr_in *address, u_long program, u_long version, u_int protocol)
{
u_short port = 0;
int socket = -1;
@@ -92,3 +88,4 @@ pmap_getport (address, program, version, protocol)
address->sin_port = 0;
return port;
}
+strong_alias(__pmap_getport,pmap_getport)
diff --git a/libc/inet/rpc/rcmd.c b/libc/inet/rpc/rcmd.c
index e050480ce..43fe44cc2 100644
--- a/libc/inet/rpc/rcmd.c
+++ b/libc/inet/rpc/rcmd.c
@@ -38,6 +38,7 @@ static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94";
#define bcopy __bcopy
#define sysconf __sysconf
#define getline __getline
+#define geteuid __geteuid
#define __FORCE_GLIBC
#include <features.h>
diff --git a/libc/inet/rpc/rexec.c b/libc/inet/rpc/rexec.c
index 00e68ff6b..b93cf7644 100644
--- a/libc/inet/rpc/rexec.c
+++ b/libc/inet/rpc/rexec.c
@@ -47,15 +47,10 @@ extern int __libc_sa_len (sa_family_t __af) __THROW attribute_hidden;
int rexecoptions;
char ahostbuf[NI_MAXHOST];
-extern int ruserpass(const char *host, const char **aname, const char **apass);
+extern int __ruserpass(const char *host, const char **aname, const char **apass) attribute_hidden;
-int
-rexec_af(ahost, rport, name, pass, cmd, fd2p, af)
- char **ahost;
- int rport;
- const char *name, *pass, *cmd;
- int *fd2p;
- sa_family_t af;
+int attribute_hidden
+__rexec_af(char **ahost, int rport, const char *name, const char *pass, const char *cmd, int *fd2p, sa_family_t af)
{
struct sockaddr_storage sa2, from;
struct addrinfo hints, *res0;
@@ -88,7 +83,7 @@ rexec_af(ahost, rport, name, pass, cmd, fd2p, af)
else{
*ahost = NULL;
}
- ruserpass(res0->ai_canonname, &name, &pass);
+ __ruserpass(res0->ai_canonname, &name, &pass);
retry:
s = socket(res0->ai_family, res0->ai_socktype, 0);
if (s < 0) {
@@ -179,6 +174,7 @@ bad:
freeaddrinfo(res0);
return (-1);
}
+strong_alias(__rexec_af,rexec_af)
int
rexec(ahost, rport, name, pass, cmd, fd2p)
@@ -187,5 +183,5 @@ rexec(ahost, rport, name, pass, cmd, fd2p)
const char *name, *pass, *cmd;
int *fd2p;
{
- return rexec_af(ahost, rport, name, pass, cmd, fd2p, AF_INET);
+ return __rexec_af(ahost, rport, name, pass, cmd, fd2p, AF_INET);
}
diff --git a/libc/inet/rpc/ruserpass.c b/libc/inet/rpc/ruserpass.c
index edb5170e9..b6fd482c5 100644
--- a/libc/inet/rpc/ruserpass.c
+++ b/libc/inet/rpc/ruserpass.c
@@ -29,7 +29,9 @@
#define __fsetlocking __fsetlocking_internal
#define getgid __getgid
+#define getuid __getuid
#define getegid __getegid
+#define geteuid __geteuid
#define __FORCE_GLIBC
#include <features.h>
@@ -95,7 +97,7 @@ static const struct toktab {
-int ruserpass(const char *host, const char **aname, const char **apass)
+int attribute_hidden __ruserpass(const char *host, const char **aname, const char **apass)
{
char *hdir, *buf, *tmp;
char myname[1024], *mydomain;
@@ -292,6 +294,7 @@ bad:
(void) fclose(cfile);
return (-1);
}
+strong_alias(__ruserpass,ruserpass)
static int
token()
diff --git a/libc/inet/rpc/svc.c b/libc/inet/rpc/svc.c
index b14cbd803..faccab58e 100644
--- a/libc/inet/rpc/svc.c
+++ b/libc/inet/rpc/svc.c
@@ -230,8 +230,8 @@ svc_unregister (rpcprog_t prog, rpcvers_t vers)
/* ******************* REPLY GENERATION ROUTINES ************ */
/* Send a reply to an rpc request */
-bool_t
-svc_sendreply (register SVCXPRT *xprt, xdrproc_t xdr_results,
+bool_t attribute_hidden
+__svc_sendreply (register SVCXPRT *xprt, xdrproc_t xdr_results,
caddr_t xdr_location)
{
struct rpc_msg rply;
@@ -244,6 +244,7 @@ svc_sendreply (register SVCXPRT *xprt, xdrproc_t xdr_results,
rply.acpted_rply.ar_results.proc = xdr_results;
return SVC_REPLY (xprt, &rply);
}
+strong_alias(__svc_sendreply,svc_sendreply)
/* No procedure error reply */
void
@@ -285,8 +286,8 @@ svcerr_systemerr (register SVCXPRT *xprt)
}
/* Authentication error reply */
-void
-svcerr_auth (SVCXPRT *xprt, enum auth_stat why)
+void attribute_hidden
+__svcerr_auth (SVCXPRT *xprt, enum auth_stat why)
{
struct rpc_msg rply;
@@ -296,12 +297,13 @@ svcerr_auth (SVCXPRT *xprt, enum auth_stat why)
rply.rjcted_rply.rj_why = why;
SVC_REPLY (xprt, &rply);
}
+strong_alias(__svcerr_auth,svcerr_auth)
/* Auth too weak error reply */
void
svcerr_weakauth (SVCXPRT *xprt)
{
- svcerr_auth (xprt, AUTH_TOOWEAK);
+ __svcerr_auth (xprt, AUTH_TOOWEAK);
}
/* Program unavailable error reply */
@@ -446,7 +448,7 @@ svc_getreq_common (const int fd)
}
else if ((why = _authenticate (&r, &msg)) != AUTH_OK)
{
- svcerr_auth (xprt, why);
+ __svcerr_auth (xprt, why);
goto call_done;
}
diff --git a/libc/inet/rpc/svc_simple.c b/libc/inet/rpc/svc_simple.c
index da3c71211..e9a43b97a 100644
--- a/libc/inet/rpc/svc_simple.c
+++ b/libc/inet/rpc/svc_simple.c
@@ -37,6 +37,9 @@ static char sccsid[] = "@(#)svc_simple.c 1.18 87/08/11 Copyr 1984 Sun Micro";
*
* Copyright (C) 1984, Sun Microsystems, Inc.
*/
+
+#define svc_sendreply __svc_sendreply
+
#define __FORCE_GLIBC
#define _GNU_SOURCE
#include <features.h>
diff --git a/libc/inet/rpc/svc_unix.c b/libc/inet/rpc/svc_unix.c
index 5d3025876..bc4cb2c20 100644
--- a/libc/inet/rpc/svc_unix.c
+++ b/libc/inet/rpc/svc_unix.c
@@ -40,6 +40,7 @@
#define xdrrec_create __xdrrec_create
#define xprt_register __xprt_register
#define getegid __getegid
+#define geteuid __geteuid
#define __FORCE_GLIBC
#include <features.h>
diff --git a/libc/inet/rpc/xdr.c b/libc/inet/rpc/xdr.c
index 7d69022dc..46e214431 100644
--- a/libc/inet/rpc/xdr.c
+++ b/libc/inet/rpc/xdr.c
@@ -220,8 +220,8 @@ xdr_u_long (XDR *xdrs, u_long *ulp)
* XDR hyper integers
* same as xdr_u_hyper - open coded to save a proc call!
*/
-bool_t
-xdr_hyper (XDR *xdrs, quad_t *llp)
+bool_t attribute_hidden
+__xdr_hyper (XDR *xdrs, quad_t *llp)
{
long t1;
unsigned long int t2;
@@ -247,14 +247,15 @@ xdr_hyper (XDR *xdrs, quad_t *llp)
return FALSE;
}
+strong_alias(__xdr_hyper,xdr_hyper)
/*
* XDR hyper integers
* same as xdr_hyper - open coded to save a proc call!
*/
-bool_t
-xdr_u_hyper (XDR *xdrs, u_quad_t *ullp)
+bool_t attribute_hidden
+__xdr_u_hyper (XDR *xdrs, u_quad_t *ullp)
{
unsigned long t1;
unsigned long t2;
@@ -280,17 +281,18 @@ xdr_u_hyper (XDR *xdrs, u_quad_t *ullp)
return FALSE;
}
+strong_alias(__xdr_u_hyper,xdr_u_hyper)
bool_t
xdr_longlong_t (XDR *xdrs, quad_t *llp)
{
- return xdr_hyper (xdrs, llp);
+ return __xdr_hyper (xdrs, llp);
}
bool_t
xdr_u_longlong_t (XDR *xdrs, u_quad_t *ullp)
{
- return xdr_u_hyper (xdrs, ullp);
+ return __xdr_u_hyper (xdrs, ullp);
}
/*
diff --git a/libc/misc/dirent/scandir.c b/libc/misc/dirent/scandir.c
index 8b08e4884..e80df58dc 100644
--- a/libc/misc/dirent/scandir.c
+++ b/libc/misc/dirent/scandir.c
@@ -20,6 +20,8 @@
/* Modified for uClibc by Erik Andersen
*/
+#define qsort __qsort
+
#include <dirent.h>
#include <stdio.h>
#include <string.h>
diff --git a/libc/misc/dirent/scandir64.c b/libc/misc/dirent/scandir64.c
index 2916285eb..46b6d5cef 100644
--- a/libc/misc/dirent/scandir64.c
+++ b/libc/misc/dirent/scandir64.c
@@ -20,6 +20,8 @@
/* Modified for uClibc by Erik Andersen
*/
+#define qsort __qsort
+
#include <features.h>
#ifdef __UCLIBC_HAS_LFS__
#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS != 64
diff --git a/libc/misc/ftw/ftw.c b/libc/misc/ftw/ftw.c
index 58a9c3177..6bd36d749 100644
--- a/libc/misc/ftw/ftw.c
+++ b/libc/misc/ftw/ftw.c
@@ -25,6 +25,7 @@
#define stpcpy __stpcpy
#define tsearch __tsearch
#define tdestroy __tdestroy
+#define fchdir __fchdir
#define _GNU_SOURCE
#include <features.h>
diff --git a/libc/misc/glob/glob.c b/libc/misc/glob/glob.c
index 22f1874ab..3fc20dbc2 100644
--- a/libc/misc/glob/glob.c
+++ b/libc/misc/glob/glob.c
@@ -17,6 +17,7 @@ Cambridge, MA 02139, USA. */
#define strrchr __strrchr
#define strcoll __strcoll
+#define qsort __qsort
#include <features.h>
#include <stdlib.h>
diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c
index a46465398..618fad74c 100644
--- a/libc/misc/internals/__uClibc_main.c
+++ b/libc/misc/internals/__uClibc_main.c
@@ -14,7 +14,9 @@
*/
#define getgid __getgid
+#define getuid __getuid
#define getegid __getegid
+#define geteuid __geteuid
#define _ERRNO_H
#include <features.h>
diff --git a/libc/misc/ttyent/getttyent.c b/libc/misc/ttyent/getttyent.c
index 923c45ab0..04f511921 100644
--- a/libc/misc/ttyent/getttyent.c
+++ b/libc/misc/ttyent/getttyent.c
@@ -46,19 +46,6 @@ static FILE *tf;
static struct ttyent tty;
-struct ttyent * getttynam(const char *tty)
-{
- register struct ttyent *t;
-
- setttyent();
- while ((t = getttyent()))
- if (!__strcmp(tty, t->ty_name))
- break;
- endttyent();
- return (t);
-}
-
-
/* Skip over the current field, removing quotes, and return
* a pointer to the next field.
*/
@@ -101,13 +88,30 @@ static char * value(register char *p)
return ((p = __strchr(p, '=')) ? ++p : NULL);
}
-struct ttyent * getttyent(void)
+int attribute_hidden __setttyent(void)
+{
+
+ if (tf) {
+ rewind(tf);
+ return (1);
+ } else if ((tf = fopen(_PATH_TTYS, "r"))) {
+ /* We do the locking ourselves. */
+#ifdef __UCLIBC_HAS_THREADS__
+ __fsetlocking (tf, FSETLOCKING_BYCALLER);
+#endif
+ return (1);
+ }
+ return (0);
+}
+strong_alias(__setttyent,setttyent)
+
+struct ttyent attribute_hidden * __getttyent(void)
{
register int c;
register char *p;
static char *line = NULL;
- if (!tf && !setttyent())
+ if (!tf && !__setttyent())
return (NULL);
if (!line) {
@@ -177,24 +181,9 @@ struct ttyent * getttyent(void)
*p = '\0';
return (&tty);
}
+strong_alias(__getttyent,getttyent)
-int setttyent(void)
-{
-
- if (tf) {
- rewind(tf);
- return (1);
- } else if ((tf = fopen(_PATH_TTYS, "r"))) {
- /* We do the locking ourselves. */
-#ifdef __UCLIBC_HAS_THREADS__
- __fsetlocking (tf, FSETLOCKING_BYCALLER);
-#endif
- return (1);
- }
- return (0);
-}
-
-int endttyent(void)
+int attribute_hidden __endttyent(void)
{
int rval;
@@ -205,3 +194,16 @@ int endttyent(void)
}
return (1);
}
+strong_alias(__endttyent,endttyent)
+
+struct ttyent * getttynam(const char *tty)
+{
+ register struct ttyent *t;
+
+ __setttyent();
+ while ((t = __getttyent()))
+ if (!__strcmp(tty, t->ty_name))
+ break;
+ __endttyent();
+ return (t);
+}
diff --git a/libc/misc/wordexp/wordexp.c b/libc/misc/wordexp/wordexp.c
index ea69bc684..9cdeaf162 100644
--- a/libc/misc/wordexp/wordexp.c
+++ b/libc/misc/wordexp/wordexp.c
@@ -26,6 +26,8 @@
#define unsetenv __unsetenv
#define waitpid __waitpid
#define kill __kill
+#define getuid __getuid
+#define execve __execve
#define _GNU_SOURCE
#include <sys/cdefs.h>
diff --git a/libc/stdio/_stdio.h b/libc/stdio/_stdio.h
index 85a00bb95..e4aa5d740 100644
--- a/libc/stdio/_stdio.h
+++ b/libc/stdio/_stdio.h
@@ -260,6 +260,8 @@ extern int __stdio_trans2w(FILE *__restrict stream) attribute_hidden;
extern int __stdio_trans2r_o(FILE *__restrict stream, int oflag) attribute_hidden;
extern int __stdio_trans2w_o(FILE *__restrict stream, int oflag) attribute_hidden;
+extern int __setvbuf (FILE *__restrict __stream, char *__restrict __buf,
+ int __modes, size_t __n) __THROW attribute_hidden;
/**********************************************************************/
#ifdef __STDIO_BUFFERS
diff --git a/libc/stdio/popen.c b/libc/stdio/popen.c
index 45ac6f17f..354227593 100644
--- a/libc/stdio/popen.c
+++ b/libc/stdio/popen.c
@@ -15,6 +15,7 @@
*/
#define waitpid __waitpid
+#define execl __execl
#include <stdio.h>
#include <stdlib.h>
diff --git a/libc/stdio/scanf.c b/libc/stdio/scanf.c
index af1018636..19484d588 100644
--- a/libc/stdio/scanf.c
+++ b/libc/stdio/scanf.c
@@ -46,6 +46,7 @@
#define wcslen __wcslen
#define mbsrtowcs __mbsrtowcs
#define mbrtowc __mbrtowc
+#define ungetc __ungetc
#define _ISOC99_SOURCE /* for LLONG_MAX primarily... */
#define _GNU_SOURCE
diff --git a/libc/stdio/setbuf.c b/libc/stdio/setbuf.c
index 21158638b..02a4736ac 100644
--- a/libc/stdio/setbuf.c
+++ b/libc/stdio/setbuf.c
@@ -10,6 +10,6 @@
void setbuf(FILE * __restrict stream, register char * __restrict buf)
{
#ifdef __STDIO_BUFFERS
- setvbuf(stream, buf, ((buf != NULL) ? _IOFBF : _IONBF), BUFSIZ);
+ __setvbuf(stream, buf, ((buf != NULL) ? _IOFBF : _IONBF), BUFSIZ);
#endif
}
diff --git a/libc/stdio/setbuffer.c b/libc/stdio/setbuffer.c
index ccd4d275e..d1f12a1af 100644
--- a/libc/stdio/setbuffer.c
+++ b/libc/stdio/setbuffer.c
@@ -16,6 +16,6 @@ void setbuffer(FILE * __restrict stream, register char * __restrict buf,
size_t size)
{
#ifdef __STDIO_BUFFERS
- setvbuf(stream, buf, (buf ? _IOFBF : _IONBF), size);
+ __setvbuf(stream, buf, (buf ? _IOFBF : _IONBF), size);
#endif
}
diff --git a/libc/stdio/setlinebuf.c b/libc/stdio/setlinebuf.c
index 6147fa8f4..56e89e11b 100644
--- a/libc/stdio/setlinebuf.c
+++ b/libc/stdio/setlinebuf.c
@@ -15,6 +15,6 @@
void setlinebuf(FILE * __restrict stream)
{
#ifdef __STDIO_BUFFERS
- setvbuf(stream, NULL, _IOLBF, (size_t) 0);
+ __setvbuf(stream, NULL, _IOLBF, (size_t) 0);
#endif
}
diff --git a/libc/stdio/setvbuf.c b/libc/stdio/setvbuf.c
index 3fe62c6a8..d12d1576a 100644
--- a/libc/stdio/setvbuf.c
+++ b/libc/stdio/setvbuf.c
@@ -14,7 +14,7 @@
#error Assumption violated for buffering mode flags
#endif
-int setvbuf(register FILE * __restrict stream, register char * __restrict buf,
+int attribute_hidden __setvbuf(register FILE * __restrict stream, register char * __restrict buf,
int mode, size_t size)
{
#ifdef __STDIO_BUFFERS
@@ -104,3 +104,4 @@ int setvbuf(register FILE * __restrict stream, register char * __restrict buf,
#endif
}
+strong_alias(__setvbuf,setvbuf)
diff --git a/libc/stdio/ungetc.c b/libc/stdio/ungetc.c
index 1b9197a18..de3f1d16b 100644
--- a/libc/stdio/ungetc.c
+++ b/libc/stdio/ungetc.c
@@ -24,7 +24,7 @@
* (See section 7.19.6.2 of the C9X rationale -- WG14/N897.)
*/
-int ungetc(int c, register FILE *stream)
+int attribute_hidden __ungetc(int c, register FILE *stream)
{
__STDIO_AUTO_THREADLOCK_VAR;
@@ -75,3 +75,4 @@ int ungetc(int c, register FILE *stream)
return c;
}
+strong_alias(__ungetc,ungetc)
diff --git a/libc/stdlib/malloc-simple/alloc.c b/libc/stdlib/malloc-simple/alloc.c
index 7f0a91f0b..382f8db44 100644
--- a/libc/stdlib/malloc-simple/alloc.c
+++ b/libc/stdlib/malloc-simple/alloc.c
@@ -6,6 +6,8 @@
* Parts of the memalign code were stolen from malloc-930716.
*/
+#define munmap __munmap
+
#define _GNU_SOURCE
#include <features.h>
#include <unistd.h>
diff --git a/libc/stdlib/malloc-standard/free.c b/libc/stdlib/malloc-standard/free.c
index 94e1d65b1..aa8edec97 100644
--- a/libc/stdlib/malloc-standard/free.c
+++ b/libc/stdlib/malloc-standard/free.c
@@ -14,6 +14,8 @@
Hacked up for uClibc by Erik Andersen <andersen@codepoet.org>
*/
+#define munmap __munmap
+
#include "malloc.h"
diff --git a/libc/stdlib/malloc/free.c b/libc/stdlib/malloc/free.c
index 88684e6df..eb35e78ee 100644
--- a/libc/stdlib/malloc/free.c
+++ b/libc/stdlib/malloc/free.c
@@ -11,6 +11,8 @@
* Written by Miles Bader <miles@gnu.org>
*/
+#define munmap __munmap
+
#include <stdlib.h>
#include <unistd.h>
#include <sys/mman.h>
diff --git a/libc/stdlib/stdlib.c b/libc/stdlib/stdlib.c
index fb8ce186b..04c85d32f 100644
--- a/libc/stdlib/stdlib.c
+++ b/libc/stdlib/stdlib.c
@@ -750,7 +750,7 @@ void *bsearch(const void *key, const void *base, size_t /* nmemb */ high,
* calculation, as well as to reduce the generated code size with
* bcc and gcc. */
-void qsort (void *base,
+void attribute_hidden __qsort (void *base,
size_t nel,
size_t width,
int (*comp)(const void *, const void *))
@@ -795,6 +795,7 @@ void qsort (void *base,
} while (wgap);
}
}
+strong_alias(__qsort,qsort)
/* ---------- original snippets version below ---------- */
diff --git a/libc/stdlib/system.c b/libc/stdlib/system.c
index 7dba803ac..e268bf5ef 100644
--- a/libc/stdlib/system.c
+++ b/libc/stdlib/system.c
@@ -1,4 +1,5 @@
#define wait4 __wait4
+#define execl __execl
#include <stdio.h>
#include <stddef.h>
diff --git a/libc/stdlib/unix_grantpt.c b/libc/stdlib/unix_grantpt.c
index 9bd374978..1f1c4df5c 100644
--- a/libc/stdlib/unix_grantpt.c
+++ b/libc/stdlib/unix_grantpt.c
@@ -19,6 +19,7 @@
#define memchr __memchr
#define getgid __getgid
+#define getuid __getuid
#define setrlimit __setrlimit
#define waitpid __waitpid
diff --git a/libc/sysdeps/linux/common/execve.c b/libc/sysdeps/linux/common/execve.c
index cb5e86da7..8a95746ee 100644
--- a/libc/sysdeps/linux/common/execve.c
+++ b/libc/sysdeps/linux/common/execve.c
@@ -16,7 +16,8 @@
static inline _syscall3(int, __syscall_execve, const char *, filename,
char *const *, argv, char *const *, envp);
-int execve(const char * filename, char *const * argv, char *const * envp)
+int attribute_hidden __execve(const char * filename, char *const * argv, char *const * envp)
{
return __syscall_execve(filename, argv, envp);
}
+strong_alias(__execve,execve)
diff --git a/libc/sysdeps/linux/common/fchdir.c b/libc/sysdeps/linux/common/fchdir.c
index 55ee3a2a8..f4692cc2c 100644
--- a/libc/sysdeps/linux/common/fchdir.c
+++ b/libc/sysdeps/linux/common/fchdir.c
@@ -9,4 +9,6 @@
#include "syscalls.h"
#include <unistd.h>
-_syscall1(int, fchdir, int, fd);
+#define __NR___fchdir __NR_fchdir
+attribute_hidden _syscall1(int, __fchdir, int, fd);
+strong_alias(__fchdir,fchdir)
diff --git a/libc/sysdeps/linux/common/geteuid.c b/libc/sysdeps/linux/common/geteuid.c
index 10bcce735..3936739b3 100644
--- a/libc/sysdeps/linux/common/geteuid.c
+++ b/libc/sysdeps/linux/common/geteuid.c
@@ -7,19 +7,22 @@
* GNU Library General Public License (LGPL) version 2 or later.
*/
+#define getuid __getuid
+
#include "syscalls.h"
#include <unistd.h>
#ifdef __NR_geteuid
#define __NR___syscall_geteuid __NR_geteuid
static inline _syscall0(int, __syscall_geteuid);
-uid_t geteuid(void)
+uid_t attribute_hidden __geteuid(void)
{
return (__syscall_geteuid());
}
#else
-uid_t geteuid(void)
+uid_t attribute_hidden __geteuid(void)
{
return (getuid());
}
#endif
+strong_alias(__geteuid,geteuid)
diff --git a/libc/sysdeps/linux/common/getuid.c b/libc/sysdeps/linux/common/getuid.c
index 40d20f2dd..7c81ccf48 100644
--- a/libc/sysdeps/linux/common/getuid.c
+++ b/libc/sysdeps/linux/common/getuid.c
@@ -17,7 +17,8 @@
static inline _syscall0(int, __syscall_getuid);
-uid_t getuid(void)
+uid_t attribute_hidden __getuid(void)
{
return (__syscall_getuid());
}
+strong_alias(__getuid,getuid)
diff --git a/libc/sysdeps/linux/common/munmap.c b/libc/sysdeps/linux/common/munmap.c
index ff94f2235..be631060a 100644
--- a/libc/sysdeps/linux/common/munmap.c
+++ b/libc/sysdeps/linux/common/munmap.c
@@ -10,4 +10,6 @@
#include "syscalls.h"
#include <unistd.h>
#include <sys/mman.h>
-_syscall2(int, munmap, void *, start, size_t, length);
+#define __NR___munmap __NR_munmap
+attribute_hidden _syscall2(int, __munmap, void *, start, size_t, length);
+strong_alias(__munmap,munmap)
diff --git a/libc/unistd/exec.c b/libc/unistd/exec.c
index b09bdfef4..9793d9ad4 100644
--- a/libc/unistd/exec.c
+++ b/libc/unistd/exec.c
@@ -30,6 +30,9 @@
* to free the storage allocated for the copy. Better ideas anyone?
*/
+#define munmap __munmap
+#define execve __execve
+
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
@@ -91,7 +94,7 @@ void __exec_free(void *ptr, size_t size)
/**********************************************************************/
#ifdef L_execl
-int execl(const char *path, const char *arg, ...)
+int attribute_hidden __execl(const char *path, const char *arg, ...)
{
EXEC_ALLOC_SIZE(size) /* Do NOT add a semicolon! */
int n;
@@ -122,6 +125,7 @@ int execl(const char *path, const char *arg, ...)
return n;
}
+strong_alias(__execl,execl)
#endif
/**********************************************************************/
@@ -174,6 +178,8 @@ int execle(const char *path, const char *arg, ...)
/**********************************************************************/
#ifdef L_execlp
+extern int __execvp(const char *path, char *const argv[]) attribute_hidden;
+
int execlp(const char *file, const char *arg, ...)
{
EXEC_ALLOC_SIZE(size) /* Do NOT add a semicolon! */
@@ -215,7 +221,7 @@ int execlp(const char *file, const char *arg, ...)
* /bin, and then /usr/bin. */
static const char default_path[] = ":/bin:/usr/bin";
-int execvp(const char *path, char *const argv[])
+int attribute_hidden __execvp(const char *path, char *const argv[])
{
char *buf = NULL;
char *p;
@@ -312,6 +318,7 @@ int execvp(const char *path, char *const argv[])
return -1;
}
+strong_alias(__execvp,execvp)
#endif
/**********************************************************************/
diff --git a/libc/unistd/getpass.c b/libc/unistd/getpass.c
index 5dc6f5cf1..2af8f00a1 100644
--- a/libc/unistd/getpass.c
+++ b/libc/unistd/getpass.c
@@ -16,6 +16,8 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#define setvbuf __setvbuf
+
#include <stdio.h>
#include <string.h>
#include <termios.h>