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-04-07 07:49:06 -1000
commit4697bfbac191c1cfe2e76b0e182433f2fc02cd18 (patch)
tree36be3e6c67666e4d6bd5b54b28334918005ba61d
parent387a0d6541a3411726f7b4fcddacd7cb5f93f051 (diff)
downloadpx4-firmware-4697bfbac191c1cfe2e76b0e182433f2fc02cd18.tar.gz
px4-firmware-4697bfbac191c1cfe2e76b0e182433f2fc02cd18.tar.bz2
px4-firmware-4697bfbac191c1cfe2e76b0e182433f2fc02cd18.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