From: Waldemar Kozaczuk <[email protected]>
Committer: Waldemar Kozaczuk <[email protected]>
Branch: master

libc: replace locale/wcsxfrm*.c (from old musl) with musl copy of 
locale/wcsxfrm.c

Signed-off-by: Waldemar Kozaczuk <[email protected]>
Message-Id: <[email protected]>

---
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -1063,8 +1063,7 @@ libc += locale/uselocale.o
 libc += locale/wcscoll.o
 libc += locale/wcscoll_l.o
 libc += locale/wcsftime_l.o
-libc += locale/wcsxfrm.o
-libc += locale/wcsxfrm_l.o
+musl += locale/wcsxfrm.o
 musl += locale/wctrans_l.o
 musl += locale/wctype_l.o
 
diff --git a/libc/locale/wcsxfrm.c b/libc/locale/wcsxfrm.c
--- a/libc/locale/wcsxfrm.c
+++ b/libc/locale/wcsxfrm.c
@@ -1,12 +0,0 @@
-#include <wchar.h>
-
-/* collate only by code points */
-size_t wcsxfrm(wchar_t *restrict dest, const wchar_t *restrict src, size_t n)
-{
-       size_t l = wcslen(src);
-       if (l >= n) {
-               wmemcpy(dest, src, n-1);
-               dest[n-1] = 0;
-       } else wcscpy(dest, src);
-       return l;
-}
diff --git a/libc/locale/wcsxfrm_l.c b/libc/locale/wcsxfrm_l.c
--- a/libc/locale/wcsxfrm_l.c
+++ b/libc/locale/wcsxfrm_l.c
@@ -1,10 +0,0 @@
-#include <wchar.h>
-#include "libc.h"
-
-size_t __wcsxfrm_l(wchar_t *restrict dest, const wchar_t *restrict src, size_t 
n, locale_t locale)
-{
-       return wcsxfrm(dest, src, n);
-}
-
-/* OSv local: a libstdc++ build against glibc wants the __ version */
-weak_alias(__wcsxfrm_l, wcsxfrm_l);

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osv-dev/0000000000004e8cbc05ad476bfc%40google.com.

Reply via email to