diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2024-12-05 08:05:04 +0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2024-12-12 16:17:54 +0800 |
commit | 6bc301672bfbde618d4ec02e51e6e2cbadd4ac1e (patch) | |
tree | 2096ea0fbdc112af437303ca794ec851df5135e3 /include | |
parent | 950891b5e7a5307272da3e632832ac9da4c9eeec (diff) | |
download | glibc-6bc301672bfbde618d4ec02e51e6e2cbadd4ac1e.zip glibc-6bc301672bfbde618d4ec02e51e6e2cbadd4ac1e.tar.gz glibc-6bc301672bfbde618d4ec02e51e6e2cbadd4ac1e.tar.bz2 |
math: Remove __XXX math functions from installed math.h [BZ #32418]
Since libm doesn't export __XXX math functions, don't declare them in
the installed math.h by adding <bits/mathcalls-macros.h> to declare
__XXX math functions internally for glibc build. This fixes BZ #32418.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/bits/mathcalls-macros.h | 12 | ||||
-rw-r--r-- | include/math.h | 5 |
2 files changed, 17 insertions, 0 deletions
diff --git a/include/bits/mathcalls-macros.h b/include/bits/mathcalls-macros.h new file mode 100644 index 0000000..bd997bd --- /dev/null +++ b/include/bits/mathcalls-macros.h @@ -0,0 +1,12 @@ +#include <math/bits/mathcalls-macros.h> + +/* The file <bits/mathcalls.h> contains the prototypes for all the + actual math functions. These macros are used for those prototypes, + so we can easily declare each function as both `name' and `__name', + and can declare the float versions `namef' and `__namef' for internal + use. */ + +#undef __MATHDECLX +#define __MATHDECLX(type, function,suffix, args, attrib) \ + __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); \ + __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib) diff --git a/include/math.h b/include/math.h index 035fd16..9ba4708 100644 --- a/include/math.h +++ b/include/math.h @@ -10,6 +10,11 @@ /* Now define the internal interfaces. */ extern int __signgam; +# undef __MATHDECLX +# define __MATHDECLX(type, function,suffix, args, attrib) \ + __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); \ + __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib) + # if IS_IN (libc) || IS_IN (libm) hidden_proto (__finite) hidden_proto (__isinf) |