https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e524b1bcf6e321c789ac2…
commit e524b1bcf6e321c789ac27f840aa1dfbae3178f8
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Sat Nov 19 14:41:58 2022 -0500
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Mon Nov 21 19:46:08 2022 -0500
[LIBXSLT] Improve sync with upstream. CORE-17766
Makefile.am: this hasn't been updated in a while
security.c: WIN32 -> _WIN32 to keep the ROS-diff consistent with the rest
win32config.h/libxslt.h: remove unnecessary ROS-diff
xsltwin32config.h: this was missed in the 1.1.34 sync
xsltexports.h: mark a ROS-diff as such
---
dll/3rdparty/libxslt/Makefile.am | 156 ++++++++++++-------------
dll/3rdparty/libxslt/security.c | 2 +-
dll/3rdparty/libxslt/win32config.h | 11 +-
dll/3rdparty/libxslt/xsltwin32config.h | 2 +-
sdk/include/reactos/libs/libxslt/libxslt.h | 2 -
sdk/include/reactos/libs/libxslt/xsltexports.h | 8 +-
6 files changed, 85 insertions(+), 96 deletions(-)
diff --git a/dll/3rdparty/libxslt/Makefile.am b/dll/3rdparty/libxslt/Makefile.am
index 22dbdefac47..2c417d0be23 100644
--- a/dll/3rdparty/libxslt/Makefile.am
+++ b/dll/3rdparty/libxslt/Makefile.am
@@ -1,78 +1,78 @@
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/libxslt
-
-AM_CFLAGS = $(LIBXML_CFLAGS)
-
-lib_LTLIBRARIES = libxslt.la
-
-xsltincdir = $(includedir)/libxslt
-
-xsltinc_HEADERS = \
- xslt.h \
- xsltutils.h \
- pattern.h \
- templates.h \
- variables.h \
- keys.h \
- numbersInternals.h \
- extensions.h \
- extra.h \
- functions.h \
- namespaces.h \
- imports.h \
- attributes.h \
- documents.h \
- preproc.h \
- transform.h \
- security.h \
- xsltInternals.h \
- xsltexports.h \
- xsltlocale.h
-nodist_xsltinc_HEADERS = \
- xsltconfig.h
-
-libxslt_la_SOURCES = \
- attrvt.c \
- xslt.c \
- xsltlocale.c \
- xsltutils.c \
- pattern.c \
- templates.c \
- variables.c \
- keys.c \
- numbers.c \
- extensions.c \
- extra.c \
- functions.c \
- namespaces.c \
- imports.c \
- attributes.c \
- documents.c \
- preproc.c \
- transform.c \
- security.c \
- win32config.h \
- xsltwin32config.h.in \
- libxslt.h
-nodist_libxslt_la_SOURCES = \
- xsltwin32config.h
-
-if USE_VERSION_SCRIPT
-LIBXSLT_VERSION_SCRIPT = $(VERSION_SCRIPT_FLAGS)$(srcdir)/libxslt.syms
-else
-LIBXSLT_VERSION_SCRIPT =
-endif
-
-libxslt_la_LIBADD = $(LIBXML_LIBS) $(EXTRA_LIBS) $(M_LIBS)
-libxslt_la_LDFLAGS = \
- $(LIBXSLT_VERSION_SCRIPT) \
- -version-info $(LIBXSLT_VERSION_INFO)
-
-man_MANS = libxslt.3
-
-EXTRA_DIST = $(man_MANS) trio.h triodef.h libxslt.syms
-
-xsltproc: all
- @(cd ../xsltproc ; $(MAKE))
-
-install-exec-hook:
- $(MKDIR_P) "$(DESTDIR)$(libdir)/libxslt-plugins"
+SUBDIRS = \
+ libxslt \
+ libexslt \
+ xsltproc \
+ doc \
+ $(PYTHON_SUBDIR) \
+ tests
+
+DIST_SUBDIRS = libxslt libexslt xsltproc python doc tests
+
+confexecdir=$(libdir)
+confexec_DATA = xsltConf.sh
+
+bin_SCRIPTS = xslt-config
+
+dist-hook: cleanup libxslt.spec
+ touch $(distdir)/doc/*.xml
+ touch $(distdir)/doc/EXSLT/*.xml
+ touch $(distdir)/libxslt/*.syms
+ (cd $(srcdir) ; tar -cf - --exclude CVS --exclude .svn win32 vms examples) | (cd
$(distdir); tar xf -)
+
+CVS_EXTRA_DIST =
+
+EXTRA_DIST = xsltConf.sh.in xslt-config.in libxslt.spec libxslt.spec.in \
+ FEATURES TODO Copyright libxslt.m4 \
+ win32/libxslt/libxslt.def win32/libxslt/libxslt.dsw \
+ win32/libxslt/libxslt_so.dsp win32/libxslt/xsltproc.dsp \
+ $(CVS_EXTRA_DIST)
+
+## We create xsltConf.sh here and not from configure because we want
+## to get the paths expanded correctly. Macros like srcdir are given
+## the value NONE in configure if the user doesn't specify them (this
+## is an autoconf feature, not a bug).
+
+xsltConf.sh: xsltConf.sh.in Makefile
+## Use sed and then mv to avoid problems if the user interrupts.
+ sed -e 's?\@XSLT_LIBDIR\@?$(XSLT_LIBDIR)?g' \
+ -e 's?\@XSLT_INCLUDEDIR\@?$(XSLT_INCLUDEDIR)?g' \
+ -e 's?\@VERSION\@?$(VERSION)?g' \
+ -e 's?\@XSLT_LIBS\@?$(XSLT_LIBS) $(EXTRA_LIBS)?g' \
+ -e 's?\@XSLT_PRIVATE_LIBS\@?$(XSLT_PRIVATE_LIBS)?g' \
+ < $(srcdir)/xsltConf.sh.in > xsltConf.tmp \
+ && mv xsltConf.tmp xsltConf.sh
+
+CLEANFILES = xsltConf.sh
+
+check-local: tests
+
+dummy:
+
+tests: dummy
+ @echo '## Running the regression test suite'
+ @(cd tests ; $(MAKE) -s tests)
+ @(cd xsltproc ; $(MAKE) -s tests)
+ @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; $(MAKE) -s
tests ; fi)
+
+valgrind:
+ @echo '## Running the regression tests under Valgrind'
+ @echo '## Go get a cup of coffee it is gonna take a while ...'
+ @(cd tests ; $(MAKE) CHECKER='libtool --mode=execute valgrind -q
--leak-check=full' tests)
+ @(cd xsltproc ; $(MAKE) CHECKER='libtool --mode=execute valgrind -q
--leak-check=full' tests)
+
+cleanup:
+ -@(find . -name .\#\* -exec rm {} \;)
+
+cleantar:
+ @(rm -f libxslt*.tar.gz)
+
+rpm: cleantar
+ @(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz)
+
+
+pkgconfigdir=$(libdir)/pkgconfig
+pkgconfig_DATA = libxslt.pc libexslt.pc
+
+m4datadir = $(datadir)/aclocal
+m4data_DATA = libxslt.m4
+
diff --git a/dll/3rdparty/libxslt/security.c b/dll/3rdparty/libxslt/security.c
index 641677ced66..b54b4543f19 100644
--- a/dll/3rdparty/libxslt/security.c
+++ b/dll/3rdparty/libxslt/security.c
@@ -12,7 +12,7 @@
#include <sys/stat.h>
#endif
-#if defined(WIN32) && !defined(__CYGWIN__)
+#if defined(_WIN32) && !defined(__CYGWIN__)
#ifndef INVALID_FILE_ATTRIBUTES
#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
#endif
diff --git a/dll/3rdparty/libxslt/win32config.h b/dll/3rdparty/libxslt/win32config.h
index 6573bb4024b..8fe704275a3 100644
--- a/dll/3rdparty/libxslt/win32config.h
+++ b/dll/3rdparty/libxslt/win32config.h
@@ -77,15 +77,7 @@ static int isnan (double d) {
#endif /* _MSC_VER */
#include <direct.h>
-#ifdef __REACTOS__
-#if defined(_MSC_VER) || defined(__MINGW32__)
-#define mkdir(p,m) _mkdir(p)
-#define snprintf _snprintf
-#if _MSC_VER < 1500
-#define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
-#endif
-#endif
-#else /* __REACTOS__ */
+
/* snprintf emulation taken from
http://stackoverflow.com/a/8712996/1956010 */
#if defined(_MSC_VER) && _MSC_VER < 1900
@@ -120,7 +112,6 @@ __inline int c99_snprintf(char *outBuf, size_t size, const char
*format, ...)
}
#endif /* defined(_MSC_VER) && _MSC_VER < 1900 */
-#endif /* __REACTOS__ */
#define HAVE_SYS_STAT_H
#define HAVE__STAT
diff --git a/dll/3rdparty/libxslt/xsltwin32config.h
b/dll/3rdparty/libxslt/xsltwin32config.h
index fe7c7fc3410..8085bc2fa82 100644
--- a/dll/3rdparty/libxslt/xsltwin32config.h
+++ b/dll/3rdparty/libxslt/xsltwin32config.h
@@ -62,7 +62,7 @@ extern "C" {
*
* Whether module support is configured into libxslt
*/
-#if 1
+#if 0
#ifndef WITH_MODULES
#define WITH_MODULES
#endif
diff --git a/sdk/include/reactos/libs/libxslt/libxslt.h
b/sdk/include/reactos/libs/libxslt/libxslt.h
index 1265c04b719..5e98158e91b 100644
--- a/sdk/include/reactos/libs/libxslt/libxslt.h
+++ b/sdk/include/reactos/libs/libxslt/libxslt.h
@@ -27,12 +27,10 @@
#endif
#endif
-#ifndef __REACTOS__
#if defined(_MSC_VER) || defined(__MINGW32__)
#include <io.h>
#include <direct.h>
#define mkdir(p,m) _mkdir(p)
#endif
-#endif /* __REACTOS__ */
#endif /* ! __XSLT_LIBXSLT_H__ */
diff --git a/sdk/include/reactos/libs/libxslt/xsltexports.h
b/sdk/include/reactos/libs/libxslt/xsltexports.h
index aac59e1d7a3..ecce7305f9c 100644
--- a/sdk/include/reactos/libs/libxslt/xsltexports.h
+++ b/sdk/include/reactos/libs/libxslt/xsltexports.h
@@ -51,11 +51,11 @@
#undef XSLTCALL
#if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC)
#define XSLTPUBFUN __declspec(dllexport)
- #ifndef __clang__
- #define XSLTPUBVAR __declspec(dllexport)
+ #if defined(__REACTOS__) && defined(__clang__)
+ #define XSLTPUBVAR __declspec(dllexport) extern
#else
- #define XSLTPUBVAR __declspec(dllexport) extern
- #endif
+ #define XSLTPUBVAR __declspec(dllexport)
+ #endif /* __REACTOS__ && __clang__ */
#else
#define XSLTPUBFUN
#if !defined(LIBXSLT_STATIC)