From 8964eb4f8dc80fa1461e5c0b2fae2b5f72c18eb0 Mon Sep 17 00:00:00 2001 From: Pouar Date: Mon, 1 Jan 2018 20:15:17 -0600 Subject: [PATCH] use _XOPEN_SOURCE instead of manually prototyping wcwidth, also avoids a conflict in musl --- llt/utf8.c | 1 + llt/utf8.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/llt/utf8.c b/llt/utf8.c index fee04ba..b8b0456 100644 --- a/llt/utf8.c +++ b/llt/utf8.c @@ -12,6 +12,7 @@ valid. A UTF-8 validation routine is included. */ +#define _XOPEN_SOURCE 700 #include #include #include diff --git a/llt/utf8.h b/llt/utf8.h index af6b5cb..ea0142a 100644 --- a/llt/utf8.h +++ b/llt/utf8.h @@ -16,7 +16,7 @@ typedef unsigned long long u_int64_t; extern int locale_is_utf8; -#if defined(__WIN32__) || defined(__linux__) +#if defined(__WIN32__) extern int wcwidth(uint32_t); #endif