From a85ed086cc6f926342fc1167f07b2fd24e63c101 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Wed, 6 Feb 2019 10:42:24 -0800 Subject: [PATCH] Define UTF8PROC_STATIC macro in the source This way, there's one less flag you have to pass when building the library on windows. --- lib/build.rs | 1 - lib/src/lib.c | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/build.rs b/lib/build.rs index 7cca001c..e5587ba7 100644 --- a/lib/build.rs +++ b/lib/build.rs @@ -35,7 +35,6 @@ fn main() { } config - .define("UTF8PROC_STATIC", "") .flag_if_supported("-std=c99") .flag_if_supported("-Wno-unused-parameter") .include("include") diff --git a/lib/src/lib.c b/lib/src/lib.c index 9926ae0b..104ded78 100644 --- a/lib/src/lib.c +++ b/lib/src/lib.c @@ -1,11 +1,12 @@ // The Tree-sitter library can be built by compiling this one source file. // // The following directories must be added to the include path: -// - src // - include -// - externals/utf8proc +// - utf8proc #define _POSIX_SOURCE +#define UTF8PROC_STATIC + #include "./get_changed_ranges.c" #include "./language.c" #include "./lexer.c"