wctype.h needs extern C

This commit is contained in:
Gregory Nutt 2017-02-17 09:48:55 -06:00
parent 673b2ed2bf
commit 7a4d498b42
2 changed files with 15 additions and 0 deletions

View File

@ -48,7 +48,9 @@
namespace std
{
using ::wint_t;
using ::wctrans_t;
using ::wctype_t;
using ::iswalnum;
using ::iswalpha;

View File

@ -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 <wchar.h> 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 */