X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/a005fc4b580b8743c2baaf08bb9fa7792201861b..0d50b9e383e73e242a3599c206cf0f220d72b239:/test-wchar.c diff --git a/test-wchar.c b/test-wchar.c index ad37c5fc..2cbb49dd 100644 --- a/test-wchar.c +++ b/test-wchar.c @@ -1,4 +1,4 @@ -/* $Id: test-wchar.c,v 1.1 2014/08/16 19:00:01 schwarze Exp $ */ +/* $Id: test-wchar.c,v 1.2 2014/08/28 10:38:06 schwarze Exp $ */ /* * Copyright (c) 2014 Ingo Schwarze * @@ -15,6 +15,10 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#if defined(__linux__) || defined(__MINT__) +#define _GNU_SOURCE /* wcwidth() */ +#endif + #include #include #include @@ -50,7 +54,7 @@ main(void) dup2(STDERR_FILENO, STDOUT_FILENO); wc = L'*'; - if (putwchar(wc) != wc) { + if (putwchar(wc) != (wint_t)wc) { fputs("bad putwchar return value\n", stderr); return(1); }