Signed-off-by: Waldemar Kozaczuk <[email protected]>
---
 Makefile                 |  3 +--
 libc/locale/wcsftime_l.c | 11 -----------
 libc/time/wcsftime.c     | 32 --------------------------------
 3 files changed, 1 insertion(+), 45 deletions(-)
 delete mode 100644 libc/locale/wcsftime_l.c
 delete mode 100644 libc/time/wcsftime.c

diff --git a/Makefile b/Makefile
index 2d19ccc6..fb91e62a 100644
--- a/Makefile
+++ b/Makefile
@@ -1057,7 +1057,6 @@ musl += locale/towlower_l.o
 musl += locale/towupper_l.o
 libc += locale/uselocale.o
 musl += locale/wcscoll.o
-libc += locale/wcsftime_l.o
 musl += locale/wcsxfrm.o
 musl += locale/wctrans_l.o
 musl += locale/wctype_l.o
@@ -1665,7 +1664,7 @@ musl += time/strftime.o
 musl += time/strptime.o
 musl += time/time.o
 musl += time/timegm.o
-libc += time/wcsftime.o
+musl += time/wcsftime.o
 libc += time/ftime.o # verbatim copy of the file as in 4b15d9f46a2b@musl
 $(out)/libc/time/ftime.o: CFLAGS += -Ilibc/include
 
diff --git a/libc/locale/wcsftime_l.c b/libc/locale/wcsftime_l.c
deleted file mode 100644
index 5f346a3b..00000000
--- a/libc/locale/wcsftime_l.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <wchar.h>
-#include <time.h>
-
-#include "libc.h"
-
-size_t __wcsftime_l(wchar_t *restrict wcs, size_t n, const wchar_t *restrict f,
-               const struct tm *restrict tm, locale_t loc)
-{
-       return wcsftime(wcs, n, f, tm);
-}
-weak_alias(__wcsftime_l, wcsftime_l);
diff --git a/libc/time/wcsftime.c b/libc/time/wcsftime.c
deleted file mode 100644
index da6c1f8a..00000000
--- a/libc/time/wcsftime.c
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <wchar.h>
-#include <time.h>
-#include <string.h>
-
-size_t wcsftime(wchar_t *restrict wcs, size_t n, const wchar_t *restrict f, 
const struct tm *restrict tm)
-{
-       size_t k, n0=n;
-       char out[100], in[4];
-       while (*f) {
-               if (!n) return 0;
-               if (*f != '%') {
-                       *wcs++ = *f++;
-                       n--;
-                       continue;
-               }
-               in[2] = in[3] = 0;
-               in[0] = *f++;
-               if (strchr("EO", (in[1]=*f++)))
-                       in[2] = *f++;
-               k = strftime(out, sizeof out, in, tm);
-               if (!k) return 0;
-               k = mbsrtowcs(wcs, (const char *[]){out}, n, 0);
-               if (k==(size_t)-1) return 0;
-               wcs += k;
-               n -= k;
-       }
-       if (!n) return 0;
-       *wcs++ = 0;
-       return n0-n;
-}
-
-
-- 
2.26.2

-- 
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/20200826035356.201786-6-jwkozaczuk%40gmail.com.

Reply via email to