8000 Fix deprecated xmlNoNetExternalEntityLoader #157 · GNOME/libxslt@c284801 · GitHub
[go: up one dir, main page]

Skip to content

Commit c284801

Browse files
committed
Fix deprecated xmlNoNetExternalEntityLoader #157
1 parent 33cd5e5 commit c284801

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

.gitlab-ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ include:
1515
gcc:
1616
extends: .test
1717
variables:
18+
CONFIG: "--with-python"
1819
CFLAGS: "-O2"
1920

2021
gcc:c89:
@@ -169,6 +170,7 @@ cmake:mingw:w64-x86_64:static:
169170
tags:
170171
- win32-ps
171172
variables:
173+
CFLAGS: /WX /wd4090
172174
CMAKE_VERSION: 3.19.4
173175
before_script:
174176
- "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12"
@@ -211,8 +213,8 @@ cmake:mingw:w64-x86_64:static:
211213
.cmake:msvc:v141:
212214
extends: .cmake:msvc
213215
variables:
214-
CMAKE_GENERATOR: Visual Studio 15 2017
215-
CMAKE_GENERATOR_TOOLSET: v141
216+
CMAKE_GENERATOR: Visual Studio 16 2019
217+
CMAKE_GENERATOR_TOOLSET: v142
216218

217219
.cmake:msvc:v141:x64:
218220
extends: .cmake:msvc:v141
@@ -261,6 +263,8 @@ dist:
261263
artifacts:
262264
paths:
263265
- libxslt-dist/*.tar.xz
266+
variables:
267+
CONFIG: "--with-python"
264268

265269
pages:
266270
script:

.gitlab-ci/dist.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -e
55
LIBXML2_PREFIX="$CI_PROJECT_DIR/libxml2/install"
66
git clone --depth 1 https://gitlab.gnome.org/GNOME/libxml2.git
77
cd libxml2
8-
sh autogen.sh --prefix="$LIBXML2_PREFIX"
8+
sh autogen.sh --prefix="$LIBXML2_PREFIX" $CONFIG
99
make -j$(nproc)
1010
make install
1111
cd ..

tests/runtest.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#define WIN32_LEAN_AND_MEAN
1717
#include <windows.h>
1818
#include <io.h>
19+
#include <direct.h>
1920
#else
2021
#include <unistd.h>
2122
#include <glob.h>
@@ -442,7 +443,10 @@ testStructuredErrorHandler(void *ctx ATTRIBUTE_UNUSED, const xmlError *err) {
442443
static void
443444
initializeLibxml2(void) {
444445
xmlInitParser();
445-
xmlSetExternalEntityLoader(xmlNoNetExternalEntityLoader);
446+
/* TODO: Update this code for the thread safe versions based on
447+
* the xmlCtxtSetResourceLoader function
448+
*/
449+
xmlSetExternalEntityLoader(xmlGetExternalEntityLoader());
446450
xmlSetGenericErrorFunc(NULL, testErrorHandler);
447451
xsltSetGenericErrorFunc(NULL, testErrorHandler);
448452
xmlSetStructuredErrorFunc(NULL,

0 commit comments

Comments
 (0)
0