The cmake based buildsystem for expat works on Windows (cygwin, mingw, Visual
Studio) and should work on all other platform cmake supports.
-Assuming ~/expat-2.2.8 is the source directory of expat, add a subdirectory
+Assuming ~/expat-2.2.9 is the source directory of expat, add a subdirectory
build and change into that directory:
-~/expat-2.2.8$ mkdir build && cd build
-~/expat-2.2.8/build$
+~/expat-2.2.9$ mkdir build && cd build
+~/expat-2.2.9/build$
From that directory, call cmake first, then call make, make test and
make install in the usual way:
-~/expat-2.2.8/build$ cmake ..
+~/expat-2.2.9/build$ cmake ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
....
-- Configuring done
-- Generating done
--- Build files have been written to: /home/patrick/expat-2.2.8/build
+-- Build files have been written to: /home/patrick/expat-2.2.9/build
If you want to specify the install location for your files, append
-DCMAKE_INSTALL_PREFIX=/your/install/path to the cmake call.
-~/expat-2.2.8/build$ make && make test && make install
+~/expat-2.2.9/build$ make && make test && make install
Scanning dependencies of target expat
[ 5%] Building C object CMakeFiles/expat.dir/lib/xmlparse.c.o
[ 11%] Building C object CMakeFiles/expat.dir/lib/xmlrole.c.o
project(expat
VERSION
- 2.2.8
+ 2.2.9
LANGUAGES
C
)
set(_POSTFIX_DEBUG "")
endif()
- set(${postfix_var} "${_POSTFIX_WIDE}${_POSTFIX_DEBUG}${_POSTFIX_CRT}" CACHE STRING "Windows binary postfix, e.g. expat<postfix=[w][d][MD|MT]>.lib")
+ set(${postfix_var} "${_POSTFIX_WIDE}${_POSTFIX_DEBUG}${_POSTFIX_CRT}" CACHE STRING "Windows binary postfix, e.g. libexpat<postfix=[w][d][MD|MT]>.lib")
endforeach()
endif(WIN32)
endif(WIN32)
endif(EXPAT_SHARED_LIBS)
-add_library(expat ${_SHARED} ${expat_SRCS})
+# Avoid colliding with Expat.dll of Perl's XML::Parser::Expat
+if(WIN32 AND NOT MINGW)
+ set(_EXPAT_TARGET libexpat)
+else()
+ set(_EXPAT_TARGET expat)
+endif()
+
+add_library(${_EXPAT_TARGET} ${_SHARED} ${expat_SRCS})
if(EXPAT_WITH_LIBBSD)
- target_link_libraries(expat ${LIB_BSD})
+ target_link_libraries(${_EXPAT_TARGET} ${LIB_BSD})
endif()
set(LIBCURRENT 7) # sync
-set(LIBREVISION 10) # with
+set(LIBREVISION 11) # with
set(LIBAGE 6) # configure.ac!
math(EXPR LIBCURRENT_MINUS_AGE "${LIBCURRENT} - ${LIBAGE}")
if(NOT WIN32)
- set_property(TARGET expat PROPERTY VERSION ${LIBCURRENT_MINUS_AGE}.${LIBAGE}.${LIBREVISION})
- set_property(TARGET expat PROPERTY SOVERSION ${LIBCURRENT_MINUS_AGE})
- set_property(TARGET expat PROPERTY NO_SONAME ${NO_SONAME})
+ set_property(TARGET ${_EXPAT_TARGET} PROPERTY VERSION ${LIBCURRENT_MINUS_AGE}.${LIBAGE}.${LIBREVISION})
+ set_property(TARGET ${_EXPAT_TARGET} PROPERTY SOVERSION ${LIBCURRENT_MINUS_AGE})
+ set_property(TARGET ${_EXPAT_TARGET} PROPERTY NO_SONAME ${NO_SONAME})
endif(NOT WIN32)
-expat_install(TARGETS expat EXPORT expat
+expat_install(TARGETS ${_EXPAT_TARGET} EXPORT expat
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
add_executable(xmlwf ${xmlwf_SRCS})
set_property(TARGET xmlwf PROPERTY RUNTIME_OUTPUT_DIRECTORY xmlwf)
- target_link_libraries(xmlwf expat)
+ target_link_libraries(xmlwf ${_EXPAT_TARGET})
expat_install(TARGETS xmlwf DESTINATION ${CMAKE_INSTALL_BINDIR})
if(MINGW AND _EXPAT_UNICODE_WCHAR_T)
if(EXPAT_BUILD_DOCS)
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/doc)
- add_custom_command(TARGET expat PRE_BUILD COMMAND "${DOCBOOK_TO_MAN}" "${PROJECT_SOURCE_DIR}/doc/xmlwf.xml" && mv "XMLWF.1" "${PROJECT_BINARY_DIR}/doc/xmlwf.1")
+ add_custom_command(TARGET ${_EXPAT_TARGET} PRE_BUILD COMMAND "${DOCBOOK_TO_MAN}" "${PROJECT_SOURCE_DIR}/doc/xmlwf.xml" && mv "XMLWF.1" "${PROJECT_BINARY_DIR}/doc/xmlwf.1")
expat_install(FILES "${PROJECT_BINARY_DIR}/doc/xmlwf.1" DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
endif()
endif()
if(EXPAT_BUILD_EXAMPLES)
add_executable(elements examples/elements.c)
set_property(TARGET elements PROPERTY RUNTIME_OUTPUT_DIRECTORY examples)
- target_link_libraries(elements expat)
+ target_link_libraries(elements ${_EXPAT_TARGET})
add_executable(outline examples/outline.c)
set_property(TARGET outline PROPERTY RUNTIME_OUTPUT_DIRECTORY examples)
- target_link_libraries(outline expat)
+ target_link_libraries(outline ${_EXPAT_TARGET})
endif(EXPAT_BUILD_EXAMPLES)
#
add_executable(runtests tests/runtests.c ${test_SRCS})
set_property(TARGET runtests PROPERTY RUNTIME_OUTPUT_DIRECTORY tests)
- target_link_libraries(runtests expat)
+ target_link_libraries(runtests ${_EXPAT_TARGET})
expat_add_test(runtests $<TARGET_FILE:runtests>)
add_executable(runtestspp tests/runtestspp.cpp ${test_SRCS})
set_property(TARGET runtestspp PROPERTY RUNTIME_OUTPUT_DIRECTORY tests)
- target_link_libraries(runtestspp expat)
+ target_link_libraries(runtestspp ${_EXPAT_TARGET})
expat_add_test(runtestspp $<TARGET_FILE:runtestspp>)
endif(EXPAT_BUILD_TESTS)
)
export(
TARGETS
- expat
+ ${_EXPAT_TARGET}
FILE
cmake/expat-targets.cmake # not going to be installed
)
https://github.com/libexpat/libexpat/labels/help%20wanted
If you can help, please get in touch. Thanks!
+Release 2.2.9 Wed Septemper 25 2019
+ Other changes:
+ examples: Drop executable bits from elements.c
+ #349 Windows: Change the name of the Windows DLLs from expat*.dll
+ to libexpat*.dll once more (regression from 2.2.8, first
+ fixed in 1.95.3, issue #61 on SourceForge today,
+ was issue #432456 back then); needs a fix due
+ case-insensitive file systems on Windows and the fact that
+ Perl's XML::Parser::Expat compiles into Expat.dll.
+ #347 Windows: Only define _CRT_RAND_S if not defined
+ Version info bumped from 7:10:6 to 7:11:6
+
+ Special thanks to:
+ Ben Wagner
+
Release 2.2.8 Fri Septemper 13 2019
Security fixes:
#317 #318 CVE-2019-15903 -- Fix heap overflow triggered by
[](https://repology.org/metapackage/expat/versions)
-# Expat, Release 2.2.8
+# Expat, Release 2.2.9
This is Expat, a C library for parsing XML, started by
[James Clark](https://en.wikipedia.org/wiki/James_Clark_(programmer)) in 1997.
The CMake build system is still *experimental* and will replace the primary
-build system based on GNU Autotools at some point when its ready.
+build system based on GNU Autotools at some point when it is ready.
For an idea of the available (non-advanced) options for building with CMake:
```console
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for expat 2.2.8.
+# Generated by GNU Autoconf 2.69 for expat 2.2.9.
#
# Report bugs to <expat-bugs@libexpat.org>.
#
# Identity of this package.
PACKAGE_NAME='expat'
PACKAGE_TARNAME='expat'
-PACKAGE_VERSION='2.2.8'
-PACKAGE_STRING='expat 2.2.8'
+PACKAGE_VERSION='2.2.9'
+PACKAGE_STRING='expat 2.2.9'
PACKAGE_BUGREPORT='expat-bugs@libexpat.org'
PACKAGE_URL=''
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures expat 2.2.8 to adapt to many kinds of systems.
+\`configure' configures expat 2.2.9 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of expat 2.2.8:";;
+ short | recursive ) echo "Configuration of expat 2.2.9:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-expat configure 2.2.8
+expat configure 2.2.9
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by expat $as_me 2.2.8, which was
+It was created by expat $as_me 2.2.9, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
# Define the identity of the package.
PACKAGE='expat'
- VERSION='2.2.8'
+ VERSION='2.2.9'
cat >>confdefs.h <<_ACEOF
LIBCURRENT=7 # sync
-LIBREVISION=10 # with
+LIBREVISION=11 # with
LIBAGE=6 # CMakeLists.txt!
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by expat $as_me 2.2.8, which was
+This file was extended by expat $as_me 2.2.9, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-expat config.status 2.2.8
+expat config.status 2.2.9
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
dnl
LIBCURRENT=7 # sync
-LIBREVISION=10 # with
+LIBREVISION=11 # with
LIBAGE=6 # CMakeLists.txt!
AX_APPEND_FLAG([-DHAVE_EXPAT_CONFIG_H], [CPPFLAGS])
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2016-01-11.22; # UTC
+scriptversion=2018-03-11.20; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
fi
dst=$dst_arg
- # If destination is a directory, append the input filename; won't work
- # if double slashes aren't ignored.
+ # If destination is a directory, append the input filename.
if test -d "$dst"; then
if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
- dst=$dstdir/`basename "$src"`
+ dstbase=`basename "$src"`
+ case $dst in
+ */) dst=$dst$dstbase;;
+ *) dst=$dst/$dstbase;;
+ esac
dstdir_status=0
else
dstdir=`dirname "$dst"`
fi
fi
+ case $dstdir in
+ */) dstdirslash=$dstdir;;
+ *) dstdirslash=$dstdir/;;
+ esac
+
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
- # $RANDOM is not portable (e.g. dash); use it when possible to
- # lower collision chance
+ # Note that $RANDOM variable is not portable (e.g. dash); Use it
+ # here however when possible just to lower collision chance.
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+
trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
- # As "mkdir -p" follows symlinks and we work in /tmp possibly; so
- # create the $tmpdir first (and fail if unsuccessful) to make sure
- # that nobody tries to guess the $tmpdir name.
+ # Because "mkdir -p" follows existing symlinks and we likely work
+ # directly in world-writeable /tmp, make sure that the '$tmpdir'
+ # directory is successfully created first before we actually test
+ # 'mkdir -p' feature.
if (umask $mkdir_umask &&
$mkdirprog $mkdir_mode "$tmpdir" &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
else
# Make a couple of temp file names in the proper directory.
- dsttmp=$dstdir/_inst.$$_
- rmtmp=$dstdir/_rm.$$_
+ dsttmp=${dstdirslash}_inst.$$_
+ rmtmp=${dstdirslash}_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
done
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
#! /bin/sh
# Common wrapper for a few potentially missing GNU programs.
-scriptversion=2016-01-11.22; # UTC
+scriptversion=2018-03-07.03; # UTC
-# Copyright (C) 1996-2017 Free Software Foundation, Inc.
+# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
exit $st
fi
-perl_URL=http://www.perl.org/
-flex_URL=http://flex.sourceforge.net/
-gnu_software_URL=http://www.gnu.org/software
+perl_URL=https://www.perl.org/
+flex_URL=https://github.com/westes/flex
+gnu_software_URL=https://www.gnu.org/software
program_details ()
{
exit $st
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
#define PACKAGE_NAME "expat"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "expat 2.2.8"
+#define PACKAGE_STRING "expat 2.2.9"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "expat"
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "2.2.8"
+#define PACKAGE_VERSION "2.2.9"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Version number of package */
-#define VERSION "2.2.8"
+#define VERSION "2.2.9"
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
*/
#define XML_MAJOR_VERSION 2
#define XML_MINOR_VERSION 2
-#define XML_MICRO_VERSION 8
+#define XML_MICRO_VERSION 9
#ifdef __cplusplus
}
-/* f2d0ab6d1d4422a08cf1cf3bbdfba96b49dea42fb5ff4615e03a2a25c306e769 (2.2.8+)
+/* f519f27c7c3b79fee55aeb8b1e53b7384b079d9118bf3a62eb3a60986a6742f2 (2.2.9+)
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
#ifdef _WIN32
/* force stdlib to define rand_s() */
-# define _CRT_RAND_S
+# if ! defined(_CRT_RAND_S)
+# define _CRT_RAND_S
+# endif
#endif
#include <stddef.h>
fail("Version mismatch");
#if ! defined(XML_UNICODE) || defined(XML_UNICODE_WCHAR_T)
- if (xcstrcmp(version_text, XCS("expat_2.2.8"))) /* needs bump on releases */
+ if (xcstrcmp(version_text, XCS("expat_2.2.9"))) /* needs bump on releases */
fail("XML_*_VERSION in expat.h out of sync?\n");
#else
/* If we have XML_UNICODE defined but not XML_UNICODE_WCHAR_T
msbuild /m expat.sln || EXIT /b 1
DIR %CONFIGURATION% || EXIT /b 1
CD .. || EXIT /b 1
-COPY build_shared_char\%CONFIGURATION%\expat.dll %BINDIR%\ || EXIT /b 1
-COPY build_shared_char\%CONFIGURATION%\expat.lib %BINDIR%\ || EXIT /b 1
+COPY build_shared_char\%CONFIGURATION%\libexpat.dll %BINDIR%\ || EXIT /b 1
+COPY build_shared_char\%CONFIGURATION%\libexpat.lib %BINDIR%\ || EXIT /b 1
MD build_static_char || EXIT /b 1
msbuild /m expat.sln || EXIT /b 1
DIR %CONFIGURATION% || EXIT /b 1
CD .. || EXIT /b 1
-COPY build_static_char\%CONFIGURATION%\expatMT.lib %BINDIR%\ || EXIT /b 1
+COPY build_static_char\%CONFIGURATION%\libexpatMT.lib %BINDIR%\ || EXIT /b 1
COPY build_static_char\xmlwf\%CONFIGURATION%\xmlwf.exe %BINDIR%\ || EXIT /b 1
msbuild /m expat.sln || EXIT /b 1
DIR %CONFIGURATION% || EXIT /b 1
CD .. || EXIT /b 1
-COPY build_shared_wchar_t\%CONFIGURATION%\expatw.dll %BINDIR%\ || EXIT /b 1
-COPY build_shared_wchar_t\%CONFIGURATION%\expatw.lib %BINDIR%\ || EXIT /b 1
+COPY build_shared_wchar_t\%CONFIGURATION%\libexpatw.dll %BINDIR%\ || EXIT /b 1
+COPY build_shared_wchar_t\%CONFIGURATION%\libexpatw.lib %BINDIR%\ || EXIT /b 1
MD build_static_wchar_t || EXIT /b 1
msbuild /m expat.sln || EXIT /b 1
DIR %CONFIGURATION% || EXIT /b 1
CD .. || EXIT /b 1
-COPY build_static_wchar_t\%CONFIGURATION%\expatwMT.lib %BINDIR%\ || EXIT /b 1
+COPY build_static_wchar_t\%CONFIGURATION%\libexpatwMT.lib %BINDIR%\ || EXIT /b 1
DIR %BINDIR% || EXIT /b 1
; This script was contributed by Tim Peters.
; It was designed for Inno Setup 2.0.19 but works with later versions as well.
-#define expatVer "2.2.8"
+#define expatVer "2.2.9"
[Setup]
AppName=Expat