From 67f7b77e1fda4e4e6b5977ef7bc122b9acfa1bed Mon Sep 17 00:00:00 2001 From: Jim Derry Date: Tue, 3 Oct 2017 13:04:37 -0400 Subject: [PATCH] Added a flag to CMakeLists.txt simply to point out that one can build without support for ISO2022 natively. Of course, we've been doing this by default for years with no ill effect, and all modern operating systems seem to support this natively. It's probably best to keep this in here, unlike the other deletions. --- CMakeLists.txt | 6 ++++++ src/streamio.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cbda3ac..571da1d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -236,6 +236,12 @@ if (TIDY_RC_NUMBER) add_definitions ( -DRC_NUMBER="${TIDY_RC_NUMBER}" ) endif () +# If your OS doesn't have native ISO2022 support, then build with this flag. +if (NO_NATIVE_ISO2022_SUPPORT) + add_definitions ( -DNO_NATIVE_ISO2022_SUPPORT=1 ) +endif () + + # Delete me? Not used in Tidy source! add_definitions ( -DHAVE_CONFIG_H ) diff --git a/src/streamio.c b/src/streamio.c index 0acca02..00ed3ba 100644 --- a/src/streamio.c +++ b/src/streamio.c @@ -1193,7 +1193,7 @@ static uint ReadCharFromStream( StreamIn* in ) return c; } -#endif /* #ifndef NO_NATIVE_ISO2022_SUPPORT */ +#endif /* NO_NATIVE_ISO2022_SUPPORT */ if ( in->encoding == UTF16LE ) {