diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/complex.h | 24 | ||||
-rw-r--r-- | include/dirent.h | 1 | ||||
-rw-r--r-- | include/glob.h | 13 | ||||
-rw-r--r-- | include/libm-symbols.h | 84 | ||||
-rw-r--r-- | include/math.h | 84 | ||||
-rw-r--r-- | include/mqueue.h | 1 | ||||
-rw-r--r-- | include/resolv.h | 2 | ||||
-rw-r--r-- | include/setjmp.h | 3 | ||||
-rw-r--r-- | include/stdio.h | 5 | ||||
-rw-r--r-- | include/stdlib.h | 3 | ||||
-rw-r--r-- | include/string.h | 3 | ||||
-rw-r--r-- | include/wchar.h | 6 | ||||
-rw-r--r-- | include/wctype.h | 2 |
13 files changed, 172 insertions, 59 deletions
diff --git a/include/complex.h b/include/complex.h index 2c86709ced..cdcca89db0 100644 --- a/include/complex.h +++ b/include/complex.h @@ -2,15 +2,29 @@ # include <math/complex.h> # ifndef _ISOMAC +# include <libm-symbols.h> + +libm_hidden_mathcall (casin) +libm_hidden_mathcall (casinh) +libm_hidden_mathcall (ccosh) +libm_hidden_mathcall (cexp) +libm_hidden_mathcall (clog) +libm_hidden_mathcall (csqrt) + /* Return the complex inverse hyperbolic sine of finite nonzero Z, with the imaginary part of the result subtracted from pi/2 if ADJ is nonzero. */ -extern complex float __kernel_casinhf (complex float z, int adj); -extern complex double __kernel_casinh (complex double z, int adj); -extern complex long double __kernel_casinhl (complex long double z, int adj); +extern complex float __kernel_casinhf (complex float z, int adj) + attribute_hidden; +extern complex double __kernel_casinh (complex double z, int adj) + attribute_hidden; +extern complex long double __kernel_casinhl (complex long double z, int adj) + attribute_hidden; # if __HAVE_DISTINCT_FLOAT128 -extern __CFLOAT128 __kernel_casinhf128 (__CFLOAT128 z, int adj); +extern __CFLOAT128 __kernel_casinhf128 (__CFLOAT128 z, int adj) + attribute_hidden; # endif -# endif + +# endif #endif diff --git a/include/dirent.h b/include/dirent.h index cc8f1895df..faccbfbb7a 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -49,6 +49,7 @@ extern DIR *__alloc_dir (int fd, bool close_fd, int flags, extern __typeof (rewinddir) __rewinddir; extern __typeof (seekdir) __seekdir; extern __typeof (dirfd) __dirfd; +libc_hidden_proto (__dirfd) extern void __scandir_cancel_handler (void *arg) attribute_hidden; extern int __scandir_tail (DIR *dp, diff --git a/include/glob.h b/include/glob.h index 1d2f78793e..1866bc8fcf 100644 --- a/include/glob.h +++ b/include/glob.h @@ -8,11 +8,16 @@ libc_hidden_proto (globfree) libc_hidden_proto (globfree64) /* Now define the internal interfaces. */ -extern int __glob_pattern_p (const char *__pattern, int __quote); -extern int __glob64 (const char *__pattern, int __flags, - int (*__errfunc) (const char *, int), - glob64_t *__pglob); +extern typeof (glob_pattern_p) __glob_pattern_p; +libc_hidden_proto (__glob_pattern_p) +extern typeof (glob) __glob; +libc_hidden_proto (__glob) +extern typeof (glob) __glob_lstat_compat; +libc_hidden_proto (__glob_lstat_compat) +extern typeof (glob64) __glob64; libc_hidden_proto (__glob64) +extern typeof (glob64) __glob64_lstat_compat; +libc_hidden_proto (__glob64_lstat_compat) #endif #endif diff --git a/include/libm-symbols.h b/include/libm-symbols.h new file mode 100644 index 0000000000..8fb6e6b083 --- /dev/null +++ b/include/libm-symbols.h @@ -0,0 +1,84 @@ +/* Additional support macros for symbol management, used for libm. + Copyright (C) 2018 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _LIBM_SYMBOLS_H +#define _LIBM_SYMBOLS_H 1 + +#if IS_IN (libc) || IS_IN (libm) + +# if defined __NO_LONG_DOUBLE_MATH && !__HAVE_DISTINCT_FLOAT128 + +# define libm_hidden_mathcall(sym) \ + libm_hidden_proto (__##sym) \ + libm_hidden_proto (__##sym##f) + +# define libc_libm_hidden_mathcall(sym) \ + hidden_proto (__##sym) \ + hidden_proto (__##sym##f) + +# elif !defined __NO_LONG_DOUBLE_MATH && !__HAVE_DISTINCT_FLOAT128 + +# define libm_hidden_mathcall(sym) \ + libm_hidden_proto (__##sym) \ + libm_hidden_proto (__##sym##f) \ + libm_hidden_proto (__##sym##l) + +# define libc_libm_hidden_mathcall(sym) \ + hidden_proto (__##sym) \ + hidden_proto (__##sym##f) \ + hidden_proto (__##sym##l) + +# elif defined __NO_LONG_DOUBLE_MATH && __HAVE_DISTINCT_FLOAT128 + +# define libm_hidden_mathcall(sym) \ + libm_hidden_proto (__##sym) \ + libm_hidden_proto (__##sym##f) \ + libm_hidden_proto (__##sym##f128) + +# define libm_hidden_mathcall(sym) \ + hidden_proto (__##sym) \ + hidden_proto (__##sym##f) \ + hidden_proto (__##sym##f128) + +# else /* !defined __NO_LONG_DOUBLE_MATH && __HAVE_DISTINCT_FLOAT128 */ + +# define libm_hidden_mathcall(sym) \ + libm_hidden_proto (__##sym) \ + libm_hidden_proto (__##sym##f) \ + libm_hidden_proto (__##sym##l) \ + libm_hidden_proto (__##sym##f128) + +# define libc_libm_hidden_mathcall(sym) \ + hidden_proto (__##sym) \ + hidden_proto (__##sym##f) \ + hidden_proto (__##sym##l) \ + hidden_proto (__##sym##f128) + +# endif +#else +# define libm_hidden_mathcall(sym) +# define libc_libm_hidden_mathcall(sym) +#endif + +#if IS_IN (libm) +# define libm_attr_hidden attribute_hidden +#else +# define libm_attr_hidden /* nothing */ +#endif + +#endif /* libm-symbols.h */ diff --git a/include/math.h b/include/math.h index e21d34b868..3e4e020915 100644 --- a/include/math.h +++ b/include/math.h @@ -7,64 +7,56 @@ #include <math/math.h> #ifndef _ISOMAC +# include <libm-symbols.h> + /* Now define the internal interfaces. */ extern int __signgam; -# if IS_IN (libc) || IS_IN (libm) -hidden_proto (__finite) -hidden_proto (__isinf) -hidden_proto (__isnan) -hidden_proto (__finitef) -hidden_proto (__isinff) -hidden_proto (__isnanf) - -# ifndef __NO_LONG_DOUBLE_MATH -hidden_proto (__finitel) -hidden_proto (__isinfl) -hidden_proto (__isnanl) -# endif - -# if __HAVE_DISTINCT_FLOAT128 -hidden_proto (__finitef128) -hidden_proto (__isinff128) -hidden_proto (__isnanf128) -hidden_proto (__signbitf128) -# endif -# endif - -libm_hidden_proto (__fpclassify) -libm_hidden_proto (__fpclassifyf) -libm_hidden_proto (__issignaling) -libm_hidden_proto (__issignalingf) -libm_hidden_proto (__exp) -libm_hidden_proto (__expf) -libm_hidden_proto (__roundeven) +libc_libm_hidden_mathcall (finite) +libc_libm_hidden_mathcall (isinf) +libc_libm_hidden_mathcall (isnan) +libc_libm_hidden_mathcall (scalbn) +libc_libm_hidden_mathcall (signbit) -# ifndef __NO_LONG_DOUBLE_MATH -libm_hidden_proto (__fpclassifyl) -libm_hidden_proto (__issignalingl) -libm_hidden_proto (__expl) -libm_hidden_proto (__expm1l) -# endif - -# if __HAVE_DISTINCT_FLOAT128 -libm_hidden_proto (__fpclassifyf128) -libm_hidden_proto (__issignalingf128) -libm_hidden_proto (__expf128) -libm_hidden_proto (__expm1f128) -# endif +libm_hidden_mathcall (atan) +libm_hidden_mathcall (atan2) +libm_hidden_mathcall (ceil) +libm_hidden_mathcall (cos) +libm_hidden_mathcall (erf) +libm_hidden_mathcall (erfc) +libm_hidden_mathcall (exp) +libm_hidden_mathcall (expm1) +libm_hidden_mathcall (floor) +libm_hidden_mathcall (fpclassify) +libm_hidden_mathcall (frexp) +libm_hidden_mathcall (hypot) +libm_hidden_mathcall (ilogb) +libm_hidden_mathcall (issignaling) +libm_hidden_mathcall (ldexp) +libm_hidden_mathcall (log) +libm_hidden_mathcall (log1p) +libm_hidden_mathcall (nearbyint) +libm_hidden_mathcall (nextup) +libm_hidden_mathcall (rint) +libm_hidden_mathcall (round) +libm_hidden_mathcall (roundeven) +libm_hidden_mathcall (scalbln) +libm_hidden_mathcall (sin) +libm_hidden_mathcall (sincos) +libm_hidden_mathcall (sqrt) +libm_hidden_mathcall (trunc) # if !(defined __FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ > 0) # ifndef NO_MATH_REDIRECT /* Declare sqrt for use within GLIBC. Compilers typically inline sqrt as a single instruction. Use an asm to avoid use of PLTs if it doesn't. */ -float (sqrtf) (float) asm ("__ieee754_sqrtf"); -double (sqrt) (double) asm ("__ieee754_sqrt"); +float (sqrtf) (float) asm ("__ieee754_sqrtf") libm_attr_hidden; +double (sqrt) (double) asm ("__ieee754_sqrt") libm_attr_hidden; # ifndef __NO_LONG_DOUBLE_MATH -long double (sqrtl) (long double) asm ("__ieee754_sqrtl"); +long double (sqrtl) (long double) asm ("__ieee754_sqrtl") libm_attr_hidden; # endif # if __HAVE_DISTINCT_FLOAT128 > 0 -_Float128 (sqrtf128) (_Float128) asm ("__ieee754_sqrtf128"); +_Float128 (sqrtf128) (_Float128) asm ("__ieee754_sqrtf128") libm_attr_hidden; # endif # endif # endif diff --git a/include/mqueue.h b/include/mqueue.h index 3c66f1711e..58af372971 100644 --- a/include/mqueue.h +++ b/include/mqueue.h @@ -2,6 +2,7 @@ #ifndef _ISOMAC # if IS_IN (librt) +extern __typeof (mq_open) __mq_open __THROW __nonnull ((1)) attribute_hidden; hidden_proto (mq_timedsend) extern __typeof (mq_timedsend) __mq_timedsend __nonnull ((2, 5)); hidden_proto (__mq_timedsend) diff --git a/include/resolv.h b/include/resolv.h index daf4a74777..524ee902ac 100644 --- a/include/resolv.h +++ b/include/resolv.h @@ -31,8 +31,6 @@ extern struct hostent *_gethtbyname2 (const char *__name, int __af); struct hostent *_gethtbyaddr (const char *addr, size_t __len, int __af); extern uint32_t _getlong (const unsigned char *__src); extern uint16_t _getshort (const unsigned char *__src); -extern int res_ourserver_p (const res_state __statp, - const struct sockaddr_in6 *__inp); extern void __res_iclose (res_state statp, bool free_addr); libc_hidden_proto (__res_ninit) libc_hidden_proto (__res_nclose) diff --git a/include/setjmp.h b/include/setjmp.h index 263bc64b3d..49f7fe8dfb 100644 --- a/include/setjmp.h +++ b/include/setjmp.h @@ -17,7 +17,8 @@ extern void ____longjmp_chk (__jmp_buf __env, int __val) Always returns zero, for convenience. */ extern int __sigjmp_save (jmp_buf __env, int __savemask); -extern void _longjmp_unwind (jmp_buf env, int val); +extern void _longjmp_unwind (jmp_buf env, int val) + attribute_hidden; extern void __libc_siglongjmp (sigjmp_buf env, int val) __attribute__ ((noreturn)); diff --git a/include/stdio.h b/include/stdio.h index f140813ad6..01c324703d 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -133,10 +133,13 @@ extern int _sys_nerr_internal attribute_hidden; libc_hidden_proto (__asprintf) # if IS_IN (libc) extern FILE *_IO_new_fopen (const char*, const char*); +libc_hidden_proto (_IO_new_fopen) # define fopen(fname, mode) _IO_new_fopen (fname, mode) extern FILE *_IO_new_fdopen (int, const char*); +libc_hidden_proto (_IO_new_fdopen) # define fdopen(fd, mode) _IO_new_fdopen (fd, mode) extern int _IO_new_fclose (FILE*); +libc_hidden_proto (_IO_new_fclose) # define fclose(fp) _IO_new_fclose (fp) extern int _IO_fputs (const char*, FILE*); libc_hidden_proto (_IO_fputs) @@ -146,8 +149,10 @@ libc_hidden_proto (_IO_fputs) libc_hidden_proto (fputs) # define fputs(str, fp) _IO_fputs (str, fp) extern int _IO_new_fsetpos (FILE *, const __fpos_t *); +libc_hidden_proto (_IO_new_fsetpos) # define fsetpos(fp, posp) _IO_new_fsetpos (fp, posp) extern int _IO_new_fgetpos (FILE *, __fpos_t *); +libc_hidden_proto (_IO_new_fgetpos) # define fgetpos(fp, posp) _IO_new_fgetpos (fp, posp) # endif diff --git a/include/stdlib.h b/include/stdlib.h index 114e12d255..13ef64f6ba 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -96,7 +96,8 @@ extern int __add_to_environ (const char *name, const char *value, const char *combines, int replace) attribute_hidden; extern void _quicksort (void *const pbase, size_t total_elems, - size_t size, __compar_d_fn_t cmp, void *arg); + size_t size, __compar_d_fn_t cmp, void *arg) + attribute_hidden; extern int __on_exit (void (*__func) (int __status, void *__arg), void *__arg); diff --git a/include/string.h b/include/string.h index bb4922cbbe..63639e2e8c 100644 --- a/include/string.h +++ b/include/string.h @@ -88,6 +88,7 @@ libc_hidden_proto (__stpncpy) libc_hidden_proto (__rawmemchr) libc_hidden_proto (__strcasecmp) libc_hidden_proto (__strcasecmp_l) +libc_hidden_proto (__strncasecmp) libc_hidden_proto (__strncasecmp_l) extern __typeof (strncat) __strncat; libc_hidden_proto (__strncat) @@ -95,6 +96,7 @@ libc_hidden_proto (__strdup) libc_hidden_proto (__strndup) libc_hidden_proto (__strerror_r) libc_hidden_proto (__strverscmp) +libc_hidden_proto (__strchrnul) libc_hidden_proto (basename) extern char *__basename (const char *__filename) __THROW __nonnull ((1)); libc_hidden_proto (__basename) @@ -109,6 +111,7 @@ libc_hidden_proto (__strnlen) libc_hidden_proto (memmem) extern __typeof (memmem) __memmem; libc_hidden_proto (__memmem) +libc_hidden_proto (__memrchr) libc_hidden_proto (__ffs) #if IS_IN (libc) diff --git a/include/wchar.h b/include/wchar.h index 1db0ac8278..0f5187650f 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -151,9 +151,12 @@ extern int __wcsncasecmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) __attribute_pure__; extern size_t __wcslen (const wchar_t *__s) __attribute_pure__; +libc_hidden_proto (__wcslen) extern size_t __wcsnlen (const wchar_t *__s, size_t __maxlen) __attribute_pure__; +libc_hidden_proto (__wcsnlen) extern wchar_t *__wcscat (wchar_t *dest, const wchar_t *src); +libc_hidden_proto (__wcscat) extern wint_t __btowc (int __c) attribute_hidden; extern int __mbsinit (const __mbstate_t *__ps); extern size_t __mbrtowc (wchar_t *__restrict __pwc, @@ -182,9 +185,11 @@ extern size_t __wcsnrtombs (char *__restrict __dst, attribute_hidden; extern wchar_t *__wcsncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n); +libc_hidden_proto (__wcsncpy) extern wchar_t *__wcpcpy (wchar_t *__dest, const wchar_t *__src); extern wchar_t *__wcpncpy (wchar_t *__dest, const wchar_t *__src, size_t __n); +libc_hidden_proto (__wcpncpy) extern wchar_t *__wmemcpy (wchar_t *__s1, const wchar_t *s2, size_t __n) attribute_hidden; extern wchar_t *__wmempcpy (wchar_t *__restrict __s1, @@ -194,6 +199,7 @@ extern wchar_t *__wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n) attribute_hidden; extern wchar_t *__wcschrnul (const wchar_t *__s, wchar_t __wc) __attribute_pure__; +libc_hidden_proto (__wcschrnul) extern wchar_t *__wmemset_chk (wchar_t *__s, wchar_t __c, size_t __n, size_t __ns) __THROW; diff --git a/include/wctype.h b/include/wctype.h index 5fd3f863ae..5a05899107 100644 --- a/include/wctype.h +++ b/include/wctype.h @@ -16,7 +16,9 @@ libc_hidden_proto (towupper) extern int __iswspace (wint_t __wc); extern int __iswctype (wint_t __wc, wctype_t __desc); extern wctype_t __wctype (const char *__property); +libc_hidden_proto (__wctype) extern wctrans_t __wctrans (const char *__property); +libc_hidden_proto (__wctrans) extern wint_t __towctrans (wint_t __wc, wctrans_t __desc); extern __typeof (iswalnum) __iswalnum __THROW __attribute_pure__; |