diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2005-12-03 00:34:49 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2005-12-03 00:34:49 +0000 |
commit | c885bf5cf94a12202f849477a845d728cbd12889 (patch) | |
tree | 106e36d57ea684166ebde05a8d4be54664e0e6ce /libc | |
parent | ca3067b8cec6e7ffd600c92510197df5aedd8606 (diff) |
More hiding, including __mempcpy
Diffstat (limited to 'libc')
115 files changed, 393 insertions, 217 deletions
diff --git a/libc/inet/getaddrinfo.c b/libc/inet/getaddrinfo.c index d2d0e151e..c467fed69 100644 --- a/libc/inet/getaddrinfo.c +++ b/libc/inet/getaddrinfo.c @@ -44,8 +44,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /* This software is Copyright 1996 by Craig Metz, All Rights Reserved. */ -/* strdupa is using these */ +#define getservbyname_r __getservbyname_r #if 0 +#define stpcpy __stpcpy +/* strdupa is using these */ #define memcpy __memcpy #define strlen __strlen #endif @@ -246,7 +248,7 @@ gaih_local (const char *name, const struct gaih_service *service, sizeof (sunp->sun_path)) return GAIH_OKIFUNSPEC | -EAI_SERVICE; - __stpcpy (__stpcpy (sunp->sun_path, P_tmpdir "/"), service->name); + stpcpy (stpcpy (sunp->sun_path, P_tmpdir "/"), service->name); } } else diff --git a/libc/inet/getnetbyad.c b/libc/inet/getnetbyad.c index 0776ed7cf..a257a1bd7 100644 --- a/libc/inet/getnetbyad.c +++ b/libc/inet/getnetbyad.c @@ -15,6 +15,10 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ +#define setnetent __setnetent +#define getnetent __getnetent +#define endnetent __endnetent + #define __FORCE_GLIBC #include <features.h> #include <netdb.h> diff --git a/libc/inet/getnetbynm.c b/libc/inet/getnetbynm.c index 5479c654b..f4e9b817e 100644 --- a/libc/inet/getnetbynm.c +++ b/libc/inet/getnetbynm.c @@ -15,6 +15,10 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ +#define setnetent __setnetent +#define getnetent __getnetent +#define endnetent __endnetent + #define __FORCE_GLIBC #include <features.h> #include <netdb.h> diff --git a/libc/inet/getnetent.c b/libc/inet/getnetent.c index 181c5adfe..fc21dfa03 100644 --- a/libc/inet/getnetent.c +++ b/libc/inet/getnetent.c @@ -44,7 +44,7 @@ static char *net_aliases[MAXALIASES]; int _net_stayopen; -void setnetent(int f) +void attribute_hidden __setnetent(int f) { LOCK; if (netf == NULL) @@ -55,8 +55,9 @@ void setnetent(int f) UNLOCK; return; } +strong_alias(__setnetent,setnetent) -void endnetent(void) +void attribute_hidden __endnetent(void) { LOCK; if (netf) { @@ -66,6 +67,7 @@ void endnetent(void) _net_stayopen = 0; UNLOCK; } +strong_alias(__endnetent,endnetent) static char * any(register char *cp, char *match) { @@ -80,7 +82,7 @@ static char * any(register char *cp, char *match) return ((char *)0); } -struct netent * getnetent(void) +struct netent attribute_hidden * __getnetent(void) { char *p; register char *cp, **q; @@ -139,4 +141,4 @@ again: UNLOCK; return (&net); } - +strong_alias(__getnetent,getnetent) diff --git a/libc/inet/getservice.c b/libc/inet/getservice.c index d5402ba3e..e4422246b 100644 --- a/libc/inet/getservice.c +++ b/libc/inet/getservice.c @@ -98,7 +98,7 @@ static void __initbuf(void) } } -void setservent(int f) +extern void attribute_hidden __setservent(int f) { LOCK; if (servf == NULL) @@ -108,8 +108,9 @@ void setservent(int f) serv_stayopen |= f; UNLOCK; } +strong_alias(__setservent,setservent) -void endservent(void) +extern void attribute_hidden __endservent(void) { LOCK; if (servf) { @@ -119,37 +120,9 @@ void endservent(void) serv_stayopen = 0; UNLOCK; } +strong_alias(__endservent,endservent) -struct servent * getservent(void) -{ - struct servent *result; - - __initbuf(); - getservent_r(&serv, servbuf, SBUFSIZE, &result); - return result; -} - - -struct servent *getservbyname(const char *name, const char *proto) -{ - struct servent *result; - - __initbuf(); - getservbyname_r(name, proto, &serv, servbuf, SBUFSIZE, &result); - return result; -} - - -struct servent * getservbyport(int port, const char *proto) -{ - struct servent *result; - - __initbuf(); - getservbyport_r(port, proto, &serv, servbuf, SBUFSIZE, &result); - return result; -} - -int getservent_r(struct servent * result_buf, +extern int attribute_hidden __getservent_r(struct servent * result_buf, char * buf, size_t buflen, struct servent ** result) { @@ -228,8 +201,18 @@ again: |