aboutsummaryrefslogtreecommitdiff
path: root/nuttx-patches/wchar.h.patch
blob: 716db992e72e171c45d3ce41586c5d6984f86bae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
diff --git NuttX/nuttx/include/wchar.h NuttX/nuttx/include/wchar.h
index 54fa796..889b272 100644
--- NuttX/nuttx/include/wchar.h
+++ NuttX/nuttx/include/wchar.h
@@ -118,7 +118,19 @@ typedef int wint_t;
  * Reference: Opengroup.org
  */
 
-struct tm; /* Forward reference (see <time.h>) */
+ struct tm; /* Forward reference (see <time.h>) */
+
+/* An object type other than an array type that can hold the conversion state
+ * information necessary to convert between sequences of (possibly multi-byte)
+ * characters and wide characters. If a codeset is being
+ * used such that an mbstate_t needs to preserve more than two levels of
+ * reserved state, the results are unspecified.
+ */
+
+typedef struct
+{
+  int __fill[6];
+} mbstate_t;
 
 /****************************************************************************
  * Public Data
@@ -142,7 +154,18 @@ extern "C"
  * Reference: Opengroup.org
  */
 
-#if 0 /* Not yet implemented */
+
+#ifndef _WCTYPE_T
+#define _WCTYPE_T
+# ifdef _AEABI_PORTABLE
+typedef void *wctype_t;
+# else
+typedef int wctype_t;
+# endif
+#endif /* !_WCTYPE_T */
+
+ /* Not yet implemented */
+
 wint_t            btowc(int);
 int               fwprintf(FILE *, const wchar_t *, ...);
 int               fwscanf(FILE *, const wchar_t *, ...);
@@ -218,7 +241,10 @@ wchar_t          *wmemmove(wchar_t *, const wchar_t *, size_t);
 wchar_t          *wmemset(wchar_t *, wchar_t, size_t);
 int               wprintf(const wchar_t *, ...);
 int               wscanf(const wchar_t *, ...);
-#endif
+int               vfwscanf(FILE *, const wchar_t *, va_list);
+int               vswscanf(const wchar_t *, const wchar_t *, va_list);
+int               vwscanf(const wchar_t *, va_list);
+float             wcstof(const wchar_t *, wchar_t **);
 
 #undef EXTERN
 #ifdef __cplusplus