#include <ctype.h>
#include <errno.h>
#include <stddef.h>
+#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
-#define WIDE_CHAR_SUPPORT (HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_BTOWC)
+#define WIDE_CHAR_SUPPORT \
+ (HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_BTOWC \
+ && HAVE_WMEMCHR && (HAVE_WMEMCPY || HAVE_WMEMPCPY))
/* For platform which support the ISO C amendement 1 functionality we
support user defined character classes. */
/* Avoid depending on library functions or files
whose names are inconsistent. */
-# ifndef errno
-extern int errno;
-# endif
-
/* Global variable. */
static int posixly_correct;