Fix the lack of isblank() with VMS C
authorRichard Levitte <levitte@openssl.org>
Tue, 22 Aug 2017 08:48:08 +0000 (10:48 +0200)
committerRichard Levitte <levitte@openssl.org>
Tue, 22 Aug 2017 13:44:34 +0000 (15:44 +0200)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4216)

test/ctype_internal_test.c

index 0a30c3dd845d5251699bb3d4eb18e800ce9b5912..514db6be2359eb9c733731fe52b62be3d93edd1b 100644 (file)
 #include <ctype.h>
 #include <stdio.h>
 
+/*
+ * Even though the VMS C RTL claims to be C99 compatible, it's not entirely
+ * so far (C RTL version 8.4).  For the sake of these tests, we therefore
+ * define our own.
+ */
+#if defined(__VMS) && __CRTL_VER <= 80400000
+static int isblank(int c)
+{
+    return c == ' ' || c == '\t';
+}
+#endif
+
 static int test_ctype_chars(int n)
 {
     return TEST_int_eq(isalnum(n) != 0, ossl_isalnum(n) != 0)