Upgrade bundled expat to the latest 2.2.0 release
Closes https://github.com/wxWidgets/wxWidgets/pull/404
This commit is contained in:
commit
2675579371
@ -81,6 +81,7 @@ All:
|
||||
- Add wxString::cbegin() and cend() method (Lauri Nurmi).
|
||||
- Allow using Bind() with event handlers non-publicly deriving from
|
||||
wxEvtHandler and/or wxTrackable in C++11 code (Raul Tambre, mmarsan).
|
||||
- Update bundled expat to 2.2.0 (Catalin Raceanu).
|
||||
|
||||
All (GUI):
|
||||
|
||||
|
@ -127,6 +127,9 @@ without -DHAVE_CONFIG_H as it works just fine without it on any ANSI C system
|
||||
(i.e. anywhere by now).
|
||||
|
||||
|
||||
EXAMPLES
|
||||
----------------------------------
|
||||
|
||||
Example updating libpng files under MSW:
|
||||
Since configure looked for zlib, the following 2 steps were also needed:
|
||||
a) get zlib source code (www.zlib.net) to a separate location;
|
||||
@ -145,3 +148,11 @@ Example updating libpng files under MSW:
|
||||
4) edit pnglibconf.h and change the value of PNG_ZLIB_VERNUM to 0.
|
||||
5) copy files from libpng root dir and scripts subfolder to src/png, updating old files only (other new files were not needed);
|
||||
6) commit the changes.
|
||||
|
||||
|
||||
Example updating libexpat files under MSW:
|
||||
1) get libexpat source code (sourceforge.net/projects/expat/files/expat/) to a separate location;
|
||||
2) delete all files in src/expat;
|
||||
3) copy all files from libexpat to src/expat;
|
||||
4) commit the changes, including new and deleted files;
|
||||
5) define XML_STATIC in src/expat/lib/expat_external.h, see git log for the exact changes, and apply them in a separate commit.
|
||||
|
@ -3,25 +3,25 @@
|
||||
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.1.1 is the source directory of expat, add a subdirectory
|
||||
Assuming ~/expat-2.2.0 is the source directory of expat, add a subdirectory
|
||||
build and change into that directory:
|
||||
~/expat-2.1.1$ mkdir build && cd build
|
||||
~/expat-2.1.1/build$
|
||||
~/expat-2.2.0$ mkdir build && cd build
|
||||
~/expat-2.2.0/build$
|
||||
|
||||
From that directory, call cmake first, then call make, make test and
|
||||
make install in the usual way:
|
||||
~/expat-2.1.1/build$ cmake ..
|
||||
~/expat-2.2.0/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.1.1/build
|
||||
-- Build files have been written to: /home/patrick/expat-2.2.0/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.1.1/build$ make && make test && make install
|
||||
~/expat-2.2.0/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
|
||||
|
@ -6,7 +6,7 @@ project(expat)
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
set(PACKAGE_BUGREPORT "expat-bugs@libexpat.org")
|
||||
set(PACKAGE_NAME "expat")
|
||||
set(PACKAGE_VERSION "2.1.1")
|
||||
set(PACKAGE_VERSION "2.2.0")
|
||||
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
|
||||
set(PACKAGE_TARNAME "${PACKAGE_NAME}")
|
||||
|
||||
@ -41,6 +41,10 @@ include_directories(${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/lib)
|
||||
if(MSVC)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS -wd4996)
|
||||
endif(MSVC)
|
||||
if(WIN32)
|
||||
add_definitions(-DWIN32)
|
||||
set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Add a suffix, usually d on Windows")
|
||||
endif(WIN32)
|
||||
|
||||
set(expat_SRCS
|
||||
lib/xmlparse.c
|
||||
@ -50,18 +54,31 @@ set(expat_SRCS
|
||||
lib/xmltok_ns.c
|
||||
)
|
||||
|
||||
if(WIN32 AND BUILD_shared)
|
||||
set(expat_SRCS ${expat_SRCS} lib/libexpat.def)
|
||||
endif(WIN32 AND BUILD_shared)
|
||||
|
||||
if(BUILD_shared)
|
||||
set(_SHARED SHARED)
|
||||
if(WIN32)
|
||||
set(expat_SRCS ${expat_SRCS} lib/libexpat.def)
|
||||
endif(WIN32)
|
||||
else(BUILD_shared)
|
||||
set(_SHARED STATIC)
|
||||
if(WIN32)
|
||||
add_definitions(-DXML_STATIC)
|
||||
endif(WIN32)
|
||||
endif(BUILD_shared)
|
||||
|
||||
add_library(expat ${_SHARED} ${expat_SRCS})
|
||||
|
||||
set(LIBCURRENT 7) # sync
|
||||
set(LIBREVISION 2) # 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})
|
||||
endif(NOT WIN32)
|
||||
|
||||
install(TARGETS expat RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib)
|
||||
@ -76,6 +93,7 @@ install(FILES lib/expat.h lib/expat_external.h DESTINATION include)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/expat.pc DESTINATION lib/pkgconfig)
|
||||
|
||||
|
||||
add_custom_command(TARGET expat PRE_BUILD COMMAND $(MAKE) -C doc xmlwf.1)
|
||||
|
||||
if(BUILD_tools AND NOT WINCE)
|
||||
set(xmlwf_SRCS
|
||||
|
@ -1,6 +1,5 @@
|
||||
Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
|
||||
and Clark Cooper
|
||||
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.
|
||||
Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
|
||||
Copyright (c) 2001-2016 Expat maintainers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
|
@ -1,3 +1,52 @@
|
||||
Release 2.2.0 Tue June 21 2016
|
||||
Security fixes:
|
||||
#537 CVE-2016-0718 -- Fix crash on malformed input
|
||||
CVE-2016-4472 -- Improve insufficient fix to CVE-2015-1283 /
|
||||
CVE-2015-2716 introduced with Expat 2.1.1
|
||||
#499 CVE-2016-5300 -- Use more entropy for hash initialization
|
||||
than the original fix to CVE-2012-0876
|
||||
#519 CVE-2012-6702 -- Resolve troublesome internal call to srand
|
||||
that was introduced with Expat 2.1.0
|
||||
when addressing CVE-2012-0876 (issue #496)
|
||||
|
||||
Bug fixes:
|
||||
Fix uninitialized reads of size 1
|
||||
(e.g. in little2_updatePosition)
|
||||
Fix detection of UTF-8 character boundaries
|
||||
|
||||
Other changes:
|
||||
#532 Fix compilation for Visual Studio 2010 (keyword "C99")
|
||||
Autotools: Resolve use of "$<" to better support bmake
|
||||
Autotools: Add QA script "qa.sh" (and make target "qa")
|
||||
Autotools: Respect CXXFLAGS if given
|
||||
Autotools: Fix "make run-xmltest"
|
||||
Autotools: Have "make run-xmltest" check for expected output
|
||||
p90 CMake: Fix static build (BUILD_shared=OFF) on Windows
|
||||
#536 CMake: Add soversion, support -DNO_SONAME=yes to bypass
|
||||
#323 CMake: Add suffix "d" to differentiate debug from release
|
||||
CMake: Define WIN32 with CMake on Windows
|
||||
Annotate memory allocators for GCC
|
||||
Address all currently known compile warnings
|
||||
Make sure that API symbols remain visible despite
|
||||
-fvisibility=hidden
|
||||
Remove executable flag from source files
|
||||
Resolve COMPILED_FROM_DSP in favor of WIN32
|
||||
|
||||
Special thanks to:
|
||||
Björn Lindahl
|
||||
Christian Heimes
|
||||
Cristian Rodríguez
|
||||
Daniel Krügler
|
||||
Gustavo Grieco
|
||||
Karl Waclawek
|
||||
László Böszörményi
|
||||
Marco Grassi
|
||||
Pascal Cuoq
|
||||
Sergei Nikulov
|
||||
Thomas Beutlich
|
||||
Warren Young
|
||||
Yann Droneaud
|
||||
|
||||
Release 2.1.1 Sat March 12 2016
|
||||
Security fixes:
|
||||
#582: CVE-2015-1283 - Multiple integer overflows in XML_GetBuffer
|
||||
@ -7,7 +56,7 @@ Release 2.1.1 Sat March 12 2016
|
||||
#520: Symbol XML_SetHashSalt was not exported
|
||||
Output of "xmlwf -h" was incomplete
|
||||
|
||||
Other changes
|
||||
Other changes:
|
||||
#503: Document behavior of calling XML_SetHashSalt with salt 0
|
||||
Minor improvements to man page xmlwf(1)
|
||||
Improvements to the experimental CMake build system
|
||||
|
@ -44,7 +44,7 @@ doc/reference.html
|
||||
doc/style.css
|
||||
doc/valid-xhtml10.png
|
||||
doc/xmlwf.1
|
||||
doc/xmlwf.sgml
|
||||
doc/xmlwf.xml
|
||||
CMakeLists.txt
|
||||
CMake.README
|
||||
COPYING
|
||||
|
@ -51,7 +51,7 @@ default: buildlib xmlwf/xmlwf@EXEEXT@
|
||||
|
||||
buildlib: $(LIBRARY) expat.pc
|
||||
|
||||
all: $(LIBRARY) expat.pc xmlwf/xmlwf@EXEEXT@ examples/elements examples/outline
|
||||
all: $(LIBRARY) expat.pc xmlwf/xmlwf@EXEEXT@ examples/elements examples/outline $(MANFILE)
|
||||
|
||||
clean:
|
||||
cd lib && rm -f $(LIBRARY) *.@OBJEXT@ *.lo && rm -rf .libs _libs
|
||||
@ -77,7 +77,10 @@ check: tests/runtests tests/runtestspp
|
||||
tests/runtests
|
||||
tests/runtestspp
|
||||
|
||||
install: xmlwf/xmlwf@EXEEXT@ installlib
|
||||
$(MANFILE):
|
||||
$(MAKE) -C doc xmlwf.1
|
||||
|
||||
install: xmlwf/xmlwf@EXEEXT@ installlib $(MANFILE)
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
|
||||
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf@EXEEXT@ $(DESTDIR)$(bindir)/xmlwf
|
||||
$(INSTALL_DATA) $(MANFILE) $(DESTDIR)$(man1dir)
|
||||
@ -154,11 +157,11 @@ xmlwf/xmlwf@EXEEXT@: $(XMLWF_OBJS) $(LIBRARY)
|
||||
|
||||
examples/elements.@OBJEXT@: examples/elements.c
|
||||
examples/elements: examples/elements.@OBJEXT@ $(LIBRARY)
|
||||
$(LINK_EXE) $< $(LIBRARY)
|
||||
$(LINK_EXE) examples/elements.@OBJEXT@ $(LIBRARY)
|
||||
|
||||
examples/outline.@OBJEXT@: examples/outline.c
|
||||
examples/outline: examples/outline.@OBJEXT@ $(LIBRARY)
|
||||
$(LINK_EXE) $< $(LIBRARY)
|
||||
$(LINK_EXE) examples/outline.@OBJEXT@ $(LIBRARY)
|
||||
|
||||
tests/chardata.@OBJEXT@: tests/chardata.c tests/chardata.h
|
||||
tests/minicheck.@OBJEXT@: tests/minicheck.c tests/minicheck.h
|
||||
@ -180,11 +183,19 @@ tests/xmlts.zip:
|
||||
wget --output-document=tests/xmlts.zip \
|
||||
http://www.w3.org/XML/Test/xmlts20080827.zip
|
||||
|
||||
tests/XML-Test-Suite: tests/xmlts.zip
|
||||
tests/xmlconf: tests/xmlts.zip
|
||||
cd tests && unzip -q xmlts.zip
|
||||
|
||||
run-xmltest: xmlwf/xmlwf@EXEEXT@ tests/XML-Test-Suite
|
||||
tests/xmltest.sh
|
||||
run-xmltest: xmlwf/xmlwf@EXEEXT@ tests/xmlconf
|
||||
tests/xmltest.sh 2>&1 | tee tests/xmltest.log
|
||||
diff -u tests/xmltest.log.expected tests/xmltest.log
|
||||
|
||||
.PHONY: qa
|
||||
qa:
|
||||
./qa.sh address
|
||||
./qa.sh memory
|
||||
./qa.sh undefined
|
||||
./qa.sh coverage
|
||||
|
||||
.SUFFIXES: .c .cpp .lo .@OBJEXT@
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
Expat, Release 2.1.1
|
||||
Expat, Release 2.2.0
|
||||
|
||||
This is Expat, a C library for parsing XML, written by James Clark.
|
||||
Expat is a stream-oriented XML parser. This means that you register
|
||||
@ -114,7 +114,7 @@ Note for Solaris users: The "ar" command is usually located in
|
||||
"/usr/ccs/bin", which is not in the default PATH. You will need to
|
||||
add this to your path for the "make" command, and probably also switch
|
||||
to GNU make (the "make" found in /usr/ccs/bin does not seem to work
|
||||
properly -- appearantly it does not understand .PHONY directives). If
|
||||
properly -- apparently it does not understand .PHONY directives). If
|
||||
you're using ksh or bash, use this command to build:
|
||||
|
||||
PATH=/usr/ccs/bin:$PATH make
|
||||
|
4
src/expat/aclocal.m4
vendored
4
src/expat/aclocal.m4
vendored
@ -1,6 +1,6 @@
|
||||
# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
|
||||
# generated automatically by aclocal 1.15 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -146,4 +146,4 @@ ActiveLang=
|
||||
ProjectLang=
|
||||
RootDir=
|
||||
</IDEOPTIONS>
|
||||
</PROJECT>
|
||||
</PROJECT>@
|
||||
|
@ -25,7 +25,7 @@
|
||||
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
|
||||
<RELEASELIBPATH value="$(BCB)\lib\release"/>
|
||||
<LINKER value="ilink32"/>
|
||||
<USERDEFINES value="_WINDOWS;WIN32;NDEBUG;_USRDLL;COMPILED_FROM_DSP;EXPAT_EXPORTS"/>
|
||||
<USERDEFINES value="_WINDOWS;WIN32;NDEBUG;_USRDLL;EXPAT_EXPORTS"/>
|
||||
<SYSDEFINES value="_NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL"/>
|
||||
<MAINSOURCE value="expat.bpf"/>
|
||||
<INCLUDEPATH value="..\lib;$(BCB)\include"/>
|
||||
@ -94,14 +94,14 @@ Item0=$(BCB)\source\vcl
|
||||
|
||||
[HistoryLists\hlConditionals]
|
||||
Count=8
|
||||
Item0=_WINDOWS;WIN32;NDEBUG;_USRDLL;COMPILED_FROM_DSP;EXPAT_EXPORTS
|
||||
Item1=_WINDOWS;WIN32;NDEBUG;_DEBUG;_USRDLL;COMPILED_FROM_DSP;EXPAT_EXPORTS
|
||||
Item2=WIN32;_WINDOWS;NDEBUG;_DEBUG;_USRDLL;COMPILED_FROM_DSP;EXPAT_EXPORTS
|
||||
Item3=WIN32;_WINDOWS;NDEBUG;_DEBUG;_USRDLL;EXPAT_EXPORTS;COMPILED_FROM_DSP
|
||||
Item4=NDEBUG;WIN32;_WINDOWS;_USRDLL;_DEBUG;EXPAT_EXPORTS;COMPILED_FROM_DSP
|
||||
Item5=NDEBUG;WIN32;_WINDOWS;_USRDLL;EXPAT_EXPORTS;COMPILED_FROM_DSP;_DEBUG
|
||||
Item6=NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;EXPAT_EXPORTS;COMPILED_FROM_DSP;_DEBUG
|
||||
Item7=NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;EXPAT_EXPORTS;COMPILED_FROM_DSP
|
||||
Item0=_WINDOWS;WIN32;NDEBUG;_USRDLL;EXPAT_EXPORTS
|
||||
Item1=_WINDOWS;WIN32;NDEBUG;_DEBUG;_USRDLL;EXPAT_EXPORTS
|
||||
Item2=WIN32;_WINDOWS;NDEBUG;_DEBUG;_USRDLL;EXPAT_EXPORTS
|
||||
Item3=WIN32;_WINDOWS;NDEBUG;_DEBUG;_USRDLL;EXPAT_EXPORTS
|
||||
Item4=NDEBUG;WIN32;_WINDOWS;_USRDLL;_DEBUG;EXPAT_EXPORTS
|
||||
Item5=NDEBUG;WIN32;_WINDOWS;_USRDLL;EXPAT_EXPORTS;_DEBUG
|
||||
Item6=NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;EXPAT_EXPORTS;_DEBUG
|
||||
Item7=NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;EXPAT_EXPORTS
|
||||
|
||||
[HistoryLists\hlIntOutputDir]
|
||||
Count=7
|
||||
@ -137,4 +137,4 @@ ActiveLang=
|
||||
ProjectLang=
|
||||
RootDir=
|
||||
</IDEOPTIONS>
|
||||
</PROJECT>
|
||||
</PROJECT>@
|
||||
|
@ -36,7 +36,7 @@ PATHPAS = .;
|
||||
PATHRC = .;
|
||||
DEBUGLIBPATH = $(BCB)\lib\debug
|
||||
RELEASELIBPATH = $(BCB)\lib\release
|
||||
USERDEFINES = _WINDOWS;WIN32;NDEBUG;_USRDLL;COMPILED_FROM_DSP
|
||||
USERDEFINES = _WINDOWS;WIN32;NDEBUG;_USRDLL
|
||||
SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL
|
||||
INCLUDEPATH = ..\lib;$(BCB)\include
|
||||
LIBPATH = ..\lib;$(BCB)\lib;$(RELEASELIBPATH)
|
||||
|
@ -23,7 +23,7 @@
|
||||
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
|
||||
<RELEASELIBPATH value="$(BCB)\lib\release"/>
|
||||
<LINKER value="TLib"/>
|
||||
<USERDEFINES value="_WINDOWS;WIN32;NDEBUG;_LIB;COMPILED_FROM_DSP;XML_STATIC"/>
|
||||
<USERDEFINES value="_WINDOWS;WIN32;NDEBUG;_LIB;XML_STATIC"/>
|
||||
<SYSDEFINES value="_NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL"/>
|
||||
<MAINSOURCE value="expat_static.bpf"/>
|
||||
<INCLUDEPATH value="..\lib;$(BCB)\include"/>
|
||||
@ -93,13 +93,13 @@ Item0=$(BCB)\source\vcl
|
||||
|
||||
[HistoryLists\hlConditionals]
|
||||
Count=7
|
||||
Item0=_WINDOWS;WIN32;NDEBUG;_LIB;COMPILED_FROM_DSP;XML_STATIC
|
||||
Item1=_WINDOWS;WIN32;NDEBUG;_DEBUG;_LIB;COMPILED_FROM_DSP;XML_STATIC
|
||||
Item2=WIN32;_WINDOWS;NDEBUG;_DEBUG;_LIB;COMPILED_FROM_DSP;XML_STATIC
|
||||
Item3=WIN32;_WINDOWS;NDEBUG;_LIB;COMPILED_FROM_DSP;_DEBUG
|
||||
Item4=WIN32;_WINDOWS;NDEBUG;_LIB;COMPILED_FROM_DSP
|
||||
Item5=WIN32;_WINDOWS;NDEBUG;_LIB;COMPILED_FROM_DSP;_MBCS
|
||||
Item6=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;COMPILED_FROM_DSP
|
||||
Item0=_WINDOWS;WIN32;NDEBUG;_LIB;XML_STATIC
|
||||
Item1=_WINDOWS;WIN32;NDEBUG;_DEBUG;_LIB;XML_STATIC
|
||||
Item2=WIN32;_WINDOWS;NDEBUG;_DEBUG;_LIB;XML_STATIC
|
||||
Item3=WIN32;_WINDOWS;NDEBUG;_LIB;_DEBUG
|
||||
Item4=WIN32;_WINDOWS;NDEBUG;_LIB
|
||||
Item5=WIN32;_WINDOWS;NDEBUG;_LIB;_MBCS
|
||||
Item6=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB
|
||||
|
||||
[HistoryLists\hlIntOutputDir]
|
||||
Count=6
|
||||
@ -140,4 +140,4 @@ ActiveLang=
|
||||
ProjectLang=
|
||||
RootDir=
|
||||
</IDEOPTIONS>
|
||||
</PROJECT>
|
||||
</PROJECT>@
|
||||
|
@ -35,7 +35,7 @@ PATHRC = .;
|
||||
LINKER = TLib
|
||||
DEBUGLIBPATH = $(BCB)\lib\debug
|
||||
RELEASELIBPATH = $(BCB)\lib\release
|
||||
USERDEFINES = _WINDOWS;WIN32;NDEBUG;_LIB;COMPILED_FROM_DSP;XML_STATIC
|
||||
USERDEFINES = _WINDOWS;WIN32;NDEBUG;_LIB;XML_STATIC
|
||||
SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL
|
||||
INCLUDEPATH = ..\lib;$(BCB)\include
|
||||
LIBPATH = ..\lib;$(BCB)\lib;$(RELEASELIBPATH)
|
||||
|
@ -25,7 +25,7 @@
|
||||
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
|
||||
<RELEASELIBPATH value="$(BCB)\lib\release"/>
|
||||
<LINKER value="ilink32"/>
|
||||
<USERDEFINES value="_WINDOWS;WIN32;NDEBUG;_USRDLL;COMPILED_FROM_DSP;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T"/>
|
||||
<USERDEFINES value="_WINDOWS;WIN32;NDEBUG;_USRDLL;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T"/>
|
||||
<SYSDEFINES value="_NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL"/>
|
||||
<MAINSOURCE value="expatw.bpf"/>
|
||||
<INCLUDEPATH value="..\lib;$(BCB)\include"/>
|
||||
@ -94,15 +94,15 @@ Item0=$(BCB)\source\vcl
|
||||
|
||||
[HistoryLists\hlConditionals]
|
||||
Count=9
|
||||
Item0=_WINDOWS;WIN32;NDEBUG;_USRDLL;COMPILED_FROM_DSP;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T
|
||||
Item1=_WINDOWS;WIN32;NDEBUG;_DEBUG;_USRDLL;COMPILED_FROM_DSP;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T
|
||||
Item2=_WINDOWS;WIN32;NDEBUG;_DEBUG;_USRDLL;EXPAT_EXPORTS;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T
|
||||
Item3=NDEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_USRDLL;EXPAT_EXPORTS;_DEBUG;XML_UNICODE_WCHAR_T
|
||||
Item4=NDEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_USRDLL;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T;_DEBUG
|
||||
Item5=NDEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_UNICODE;_USRDLL;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T;_DEBUG
|
||||
Item6=NDEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_UNICODE;_USRDLL;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T
|
||||
Item7=NDEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_MBCS;_USRDLL;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T;XML_UNICODE
|
||||
Item8=NDEBUG;COMPILED_FROM_DSP;WIN32;_WINDOWS;_MBCS;_USRDLL;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T
|
||||
Item0=_WINDOWS;WIN32;NDEBUG;_USRDLL;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T
|
||||
Item1=_WINDOWS;WIN32;NDEBUG;_DEBUG;_USRDLL;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T
|
||||
Item2=_WINDOWS;WIN32;NDEBUG;_DEBUG;_USRDLL;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T
|
||||
Item3=NDEBUG;WIN32;_WINDOWS;_USRDLL;EXPAT_EXPORTS;_DEBUG;XML_UNICODE_WCHAR_T
|
||||
Item4=NDEBUG;WIN32;_WINDOWS;_USRDLL;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T;_DEBUG
|
||||
Item5=NDEBUG;WIN32;_WINDOWS;_UNICODE;_USRDLL;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T;_DEBUG
|
||||
Item6=NDEBUG;WIN32;_WINDOWS;_UNICODE;_USRDLL;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T
|
||||
Item7=NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T;XML_UNICODE
|
||||
Item8=NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;EXPAT_EXPORTS;XML_UNICODE_WCHAR_T
|
||||
|
||||
[HistoryLists\hlIntOutputDir]
|
||||
Count=8
|
||||
@ -143,4 +143,4 @@ ActiveLang=
|
||||
ProjectLang=
|
||||
RootDir=
|
||||
</IDEOPTIONS>
|
||||
</PROJECT>
|
||||
</PROJECT>@
|
||||
|
@ -36,7 +36,7 @@ PATHPAS = .;
|
||||
PATHRC = .;
|
||||
DEBUGLIBPATH = $(BCB)\lib\debug
|
||||
RELEASELIBPATH = $(BCB)\lib\release
|
||||
USERDEFINES = _WINDOWS;WIN32;NDEBUG;_USRDLL;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T
|
||||
USERDEFINES = _WINDOWS;WIN32;NDEBUG;_USRDLL;XML_UNICODE_WCHAR_T
|
||||
SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL
|
||||
INCLUDEPATH = ..\lib;$(BCB)\include
|
||||
LIBPATH = ..\lib;$(BCB)\lib;$(RELEASELIBPATH)
|
||||
|
@ -23,7 +23,7 @@
|
||||
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
|
||||
<RELEASELIBPATH value="$(BCB)\lib\release"/>
|
||||
<LINKER value="TLib"/>
|
||||
<USERDEFINES value="_WINDOWS;WIN32;NDEBUG;_LIB;COMPILED_FROM_DSP;XML_STATIC;XML_UNICODE_WCHAR_T"/>
|
||||
<USERDEFINES value="_WINDOWS;WIN32;NDEBUG;_LIB;XML_STATIC;XML_UNICODE_WCHAR_T"/>
|
||||
<SYSDEFINES value="_NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL"/>
|
||||
<MAINSOURCE value="expatw_static.bpf"/>
|
||||
<INCLUDEPATH value="..\lib;$(BCB)\include"/>
|
||||
@ -94,21 +94,21 @@ Item0=$(BCB)\source\vcl
|
||||
|
||||
[HistoryLists\hlConditionals]
|
||||
Count=15
|
||||
Item0=_WINDOWS;WIN32;NDEBUG;_LIB;COMPILED_FROM_DSP;XML_STATIC;XML_UNICODE_WCHAR_T
|
||||
Item1=_WINDOWS;WIN32;NDEBUG;_DEBUG;_LIB;COMPILED_FROM_DSP;XML_STATIC;XML_UNICODE_WCHAR_T
|
||||
Item2=WIN32;_WINDOWS;NDEBUG;_DEBUG;_LIB;COMPILED_FROM_DSP;XML_STATIC;XML_UNICODE_WCHAR_T
|
||||
Item3=WIN32;_WINDOWS;NDEBUG;_DEBUG;_LIB;XML_STATIC;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T
|
||||
Item4=WIN32;_WINDOWS;NDEBUG;_LIB;COMPILED_FROM_DSP;_DEBUG;XML_UNICODE_WCHAR_T
|
||||
Item5=WIN32;_WINDOWS;NDEBUG;_UNICODE;_LIB;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T;_DEBUG
|
||||
Item6=WIN32;_WINDOWS;NDEBUG;_UNICODE;_LIB;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T;_DEBUG;__cplusplus
|
||||
Item7=WIN32;_WINDOWS;NDEBUG;_UNICODE;_LIB;COMPILED_FROM_DSP;XML_UNICODE;_DEBUG
|
||||
Item8=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;COMPILED_FROM_DSP;XML_UNICODE;_DEBUG
|
||||
Item9=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T;_DEBUG;__WCHAR_T
|
||||
Item10=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T;_DEBUG;_UNICODE
|
||||
Item11=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;COMPILED_FROM_DSP;XML_UNICODE;_DEBUG;_UNICODE
|
||||
Item12=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T;_DEBUG
|
||||
Item13=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T
|
||||
Item14=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;COMPILED_FROM_DSP;XML_UNICODE_WCHAR_T;XML_UNICODE
|
||||
Item0=_WINDOWS;WIN32;NDEBUG;_LIB;XML_STATIC;XML_UNICODE_WCHAR_T
|
||||
Item1=_WINDOWS;WIN32;NDEBUG;_DEBUG;_LIB;XML_STATIC;XML_UNICODE_WCHAR_T
|
||||
Item2=WIN32;_WINDOWS;NDEBUG;_DEBUG;_LIB;XML_STATIC;XML_UNICODE_WCHAR_T
|
||||
Item3=WIN32;_WINDOWS;NDEBUG;_DEBUG;_LIB;XML_STATIC;XML_UNICODE_WCHAR_T
|
||||
Item4=WIN32;_WINDOWS;NDEBUG;_LIB;_DEBUG;XML_UNICODE_WCHAR_T
|
||||
Item5=WIN32;_WINDOWS;NDEBUG;_UNICODE;_LIB;XML_UNICODE_WCHAR_T;_DEBUG
|
||||
Item6=WIN32;_WINDOWS;NDEBUG;_UNICODE;_LIB;XML_UNICODE_WCHAR_T;_DEBUG;__cplusplus
|
||||
Item7=WIN32;_WINDOWS;NDEBUG;_UNICODE;_LIB;XML_UNICODE;_DEBUG
|
||||
Item8=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;XML_UNICODE;_DEBUG
|
||||
Item9=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;XML_UNICODE_WCHAR_T;_DEBUG;__WCHAR_T
|
||||
Item10=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;XML_UNICODE_WCHAR_T;_DEBUG;_UNICODE
|
||||
Item11=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;XML_UNICODE;_DEBUG;_UNICODE
|
||||
Item12=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;XML_UNICODE_WCHAR_T;_DEBUG
|
||||
Item13=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;XML_UNICODE_WCHAR_T
|
||||
Item14=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB;XML_UNICODE_WCHAR_T;XML_UNICODE
|
||||
|
||||
[HistoryLists\hlIntOutputDir]
|
||||
Count=6
|
||||
@ -149,4 +149,4 @@ ActiveLang=
|
||||
ProjectLang=
|
||||
RootDir=
|
||||
</IDEOPTIONS>
|
||||
</PROJECT>
|
||||
</PROJECT>@
|
||||
|
@ -35,7 +35,7 @@ PATHRC = .;
|
||||
LINKER = TLib
|
||||
DEBUGLIBPATH = $(BCB)\lib\debug
|
||||
RELEASELIBPATH = $(BCB)\lib\release
|
||||
USERDEFINES = _WINDOWS;WIN32;NDEBUG;_LIB;COMPILED_FROM_DSP;XML_STATIC;XML_UNICODE_WCHAR_T
|
||||
USERDEFINES = _WINDOWS;WIN32;NDEBUG;_LIB;XML_STATIC;XML_UNICODE_WCHAR_T
|
||||
SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL
|
||||
INCLUDEPATH = ..\lib;$(BCB)\include
|
||||
LIBPATH = ..\lib;$(BCB)\lib;$(RELEASELIBPATH)
|
||||
|
@ -129,4 +129,4 @@ ActiveLang=
|
||||
ProjectLang=
|
||||
RootDir=
|
||||
</IDEOPTIONS>
|
||||
</PROJECT>
|
||||
</PROJECT>@
|
||||
|
@ -25,7 +25,7 @@
|
||||
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
|
||||
<RELEASELIBPATH value="$(BCB)\lib\release"/>
|
||||
<LINKER value="ilink32"/>
|
||||
<USERDEFINES value="NDEBUG;WIN32;_CONSOLE;COMPILED_FROM_DSP"/>
|
||||
<USERDEFINES value="NDEBUG;WIN32;_CONSOLE"/>
|
||||
<SYSDEFINES value="_NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL"/>
|
||||
<MAINSOURCE value="xmlwf.bpf"/>
|
||||
<INCLUDEPATH value="..\xmlwf;$(BCB)\include"/>
|
||||
@ -94,12 +94,12 @@ Item0=$(BCB)\source\vcl
|
||||
|
||||
[HistoryLists\hlConditionals]
|
||||
Count=6
|
||||
Item0=NDEBUG;WIN32;_CONSOLE;COMPILED_FROM_DSP
|
||||
Item1=NDEBUG;WIN32;_CONSOLE;COMPILED_FROM_DSP;_DEBUG;XML_UNICODE_WCHAR_T;_UNICODE
|
||||
Item2=NDEBUG;WIN32;_CONSOLE;COMPILED_FROM_DSP;_DEBUG;XML_UNICODE_WCHAR_T
|
||||
Item3=NDEBUG;WIN32;_CONSOLE;COMPILED_FROM_DSP;_DEBUG
|
||||
Item4=NDEBUG;WIN32;_CONSOLE;COMPILED_FROM_DSP;_DEBUG;_UNICODE;XML_UNICODE_WCHAR_T
|
||||
Item5=NDEBUG;WIN32;_CONSOLE;COMPILED_FROM_DSP;_DEBUG;_UNICODE
|
||||
Item0=NDEBUG;WIN32;_CONSOLE
|
||||
Item1=NDEBUG;WIN32;_CONSOLE;_DEBUG;XML_UNICODE_WCHAR_T;_UNICODE
|
||||
Item2=NDEBUG;WIN32;_CONSOLE;_DEBUG;XML_UNICODE_WCHAR_T
|
||||
Item3=NDEBUG;WIN32;_CONSOLE;_DEBUG
|
||||
Item4=NDEBUG;WIN32;_CONSOLE;_DEBUG;_UNICODE;XML_UNICODE_WCHAR_T
|
||||
Item5=NDEBUG;WIN32;_CONSOLE;_DEBUG;_UNICODE
|
||||
|
||||
[HistoryLists\hlIntOutputDir]
|
||||
Count=3
|
||||
@ -133,4 +133,4 @@ ActiveLang=
|
||||
ProjectLang=
|
||||
RootDir=
|
||||
</IDEOPTIONS>
|
||||
</PROJECT>
|
||||
</PROJECT>@
|
||||
|
@ -36,7 +36,7 @@ PATHPAS = .;
|
||||
PATHRC = .;
|
||||
DEBUGLIBPATH = $(BCB)\lib\debug
|
||||
RELEASELIBPATH = $(BCB)\lib\release
|
||||
USERDEFINES = NDEBUG;WIN32;_CONSOLE;COMPILED_FROM_DSP
|
||||
USERDEFINES = NDEBUG;WIN32;_CONSOLE
|
||||
SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL
|
||||
INCLUDEPATH = ..\xmlwf;$(BCB)\include
|
||||
LIBPATH = ..\xmlwf;$(BCB)\lib;$(RELEASELIBPATH)
|
||||
|
3190
src/expat/configure
vendored
3190
src/expat/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -25,7 +25,7 @@ dnl test. I believe this test will work, but I don't have a place with non-
|
||||
dnl GNU M4 to test it right now.
|
||||
define([expat_version], ifdef([__gnu__],
|
||||
[esyscmd(conftools/get-version.sh lib/expat.h)],
|
||||
[2.1.x]))
|
||||
[2.2.x]))
|
||||
AC_INIT(expat, expat_version, expat-bugs@libexpat.org)
|
||||
undefine([expat_version])
|
||||
|
||||
@ -45,18 +45,14 @@ dnl
|
||||
dnl If the API changes incompatibly set LIBAGE back to 0
|
||||
dnl
|
||||
|
||||
LIBCURRENT=7
|
||||
LIBREVISION=0
|
||||
LIBAGE=6
|
||||
LIBCURRENT=7 # sync
|
||||
LIBREVISION=2 # with
|
||||
LIBAGE=6 # CMakeLists.txt!
|
||||
|
||||
AC_CONFIG_HEADER(expat_config.h)
|
||||
|
||||
sinclude(conftools/ac_c_bigendian_cross.m4)
|
||||
|
||||
|
||||
dnl Check for many C compilers (have to do this before libtool stuff)
|
||||
AC_BAKEFILE_PROG_CC
|
||||
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
@ -65,6 +61,7 @@ AC_SUBST(LIBREVISION)
|
||||
AC_SUBST(LIBAGE)
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_PROG_INSTALL
|
||||
|
||||
@ -80,7 +77,9 @@ if test "$GCC" = yes ; then
|
||||
AC_TRY_LINK( , ,
|
||||
AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(no); CFLAGS="$OLDCFLAGS")
|
||||
if test "x$CXXFLAGS" = x ; then
|
||||
CXXFLAGS=`echo "$CFLAGS" | sed 's/ -Wmissing-prototypes -Wstrict-prototypes//'`
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Checks for header files.
|
||||
@ -154,5 +153,5 @@ AC_OUTPUT
|
||||
abs_srcdir="`cd $srcdir && pwd`"
|
||||
abs_builddir="`pwd`"
|
||||
if test "$abs_srcdir" != "$abs_builddir"; then
|
||||
${MAKE:-make} mkdir-init
|
||||
make mkdir-init
|
||||
fi
|
||||
|
163
src/expat/conftools/config.guess
vendored
163
src/expat/conftools/config.guess
vendored
@ -1,8 +1,8 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright 1992-2014 Free Software Foundation, Inc.
|
||||
# Copyright 1992-2016 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2014-03-23'
|
||||
timestamp='2016-04-02'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@ -24,12 +24,12 @@ timestamp='2014-03-23'
|
||||
# program. This Exception is an additional permission under section 7
|
||||
# of the GNU General Public License, version 3 ("GPLv3").
|
||||
#
|
||||
# Originally written by Per Bothner.
|
||||
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
|
||||
#
|
||||
# You can get the latest version of this script from:
|
||||
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
|
||||
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
|
||||
#
|
||||
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
|
||||
# Please send patches to <config-patches@gnu.org>.
|
||||
|
||||
|
||||
me=`echo "$0" | sed -e 's,.*/,,'`
|
||||
@ -50,7 +50,7 @@ version="\
|
||||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright 1992-2014 Free Software Foundation, Inc.
|
||||
Copyright 1992-2016 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
@ -168,20 +168,27 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
# Note: NetBSD doesn't particularly care about the vendor
|
||||
# portion of the name. We always set it to "unknown".
|
||||
sysctl="sysctl -n hw.machine_arch"
|
||||
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
|
||||
/usr/sbin/$sysctl 2>/dev/null || echo unknown)`
|
||||
UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
|
||||
/sbin/$sysctl 2>/dev/null || \
|
||||
/usr/sbin/$sysctl 2>/dev/null || \
|
||||
echo unknown)`
|
||||
case "${UNAME_MACHINE_ARCH}" in
|
||||
armeb) machine=armeb-unknown ;;
|
||||
arm*) machine=arm-unknown ;;
|
||||
sh3el) machine=shl-unknown ;;
|
||||
sh3eb) machine=sh-unknown ;;
|
||||
sh5el) machine=sh5le-unknown ;;
|
||||
earmv*)
|
||||
arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
|
||||
endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
|
||||
machine=${arch}${endian}-unknown
|
||||
;;
|
||||
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
|
||||
esac
|
||||
# The Operating System including object format, if it has switched
|
||||
# to ELF recently, or will in the future.
|
||||
case "${UNAME_MACHINE_ARCH}" in
|
||||
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
||||
arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
||||
eval $set_cc_for_build
|
||||
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep -q __ELF__
|
||||
@ -197,6 +204,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
os=netbsd
|
||||
;;
|
||||
esac
|
||||
# Determine ABI tags.
|
||||
case "${UNAME_MACHINE_ARCH}" in
|
||||
earm*)
|
||||
expr='s/^earmv[0-9]/-eabi/;s/eb$//'
|
||||
abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
|
||||
;;
|
||||
esac
|
||||
# The OS release
|
||||
# Debian GNU/NetBSD machines have a different userland, and
|
||||
# thus, need a distinct triplet. However, they do not need
|
||||
@ -207,13 +221,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
release='-gnu'
|
||||
;;
|
||||
*)
|
||||
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
|
||||
;;
|
||||
esac
|
||||
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
||||
# contains redundant information, the shorter form:
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
||||
echo "${machine}-${os}${release}"
|
||||
echo "${machine}-${os}${release}${abi}"
|
||||
exit ;;
|
||||
*:Bitrig:*:*)
|
||||
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
|
||||
@ -223,6 +237,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
|
||||
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:LibertyBSD:*:*)
|
||||
UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
|
||||
echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:ekkoBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
|
||||
exit ;;
|
||||
@ -235,6 +253,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
*:MirBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:Sortix:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-sortix
|
||||
exit ;;
|
||||
alpha:OSF1:*:*)
|
||||
case $UNAME_RELEASE in
|
||||
*4.0)
|
||||
@ -251,42 +272,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
|
||||
case "$ALPHA_CPU_TYPE" in
|
||||
"EV4 (21064)")
|
||||
UNAME_MACHINE="alpha" ;;
|
||||
UNAME_MACHINE=alpha ;;
|
||||
"EV4.5 (21064)")
|
||||
UNAME_MACHINE="alpha" ;;
|
||||
UNAME_MACHINE=alpha ;;
|
||||
"LCA4 (21066/21068)")
|
||||
UNAME_MACHINE="alpha" ;;
|
||||
UNAME_MACHINE=alpha ;;
|
||||
"EV5 (21164)")
|
||||
UNAME_MACHINE="alphaev5" ;;
|
||||
UNAME_MACHINE=alphaev5 ;;
|
||||
"EV5.6 (21164A)")
|
||||
UNAME_MACHINE="alphaev56" ;;
|
||||
UNAME_MACHINE=alphaev56 ;;
|
||||
"EV5.6 (21164PC)")
|
||||
UNAME_MACHINE="alphapca56" ;;
|
||||
UNAME_MACHINE=alphapca56 ;;
|
||||
"EV5.7 (21164PC)")
|
||||
UNAME_MACHINE="alphapca57" ;;
|
||||
UNAME_MACHINE=alphapca57 ;;
|
||||
"EV6 (21264)")
|
||||
UNAME_MACHINE="alphaev6" ;;
|
||||
UNAME_MACHINE=alphaev6 ;;
|
||||
"EV6.7 (21264A)")
|
||||
UNAME_MACHINE="alphaev67" ;;
|
||||
UNAME_MACHINE=alphaev67 ;;
|
||||
"EV6.8CB (21264C)")
|
||||
UNAME_MACHINE="alphaev68" ;;
|
||||
UNAME_MACHINE=alphaev68 ;;
|
||||
"EV6.8AL (21264B)")
|
||||
UNAME_MACHINE="alphaev68" ;;
|
||||
UNAME_MACHINE=alphaev68 ;;
|
||||
"EV6.8CX (21264D)")
|
||||
UNAME_MACHINE="alphaev68" ;;
|
||||
UNAME_MACHINE=alphaev68 ;;
|
||||
"EV6.9A (21264/EV69A)")
|
||||
UNAME_MACHINE="alphaev69" ;;
|
||||
UNAME_MACHINE=alphaev69 ;;
|
||||
"EV7 (21364)")
|
||||
UNAME_MACHINE="alphaev7" ;;
|
||||
UNAME_MACHINE=alphaev7 ;;
|
||||
"EV7.9 (21364A)")
|
||||
UNAME_MACHINE="alphaev79" ;;
|
||||
UNAME_MACHINE=alphaev79 ;;
|
||||
esac
|
||||
# A Pn.n version is a patched version.
|
||||
# A Vn.n version is a released version.
|
||||
# A Tn.n version is a released field test version.
|
||||
# A Xn.n version is an unreleased experimental baselevel.
|
||||
# 1.2 uses "1.2" for uname -r.
|
||||
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
|
||||
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
|
||||
exitcode=$?
|
||||
trap '' 0
|
||||
@ -359,16 +380,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
exit ;;
|
||||
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
|
||||
eval $set_cc_for_build
|
||||
SUN_ARCH="i386"
|
||||
SUN_ARCH=i386
|
||||
# If there is a compiler, see if it is configured for 64-bit objects.
|
||||
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
|
||||
# This test works for both compilers.
|
||||
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
|
||||
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
|
||||
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_64BIT_ARCH >/dev/null
|
||||
then
|
||||
SUN_ARCH="x86_64"
|
||||
SUN_ARCH=x86_64
|
||||
fi
|
||||
fi
|
||||
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
@ -393,7 +414,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
exit ;;
|
||||
sun*:*:4.2BSD:*)
|
||||
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
|
||||
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
|
||||
test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
|
||||
case "`/bin/arch`" in
|
||||
sun3)
|
||||
echo m68k-sun-sunos${UNAME_RELEASE}
|
||||
@ -579,8 +600,9 @@ EOF
|
||||
else
|
||||
IBM_ARCH=powerpc
|
||||
fi
|
||||
if [ -x /usr/bin/oslevel ] ; then
|
||||
IBM_REV=`/usr/bin/oslevel`
|
||||
if [ -x /usr/bin/lslpp ] ; then
|
||||
IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
|
||||
awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
|
||||
else
|
||||
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
|
||||
fi
|
||||
@ -617,13 +639,13 @@ EOF
|
||||
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
|
||||
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
|
||||
case "${sc_cpu_version}" in
|
||||
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
|
||||
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
|
||||
523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
|
||||
528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
|
||||
532) # CPU_PA_RISC2_0
|
||||
case "${sc_kernel_bits}" in
|
||||
32) HP_ARCH="hppa2.0n" ;;
|
||||
64) HP_ARCH="hppa2.0w" ;;
|
||||
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
|
||||
32) HP_ARCH=hppa2.0n ;;
|
||||
64) HP_ARCH=hppa2.0w ;;
|
||||
'') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
|
||||
esac ;;
|
||||
esac
|
||||
fi
|
||||
@ -662,11 +684,11 @@ EOF
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
|
||||
(CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
|
||||
test -z "$HP_ARCH" && HP_ARCH=hppa
|
||||
fi ;;
|
||||
esac
|
||||
if [ ${HP_ARCH} = "hppa2.0w" ]
|
||||
if [ ${HP_ARCH} = hppa2.0w ]
|
||||
then
|
||||
eval $set_cc_for_build
|
||||
|
||||
@ -679,12 +701,12 @@ EOF
|
||||
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
|
||||
# => hppa64-hp-hpux11.23
|
||||
|
||||
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
|
||||
if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
|
||||
grep -q __LP64__
|
||||
then
|
||||
HP_ARCH="hppa2.0w"
|
||||
HP_ARCH=hppa2.0w
|
||||
else
|
||||
HP_ARCH="hppa64"
|
||||
HP_ARCH=hppa64
|
||||
fi
|
||||
fi
|
||||
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
||||
@ -789,14 +811,14 @@ EOF
|
||||
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit ;;
|
||||
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
|
||||
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
|
||||
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
||||
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit ;;
|
||||
5000:UNIX_System_V:4.*:*)
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
|
||||
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
|
||||
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit ;;
|
||||
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
||||
@ -878,7 +900,7 @@ EOF
|
||||
exit ;;
|
||||
*:GNU/*:*:*)
|
||||
# other systems with GNU libc and userland
|
||||
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
|
||||
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
|
||||
exit ;;
|
||||
i*86:Minix:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-minix
|
||||
@ -901,7 +923,7 @@ EOF
|
||||
EV68*) UNAME_MACHINE=alphaev68 ;;
|
||||
esac
|
||||
objdump --private-headers /bin/sh | grep -q ld.so.1
|
||||
if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
|
||||
if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
arc:Linux:*:* | arceb:Linux:*:*)
|
||||
@ -932,6 +954,9 @@ EOF
|
||||
crisv32:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
|
||||
exit ;;
|
||||
e2k:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
frv:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
@ -944,6 +969,9 @@ EOF
|
||||
ia64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
k1om:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
m32r*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
@ -1020,7 +1048,18 @@ EOF
|
||||
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
|
||||
exit ;;
|
||||
x86_64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
eval $set_cc_for_build
|
||||
X86_64_ABI=
|
||||
# If there is a compiler, see if it is configured for 32-bit objects.
|
||||
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
|
||||
if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
|
||||
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_X32 >/dev/null
|
||||
then
|
||||
X86_64_ABI=x32
|
||||
fi
|
||||
fi
|
||||
echo ${UNAME_MACHINE}-pc-linux-${LIBC}${X86_64_ABI}
|
||||
exit ;;
|
||||
xtensa*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
@ -1099,7 +1138,7 @@ EOF
|
||||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||
# the processor, so we play safe by assuming i586.
|
||||
# Note: whatever this is, it MUST be the same as what config.sub
|
||||
# prints for the "djgpp" host, or else GDB configury will decide that
|
||||
# prints for the "djgpp" host, or else GDB configure will decide that
|
||||
# this is a cross-build.
|
||||
echo i586-pc-msdosdjgpp
|
||||
exit ;;
|
||||
@ -1248,6 +1287,9 @@ EOF
|
||||
SX-8R:SUPER-UX:*:*)
|
||||
echo sx8r-nec-superux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
SX-ACE:SUPER-UX:*:*)
|
||||
echo sxace-nec-superux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
Power*:Rhapsody:*:*)
|
||||
echo powerpc-apple-rhapsody${UNAME_RELEASE}
|
||||
exit ;;
|
||||
@ -1261,9 +1303,9 @@ EOF
|
||||
UNAME_PROCESSOR=powerpc
|
||||
fi
|
||||
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
|
||||
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
|
||||
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
|
||||
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_64BIT_ARCH >/dev/null
|
||||
then
|
||||
case $UNAME_PROCESSOR in
|
||||
@ -1285,7 +1327,7 @@ EOF
|
||||
exit ;;
|
||||
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
||||
UNAME_PROCESSOR=`uname -p`
|
||||
if test "$UNAME_PROCESSOR" = "x86"; then
|
||||
if test "$UNAME_PROCESSOR" = x86; then
|
||||
UNAME_PROCESSOR=i386
|
||||
UNAME_MACHINE=pc
|
||||
fi
|
||||
@ -1316,7 +1358,7 @@ EOF
|
||||
# "uname -m" is not consistent, so use $cputype instead. 386
|
||||
# is converted to i386 for consistency with other x86
|
||||
# operating systems.
|
||||
if test "$cputype" = "386"; then
|
||||
if test "$cputype" = 386; then
|
||||
UNAME_MACHINE=i386
|
||||
else
|
||||
UNAME_MACHINE="$cputype"
|
||||
@ -1358,7 +1400,7 @@ EOF
|
||||
echo i386-pc-xenix
|
||||
exit ;;
|
||||
i*86:skyos:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
|
||||
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
|
||||
exit ;;
|
||||
i*86:rdos:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-rdos
|
||||
@ -1369,6 +1411,9 @@ EOF
|
||||
x86_64:VMkernel:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-esx
|
||||
exit ;;
|
||||
amd64:Isilon\ OneFS:*:*)
|
||||
echo x86_64-unknown-onefs
|
||||
exit ;;
|
||||
esac
|
||||
|
||||
cat >&2 <<EOF
|
||||
@ -1378,9 +1423,9 @@ This script, last modified $timestamp, has failed to recognize
|
||||
the operating system you are using. It is advised that you
|
||||
download the most up to date version of the config scripts from
|
||||
|
||||
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
|
||||
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
|
||||
and
|
||||
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
|
||||
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
|
||||
|
||||
If the version you run ($0) is already up to date, please
|
||||
send the following data and any information you think might be
|
||||
|
70
src/expat/conftools/config.sub
vendored
70
src/expat/conftools/config.sub
vendored
@ -1,8 +1,8 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright 1992-2014 Free Software Foundation, Inc.
|
||||
# Copyright 1992-2016 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2014-09-11'
|
||||
timestamp='2016-03-30'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@ -25,7 +25,7 @@ timestamp='2014-09-11'
|
||||
# of the GNU General Public License, version 3 ("GPLv3").
|
||||
|
||||
|
||||
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
|
||||
# Please send patches to <config-patches@gnu.org>.
|
||||
#
|
||||
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||
# Supply the specified configuration type as an argument.
|
||||
@ -33,7 +33,7 @@ timestamp='2014-09-11'
|
||||
# Otherwise, we print the canonical config type on stdout and succeed.
|
||||
|
||||
# You can get the latest version of this script from:
|
||||
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
|
||||
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
|
||||
|
||||
# This file is supposed to be the same for all GNU packages
|
||||
# and recognize all the CPU types, system types and aliases
|
||||
@ -53,8 +53,7 @@ timestamp='2014-09-11'
|
||||
me=`echo "$0" | sed -e 's,.*/,,'`
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION] CPU-MFR-OPSYS
|
||||
$0 [OPTION] ALIAS
|
||||
Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
|
||||
|
||||
Canonicalize a configuration name.
|
||||
|
||||
@ -68,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
|
||||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright 1992-2014 Free Software Foundation, Inc.
|
||||
Copyright 1992-2016 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
@ -117,7 +116,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
|
||||
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
|
||||
knetbsd*-gnu* | netbsd*-gnu* | \
|
||||
knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
|
||||
kopensolaris*-gnu* | \
|
||||
storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
os=-$maybe_os
|
||||
@ -255,12 +254,13 @@ case $basic_machine in
|
||||
| arc | arceb \
|
||||
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
|
||||
| avr | avr32 \
|
||||
| ba \
|
||||
| be32 | be64 \
|
||||
| bfin \
|
||||
| c4x | c8051 | clipper \
|
||||
| d10v | d30v | dlx | dsp16xx \
|
||||
| epiphany \
|
||||
| fido | fr30 | frv \
|
||||
| d10v | d30v | dlx | dsp16xx | dvp \
|
||||
| e2k | epiphany \
|
||||
| fido | fr30 | frv | ft32 \
|
||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| hexagon \
|
||||
| i370 | i860 | i960 | ia64 \
|
||||
@ -305,7 +305,7 @@ case $basic_machine in
|
||||
| riscv32 | riscv64 \
|
||||
| rl78 | rx \
|
||||
| score \
|
||||
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh64 | sh64le \
|
||||
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
||||
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
||||
@ -313,6 +313,7 @@ case $basic_machine in
|
||||
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
|
||||
| ubicom32 \
|
||||
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
|
||||
| visium \
|
||||
| we32k \
|
||||
| x86 | xc16x | xstormy16 | xtensa \
|
||||
| z8k | z80)
|
||||
@ -327,6 +328,9 @@ case $basic_machine in
|
||||
c6x)
|
||||
basic_machine=tic6x-unknown
|
||||
;;
|
||||
leon|leon[3-9])
|
||||
basic_machine=sparc-$basic_machine
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
|
||||
basic_machine=$basic_machine-unknown
|
||||
os=-none
|
||||
@ -372,12 +376,13 @@ case $basic_machine in
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
|
||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||
| avr-* | avr32-* \
|
||||
| ba-* \
|
||||
| be32-* | be64-* \
|
||||
| bfin-* | bs2000-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c4x-* \
|
||||
| c8051-* | clipper-* | craynv-* | cydra-* \
|
||||
| d10v-* | d30v-* | dlx-* \
|
||||
| elxsi-* \
|
||||
| e2k-* | elxsi-* \
|
||||
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
|
||||
| h8300-* | h8500-* \
|
||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||
@ -424,12 +429,13 @@ case $basic_machine in
|
||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
|
||||
| pyramid-* \
|
||||
| riscv32-* | riscv64-* \
|
||||
| rl78-* | romp-* | rs6000-* | rx-* \
|
||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
||||
| sparclite-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
|
||||
| tahoe-* \
|
||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||
| tile*-* \
|
||||
@ -437,6 +443,7 @@ case $basic_machine in
|
||||
| ubicom32-* \
|
||||
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
|
||||
| vax-* \
|
||||
| visium-* \
|
||||
| we32k-* \
|
||||
| x86-* | x86_64-* | xc16x-* | xps100-* \
|
||||
| xstormy16-* | xtensa*-* \
|
||||
@ -513,6 +520,9 @@ case $basic_machine in
|
||||
basic_machine=i386-pc
|
||||
os=-aros
|
||||
;;
|
||||
asmjs)
|
||||
basic_machine=asmjs-unknown
|
||||
;;
|
||||
aux)
|
||||
basic_machine=m68k-apple
|
||||
os=-aux
|
||||
@ -774,6 +784,9 @@ case $basic_machine in
|
||||
basic_machine=m68k-isi
|
||||
os=-sysv
|
||||
;;
|
||||
leon-*|leon[3-9]-*)
|
||||
basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
|
||||
;;
|
||||
m68knommu)
|
||||
basic_machine=m68k-unknown
|
||||
os=-linux
|
||||
@ -815,6 +828,24 @@ case $basic_machine in
|
||||
basic_machine=m68k-atari
|
||||
os=-mint
|
||||
;;
|
||||
mipsEE* | ee | ps2)
|
||||
basic_machine=mips64r5900el-scei
|
||||
case $os in
|
||||
-linux*)
|
||||
;;
|
||||
*)
|
||||
os=-elf
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
iop)
|
||||
basic_machine=mipsel-scei
|
||||
os=-irx
|
||||
;;
|
||||
dvp)
|
||||
basic_machine=dvp-scei
|
||||
os=-elf
|
||||
;;
|
||||
mips3*-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
|
||||
;;
|
||||
@ -1365,11 +1396,11 @@ case $os in
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
||||
| -sym* | -kopensolaris* | -plan9* \
|
||||
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
||||
| -aos* | -aros* \
|
||||
| -aos* | -aros* | -cloudabi* | -sortix* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
|
||||
| -bitrig* | -openbsd* | -solidbsd* \
|
||||
| -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
|
||||
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
||||
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
@ -1381,11 +1412,12 @@ case $os in
|
||||
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
|
||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -irx* \
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
||||
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
|
||||
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
|
||||
| -onefs* | -tirtos*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
@ -1517,6 +1549,8 @@ case $os in
|
||||
;;
|
||||
-nacl*)
|
||||
;;
|
||||
-ios)
|
||||
;;
|
||||
-none)
|
||||
;;
|
||||
*)
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2011-11-20.07; # UTC
|
||||
scriptversion=2013-12-25.23; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
tab=' '
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
IFS=" $tab$nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
# Set DOITPROG to "echo" to test this script.
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
doit_exec=${doit:-exec}
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
@ -68,17 +64,6 @@ mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
@ -97,7 +82,7 @@ dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
is_target_a_directory=possibly
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
@ -137,46 +122,57 @@ while test $# -ne 0; do
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
case $mode in
|
||||
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
-t)
|
||||
is_target_a_directory=always
|
||||
dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
-T) is_target_a_directory=never;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# We allow the use of options -d and -T together, by making -d
|
||||
# take the precedence; this is for compatibility with GNU install.
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
if test -n "$dst_arg"; then
|
||||
echo "$0: target directory not allowed when installing a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
@ -207,6 +203,15 @@ if test $# -eq 0; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
if test $# -gt 1 || test "$is_target_a_directory" = always; then
|
||||
if test ! -d "$dst_arg"; then
|
||||
echo "$0: $dst_arg: Is not a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
@ -223,16 +228,16 @@ if test -z "$dir_arg"; then
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
@ -269,41 +274,15 @@ do
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
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"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
dstdir=`dirname "$dst"`
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
@ -314,74 +293,74 @@ do
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
@ -391,53 +370,51 @@ do
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@ -472,15 +449,12 @@ do
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
set +f &&
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
@ -493,24 +467,24 @@ do
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -177,12 +177,14 @@ data from outside the XML file currently being parsed.
|
||||
This is an example of an internal entity:
|
||||
|
||||
.nf
|
||||
|
||||
<!ENTITY vers '1.0.2'>
|
||||
.fi
|
||||
|
||||
And here are some examples of external entities:
|
||||
|
||||
.nf
|
||||
|
||||
<!ENTITY header SYSTEM "header\-&vers;.xml"> (parsed)
|
||||
<!ENTITY logo SYSTEM "logo.png" PNG> (unparsed)
|
||||
.fi
|
||||
@ -193,6 +195,7 @@ Terminates the list of options. This is only needed if a filename
|
||||
starts with a hyphen. For example:
|
||||
|
||||
.nf
|
||||
|
||||
xmlwf \-\- \-myfile.xml
|
||||
.fi
|
||||
|
||||
@ -228,6 +231,7 @@ me, I'd like to add this information to this manpage.
|
||||
Here are some XML validators on the web:
|
||||
|
||||
.nf
|
||||
|
||||
http://www.hcrc.ed.ac.uk/~richard/xml\-check.html
|
||||
http://www.stg.brown.edu/service/xmlvalid/
|
||||
http://www.scripting.com/frontier5/xml/code/xmlValidator.html
|
||||
@ -235,6 +239,7 @@ http://www.xml.com/pub/a/tools/ruwf/check.html
|
||||
.fi
|
||||
.SH "SEE ALSO"
|
||||
.nf
|
||||
|
||||
The Expat home page: http://www.libexpat.org/
|
||||
The W3 XML specification: http://www.w3.org/TR/REC\-xml
|
||||
.fi
|
||||
|
@ -1,14 +1,4 @@
|
||||
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
|
||||
|
||||
<!-- Process this file with docbook-to-man to generate an nroff manual
|
||||
page: `docbook-to-man manpage.sgml > manpage.1'. You may view
|
||||
the manual page with: `docbook-to-man manpage.sgml | nroff -man |
|
||||
less'. A typical entry in a Makefile or Makefile.am is:
|
||||
|
||||
manpage.1: manpage.sgml
|
||||
docbook-to-man $< > $@
|
||||
-->
|
||||
|
||||
<!DOCTYPE refentry [
|
||||
<!-- Fill in your name for FIRSTNAME and SURNAME. -->
|
||||
<!ENTITY dhfirstname "<firstname>Scott</firstname>">
|
||||
<!ENTITY dhsurname "<surname>Bronson</surname>">
|
||||
@ -448,20 +438,3 @@ The W3 XML specification: http://www.w3.org/TR/REC-xml
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:2
|
||||
sgml-indent-data:t
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:nil
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
-->
|
@ -27,6 +27,8 @@ startElement(void *userData, const char *name, const char **atts)
|
||||
{
|
||||
int i;
|
||||
int *depthPtr = (int *)userData;
|
||||
(void)atts;
|
||||
|
||||
for (i = 0; i < *depthPtr; i++)
|
||||
putchar('\t');
|
||||
puts(name);
|
||||
@ -37,6 +39,8 @@ static void XMLCALL
|
||||
endElement(void *userData, const char *name)
|
||||
{
|
||||
int *depthPtr = (int *)userData;
|
||||
(void)name;
|
||||
|
||||
*depthPtr -= 1;
|
||||
}
|
||||
|
||||
@ -47,6 +51,9 @@ main(int argc, char *argv[])
|
||||
XML_Parser parser = XML_ParserCreate(NULL);
|
||||
int done;
|
||||
int depth = 0;
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
XML_SetUserData(parser, &depth);
|
||||
XML_SetElementHandler(parser, startElement, endElement);
|
||||
do {
|
||||
|
@ -49,6 +49,7 @@ static void XMLCALL
|
||||
start(void *data, const char *el, const char **attr)
|
||||
{
|
||||
int i;
|
||||
(void)data;
|
||||
|
||||
for (i = 0; i < Depth; i++)
|
||||
printf(" ");
|
||||
@ -66,6 +67,9 @@ start(void *data, const char *el, const char **attr)
|
||||
static void XMLCALL
|
||||
end(void *data, const char *el)
|
||||
{
|
||||
(void)data;
|
||||
(void)el;
|
||||
|
||||
Depth--;
|
||||
}
|
||||
|
||||
@ -73,6 +77,9 @@ int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
XML_Parser p = XML_ParserCreate(NULL);
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
if (! p) {
|
||||
fprintf(stderr, "Couldn't allocate memory for parser\n");
|
||||
exit(-1);
|
||||
|
@ -51,8 +51,7 @@
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
|
@ -342,7 +342,7 @@ XML_SetEntityDeclHandler(XML_Parser parser,
|
||||
XML_EntityDeclHandler handler);
|
||||
|
||||
/* OBSOLETE -- OBSOLETE -- OBSOLETE
|
||||
This handler has been superceded by the EntityDeclHandler above.
|
||||
This handler has been superseded by the EntityDeclHandler above.
|
||||
It is provided here for backward compatibility.
|
||||
|
||||
This is called for a declaration of an unparsed (NDATA) entity.
|
||||
@ -973,9 +973,12 @@ XML_FreeContentModel(XML_Parser parser, XML_Content *model);
|
||||
|
||||
/* Exposing the memory handling functions used in Expat */
|
||||
XMLPARSEAPI(void *)
|
||||
XML_ATTR_MALLOC
|
||||
XML_ATTR_ALLOC_SIZE(2)
|
||||
XML_MemMalloc(XML_Parser parser, size_t size);
|
||||
|
||||
XMLPARSEAPI(void *)
|
||||
XML_ATTR_ALLOC_SIZE(3)
|
||||
XML_MemRealloc(XML_Parser parser, void *ptr, size_t size);
|
||||
|
||||
XMLPARSEAPI(void)
|
||||
@ -1031,14 +1034,12 @@ XMLPARSEAPI(const XML_Feature *)
|
||||
XML_GetFeatureList(void);
|
||||
|
||||
|
||||
/* Expat follows the GNU/Linux convention of odd number minor version for
|
||||
beta/development releases and even number minor version for stable
|
||||
releases. Micro is bumped with each release, and set to 0 with each
|
||||
change to major or minor version.
|
||||
/* Expat follows the semantic versioning convention.
|
||||
See http://semver.org.
|
||||
*/
|
||||
#define XML_MAJOR_VERSION 2
|
||||
#define XML_MINOR_VERSION 1
|
||||
#define XML_MICRO_VERSION 1
|
||||
#define XML_MINOR_VERSION 2
|
||||
#define XML_MICRO_VERSION 0
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -72,12 +72,26 @@
|
||||
#endif
|
||||
#endif /* not defined XML_STATIC */
|
||||
|
||||
#if !defined(XMLIMPORT) && defined(__GNUC__) && (__GNUC__ >= 4)
|
||||
#define XMLIMPORT __attribute__ ((visibility ("default")))
|
||||
#endif
|
||||
|
||||
/* If we didn't define it above, define it away: */
|
||||
#ifndef XMLIMPORT
|
||||
#define XMLIMPORT
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
|
||||
#define XML_ATTR_MALLOC __attribute__((__malloc__))
|
||||
#else
|
||||
#define XML_ATTR_MALLOC
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
|
||||
#define XML_ATTR_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
|
||||
#else
|
||||
#define XML_ATTR_ALLOC_SIZE(x)
|
||||
#endif
|
||||
|
||||
#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL
|
||||
|
||||
|
@ -71,3 +71,25 @@
|
||||
#define inline
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef UNUSED_P
|
||||
# ifdef __GNUC__
|
||||
# define UNUSED_P(p) UNUSED_ ## p __attribute__((__unused__))
|
||||
# else
|
||||
# define UNUSED_P(p) UNUSED_ ## p
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
void
|
||||
align_limit_to_full_utf8_characters(const char * from, const char ** fromLimRef);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -1,26 +0,0 @@
|
||||
/*================================================================
|
||||
** Copyright 2000, Clark Cooper
|
||||
** All rights reserved.
|
||||
**
|
||||
** This is free software. You are permitted to copy, distribute, or modify
|
||||
** it under the terms of the MIT/X license (contained in the COPYING file
|
||||
** with this distribution.)
|
||||
*/
|
||||
|
||||
#ifndef OS2CONFIG_H
|
||||
#define OS2CONFIG_H
|
||||
|
||||
#include <memory.h>
|
||||
#include <string.h>
|
||||
|
||||
#define XML_NS 1
|
||||
#define XML_DTD 1
|
||||
#define XML_CONTEXT_BYTES 1024
|
||||
|
||||
/* we will assume all OS2 platforms are little endian */
|
||||
#define BYTEORDER 1234
|
||||
|
||||
/* OS2 has memmove() available. */
|
||||
#define HAVE_MEMMOVE
|
||||
|
||||
#endif /* ndef OS2CONFIG_H */
|
@ -1,47 +0,0 @@
|
||||
/* expat_config.h for use with Open Watcom 1.5 and above. */
|
||||
|
||||
#ifndef WATCOMCONFIG_H
|
||||
#define WATCOMCONFIG_H
|
||||
|
||||
#ifdef __NT__
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#undef WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
|
||||
/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
|
||||
#define BYTEORDER 1234
|
||||
|
||||
/* Define to 1 if you have the `memmove' function. */
|
||||
#define HAVE_MEMMOVE 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "expat-bugs@mail.libexpat.org"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "expat"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "expat 2.0.0"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "2.0.0"
|
||||
|
||||
/* Define to specify how much context to retain around the current parse
|
||||
point. */
|
||||
#define XML_CONTEXT_BYTES 1024
|
||||
|
||||
/* Define to make parameter entity parsing functionality available. */
|
||||
#define XML_DTD 1
|
||||
|
||||
/* Define to make XML Namespaces functionality available. */
|
||||
#define XML_NS 1
|
||||
|
||||
#endif
|
||||
|
@ -6,22 +6,19 @@
|
||||
#include <string.h> /* memset(), memcpy() */
|
||||
#include <assert.h>
|
||||
#include <limits.h> /* UINT_MAX */
|
||||
#include <time.h> /* time() */
|
||||
|
||||
#ifdef WIN32
|
||||
#define getpid GetCurrentProcessId
|
||||
#else
|
||||
#include <sys/time.h> /* gettimeofday() */
|
||||
#include <sys/types.h> /* getpid() */
|
||||
#include <unistd.h> /* getpid() */
|
||||
#endif
|
||||
|
||||
#define XML_BUILDING_EXPAT 1
|
||||
|
||||
#ifdef COMPILED_FROM_DSP
|
||||
#ifdef WIN32
|
||||
#include "winconfig.h"
|
||||
#elif defined(OS2_32)
|
||||
|
||||
#include "os2config.h"
|
||||
#include "expat.h"
|
||||
|
||||
#elif defined(__MSDOS__)
|
||||
|
||||
#include "dosconfig.h"
|
||||
#include "expat.h"
|
||||
|
||||
#elif defined(MACOS_CLASSIC)
|
||||
#include "macconfig.h"
|
||||
#elif defined(__amigaos__)
|
||||
@ -29,8 +26,8 @@
|
||||
#elif defined(__WATCOMC__)
|
||||
#include "watcomconfig.h"
|
||||
#elif defined(HAVE_EXPAT_CONFIG_H)
|
||||
#include "expat_config.h"
|
||||
#endif /* ndef COMPILED_FROM_DSP */
|
||||
#include <expat_config.h>
|
||||
#endif /* ndef WIN32 */
|
||||
|
||||
#include "ascii.h"
|
||||
#include "expat.h"
|
||||
@ -442,7 +439,7 @@ static ELEMENT_TYPE *
|
||||
getElementType(XML_Parser parser, const ENCODING *enc,
|
||||
const char *ptr, const char *end);
|
||||
|
||||
static unsigned long generate_hash_secret_salt(void);
|
||||
static unsigned long generate_hash_secret_salt(XML_Parser parser);
|
||||
static XML_Bool startParsing(XML_Parser parser);
|
||||
|
||||
static XML_Parser
|
||||
@ -701,11 +698,38 @@ static const XML_Char implicitContext[] = {
|
||||
};
|
||||
|
||||
static unsigned long
|
||||
generate_hash_secret_salt(void)
|
||||
gather_time_entropy(void)
|
||||
{
|
||||
unsigned int seed = time(NULL) % UINT_MAX;
|
||||
srand(seed);
|
||||
return rand();
|
||||
#ifdef WIN32
|
||||
FILETIME ft;
|
||||
GetSystemTimeAsFileTime(&ft); /* never fails */
|
||||
return ft.dwHighDateTime ^ ft.dwLowDateTime;
|
||||
#else
|
||||
struct timeval tv;
|
||||
int gettimeofday_res;
|
||||
|
||||
gettimeofday_res = gettimeofday(&tv, NULL);
|
||||
assert (gettimeofday_res == 0);
|
||||
|
||||
/* Microseconds time is <20 bits entropy */
|
||||
return tv.tv_usec;
|
||||
#endif
|
||||
}
|
||||
|
||||
static unsigned long
|
||||
generate_hash_secret_salt(XML_Parser parser)
|
||||
{
|
||||
/* Process ID is 0 bits entropy if attacker has local access
|
||||
* XML_Parser address is few bits of entropy if attacker has local access */
|
||||
const unsigned long entropy =
|
||||
gather_time_entropy() ^ getpid() ^ (unsigned long)parser;
|
||||
|
||||
/* Factors are 2^31-1 and 2^61-1 (Mersenne primes M31 and M61) */
|
||||
if (sizeof(unsigned long) == 4) {
|
||||
return entropy * 2147483647;
|
||||
} else {
|
||||
return entropy * (unsigned long)2305843009213693951;
|
||||
}
|
||||
}
|
||||
|
||||
static XML_Bool /* only valid for root parser */
|
||||
@ -713,7 +737,7 @@ startParsing(XML_Parser parser)
|
||||
{
|
||||
/* hash functions must be initialized before setContext() is called */
|
||||
if (hash_secret_salt == 0)
|
||||
hash_secret_salt = generate_hash_secret_salt();
|
||||
hash_secret_salt = generate_hash_secret_salt(parser);
|
||||
if (ns) {
|
||||
/* implicit context only set for root parser, since child
|
||||
parsers (i.e. external entity parsers) will inherit it
|
||||
@ -1705,15 +1729,15 @@ XML_GetBuffer(XML_Parser parser, int len)
|
||||
if (len > bufferLim - bufferEnd) {
|
||||
#ifdef XML_CONTEXT_BYTES
|
||||
int keep;
|
||||
#endif
|
||||
int neededSize = len + (int)(bufferEnd - bufferPtr);
|
||||
#endif /* defined XML_CONTEXT_BYTES */
|
||||
/* Do not invoke signed arithmetic overflow: */
|
||||
int neededSize = (int) ((unsigned)len + (unsigned)(bufferEnd - bufferPtr));
|
||||
if (neededSize < 0) {
|
||||
errorCode = XML_ERROR_NO_MEMORY;
|
||||
return NULL;
|
||||
}
|
||||
#ifdef XML_CONTEXT_BYTES
|
||||
keep = (int)(bufferPtr - buffer);
|
||||
|
||||
if (keep > XML_CONTEXT_BYTES)
|
||||
keep = XML_CONTEXT_BYTES;
|
||||
neededSize += keep;
|
||||
@ -1738,7 +1762,8 @@ XML_GetBuffer(XML_Parser parser, int len)
|
||||
if (bufferSize == 0)
|
||||
bufferSize = INIT_BUFFER_SIZE;
|
||||
do {
|
||||
bufferSize *= 2;
|
||||
/* Do not invoke signed arithmetic overflow: */
|
||||
bufferSize = (int) (2U * (unsigned) bufferSize);
|
||||
} while (bufferSize < neededSize && bufferSize > 0);
|
||||
if (bufferSize <= 0) {
|
||||
errorCode = XML_ERROR_NO_MEMORY;
|
||||
@ -1865,7 +1890,7 @@ XML_Index XMLCALL
|
||||
XML_GetCurrentByteIndex(XML_Parser parser)
|
||||
{
|
||||
if (eventPtr)
|
||||
return parseEndByteIndex - (parseEndPtr - eventPtr);
|
||||
return (XML_Index)(parseEndByteIndex - (parseEndPtr - eventPtr));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -4655,8 +4680,7 @@ doProlog(XML_Parser parser,
|
||||
name = el->name;
|
||||
dtd->scaffold[myindex].name = name;
|
||||
nameLen = 0;
|
||||
for (; name[nameLen++]; )
|
||||
;
|
||||
for (; name[nameLen++]; );
|
||||
dtd->contentStringLen += nameLen;
|
||||
if (elementDeclHandler)
|
||||
handleDefault = XML_FALSE;
|
||||
@ -4938,9 +4962,9 @@ internalEntityProcessor(XML_Parser parser,
|
||||
|
||||
static enum XML_Error PTRCALL
|
||||
errorProcessor(XML_Parser parser,
|
||||
const char *s,
|
||||
const char *end,
|
||||
const char **nextPtr)
|
||||
const char *UNUSED_P(s),
|
||||
const char *UNUSED_P(end),
|
||||
const char **UNUSED_P(nextPtr))
|
||||
{
|
||||
return errorCode;
|
||||
}
|
||||
|
@ -4,12 +4,8 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef COMPILED_FROM_DSP
|
||||
#ifdef WIN32
|
||||
#include "winconfig.h"
|
||||
#elif defined(OS2_32)
|
||||
#include "os2config.h"
|
||||
#elif defined(__MSDOS__)
|
||||
#include "dosconfig.h"
|
||||
#elif defined(MACOS_CLASSIC)
|
||||
#include "macconfig.h"
|
||||
#elif defined(__amigaos__)
|
||||
@ -20,7 +16,7 @@
|
||||
#ifdef HAVE_EXPAT_CONFIG_H
|
||||
#include <expat_config.h>
|
||||
#endif
|
||||
#endif /* ndef COMPILED_FROM_DSP */
|
||||
#endif /* ndef WIN32 */
|
||||
|
||||
#include "expat_external.h"
|
||||
#include "internal.h"
|
||||
@ -199,9 +195,9 @@ prolog1(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
prolog2(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -220,9 +216,9 @@ prolog2(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
doctype0(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -268,9 +264,9 @@ doctype1(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
doctype2(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -285,9 +281,9 @@ doctype2(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
doctype3(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -302,9 +298,9 @@ doctype3(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
doctype4(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -322,9 +318,9 @@ doctype4(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
doctype5(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -441,9 +437,9 @@ externalSubset1(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
entity0(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -461,9 +457,9 @@ entity0(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
entity1(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -506,9 +502,9 @@ entity2(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
entity3(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -523,9 +519,9 @@ entity3(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
entity4(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -563,9 +559,9 @@ entity5(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
entity6(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -609,9 +605,9 @@ entity7(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
entity8(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -626,9 +622,9 @@ entity8(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
entity9(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -643,9 +639,9 @@ entity9(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
entity10(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -660,9 +656,9 @@ entity10(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
notation0(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -701,9 +697,9 @@ notation1(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
notation2(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -718,9 +714,9 @@ notation2(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
notation3(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -736,9 +732,9 @@ notation3(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
notation4(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -757,9 +753,9 @@ notation4(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
attlist0(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -775,9 +771,9 @@ attlist0(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
attlist1(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -837,9 +833,9 @@ attlist2(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
attlist3(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -856,9 +852,9 @@ attlist3(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
attlist4(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -876,9 +872,9 @@ attlist4(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
attlist5(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -893,9 +889,9 @@ attlist5(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
attlist6(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -910,9 +906,9 @@ attlist6(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
attlist7(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -971,9 +967,9 @@ attlist8(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
attlist9(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -988,9 +984,9 @@ attlist9(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
element0(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -1076,9 +1072,9 @@ element2(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
element3(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -1101,9 +1097,9 @@ element3(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
element4(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -1119,9 +1115,9 @@ element4(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
element5(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -1140,9 +1136,9 @@ element5(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
element6(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -1170,9 +1166,9 @@ element6(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
element7(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -1244,9 +1240,9 @@ condSect0(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
condSect1(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -1262,9 +1258,9 @@ condSect1(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
condSect2(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -1281,9 +1277,9 @@ condSect2(PROLOG_STATE *state,
|
||||
static int PTRCALL
|
||||
declClose(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
switch (tok) {
|
||||
case XML_TOK_PROLOG_S:
|
||||
@ -1296,11 +1292,11 @@ declClose(PROLOG_STATE *state,
|
||||
}
|
||||
|
||||
static int PTRCALL
|
||||
error(PROLOG_STATE *state,
|
||||
int tok,
|
||||
const char *ptr,
|
||||
const char *end,
|
||||
const ENCODING *enc)
|
||||
error(PROLOG_STATE *UNUSED_P(state),
|
||||
int UNUSED_P(tok),
|
||||
const char *UNUSED_P(ptr),
|
||||
const char *UNUSED_P(end),
|
||||
const ENCODING *UNUSED_P(enc))
|
||||
{
|
||||
return XML_ROLE_NONE;
|
||||
}
|
||||
|
@ -4,12 +4,8 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef COMPILED_FROM_DSP
|
||||
#ifdef WIN32
|
||||
#include "winconfig.h"
|
||||
#elif defined(OS2_32)
|
||||
#include "os2config.h"
|
||||
#elif defined(__MSDOS__)
|
||||
#include "dosconfig.h"
|
||||
#elif defined(MACOS_CLASSIC)
|
||||
#include "macconfig.h"
|
||||
#elif defined(__amigaos__)
|
||||
@ -20,7 +16,7 @@
|
||||
#ifdef HAVE_EXPAT_CONFIG_H
|
||||
#include <expat_config.h>
|
||||
#endif
|
||||
#endif /* ndef COMPILED_FROM_DSP */
|
||||
#endif /* ndef WIN32 */
|
||||
|
||||
#include "expat_external.h"
|
||||
#include "internal.h"
|
||||
@ -50,7 +46,7 @@
|
||||
#define VTABLE VTABLE1, PREFIX(toUtf8), PREFIX(toUtf16)
|
||||
|
||||
#define UCS2_GET_NAMING(pages, hi, lo) \
|
||||
(namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1 << ((lo) & 0x1F)))
|
||||
(namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo) & 0x1F)))
|
||||
|
||||
/* A 2 byte UTF-8 representation splits the characters 11 bits between
|
||||
the bottom 5 and 6 bits of the bytes. We need 8 bits to index into
|
||||
@ -60,7 +56,7 @@
|
||||
(namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3) \
|
||||
+ ((((byte)[0]) & 3) << 1) \
|
||||
+ ((((byte)[1]) >> 5) & 1)] \
|
||||
& (1 << (((byte)[1]) & 0x1F)))
|
||||
& (1u << (((byte)[1]) & 0x1F)))
|
||||
|
||||
/* A 3 byte UTF-8 representation splits the characters 16 bits between
|
||||
the bottom 4, 6 and 6 bits of the bytes. We need 8 bits to index
|
||||
@ -73,7 +69,7 @@
|
||||
<< 3) \
|
||||
+ ((((byte)[1]) & 3) << 1) \
|
||||
+ ((((byte)[2]) >> 5) & 1)] \
|
||||
& (1 << (((byte)[2]) & 0x1F)))
|
||||
& (1u << (((byte)[2]) & 0x1F)))
|
||||
|
||||
#define UTF8_GET_NAMING(pages, p, n) \
|
||||
((n) == 2 \
|
||||
@ -126,19 +122,19 @@
|
||||
((*p) == 0xF4 ? (p)[1] > 0x8F : ((p)[1] & 0xC0) == 0xC0)))
|
||||
|
||||
static int PTRFASTCALL
|
||||
isNever(const ENCODING *enc, const char *p)
|
||||
isNever(const ENCODING *UNUSED_P(enc), const char *UNUSED_P(p))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int PTRFASTCALL
|
||||
utf8_isName2(const ENCODING *enc, const char *p)
|
||||
utf8_isName2(const ENCODING *UNUSED_P(enc), const char *p)
|
||||
{
|
||||
return UTF8_GET_NAMING2(namePages, (const unsigned char *)p);
|
||||
}
|
||||
|
||||
static int PTRFASTCALL
|
||||
utf8_isName3(const ENCODING *enc, const char *p)
|
||||
utf8_isName3(const ENCODING *UNUSED_P(enc), const char *p)
|
||||
{
|
||||
return UTF8_GET_NAMING3(namePages, (const unsigned char *)p);
|
||||
}
|
||||
@ -146,13 +142,13 @@ utf8_isName3(const ENCODING *enc, const char *p)
|
||||
#define utf8_isName4 isNever
|
||||
|
||||
static int PTRFASTCALL
|
||||
utf8_isNmstrt2(const ENCODING *enc, const char *p)
|
||||
utf8_isNmstrt2(const ENCODING *UNUSED_P(enc), const char *p)
|
||||
{
|
||||
return UTF8_GET_NAMING2(nmstrtPages, (const unsigned char *)p);
|
||||
}
|
||||
|
||||
static int PTRFASTCALL
|
||||
utf8_isNmstrt3(const ENCODING *enc, const char *p)
|
||||
utf8_isNmstrt3(const ENCODING *UNUSED_P(enc), const char *p)
|
||||
{
|
||||
return UTF8_GET_NAMING3(nmstrtPages, (const unsigned char *)p);
|
||||
}
|
||||
@ -160,19 +156,19 @@ utf8_isNmstrt3(const ENCODING *enc, const char *p)
|
||||
#define utf8_isNmstrt4 isNever
|
||||
|
||||
static int PTRFASTCALL
|
||||
utf8_isInvalid2(const ENCODING *enc, const char *p)
|
||||
utf8_isInvalid2(const ENCODING *UNUSED_P(enc), const char *p)
|
||||
{
|
||||
return UTF8_INVALID2((const unsigned char *)p);
|
||||
}
|
||||
|
||||
static int PTRFASTCALL
|
||||
utf8_isInvalid3(const ENCODING *enc, const char *p)
|
||||
utf8_isInvalid3(const ENCODING *UNUSED_P(enc), const char *p)
|
||||
{
|
||||
return UTF8_INVALID3((const unsigned char *)p);
|
||||
}
|
||||
|
||||
static int PTRFASTCALL
|
||||
utf8_isInvalid4(const ENCODING *enc, const char *p)
|
||||
utf8_isInvalid4(const ENCODING *UNUSED_P(enc), const char *p)
|
||||
{
|
||||
return UTF8_INVALID4((const unsigned char *)p);
|
||||
}
|
||||
@ -226,6 +222,17 @@ struct normal_encoding {
|
||||
E ## isInvalid3, \
|
||||
E ## isInvalid4
|
||||
|
||||
#define NULL_VTABLE \
|
||||
/* isName2 */ NULL, \
|
||||
/* isName3 */ NULL, \
|
||||
/* isName4 */ NULL, \
|
||||
/* isNmstrt2 */ NULL, \
|
||||
/* isNmstrt3 */ NULL, \
|
||||
/* isNmstrt4 */ NULL, \
|
||||
/* isInvalid2 */ NULL, \
|
||||
/* isInvalid3 */ NULL, \
|
||||
/* isInvalid4 */ NULL
|
||||
|
||||
static int FASTCALL checkCharRefNumber(int);
|
||||
|
||||
#include "xmltok_impl.h"
|
||||
@ -322,8 +329,43 @@ enum { /* UTF8_cvalN is value of masked first byte of N byte sequence */
|
||||
UTF8_cval4 = 0xf0
|
||||
};
|
||||
|
||||
void
|
||||
align_limit_to_full_utf8_characters(const char * from, const char ** fromLimRef)
|
||||
{
|
||||
const char * fromLim = *fromLimRef;
|
||||
size_t walked = 0;
|
||||
for (; fromLim > from; fromLim--, walked++) {
|
||||
const unsigned char prev = (unsigned char)fromLim[-1];
|
||||
if ((prev & 0xf8u) == 0xf0u) { /* 4-byte character, lead by 0b11110xxx byte */
|
||||
if (walked + 1 >= 4) {
|
||||
fromLim += 4 - 1;
|
||||
break;
|
||||
} else {
|
||||
walked = 0;
|
||||
}
|
||||
} else if ((prev & 0xf0u) == 0xe0u) { /* 3-byte character, lead by 0b1110xxxx byte */
|
||||
if (walked + 1 >= 3) {
|
||||
fromLim += 3 - 1;
|
||||
break;
|
||||
} else {
|
||||
walked = 0;
|
||||
}
|
||||
} else if ((prev & 0xe0u) == 0xc0u) { /* 2-byte character, lead by 0b110xxxxx byte */
|
||||
if (walked + 1 >= 2) {
|
||||
fromLim += 2 - 1;
|
||||
break;
|
||||
} else {
|
||||
walked = 0;
|
||||
}
|
||||
} else if ((prev & 0x80u) == 0x00u) { /* 1-byte character, matching 0b0xxxxxxx */
|
||||
break;
|
||||
}
|
||||
}
|
||||
*fromLimRef = fromLim;
|
||||
}
|
||||
|
||||
static enum XML_Convert_Result PTRCALL
|
||||
utf8_toUtf8(const ENCODING *enc,
|
||||
utf8_toUtf8(const ENCODING *UNUSED_P(enc),
|
||||
const char **fromP, const char *fromLim,
|
||||
char **toP, const char *toLim)
|
||||
{
|
||||
@ -333,9 +375,8 @@ utf8_toUtf8(const ENCODING *enc,
|
||||
if (fromLim - *fromP > toLim - *toP) {
|
||||
/* Avoid copying partial characters. */
|
||||
res = XML_CONVERT_OUTPUT_EXHAUSTED;
|
||||
for (fromLim = *fromP + (toLim - *toP); fromLim > *fromP; fromLim--)
|
||||
if (((unsigned char)fromLim[-1] & 0xc0) != 0x80)
|
||||
break;
|
||||
fromLim = *fromP + (toLim - *toP);
|
||||
align_limit_to_full_utf8_characters(*fromP, &fromLim);
|
||||
}
|
||||
for (to = *toP, from = *fromP; (from < fromLim) && (to < toLim); from++, to++)
|
||||
*to = *from;
|
||||
@ -453,7 +494,7 @@ static const struct normal_encoding internal_utf8_encoding = {
|
||||
};
|
||||
|
||||
static enum XML_Convert_Result PTRCALL
|
||||
latin1_toUtf8(const ENCODING *enc,
|
||||
latin1_toUtf8(const ENCODING *UNUSED_P(enc),
|
||||
const char **fromP, const char *fromLim,
|
||||
char **toP, const char *toLim)
|
||||
{
|
||||
@ -478,7 +519,7 @@ latin1_toUtf8(const ENCODING *enc,
|
||||
}
|
||||
|
||||
static enum XML_Convert_Result PTRCALL
|
||||
latin1_toUtf16(const ENCODING *enc,
|
||||
latin1_toUtf16(const ENCODING *UNUSED_P(enc),
|
||||
const char **fromP, const char *fromLim,
|
||||
unsigned short **toP, const unsigned short *toLim)
|
||||
{
|
||||
@ -499,7 +540,7 @@ static const struct normal_encoding latin1_encoding_ns = {
|
||||
#include "asciitab.h"
|
||||
#include "latin1tab.h"
|
||||
},
|
||||
STANDARD_VTABLE(sb_)
|
||||
STANDARD_VTABLE(sb_) NULL_VTABLE
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -512,11 +553,11 @@ static const struct normal_encoding latin1_encoding = {
|
||||
#undef BT_COLON
|
||||
#include "latin1tab.h"
|
||||
},
|
||||
STANDARD_VTABLE(sb_)
|
||||
STANDARD_VTABLE(sb_) NULL_VTABLE
|
||||
};
|
||||
|
||||
static enum XML_Convert_Result PTRCALL
|
||||
ascii_toUtf8(const ENCODING *enc,
|
||||
ascii_toUtf8(const ENCODING *UNUSED_P(enc),
|
||||
const char **fromP, const char *fromLim,
|
||||
char **toP, const char *toLim)
|
||||
{
|
||||
@ -537,7 +578,7 @@ static const struct normal_encoding ascii_encoding_ns = {
|
||||
#include "asciitab.h"
|
||||
/* BT_NONXML == 0 */
|
||||
},
|
||||
STANDARD_VTABLE(sb_)
|
||||
STANDARD_VTABLE(sb_) NULL_VTABLE
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -550,7 +591,7 @@ static const struct normal_encoding ascii_encoding = {
|
||||
#undef BT_COLON
|
||||
/* BT_NONXML == 0 */
|
||||
},
|
||||
STANDARD_VTABLE(sb_)
|
||||
STANDARD_VTABLE(sb_) NULL_VTABLE
|
||||
};
|
||||
|
||||
static int PTRFASTCALL
|
||||
@ -574,7 +615,7 @@ unicode_byte_type(char hi, char lo)
|
||||
|
||||
#define DEFINE_UTF16_TO_UTF8(E) \
|
||||
static enum XML_Convert_Result PTRCALL \
|
||||
E ## toUtf8(const ENCODING *enc, \
|
||||
E ## toUtf8(const ENCODING *UNUSED_P(enc), \
|
||||
const char **fromP, const char *fromLim, \
|
||||
char **toP, const char *toLim) \
|
||||
{ \
|
||||
@ -646,7 +687,7 @@ E ## toUtf8(const ENCODING *enc, \
|
||||
|
||||
#define DEFINE_UTF16_TO_UTF16(E) \
|
||||
static enum XML_Convert_Result PTRCALL \
|
||||
E ## toUtf16(const ENCODING *enc, \
|
||||
E ## toUtf16(const ENCODING *UNUSED_P(enc), \
|
||||
const char **fromP, const char *fromLim, \
|
||||
unsigned short **toP, const unsigned short *toLim) \
|
||||
{ \
|
||||
@ -780,7 +821,7 @@ static const struct normal_encoding little2_encoding_ns = {
|
||||
#include "asciitab.h"
|
||||
#include "latin1tab.h"
|
||||
},
|
||||
STANDARD_VTABLE(little2_)
|
||||
STANDARD_VTABLE(little2_) NULL_VTABLE
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -799,7 +840,7 @@ static const struct normal_encoding little2_encoding = {
|
||||
#undef BT_COLON
|
||||
#include "latin1tab.h"
|
||||
},
|
||||
STANDARD_VTABLE(little2_)
|
||||
STANDARD_VTABLE(little2_) NULL_VTABLE
|
||||
};
|
||||
|
||||
#if BYTEORDER != 4321
|
||||
@ -812,7 +853,7 @@ static const struct normal_encoding internal_little2_encoding_ns = {
|
||||
#include "iasciitab.h"
|
||||
#include "latin1tab.h"
|
||||
},
|
||||
STANDARD_VTABLE(little2_)
|
||||
STANDARD_VTABLE(little2_) NULL_VTABLE
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -825,7 +866,7 @@ static const struct normal_encoding internal_little2_encoding = {
|
||||
#undef BT_COLON
|
||||
#include "latin1tab.h"
|
||||
},
|
||||
STANDARD_VTABLE(little2_)
|
||||
STANDARD_VTABLE(little2_) NULL_VTABLE
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -921,7 +962,7 @@ static const struct normal_encoding big2_encoding_ns = {
|
||||
#include "asciitab.h"
|
||||
#include "latin1tab.h"
|
||||
},
|
||||
STANDARD_VTABLE(big2_)
|
||||
STANDARD_VTABLE(big2_) NULL_VTABLE
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -940,7 +981,7 @@ static const struct normal_encoding big2_encoding = {
|
||||
#undef BT_COLON
|
||||
#include "latin1tab.h"
|
||||
},
|
||||
STANDARD_VTABLE(big2_)
|
||||
STANDARD_VTABLE(big2_) NULL_VTABLE
|
||||
};
|
||||
|
||||
#if BYTEORDER != 1234
|
||||
@ -953,7 +994,7 @@ static const struct normal_encoding internal_big2_encoding_ns = {
|
||||
#include "iasciitab.h"
|
||||
#include "latin1tab.h"
|
||||
},
|
||||
STANDARD_VTABLE(big2_)
|
||||
STANDARD_VTABLE(big2_) NULL_VTABLE
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -966,7 +1007,7 @@ static const struct normal_encoding internal_big2_encoding = {
|
||||
#undef BT_COLON
|
||||
#include "latin1tab.h"
|
||||
},
|
||||
STANDARD_VTABLE(big2_)
|
||||
STANDARD_VTABLE(big2_) NULL_VTABLE
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -992,7 +1033,7 @@ streqci(const char *s1, const char *s2)
|
||||
}
|
||||
|
||||
static void PTRCALL
|
||||
initUpdatePosition(const ENCODING *enc, const char *ptr,
|
||||
initUpdatePosition(const ENCODING *UNUSED_P(enc), const char *ptr,
|
||||
const char *end, POSITION *pos)
|
||||
{
|
||||
normal_updatePosition(&utf8_encoding.enc, ptr, end, pos);
|
||||
|
@ -87,27 +87,45 @@
|
||||
#define PREFIX(ident) ident
|
||||
#endif
|
||||
|
||||
|
||||
#define HAS_CHARS(enc, ptr, end, count) \
|
||||
(end - ptr >= count * MINBPC(enc))
|
||||
|
||||
#define HAS_CHAR(enc, ptr, end) \
|
||||
HAS_CHARS(enc, ptr, end, 1)
|
||||
|
||||
#define REQUIRE_CHARS(enc, ptr, end, count) \
|
||||
{ \
|
||||
if (! HAS_CHARS(enc, ptr, end, count)) { \
|
||||
return XML_TOK_PARTIAL; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define REQUIRE_CHAR(enc, ptr, end) \
|
||||
REQUIRE_CHARS(enc, ptr, end, 1)
|
||||
|
||||
|
||||
/* ptr points to character following "<!-" */
|
||||
|
||||
static int PTRCALL
|
||||
PREFIX(scanComment)(const ENCODING *enc, const char *ptr,
|
||||
const char *end, const char **nextTokPtr)
|
||||
{
|
||||
if (ptr < end) {
|
||||
if (HAS_CHAR(enc, ptr, end)) {
|
||||
if (!CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
|
||||
*nextTokPtr = ptr;
|
||||
return XML_TOK_INVALID;
|
||||
}
|
||||
ptr += MINBPC(enc);
|
||||
while (ptr < end) {
|
||||
while (HAS_CHAR(enc, ptr, end)) {
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
INVALID_CASES(ptr, nextTokPtr)
|
||||
case BT_MINUS:
|
||||
if ((ptr += MINBPC(enc)) == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
ptr += MINBPC(enc);
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
|
||||
if ((ptr += MINBPC(enc)) == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
ptr += MINBPC(enc);
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
if (!CHAR_MATCHES(enc, ptr, ASCII_GT)) {
|
||||
*nextTokPtr = ptr;
|
||||
return XML_TOK_INVALID;
|
||||
@ -131,8 +149,7 @@ static int PTRCALL
|
||||
PREFIX(scanDecl)(const ENCODING *enc, const char *ptr,
|
||||
const char *end, const char **nextTokPtr)
|
||||
{
|
||||
if (ptr == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
case BT_MINUS:
|
||||
return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
|
||||
@ -147,11 +164,10 @@ PREFIX(scanDecl)(const ENCODING *enc, const char *ptr,
|
||||
*nextTokPtr = ptr;
|
||||
return XML_TOK_INVALID;
|
||||
}
|
||||
while (ptr < end) {
|
||||
while (HAS_CHAR(enc, ptr, end)) {
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
case BT_PERCNT:
|
||||
if (ptr + MINBPC(enc) == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
REQUIRE_CHARS(enc, ptr, end, 2);
|
||||
/* don't allow <!ENTITY% foo "whatever"> */
|
||||
switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
|
||||
case BT_S: case BT_CR: case BT_LF: case BT_PERCNT:
|
||||
@ -175,7 +191,7 @@ PREFIX(scanDecl)(const ENCODING *enc, const char *ptr,
|
||||
}
|
||||
|
||||
static int PTRCALL
|
||||
PREFIX(checkPiTarget)(const ENCODING *enc, const char *ptr,
|
||||
PREFIX(checkPiTarget)(const ENCODING *UNUSED_P(enc), const char *ptr,
|
||||
const char *end, int *tokPtr)
|
||||
{
|
||||
int upper = 0;
|
||||
@ -225,15 +241,14 @@ PREFIX(scanPi)(const ENCODING *enc, const char *ptr,
|
||||
{
|
||||
int tok;
|
||||
const char *target = ptr;
|
||||
if (ptr == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
|
||||
default:
|
||||
*nextTokPtr = ptr;
|
||||
return XML_TOK_INVALID;
|
||||
}
|
||||
while (ptr < end) {
|
||||
while (HAS_CHAR(enc, ptr, end)) {
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
|
||||
case BT_S: case BT_CR: case BT_LF:
|
||||
@ -242,13 +257,12 @@ PREFIX(scanPi)(const ENCODING *enc, const char *ptr,
|
||||
return XML_TOK_INVALID;
|
||||
}
|
||||
ptr += MINBPC(enc);
|
||||
while (ptr < end) {
|
||||
while (HAS_CHAR(enc, ptr, end)) {
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
INVALID_CASES(ptr, nextTokPtr)
|
||||
case BT_QUEST:
|
||||
ptr += MINBPC(enc);
|
||||
if (ptr == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
|
||||
*nextTokPtr = ptr + MINBPC(enc);
|
||||
return tok;
|
||||
@ -266,8 +280,7 @@ PREFIX(scanPi)(const ENCODING *enc, const char *ptr,
|
||||
return XML_TOK_INVALID;
|
||||
}
|
||||
ptr += MINBPC(enc);
|
||||
if (ptr == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
|
||||
*nextTokPtr = ptr + MINBPC(enc);
|
||||
return tok;
|
||||
@ -282,15 +295,14 @@ PREFIX(scanPi)(const ENCODING *enc, const char *ptr,
|
||||
}
|
||||
|
||||
static int PTRCALL
|
||||
PREFIX(scanCdataSection)(const ENCODING *enc, const char *ptr,
|
||||
PREFIX(scanCdataSection)(const ENCODING *UNUSED_P(enc), const char *ptr,
|
||||
const char *end, const char **nextTokPtr)
|
||||
{
|
||||
static const char CDATA_LSQB[] = { ASCII_C, ASCII_D, ASCII_A,
|
||||
ASCII_T, ASCII_A, ASCII_LSQB };
|
||||
int i;
|
||||
/* CDATA[ */
|
||||
if (end - ptr < 6 * MINBPC(enc))
|
||||
return XML_TOK_PARTIAL;
|
||||
REQUIRE_CHARS(enc, ptr, end, 6);
|
||||
for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
|
||||
if (!CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
|
||||
*nextTokPtr = ptr;
|
||||
@ -319,13 +331,11 @@ PREFIX(cdataSectionTok)(const ENCODING *enc, const char *ptr,
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
case BT_RSQB:
|
||||
ptr += MINBPC(enc);
|
||||
if (ptr == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
if (!CHAR_MATCHES(enc, ptr, ASCII_RSQB))
|
||||
break;
|
||||
ptr += MINBPC(enc);
|
||||
if (ptr == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
if (!CHAR_MATCHES(enc, ptr, ASCII_GT)) {
|
||||
ptr -= MINBPC(enc);
|
||||
break;
|
||||
@ -334,8 +344,7 @@ PREFIX(cdataSectionTok)(const ENCODING *enc, const char *ptr,
|
||||
return XML_TOK_CDATA_SECT_CLOSE;
|
||||
case BT_CR:
|
||||
ptr += MINBPC(enc);
|
||||
if (ptr == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
if (BYTE_TYPE(enc, ptr) == BT_LF)
|
||||
ptr += MINBPC(enc);
|
||||
*nextTokPtr = ptr;
|
||||
@ -348,7 +357,7 @@ PREFIX(cdataSectionTok)(const ENCODING *enc, const char *ptr,
|
||||
ptr += MINBPC(enc);
|
||||
break;
|
||||
}
|
||||
while (ptr < end) {
|
||||
while (HAS_CHAR(enc, ptr, end)) {
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
#define LEAD_CASE(n) \
|
||||
case BT_LEAD ## n: \
|
||||
@ -383,19 +392,18 @@ static int PTRCALL
|
||||
PREFIX(scanEndTag)(const ENCODING *enc, const char *ptr,
|
||||
const char *end, const char **nextTokPtr)
|
||||
{
|
||||
if (ptr == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
|
||||
default:
|
||||
*nextTokPtr = ptr;
|
||||
return XML_TOK_INVALID;
|
||||
}
|
||||
while (ptr < end) {
|
||||
while (HAS_CHAR(enc, ptr, end)) {
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
|
||||
case BT_S: case BT_CR: case BT_LF:
|
||||
for (ptr += MINBPC(enc); ptr < end; ptr += MINBPC(enc)) {
|
||||
for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
case BT_S: case BT_CR: case BT_LF:
|
||||
break;
|
||||
@ -432,7 +440,7 @@ static int PTRCALL
|
||||
PREFIX(scanHexCharRef)(const ENCODING *enc, const char *ptr,
|
||||
const char *end, const char **nextTokPtr)
|
||||
{
|
||||
if (ptr < end) {
|
||||
if (HAS_CHAR(enc, ptr, end)) {
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
case BT_DIGIT:
|
||||
case BT_HEX:
|
||||
@ -441,7 +449,7 @@ PREFIX(scanHexCharRef)(const ENCODING *enc, const char *ptr,
|
||||
*nextTokPtr = ptr;
|
||||
return XML_TOK_INVALID;
|
||||
}
|
||||
for (ptr += MINBPC(enc); ptr < end; ptr += MINBPC(enc)) {
|
||||
for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
case BT_DIGIT:
|
||||
case BT_HEX:
|
||||
@ -464,7 +472,7 @@ static int PTRCALL
|
||||
PREFIX(scanCharRef)(const ENCODING *enc, const char *ptr,
|
||||
const char *end, const char **nextTokPtr)
|
||||
{
|
||||
if (ptr < end) {
|
||||
if (HAS_CHAR(enc, ptr, end)) {
|
||||
if (CHAR_MATCHES(enc, ptr, ASCII_x))
|
||||
return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
@ -474,7 +482,7 @@ PREFIX(scanCharRef)(const ENCODING *enc, const char *ptr,
|
||||
*nextTokPtr = ptr;
|
||||
return XML_TOK_INVALID;
|
||||
}
|
||||
for (ptr += MINBPC(enc); ptr < end; ptr += MINBPC(enc)) {
|
||||
for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
case BT_DIGIT:
|
||||
break;
|
||||
@ -496,8 +504,7 @@ static int PTRCALL
|
||||
PREFIX(scanRef)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
const char **nextTokPtr)
|
||||
{
|
||||
if (ptr == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
|
||||
case BT_NUM:
|
||||
@ -506,7 +513,7 @@ PREFIX(scanRef)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
*nextTokPtr = ptr;
|
||||
return XML_TOK_INVALID;
|
||||
}
|
||||
while (ptr < end) {
|
||||
while (HAS_CHAR(enc, ptr, end)) {
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
|
||||
case BT_SEMI:
|
||||
@ -529,7 +536,7 @@ PREFIX(scanAtts)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
#ifdef XML_NS
|
||||
int hadColon = 0;
|
||||
#endif
|
||||
while (ptr < end) {
|
||||
while (HAS_CHAR(enc, ptr, end)) {
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
|
||||
#ifdef XML_NS
|
||||
@ -540,8 +547,7 @@ PREFIX(scanAtts)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
}
|
||||
hadColon = 1;
|
||||
ptr += MINBPC(enc);
|
||||
if (ptr == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
|
||||
default:
|
||||
@ -555,8 +561,7 @@ PREFIX(scanAtts)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
int t;
|
||||
|
||||
ptr += MINBPC(enc);
|
||||
if (ptr == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
t = BYTE_TYPE(enc, ptr);
|
||||
if (t == BT_EQUALS)
|
||||
break;
|
||||
@ -579,8 +584,7 @@ PREFIX(scanAtts)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
#endif
|
||||
for (;;) {
|
||||
ptr += MINBPC(enc);
|
||||
if (ptr == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
open = BYTE_TYPE(enc, ptr);
|
||||
if (open == BT_QUOT || open == BT_APOS)
|
||||
break;
|
||||
@ -598,8 +602,7 @@ PREFIX(scanAtts)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
/* in attribute value */
|
||||
for (;;) {
|
||||
int t;
|
||||
if (ptr == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
t = BYTE_TYPE(enc, ptr);
|
||||
if (t == open)
|
||||
break;
|
||||
@ -624,8 +627,7 @@ PREFIX(scanAtts)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
}
|
||||
}
|
||||
ptr += MINBPC(enc);
|
||||
if (ptr == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
case BT_S:
|
||||
case BT_CR:
|
||||
@ -642,8 +644,7 @@ PREFIX(scanAtts)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
/* ptr points to closing quote */
|
||||
for (;;) {
|
||||
ptr += MINBPC(enc);
|
||||
if (ptr == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
|
||||
case BT_S: case BT_CR: case BT_LF:
|
||||
@ -655,8 +656,7 @@ PREFIX(scanAtts)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
case BT_SOL:
|
||||
sol:
|
||||
ptr += MINBPC(enc);
|
||||
if (ptr == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
if (!CHAR_MATCHES(enc, ptr, ASCII_GT)) {
|
||||
*nextTokPtr = ptr;
|
||||
return XML_TOK_INVALID;
|
||||
@ -688,13 +688,12 @@ PREFIX(scanLt)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
#ifdef XML_NS
|
||||
int hadColon;
|
||||
#endif
|
||||
if (ptr == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
|
||||
case BT_EXCL:
|
||||
if ((ptr += MINBPC(enc)) == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
ptr += MINBPC(enc);
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
case BT_MINUS:
|
||||
return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
|
||||
@ -716,7 +715,7 @@ PREFIX(scanLt)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
hadColon = 0;
|
||||
#endif
|
||||
/* we have a start-tag */
|
||||
while (ptr < end) {
|
||||
while (HAS_CHAR(enc, ptr, end)) {
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
|
||||
#ifdef XML_NS
|
||||
@ -727,8 +726,7 @@ PREFIX(scanLt)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
}
|
||||
hadColon = 1;
|
||||
ptr += MINBPC(enc);
|
||||
if (ptr == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
|
||||
default:
|
||||
@ -740,7 +738,7 @@ PREFIX(scanLt)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
case BT_S: case BT_CR: case BT_LF:
|
||||
{
|
||||
ptr += MINBPC(enc);
|
||||
while (ptr < end) {
|
||||
while (HAS_CHAR(enc, ptr, end)) {
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
|
||||
case BT_GT:
|
||||
@ -765,8 +763,7 @@ PREFIX(scanLt)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
case BT_SOL:
|
||||
sol:
|
||||
ptr += MINBPC(enc);
|
||||
if (ptr == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
if (!CHAR_MATCHES(enc, ptr, ASCII_GT)) {
|
||||
*nextTokPtr = ptr;
|
||||
return XML_TOK_INVALID;
|
||||
@ -803,7 +800,7 @@ PREFIX(contentTok)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
|
||||
case BT_CR:
|
||||
ptr += MINBPC(enc);
|
||||
if (ptr == end)
|
||||
if (! HAS_CHAR(enc, ptr, end))
|
||||
return XML_TOK_TRAILING_CR;
|
||||
if (BYTE_TYPE(enc, ptr) == BT_LF)
|
||||
ptr += MINBPC(enc);
|
||||
@ -814,12 +811,12 @@ PREFIX(contentTok)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
return XML_TOK_DATA_NEWLINE;
|
||||
case BT_RSQB:
|
||||
ptr += MINBPC(enc);
|
||||
if (ptr == end)
|
||||
if (! HAS_CHAR(enc, ptr, end))
|
||||
return XML_TOK_TRAILING_RSQB;
|
||||
if (!CHAR_MATCHES(enc, ptr, ASCII_RSQB))
|
||||
break;
|
||||
ptr += MINBPC(enc);
|
||||
if (ptr == end)
|
||||
if (! HAS_CHAR(enc, ptr, end))
|
||||
return XML_TOK_TRAILING_RSQB;
|
||||
if (!CHAR_MATCHES(enc, ptr, ASCII_GT)) {
|
||||
ptr -= MINBPC(enc);
|
||||
@ -832,7 +829,7 @@ PREFIX(contentTok)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
ptr += MINBPC(enc);
|
||||
break;
|
||||
}
|
||||
while (ptr < end) {
|
||||
while (HAS_CHAR(enc, ptr, end)) {
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
#define LEAD_CASE(n) \
|
||||
case BT_LEAD ## n: \
|
||||
@ -845,12 +842,12 @@ PREFIX(contentTok)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4)
|
||||
#undef LEAD_CASE
|
||||
case BT_RSQB:
|
||||
if (ptr + MINBPC(enc) != end) {
|
||||
if (HAS_CHARS(enc, ptr, end, 2)) {
|
||||
if (!CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
|
||||
ptr += MINBPC(enc);
|
||||
break;
|
||||
}
|
||||
if (ptr + 2*MINBPC(enc) != end) {
|
||||
if (HAS_CHARS(enc, ptr, end, 3)) {
|
||||
if (!CHAR_MATCHES(enc, ptr + 2*MINBPC(enc), ASCII_GT)) {
|
||||
ptr += MINBPC(enc);
|
||||
break;
|
||||
@ -884,8 +881,7 @@ static int PTRCALL
|
||||
PREFIX(scanPercent)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
const char **nextTokPtr)
|
||||
{
|
||||
if (ptr == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
|
||||
case BT_S: case BT_LF: case BT_CR: case BT_PERCNT:
|
||||
@ -895,7 +891,7 @@ PREFIX(scanPercent)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
*nextTokPtr = ptr;
|
||||
return XML_TOK_INVALID;
|
||||
}
|
||||
while (ptr < end) {
|
||||
while (HAS_CHAR(enc, ptr, end)) {
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
|
||||
case BT_SEMI:
|
||||
@ -913,15 +909,14 @@ static int PTRCALL
|
||||
PREFIX(scanPoundName)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
const char **nextTokPtr)
|
||||
{
|
||||
if (ptr == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
|
||||
default:
|
||||
*nextTokPtr = ptr;
|
||||
return XML_TOK_INVALID;
|
||||
}
|
||||
while (ptr < end) {
|
||||
while (HAS_CHAR(enc, ptr, end)) {
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
|
||||
case BT_CR: case BT_LF: case BT_S:
|
||||
@ -941,7 +936,7 @@ PREFIX(scanLit)(int open, const ENCODING *enc,
|
||||
const char *ptr, const char *end,
|
||||
const char **nextTokPtr)
|
||||
{
|
||||
while (ptr < end) {
|
||||
while (HAS_CHAR(enc, ptr, end)) {
|
||||
int t = BYTE_TYPE(enc, ptr);
|
||||
switch (t) {
|
||||
INVALID_CASES(ptr, nextTokPtr)
|
||||
@ -950,7 +945,7 @@ PREFIX(scanLit)(int open, const ENCODING *enc,
|
||||
ptr += MINBPC(enc);
|
||||
if (t != open)
|
||||
break;
|
||||
if (ptr == end)
|
||||
if (! HAS_CHAR(enc, ptr, end))
|
||||
return -XML_TOK_LITERAL;
|
||||
*nextTokPtr = ptr;
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
@ -992,8 +987,7 @@ PREFIX(prologTok)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
case BT_LT:
|
||||
{
|
||||
ptr += MINBPC(enc);
|
||||
if (ptr == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
case BT_EXCL:
|
||||
return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
|
||||
@ -1021,7 +1015,7 @@ PREFIX(prologTok)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
case BT_S: case BT_LF:
|
||||
for (;;) {
|
||||
ptr += MINBPC(enc);
|
||||
if (ptr == end)
|
||||
if (! HAS_CHAR(enc, ptr, end))
|
||||
break;
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
case BT_S: case BT_LF:
|
||||
@ -1048,11 +1042,10 @@ PREFIX(prologTok)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
return XML_TOK_OPEN_BRACKET;
|
||||
case BT_RSQB:
|
||||
ptr += MINBPC(enc);
|
||||
if (ptr == end)
|
||||
if (! HAS_CHAR(enc, ptr, end))
|
||||
return -XML_TOK_CLOSE_BRACKET;
|
||||
if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
|
||||
if (ptr + MINBPC(enc) == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
REQUIRE_CHARS(enc, ptr, end, 2);
|
||||
if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
|
||||
*nextTokPtr = ptr + 2*MINBPC(enc);
|
||||
return XML_TOK_COND_SECT_CLOSE;
|
||||
@ -1065,7 +1058,7 @@ PREFIX(prologTok)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
return XML_TOK_OPEN_PAREN;
|
||||
case BT_RPAR:
|
||||
ptr += MINBPC(enc);
|
||||
if (ptr == end)
|
||||
if (! HAS_CHAR(enc, ptr, end))
|
||||
return -XML_TOK_CLOSE_PAREN;
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
case BT_AST:
|
||||
@ -1141,7 +1134,7 @@ PREFIX(prologTok)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
*nextTokPtr = ptr;
|
||||
return XML_TOK_INVALID;
|
||||
}
|
||||
while (ptr < end) {
|
||||
while (HAS_CHAR(enc, ptr, end)) {
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
|
||||
case BT_GT: case BT_RPAR: case BT_COMMA:
|
||||
@ -1154,8 +1147,7 @@ PREFIX(prologTok)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
ptr += MINBPC(enc);
|
||||
switch (tok) {
|
||||
case XML_TOK_NAME:
|
||||
if (ptr == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
tok = XML_TOK_PREFIXED_NAME;
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
|
||||
@ -1206,8 +1198,10 @@ PREFIX(attributeValueTok)(const ENCODING *enc, const char *ptr,
|
||||
const char *start;
|
||||
if (ptr >= end)
|
||||
return XML_TOK_NONE;
|
||||
else if (! HAS_CHAR(enc, ptr, end))
|
||||
return XML_TOK_PARTIAL;
|
||||
start = ptr;
|
||||
while (ptr < end) {
|
||||
while (HAS_CHAR(enc, ptr, end)) {
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
#define LEAD_CASE(n) \
|
||||
case BT_LEAD ## n: ptr += n; break;
|
||||
@ -1232,7 +1226,7 @@ PREFIX(attributeValueTok)(const ENCODING *enc, const char *ptr,
|
||||
case BT_CR:
|
||||
if (ptr == start) {
|
||||
ptr += MINBPC(enc);
|
||||
if (ptr == end)
|
||||
if (! HAS_CHAR(enc, ptr, end))
|
||||
return XML_TOK_TRAILING_CR;
|
||||
if (BYTE_TYPE(enc, ptr) == BT_LF)
|
||||
ptr += MINBPC(enc);
|
||||
@ -1264,8 +1258,10 @@ PREFIX(entityValueTok)(const ENCODING *enc, const char *ptr,
|
||||
const char *start;
|
||||
if (ptr >= end)
|
||||
return XML_TOK_NONE;
|
||||
else if (! HAS_CHAR(enc, ptr, end))
|
||||
return XML_TOK_PARTIAL;
|
||||
start = ptr;
|
||||
while (ptr < end) {
|
||||
while (HAS_CHAR(enc, ptr, end)) {
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
#define LEAD_CASE(n) \
|
||||
case BT_LEAD ## n: ptr += n; break;
|
||||
@ -1294,7 +1290,7 @@ PREFIX(entityValueTok)(const ENCODING *enc, const char *ptr,
|
||||
case BT_CR:
|
||||
if (ptr == start) {
|
||||
ptr += MINBPC(enc);
|
||||
if (ptr == end)
|
||||
if (! HAS_CHAR(enc, ptr, end))
|
||||
return XML_TOK_TRAILING_CR;
|
||||
if (BYTE_TYPE(enc, ptr) == BT_LF)
|
||||
ptr += MINBPC(enc);
|
||||
@ -1326,15 +1322,15 @@ PREFIX(ignoreSectionTok)(const ENCODING *enc, const char *ptr,
|
||||
end = ptr + n;
|
||||
}
|
||||
}
|
||||
while (ptr < end) {
|
||||
while (HAS_CHAR(enc, ptr, end)) {
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
INVALID_CASES(ptr, nextTokPtr)
|
||||
case BT_LT:
|
||||
if ((ptr += MINBPC(enc)) == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
ptr += MINBPC(enc);
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
if (CHAR_MATCHES(enc, ptr, ASCII_EXCL)) {
|
||||
if ((ptr += MINBPC(enc)) == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
ptr += MINBPC(enc);
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
if (CHAR_MATCHES(enc, ptr, ASCII_LSQB)) {
|
||||
++level;
|
||||
ptr += MINBPC(enc);
|
||||
@ -1342,11 +1338,11 @@ PREFIX(ignoreSectionTok)(const ENCODING *enc, const char *ptr,
|
||||
}
|
||||
break;
|
||||
case BT_RSQB:
|
||||
if ((ptr += MINBPC(enc)) == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
ptr += MINBPC(enc);
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
|
||||
if ((ptr += MINBPC(enc)) == end)
|
||||
return XML_TOK_PARTIAL;
|
||||
ptr += MINBPC(enc);
|
||||
REQUIRE_CHAR(enc, ptr, end);
|
||||
if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
|
||||
ptr += MINBPC(enc);
|
||||
if (level == 0) {
|
||||
@ -1373,7 +1369,7 @@ PREFIX(isPublicId)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
{
|
||||
ptr += MINBPC(enc);
|
||||
end -= MINBPC(enc);
|
||||
for (; ptr < end; ptr += MINBPC(enc)) {
|
||||
for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
case BT_DIGIT:
|
||||
case BT_HEX:
|
||||
@ -1521,7 +1517,7 @@ PREFIX(getAtts)(const ENCODING *enc, const char *ptr,
|
||||
}
|
||||
|
||||
static int PTRFASTCALL
|
||||
PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr)
|
||||
PREFIX(charRefNumber)(const ENCODING *UNUSED_P(enc), const char *ptr)
|
||||
{
|
||||
int result = 0;
|
||||
/* skip &# */
|
||||
@ -1565,7 +1561,7 @@ PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr)
|
||||
}
|
||||
|
||||
static int PTRCALL
|
||||
PREFIX(predefinedEntityName)(const ENCODING *enc, const char *ptr,
|
||||
PREFIX(predefinedEntityName)(const ENCODING *UNUSED_P(enc), const char *ptr,
|
||||
const char *end)
|
||||
{
|
||||
switch ((end - ptr)/MINBPC(enc)) {
|
||||
@ -1683,11 +1679,11 @@ PREFIX(sameName)(const ENCODING *enc, const char *ptr1, const char *ptr2)
|
||||
}
|
||||
|
||||
static int PTRCALL
|
||||
PREFIX(nameMatchesAscii)(const ENCODING *enc, const char *ptr1,
|
||||
PREFIX(nameMatchesAscii)(const ENCODING *UNUSED_P(enc), const char *ptr1,
|
||||
const char *end1, const char *ptr2)
|
||||
{
|
||||
for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
|
||||
if (ptr1 == end1)
|
||||
if (end1 - ptr1 < MINBPC(enc))
|
||||
return 0;
|
||||
if (!CHAR_MATCHES(enc, ptr1, *ptr2))
|
||||
return 0;
|
||||
@ -1744,7 +1740,7 @@ PREFIX(updatePosition)(const ENCODING *enc,
|
||||
const char *end,
|
||||
POSITION *pos)
|
||||
{
|
||||
while (ptr < end) {
|
||||
while (HAS_CHAR(enc, ptr, end)) {
|
||||
switch (BYTE_TYPE(enc, ptr)) {
|
||||
#define LEAD_CASE(n) \
|
||||
case BT_LEAD ## n: \
|
||||
@ -1760,7 +1756,7 @@ PREFIX(updatePosition)(const ENCODING *enc,
|
||||
case BT_CR:
|
||||
pos->lineNumber++;
|
||||
ptr += MINBPC(enc);
|
||||
if (ptr < end && BYTE_TYPE(enc, ptr) == BT_LF)
|
||||
if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
|
||||
ptr += MINBPC(enc);
|
||||
pos->columnNumber = (XML_Size)-1;
|
||||
break;
|
||||
|
2561
src/expat/m4/libtool.m4
vendored
2561
src/expat/m4/libtool.m4
vendored
File diff suppressed because it is too large
Load Diff
127
src/expat/m4/ltoptions.m4
vendored
127
src/expat/m4/ltoptions.m4
vendored
@ -1,14 +1,14 @@
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 7 ltoptions.m4
|
||||
# serial 8 ltoptions.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
|
||||
@ -29,7 +29,7 @@ m4_define([_LT_SET_OPTION],
|
||||
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
|
||||
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
[m4_warning([Unknown $1 option `$2'])])[]dnl
|
||||
[m4_warning([Unknown $1 option '$2'])])[]dnl
|
||||
])
|
||||
|
||||
|
||||
@ -75,13 +75,15 @@ m4_if([$1],[LT_INIT],[
|
||||
dnl
|
||||
dnl If no reference was made to various pairs of opposing options, then
|
||||
dnl we run the default mode handler for the pair. For example, if neither
|
||||
dnl `shared' nor `disable-shared' was passed, we enable building of shared
|
||||
dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
|
||||
dnl archives by default:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
|
||||
[_LT_ENABLE_FAST_INSTALL])
|
||||
[_LT_ENABLE_FAST_INSTALL])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
|
||||
[_LT_WITH_AIX_SONAME([aix])])
|
||||
])
|
||||
])# _LT_SET_OPTIONS
|
||||
|
||||
@ -112,7 +114,7 @@ AU_DEFUN([AC_LIBTOOL_DLOPEN],
|
||||
[_LT_SET_OPTION([LT_INIT], [dlopen])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `dlopen' option into LT_INIT's first parameter.])
|
||||
put the 'dlopen' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
@ -148,7 +150,7 @@ AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
|
||||
_LT_SET_OPTION([LT_INIT], [win32-dll])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `win32-dll' option into LT_INIT's first parameter.])
|
||||
put the 'win32-dll' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
@ -157,9 +159,9 @@ dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
|
||||
|
||||
# _LT_ENABLE_SHARED([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-shared flag, and supports the `shared' and
|
||||
# `disable-shared' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
# implement the --enable-shared flag, and supports the 'shared' and
|
||||
# 'disable-shared' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_SHARED],
|
||||
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([shared],
|
||||
@ -172,14 +174,14 @@ AC_ARG_ENABLE([shared],
|
||||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS="$lt_save_ifs"
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
|
||||
@ -211,9 +213,9 @@ dnl AC_DEFUN([AM_DISABLE_SHARED], [])
|
||||
|
||||
# _LT_ENABLE_STATIC([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-static flag, and support the `static' and
|
||||
# `disable-static' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
# implement the --enable-static flag, and support the 'static' and
|
||||
# 'disable-static' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_STATIC],
|
||||
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([static],
|
||||
@ -226,14 +228,14 @@ AC_ARG_ENABLE([static],
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS="$lt_save_ifs"
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
|
||||
@ -265,9 +267,9 @@ dnl AC_DEFUN([AM_DISABLE_STATIC], [])
|
||||
|
||||
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --enable-fast-install flag, and support the `fast-install'
|
||||
# and `disable-fast-install' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
# implement the --enable-fast-install flag, and support the 'fast-install'
|
||||
# and 'disable-fast-install' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_FAST_INSTALL],
|
||||
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([fast-install],
|
||||
@ -280,14 +282,14 @@ AC_ARG_ENABLE([fast-install],
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS="$lt_save_ifs"
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
|
||||
@ -304,14 +306,14 @@ AU_DEFUN([AC_ENABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the `fast-install' option into LT_INIT's first parameter.])
|
||||
the 'fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the `disable-fast-install' option into LT_INIT's first parameter.])
|
||||
the 'disable-fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
@ -319,11 +321,64 @@ dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
|
||||
|
||||
|
||||
# _LT_WITH_AIX_SONAME([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --with-aix-soname flag, and support the `aix-soname=aix'
|
||||
# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
|
||||
# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
|
||||
m4_define([_LT_WITH_AIX_SONAME],
|
||||
[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
|
||||
shared_archive_member_spec=
|
||||
case $host,$enable_shared in
|
||||
power*-*-aix[[5-9]]*,yes)
|
||||
AC_MSG_CHECKING([which variant of shared library versioning to provide])
|
||||
AC_ARG_WITH([aix-soname],
|
||||
[AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
|
||||
[shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
|
||||
[case $withval in
|
||||
aix|svr4|both)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Unknown argument to --with-aix-soname])
|
||||
;;
|
||||
esac
|
||||
lt_cv_with_aix_soname=$with_aix_soname],
|
||||
[AC_CACHE_VAL([lt_cv_with_aix_soname],
|
||||
[lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
|
||||
with_aix_soname=$lt_cv_with_aix_soname])
|
||||
AC_MSG_RESULT([$with_aix_soname])
|
||||
if test aix != "$with_aix_soname"; then
|
||||
# For the AIX way of multilib, we name the shared archive member
|
||||
# based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
|
||||
# and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
|
||||
# Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
|
||||
# the AIX toolchain works better with OBJECT_MODE set (default 32).
|
||||
if test 64 = "${OBJECT_MODE-32}"; then
|
||||
shared_archive_member_spec=shr_64
|
||||
else
|
||||
shared_archive_member_spec=shr
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
with_aix_soname=aix
|
||||
;;
|
||||
esac
|
||||
|
||||
_LT_DECL([], [shared_archive_member_spec], [0],
|
||||
[Shared archive member basename, for filename based shared library versioning on AIX])dnl
|
||||
])# _LT_WITH_AIX_SONAME
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
|
||||
|
||||
|
||||
# _LT_WITH_PIC([MODE])
|
||||
# --------------------
|
||||
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
|
||||
# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
|
||||
# LT_INIT options.
|
||||
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
|
||||
# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
|
||||
m4_define([_LT_WITH_PIC],
|
||||
[AC_ARG_WITH([pic],
|
||||
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
|
||||
@ -334,19 +389,17 @@ m4_define([_LT_WITH_PIC],
|
||||
*)
|
||||
pic_mode=default
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for lt_pkg in $withval; do
|
||||
IFS="$lt_save_ifs"
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$lt_pkg" = "X$lt_p"; then
|
||||
pic_mode=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[pic_mode=default])
|
||||
|
||||
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
|
||||
[pic_mode=m4_default([$1], [default])])
|
||||
|
||||
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
|
||||
])# _LT_WITH_PIC
|
||||
@ -359,7 +412,7 @@ AU_DEFUN([AC_LIBTOOL_PICMODE],
|
||||
[_LT_SET_OPTION([LT_INIT], [pic-only])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `pic-only' option into LT_INIT's first parameter.])
|
||||
put the 'pic-only' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
|
7
src/expat/m4/ltsugar.m4
vendored
7
src/expat/m4/ltsugar.m4
vendored
@ -1,6 +1,7 @@
|
||||
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
@ -33,7 +34,7 @@ m4_define([_lt_join],
|
||||
# ------------
|
||||
# Manipulate m4 lists.
|
||||
# These macros are necessary as long as will still need to support
|
||||
# Autoconf-2.59 which quotes differently.
|
||||
# Autoconf-2.59, which quotes differently.
|
||||
m4_define([lt_car], [[$1]])
|
||||
m4_define([lt_cdr],
|
||||
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
|
||||
@ -44,7 +45,7 @@ m4_define([lt_unquote], $1)
|
||||
|
||||
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
|
||||
# ------------------------------------------
|
||||
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
|
||||
# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
|
||||
# Note that neither SEPARATOR nor STRING are expanded; they are appended
|
||||
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
|
||||
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
|
||||
|
12
src/expat/m4/ltversion.m4
vendored
12
src/expat/m4/ltversion.m4
vendored
@ -1,6 +1,6 @@
|
||||
# ltversion.m4 -- version numbers -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
@ -9,15 +9,15 @@
|
||||
|
||||
# @configure_input@
|
||||
|
||||
# serial 3337 ltversion.m4
|
||||
# serial 4179 ltversion.m4
|
||||
# This file is part of GNU Libtool
|
||||
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.2])
|
||||
m4_define([LT_PACKAGE_REVISION], [1.3337])
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.6])
|
||||
m4_define([LT_PACKAGE_REVISION], [2.4.6])
|
||||
|
||||
AC_DEFUN([LTVERSION_VERSION],
|
||||
[macro_version='2.4.2'
|
||||
macro_revision='1.3337'
|
||||
[macro_version='2.4.6'
|
||||
macro_revision='2.4.6'
|
||||
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||
_LT_DECL(, macro_revision, 0)
|
||||
])
|
||||
|
7
src/expat/m4/lt~obsolete.m4
vendored
7
src/expat/m4/lt~obsolete.m4
vendored
@ -1,6 +1,7 @@
|
||||
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
@ -11,7 +12,7 @@
|
||||
|
||||
# These exist entirely to fool aclocal when bootstrapping libtool.
|
||||
#
|
||||
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
|
||||
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
|
||||
# which have later been changed to m4_define as they aren't part of the
|
||||
# exported API, or moved to Autoconf or Automake where they belong.
|
||||
#
|
||||
@ -25,7 +26,7 @@
|
||||
# included after everything else. This provides aclocal with the
|
||||
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
|
||||
# because those macros already exist, or will be overwritten later.
|
||||
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
|
||||
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
|
||||
#
|
||||
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
|
||||
# Yes, that means every name once taken will need to remain here until
|
||||
|
@ -13,4 +13,4 @@ The command line arguments are:
|
||||
Returns:
|
||||
|
||||
The time (in seconds) it takes to parse the test file,
|
||||
averaged over the number of iterations.
|
||||
averaged over the number of iterations.@
|
||||
|
@ -47,7 +47,7 @@ CharData_AppendString(CharData *storage, const char *s)
|
||||
if ((len + storage->count) > maxchars) {
|
||||
len = (maxchars - storage->count);
|
||||
}
|
||||
if (len + storage->count < sizeof(storage->data)) {
|
||||
if (len + storage->count < (int)sizeof(storage->data)) {
|
||||
memcpy(storage->data + storage->count, s, len);
|
||||
storage->count += len;
|
||||
}
|
||||
@ -68,7 +68,7 @@ CharData_AppendXMLChars(CharData *storage, const XML_Char *s, int len)
|
||||
if ((len + storage->count) > maxchars) {
|
||||
len = (maxchars - storage->count);
|
||||
}
|
||||
if (len + storage->count < sizeof(storage->data)) {
|
||||
if (len + storage->count < (int)sizeof(storage->data)) {
|
||||
memcpy(storage->data + storage->count, s,
|
||||
len * sizeof(storage->data[0]));
|
||||
storage->count += len;
|
||||
|
@ -10,10 +10,11 @@
|
||||
#include <setjmp.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "internal.h" /* for UNUSED_P only */
|
||||
#include "minicheck.h"
|
||||
|
||||
Suite *
|
||||
suite_create(char *name)
|
||||
suite_create(const char *name)
|
||||
{
|
||||
Suite *suite = (Suite *) calloc(1, sizeof(Suite));
|
||||
if (suite != NULL) {
|
||||
@ -23,7 +24,7 @@ suite_create(char *name)
|
||||
}
|
||||
|
||||
TCase *
|
||||
tcase_create(char *name)
|
||||
tcase_create(const char *name)
|
||||
{
|
||||
TCase *tc = (TCase *) calloc(1, sizeof(TCase));
|
||||
if (tc != NULL) {
|
||||
@ -156,7 +157,7 @@ srunner_run_all(SRunner *runner, int verbosity)
|
||||
}
|
||||
|
||||
void
|
||||
_fail_unless(int condition, const char *file, int line, char *msg)
|
||||
_fail_unless(int UNUSED_P(condition), const char *UNUSED_P(file), int UNUSED_P(line), const char *msg)
|
||||
{
|
||||
/* Always print the error message so it isn't lost. In this case,
|
||||
we have a failure, so there's no reason to be quiet about what
|
||||
|
@ -26,6 +26,11 @@ extern "C" {
|
||||
#define __func__ __FUNCTION__
|
||||
#endif
|
||||
|
||||
/* ISO C90 does not support '__func__' predefined identifier */
|
||||
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ < 199901)
|
||||
# define __func__ "(unknown)"
|
||||
#endif
|
||||
|
||||
#define START_TEST(testname) static void testname(void) { \
|
||||
_check_set_test_info(__func__, __FILE__, __LINE__); \
|
||||
{
|
||||
@ -48,12 +53,12 @@ struct SRunner {
|
||||
};
|
||||
|
||||
struct Suite {
|
||||
char *name;
|
||||
const char *name;
|
||||
TCase *tests;
|
||||
};
|
||||
|
||||
struct TCase {
|
||||
char *name;
|
||||
const char *name;
|
||||
tcase_setup_function setup;
|
||||
tcase_teardown_function teardown;
|
||||
tcase_test_function *tests;
|
||||
@ -72,9 +77,9 @@ void _check_set_test_info(char const *function,
|
||||
* Prototypes for the actual implementation.
|
||||
*/
|
||||
|
||||
void _fail_unless(int condition, const char *file, int line, char *msg);
|
||||
Suite *suite_create(char *name);
|
||||
TCase *tcase_create(char *name);
|
||||
void _fail_unless(int condition, const char *file, int line, const char *msg);
|
||||
Suite *suite_create(const char *name);
|
||||
TCase *tcase_create(const char *name);
|
||||
void suite_add_tcase(Suite *suite, TCase *tc);
|
||||
void tcase_add_checked_fixture(TCase *,
|
||||
tcase_setup_function,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
#! /bin/sh
|
||||
#! /usr/bin/env bash
|
||||
|
||||
# EXPAT TEST SCRIPT FOR W3C XML TEST SUITE
|
||||
|
||||
@ -20,12 +20,14 @@
|
||||
# produced by xmlwf conforms to an older definition of canonical XML
|
||||
# and does not generate notation declarations.
|
||||
|
||||
shopt -s nullglob
|
||||
|
||||
MYDIR="`dirname \"$0\"`"
|
||||
cd "$MYDIR"
|
||||
MYDIR="`pwd`"
|
||||
XMLWF="`dirname \"$MYDIR\"`/xmlwf/xmlwf"
|
||||
# XMLWF=/usr/local/bin/xmlwf
|
||||
TS="$MYDIR/XML-Test-Suite"
|
||||
TS="$MYDIR"
|
||||
# OUTPUT must terminate with the directory separator.
|
||||
OUTPUT="$TS/out/"
|
||||
# OUTPUT=/home/tmp/xml-testsuite-out/
|
||||
@ -100,7 +102,7 @@ for xmldir in ibm/valid/P* \
|
||||
RunXmlwfWF "$xmlfile" "$xmldir/"
|
||||
UpdateStatus $?
|
||||
done
|
||||
rm outfile
|
||||
rm -f outfile
|
||||
done
|
||||
|
||||
cd "$TS/xmlconf/oasis"
|
||||
|
@ -1,146 +0,0 @@
|
||||
|
||||
Expat, Release 2.0.0
|
||||
Open Watcom OS/2-eCS and NT/2000/XP
|
||||
|
||||
SUMMARY
|
||||
=======
|
||||
This is the first effort of adding Open Watcom (www.openwatcom.org) build
|
||||
capability to the expat project. The included changes and makefiles are
|
||||
verified to work with Open Watcom 1.5, however, it might build with
|
||||
version 1.4.
|
||||
|
||||
HISTORY
|
||||
=======
|
||||
June 2006 - First successful compile with Open Watcom 1.5
|
||||
July 2006 - Submit as patch
|
||||
|
||||
BUILDING
|
||||
========
|
||||
The makefile system is based on a multi-platform system provided by
|
||||
Mat Nieuwenhoven. In the watcom directory is the main makefile which
|
||||
accepts the following options:
|
||||
|
||||
os2 - OS/2-ECS Release
|
||||
nt - WinNT/2000/XP Release
|
||||
linux - Linux Release
|
||||
os2d - OS/2-ECS Debug
|
||||
ntd - WinNT/2000/XP Debug
|
||||
linuxd - Linux Debug
|
||||
full - all release
|
||||
fulld - all debug
|
||||
fullall - all release and debug
|
||||
cleanall - remove all
|
||||
clean - remove build keep release
|
||||
xmlts.zip - download test suite and unzip
|
||||
|
||||
The options for the OW build of expat are set in watcom\buildopts.inc.
|
||||
|
||||
The following expat options are available:
|
||||
|
||||
XML_DTD (Note 1)
|
||||
Include support for using and reporting DTD-based content. If this
|
||||
is defined, default attribute values from an external DTD subset are
|
||||
reported and attribute value normalization occurs based on the type of
|
||||
attributes defined in the external subset. Without this, Expat has a
|
||||
smaller memory footprint and can be faster, but will not load external
|
||||
entities or process conditional sections. This does not affect the set
|
||||
of functions available in the API.
|
||||
|
||||
XML_NS (Note 1)
|
||||
When defined, support for the Namespaces in XML specification is included.
|
||||
|
||||
XML_UNICODE (Note 2)
|
||||
When defined, character data reported to the application is encoded
|
||||
in UTF-16 using wide characters of the type XML_Char. This is implied
|
||||
if XML_UNICODE_WCHAR_T is defined.
|
||||
|
||||
XML_UNICODE_WCHAR_T (Note 2)
|
||||
If defined, causes the XML_Char character type to be defined using the
|
||||
wchar_t type; otherwise, unsigned short is used. Defining this implies
|
||||
XML_UNICODE.
|
||||
|
||||
XML_LARGE_SIZE (Note 3)
|
||||
(OS/2 and Windows) [optional] If defined, causes the XML_Size and XML_Index
|
||||
integer types to be at least 64 bits in size. This is intended to support
|
||||
processing of very large input streams, where the return values of
|
||||
XML_GetCurrentByteIndex, XML_GetCurrentLineNumber and
|
||||
XML_GetCurrentColumnNumber could overflow. It may not be supported by all
|
||||
compilers, and is turned off by default.
|
||||
|
||||
XML_CONTEXT_BYTES (Note 1)
|
||||
The number of input bytes of markup context which the parser will ensure are
|
||||
available for reporting via XML_GetInputContext. This is normally set to 1024,
|
||||
and must be set to a positive interger. If this is not defined, the input
|
||||
context will not be available and XML_GetInputContext will always report NULL.
|
||||
Without this, Expat has a smaller memory footprint and can be faster.
|
||||
|
||||
XML_MIN_SIZE (Note 3)
|
||||
(OS/2 and Windows) [optional] Makes a parser that's smaller but that,
|
||||
in general, will run slower.
|
||||
|
||||
Note 1: Define by default in watcomconfig.h - XML_CONTEXT_BYTES define as 1024.
|
||||
|
||||
Note 2: Not yet supported
|
||||
|
||||
Note 3: Not defined by default, but supported by Open Watcom
|
||||
|
||||
|
||||
XML_TEST_SUITE
|
||||
==============
|
||||
While you are welcome to run the tests, however, it will require downloading and
|
||||
setting up additional unix type utilitiy/tools on OS/2-ECS and Windows platforms.
|
||||
|
||||
I have added the target xmlts.zip to the makefile which will use wget to dowload
|
||||
and unzip to setup the test files. The tests/xmltest.sh file will have to be
|
||||
modified, changing XMLWF= to the location of the xmlwwf.exe file.
|
||||
|
||||
The ouput from both OS2-ECS and WinNT/2000/XP builds is listed below. I have
|
||||
built expat 2.0.0 on a Linux gcc system and verified that the output is the same
|
||||
result for OS/2-ECS and Windows platforms. So, I feel confident that the Open Watcom
|
||||
build is working as well as the other compiler builds.
|
||||
|
||||
The test results should be:
|
||||
|
||||
Output differs: ibm/valid/P02/ibm02v01.xml
|
||||
Output differs: ibm/valid/P28/ibm28v02.xml
|
||||
Output differs: ibm/valid/P29/ibm29v01.xml
|
||||
Output differs: ibm/valid/P29/ibm29v02.xml
|
||||
Output differs: ibm/valid/P54/ibm54v01.xml
|
||||
Output differs: ibm/valid/P56/ibm56v08.xml
|
||||
Output differs: ibm/valid/P57/ibm57v01.xml
|
||||
Output differs: ibm/valid/P58/ibm58v01.xml
|
||||
Output differs: ibm/valid/P58/ibm58v02.xml
|
||||
Output differs: ibm/valid/P70/ibm70v01.xml
|
||||
Output differs: ibm/valid/P82/ibm82v01.xml
|
||||
E:/expat-2.0.0/tests/XML-Test-Suite/out/ibm/invalid/P29//*.xml: No such file or directory
|
||||
ibm49i02.dtd: No such file or directory
|
||||
In ibm/invalid/P49/: ibm49i02.xml:4:1: error in processing external entity reference
|
||||
Output differs: ibm/invalid/P58/ibm58i01.xml
|
||||
Output differs: ibm/invalid/P58/ibm58i02.xml
|
||||
Output differs: xmltest/valid/sa/069.xml
|
||||
Output differs: xmltest/valid/sa/076.xml
|
||||
Output differs: xmltest/valid/sa/090.xml
|
||||
Output differs: xmltest/valid/sa/091.xml
|
||||
Output differs: sun/valid/not-sa01.xml
|
||||
Output differs: sun/valid/not-sa02.xml
|
||||
Output differs: sun/valid/not-sa03.xml
|
||||
Output differs: sun/valid/not-sa04.xml
|
||||
Output differs: sun/valid/notation01.xml
|
||||
Output differs: sun/valid/sa02.xml
|
||||
Output differs: sun/valid/sa03.xml
|
||||
Output differs: sun/valid/sa04.xml
|
||||
Output differs: sun/valid/sa05.xml
|
||||
Expected well-formed: ibm/not-wf/misc/432gewf.xml
|
||||
Expected well-formed: xmltest/not-wf/not-sa/005.xml
|
||||
Expected well-formed: sun/not-wf/uri01.xml
|
||||
Expected well-formed: oasis/p06fail1.xml
|
||||
Expected well-formed: oasis/p08fail1.xml
|
||||
Expected well-formed: oasis/p08fail2.xml
|
||||
Passed: 1776
|
||||
Failed: 34
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,82 +0,0 @@
|
||||
######################################################################
|
||||
#
|
||||
# Open Watcom 1.5 multiplatform target options file.
|
||||
#
|
||||
# Author : Michael Greene, July 2006
|
||||
#
|
||||
######################################################################
|
||||
|
||||
STATICLIB = libexpat.lib
|
||||
|
||||
# only for OS/2 and NT builds
|
||||
DLLNAME = expat.dll
|
||||
IMPORTLIB = iexpat.lib
|
||||
|
||||
# path to wget if not in path - only needed for test suite download
|
||||
|
||||
#WGET = D:\BLDTOOLS\
|
||||
|
||||
# Uncomment to compile multi-thread
|
||||
|
||||
MULTITHREAD = 1
|
||||
|
||||
# Uncomment to compile using runtime library - default static
|
||||
|
||||
#CLIBLNK = 1
|
||||
|
||||
# valid defines:
|
||||
# XML_LARGE_SIZE (supported - see main EXPAT readme for info)
|
||||
# XML_UNICODE_WCHAR_T (not supported)
|
||||
# XML_UNICODE (not supported)
|
||||
# XML_MIN_SIZE (compiles with but not tested)
|
||||
# XML_DTD - XML_NS (enabled always - see watcomconfig.h)
|
||||
|
||||
#DEFS = -DXML_LARGE_SIZE
|
||||
|
||||
# [Processor options]
|
||||
# -3r 386 register calling conventions -5r Pentium register calling conv.
|
||||
# -3s 386 stack calling conventions -5s Pentium stack calling conventions
|
||||
# -4r 486 register calling conventions -6r Pentium Pro register call conven.
|
||||
# -4s 486 stack calling conventions -6s Pentium Pro stack call conven.
|
||||
# [Floating-point processor options]
|
||||
# -fpc calls to floating-point library -fp2 generate 287 floating-point code
|
||||
# -fpd enable Pentium FDIV check -fp3 generate 387 floating-point code
|
||||
# -fpi inline 80x87 with emulation -fp5 optimize f-p for Pentium
|
||||
# -fpi87 inline 80x87 -fp6 optimize f-p for Pentium Pro
|
||||
# -fpr use old floating-point conventions
|
||||
|
||||
MACHINE = -6s -fp6
|
||||
|
||||
# [Optimization options]
|
||||
# -oa relax alias checking -ol+ ol with loop unrolling
|
||||
# -ob branch prediction -om generate inline math functions
|
||||
# -oc disable call/ret optimization -on numerically unstable floating-point
|
||||
# -od disable optimizations -oo continue compile when low on memory
|
||||
# -oe[=num] expand functions inline -op improve floating-point consistency
|
||||
# Press any key to continue:
|
||||
# -of[+] generate traceable stack frames-or re-order instructions to avoid stalls
|
||||
# -oh enable repeated optimizations -os optimize for space
|
||||
# -oi inline intrinsic functions -ot optimize for time
|
||||
# -oi+ (C++) oi with max inlining depth -ou ensure unique addresses for functions
|
||||
# -ok control flow entry/exit seq. -ox maximum optimization (-obmiler -s)
|
||||
# -ol perform loop optimizations
|
||||
|
||||
OPTIMIZATION = -otexan
|
||||
|
||||
# [Debugging options]
|
||||
# -d0 no debugging information -d2t (C++) d2 but without type names
|
||||
# -d1{+} line number debugging info. -d3 debug info with unref'd type names
|
||||
# -d2 full symbolic debugging info. -d3i (C++) d3 + inlines as COMDATs
|
||||
# -d2i (C++) d2 + inlines as COMDATs -d3s (C++) d3 + inlines as statics
|
||||
# -d2s (C++) d2 + inlines as statics
|
||||
|
||||
DEBUGOPTS = -d3
|
||||
|
||||
# I used this for testing. If LINKLIB is expat.lib (default) then
|
||||
# all executables are linked static. If LINKLIB is iexpat.lib then
|
||||
# executables will use the expat dll.
|
||||
|
||||
#TARGLIB = $(IMPORTLIB)
|
||||
|
||||
TARGLIB = $(STATICLIB)
|
||||
|
@ -1,71 +0,0 @@
|
||||
# EXPORTs for making dll with Open Watcom under OS/2
|
||||
SYSTEM os2v2_dll initinstance terminstance
|
||||
OPTION manyautodata
|
||||
OPTION DESCRIPTION 'Expat (DLL) Implements an XML parser'
|
||||
|
||||
EXPORT XML_DefaultCurrent
|
||||
EXPORT XML_ErrorString
|
||||
EXPORT XML_ExpatVersion
|
||||
EXPORT XML_ExpatVersionInfo
|
||||
EXPORT XML_ExternalEntityParserCreate
|
||||
EXPORT XML_GetBase
|
||||
EXPORT XML_GetBuffer
|
||||
EXPORT XML_GetCurrentByteCount
|
||||
EXPORT XML_GetCurrentByteIndex
|
||||
EXPORT XML_GetCurrentColumnNumber
|
||||
EXPORT XML_GetCurrentLineNumber
|
||||
EXPORT XML_GetErrorCode
|
||||
EXPORT XML_GetIdAttributeIndex
|
||||
EXPORT XML_GetInputContext
|
||||
EXPORT XML_GetSpecifiedAttributeCount
|
||||
EXPORT XML_Parse
|
||||
EXPORT XML_ParseBuffer
|
||||
EXPORT XML_ParserCreate
|
||||
EXPORT XML_ParserCreateNS
|
||||
EXPORT XML_ParserCreate_MM
|
||||
EXPORT XML_ParserFree
|
||||
EXPORT XML_SetAttlistDeclHandler
|
||||
EXPORT XML_SetBase
|
||||
EXPORT XML_SetCdataSectionHandler
|
||||
EXPORT XML_SetCharacterDataHandler
|
||||
EXPORT XML_SetCommentHandler
|
||||
EXPORT XML_SetDefaultHandler
|
||||
EXPORT XML_SetDefaultHandlerExpand
|
||||
EXPORT XML_SetDoctypeDeclHandler
|
||||
EXPORT XML_SetElementDeclHandler
|
||||
EXPORT XML_SetElementHandler
|
||||
EXPORT XML_SetEncoding
|
||||
EXPORT XML_SetEndCdataSectionHandler
|
||||
EXPORT XML_SetEndDoctypeDeclHandler
|
||||
EXPORT XML_SetEndElementHandler
|
||||
EXPORT XML_SetEndNamespaceDeclHandler
|
||||
EXPORT XML_SetEntityDeclHandler
|
||||
EXPORT XML_SetExternalEntityRefHandler
|
||||
EXPORT XML_SetExternalEntityRefHandlerArg
|
||||
EXPORT XML_SetNamespaceDeclHandler
|
||||
EXPORT XML_SetNotStandaloneHandler
|
||||
EXPORT XML_SetNotationDeclHandler
|
||||
EXPORT XML_SetParamEntityParsing
|
||||
EXPORT XML_SetProcessingInstructionHandler
|
||||
EXPORT XML_SetReturnNSTriplet
|
||||
EXPORT XML_SetStartCdataSectionHandler
|
||||
EXPORT XML_SetStartDoctypeDeclHandler
|
||||
EXPORT XML_SetStartElementHandler
|
||||
EXPORT XML_SetStartNamespaceDeclHandler
|
||||
EXPORT XML_SetUnknownEncodingHandler
|
||||
EXPORT XML_SetUnparsedEntityDeclHandler
|
||||
EXPORT XML_SetUserData
|
||||
EXPORT XML_SetXmlDeclHandler
|
||||
EXPORT XML_UseParserAsHandlerArg
|
||||
EXPORT XML_ParserReset
|
||||
EXPORT XML_SetSkippedEntityHandler
|
||||
EXPORT XML_GetFeatureList
|
||||
EXPORT XML_UseForeignDTD
|
||||
EXPORT XML_FreeContentModel
|
||||
EXPORT XML_MemMalloc
|
||||
EXPORT XML_MemRealloc
|
||||
EXPORT XML_MemFree
|
||||
EXPORT XML_StopParser
|
||||
EXPORT XML_ResumeParser
|
||||
EXPORT XML_GetParsingStatus
|
||||
|
@ -1,85 +0,0 @@
|
||||
#########################################################################
|
||||
#
|
||||
# Open Watcom 1.5 EXPAT XML Parser Main Makefile
|
||||
#
|
||||
# Open Watcom 1.5 and newer multi-platform makefile for EXPAT XML Parser.
|
||||
# Currently will build targets for OS/2-ECS, NT/Win2000/XP, and Linux.
|
||||
# This makefile will call, based on comand line target, watmake.mif
|
||||
# to build target release or debug.
|
||||
#
|
||||
# Author : Michael Greene, July 2006
|
||||
#
|
||||
# User selectable project options are set in buildopts.inc
|
||||
#
|
||||
#########################################################################
|
||||
|
||||
|
||||
all: .SYMBOLIC
|
||||
@echo ***********************************************
|
||||
@echo Valid options:
|
||||
@echo "wmake <platform build>"
|
||||
@echo os2 - OS/2-ECS Release
|
||||
@echo nt - NT/Win2000/XP
|
||||
@echo linux - Linux Release
|
||||
@echo os2d - OS/2-ECS Debug
|
||||
@echo ntd - NT/Win2000/XP Debug
|
||||
@echo linuxd - Linux Debug
|
||||
@echo full - all release
|
||||
@echo fulld - all debug
|
||||
@echo fullall - all release and debug
|
||||
@echo cleanall - remove all
|
||||
@echo clean - remove build keep release
|
||||
@echo xmlts.zip - download test suite and unzip
|
||||
|
||||
full: os2 nt linux .SYMBOLIC
|
||||
|
||||
fulld: os2d ntd linuxd .SYMBOLIC
|
||||
|
||||
fullall: os2 nt linux os2d ntd linuxd .SYMBOLIC
|
||||
|
||||
os2: .SYMBOLIC
|
||||
@%write watopts.tmp SYSPLATFORM = os2
|
||||
@%make buildproc
|
||||
|
||||
os2d: .SYMBOLIC
|
||||
@%write watopts.tmp SYSPLATFORM = os2
|
||||
@%append watopts.tmp DEBUG = 1
|
||||
@%make buildproc
|
||||
|
||||
nt: .SYMBOLIC
|
||||
@%write watopts.tmp SYSPLATFORM = nt
|
||||
@%make buildproc
|
||||
|
||||
ntd: .SYMBOLIC
|
||||
@%write watopts.tmp SYSPLATFORM = nt
|
||||
@%append watopts.tmp DEBUG = 1
|
||||
@%make buildproc
|
||||
|
||||
linux: .SYMBOLIC
|
||||
@%write watopts.tmp SYSPLATFORM = linux
|
||||
@%make buildproc
|
||||
|
||||
linuxd: .SYMBOLIC
|
||||
@%write watopts.tmp SYSPLATFORM = linux
|
||||
@%append watopts.tmp DEBUG = 1
|
||||
@%make buildproc
|
||||
|
||||
clean: .SYMBOLIC
|
||||
@%write watopts.tmp CLEAN = 1
|
||||
@wmake -h -f watmake.mif clean
|
||||
|
||||
cleanall: .SYMBOLIC
|
||||
@%write watopts.tmp CLEAN = 1
|
||||
@wmake -h -f watmake.mif cleanall
|
||||
|
||||
xmlts.zip: .SYMBOLIC
|
||||
@%write watopts.tmp DUMMY = 1
|
||||
@wmake -h -f watmake.mif xmlts.zip
|
||||
|
||||
buildproc: .procedure
|
||||
!ifdef DEBUG
|
||||
@%append watopts.tmp DEBUG = 1
|
||||
!endif
|
||||
@wmake -a -h -f watmake.mif
|
||||
|
||||
|
@ -1,57 +0,0 @@
|
||||
#############################################################
|
||||
#
|
||||
# ***** Project make release directories procedures *****
|
||||
#
|
||||
#############################################################
|
||||
|
||||
!include watclean.tmp
|
||||
|
||||
os2: .SYMBOLIC
|
||||
@set CLEANDIR = $(RELDIR)\os2
|
||||
@%make rmtargdir
|
||||
|
||||
os2d: .SYMBOLIC
|
||||
@set CLEANDIR = $(DEBDIR)\os2
|
||||
@%make rmtargdir
|
||||
|
||||
nt: .SYMBOLIC
|
||||
@set CLEANDIR = $(RELDIR)\nt
|
||||
@%make rmtargdir
|
||||
|
||||
ntd: .SYMBOLIC
|
||||
@set CLEANDIR = $(DEBDIR)\nt
|
||||
@%make rmtargdir
|
||||
|
||||
linux: .SYMBOLIC
|
||||
@set CLEANDIR = $(RELDIR)\linux
|
||||
@%make rmtargdir
|
||||
|
||||
linuxd: .SYMBOLIC
|
||||
@set CLEANDIR = $(DEBDIR)\linux
|
||||
@%make rmtargdir
|
||||
|
||||
rmtargdir: .PROCEDURE
|
||||
-@rm $(%CLEANDIR)\lib\*.lib
|
||||
-@rd $(%CLEANDIR)\lib
|
||||
-@rm $(%CLEANDIR)\include\*.h
|
||||
-@rd $(%CLEANDIR)\include
|
||||
@if EXIST $(%CLEANDIR)\dll -@rm $(%CLEANDIR)\dll\*.dll
|
||||
@if EXIST $(%CLEANDIR)\dll -@rd $(%CLEANDIR)\dll
|
||||
@if EXIST $(%CLEANDIR)\bin\xmlwf @%make cleanl
|
||||
@if EXIST $(%CLEANDIR)\bin\xmlwf.exe @%make cleano
|
||||
-@rd $(%CLEANDIR)\bin
|
||||
-@rd $(%CLEANDIR)
|
||||
|
||||
# cleanup build files
|
||||
clean: .SYMBOLIC
|
||||
CLEANEXTS = obj exe err lst map sym lib dll
|
||||
@for %a in ($(CLEANEXTS)) do -@rm *.%a
|
||||
@if EXIST xmlwf @%make cleanl
|
||||
|
||||
cleanl: .PROCEDURE
|
||||
CLEANLINUX = xmlwf runtests elements outline benchmark
|
||||
@for %a in ($(CLEANLINUX)) do -@rm $(%CLEANDIR)\bin\%a
|
||||
|
||||
cleano: .PROCEDURE
|
||||
-@rm $(%CLEANDIR)\bin\*.exe
|
||||
|
@ -1,223 +0,0 @@
|
||||
######################################################################
|
||||
#
|
||||
# Open Watcom 1.5 multiplatform target makefile. This file is called
|
||||
# by main makefile.
|
||||
#
|
||||
# Author : Michael Greene, July 2006
|
||||
#
|
||||
# User selectable project options are set in buildopts.inc
|
||||
#
|
||||
######################################################################
|
||||
|
||||
# include options set by main makefile
|
||||
!include watopts.tmp
|
||||
|
||||
# include user selectable option
|
||||
!include buildopts.inc
|
||||
|
||||
# project directories
|
||||
PROJ = $+ $(%cwd) $-
|
||||
RELDIR = $(PROJ)\release
|
||||
DEBDIR = $(PROJ)\debug
|
||||
SRCDIR = $(PROJ)\..\lib
|
||||
TSTDIR = $(PROJ)\..\tests
|
||||
XMLDIR = $(PROJ)\..\xmlwf
|
||||
|
||||
CC = wcl386
|
||||
LD = wlink
|
||||
LB = wlib
|
||||
|
||||
|
||||
########################################
|
||||
#
|
||||
# ***** platform specific options *****
|
||||
#
|
||||
!ifeqi SYSPLATFORM os2
|
||||
SYSCOMP = os2
|
||||
SYSLINK = os2v2
|
||||
LINKFILE = expat.lnk
|
||||
COMINC = $(%watcom)\h;$(%watcom)\h\os2
|
||||
EXPATDLL = $(DLLNAME)
|
||||
EXT = .exe
|
||||
!else ifeqi SYSPLATFORM nt
|
||||
SYSCOMP = nt
|
||||
SYSLINK = nt
|
||||
LINKFILE = wexpat.lnk
|
||||
COMINC = $(%watcom)\h;$(%watcom)\h\nt
|
||||
EXPATDLL = $(DLLNAME)
|
||||
EXT = .exe
|
||||
NTLIB = LIB $(%watcom)\lib386\nt\kernel32.lib
|
||||
!else ifeqi SYSPLATFORM linux
|
||||
SYSCOMP = linux
|
||||
SYSLINK = linux
|
||||
COMINC = $(%watcom)\lh
|
||||
LINUXEXT = op noext
|
||||
#EXT = .elf
|
||||
!endif
|
||||
# ***** END platform specific options *****
|
||||
|
||||
|
||||
########################################
|
||||
#
|
||||
# ***** Release/Debug options *****
|
||||
#
|
||||
!ifndef DEBUG
|
||||
LD_OPTS = op el
|
||||
# -wcd to quiet warning 201 - might need to check
|
||||
C_COMMON = -d0 -wcd=201
|
||||
OPT = $(OPTIMIZATION)
|
||||
TARGDIR = $(RELDIR)
|
||||
!else
|
||||
LD_OPTS = d all op map,symf
|
||||
C_COMMON = $(DEBUGOPTS) -of
|
||||
# overrides optimization options set in buildopts.inc
|
||||
OPT = -od
|
||||
TARGDIR = $(DEBDIR)
|
||||
!endif
|
||||
# ***** END Release/Debug options *****
|
||||
|
||||
|
||||
# MULTITHREAD set in buildopts.inc
|
||||
!ifdef MULTITHREAD
|
||||
MT = -bm
|
||||
!endif
|
||||
|
||||
# CLIBLNK set in buildopts.inc
|
||||
!ifdef CLIBLNK
|
||||
CLIBOPT = -br
|
||||
!endif
|
||||
|
||||
INCLUDE = $(SRCDIR);$(TSTDIR);$(COMINC)
|
||||
|
||||
EXTRA_C = $(C_COMMON) $(OPT) $(MT) $(CLIBOPT) $(MACHINE)
|
||||
COMMONC = -w4 -e25 -zq -bt=$(SYSCOMP) -mf
|
||||
|
||||
CFLAGS = -i=$(INCLUDE) $(DEFS) $(COMMONC) $(EXTRA_C)
|
||||
LDFLAGS = $(LD_OPTS) op maxe=25
|
||||
LIBFLAGS = -b -c -n -p=512
|
||||
|
||||
SRCS = $(SRCDIR)\xmlparse.c $(SRCDIR)\xmlrole.c $(SRCDIR)\xmltok.c
|
||||
OBJS = xmlparse.obj xmlrole.obj xmltok.obj
|
||||
|
||||
XMLWFS = $(XMLDIR)\xmlwf.c $(XMLDIR)\xmlfile.c $(XMLDIR)\codepage.c &
|
||||
$(XMLDIR)\readfilemap.c
|
||||
XMLWFO = xmlwf.obj xmlfile.obj codepage.obj readfilemap.obj
|
||||
|
||||
TESTSRC = ..\tests\chardata.c ..\tests\minicheck.c ..\tests\runtests.c
|
||||
TESTOBJ = chardata.obj minicheck.obj runtests.obj
|
||||
|
||||
|
||||
#############################################################
|
||||
#
|
||||
# ***** Project target build procedures *****
|
||||
#
|
||||
#############################################################
|
||||
|
||||
all: clean $(EXPATDLL) $(TARGLIB) xmlwf$(EXT) tests release .SYMBOLIC
|
||||
|
||||
# dll is built only for OS/2-ECS and LINUX platforms
|
||||
#expat.dll: .ALWAYS
|
||||
$(DLLNAME): .ALWAYS
|
||||
$(CC) -c $(CFLAGS) -bd $(SRCS)
|
||||
!ifeqi SYSPLATFORM os2
|
||||
$(LD) NAME $* @expat.lnk $(LDFLAGS) FILE {$(OBJS)}
|
||||
!else
|
||||
$(LD) NAME $* @wexpat.lnk $(LDFLAGS) FILE {$(OBJS)}
|
||||
!endif
|
||||
$(LB) $(IMPORTLIB) +$*.dll
|
||||
|
||||
# build static lib for platform
|
||||
$(TARGLIB): .ALWAYS
|
||||
$(CC) -c $(CFLAGS) $(CLIBOPT) $(SRCS)
|
||||
$(LB) $(LIBFLAGS) $*.lib $(OBJS)
|
||||
|
||||
# build standalone XML parser
|
||||
xmlwf$(EXT):
|
||||
$(CC) -c $(CFLAGS) $(CLIBOPT) $(XMLWFS)
|
||||
$(LD) NAME $* SYS $(SYSLINK) $(LDFLAGS) $(LINUXEXT) LIB $(TARGLIB) $(NTLIB) FILE {$(XMLWFO)}
|
||||
|
||||
# The following builds EXPAT test and example programs
|
||||
tests: runtests$(EXT) elements$(EXT) outline$(EXT) benchmark$(EXT) .SYMBOLIC
|
||||
|
||||
runtests$(EXT): $(LINKLIB)
|
||||
$(CC) -c $(CFLAGS) $(CLIBOPT) $(TESTSRC)
|
||||
$(LD) NAME $* SYS $(SYSLINK) $(LDFLAGS) $(LINUXEXT) LIB $(TARGLIB) FILE {$(TESTOBJ)}
|
||||
|
||||
elements$(EXT): $(LINKLIB)
|
||||
$(CC) -c $(CFLAGS) $(CLIBOPT) ..\examples\elements.c
|
||||
$(LD) NAME $* SYS $(SYSLINK) $(LDFLAGS) $(LINUXEXT) LIB $(TARGLIB) FILE $*.obj
|
||||
|
||||
outline$(EXT): $(LINKLIB)
|
||||
$(CC) -c $(CFLAGS) $(CLIBOPT) ..\examples\outline.c
|
||||
$(LD) NAME $* SYS $(SYSLINK) $(LDFLAGS) $(LINUXEXT) LIB $(TARGLIB) FILE $*.obj
|
||||
|
||||
benchmark$(EXT): $(LINKLIB)
|
||||
$(CC) -c $(CFLAGS) $(CLIBOPT) ..\tests\benchmark\benchmark.c
|
||||
$(LD) NAME $* SYS $(SYSLINK) $(LDFLAGS) $(LINUXEXT) LIB $(TARGLIB) FILE $*.obj
|
||||
|
||||
# requires wget to download and unzip XML_TEST_SUITE
|
||||
xmlts.zip: .SYMBOLIC
|
||||
$(WGET)wget --output-document=..\tests\xmlts.zip &
|
||||
http://www.w3.org/XML/Test/xmlts20020606.zip
|
||||
unzip -q ..\tests\xmlts.zip -d ..\tests
|
||||
|
||||
|
||||
#############################################################
|
||||
#
|
||||
# ***** Project make release directories procedures *****
|
||||
#
|
||||
#############################################################
|
||||
|
||||
release: .SYMBOLIC
|
||||
TARGEXE = xmlwf$(EXT) runtests$(EXT) elements$(EXT) outline$(EXT) benchmark$(EXT)
|
||||
@if not EXIST $(TARGDIR) -@mkdir $(TARGDIR)
|
||||
@if not EXIST $(TARGDIR)\$(SYSPLATFORM) @%make mktargdir
|
||||
!ifneqi SYSPLATFORM linux
|
||||
-@copy .\$(EXPATDLL) $(TARGDIR)\$(SYSPLATFORM)\dll
|
||||
!endif
|
||||
@for %a in ($(TARGEXE)) do -@copy .\%a $(TARGDIR)\$(SYSPLATFORM)\bin
|
||||
-@copy .\*.lib $(TARGDIR)\$(SYSPLATFORM)\lib
|
||||
-@copy ..\lib\expat.h $(TARGDIR)\$(SYSPLATFORM)\include
|
||||
-@copy ..\lib\expat_external.h $(TARGDIR)\$(SYSPLATFORM)\include
|
||||
|
||||
mktargdir: .PROCEDURE
|
||||
-@mkdir $(TARGDIR)\$(SYSPLATFORM)
|
||||
-@mkdir $(TARGDIR)\$(SYSPLATFORM)\bin
|
||||
-@mkdir $(TARGDIR)\$(SYSPLATFORM)\lib
|
||||
-@mkdir $(TARGDIR)\$(SYSPLATFORM)\include
|
||||
!ifneqi SYSPLATFORM linux
|
||||
-@mkdir $(TARGDIR)\$(SYSPLATFORM)\dll
|
||||
!endif
|
||||
|
||||
#############################################################
|
||||
#
|
||||
# ***** Project clean procedures *****
|
||||
#
|
||||
#############################################################
|
||||
|
||||
# cleanup build files
|
||||
clean: .SYMBOLIC
|
||||
CLEANEXTS = obj exe err lst map sym lib dll
|
||||
CLEANLINUX = xmlwf runtests elements outline benchmark
|
||||
@for %a in ($(CLEANEXTS)) do -@rm *.%a
|
||||
@for %a in ($(CLEANLINUX)) do -@rm %a*
|
||||
|
||||
cleanall: clean .SYMBOLIC
|
||||
@%write watclean.tmp RELDIR=$(RELDIR)
|
||||
@%append watclean.tmp DEBDIR=$(DEBDIR)
|
||||
@if EXIST $(RELDIR)\os2 @wmake -h -f watclean.mif os2
|
||||
@if EXIST $(DEBDIR)\os2 @wmake -h -f watclean.mif os2d
|
||||
@if EXIST $(RELDIR)\nt @wmake -h -f watclean.mif nt
|
||||
@if EXIST $(DEBDIR)\nt @wmake -h -f watclean.mif ntd
|
||||
@if EXIST $(RELDIR)\linux @wmake -h -f watclean.mif linux
|
||||
@if EXIST $(DEBDIR)\linux @wmake -h -f watclean.mif linuxd
|
||||
@if EXIST $(RELDIR) -@rd $(RELDIR)
|
||||
@if EXIST $(DEBDIR) -@rd $(DEBDIR)
|
||||
@if EXIST watclean.tmp -@rm watclean.tmp
|
||||
@if EXIST watopts.tmp -@rm watopts.tmp
|
||||
@cd ..\tests
|
||||
@if EXIST xmlts.zip -@rm xmlts.zip
|
||||
@echo Clean complete.
|
||||
|
||||
|
||||
|
@ -1,70 +0,0 @@
|
||||
# EXPORTs for making dll with Open Watcom under NT/2000/XP
|
||||
SYSTEM nt_dll initinstance terminstance
|
||||
OPTION DESCRIPTION 'Expat (DLL) Implements an XML parser'
|
||||
|
||||
EXPORT XML_DefaultCurrent
|
||||
EXPORT XML_ErrorString
|
||||
EXPORT XML_ExpatVersion
|
||||
EXPORT XML_ExpatVersionInfo
|
||||
EXPORT XML_ExternalEntityParserCreate
|
||||
EXPORT XML_GetBase
|
||||
EXPORT XML_GetBuffer
|
||||
EXPORT XML_GetCurrentByteCount
|
||||
EXPORT XML_GetCurrentByteIndex
|
||||
EXPORT XML_GetCurrentColumnNumber
|
||||
EXPORT XML_GetCurrentLineNumber
|
||||
EXPORT XML_GetErrorCode
|
||||
EXPORT XML_GetIdAttributeIndex
|
||||
EXPORT XML_GetInputContext
|
||||
EXPORT XML_GetSpecifiedAttributeCount
|
||||
EXPORT XML_Parse
|
||||
EXPORT XML_ParseBuffer
|
||||
EXPORT XML_ParserCreate
|
||||
EXPORT XML_ParserCreateNS
|
||||
EXPORT XML_ParserCreate_MM
|
||||
EXPORT XML_ParserFree
|
||||
EXPORT XML_SetAttlistDeclHandler
|
||||
EXPORT XML_SetBase
|
||||
EXPORT XML_SetCdataSectionHandler
|
||||
EXPORT XML_SetCharacterDataHandler
|
||||
EXPORT XML_SetCommentHandler
|
||||
EXPORT XML_SetDefaultHandler
|
||||
EXPORT XML_SetDefaultHandlerExpand
|
||||
EXPORT XML_SetDoctypeDeclHandler
|
||||
EXPORT XML_SetElementDeclHandler
|
||||
EXPORT XML_SetElementHandler
|
||||
EXPORT XML_SetEncoding
|
||||
EXPORT XML_SetEndCdataSectionHandler
|
||||
EXPORT XML_SetEndDoctypeDeclHandler
|
||||
EXPORT XML_SetEndElementHandler
|
||||
EXPORT XML_SetEndNamespaceDeclHandler
|
||||
EXPORT XML_SetEntityDeclHandler
|
||||
EXPORT XML_SetExternalEntityRefHandler
|
||||
EXPORT XML_SetExternalEntityRefHandlerArg
|
||||
EXPORT XML_SetNamespaceDeclHandler
|
||||
EXPORT XML_SetNotStandaloneHandler
|
||||
EXPORT XML_SetNotationDeclHandler
|
||||
EXPORT XML_SetParamEntityParsing
|
||||
EXPORT XML_SetProcessingInstructionHandler
|
||||
EXPORT XML_SetReturnNSTriplet
|
||||
EXPORT XML_SetStartCdataSectionHandler
|
||||
EXPORT XML_SetStartDoctypeDeclHandler
|
||||
EXPORT XML_SetStartElementHandler
|
||||
EXPORT XML_SetStartNamespaceDeclHandler
|
||||
EXPORT XML_SetUnknownEncodingHandler
|
||||
EXPORT XML_SetUnparsedEntityDeclHandler
|
||||
EXPORT XML_SetUserData
|
||||
EXPORT XML_SetXmlDeclHandler
|
||||
EXPORT XML_UseParserAsHandlerArg
|
||||
EXPORT XML_ParserReset
|
||||
EXPORT XML_SetSkippedEntityHandler
|
||||
EXPORT XML_GetFeatureList
|
||||
EXPORT XML_UseForeignDTD
|
||||
EXPORT XML_FreeContentModel
|
||||
EXPORT XML_MemMalloc
|
||||
EXPORT XML_MemRealloc
|
||||
EXPORT XML_MemFree
|
||||
EXPORT XML_StopParser
|
||||
EXPORT XML_ResumeParser
|
||||
EXPORT XML_GetParsingStatus
|
||||
|
@ -16,6 +16,14 @@ Expat can be built on Windows in three ways:
|
||||
* MS Visual Studio .NET 2002, 2003, 2005, 2008, 2010:
|
||||
The VC++ 6 workspace file (expat.dsw) and project files (.dsp)
|
||||
can be opened and imported in VS.NET without problems.
|
||||
Note: Tests have their own *.dsw files.
|
||||
|
||||
* MS Visual Studio 2013 and 2015:
|
||||
A solution file for Visual Studio 2013 is provided: expat.sln.
|
||||
The associated project files (*.vcxproj) reside in the appropriate
|
||||
project directories. This solution file can be opened in VS 2015
|
||||
and should be upgraded automatically if VS 2013 is not also installed.
|
||||
Note: Tests have their own solution files.
|
||||
|
||||
* All MS C/C++ compilers:
|
||||
The output for all projects will be generated in the win32\bin
|
||||
|
@ -7,17 +7,17 @@
|
||||
[Setup]
|
||||
AppName=Expat
|
||||
AppId=expat
|
||||
AppVersion=2.1.1
|
||||
AppVerName=Expat 2.1.1
|
||||
AppCopyright=Copyright © 1998-2012 Thai Open Source Software Center, Clark Cooper, and the Expat maintainers
|
||||
AppVersion=2.2.0
|
||||
AppVerName=Expat 2.2.0
|
||||
AppCopyright=Copyright © 1998-2016 Thai Open Source Software Center, Clark Cooper, and the Expat maintainers
|
||||
AppPublisher=The Expat Developers
|
||||
AppPublisherURL=http://www.libexpat.org/
|
||||
AppSupportURL=http://www.libexpat.org/
|
||||
AppUpdatesURL=http://www.libexpat.org/
|
||||
UninstallDisplayName=Expat XML Parser 2.1.1
|
||||
VersionInfoVersion=2.1.1
|
||||
UninstallDisplayName=Expat XML Parser 2.2.0
|
||||
VersionInfoVersion=2.2.0
|
||||
|
||||
DefaultDirName={pf}\Expat 2.1.1
|
||||
DefaultDirName={pf}\Expat 2.2.0
|
||||
UninstallFilesDir={app}\Uninstall
|
||||
|
||||
Compression=lzma
|
||||
@ -41,6 +41,7 @@ Flags: ignoreversion; Source: doc\*.png; DestDir: "{app}\Doc"
|
||||
Flags: ignoreversion; Source: win32\bin\Release\*.dll; DestDir: "{app}\Bin"
|
||||
Flags: ignoreversion; Source: win32\bin\Release\*.lib; DestDir: "{app}\Bin"
|
||||
Flags: ignoreversion; Source: expat.dsw; DestDir: "{app}\Source"
|
||||
Flags: ignoreversion; Source: expat.sln; DestDir: "{app}\Source"
|
||||
Flags: ignoreversion; Source: win32\README.txt; DestDir: "{app}\Source"
|
||||
Flags: ignoreversion; Source: bcb5\*.bp*; DestDir: "{app}\Source\bcb5"
|
||||
Flags: ignoreversion; Source: bcb5\*.mak; DestDir: "{app}\Source\bcb5"
|
||||
@ -51,18 +52,30 @@ Flags: ignoreversion; Source: lib\*.c; DestDir: "{app}\Sour
|
||||
Flags: ignoreversion; Source: lib\*.h; DestDir: "{app}\Source\lib"
|
||||
Flags: ignoreversion; Source: lib\*.def; DestDir: "{app}\Source\lib"
|
||||
Flags: ignoreversion; Source: lib\*.dsp; DestDir: "{app}\Source\lib"
|
||||
Flags: ignoreversion; Source: lib\*.vcxproj; DestDir: "{app}\Source\lib"
|
||||
Flags: ignoreversion; Source: lib\*.vcxproj.filters; DestDir: "{app}\Source\lib"
|
||||
Flags: ignoreversion; Source: examples\*.c; DestDir: "{app}\Source\examples"
|
||||
Flags: ignoreversion; Source: examples\*.dsp; DestDir: "{app}\Source\examples"
|
||||
Flags: ignoreversion; Source: examples\*.vcxproj; DestDir: "{app}\Source\examples"
|
||||
Flags: ignoreversion; Source: examples\*.vcxproj.filters; DestDir: "{app}\Source\examples"
|
||||
Flags: ignoreversion; Source: tests\*.c; DestDir: "{app}\Source\tests"
|
||||
Flags: ignoreversion; Source: tests\*.cpp; DestDir: "{app}\Source\tests"
|
||||
Flags: ignoreversion; Source: tests\*.h; DestDir: "{app}\Source\tests"
|
||||
Flags: ignoreversion; Source: tests\*.ds*; DestDir: "{app}\Source\tests"
|
||||
Flags: ignoreversion; Source: tests\*.sln; DestDir: "{app}\Source\tests"
|
||||
Flags: ignoreversion; Source: tests\*.vcxproj; DestDir: "{app}\Source\tests"
|
||||
Flags: ignoreversion; Source: tests\*.vcxproj.filters; DestDir: "{app}\Source\tests"
|
||||
Flags: ignoreversion; Source: tests\README.txt; DestDir: "{app}\Source\tests"
|
||||
Flags: ignoreversion; Source: tests\benchmark\*.c; DestDir: "{app}\Source\tests\benchmark"
|
||||
Flags: ignoreversion; Source: tests\benchmark\*.ds*; DestDir: "{app}\Source\tests\benchmark"
|
||||
Flags: ignoreversion; Source: tests\benchmark\*.sln; DestDir: "{app}\Source\tests\benchmark"
|
||||
Flags: ignoreversion; Source: tests\benchmark\*.vcxproj; DestDir: "{app}\Source\tests\benchmark"
|
||||
Flags: ignoreversion; Source: tests\benchmark\README.txt; DestDir: "{app}\Source\tests\benchmark"
|
||||
Flags: ignoreversion; Source: xmlwf\*.c*; DestDir: "{app}\Source\xmlwf"
|
||||
Flags: ignoreversion; Source: xmlwf\*.h; DestDir: "{app}\Source\xmlwf"
|
||||
Flags: ignoreversion; Source: xmlwf\*.dsp; DestDir: "{app}\Source\xmlwf"
|
||||
Flags: ignoreversion; Source: xmlwf\*.vcxproj; DestDir: "{app}\Source\xmlwf"
|
||||
Flags: ignoreversion; Source: xmlwf\*.vcxproj.filters; DestDir: "{app}\Source\xmlwf"
|
||||
|
||||
[Messages]
|
||||
WelcomeLabel1=Welcome to the Expat XML Parser Setup Wizard
|
||||
|
@ -3,6 +3,7 @@
|
||||
*/
|
||||
|
||||
#include "codepage.h"
|
||||
#include "internal.h" /* for UNUSED_P only */
|
||||
|
||||
#if (defined(WIN32) || (defined(__WATCOMC__) && defined(__NT__)))
|
||||
#define STRICT 1
|
||||
@ -54,13 +55,13 @@ codepageConvert(int cp, const char *p)
|
||||
#else /* not WIN32 */
|
||||
|
||||
int
|
||||
codepageMap(int cp, int *map)
|
||||
codepageMap(int UNUSED_P(cp), int *UNUSED_P(map))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
codepageConvert(int cp, const char *p)
|
||||
codepageConvert(int UNUSED_P(cp), const char *UNUSED_P(p))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
@ -8,16 +8,17 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/* Functions close(2) and read(2) */
|
||||
#ifdef __WATCOMC__
|
||||
#ifndef __LINUX__
|
||||
#include <io.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __BEOS__
|
||||
#include <unistd.h>
|
||||
#else
|
||||
# if !defined(WIN32) && !defined(_WIN32) && !defined(_WIN64)
|
||||
# include <unistd.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef S_ISREG
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifdef COMPILED_FROM_DSP
|
||||
#ifdef WIN32
|
||||
#include "winconfig.h"
|
||||
#elif defined(MACOS_CLASSIC)
|
||||
#include "macconfig.h"
|
||||
@ -18,9 +18,10 @@
|
||||
#include "watcomconfig.h"
|
||||
#elif defined(HAVE_EXPAT_CONFIG_H)
|
||||
#include <expat_config.h>
|
||||
#endif /* ndef COMPILED_FROM_DSP */
|
||||
#endif /* ndef WIN32 */
|
||||
|
||||
#include "expat.h"
|
||||
#include "internal.h" /* for UNUSED_P only */
|
||||
#include "xmlfile.h"
|
||||
#include "xmltchar.h"
|
||||
#include "filemap.h"
|
||||
@ -132,7 +133,7 @@ externalEntityRefFilemap(XML_Parser parser,
|
||||
const XML_Char *context,
|
||||
const XML_Char *base,
|
||||
const XML_Char *systemId,
|
||||
const XML_Char *publicId)
|
||||
const XML_Char *UNUSED_P(publicId))
|
||||
{
|
||||
int result;
|
||||
XML_Char *s;
|
||||
@ -200,7 +201,7 @@ externalEntityRefStream(XML_Parser parser,
|
||||
const XML_Char *context,
|
||||
const XML_Char *base,
|
||||
const XML_Char *systemId,
|
||||
const XML_Char *publicId)
|
||||
const XML_Char *UNUSED_P(publicId))
|
||||
{
|
||||
XML_Char *s;
|
||||
const XML_Char *filename;
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#include "expat.h"
|
||||
#include "codepage.h"
|
||||
#include "internal.h" /* for UNUSED_P only */
|
||||
#include "xmlfile.h"
|
||||
#include "xmltchar.h"
|
||||
|
||||
@ -248,49 +249,49 @@ processingInstruction(void *userData, const XML_Char *target,
|
||||
#endif /* not W3C14N */
|
||||
|
||||
static void XMLCALL
|
||||
defaultCharacterData(void *userData, const XML_Char *s, int len)
|
||||
defaultCharacterData(void *userData, const XML_Char *UNUSED_P(s), int UNUSED_P(len))
|
||||
{
|
||||
XML_DefaultCurrent((XML_Parser) userData);
|
||||
}
|
||||
|
||||
static void XMLCALL
|
||||
defaultStartElement(void *userData, const XML_Char *name,
|
||||
const XML_Char **atts)
|
||||
defaultStartElement(void *userData, const XML_Char *UNUSED_P(name),
|
||||
const XML_Char **UNUSED_P(atts))
|
||||
{
|
||||
XML_DefaultCurrent((XML_Parser) userData);
|
||||
}
|
||||
|
||||
static void XMLCALL
|
||||
defaultEndElement(void *userData, const XML_Char *name)
|
||||
defaultEndElement(void *userData, const XML_Char *UNUSED_P(name))
|
||||
{
|
||||
XML_DefaultCurrent((XML_Parser) userData);
|
||||
}
|
||||
|
||||
static void XMLCALL
|
||||
defaultProcessingInstruction(void *userData, const XML_Char *target,
|
||||
const XML_Char *data)
|
||||
defaultProcessingInstruction(void *userData, const XML_Char *UNUSED_P(target),
|
||||
const XML_Char *UNUSED_P(data))
|
||||
{
|
||||
XML_DefaultCurrent((XML_Parser) userData);
|
||||
}
|
||||
|
||||
static void XMLCALL
|
||||
nopCharacterData(void *userData, const XML_Char *s, int len)
|
||||
nopCharacterData(void *UNUSED_P(userData), const XML_Char *UNUSED_P(s), int UNUSED_P(len))
|
||||
{
|
||||
}
|
||||
|
||||
static void XMLCALL
|
||||
nopStartElement(void *userData, const XML_Char *name, const XML_Char **atts)
|
||||
nopStartElement(void *UNUSED_P(userData), const XML_Char *UNUSED_P(name), const XML_Char **UNUSED_P(atts))
|
||||
{
|
||||
}
|
||||
|
||||
static void XMLCALL
|
||||
nopEndElement(void *userData, const XML_Char *name)
|
||||
nopEndElement(void *UNUSED_P(userData), const XML_Char *UNUSED_P(name))
|
||||
{
|
||||
}
|
||||
|
||||
static void XMLCALL
|
||||
nopProcessingInstruction(void *userData, const XML_Char *target,
|
||||
const XML_Char *data)
|
||||
nopProcessingInstruction(void *UNUSED_P(userData), const XML_Char *UNUSED_P(target),
|
||||
const XML_Char *UNUSED_P(data))
|
||||
{
|
||||
}
|
||||
|
||||
@ -434,9 +435,9 @@ metaCharacterData(void *userData, const XML_Char *s, int len)
|
||||
static void XMLCALL
|
||||
metaStartDoctypeDecl(void *userData,
|
||||
const XML_Char *doctypeName,
|
||||
const XML_Char *sysid,
|
||||
const XML_Char *pubid,
|
||||
int has_internal_subset)
|
||||
const XML_Char *UNUSED_P(sysid),
|
||||
const XML_Char *UNUSED_P(pubid),
|
||||
int UNUSED_P(has_internal_subset))
|
||||
{
|
||||
XML_Parser parser = (XML_Parser) userData;
|
||||
FILE *fp = (FILE *)XML_GetUserData(parser);
|
||||
@ -458,7 +459,7 @@ metaEndDoctypeDecl(void *userData)
|
||||
static void XMLCALL
|
||||
metaNotationDecl(void *userData,
|
||||
const XML_Char *notationName,
|
||||
const XML_Char *base,
|
||||
const XML_Char *UNUSED_P(base),
|
||||
const XML_Char *systemId,
|
||||
const XML_Char *publicId)
|
||||
{
|
||||
@ -480,10 +481,10 @@ metaNotationDecl(void *userData,
|
||||
static void XMLCALL
|
||||
metaEntityDecl(void *userData,
|
||||
const XML_Char *entityName,
|
||||
int is_param,
|
||||
int UNUSED_P(is_param),
|
||||
const XML_Char *value,
|
||||
int value_length,
|
||||
const XML_Char *base,
|
||||
const XML_Char *UNUSED_P(base),
|
||||
const XML_Char *systemId,
|
||||
const XML_Char *publicId,
|
||||
const XML_Char *notationName)
|
||||
@ -558,7 +559,7 @@ unknownEncodingConvert(void *data, const char *p)
|
||||
}
|
||||
|
||||
static int XMLCALL
|
||||
unknownEncoding(void *userData, const XML_Char *name, XML_Encoding *info)
|
||||
unknownEncoding(void *UNUSED_P(userData), const XML_Char *name, XML_Encoding *info)
|
||||
{
|
||||
int cp;
|
||||
static const XML_Char prefixL[] = T("windows-");
|
||||
@ -594,7 +595,7 @@ unknownEncoding(void *userData, const XML_Char *name, XML_Encoding *info)
|
||||
}
|
||||
|
||||
static int XMLCALL
|
||||
notStandalone(void *userData)
|
||||
notStandalone(void *UNUSED_P(userData))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -759,6 +760,12 @@ tmain(int argc, XML_Char **argv)
|
||||
parser = XML_ParserCreateNS(encoding, NSSEP);
|
||||
else
|
||||
parser = XML_ParserCreate(encoding);
|
||||
|
||||
if (! parser) {
|
||||
tperror("Could not instantiate parser");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (requireStandalone)
|
||||
XML_SetNotStandaloneHandler(parser, notStandalone);
|
||||
XML_SetParamEntityParsing(parser, paramEntityParsing);
|
||||
|
Loading…
Reference in New Issue
Block a user