NORETURN_FUNCTION_END;
}
+#ifndef UVCHR_IS_INVARIANT /* For use with Perls without this macro */
+# if ('A' == 65)
+# define UVCHR_IS_INVARIANT(cp) ((cp) < 128)
+# elif (defined(NATIVE_IS_INVARIANT)) /* EBCDIC on old Perl */
+# define UVCHR_IS_INVARIANT(cp) ((cp) < 256 && NATIVE_IS_INVARIANT(cp))
+# elif defined(isASCII) /* EBCDIC on very old Perl */
+ /* In EBCDIC, the invariants are the code points corresponding to ASCII,
+ * plus all the controls. All but one EBCDIC control is below SPACE; it
+ * varies depending on the code page, determined by the ord of '^' */
+# define UVCHR_IS_INVARIANT(cp) (isASCII(cp) \
+ || (cp) < ' ' \
+ || (('^' == 106) /* POSIX-BC */ \
+ ? (cp) == 95 \
+ : (cp) == 0xFF)) /* 1047 or 037 */
+# else /* EBCDIC on very very old Perl */
+ /* This assumes isascii() is available, but that could be fixed by
+ * having the macro test for each printable ASCII char */
+# define UVCHR_IS_INVARIANT(cp) (isascii(cp) \
+ || (cp) < ' ' \
+ || (('^' == 106) /* POSIX-BC */ \
+ ? (cp) == 95 \
+ : (cp) == 0xFF)) /* 1047 or 037 */
+# endif
+#endif
+
#ifndef PerlIO
#define PerlIO_fileno(f) fileno(f)