From 83b2918ebe75fe7c3ee54c3a33bd8cc10234db8c Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 26 Nov 2005 01:14:13 +0000 Subject: Some more hidden internals --- libc/inet/resolv.c | 60 +++++++++++++++++++++--------------------- libc/misc/internals/tempname.c | 2 +- libc/misc/internals/tempname.h | 2 +- libc/stdlib/drand48-iter.c | 2 +- libc/stdlib/erand48_r.c | 2 +- libc/stdlib/jrand48_r.c | 2 +- libc/stdlib/nrand48_r.c | 2 +- libc/stdlib/setenv.c | 2 +- libc/stdlib/strtod.c | 4 +-- 9 files changed, 39 insertions(+), 39 deletions(-) (limited to 'libc') diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index 7ac8af805..042398339 100644 --- a/libc/inet/resolv.c +++ b/libc/inet/resolv.c @@ -232,13 +232,13 @@ extern int __get_hosts_byname_r(const char * name, int type, struct hostent * result_buf, char * buf, size_t buflen, struct hostent ** result, - int * h_errnop); + int * h_errnop) attribute_hidden; extern int __get_hosts_byaddr_r(const char * addr, int len, int type, struct hostent * result_buf, char * buf, size_t buflen, struct hostent ** result, - int * h_errnop); -extern void __open_etc_hosts(FILE **fp); + int * h_errnop) attribute_hidden; +extern void __open_etc_hosts(FILE **fp) attribute_hidden; extern int __read_etc_hosts_r(FILE *fp, const char * name, int type, enum etc_hosts_action action, struct hostent * result_buf, @@ -246,25 +246,25 @@ extern int __read_etc_hosts_r(FILE *fp, const char * name, int type, struct hostent ** result, int * h_errnop); extern int __dns_lookup(const char * name, int type, int nscount, - char ** nsip, unsigned char ** outpacket, struct resolv_answer * a); + char ** nsip, unsigned char ** outpacket, struct resolv_answer * a) attribute_hidden; -extern int __encode_dotted(const char * dotted, unsigned char * dest, int maxlen); +extern int __encode_dotted(const char * dotted, unsigned char * dest, int maxlen) attribute_hidden; extern int __decode_dotted(const unsigned char * message, int offset, - char * dest, int maxlen); -extern int __length_dotted(const unsigned char * message, int offset); -extern int __encode_header(struct resolv_header * h, unsigned char * dest, int maxlen); -extern int __decode_header(unsigned char * data, struct resolv_header * h); + char * dest, int maxlen) attribute_hidden; +extern int __length_dotted(const unsigned char * message, int offset) attribute_hidden; +extern int __encode_header(struct resolv_header * h, unsigned char * dest, int maxlen) attribute_hidden; +extern int __decode_header(unsigned char * data, struct resolv_header * h) attribute_hidden; extern int __encode_question(struct resolv_question * q, - unsigned char * dest, int maxlen); + unsigned char * dest, int maxlen) attribute_hidden; extern int __decode_question(unsigned char * message, int offset, struct resolv_question * q); extern int __encode_answer(struct resolv_answer * a, - unsigned char * dest, int maxlen); + unsigned char * dest, int maxlen) attribute_hidden; extern int __decode_answer(unsigned char * message, int offset, - struct resolv_answer * a); -extern int __length_question(unsigned char * message, int offset); -extern int __open_nameservers(void); -extern void __close_nameservers(void); + struct resolv_answer * a) attribute_hidden; +extern int __length_question(unsigned char * message, int offset) attribute_hidden; +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 __ns_name_uncompress(const u_char *, const u_char *, @@ -275,7 +275,7 @@ extern int __ns_name_unpack(const u_char *, const u_char *, const u_char *, #ifdef L_encodeh -int __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) { if (maxlen < HFIXEDSZ) return -1; @@ -302,7 +302,7 @@ int __encode_header(struct resolv_header *h, unsigned char *dest, int maxlen) #endif #ifdef L_decodeh -int __decode_header(unsigned char *data, struct resolv_header *h) +int attribute_hidden __decode_header(unsigned char *data, struct resolv_header *h) { h->id = (data[0] << 8) | data[1]; h->qr = (data[2] & 0x80) ? 1 : 0; @@ -326,7 +326,7 @@ int __decode_header(unsigned char *data, struct resolv_header *h) This routine is fairly dumb, and doesn't attempt to compress the data */ -int __encode_dotted(const char *dotted, unsigned char *dest, int maxlen) +int attribute_hidden __encode_dotted(const char *dotted, unsigned char *dest, int maxlen) { int used = 0; @@ -360,7 +360,7 @@ int __encode_dotted(const char *dotted, unsigned char *dest, int maxlen) /* Decode a dotted string from nameserver transport-level encoding. This routine understands compressed data. */ -int __decode_dotted(const unsigned char *data, int offset, +int attribute_hidden __decode_dotted(const unsigned char *data, int offset, char *dest, int maxlen) { int l; @@ -411,7 +411,7 @@ int __decode_dotted(const unsigned char *data, int offset, #ifdef L_lengthd -int __length_dotted(const unsigned char *data, int offset) +int attribute_hidden __length_dotted(const unsigned char *data, int offset) { int orig_offset = offset; int l; @@ -434,7 +434,7 @@ int __length_dotted(const unsigned char *data, int offset) #endif #ifdef L_encodeq -int __encode_question(struct resolv_question *q, +int attribute_hidden __encode_question(struct resolv_question *q, unsigned char *dest, int maxlen) { int i; @@ -480,7 +480,7 @@ int __decode_question(unsigned char *message, int offset, #endif #ifdef L_lengthq -int __length_question(unsigned char *message, int offset) +int attribute_hidden __length_question(unsigned char *message, int offset) { int i; @@ -493,7 +493,7 @@ int __length_question(unsigned char *message, int offset) #endif #ifdef L_encodea -int __encode_answer(struct resolv_answer *a, unsigned char *dest, int maxlen) +int attribute_hidden __encode_answer(struct resolv_answer *a, unsigned char *dest, int maxlen) { int i; @@ -524,7 +524,7 @@ int __encode_answer(struct resolv_answer *a, unsigned char *dest, int maxlen) #endif #ifdef L_decodea -int __decode_answer(unsigned char *message, int offset, +int attribute_hidden __decode_answer(unsigned char *message, int offset, struct resolv_answer *a) { char temp[256]; @@ -667,7 +667,7 @@ static pthread_mutex_t mylock = PTHREAD_MUTEX_INITIALIZER; * look anyways. */ static int ns=0, id=1; -int __dns_lookup(const char *name, int type, int nscount, char **nsip, +int attribute_hidden __dns_lookup(const char *name, int type, int nscount, char **nsip, unsigned char **outpacket, struct resolv_answer *a) { int i, j, len, fd, pos, rc; @@ -978,7 +978,7 @@ pthread_mutex_t __resolv_lock = PTHREAD_MUTEX_INITIALIZER; * unix systems, we can have a list of nameservers after the keyword. */ -int __open_nameservers() +int attribute_hidden __open_nameservers() { FILE *fp; int i; @@ -1045,7 +1045,7 @@ int __open_nameservers() #ifdef L_closenameservers -void __close_nameservers(void) +void attribute_hidden __close_nameservers(void) { BIGLOCK; while (__nameservers > 0) { @@ -1419,7 +1419,7 @@ struct hostent *gethostbyaddr (const void *addr, socklen_t len, int type) #ifdef L_read_etc_hosts_r -void __open_etc_hosts(FILE **fp) +void attribute_hidden __open_etc_hosts(FILE **fp) { if ((*fp = fopen("/etc/hosts", "r")) == NULL) { *fp = fopen("/etc/config/hosts", "r"); @@ -1645,7 +1645,7 @@ struct hostent *gethostent (void) #ifdef L_get_hosts_byname_r -int __get_hosts_byname_r(const char * name, int type, +int attribute_hidden __get_hosts_byname_r(const char * name, int type, struct hostent * result_buf, char * buf, size_t buflen, struct hostent ** result, @@ -1658,7 +1658,7 @@ int __get_hosts_byname_r(const char * name, int type, #ifdef L_get_hosts_byaddr_r -int __get_hosts_byaddr_r(const char * addr, int len, int type, +int attribute_hidden __get_hosts_byaddr_r(const char * addr, int len, int type, struct hostent * result_buf, char * buf, size_t buflen, struct hostent ** result, diff --git a/libc/misc/internals/tempname.c b/libc/misc/internals/tempname.c index cd1f3497b..75f41ed95 100644 --- a/libc/misc/internals/tempname.c +++ b/libc/misc/internals/tempname.c @@ -175,7 +175,7 @@ static void brain_damaged_fillrand(unsigned char *buf, unsigned int len) __GT_DIR: create a directory, which will be mode 0700. */ -int __gen_tempname (char *tmpl, int kind) +int attribute_hidden __gen_tempname (char *tmpl, int kind) { char *XXXXXX; unsigned int k; diff --git a/libc/misc/internals/tempname.h b/libc/misc/internals/tempname.h index f068727a7..9ce964741 100644 --- a/libc/misc/internals/tempname.h +++ b/libc/misc/internals/tempname.h @@ -5,7 +5,7 @@ #include extern int __path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx, int try_tmpdir); -extern int __gen_tempname (char *__tmpl, int __kind); +extern int __gen_tempname (char *__tmpl, int __kind) attribute_hidden; /* The __kind argument to __gen_tempname may be one of: */ #define __GT_FILE 0 /* create a file */ diff --git a/libc/stdlib/drand48-iter.c b/libc/stdlib/drand48-iter.c index 858253b5a..bc2c15cb6 100644 --- a/libc/stdlib/drand48-iter.c +++ b/libc/stdlib/drand48-iter.c @@ -27,7 +27,7 @@ struct drand48_data __libc_drand48_data; -int +int attribute_hidden __drand48_iterate (unsigned short int xsubi[3], struct drand48_data *buffer) { uint64_t X; diff --git a/libc/stdlib/erand48_r.c b/libc/stdlib/erand48_r.c index 85971cc02..159eb83a6 100644 --- a/libc/stdlib/erand48_r.c +++ b/libc/stdlib/erand48_r.c @@ -22,7 +22,7 @@ #include extern int __drand48_iterate(unsigned short xsubi[3], - struct drand48_data *buffer); + struct drand48_data *buffer) attribute_hidden; int erand48_r (xsubi, buffer, result) diff --git a/libc/stdlib/jrand48_r.c b/libc/stdlib/jrand48_r.c index 86d1ba363..d8c37cdbc 100644 --- a/libc/stdlib/jrand48_r.c +++ b/libc/stdlib/jrand48_r.c @@ -20,7 +20,7 @@ #include extern int __drand48_iterate(unsigned short xsubi[3], - struct drand48_data *buffer); + struct drand48_data *buffer) attribute_hidden; int jrand48_r (xsubi, buffer, result) unsigned short int xsubi[3]; diff --git a/libc/stdlib/nrand48_r.c b/libc/stdlib/nrand48_r.c index f08ac9c36..89f098e75 100644 --- a/libc/stdlib/nrand48_r.c +++ b/libc/stdlib/nrand48_r.c @@ -20,7 +20,7 @@ #include extern int __drand48_iterate(unsigned short xsubi[3], - struct drand48_data *buffer); + struct drand48_data *buffer) attribute_hidden; int nrand48_r (xsubi, buffer, result) unsigned short int xsubi[3]; diff --git a/libc/stdlib/setenv.c b/libc/stdlib/setenv.c index d0cfe526d..2428ed92d 100644 --- a/libc/stdlib/setenv.c +++ b/libc/stdlib/setenv.c @@ -48,7 +48,7 @@ static char **last_environ; must be used directly. This is all complicated by the fact that we try to reuse values once generated for a `setenv' call since we can never free the strings. */ -int __add_to_environ (const char *name, const char *value, +int attribute_hidden __add_to_environ (const char *name, const char *value, const char *combined, int replace) { register char **ep; diff --git a/libc/stdlib/strtod.c b/libc/stdlib/strtod.c index 9c76a2347..10844414e 100644 --- a/libc/stdlib/strtod.c +++ b/libc/stdlib/strtod.c @@ -152,7 +152,7 @@ #endif -extern void __fp_range_check(__fpmax_t y, __fpmax_t x); +extern void __fp_range_check(__fpmax_t y, __fpmax_t x) attribute_hidden; /**********************************************************************/ @@ -491,7 +491,7 @@ __fpmax_t __XL_NPP(__strtofpmax)(const Wchar *str, Wchar **endptr, int exponent_ #ifdef L___fp_range_check #if defined(NEED_STRTOF_WRAPPER) || defined(NEED_STRTOD_WRAPPER) -extern void __fp_range_check(__fpmax_t y, __fpmax_t x) +void attribute_hidden __fp_range_check(__fpmax_t y, __fpmax_t x) { if (__FPMAX_ZERO_OR_INF_CHECK(y) /* y is 0 or +/- infinity */ && (y != 0) /* y is not 0 (could have x>0, y==0 if underflow) */ -- cgit v1.2.3