[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tyndur-devel] [PATCH] libc: setlocale() Stub zum Auslesen



+ libc: setlocale() Stub, der nur das aktuelle Locale ausliest

Signed-off-by: Antoine Kaufmann <toni@xxxxxxxxxx>
---
 src/modules/include/locale.h |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/src/modules/include/locale.h b/src/modules/include/locale.h
index 3850fd0..294e869 100644
--- a/src/modules/include/locale.h
+++ b/src/modules/include/locale.h
@@ -66,6 +66,16 @@ struct lconv {
 };
 
 
+/* Moegliche Werte fuer setlocale */
+#define LC_ALL      1
+#define LC_COLLATE  1
+#define LC_CTYPE    1
+#define LC_MESSAGES 1
+#define LC_MONETARY 1
+#define LC_NUMERIC  1
+#define LC_TIME     1
+
+
 #ifndef CONFIG_LIBC_NO_STUBS
 /**
  * Gibt Informationen zur aktiven Locale zurueck
@@ -87,6 +97,17 @@ static inline struct lconv* localeconv(void)
 
     return &lconv;
 };
+
+/**
+ * Aktuelles Locale anpassen. Ist locale == NULL wird nichts gemacht.
+ *
+ * @return Nach dem Aufruf aktives locale
+ */
+static inline char* setlocale(int category, const char* locale)
+{
+    return "de_DE.UTF-8";
+}
+
 #endif
 
 #endif
-- 
1.6.0.6