Deduplicate aliases from msvcrt.def.in and ucrtbase.def.in to
def-include/msvcrt-common.def.in.

Note that powl alias was defined only in ucrtbase.def.in, so do not define
it for non-UCRT builds.
---
 .../def-include/msvcrt-common.def.in          | 22 +++++++++++++++++++
 mingw-w64-crt/lib-common/msvcrt.def.in        | 15 -------------
 mingw-w64-crt/lib-common/ucrtbase.def.in      | 14 ------------
 3 files changed, 22 insertions(+), 29 deletions(-)

diff --git a/mingw-w64-crt/def-include/msvcrt-common.def.in 
b/mingw-w64-crt/def-include/msvcrt-common.def.in
index 98ab6d6b62f8..1e5e9c5aee38 100644
--- a/mingw-w64-crt/def-include/msvcrt-common.def.in
+++ b/mingw-w64-crt/def-include/msvcrt-common.def.in
@@ -188,6 +188,28 @@ ADD_UNDERSCORE(yn)
 ; ADD_UNDERSCORE(logb)
 ADD_UNDERSCORE(nextafter)
 
+#if defined(DEF_ARM32) || defined(DEF_ARM64)
+; This is list of symbol aliases for C99 ARM long double functions
+; They are defined as aliases to regular double symbols as on ARM, long double 
is equal to regular double
+acosl == acos
+asinl == asin
+atan2l == atan2
+atanl == atan
+ceill == ceil
+cosl == cos
+expl == exp
+floorl == floor
+fmodl == fmod
+log10l == log10
+logl == log
+; FIXME: Why is powl alias defined only for UCRT?
+#ifdef UCRTBASE
+powl == pow
+#endif
+sinl == sin
+tanl == tan
+#endif
+
 ; This is list of symbol aliases for POSIX functions
 ADD_DOUBLE_UNDERSCORE(isascii)
 ADD_DOUBLE_UNDERSCORE(toascii)
diff --git a/mingw-w64-crt/lib-common/msvcrt.def.in 
b/mingw-w64-crt/lib-common/msvcrt.def.in
index 186761c9d09b..29d10767dd47 100644
--- a/mingw-w64-crt/lib-common/msvcrt.def.in
+++ b/mingw-w64-crt/lib-common/msvcrt.def.in
@@ -1843,18 +1843,3 @@ F32(_ftime_s == _ftime32_s)
 F64(_ftime_s == _ftime64_s)
 snwprintf == _snwprintf
 vsnwprintf == _vsnwprintf
-
-; This is list of ARM long double symbols defined as alias to regular double 
symbols as on ARM, long double is equal to regular double
-F_ARM_ANY(acosl == acos)
-F_ARM_ANY(asinl == asin)
-F_ARM_ANY(atan2l == atan2)
-F_ARM_ANY(atanl == atan)
-F_ARM_ANY(ceill == ceil)
-F_ARM_ANY(cosl == cos)
-F_ARM_ANY(expl == exp)
-F_ARM_ANY(floorl == floor)
-F_ARM_ANY(fmodl == fmod)
-F_ARM_ANY(log10l == log10)
-F_ARM_ANY(logl == log)
-F_ARM_ANY(sinl == sin)
-F_ARM_ANY(tanl == tan)
diff --git a/mingw-w64-crt/lib-common/ucrtbase.def.in 
b/mingw-w64-crt/lib-common/ucrtbase.def.in
index b5aff62bd878..c415cfcf1cd5 100644
--- a/mingw-w64-crt/lib-common/ucrtbase.def.in
+++ b/mingw-w64-crt/lib-common/ucrtbase.def.in
@@ -2172,7 +2172,6 @@ abort
 abs
 acos
 F_NON_I386(acosf)
-F_ARM_ANY(acosl == acos)
 acosh
 acoshf
 acoshl F_X86_ANY(DATA)
@@ -2180,16 +2179,13 @@ asctime
 asctime_s
 asin
 F_NON_I386(asinf)
-F_ARM_ANY(asinl == asin)
 asinh
 asinhf
 asinhl F_X86_ANY(DATA)
 atan
 atan2
 F_NON_I386(atan2f)
-F_ARM_ANY(atan2l == atan2)
 F_NON_I386(atanf)
-F_ARM_ANY(atanl == atan)
 atanh
 atanhf
 atanhl F_X86_ANY(DATA)
@@ -2238,7 +2234,6 @@ ccoshl
 ccosl
 ceil
 F_NON_I386(ceilf)
-F_ARM_ANY(ceill == ceil)
 cexp
 cexpf
 cexpl
@@ -2262,7 +2257,6 @@ copysignf
 copysignl F_X86_ANY(DATA)
 cos
 F_NON_I386(cosf)
-F_ARM_ANY(cosl == cos)
 cosh
 F_NON_I386(coshf)
 cpow
@@ -2302,7 +2296,6 @@ exp2
 exp2f
 exp2l F_X86_ANY(DATA)
 F_NON_I386(expf)
-F_ARM_ANY(expl == exp)
 expm1
 expm1f
 expm1l F_X86_ANY(DATA)
@@ -2334,7 +2327,6 @@ fgetwc
 fgetws
 floor
 F_NON_I386(floorf)
-F_ARM_ANY(floorl == floor)
 fma
 fmaf
 fmal F_X86_ANY(DATA)
@@ -2346,7 +2338,6 @@ fminf
 fminl F_X86_ANY(DATA)
 fmod
 F_NON_I386(fmodf)
-F_ARM_ANY(fmodl == fmod)
 fopen
 fopen_s
 fputc
@@ -2425,7 +2416,6 @@ localeconv
 log
 log10
 F_NON_I386(log10f)
-F_ARM_ANY(log10l == log10)
 log1p
 log1pf
 log1pl F_X86_ANY(DATA)
@@ -2436,7 +2426,6 @@ logb
 logbf
 logbl F_X86_ANY(DATA)
 F_NON_I386(logf)
-F_ARM_ANY(logl == log)
 longjmp
 lrint
 lrintf
@@ -2484,7 +2473,6 @@ norml
 perror
 pow
 F_NON_I386(powf)
-F_ARM_ANY(powl == pow)
 putc
 putchar
 puts
@@ -2527,7 +2515,6 @@ setvbuf
 signal
 sin
 F_NON_I386(sinf)
-F_ARM_ANY(sinl == sin)
 ; if we implement sinh, we can set it DATA only.
 sinh
 F_NON_I386(sinhf)
@@ -2572,7 +2559,6 @@ strxfrm
 system
 tan
 F_NON_I386(tanf)
-F_ARM_ANY(tanl == tan)
 ; if we implement tanh, we can set it to DATA only.
 tanh
 F_NON_I386(tanhf)
-- 
2.20.1



_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to