From 855dca36fe7aa348dc56996385fbbb77fbf3e83d Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 3 Dec 2005 23:36:38 +0000 Subject: Rename newly created __libc_x (reserved for libpthread overwrites) w/ x_internal, do not use cascading aliases --- libc/inet/resolv.c | 24 ++++++++++++------------ libc/inet/rpc/clnt_udp.c | 2 +- libc/inet/rpc/rpc_dtablesize.c | 4 ++-- libc/inet/rpc/rpc_thread.c | 24 ++++++++++++------------ libc/inet/rpc/ruserpass.c | 2 +- libc/inet/rpc/svc.c | 10 +++++----- libc/inet/rpc/svc_auth.c | 4 ++-- libc/inet/rpc/svc_run.c | 4 ++-- libc/misc/ttyent/getttyent.c | 2 +- libc/stdio/__fsetlocking.c | 4 ++-- libc/stdio/_stdio.h | 4 ++-- libc/stdio/fgetc.c | 12 ++++++------ libc/stdio/fgets.c | 4 +--- libc/stdio/fputc.c | 12 ++++++------ libc/stdio/puts.c | 4 +--- libc/sysdeps/linux/common/cmsg_nxthdr.c | 5 ++--- libc/unistd/usershell.c | 2 +- 17 files changed, 59 insertions(+), 64 deletions(-) (limited to 'libc') diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index 18d186170..ba0fd4674 100644 --- a/libc/inet/resolv.c +++ b/libc/inet/resolv.c @@ -273,10 +273,10 @@ extern int __open_nameservers(void) attribute_hidden; extern void __close_nameservers(void) attribute_hidden; extern int __dn_expand(const u_char *, const u_char *, const u_char *, char *, int); -extern int __libc_ns_name_uncompress(const u_char *, const u_char *, +extern int __ns_name_uncompress_internal(const u_char *, const u_char *, const u_char *, char *, size_t) attribute_hidden; -extern int __libc_ns_name_ntop(const u_char *, char *, size_t) attribute_hidden; -extern int __libc_ns_name_unpack(const u_char *, const u_char *, const u_char *, +extern int __ns_name_ntop_internal(const u_char *, char *, size_t) attribute_hidden; +extern int __ns_name_unpack_internal(const u_char *, const u_char *, const u_char *, u_char *, size_t) attribute_hidden; @@ -2389,7 +2389,7 @@ int gethostbyaddr_r (const void *addr, socklen_t len, int type, int __dn_expand(const u_char *msg, const u_char *eom, const u_char *src, char *dst, int dstsiz) { - int n = __libc_ns_name_uncompress(msg, eom, src, dst, (size_t)dstsiz); + int n = __ns_name_uncompress_internal(msg, eom, src, dst, (size_t)dstsiz); if (n > 0 && dst[0] == '.') dst[0] = '\0'; @@ -2441,19 +2441,19 @@ static int special(int ch) * note: * Root domain returns as "." not "". */ -int attribute_hidden __libc_ns_name_uncompress(const u_char *msg, const u_char *eom, +int attribute_hidden __ns_name_uncompress_internal(const u_char *msg, const u_char *eom, const u_char *src, char *dst, size_t dstsiz) { u_char tmp[NS_MAXCDNAME]; int n; - if ((n = __libc_ns_name_unpack(msg, eom, src, tmp, sizeof tmp)) == -1) + if ((n = __ns_name_unpack_internal(msg, eom, src, tmp, sizeof tmp)) == -1) return (-1); - if (__libc_ns_name_ntop(tmp, dst, dstsiz) == -1) + if (__ns_name_ntop_internal(tmp, dst, dstsiz) == -1) return (-1); return (n); } -strong_alias(__libc_ns_name_uncompress,__ns_name_uncompress) +strong_alias(__ns_name_uncompress_internal,__ns_name_uncompress) /* @@ -2465,7 +2465,7 @@ strong_alias(__libc_ns_name_uncompress,__ns_name_uncompress) * The root is returned as "." * All other domains are returned in non absolute form */ -int attribute_hidden __libc_ns_name_ntop(const u_char *src, char *dst, size_t dstsiz) { +int attribute_hidden __ns_name_ntop_internal(const u_char *src, char *dst, size_t dstsiz) { const u_char *cp; char *dn, *eom; u_char c; @@ -2534,7 +2534,7 @@ int attribute_hidden __libc_ns_name_ntop(const u_char *src, char *dst, size_t ds *dn++ = '\0'; return (dn - dst); } -strong_alias(__libc_ns_name_ntop,__ns_name_ntop) +strong_alias(__ns_name_ntop_internal,__ns_name_ntop) /* * ns_name_unpack(msg, eom, src, dst, dstsiz) @@ -2542,7 +2542,7 @@ strong_alias(__libc_ns_name_ntop,__ns_name_ntop) * return: * -1 if it fails, or consumed octets if it succeeds. */ -int attribute_hidden __libc_ns_name_unpack(const u_char *msg, const u_char *eom, const u_char *src, +int attribute_hidden __ns_name_unpack_internal(const u_char *msg, const u_char *eom, const u_char *src, u_char *dst, size_t dstsiz) { const u_char *srcp, *dstlim; @@ -2609,5 +2609,5 @@ int attribute_hidden __libc_ns_name_unpack(const u_char *msg, const u_char *eom, len = srcp - src; return (len); } -strong_alias(__libc_ns_name_unpack,__ns_name_unpack) +strong_alias(__ns_name_unpack_internal,__ns_name_unpack) #endif /* L_ns_name */ diff --git a/libc/inet/rpc/clnt_udp.c b/libc/inet/rpc/clnt_udp.c index bc032f205..2b84f5b82 100644 --- a/libc/inet/rpc/clnt_udp.c +++ b/libc/inet/rpc/clnt_udp.c @@ -38,7 +38,7 @@ static char sccsid[] = "@(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro"; */ /* CMSG_NXTHDR is using it */ -#define __cmsg_nxthdr __libc_cmsg_nxthdr +#define __cmsg_nxthdr __cmsg_nxthdr_internal #define authnone_create __authnone_create #define xdrmem_create __xdrmem_create diff --git a/libc/inet/rpc/rpc_dtablesize.c b/libc/inet/rpc/rpc_dtablesize.c index aa6d598ce..ede7120b3 100644 --- a/libc/inet/rpc/rpc_dtablesize.c +++ b/libc/inet/rpc/rpc_dtablesize.c @@ -45,7 +45,7 @@ static char sccsid[] = "@(#)rpc_dtablesize.c 1.2 87/08/11 Copyr 1987 Sun Micro"; * expensive system call every time. */ int attribute_hidden -__libc__rpc_dtablesize (void) +_rpc_dtablesize_internal (void) { static int size; @@ -54,4 +54,4 @@ __libc__rpc_dtablesize (void) return size; } -strong_alias(__libc__rpc_dtablesize,_rpc_dtablesize) +strong_alias(_rpc_dtablesize_internal,_rpc_dtablesize) diff --git a/libc/inet/rpc/rpc_thread.c b/libc/inet/rpc/rpc_thread.c index fb0e19cd9..1e42cbec6 100644 --- a/libc/inet/rpc/rpc_thread.c +++ b/libc/inet/rpc/rpc_thread.c @@ -95,7 +95,7 @@ __rpc_thread_variables (void) #undef svc_max_pollfd fd_set attribute_hidden * -__libc_rpc_thread_svc_fdset (void) +__rpc_thread_svc_fdset_internal (void) { struct rpc_thread_variables *tvp; @@ -104,7 +104,7 @@ __libc_rpc_thread_svc_fdset (void) return &svc_fdset; return &tvp->svc_fdset_s; } -strong_alias(__libc_rpc_thread_svc_fdset,__rpc_thread_svc_fdset) +strong_alias(__rpc_thread_svc_fdset_internal,__rpc_thread_svc_fdset) struct rpc_createerr * __rpc_thread_createerr (void) @@ -118,7 +118,7 @@ __rpc_thread_createerr (void) } struct pollfd attribute_hidden ** -__libc_rpc_thread_svc_pollfd (void) +__rpc_thread_svc_pollfd_internal (void) { struct rpc_thread_variables *tvp; @@ -127,10 +127,10 @@ __libc_rpc_thread_svc_pollfd (void) return &svc_pollfd; return &tvp->svc_pollfd_s; } -strong_alias(__libc_rpc_thread_svc_pollfd,__rpc_thread_svc_pollfd) +strong_alias(__rpc_thread_svc_pollfd_internal,__rpc_thread_svc_pollfd) int attribute_hidden * -__libc_rpc_thread_svc_max_pollfd (void) +__rpc_thread_svc_max_pollfd_internal (void) { struct rpc_thread_variables *tvp; @@ -139,7 +139,7 @@ __libc_rpc_thread_svc_max_pollfd (void) return &svc_max_pollfd; return &tvp->svc_max_pollfd_s; } -strong_alias(__libc_rpc_thread_svc_max_pollfd,__rpc_thread_svc_max_pollfd) +strong_alias(__rpc_thread_svc_max_pollfd_internal,__rpc_thread_svc_max_pollfd) #else #undef svc_fdset @@ -147,12 +147,12 @@ strong_alias(__libc_rpc_thread_svc_max_pollfd,__rpc_thread_svc_max_pollfd) #undef svc_pollfd #undef svc_max_pollfd -fd_set attribute_hidden * __libc_rpc_thread_svc_fdset (void) +fd_set attribute_hidden * __rpc_thread_svc_fdset_internal (void) { extern fd_set svc_fdset; return &(svc_fdset); } -strong_alias(__libc_rpc_thread_svc_fdset,__rpc_thread_svc_fdset) +strong_alias(__rpc_thread_svc_fdset_internal,__rpc_thread_svc_fdset) struct rpc_createerr * __rpc_thread_createerr (void) { @@ -160,19 +160,19 @@ struct rpc_createerr * __rpc_thread_createerr (void) return &(rpc_createerr); } -struct pollfd attribute_hidden ** __libc_rpc_thread_svc_pollfd (void) +struct pollfd attribute_hidden ** __rpc_thread_svc_pollfd_internal (void) { extern struct pollfd *svc_pollfd; return &(svc_pollfd); } -strong_alias(__libc_rpc_thread_svc_pollfd,__rpc_thread_svc_pollfd) +strong_alias(__rpc_thread_svc_pollfd_internal,__rpc_thread_svc_pollfd) -int attribute_hidden * __libc_rpc_thread_svc_max_pollfd (void) +int attribute_hidden * __rpc_thread_svc_max_pollfd_internal (void) { extern int svc_max_pollfd; return &(svc_max_pollfd); } -strong_alias(__libc_rpc_thread_svc_max_pollfd,__rpc_thread_svc_max_pollfd) +strong_alias(__rpc_thread_svc_max_pollfd_internal,__rpc_thread_svc_max_pollfd) #endif /* __UCLIBC_HAS_THREADS__ */ diff --git a/libc/inet/rpc/ruserpass.c b/libc/inet/rpc/ruserpass.c index ca040ada2..edb5170e9 100644 --- a/libc/inet/rpc/ruserpass.c +++ b/libc/inet/rpc/ruserpass.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ -#define __fsetlocking __libc_fsetlocking +#define __fsetlocking __fsetlocking_internal #define getgid __getgid #define getegid __getegid diff --git a/libc/inet/rpc/svc.c b/libc/inet/rpc/svc.c index 5610277ee..b14cbd803 100644 --- a/libc/inet/rpc/svc.c +++ b/libc/inet/rpc/svc.c @@ -38,15 +38,15 @@ #define pmap_set __pmap_set -#define _authenticate __libc__authenticate -#define _rpc_dtablesize __libc__rpc_dtablesize +#define _authenticate _authenticate_internal +#define _rpc_dtablesize _rpc_dtablesize_internal /* used by svc_[max_]pollfd */ -#define __rpc_thread_svc_pollfd __libc_rpc_thread_svc_pollfd -#define __rpc_thread_svc_max_pollfd __libc_rpc_thread_svc_max_pollfd +#define __rpc_thread_svc_pollfd __rpc_thread_svc_pollfd_internal +#define __rpc_thread_svc_max_pollfd __rpc_thread_svc_max_pollfd_internal /* used by svc_fdset */ -#define __rpc_thread_svc_fdset __libc_rpc_thread_svc_fdset +#define __rpc_thread_svc_fdset __rpc_thread_svc_fdset_internal #define __FORCE_GLIBC #define _GNU_SOURCE diff --git a/libc/inet/rpc/svc_auth.c b/libc/inet/rpc/svc_auth.c index 80c4f7955..bcead0608 100644 --- a/libc/inet/rpc/svc_auth.c +++ b/libc/inet/rpc/svc_auth.c @@ -102,7 +102,7 @@ svcauthsw[] = * invalid. */ enum auth_stat attribute_hidden -__libc__authenticate (register struct svc_req *rqst, struct rpc_msg *msg) +_authenticate_internal (register struct svc_req *rqst, struct rpc_msg *msg) { register int cred_flavor; @@ -115,7 +115,7 @@ __libc__authenticate (register struct svc_req *rqst, struct rpc_msg *msg) return AUTH_REJECTEDCRED; } -strong_alias(__libc__authenticate,_authenticate) +strong_alias(_authenticate_internal,_authenticate) static enum auth_stat _svcauth_null (struct svc_req *rqst, struct rpc_msg *msg) diff --git a/libc/inet/rpc/svc_run.c b/libc/inet/rpc/svc_run.c index 218bfd969..c0d3b34f0 100644 --- a/libc/inet/rpc/svc_run.c +++ b/libc/inet/rpc/svc_run.c @@ -32,8 +32,8 @@ */ /* used by svc_[max_]pollfd */ -#define __rpc_thread_svc_pollfd __libc_rpc_thread_svc_pollfd -#define __rpc_thread_svc_max_pollfd __libc_rpc_thread_svc_max_pollfd +#define __rpc_thread_svc_pollfd __rpc_thread_svc_pollfd_internal +#define __rpc_thread_svc_max_pollfd __rpc_thread_svc_max_pollfd_internal #define __FORCE_GLIBC #define _GNU_SOURCE diff --git a/libc/misc/ttyent/getttyent.c b/libc/misc/ttyent/getttyent.c index c15228a24..923c45ab0 100644 --- a/libc/misc/ttyent/getttyent.c +++ b/libc/misc/ttyent/getttyent.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ -#define __fsetlocking __libc_fsetlocking +#define __fsetlocking __fsetlocking_internal #define _GNU_SOURCE #include diff --git a/libc/stdio/__fsetlocking.c b/libc/stdio/__fsetlocking.c index 77690e269..5b6070cc3 100644 --- a/libc/stdio/__fsetlocking.c +++ b/libc/stdio/__fsetlocking.c @@ -15,7 +15,7 @@ * glibc treats invalid locking_mode args as FSETLOCKING_INTERNAL. */ -int attribute_hidden __libc_fsetlocking(FILE *stream, int locking_mode) +int attribute_hidden __fsetlocking_internal(FILE *stream, int locking_mode) { #ifdef __UCLIBC_HAS_THREADS__ int current = 1 + (stream->__user_locking & 1); @@ -44,4 +44,4 @@ int attribute_hidden __libc_fsetlocking(FILE *stream, int locking_mode) #endif } -strong_alias(__libc_fsetlocking,__fsetlocking) +strong_alias(__fsetlocking_internal,__fsetlocking) diff --git a/libc/stdio/_stdio.h b/libc/stdio/_stdio.h index e5d3c0787..85a00bb95 100644 --- a/libc/stdio/_stdio.h +++ b/libc/stdio/_stdio.h @@ -358,7 +358,7 @@ extern size_t __fwrite_unlocked(const void *__restrict ptr, size_t size, extern size_t __fread_unlocked(void *__restrict ptr, size_t size, size_t nmemb, FILE *__restrict stream) attribute_hidden; -extern int __libc_fputc_unlocked(int c, FILE *stream) attribute_hidden; +extern int __fputc_unlocked_internal(int c, FILE *stream) attribute_hidden; extern int __fflush_unlocked(FILE *stream) attribute_hidden; @@ -368,7 +368,7 @@ extern void __clearerr_unlocked(FILE *stream); extern int __feof_unlocked(FILE *stream); extern int __ferror_unlocked(FILE *stream); -extern int __libc_fgetc_unlocked(FILE *stream) attribute_hidden; +extern int __fgetc_unlocked_internal(FILE *stream) attribute_hidden; extern char *__fgets_unlocked(char *__restrict s, int n, FILE * __restrict stream) attribute_hidden; diff --git a/libc/stdio/fgetc.c b/libc/stdio/fgetc.c index 78fca8422..be9322714 100644 --- a/libc/stdio/fgetc.c +++ b/libc/stdio/fgetc.c @@ -14,7 +14,7 @@ #ifdef __DO_UNLOCKED -int attribute_hidden __libc_fgetc_unlocked(FILE *stream) +int attribute_hidden __fgetc_unlocked_internal(FILE *stream) { __STDIO_STREAM_VALIDATE(stream); @@ -69,12 +69,12 @@ int attribute_hidden __libc_fgetc_unlocked(FILE *stream) return EOF; } -strong_alias(__libc_fgetc_unlocked,__fgetc_unlocked) -weak_alias(__fgetc_unlocked,fgetc_unlocked) -weak_alias(__fgetc_unlocked,getc_unlocked) +strong_alias(__fgetc_unlocked_internal,__fgetc_unlocked) +weak_alias(__fgetc_unlocked_internal,fgetc_unlocked) +weak_alias(__fgetc_unlocked_internal,getc_unlocked) #ifndef __UCLIBC_HAS_THREADS__ -weak_alias(__fgetc_unlocked,fgetc) -weak_alias(__fgetc_unlocked,getc) +weak_alias(__fgetc_unlocked_internal,fgetc) +weak_alias(__fgetc_unlocked_internal,getc) #endif #elif defined __UCLIBC_HAS_THREADS__ diff --git a/libc/stdio/fgets.c b/libc/stdio/fgets.c index 743a2ea54..52c856f35 100644 --- a/libc/stdio/fgets.c +++ b/libc/stdio/fgets.c @@ -5,8 +5,6 @@ * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details. */ -#define __fgetc_unlocked __libc_fgetc_unlocked - #include "_stdio.h" #ifdef __DO_UNLOCKED @@ -36,7 +34,7 @@ char attribute_hidden *__fgets_unlocked(char *__restrict s, int n, break; } } else { - if ((c = __fgetc_unlocked(stream)) == EOF) { + if ((c = __fgetc_unlocked_internal(stream)) == EOF) { if (__FERROR_UNLOCKED(stream)) { goto ERROR; } diff --git a/libc/stdio/fputc.c b/libc/stdio/fputc.c index 46ebb163c..b319263a1 100644 --- a/libc/stdio/fputc.c +++ b/libc/stdio/fputc.c @@ -14,7 +14,7 @@ #ifdef __DO_UNLOCKED -int attribute_hidden __libc_fputc_unlocked(int c, register FILE *stream) +int attribute_hidden __fputc_unlocked_internal(int c, register FILE *stream) { __STDIO_STREAM_VALIDATE(stream); @@ -69,12 +69,12 @@ int attribute_hidden __libc_fputc_unlocked(int c, register FILE *stream) return EOF; } -strong_alias(__libc_fputc_unlocked,__fputc_unlocked) -weak_alias(__fputc_unlocked,fputc_unlocked) -weak_alias(__fputc_unlocked,putc_unlocked) +strong_alias(__fputc_unlocked_internal,__fputc_unlocked) +weak_alias(__fputc_unlocked_internal,fputc_unlocked) +weak_alias(__fputc_unlocked_internal,putc_unlocked) #ifndef __UCLIBC_HAS_THREADS__ -weak_alias(__fputc_unlocked,fputc) -weak_alias(__fputc_unlocked,putc) +weak_alias(__fputc_unlocked_internal,fputc) +weak_alias(__fputc_unlocked_internal,putc) #endif #elif defined __UCLIBC_HAS_THREADS__ diff --git a/libc/stdio/puts.c b/libc/stdio/puts.c index 37ae243bf..3a510325b 100644 --- a/libc/stdio/puts.c +++ b/libc/stdio/puts.c @@ -5,8 +5,6 @@ * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details. */ -#define __fputc_unlocked __libc_fputc_unlocked - #include "_stdio.h" int puts(register const char * __restrict s) @@ -24,7 +22,7 @@ int puts(register const char * __restrict s) /* Note: Nonportable as fputs need only return nonnegative on success. */ if ((n = __fputs_unlocked(s, stream)) != EOF) { ++n; - if (__fputc_unlocked('\n', stream) == EOF) { + if (__fputc_unlocked_internal('\n', stream) == EOF) { n = EOF; } } diff --git a/libc/sysdeps/linux/common/cmsg_nxthdr.c b/libc/sysdeps/linux/common/cmsg_nxthdr.c index cc17c28f5..771f5172b 100644 --- a/libc/sysdeps/linux/common/cmsg_nxthdr.c +++ b/libc/sysdeps/linux/common/cmsg_nxthdr.c @@ -21,9 +21,8 @@ #include #include - struct cmsghdr attribute_hidden * -__libc_cmsg_nxthdr (struct msghdr *mhdr, struct cmsghdr *cmsg) +__cmsg_nxthdr_internal (struct msghdr *mhdr, struct cmsghdr *cmsg) { if ((size_t) cmsg->cmsg_len < sizeof (struct cmsghdr)) /* The kernel header does this so there may be a reason. */ @@ -39,4 +38,4 @@ __libc_cmsg_nxthdr (struct msghdr *mhdr, struct cmsghdr *cmsg) return NULL; return cmsg; } -strong_alias(__libc_cmsg_nxthdr,__cmsg_nxthdr) +strong_alias(__cmsg_nxthdr_internal,__cmsg_nxthdr) diff --git a/libc/unistd/usershell.c b/libc/unistd/usershell.c index 323ed6a55..40c8b9e24 100644 --- a/libc/unistd/usershell.c +++ b/libc/unistd/usershell.c @@ -30,7 +30,7 @@ * November 2002, Erik Andersen */ -#define __fsetlocking __libc_fsetlocking +#define __fsetlocking __fsetlocking_internal #define _GNU_SOURCE #include -- cgit v1.2.3