crt: Make __mingw_wcstold an alias to wcstold

There's no need to keep two vaguely differing versions of the same
functions; out of the two, wcstold seems to be more correct.

Signed-off-by: Martin Storsjö <martin@martin.st>
diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index 47db28b..8f3b4b8 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -472,7 +472,7 @@
   misc/gettimeofday.c    misc/imaxabs.c             misc/imaxdiv.c          misc/isblank.c               misc/iswblank.c        \
   misc/mempcpy.c         misc/mingw-aligned-malloc.c \
   misc/mingw_matherr.c   misc/mingw_mbwc_convert.c  misc/mingw_usleep.c     misc/mingw_wcstod.c          misc/mingw_wcstof.c    \
-  misc/mingw_wcstold.c   misc/mkstemp.c             misc/seterrno.c         misc/sleep.c          \
+  misc/mkstemp.c             misc/seterrno.c         misc/sleep.c          \
   misc/strnlen.c         misc/strsafe.c         \
   misc/strtoimax.c       misc/strtold.c             misc/strtoumax.c        misc/tdelete.c               misc/tfind.c           \
   misc/tsearch.c         misc/twalk.c           \
diff --git a/mingw-w64-crt/misc/mingw_wcstold.c b/mingw-w64-crt/misc/mingw_wcstold.c
deleted file mode 100644
index ce1ad5e..0000000
--- a/mingw-w64-crt/misc/mingw_wcstold.c
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <windows.h>
-#include <stdio.h>
-
-long double __cdecl
-__mingw_wcstold (const wchar_t * __restrict__ _Str, wchar_t ** __restrict__ _EndPtr);
-
-long double __cdecl
-__mingw_wcstold (const wchar_t * __restrict__ _Str, wchar_t ** __restrict__ _EndPtr)
-{
-  long double r;
-  char *n, *ep = NULL;
-  size_t l, l2;
-
-  l = WideCharToMultiByte(CP_UTF8, 0, _Str, -1, NULL, 0, NULL, NULL);
-  n = alloca (l + 1);
-  if (l != 0) WideCharToMultiByte (CP_UTF8, 0, _Str, -1, n, l, NULL, NULL);
-  n[l] = 0;
-  r = __mingw_strtold (n, &ep);  
-  if (ep != NULL)
-  {
-    *ep = 0;
-    l2 = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, n, -1, NULL, 0);
-    if (l2 > 0)
-      l2 -= 1; /* Remove zero terminator from length.  */
-    if (_EndPtr)
-      *_EndPtr = (wchar_t *) &_Str[l2];
-  }
-  else if (_EndPtr)
-   *_EndPtr = NULL;
-  return r;
-}
-
diff --git a/mingw-w64-crt/misc/wcstold.c b/mingw-w64-crt/misc/wcstold.c
index 0137b20..48e589d 100644
--- a/mingw-w64-crt/misc/wcstold.c
+++ b/mingw-w64-crt/misc/wcstold.c
@@ -72,3 +72,7 @@
 
   return ret;
 }
+
+long double
+__mingw_wcstold (const wchar_t * __restrict__ wcs, wchar_t ** __restrict__ wcse)
+  __attribute__((alias("wcstold")));