shithub: femtolisp

Download patch

ref: 8964eb4f8dc80fa1461e5c0b2fae2b5f72c18eb0
parent: 983c8476aaabb3ae2868371be198c9ee972dd0dc
author: Pouar <pouar@pouar.net>
date: Mon Jan 1 15:15:17 EST 2018

use _XOPEN_SOURCE instead of manually prototyping wcwidth, also avoids a
conflict in musl

--- 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 <stdlib.h>
 #include <stdio.h>
 #include <string.h>
--- a/llt/utf8.h
+++ b/llt/utf8.h
@@ -16,7 +16,7 @@
 
 extern int locale_is_utf8;
 
-#if defined(__WIN32__) || defined(__linux__)
+#if defined(__WIN32__)
 extern int wcwidth(uint32_t);
 #endif