shithub: scc

Download patch

ref: 85246aa9496cda4ba923939682de23b0f44bfaca
parent: d92627a21a8ecccdf1130375d2af79a95b8a1e06
author: Quentin Rameau <quinq@fifth.space>
date: Tue Feb 21 13:33:13 EST 2017

[libc] Add localeconv

--- a/libc/src/Makefile
+++ b/libc/src/Makefile
@@ -7,7 +7,8 @@
           memset.o memcpy.o memmove.o memcmp.o memchr.o \
           isalnum.o isalpha.o isascii.o isblank.o iscntrl.o isdigit.o \
           isgraph.o islower.o isprint.o ispunct.o isspace.o isupper.o \
-          isxdigit.o toupper.o tolower.o setlocale.o
+          isxdigit.o toupper.o tolower.o setlocale.o \
+          localeconv.o
 
 all: libc.a
 
--- /dev/null
+++ b/libc/src/localeconv.c
@@ -1,0 +1,13 @@
+#include <locale.h>
+#include <limits.h>
+
+struct lconv *
+localeconv(void)
+{
+	static struct lconv lc = { ".", "", "", "", "", "", "", "", "", "",
+	                           CHAR_MAX, CHAR_MAX, CHAR_MAX, CHAR_MAX,
+	                           CHAR_MAX, CHAR_MAX, CHAR_MAX, CHAR_MAX,
+	                           CHAR_MAX, CHAR_MAX, CHAR_MAX, CHAR_MAX,
+	                           CHAR_MAX, CHAR_MAX };
+	return &lc;
+}