From 7a4d498b42cd3ab708f65fdb7fe258a9282f1aeb Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 17 Feb 2017 09:48:55 -0600 Subject: [PATCH] wctype.h needs extern C --- include/cxx/cwctype | 2 ++ include/wctype.h | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/include/cxx/cwctype b/include/cxx/cwctype index 5a8f35c0fb..7c0424c539 100644 --- a/include/cxx/cwctype +++ b/include/cxx/cwctype @@ -48,7 +48,9 @@ namespace std { + using ::wint_t; using ::wctrans_t; + using ::wctype_t; using ::iswalnum; using ::iswalpha; diff --git a/include/wctype.h b/include/wctype.h index fac596eae1..39f338940e 100644 --- a/include/wctype.h +++ b/include/wctype.h @@ -81,6 +81,14 @@ typedef int wctrans_t; * Public Function Prototypes ****************************************************************************/ +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + /* "The header declares the following as functions and may also * define them as macros. Function prototypes must be provided for use with * an ISO C compiler." @@ -108,4 +116,9 @@ wctrans_t wctrans(FAR const char *); int iswctype(wint_t, wctype_t); wctype_t wctype(FAR const char *); +#undef EXTERN +#ifdef __cplusplus +} +#endif + #endif /* INCLUDE_WTYPE_H */