From f2ff3d8541740a1f7625f7d42ff709285185c711 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 9 Nov 2018 19:37:42 -0800 Subject: fixes #784 convey uses langinfo not available on QNX --- tests/CMakeLists.txt | 1 + tests/convey.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1c33272e..89df9610 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -44,6 +44,7 @@ endif() if (NNG_TESTS) + nng_check_sym(nl_langinfo langinfo.h NNG_HAVE_LANGINFO) if (NOT NNG_SANITIZER STREQUAL "none") set(TIMEOUT_FACTOR 2) else() diff --git a/tests/convey.c b/tests/convey.c index c676ecaa..deb88f18 100644 --- a/tests/convey.c +++ b/tests/convey.c @@ -42,8 +42,11 @@ #else +#if NNG_HAVE_LANGINFO #include #include +#endif + #include #include #include @@ -860,6 +863,8 @@ convey_init_term(void) #ifndef _WIN32 /* Windows console doesn't do Unicode (consistently). */ + +#if NNG_HAVE_LANGINFO const char *codeset; (void) setlocale(LC_ALL, ""); @@ -869,6 +874,7 @@ convey_init_term(void) convey_sym_fail = "✘"; convey_sym_skip = "⚠"; } +#endif term = getenv("TERM"); if (!isatty(fileno(stdin))) { term = NULL; -- cgit v1.2.3-70-g09d2