From 38f6e886608cca01b27eb758468148871c50a7de Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Wed, 4 Jan 2023 15:41:15 +0100 Subject: [PATCH] chore(build) add define to build without expat_config.h --- .editorconfig | 2 +- docs/index.html | 7 +++++++ src/lxplib.c | 10 ++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 07d5447..76193d5 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,7 +12,7 @@ indent_size = 4 [Makefile] indent_style = tab -indent_size = 4 +indent_size = 8 [*.html] indent_style = tab diff --git a/docs/index.html b/docs/index.html index 1b579b2..f5d98b2 100644 --- a/docs/index.html +++ b/docs/index.html @@ -89,6 +89,13 @@

Download

History

+
Version 1.5.x [unreleased]
+
+
    +
  • Fix: allow workaround for expat_config.h not found.
  • +
+
+
Version 1.5.1 [03/Oct/2022]
    diff --git a/src/lxplib.c b/src/lxplib.c index 01323fa..4f5e8f6 100644 --- a/src/lxplib.c +++ b/src/lxplib.c @@ -9,7 +9,17 @@ #include #include +#ifndef LUAEXPAT_SKIP_EXPAT_CONFIG +// By default use the standard libexpat header. Some package managers +// do not include this header. In that case setting LUAEXPAT_SKIP_EXPAT_CONFIG +// allows you to override the option. +// 1. ensure you have libExpat 2.4+ +// 2. try building the library +// 3. try building while defining LUAEXPAT_SKIP_DTD_SUPPORT and XML_DTD (include DTD support) +// 4. try building while defining LUAEXPAT_SKIP_DTD_SUPPORT (disable DTD support) #include "expat_config.h" +#endif + #include "expat.h" #if (XML_MAJOR_VERSION == 2 && XML_MINOR_VERSION < 4) || (XML_MAJOR_VERSION < 2) #error Expat 2.4 or newer is required