From ab380c287a42c0701cd86ae2932c0cb125b9a294 Mon Sep 17 00:00:00 2001 From: Abhina Sree <69635948+abhina-sree@users.noreply.github.com> Date: Wed, 13 Dec 2023 07:46:02 -0500 Subject: [SystemZ][z/OS] Complete EBCDIC I/O support (#75212) This patch completes the support for EBCDIC I/O support on z/OS using the autoconversion functions. --- clang/tools/c-index-test/c-index-test.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'clang/tools/c-index-test/c-index-test.c') diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c index 2c0c9cb..6fa400a 100644 --- a/clang/tools/c-index-test/c-index-test.c +++ b/clang/tools/c-index-test/c-index-test.c @@ -8,6 +8,7 @@ #include "clang-c/Documentation.h" #include "clang-c/Index.h" #include "clang/Config/config.h" +#include "llvm/Support/AutoConvert.h" #include #include #include @@ -5150,6 +5151,14 @@ static void flush_atexit(void) { int main(int argc, const char **argv) { thread_info client_data; +#ifdef __MVS__ + if (enableAutoConversion(fileno(stdout)) == -1) + fprintf(stderr, "Setting conversion on stdout failed\n"); + + if (enableAutoConversion(fileno(stderr)) == -1) + fprintf(stderr, "Setting conversion on stderr failed\n"); +#endif + atexit(flush_atexit); #ifdef CLANG_HAVE_LIBXML -- cgit v1.1