-/* $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 <schwarze@openbsd.org>
*
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#if defined(__linux__) || defined(__MINT__)
+#define _GNU_SOURCE /* wcwidth() */
+#endif
+
#include <locale.h>
#include <stdio.h>
#include <wchar.h>
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);
}