aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Sidrane <david_s5@nscdg.com>2015-02-18 14:29:34 -1000
committerDavid Sidrane <david_s5@nscdg.com>2015-02-18 14:29:34 -1000
commit3fce6f437c3087da911385ccfa3a502328742f5d (patch)
tree3428816b2d4161400107963a266314a2d28e6f37
parentd633e0880943b850f499242876cbfe4732674ff0 (diff)
downloadpx4-firmware-3fce6f437c3087da911385ccfa3a502328742f5d.tar.gz
px4-firmware-3fce6f437c3087da911385ccfa3a502328742f5d.tar.bz2
px4-firmware-3fce6f437c3087da911385ccfa3a502328742f5d.zip
Added patch to build with c++11
-rw-r--r--nuttx-patches/wchar.h.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/nuttx-patches/wchar.h.patch b/nuttx-patches/wchar.h.patch
new file mode 100644
index 000000000..716db992e
--- /dev/null
+++ b/nuttx-patches/wchar.h.patch
@@ -0,0 +1,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