diff options
author | Rich Felker <dalias@aerifal.cx> | 2018-09-11 12:32:46 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2018-09-12 14:34:34 -0400 |
commit | 7e399fabd3db2c528b5982803eeba2841f547695 (patch) | |
tree | 7dd5b5bf30e99dd0f622203017bc9364e8a74aab | |
parent | b6e59cd925cbe6c0f23cf46828d47e6e7edd17c9 (diff) | |
download | musl-7e399fabd3db2c528b5982803eeba2841f547695.tar.gz musl-7e399fabd3db2c528b5982803eeba2841f547695.tar.bz2 musl-7e399fabd3db2c528b5982803eeba2841f547695.tar.xz musl-7e399fabd3db2c528b5982803eeba2841f547695.zip |
apply hidden visibility to various remaining internal interfaces
-rw-r--r-- | src/crypt/crypt_des.h | 6 | ||||
-rw-r--r-- | src/internal/floatscan.h | 2 | ||||
-rw-r--r-- | src/internal/intscan.h | 2 | ||||
-rw-r--r-- | src/internal/libc.h | 10 | ||||
-rw-r--r-- | src/internal/locale_impl.h | 18 | ||||
-rw-r--r-- | src/internal/malloc_impl.h | 6 | ||||
-rw-r--r-- | src/internal/shgetc.h | 4 | ||||
-rw-r--r-- | src/internal/syscall.h | 4 | ||||
-rw-r--r-- | src/locale/pleval.h | 4 | ||||
-rw-r--r-- | src/math/__invtrigl.h | 2 | ||||
-rw-r--r-- | src/network/lookup.h | 13 | ||||
-rw-r--r-- | src/network/netlink.h | 2 | ||||
-rw-r--r-- | src/passwd/nscd.h | 2 | ||||
-rw-r--r-- | src/passwd/pwf.h | 10 | ||||
-rw-r--r-- | src/prng/rand48.h | 5 | ||||
-rw-r--r-- | src/regex/tre.h | 8 |
16 files changed, 52 insertions, 46 deletions
diff --git a/src/crypt/crypt_des.h b/src/crypt/crypt_des.h index 8ccbf8be..96748b56 100644 --- a/src/crypt/crypt_des.h +++ b/src/crypt/crypt_des.h @@ -7,8 +7,8 @@ struct expanded_key { uint32_t l[16], r[16]; }; -void __des_setkey(const unsigned char *, struct expanded_key *); -void __do_des(uint32_t, uint32_t, uint32_t *, uint32_t *, - uint32_t, uint32_t, const struct expanded_key *); +hidden void __des_setkey(const unsigned char *, struct expanded_key *); +hidden void __do_des(uint32_t, uint32_t, uint32_t *, uint32_t *, + uint32_t, uint32_t, const struct expanded_key *); #endif diff --git a/src/internal/floatscan.h b/src/internal/floatscan.h index e027fa08..f2b1dcf4 100644 --- a/src/internal/floatscan.h +++ b/src/internal/floatscan.h @@ -3,6 +3,6 @@ #include <stdio.h> -long double __floatscan(FILE *, int, int); +hidden long double __floatscan(FILE *, int, int); #endif diff --git a/src/internal/intscan.h b/src/internal/intscan.h index 994c5e7d..ccf9f112 100644 --- a/src/internal/intscan.h +++ b/src/internal/intscan.h @@ -3,6 +3,6 @@ #include <stdio.h> -unsigned long long __intscan(FILE *, unsigned, int, unsigned long long); +hidden unsigned long long __intscan(FILE *, unsigned, int, unsigned long long); #endif diff --git a/src/internal/libc.h b/src/internal/libc.h index 23988d92..52e2d80f 100644 --- a/src/internal/libc.h +++ b/src/internal/libc.h @@ -36,9 +36,9 @@ struct __libc { extern hidden struct __libc __libc; #define libc __libc -void __init_libc(char **, char *); -void __init_tls(size_t *); -void __libc_start_init(void); +hidden void __init_libc(char **, char *); +hidden void __init_tls(size_t *); +hidden void __libc_start_init(void); extern hidden size_t __hwcap; extern hidden size_t __sysinfo; @@ -54,8 +54,8 @@ hidden void __unlockfile(FILE *); #define LOCK(x) __lock(x) #define UNLOCK(x) __unlock(x) -void __synccall(void (*)(void *), void *); -int __setxid(int, int, int, int); +hidden void __synccall(void (*)(void *), void *); +hidden int __setxid(int, int, int, int); #undef LFS64_2 #define LFS64_2(x, y) weak_alias(x, y) diff --git a/src/internal/locale_impl.h b/src/internal/locale_impl.h index a0863045..e6504a05 100644 --- a/src/internal/locale_impl.h +++ b/src/internal/locale_impl.h @@ -15,15 +15,15 @@ struct __locale_map { const struct __locale_map *next; }; -extern const struct __locale_map __c_dot_utf8; -extern const struct __locale_struct __c_locale; -extern const struct __locale_struct __c_dot_utf8_locale; - -const struct __locale_map *__get_locale(int, const char *); -const char *__mo_lookup(const void *, size_t, const char *); -const char *__lctrans(const char *, const struct __locale_map *); -const char *__lctrans_cur(const char *); -int __loc_is_allocated(locale_t); +extern hidden const struct __locale_map __c_dot_utf8; +extern hidden const struct __locale_struct __c_locale; +extern hidden const struct __locale_struct __c_dot_utf8_locale; + +hidden const struct __locale_map *__get_locale(int, const char *); +hidden const char *__mo_lookup(const void *, size_t, const char *); +hidden const char *__lctrans(const char *, const struct __locale_map *); +hidden const char *__lctrans_cur(const char *); +hidden int __loc_is_allocated(locale_t); #define LCTRANS(msg, lc, loc) __lctrans(msg, (loc)->cat[(lc)]) #define LCTRANS_CUR(msg) __lctrans_cur(msg) diff --git a/src/internal/malloc_impl.h b/src/internal/malloc_impl.h index e97337b3..b6eacd87 100644 --- a/src/internal/malloc_impl.h +++ b/src/internal/malloc_impl.h @@ -4,11 +4,11 @@ #include "libc.h" #include <sys/mman.h> -void *__expand_heap(size_t *); +hidden void *__expand_heap(size_t *); -void __malloc_donate(char *, char *); +hidden void __malloc_donate(char *, char *); -void *__memalign(size_t, size_t); +hidden void *__memalign(size_t, size_t); struct chunk { size_t psize, csize; diff --git a/src/internal/shgetc.h b/src/internal/shgetc.h index 7beb8ce6..210f6468 100644 --- a/src/internal/shgetc.h +++ b/src/internal/shgetc.h @@ -1,7 +1,7 @@ #include "stdio_impl.h" -void __shlim(FILE *, off_t); -int __shgetc(FILE *); +hidden void __shlim(FILE *, off_t); +hidden int __shgetc(FILE *); #define shcnt(f) ((f)->shcnt + ((f)->rpos - (f)->rend)) #define shlim(f, lim) __shlim((f), (lim)) diff --git a/src/internal/syscall.h b/src/internal/syscall.h index 730f285a..3cb0a772 100644 --- a/src/internal/syscall.h +++ b/src/internal/syscall.h @@ -244,8 +244,8 @@ hidden long __syscall_ret(unsigned long), __syscall(syscall_arg_t, ...), #define __sys_open_cp(...) __SYSCALL_DISP(__sys_open_cp,,__VA_ARGS__) #define sys_open_cp(...) __syscall_ret(__sys_open_cp(__VA_ARGS__)) -void __procfdname(char [static 15+3*sizeof(int)], unsigned); +hidden void __procfdname(char [static 15+3*sizeof(int)], unsigned); -void *__vdsosym(const char *, const char *); +hidden void *__vdsosym(const char *, const char *); #endif diff --git a/src/locale/pleval.h b/src/locale/pleval.h index 398d1b98..cc515f42 100644 --- a/src/locale/pleval.h +++ b/src/locale/pleval.h @@ -1,6 +1,8 @@ #ifndef PLEVAL_H #define PLEVAL_H -unsigned long __pleval(const char *, unsigned long); +#include <features.h> + +hidden unsigned long __pleval(const char *, unsigned long); #endif diff --git a/src/math/__invtrigl.h b/src/math/__invtrigl.h index 2d97133b..bee79317 100644 --- a/src/math/__invtrigl.h +++ b/src/math/__invtrigl.h @@ -1,3 +1,5 @@ +#include <features.h> + /* shared by acosl, asinl and atan2l */ #define pio2_hi __pio2_hi #define pio2_lo __pio2_lo diff --git a/src/network/lookup.h b/src/network/lookup.h index 4c01b618..f1952af5 100644 --- a/src/network/lookup.h +++ b/src/network/lookup.h @@ -3,6 +3,7 @@ #include <stdint.h> #include <stddef.h> +#include <features.h> struct address { int family; @@ -30,13 +31,13 @@ struct resolvconf { #define MAXADDRS 48 #define MAXSERVS 2 -int __lookup_serv(struct service buf[static MAXSERVS], const char *name, int proto, int socktype, int flags); -int __lookup_name(struct address buf[static MAXADDRS], char canon[static 256], const char *name, int family, int flags); -int __lookup_ipliteral(struct address buf[static 1], const char *name, int family); +hidden int __lookup_serv(struct service buf[static MAXSERVS], const char *name, int proto, int socktype, int flags); +hidden int __lookup_name(struct address buf[static MAXADDRS], char canon[static 256], const char *name, int family, int flags); +hidden int __lookup_ipliteral(struct address buf[static 1], const char *name, int family); -int __get_resolv_conf(struct resolvconf *, char *, size_t); -int __res_msend_rc(int, const unsigned char *const *, const int *, unsigned char *const *, int *, int, const struct resolvconf *); +hidden int __get_resolv_conf(struct resolvconf *, char *, size_t); +hidden int __res_msend_rc(int, const unsigned char *const *, const int *, unsigned char *const *, int *, int, const struct resolvconf *); -int __dns_parse(const unsigned char *, int, int (*)(void *, int, const void *, int, const void *), void *); +hidden int __dns_parse(const unsigned char *, int, int (*)(void *, int, const void *, int, const void *), void *); #endif diff --git a/src/network/netlink.h b/src/network/netlink.h index 20700ac5..38acb178 100644 --- a/src/network/netlink.h +++ b/src/network/netlink.h @@ -91,4 +91,4 @@ struct ifaddrmsg { #define NLMSG_RTA(nlh,len) ((void*)((char*)(nlh)+sizeof(struct nlmsghdr)+NETLINK_ALIGN(len))) #define NLMSG_RTAOK(rta,nlh) RTA_OK(rta,NLMSG_DATAEND(nlh)) -int __rtnetlink_enumerate(int link_af, int addr_af, int (*cb)(void *ctx, struct nlmsghdr *h), void *ctx); +hidden int __rtnetlink_enumerate(int link_af, int addr_af, int (*cb)(void *ctx, struct nlmsghdr *h), void *ctx); diff --git a/src/passwd/nscd.h b/src/passwd/nscd.h index 9a53c328..ae5aa8d5 100644 --- a/src/passwd/nscd.h +++ b/src/passwd/nscd.h @@ -39,6 +39,6 @@ #define INITGRNGRPS 2 #define INITGR_LEN 3 -FILE *__nscd_query(int32_t req, const char *key, int32_t *buf, size_t len, int *swap); +hidden FILE *__nscd_query(int32_t req, const char *key, int32_t *buf, size_t len, int *swap); #endif diff --git a/src/passwd/pwf.h b/src/passwd/pwf.h index fc63db21..ab7e1663 100644 --- a/src/passwd/pwf.h +++ b/src/passwd/pwf.h @@ -8,8 +8,8 @@ #include <limits.h> #include "libc.h" -int __getpwent_a(FILE *f, struct passwd *pw, char **line, size_t *size, struct passwd **res); -int __getpw_a(const char *name, uid_t uid, struct passwd *pw, char **buf, size_t *size, struct passwd **res); -int __getgrent_a(FILE *f, struct group *gr, char **line, size_t *size, char ***mem, size_t *nmem, struct group **res); -int __getgr_a(const char *name, gid_t gid, struct group *gr, char **buf, size_t *size, char ***mem, size_t *nmem, struct group **res); -int __parsespent(char *s, struct spwd *sp); +hidden int __getpwent_a(FILE *f, struct passwd *pw, char **line, size_t *size, struct passwd **res); +hidden int __getpw_a(const char *name, uid_t uid, struct passwd *pw, char **buf, size_t *size, struct passwd **res); +hidden int __getgrent_a(FILE *f, struct group *gr, char **line, size_t *size, char ***mem, size_t *nmem, struct group **res); +hidden int __getgr_a(const char *name, gid_t gid, struct group *gr, char **buf, size_t *size, char ***mem, size_t *nmem, struct group **res); +hidden int __parsespent(char *s, struct spwd *sp); diff --git a/src/prng/rand48.h b/src/prng/rand48.h index 4ed6ae52..55cbec1c 100644 --- a/src/prng/rand48.h +++ b/src/prng/rand48.h @@ -1,4 +1,5 @@ #include <stdint.h> +#include <features.h> -uint64_t __rand48_step(unsigned short *xi, unsigned short *lc); -extern unsigned short __seed48[7]; +hidden uint64_t __rand48_step(unsigned short *xi, unsigned short *lc); +extern hidden unsigned short __seed48[7]; diff --git a/src/regex/tre.h b/src/regex/tre.h index 67cb9a84..9aae851f 100644 --- a/src/regex/tre.h +++ b/src/regex/tre.h @@ -191,9 +191,9 @@ typedef struct tre_mem_struct { #define tre_mem_alloc_impl __tre_mem_alloc_impl #define tre_mem_destroy __tre_mem_destroy -tre_mem_t tre_mem_new_impl(int provided, void *provided_block); -void *tre_mem_alloc_impl(tre_mem_t mem, int provided, void *provided_block, - int zero, size_t size); +hidden tre_mem_t tre_mem_new_impl(int provided, void *provided_block); +hidden void *tre_mem_alloc_impl(tre_mem_t mem, int provided, void *provided_block, + int zero, size_t size); /* Returns a new memory allocator or NULL if out of memory. */ #define tre_mem_new() tre_mem_new_impl(0, NULL) @@ -222,7 +222,7 @@ void *tre_mem_alloc_impl(tre_mem_t mem, int provided, void *provided_block, /* Frees the memory allocator and all memory allocated with it. */ -void tre_mem_destroy(tre_mem_t mem); +hidden void tre_mem_destroy(tre_mem_t mem); #define xmalloc malloc #define xcalloc calloc |