[3party] Updated expat to 2.1.0

This commit is contained in:
Alex Zolotarev 2013-05-31 17:44:12 +03:00 committed by Alex Zolotarev
parent 9bd051176f
commit b4ea7f954b
73 changed files with 39460 additions and 27338 deletions

42
3party/expat/CMake.README Executable file
View file

@ -0,0 +1,42 @@
== How to build expat with cmake (experimental) ==
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.0 is the source directory of expat, add a subdirectory
build and change into that directory:
~/expat-2.1.0$ mkdir build && cd build
~/expat-2.1.0/build$
From that directory, call cmake first, then call make, make test and
make install in the usual way:
~/expat-2.1.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.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.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
....
-- Installing: /usr/local/lib/pkgconfig/expat.pc
-- Installing: /usr/local/bin/xmlwf
-- Installing: /usr/local/share/man/man1/xmlwf.1
For Windows builds, you must make sure to call cmake from an environment where
your compiler is reachable, that means either you call it from the
Visual Studio Command Prompt or when using mingw, you must open a cmd.exe and
make sure that gcc can be called. On Windows, you also might want to specify a
special Generator for CMake:
for Visual Studio builds do:
cmake .. -G "Visual Studio 10" && vcexpress expat.sln
for mingw builds do:
cmake .. -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=D:\expat-install
&& gmake && gmake install

111
3party/expat/CMakeLists.txt Executable file
View file

@ -0,0 +1,111 @@
# This file is copyrighted under the BSD-license for buildsystem files of KDE
# copyright 2010, Patrick Spendrin <ps_ml@gmx.de>
project(expat)
cmake_minimum_required(VERSION 2.6)
set(PACKAGE_BUGREPORT "expat-bugs@libexpat.org")
set(PACKAGE_NAME "expat")
set(PACKAGE_VERSION "2.1.0")
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
set(PACKAGE_TARNAME "${PACKAGE_NAME}")
option(BUILD_tools "build the xmlwf tool for expat library" ON)
option(BUILD_examples "build the examples for expat library" ON)
option(BUILD_tests "build the tests for expat library" ON)
option(BUILD_shared "build a shared expat library" ON)
# configuration options
set(XML_CONTEXT_BYTES 1024 CACHE STRING "Define to specify how much context to retain around the current parse point")
option(XML_DTD "Define to make parameter entity parsing functionality available" ON)
option(XML_NS "Define to make XML Namespaces functionality available" ON)
if(XML_DTD)
set(XML_DTD 1)
else(XML_DTD)
set(XML_DTD 0)
endif(XML_DTD)
if(XML_NS)
set(XML_NS 1)
else(XML_NS)
set(XML_NS 0)
endif(XML_NS)
if(BUILD_tests)
enable_testing()
endif(BUILD_tests)
include(ConfigureChecks.cmake)
include_directories(${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/lib)
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS -wd4996)
endif(MSVC)
set(expat_SRCS
lib/xmlparse.c
lib/xmlrole.c
lib/xmltok.c
lib/xmltok_impl.c
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)
else(BUILD_shared)
set(_SHARED STATIC)
endif(BUILD_shared)
add_library(expat ${_SHARED} ${expat_SRCS})
install(TARGETS expat RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix "\${prefix}/bin")
set(libdir "\${prefix}/lib")
set(includedir "\${prefix}/include")
configure_file(expat.pc.in ${CMAKE_CURRENT_BINARY_DIR}/expat.pc)
install(FILES lib/expat.h lib/expat_external.h DESTINATION include)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/expat.pc DESTINATION lib/pkgconfig)
if(BUILD_tools AND NOT WINCE)
set(xmlwf_SRCS
xmlwf/xmlwf.c
xmlwf/xmlfile.c
xmlwf/codepage.c
xmlwf/readfilemap.c
)
add_executable(xmlwf ${xmlwf_SRCS})
target_link_libraries(xmlwf expat)
install(TARGETS xmlwf DESTINATION bin)
install(FILES doc/xmlwf.1 DESTINATION share/man/man1)
endif(BUILD_tools AND NOT WINCE)
if(BUILD_examples)
add_executable(elements examples/elements.c)
target_link_libraries(elements expat)
add_executable(outline examples/outline.c)
target_link_libraries(outline expat)
endif(BUILD_examples)
if(BUILD_tests)
## these are unittests that can be run on any platform
add_executable(runtests tests/runtests.c tests/chardata.c tests/minicheck.c)
target_link_libraries(runtests expat)
add_test(runtests runtests)
add_executable(runtestspp tests/runtestspp.cpp tests/chardata.c tests/minicheck.c)
target_link_libraries(runtestspp expat)
add_test(runtestspp runtestspp)
endif(BUILD_tests)

View file

@ -1,5 +1,41 @@
Release 2.1.0 Sat March 24 2012
- Bug Fixes:
#1742315: Harmful XML_ParserCreateNS suggestion.
#2895533: CVE-2012-1147 - Resource leak in readfilemap.c.
#1785430: Expat build fails on linux-amd64 with gcc version>=4.1 -O3.
#1983953, 2517952, 2517962, 2649838:
Build modifications using autoreconf instead of buildconf.sh.
#2815947, #2884086: OBJEXT and EXEEXT support while building.
#1990430: CVE-2009-3720 - Parser crash with special UTF-8 sequences.
#2517938: xmlwf should return non-zero exit status if not well-formed.
#2517946: Wrong statement about XMLDecl in xmlwf.1 and xmlwf.sgml.
#2855609: Dangling positionPtr after error.
#2894085: CVE-2009-3560 - Buffer over-read and crash in big2_toUtf8().
#2958794: CVE-2012-1148 - Memory leak in poolGrow.
#2990652: CMake support.
#3010819: UNEXPECTED_STATE with a trailing "%" in entity value.
#3206497: Unitialized memory returned from XML_Parse.
#3287849: make check fails on mingw-w64.
#3496608: CVE-2012-0876 - Hash DOS attack.
- Patches:
#1749198: pkg-config support.
#3010222: Fix for bug #3010819.
#3312568: CMake support.
#3446384: Report byte offsets for attr names and values.
- New Features / API changes:
Added new API member XML_SetHashSalt() that allows setting an intial
value (salt) for hash calculations. This is part of the fix for
bug #3496608 to randomize hash parameters.
When compiled with XML_ATTR_INFO defined, adds new API member
XML_GetAttributeInfo() that allows retrieving the byte
offsets for attribute names and values (patch #3446384).
Added CMake build system.
See bug #2990652 and patch #3312568.
Added run-benchmark target to Makefile.in - relies on testdata module
present in the same relative location as in the repository.
Release 2.0.1 Tue June 5 2007
- Fixed bugs #1515266, 1515600: The character data handler's calling
- Fixed bugs #1515266, #1515600: The character data handler's calling
of XML_StopParser() was not handled properly; if the parser was
stopped and the handler set to NULL, the parser would segfault.
- Fixed bug #1690883: Expat failed on EBCDIC systems as it assumed
@ -8,7 +44,7 @@ Release 2.0.1 Tue June 5 2007
- Fixed xmlwf bug #1513566: "out of memory" error on file size zero.
- Fixed outline.c bug #1543233: missing a final XML_ParserFree() call.
- Fixes and improvements for Windows platform:
bugs #1409451, #1476160, 1548182, 1602769, 1717322.
bugs #1409451, #1476160, #1548182, #1602769, #1717322.
- Build fixes for various platforms:
HP-UX, Tru64, Solaris 9: patch #1437840, bug #1196180.
All Unix: #1554618 (refreshed config.sub/config.guess).
@ -30,8 +66,8 @@ Release 2.0.0 Wed Jan 11 2006
byte indexes and line/column numbers.
- Updated to use libtool 1.5.22 (the most recent).
- Added support for AmigaOS.
- Some mostly minor bug fixes. SF issues include: 1006708,
1021776, 1023646, 1114960, 1156398, 1221160, 1271642.
- Some mostly minor bug fixes. SF issues include: #1006708,
#1021776, #1023646, #1114960, #1156398, #1221160, #1271642.
Release 1.95.8 Fri Jul 23 2004
- Major new feature: suspend/resume. Handlers can now request
@ -40,8 +76,8 @@ Release 1.95.8 Fri Jul 23 2004
documentation for more details.
- Some mostly minor bug fixes, but compilation should no
longer generate warnings on most platforms. SF issues
include: 827319, 840173, 846309, 888329, 896188, 923913,
928113, 961698, 985192.
include: #827319, #840173, #846309, #888329, #896188, #923913,
#928113, #961698, #985192.
Release 1.95.7 Mon Oct 20 2003
- Fixed enum XML_Status issue (reported on SourceForge many
@ -54,19 +90,19 @@ Release 1.95.7 Mon Oct 20 2003
- Improved ability to build without the configure-generated
expat_config.h header. This is useful for applications
which embed Expat rather than linking in the library.
- Fixed a variety of bugs: see SF issues 458907, 609603,
676844, 679754, 692878, 692964, 695401, 699323, 699487,
820946.
- Fixed a variety of bugs: see SF issues #458907, #609603,
#676844, #679754, #692878, #692964, #695401, #699323, #699487,
#820946.
- Improved hash table lookups.
- Added more regression tests and improved documentation.
Release 1.95.6 Tue Jan 28 2003
- Added XML_FreeContentModel().
- Added XML_MemMalloc(), XML_MemRealloc(), XML_MemFree().
- Fixed a variety of bugs: see SF issues 615606, 616863,
618199, 653180, 673791.
- Fixed a variety of bugs: see SF issues #615606, #616863,
#618199, #653180, #673791.
- Enhanced the regression test suite.
- Man page improvements: includes SF issue 632146.
- Man page improvements: includes SF issue #632146.
Release 1.95.5 Fri Sep 6 2002
- Added XML_UseForeignDTD() for improved SAX2 support.
@ -84,9 +120,9 @@ Release 1.95.5 Fri Sep 6 2002
- Reduced line-length for all source code and headers to be
no longer than 80 characters, to help with AS/400 support.
- Reduced memory copying during parsing (SF patch #600964).
- Fixed a variety of bugs: see SF issues 580793, 434664,
483514, 580503, 581069, 584041, 584183, 584832, 585537,
596555, 596678, 598352, 598944, 599715, 600479, 600971.
- Fixed a variety of bugs: see SF issues #580793, #434664,
#483514, #580503, #581069, #584041, #584183, #584832, #585537,
#596555, #596678, #598352, #598944, #599715, #600479, #600971.
Release 1.95.4 Fri Jul 12 2002
- Added support for VMS, contributed by Craig Berry. See
@ -95,14 +131,14 @@ Release 1.95.4 Fri Jul 12 2002
contributed by Thomas Wegner and Daryle Walker.
- Added Borland C++ Builder 5 / BCC 5.5 support, contributed
by Patrick McConnell (SF patch #538032).
- Fixed a variety of bugs: see SF issues 441449, 563184,
564342, 566334, 566901, 569461, 570263, 575168, 579196.
- Fixed a variety of bugs: see SF issues #441449, #563184,
#564342, #566334, #566901, #569461, #570263, #575168, #579196.
- Made skippedEntityHandler conform to SAX2 (see source comment)
- Re-implemented WFC: Entity Declared from XML 1.0 spec and
added a new error "entity declared in parameter entity":
see SF bug report 569461 and SF patch 578161
see SF bug report #569461 and SF patch #578161
- Re-implemented section 5.1 from XML 1.0 spec:
see SF bug report 570263 and SF patch 578161
see SF bug report #570263 and SF patch #578161
Release 1.95.3 Mon Jun 3 2002
- Added a project to the MSVC workspace to create a wchar_t
@ -114,9 +150,9 @@ Release 1.95.3 Mon Jun 3 2002
- Made the XML_UNICODE builds usable (thanks, Karl!).
- Allow xmlwf to read from standard input.
- Install a man page for xmlwf on Unix systems.
- Fixed many bugs; see SF bug reports 231864, 461380, 464837,
466885, 469226, 477667, 484419, 487840, 494749, 496505,
547350. Other bugs which we can't test as easily may also
- Fixed many bugs; see SF bug reports #231864, #461380, #464837,
#466885, #469226, #477667, #484419, #487840, #494749, #496505,
#547350. Other bugs which we can't test as easily may also
have been fixed, especially in the area of build support.
Release 1.95.2 Fri Jul 27 2001

View file

@ -0,0 +1,44 @@
include(CheckIncludeFile)
include(CheckIncludeFiles)
include(CheckFunctionExists)
include(CheckSymbolExists)
include(TestBigEndian)
check_include_file("dlfcn.h" HAVE_DLFCN_H)
check_include_file("fcntl.h" HAVE_FCNTL_H)
check_include_file("inttypes.h" HAVE_INTTYPES_H)
check_include_file("memory.h" HAVE_MEMORY_H)
check_include_file("stdint.h" HAVE_STDINT_H)
check_include_file("stdlib.h" HAVE_STDLIB_H)
check_include_file("strings.h" HAVE_STRINGS_H)
check_include_file("string.h" HAVE_STRING_H)
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
check_include_file("unistd.h" HAVE_UNISTD_H)
check_function_exists("getpagesize" HAVE_GETPAGESIZE)
check_function_exists("bcopy" HAVE_BCOPY)
check_symbol_exists("memmove" "string.h" HAVE_MEMMOVE)
check_function_exists("mmap" HAVE_MMAP)
#/* Define to 1 if you have the ANSI C header files. */
check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
test_big_endian(WORDS_BIGENDIAN)
#/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
if(WORDS_BIGENDIAN)
set(BYTEORDER 4321)
else(WORDS_BIGENDIAN)
set(BYTEORDER 1234)
endif(WORDS_BIGENDIAN)
if(HAVE_SYS_TYPES_H)
check_symbol_exists("off_t" "sys/types.h" OFF_T)
check_symbol_exists("size_t" "sys/types.h" SIZE_T)
else(HAVE_SYS_TYPES_H)
set(OFF_T "long")
set(SIZE_T "unsigned")
endif(HAVE_SYS_TYPES_H)
configure_file(expat_config.h.cmake expat_config.h)
add_definitions(-DHAVE_EXPAT_CONFIG_H)

View file

@ -1,5 +1,8 @@
amiga/stdlib.c
amiga/launch.c
amiga/expat_68k.c
amiga/expat_68k.h
amiga/expat_68k_handler_stubs.c
amiga/expat_base.h
amiga/expat_vectors.c
amiga/expat_lib.c
amiga/expat.xml
@ -42,25 +45,35 @@ doc/style.css
doc/valid-xhtml10.png
doc/xmlwf.1
doc/xmlwf.sgml
CMakeLists.txt
CMake.README
COPYING
Changes
ConfigureChecks.cmake
MANIFEST
Makefile.in
README
configure
configure.in
expat_config.h.in
expat_config.h.cmake
expat.pc.in
expat.dsw
aclocal.m4
conftools/PrintPath
conftools/ac_c_bigendian_cross.m4
conftools/config.guess
conftools/config.sub
conftools/expat.m4
conftools/get-version.sh
conftools/install-sh
conftools/libtool.m4
conftools/ltmain.sh
conftools/mkinstalldirs
conftools/config.guess
conftools/config.sub
conftools/install-sh
conftools/ltmain.sh
m4/libtool.m4
m4/ltversion.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/lt~obsolete.m4
examples/elements.c
examples/elements.dsp
examples/outline.c

View file

@ -31,6 +31,7 @@ bindir = @bindir@
libdir = @libdir@
includedir = @includedir@
man1dir = @mandir@/man1
pkgconfigdir = $(libdir)/pkgconfig
top_builddir = .
@ -46,18 +47,18 @@ LIBRARY = libexpat.la
DESTDIR = $(INSTALL_ROOT)
default: buildlib xmlwf/xmlwf
default: buildlib xmlwf/xmlwf@EXEEXT@
buildlib: $(LIBRARY)
buildlib: $(LIBRARY) expat.pc
all: $(LIBRARY) xmlwf/xmlwf examples/elements examples/outline
all: $(LIBRARY) expat.pc xmlwf/xmlwf@EXEEXT@ examples/elements examples/outline
clean:
cd lib && rm -f $(LIBRARY) *.o *.lo && rm -rf .libs _libs
cd xmlwf && rm -f xmlwf *.o *.lo && rm -rf .libs _libs
cd examples && rm -f elements outline *.o *.lo && rm -rf .libs _libs
cd tests && rm -rf .libs runtests runtests.o runtestspp runtestspp.o
cd tests && rm -f chardata.o minicheck.o
cd lib && rm -f $(LIBRARY) *.@OBJEXT@ *.lo && rm -rf .libs _libs
cd xmlwf && rm -f xmlwf *.@OBJEXT@ *.lo && rm -rf .libs _libs
cd examples && rm -f elements outline *.@OBJEXT@ *.lo && rm -rf .libs _libs
cd tests && rm -rf .libs runtests runtests.@OBJEXT@ runtestspp runtestspp.@OBJEXT@
cd tests && rm -f chardata.@OBJEXT@ minicheck.@OBJEXT@
rm -rf .libs libexpat.la
rm -f examples/core tests/core xmlwf/core
@ -65,34 +66,37 @@ clobber: clean
distclean: clean
rm -f expat_config.h config.status config.log config.cache libtool
rm -f Makefile
rm -f Makefile expat.pc
extraclean: distclean
rm -f expat_config.h.in configure
rm -f conftools/ltconfig conftools/ltmain.sh conftools/libtool.m4
rm -f aclocal.m4 m4/*
rm -f conftools/ltmain.sh conftools/install-sh conftools/config.guess conftools/config.sub
check: tests/runtests tests/runtestspp
tests/runtests
tests/runtestspp
install: xmlwf/xmlwf installlib
install: xmlwf/xmlwf@EXEEXT@ installlib
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(DESTDIR)$(bindir)/xmlwf
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf@EXEEXT@ $(DESTDIR)$(bindir)/xmlwf
$(INSTALL_DATA) $(MANFILE) $(DESTDIR)$(man1dir)
installlib: $(LIBRARY) $(APIHEADER)
$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
installlib: $(LIBRARY) $(APIHEADER) expat.pc
$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) $(DESTDIR)$(pkgconfigdir)
$(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir)/$(LIBRARY)
for FN in $(APIHEADER) ; do $(INSTALL_DATA) $$FN $(DESTDIR)$(includedir) ; done
$(INSTALL_DATA) expat.pc $(DESTDIR)$(pkgconfigdir)/expat.pc
uninstall: uninstalllib
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/xmlwf
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/xmlwf@EXEEXT@
rm -f $(DESTDIR)$(man1dir)/xmlwf.1
uninstalllib:
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(LIBRARY)
rm -f $(DESTDIR)$(includedir)/expat.h
rm -f $(DESTDIR)$(includedir)/expat_external.h
rm -f $(DESTDIR)$(pkgconfigdir)/expat.pc
# for VPATH builds (invoked by configure)
mkdir-init:
@ -125,6 +129,9 @@ LIB_OBJS = lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo
$(LIBRARY): $(LIB_OBJS)
$(LINK_LIB) $(LIB_OBJS)
expat.pc: $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $@
lib/xmlparse.lo: lib/xmlparse.c lib/expat.h lib/xmlrole.h lib/xmltok.h \
$(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
@ -137,46 +144,53 @@ lib/xmltok.lo: lib/xmltok.c lib/xmltok_impl.c lib/xmltok_ns.c \
$(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
XMLWF_OBJS = xmlwf/xmlwf.o xmlwf/xmlfile.o xmlwf/codepage.o xmlwf/@FILEMAP@.o
xmlwf/xmlwf.o: xmlwf/xmlwf.c
xmlwf/xmlfile.o: xmlwf/xmlfile.c
xmlwf/codepage.o: xmlwf/codepage.c
xmlwf/@FILEMAP@.o: xmlwf/@FILEMAP@.c
xmlwf/xmlwf: $(XMLWF_OBJS) $(LIBRARY)
XMLWF_OBJS = xmlwf/xmlwf.@OBJEXT@ xmlwf/xmlfile.@OBJEXT@ xmlwf/codepage.@OBJEXT@ xmlwf/@FILEMAP@.@OBJEXT@
xmlwf/xmlwf.@OBJEXT@: xmlwf/xmlwf.c
xmlwf/xmlfile.@OBJEXT@: xmlwf/xmlfile.c
xmlwf/codepage.@OBJEXT@: xmlwf/codepage.c
xmlwf/@FILEMAP@.@OBJEXT@: xmlwf/@FILEMAP@.c
xmlwf/xmlwf@EXEEXT@: $(XMLWF_OBJS) $(LIBRARY)
$(LINK_EXE) $(XMLWF_OBJS) $(LIBRARY)
examples/elements.o: examples/elements.c
examples/elements: examples/elements.o $(LIBRARY)
examples/elements.@OBJEXT@: examples/elements.c
examples/elements: examples/elements.@OBJEXT@ $(LIBRARY)
$(LINK_EXE) $< $(LIBRARY)
examples/outline.o: examples/outline.c
examples/outline: examples/outline.o $(LIBRARY)
examples/outline.@OBJEXT@: examples/outline.c
examples/outline: examples/outline.@OBJEXT@ $(LIBRARY)
$(LINK_EXE) $< $(LIBRARY)
tests/chardata.o: tests/chardata.c tests/chardata.h
tests/minicheck.o: tests/minicheck.c tests/minicheck.h
tests/runtests.o: tests/runtests.c tests/chardata.h
tests/runtests: tests/runtests.o tests/chardata.o tests/minicheck.o $(LIBRARY)
$(LINK_EXE) tests/runtests.o tests/chardata.o tests/minicheck.o $(LIBRARY)
tests/runtestspp.o: tests/runtestspp.cpp tests/runtests.c tests/chardata.h
tests/runtestspp: tests/runtestspp.o tests/chardata.o tests/minicheck.o $(LIBRARY)
$(LINK_CXX_EXE) tests/runtestspp.o tests/chardata.o tests/minicheck.o $(LIBRARY)
tests/chardata.@OBJEXT@: tests/chardata.c tests/chardata.h
tests/minicheck.@OBJEXT@: tests/minicheck.c tests/minicheck.h
tests/runtests.@OBJEXT@: tests/runtests.c tests/chardata.h
tests/runtests: tests/runtests.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY)
$(LINK_EXE) tests/runtests.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY)
tests/runtestspp.@OBJEXT@: tests/runtestspp.cpp tests/runtests.c tests/chardata.h
tests/runtestspp: tests/runtestspp.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY)
$(LINK_CXX_EXE) tests/runtestspp.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY)
tests/benchmark/benchmark.@OBJEXT@: tests/benchmark/benchmark.c
tests/benchmark/benchmark: tests/benchmark/benchmark.@OBJEXT@ $(LIBRARY)
$(LINK_EXE) tests/benchmark/benchmark.@OBJEXT@ $(LIBRARY)
run-benchmark: tests/benchmark/benchmark
tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/recset.xml 65535 3
tests/xmlts.zip:
wget --output-document=tests/xmlts.zip \
http://www.w3.org/XML/Test/xmlts20020606.zip
http://www.w3.org/XML/Test/xmlts20080827.zip
tests/XML-Test-Suite: tests/xmlts.zip
cd tests && unzip -q xmlts.zip
run-xmltest: xmlwf/xmlwf tests/XML-Test-Suite
run-xmltest: xmlwf/xmlwf@EXEEXT@ tests/XML-Test-Suite
tests/xmltest.sh
.SUFFIXES: .c .cpp .lo .o
.SUFFIXES: .c .cpp .lo .@OBJEXT@
.cpp.o:
.cpp.@OBJEXT@:
$(CXXCOMPILE) -o $@ -c $<
.c.o:
.c.@OBJEXT@:
$(COMPILE) -o $@ -c $<
.c.lo:
$(LTCOMPILE) -o $@ -c $<

View file

@ -1,5 +1,5 @@
Expat, Release 2.0.1
Expat, Release 2.1.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
@ -25,8 +25,7 @@ intended to be production grade software.
If you are building Expat from a check-out from the CVS repository,
you need to run a script that generates the configure script using the
GNU autoconf and libtool tools. To do this, you need to have
autoconf 2.52 or newer and libtool 1.4 or newer (1.5 or newer preferred).
Run the script like this:
autoconf 2.58 or newer. Run the script like this:
./buildconf.sh
@ -65,8 +64,8 @@ location. Have a look at the "Makefile" to learn about additional
the directories into which things will be installed.
If you are interested in building Expat to provide document
information in UTF-16 rather than the default UTF-8, follow these
instructions (after having run "make distclean"):
information in UTF-16 encoding rather than the default UTF-8, follow
these instructions (after having run "make distclean"):
1. For UTF-16 output as unsigned short (and version/error
strings as char), run:
@ -106,7 +105,10 @@ use DESTDIR=$(INSTALL_ROOT), even if DESTDIR eventually is defined in the
environment, because variable-setting priority is
1) commandline
2) in-makefile
3) environment
3) environment
Note: This only applies to the Expat library itself, building UTF-16 versions
of xmlwf and the tests is currently not supported.
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

8460
3party/expat/aclocal.m4 vendored Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,19 +1,74 @@
SUMMARY
=======
This is a port of expat for AmigaOS 4.0 which includes the
This is a port of expat for AmigaOS 4.x which includes the
SDK, some XML tools and the libraries.
Both static and shared library versions are supported.
Four library flavours are supported:
1. static clib2 (libexpat.a)
2. static newlib (libexpat.a)
3. AmigaOS library (expat.library)
4. AmigaOS shared object library (libexpat.so)
The static library version is limited to clib2 although it should
be possible to use newlib with the appopriate compile options.
The AmigaOS library version is based on the work of Fredrik Wikstrom.
The shared library version is based on the work of Fredrik Wikstrom
and is currently limited to PPC only.
BUILDING
========
To build all the library flavours, all the tools, examples and run the
test suite, simply type 'make all' in the amiga subdirectory.
INSTALLATION
============
To install expat into the standard AmigaOS SDK type 'make install'
in the amiga subdirectory.
CONFIGURATION
=============
You may want to edit the lib/amigaconfig.h file to remove
DTD and/or XML namespace support if they are not required by your
specific application for a smaller and faster implementation.
SOURCE CODE
===========
The source code is actively maintained and merged with the official
Expat repository available at http://expat.sourceforge.net/
HISTORY
=======
53.1 - bumped version to match AmigaOS streaming
- modified to remove all global variables (except INewLib)
- removed replacements for malloc(), etc. which are now
handled by the respective C library
- compiled with the latest binutils which bumps the
AMIGAOS_DYNVERSION to 2 for the libexpat.so target
- now strips the expat.library binary
5.2 - fixed XML_Parse 68k stub which enables xmlviewer to work
without crashing
- added some new functions to the 68k jump table available
in the latest expat.library for AmigaOS 3.x
- patches provided by Fredrik Wikstrom
5.1 - fixed package archive which was missing libexpat.so
- fixed library protection bits
- fixed up copyright notices
5.0 - integrated 68k patches from Fredrik Wikstrom which means
expat.library is now callable from 68k code
- bumped version for the addition of the 68k interface so
executables can explicitly ask for version 5 and know
it includes the 68k interface
- refactored Makefile to avoid recursive make calls and
build all the library flavours
- added static newlib version
- added shared objects version
- added package target to Makefile
- compiled with SDK 53.13 (GCC 4.2.4) at -O3
4.2 - updated to correspond to Expat 2.0.1 release
- bumped copyright banners and versions
- simplified amigaconfig.h
@ -38,29 +93,6 @@ HISTORY
- based on expat 1.95.8
BUILDING
========
To build expat.library, xmlwf tool, examples and run the test suite,
simply type 'make all' in the amiga subdirectory.
The test suite will compile and run for both the static and shared
library versions.
INSTALLATION
============
To install both static and shared versions of expat into the
AmigaOS SDK type 'make install' in the amiga subdirectory.
CONFIGURATION
=============
You may want to edit the lib/amigaconfig.h file to remove
DTD and/or XML namespace support if they are not required by your
specific application for a smaller and faster implementation.
TO DO
=====
- wide character support (UTF-16)
- provide 68k backwards compatibility

View file

@ -0,0 +1,939 @@
/*
** Copyright (c) 2001-2009 Expat maintainers.
**
** Permission is hereby granted, free of charge, to any person obtaining
** a copy of this software and associated documentation files (the
** "Software"), to deal in the Software without restriction, including
** without limitation the rights to use, copy, modify, merge, publish,
** distribute, sublicense, and/or sell copies of the Software, and to
** permit persons to whom the Software is furnished to do so, subject to
** the following conditions:
**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Software.
**
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/*
** Note: This file was originally automatically generated by fdtrans.
*/
#ifdef __USE_INLINE__
#undef __USE_INLINE__
#endif
#include <exec/interfaces.h>
#include <exec/libraries.h>
#include <exec/emulation.h>
#include <proto/exec.h>
#include <interfaces/expat.h>
#include "expat_68k.h"
#include "expat_base.h"
STATIC ULONG stub_OpenPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct LibraryManagerInterface *Self = (struct LibraryManagerInterface *) ExtLib->ILibrary;
return (ULONG) Self->Open(0);
}
struct EmuTrap stub_Open = { TRAPINST, TRAPTYPE, stub_OpenPPC };
STATIC ULONG stub_ClosePPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct LibraryManagerInterface *Self = (struct LibraryManagerInterface *) ExtLib->ILibrary;
return (ULONG) Self->Close();
}
struct EmuTrap stub_Close = { TRAPINST, TRAPTYPE, stub_ClosePPC };
STATIC ULONG stub_ExpungePPC(ULONG *regarray)
{
return 0UL;
}
struct EmuTrap stub_Expunge = { TRAPINST, TRAPTYPE, stub_ExpungePPC };
STATIC ULONG stub_ReservedPPC(ULONG *regarray)
{
return 0UL;
}
struct EmuTrap stub_Reserved = { TRAPINST, TRAPTYPE, stub_ReservedPPC };
static M68kXML_Parser stub_XML_ParserCreatePPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
struct ExecIFace *IExec = ((struct ExpatBase *)Self->Data.LibBase)->IExec;
M68kXML_Parser p;
p = IExec->AllocVec(sizeof(*p), MEMF_SHARED|MEMF_CLEAR);
if (p) {
p->p = Self->XML_ParserCreate((const XML_Char *)regarray[8]);
if (p->p) {
p->IExec = IExec;
Self->XML_SetUserData(p->p, p);
return p;
}
IExec->FreeVec(p);
}
return NULL;
}
struct EmuTrap stub_XML_ParserCreate = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ParserCreatePPC };
static M68kXML_Parser stub_XML_ParserCreateNSPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
struct ExecIFace *IExec = ((struct ExpatBase *)Self->Data.LibBase)->IExec;
M68kXML_Parser p;
p = IExec->AllocVec(sizeof(*p), MEMF_SHARED|MEMF_CLEAR);
if (p) {
p->p = Self->XML_ParserCreateNS((const XML_Char *)regarray[8], (XML_Char)regarray[0]);
if (p->p) {
p->IExec = IExec;
Self->XML_SetUserData(p->p, p);
return p;
}
IExec->FreeVec(p);
}
return NULL;
}
struct EmuTrap stub_XML_ParserCreateNS = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ParserCreateNSPPC };
static M68kXML_Parser stub_XML_ParserCreate_MMPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
struct ExecIFace *IExec = ((struct ExpatBase *)Self->Data.LibBase)->IExec;
M68kXML_Parser p;
p = IExec->AllocVec(sizeof(*p), MEMF_SHARED|MEMF_CLEAR);
if (p) {
p->p = Self->XML_ParserCreate_MM((const XML_Char *)regarray[8],
(const XML_Memory_Handling_Suite *)regarray[9],
(const XML_Char *)regarray[10]);
if (p->p) {
p->IExec = IExec;
Self->XML_SetUserData(p->p, p);
return p;
}
IExec->FreeVec(p);
}
return NULL;
}
struct EmuTrap stub_XML_ParserCreate_MM = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ParserCreate_MMPPC };
static M68kXML_Parser stub_XML_ExternalEntityParserCreatePPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
struct ExecIFace *IExec = ((struct ExpatBase *)Self->Data.LibBase)->IExec;
M68kXML_Parser p;
p = IExec->AllocVec(sizeof(*p), MEMF_SHARED|MEMF_CLEAR);
if (p) {
p->p = Self->XML_ExternalEntityParserCreate((XML_Parser)regarray[8],
(const XML_Char *)regarray[9], (const XML_Char *)regarray[10]);
if (p->p) {
p->IExec = IExec;
Self->XML_SetUserData(p->p, p);
return p;
}
IExec->FreeVec(p);
}
return NULL;
}
struct EmuTrap stub_XML_ExternalEntityParserCreate = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ExternalEntityParserCreatePPC };
static void stub_XML_ParserFreePPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
struct ExecIFace *IExec = ((struct ExpatBase *)Self->Data.LibBase)->IExec;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
if (p) {
Self->XML_ParserFree(p->p);
IExec->FreeVec(p);
}
}
struct EmuTrap stub_XML_ParserFree = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ParserFreePPC };
static int stub_XML_ParsePPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
Self->XML_SetUserData(p->p, p);
return Self->XML_Parse(p->p, (const char *)regarray[9], (int)regarray[0], (int)regarray[1]);
}
struct EmuTrap stub_XML_Parse = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ParsePPC };
static int stub_XML_ParseBufferPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
return Self->XML_ParseBuffer(p->p, (int)regarray[0], (int)regarray[1]);
}
struct EmuTrap stub_XML_ParseBuffer = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ParseBufferPPC };
static void * stub_XML_GetBufferPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
return Self->XML_GetBuffer(p->p, (int)regarray[0]);
}
struct EmuTrap stub_XML_GetBuffer = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetBufferPPC };
static void stub_XML_SetStartElementHandlerPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->startelementhandler = (void *)regarray[9];
Self->XML_SetStartElementHandler(p->p, _68k_startelementhandler);
}
struct EmuTrap stub_XML_SetStartElementHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetStartElementHandlerPPC };
static void stub_XML_SetEndElementHandlerPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->endelementhandler = (void *)regarray[9];
Self->XML_SetEndElementHandler(p->p, _68k_endelementhandler);
}
struct EmuTrap stub_XML_SetEndElementHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetEndElementHandlerPPC };
static void stub_XML_SetElementHandlerPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->startelementhandler = (void *)regarray[9];
p->endelementhandler = (void *)regarray[10];
Self->XML_SetElementHandler(p->p, _68k_startelementhandler, _68k_endelementhandler);
}
struct EmuTrap stub_XML_SetElementHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetElementHandlerPPC };
static void stub_XML_SetCharacterDataHandlerPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->chardatahandler = (void *)regarray[9];
Self->XML_SetCharacterDataHandler(p->p, _68k_chardatahandler);
}
struct EmuTrap stub_XML_SetCharacterDataHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetCharacterDataHandlerPPC };
static void stub_XML_SetProcessingInstructionHandlerPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->procinsthandler = (void *)regarray[9];
Self->XML_SetProcessingInstructionHandler(p->p, _68k_procinsthandler);
}
struct EmuTrap stub_XML_SetProcessingInstructionHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetProcessingInstructionHandlerPPC };
static void stub_XML_SetCommentHandlerPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->commenthandler = (void *)regarray[9];
Self->XML_SetCommentHandler(p->p, _68k_commenthandler);
}
struct EmuTrap stub_XML_SetCommentHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetCommentHandlerPPC };
static void stub_XML_SetStartCdataSectionHandlerPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->startcdatahandler = (void *)regarray[9];
Self->XML_SetStartCdataSectionHandler(p->p, _68k_startcdatahandler);
}
struct EmuTrap stub_XML_SetStartCdataSectionHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetStartCdataSectionHandlerPPC };
static void stub_XML_SetEndCdataSectionHandlerPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->endcdatahandler = (void *)regarray[9];
Self->XML_SetEndCdataSectionHandler(p->p, _68k_endcdatahandler);
}
struct EmuTrap stub_XML_SetEndCdataSectionHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetEndCdataSectionHandlerPPC };
static void stub_XML_SetCdataSectionHandlerPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->startcdatahandler = (void *)regarray[9];
p->endcdatahandler = (void *)regarray[10];
Self->XML_SetCdataSectionHandler(p->p, _68k_startcdatahandler, _68k_endcdatahandler);
}
struct EmuTrap stub_XML_SetCdataSectionHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetCdataSectionHandlerPPC };
static void stub_XML_SetDefaultHandlerPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->defaulthandler = (void *)regarray[9];
Self->XML_SetDefaultHandler(p->p, _68k_defaulthandler);
}
struct EmuTrap stub_XML_SetDefaultHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetDefaultHandlerPPC };
static void stub_XML_SetDefaultHandlerExpandPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->defaulthandlerexp = (void *)regarray[9];
Self->XML_SetDefaultHandlerExpand(p->p, _68k_defaulthandlerexp);
}
struct EmuTrap stub_XML_SetDefaultHandlerExpand = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetDefaultHandlerExpandPPC };
static void stub_XML_SetExternalEntityRefHandlerPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->extentrefhandler = (void *)regarray[9];
Self->XML_SetExternalEntityRefHandler(p->p, _68k_extentrefhandler);
}
struct EmuTrap stub_XML_SetExternalEntityRefHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetExternalEntityRefHandlerPPC };
static void stub_XML_SetExternalEntityRefHandlerArgPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->extenthandlerarg = (void *)regarray[9];
}
struct EmuTrap stub_XML_SetExternalEntityRefHandlerArg = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetExternalEntityRefHandlerArgPPC };
static void stub_XML_SetUnknownEncodingHandlerPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->unknownenchandler = (void *)regarray[9];
p->enchandlerarg = (void *)regarray[10];
Self->XML_SetUnknownEncodingHandler(p->p, _68k_unknownenchandler, p);
}
struct EmuTrap stub_XML_SetUnknownEncodingHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetUnknownEncodingHandlerPPC };
static void stub_XML_SetStartNamespaceDeclHandlerPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->startnamespacehandler = (void *)regarray[9];
Self->XML_SetStartNamespaceDeclHandler(p->p, _68k_startnamespacehandler);
}
struct EmuTrap stub_XML_SetStartNamespaceDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetStartNamespaceDeclHandlerPPC };
static void stub_XML_SetEndNamespaceDeclHandlerPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->endnamespacehandler = (void *)regarray[9];
Self->XML_SetEndNamespaceDeclHandler(p->p, _68k_endnamespacehandler);
}
struct EmuTrap stub_XML_SetEndNamespaceDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetEndNamespaceDeclHandlerPPC };
static void stub_XML_SetNamespaceDeclHandlerPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->startnamespacehandler = (void *)regarray[9];
p->endnamespacehandler = (void *)regarray[10];
Self->XML_SetNamespaceDeclHandler(p->p, _68k_startnamespacehandler, _68k_endnamespacehandler);
}
struct EmuTrap stub_XML_SetNamespaceDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetNamespaceDeclHandlerPPC };
static void stub_XML_SetXmlDeclHandlerPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->xmldeclhandler = (void *)regarray[9];
Self->XML_SetXmlDeclHandler(p->p, _68k_xmldeclhandler);
}
struct EmuTrap stub_XML_SetXmlDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetXmlDeclHandlerPPC };
static void stub_XML_SetStartDoctypeDeclHandlerPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->startdoctypehandler = (void *)regarray[9];
Self->XML_SetStartDoctypeDeclHandler(p->p, _68k_startdoctypehandler);
}
struct EmuTrap stub_XML_SetStartDoctypeDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetStartDoctypeDeclHandlerPPC };
static void stub_XML_SetEndDoctypeDeclHandlerPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->enddoctypehandler = (void *)regarray[9];
Self->XML_SetEndDoctypeDeclHandler(p->p, _68k_enddoctypehandler);
}
struct EmuTrap stub_XML_SetEndDoctypeDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetEndDoctypeDeclHandlerPPC };
static void stub_XML_SetDoctypeDeclHandlerPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->startdoctypehandler = (void *)regarray[9];
p->enddoctypehandler = (void *)regarray[10];
Self->XML_SetDoctypeDeclHandler(p->p, _68k_startdoctypehandler, _68k_enddoctypehandler);
}
struct EmuTrap stub_XML_SetDoctypeDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetDoctypeDeclHandlerPPC };
static void stub_XML_SetElementDeclHandlerPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->elementdeclhandler = (void *)regarray[9];
Self->XML_SetElementDeclHandler(p->p, _68k_elementdeclhandler);
}
struct EmuTrap stub_XML_SetElementDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetElementDeclHandlerPPC };
static void stub_XML_SetAttlistDeclHandlerPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->attlistdeclhandler = (void *)regarray[9];
Self->XML_SetAttlistDeclHandler(p->p, _68k_attlistdeclhandler);
}
struct EmuTrap stub_XML_SetAttlistDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetAttlistDeclHandlerPPC };
static void stub_XML_SetEntityDeclHandlerPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->entitydeclhandler = (void *)regarray[9];
Self->XML_SetEntityDeclHandler(p->p, _68k_entitydeclhandler);
}
struct EmuTrap stub_XML_SetEntityDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetEntityDeclHandlerPPC };
static void stub_XML_SetUnparsedEntityDeclHandlerPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->unparseddeclhandler = (void *)regarray[9];
Self->XML_SetUnparsedEntityDeclHandler(p->p, _68k_unparseddeclhandler);
}
struct EmuTrap stub_XML_SetUnparsedEntityDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetUnparsedEntityDeclHandlerPPC };
static void stub_XML_SetNotationDeclHandlerPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->notationdeclhandler = (void *)regarray[9];
Self->XML_SetNotationDeclHandler(p->p, _68k_notationdeclhandler);
}
struct EmuTrap stub_XML_SetNotationDeclHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetNotationDeclHandlerPPC };
static void stub_XML_SetNotStandaloneHandlerPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->notstandalonehandler = (void *)regarray[9];
Self->XML_SetNotStandaloneHandler(p->p, _68k_notstandalonehandler);
}
struct EmuTrap stub_XML_SetNotStandaloneHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetNotStandaloneHandlerPPC };
static int stub_XML_GetErrorCodePPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
return Self->XML_GetErrorCode(p->p);
}
struct EmuTrap stub_XML_GetErrorCode = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetErrorCodePPC };
static const XML_LChar * stub_XML_ErrorStringPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
return Self->XML_ErrorString((int)regarray[0]);
}
struct EmuTrap stub_XML_ErrorString = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ErrorStringPPC };
static long stub_XML_GetCurrentByteIndexPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
return Self->XML_GetCurrentByteIndex(p->p);
}
struct EmuTrap stub_XML_GetCurrentByteIndex = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetCurrentByteIndexPPC };
static int stub_XML_GetCurrentLineNumberPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
return Self->XML_GetCurrentLineNumber(p->p);
}
struct EmuTrap stub_XML_GetCurrentLineNumber = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetCurrentLineNumberPPC };
static int stub_XML_GetCurrentColumnNumberPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
return Self->XML_GetCurrentColumnNumber(p->p);
}
struct EmuTrap stub_XML_GetCurrentColumnNumber = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetCurrentColumnNumberPPC };
static int stub_XML_GetCurrentByteCountPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
return Self->XML_GetCurrentByteCount(p->p);
}
struct EmuTrap stub_XML_GetCurrentByteCount = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetCurrentByteCountPPC };
static const char * stub_XML_GetInputContextPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
return Self->XML_GetInputContext(p->p, (int *)regarray[9], (int *)regarray[10]);
}
struct EmuTrap stub_XML_GetInputContext = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetInputContextPPC };
static void stub_XML_SetUserDataPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->handlerarg = (void *)regarray[9];
}
struct EmuTrap stub_XML_SetUserData = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetUserDataPPC };
static void stub_XML_DefaultCurrentPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
Self->XML_DefaultCurrent(p->p);
}
struct EmuTrap stub_XML_DefaultCurrent = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_DefaultCurrentPPC };
static void stub_XML_UseParserAsHandlerArgPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->handlerarg = p;
}
struct EmuTrap stub_XML_UseParserAsHandlerArg = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_UseParserAsHandlerArgPPC };
static int stub_XML_SetBasePPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
return Self->XML_SetBase(p->p, (const XML_Char *)regarray[9]);
}
struct EmuTrap stub_XML_SetBase = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetBasePPC };
static const XML_Char * stub_XML_GetBasePPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
return Self->XML_GetBase(p->p);
}
struct EmuTrap stub_XML_GetBase = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetBasePPC };
static int stub_XML_GetSpecifiedAttributeCountPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
return Self->XML_GetSpecifiedAttributeCount(p->p);
}
struct EmuTrap stub_XML_GetSpecifiedAttributeCount = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetSpecifiedAttributeCountPPC };
static int stub_XML_GetIdAttributeIndexPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
return Self->XML_GetIdAttributeIndex(p->p);
}
struct EmuTrap stub_XML_GetIdAttributeIndex = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetIdAttributeIndexPPC };
static int stub_XML_SetEncodingPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
return Self->XML_SetEncoding(p->p, (const XML_Char *)regarray[9]);
}
struct EmuTrap stub_XML_SetEncoding = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetEncodingPPC };
static int stub_XML_SetParamEntityParsingPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
return Self->XML_SetParamEntityParsing(p->p, (enum XML_ParamEntityParsing)regarray[9]);
}
struct EmuTrap stub_XML_SetParamEntityParsing = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetParamEntityParsingPPC };
static void stub_XML_SetReturnNSTripletPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
Self->XML_SetReturnNSTriplet(p->p, (int)regarray[0]);
}
struct EmuTrap stub_XML_SetReturnNSTriplet = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetReturnNSTripletPPC };
static const XML_LChar * stub_XML_ExpatVersionPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
return Self->XML_ExpatVersion();
}
struct EmuTrap stub_XML_ExpatVersion = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ExpatVersionPPC };
static XML_Expat_Version stub_XML_ExpatVersionInfoPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
return Self->XML_ExpatVersionInfo();
}
struct EmuTrap stub_XML_ExpatVersionInfo = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ExpatVersionInfoPPC };
static int stub_XML_ParserResetPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
return Self->XML_ParserReset(p->p, (const XML_Char *)regarray[9]);
}
struct EmuTrap stub_XML_ParserReset = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ParserResetPPC };
static void stub_XML_SetSkippedEntityHandlerPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
p->skippedentityhandler = (void *)regarray[9];
Self->XML_SetSkippedEntityHandler(p->p, _68k_skippedentityhandler);
}
struct EmuTrap stub_XML_SetSkippedEntityHandler = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_SetSkippedEntityHandlerPPC };
static int stub_XML_UseForeignDTDPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
return Self->XML_UseForeignDTD(p->p, (XML_Bool)regarray[0]);
}
struct EmuTrap stub_XML_UseForeignDTD = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_UseForeignDTDPPC };
static const XML_Feature * stub_XML_GetFeatureListPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
return Self->XML_GetFeatureList();
}
struct EmuTrap stub_XML_GetFeatureList = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetFeatureListPPC };
static int stub_XML_StopParserPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
return Self->XML_StopParser(p->p, (XML_Bool)regarray[0]);
}
struct EmuTrap stub_XML_StopParser = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_StopParserPPC };
static int stub_XML_ResumeParserPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
return Self->XML_ResumeParser(p->p);
}
struct EmuTrap stub_XML_ResumeParser = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_ResumeParserPPC };
static void stub_XML_GetParsingStatusPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
Self->XML_GetParsingStatus(p->p, (XML_ParsingStatus *)regarray[9]);
}
struct EmuTrap stub_XML_GetParsingStatus = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_GetParsingStatusPPC };
static void stub_XML_FreeContentModelPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
Self->XML_FreeContentModel(p->p, (XML_Content *)regarray[9]);
}
struct EmuTrap stub_XML_FreeContentModel = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_FreeContentModelPPC };
static void *stub_XML_MemMallocPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
return Self->XML_MemMalloc(p->p, (size_t)regarray[0]);
}
struct EmuTrap stub_XML_MemMalloc = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_MemMallocPPC };
static void *stub_XML_MemReallocPPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
return Self->XML_MemRealloc(p->p, (void *)regarray[9], (size_t)regarray[0]);
}
struct EmuTrap stub_XML_MemRealloc = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_MemReallocPPC };
static void stub_XML_MemFreePPC(ULONG *regarray)
{
struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
struct ExpatIFace *Self = (struct ExpatIFace *) ExtLib->MainIFace;
M68kXML_Parser p = (M68kXML_Parser)regarray[8];
Self->XML_MemFree(p->p, (void *)regarray[9]);
}
struct EmuTrap stub_XML_MemFree = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_XML_MemFreePPC };
ULONG VecTable68K[] = {
(ULONG)&stub_Open,
(ULONG)&stub_Close,
(ULONG)&stub_Expunge,
(ULONG)&stub_Reserved,
(ULONG)&stub_XML_ParserCreate,
(ULONG)&stub_XML_ParserCreateNS,
(ULONG)&stub_XML_ParserCreate_MM,
(ULONG)&stub_XML_ExternalEntityParserCreate,
(ULONG)&stub_XML_ParserFree,
(ULONG)&stub_XML_Parse,
(ULONG)&stub_XML_ParseBuffer,
(ULONG)&stub_XML_GetBuffer,
(ULONG)&stub_XML_SetStartElementHandler,
(ULONG)&stub_XML_SetEndElementHandler,
(ULONG)&stub_XML_SetElementHandler,
(ULONG)&stub_XML_SetCharacterDataHandler,
(ULONG)&stub_XML_SetProcessingInstructionHandler,
(ULONG)&stub_XML_SetCommentHandler,
(ULONG)&stub_XML_SetStartCdataSectionHandler,
(ULONG)&stub_XML_SetEndCdataSectionHandler,
(ULONG)&stub_XML_SetCdataSectionHandler,
(ULONG)&stub_XML_SetDefaultHandler,
(ULONG)&stub_XML_SetDefaultHandlerExpand,
(ULONG)&stub_XML_SetExternalEntityRefHandler,
(ULONG)&stub_XML_SetExternalEntityRefHandlerArg,
(ULONG)&stub_XML_SetUnknownEncodingHandler,
(ULONG)&stub_XML_SetStartNamespaceDeclHandler,
(ULONG)&stub_XML_SetEndNamespaceDeclHandler,
(ULONG)&stub_XML_SetNamespaceDeclHandler,
(ULONG)&stub_XML_SetXmlDeclHandler,
(ULONG)&stub_XML_SetStartDoctypeDeclHandler,
(ULONG)&stub_XML_SetEndDoctypeDeclHandler,
(ULONG)&stub_XML_SetDoctypeDeclHandler,
(ULONG)&stub_XML_SetElementDeclHandler,
(ULONG)&stub_XML_SetAttlistDeclHandler,
(ULONG)&stub_XML_SetEntityDeclHandler,
(ULONG)&stub_XML_SetUnparsedEntityDeclHandler,
(ULONG)&stub_XML_SetNotationDeclHandler,
(ULONG)&stub_XML_SetNotStandaloneHandler,
(ULONG)&stub_XML_GetErrorCode,
(ULONG)&stub_XML_ErrorString,
(ULONG)&stub_XML_GetCurrentByteIndex,
(ULONG)&stub_XML_GetCurrentLineNumber,
(ULONG)&stub_XML_GetCurrentColumnNumber,
(ULONG)&stub_XML_GetCurrentByteCount,
(ULONG)&stub_XML_GetInputContext,
(ULONG)&stub_XML_SetUserData,
(ULONG)&stub_XML_DefaultCurrent,
(ULONG)&stub_XML_UseParserAsHandlerArg,
(ULONG)&stub_XML_SetBase,
(ULONG)&stub_XML_GetBase,
(ULONG)&stub_XML_GetSpecifiedAttributeCount,
(ULONG)&stub_XML_GetIdAttributeIndex,
(ULONG)&stub_XML_SetEncoding,
(ULONG)&stub_XML_SetParamEntityParsing,
(ULONG)&stub_XML_SetReturnNSTriplet,
(ULONG)&stub_XML_ExpatVersion,
(ULONG)&stub_XML_ExpatVersionInfo,
(ULONG)&stub_XML_ParserReset,
(ULONG)&stub_XML_SetSkippedEntityHandler,
(ULONG)&stub_XML_UseForeignDTD,
(ULONG)&stub_XML_GetFeatureList,
(ULONG)&stub_XML_StopParser,
(ULONG)&stub_XML_ResumeParser,
(ULONG)&stub_XML_GetParsingStatus,
(ULONG)&stub_XML_FreeContentModel,
(ULONG)&stub_XML_MemMalloc,
(ULONG)&stub_XML_MemRealloc,
(ULONG)&stub_XML_MemFree,
(ULONG)-1
};

94
3party/expat/amiga/expat_68k.h Executable file
View file

@ -0,0 +1,94 @@
/*
** Copyright (c) 2001-2009 Expat maintainers.
**
** Permission is hereby granted, free of charge, to any person obtaining
** a copy of this software and associated documentation files (the
** "Software"), to deal in the Software without restriction, including
** without limitation the rights to use, copy, modify, merge, publish,
** distribute, sublicense, and/or sell copies of the Software, and to
** permit persons to whom the Software is furnished to do so, subject to
** the following conditions:
**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Software.
**
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef EXPAT_68K_H
#define EXPAT_68K_H
#ifndef LIBRARIES_EXPAT_H
#include <libraries/expat.h>
#endif
typedef struct M68kXML_ParserStruct {
XML_Parser p;
struct ExecIFace *IExec;
void *handlerarg;
void *extenthandlerarg;
void *enchandlerarg;
void *startelementhandler;
void *endelementhandler;
void *chardatahandler;
void *procinsthandler;
void *commenthandler;
void *startcdatahandler;
void *endcdatahandler;
void *defaulthandler;
void *defaulthandlerexp;
void *extentrefhandler;
void *unknownenchandler;
void *startnamespacehandler;
void *endnamespacehandler;
void *xmldeclhandler;
void *startdoctypehandler;
void *enddoctypehandler;
void *elementdeclhandler;
void *attlistdeclhandler;
void *entitydeclhandler;
void *unparseddeclhandler;
void *notationdeclhandler;
void *notstandalonehandler;
void *skippedentityhandler;
} *M68kXML_Parser;
/* expat_68k_handler_stubs.c */
void _68k_startelementhandler(void *userdata, const char *name, const char **attrs);
void _68k_endelementhandler(void *userdata, const char *name);
void _68k_chardatahandler(void *userdata, const char *s, int len);
void _68k_procinsthandler(void *userdata, const char *target, const char *data);
void _68k_commenthandler(void *userdata, const char *data);
void _68k_startcdatahandler(void *userdata);
void _68k_endcdatahandler(void *userdata);
void _68k_defaulthandler(void *userdata, const char *s, int len);
void _68k_defaulthandlerexp(void *userdata, const char *s, int len);
int _68k_extentrefhandler(XML_Parser parser, const char *context, const char *base,
const char *sysid, const char *pubid);
int _68k_unknownenchandler(void *enchandlerdata, const char *name, XML_Encoding *info);
void _68k_startnamespacehandler(void *userdata, const char *prefix, const char *uri);
void _68k_endnamespacehandler(void *userdata, const char *prefix);
void _68k_xmldeclhandler(void *userdata, const char *version, const char *encoding, int standalone);
void _68k_startdoctypehandler(void *userdata, const char *doctypename,
const char *sysid, const char *pubid, int has_internal_subset);
void _68k_enddoctypehandler(void *userdata);
void _68k_elementdeclhandler(void *userdata, const char *name, XML_Content *model);
void _68k_attlistdeclhandler(void *userdata, const char *elname, const char *attname,
const char *att_type, const char *dflt, int isrequired);
void _68k_entitydeclhandler(void *userdata, const char *entityname, int is_param_entity,
const char *value, int value_length, const char *base, const char *sysid, const char *pubid,
const char *notationname);
void _68k_unparseddeclhandler(void *userdata, const char *entityname, const char *base,
const char *sysid, const char *pubid, const char *notationname);
void _68k_notationdeclhandler(void *userdata, const char *notationname, const char *base,
const char *sysid, const char *pubid);
int _68k_notstandalonehandler(void *userdata);
void _68k_skippedentityhandler(void *userdata, const char *entityname, int is_param_entity);
#endif

View file

@ -0,0 +1,185 @@
/*
** Copyright (c) 2001-2009 Expat maintainers.
**
** Permission is hereby granted, free of charge, to any person obtaining
** a copy of this software and associated documentation files (the
** "Software"), to deal in the Software without restriction, including
** without limitation the rights to use, copy, modify, merge, publish,
** distribute, sublicense, and/or sell copies of the Software, and to
** permit persons to whom the Software is furnished to do so, subject to
** the following conditions:
**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Software.
**
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifdef __USE_INLINE__
#undef __USE_INLINE__
#endif
#include "expat_68k.h"
#include <exec/emulation.h>
#include <proto/exec.h>
#include <stdarg.h>
static uint32 VARARGS68K call_68k_code (struct ExecIFace *IExec, void *code, int num_args, ...) {
uint32 res = 0;
va_list vargs;
va_startlinear(vargs, num_args);
uint32 *args = va_getlinearva(vargs, uint32 *);
uint8 *stack = IExec->AllocVec(4096, MEMF_SHARED);
if (stack) {
uint32 *sp = (uint32 *)(stack + 4096);
args += num_args;
while (num_args--) {
*--sp = *--args;
}
res = IExec->EmulateTags(code, ET_StackPtr, sp, TAG_END);
IExec->FreeVec(stack);
}
va_end(vargs);
return res;
}
void _68k_startelementhandler(void *userdata, const char *name, const char **attrs) {
M68kXML_Parser p = userdata;
call_68k_code(p->IExec, p->startelementhandler, 3, p->handlerarg, name, attrs);
}
void _68k_endelementhandler(void *userdata, const char *name) {
M68kXML_Parser p = userdata;
call_68k_code(p->IExec, p->endelementhandler, 2, p->handlerarg, name);
}
void _68k_chardatahandler(void *userdata, const char *s, int len) {
M68kXML_Parser p = userdata;
call_68k_code(p->IExec, p->chardatahandler, 3, p->handlerarg, s, len);
}
void _68k_procinsthandler(void *userdata, const char *target, const char *data) {
M68kXML_Parser p = userdata;
call_68k_code(p->IExec, p->procinsthandler, 3, p->handlerarg, target, data);
}
void _68k_commenthandler(void *userdata, const char *data) {
M68kXML_Parser p = userdata;
call_68k_code(p->IExec, p->commenthandler, 2, p->handlerarg, data);
}
void _68k_startcdatahandler(void *userdata) {
M68kXML_Parser p = userdata;
call_68k_code(p->IExec, p->startcdatahandler, 1, p->handlerarg);
}
void _68k_endcdatahandler(void *userdata) {
M68kXML_Parser p = userdata;
call_68k_code(p->IExec, p->endcdatahandler, 1, p->handlerarg);
}
void _68k_defaulthandler(void *userdata, const char *s, int len) {
M68kXML_Parser p = userdata;
call_68k_code(p->IExec, p->defaulthandler, 3, p->handlerarg, s, len);
}
void _68k_defaulthandlerexp(void *userdata, const char *s, int len) {
M68kXML_Parser p = userdata;
call_68k_code(p->IExec, p->defaulthandlerexp, 3, p->handlerarg, s, len);
}
int _68k_extentrefhandler(XML_Parser parser, const char *context, const char *base,
const char *sysid, const char *pubid)
{
M68kXML_Parser p = XML_GetUserData(parser);
void *arg = p->extenthandlerarg;
return (int)call_68k_code(p->IExec, p->extentrefhandler, 5, arg ? arg : p, context, base, sysid, pubid);
}
int _68k_unknownenchandler(void *enchandlerdata, const char *name, XML_Encoding *info) {
M68kXML_Parser p = enchandlerdata;
return (int)call_68k_code(p->IExec, p->unknownenchandler, 3, p->enchandlerarg, name, info);
}
void _68k_startnamespacehandler(void *userdata, const char *prefix, const char *uri) {
M68kXML_Parser p = userdata;
call_68k_code(p->IExec, p->startnamespacehandler, 3, p->handlerarg, prefix, uri);
}
void _68k_endnamespacehandler(void *userdata, const char *prefix) {
M68kXML_Parser p = userdata;
call_68k_code(p->IExec, p->endnamespacehandler, 2, p->handlerarg, prefix);
}
void _68k_xmldeclhandler(void *userdata, const char *version, const char *encoding, int standalone) {
M68kXML_Parser p = userdata;
call_68k_code(p->IExec, p->xmldeclhandler, 4, p->handlerarg, version, encoding, standalone);
}
void _68k_startdoctypehandler(void *userdata, const char *doctypename,
const char *sysid, const char *pubid, int has_internal_subset)
{
M68kXML_Parser p = userdata;
call_68k_code(p->IExec, p->startdoctypehandler, 5, p->handlerarg, doctypename, sysid, pubid, has_internal_subset);
}
void _68k_enddoctypehandler(void *userdata) {
M68kXML_Parser p = userdata;
call_68k_code(p->IExec, p->enddoctypehandler, 1, p->handlerarg);
}
void _68k_elementdeclhandler(void *userdata, const char *name, XML_Content *model) {
M68kXML_Parser p = userdata;
call_68k_code(p->IExec, p->elementdeclhandler, 3, p->handlerarg, name, model);
}
void _68k_attlistdeclhandler(void *userdata, const char *elname, const char *attname,
const char *att_type, const char *dflt, int isrequired)
{
M68kXML_Parser p = userdata;
call_68k_code(p->IExec, p->attlistdeclhandler, 6, p->handlerarg, elname, attname, att_type, dflt, isrequired);
}
void _68k_entitydeclhandler(void *userdata, const char *entityname, int is_param_entity,
const char *value, int value_length, const char *base, const char *sysid, const char *pubid,
const char *notationname)
{
M68kXML_Parser p = userdata;
call_68k_code(p->IExec, p->entitydeclhandler, 9, p->handlerarg, entityname, is_param_entity,
value, value_length, base, sysid, pubid, notationname);
}
void _68k_unparseddeclhandler(void *userdata, const char *entityname, const char *base,
const char *sysid, const char *pubid, const char *notationname)
{
M68kXML_Parser p = userdata;
call_68k_code(p->IExec, p->unparseddeclhandler, 6, p->handlerarg, entityname, base, sysid, pubid, notationname);
}
void _68k_notationdeclhandler(void *userdata, const char *notationname, const char *base,
const char *sysid, const char *pubid)
{
M68kXML_Parser p = userdata;
call_68k_code(p->IExec, p->notationdeclhandler, 5, p->handlerarg, notationname, base, sysid, pubid);
}
int _68k_notstandalonehandler(void *userdata) {
M68kXML_Parser p = userdata;
return (int)call_68k_code(p->IExec, p->notstandalonehandler, 1, p->handlerarg);
}
void _68k_skippedentityhandler(void *userdata, const char *entityname, int is_param_entity) {
M68kXML_Parser p = userdata;
call_68k_code(p->IExec, p->skippedentityhandler, 3, p->handlerarg, entityname, is_param_entity);
}

View file

@ -0,0 +1,40 @@
/*
** Copyright (c) 2001-2009 Expat maintainers.
**
** Permission is hereby granted, free of charge, to any person obtaining
** a copy of this software and associated documentation files (the
** "Software"), to deal in the Software without restriction, including
** without limitation the rights to use, copy, modify, merge, publish,
** distribute, sublicense, and/or sell copies of the Software, and to
** permit persons to whom the Software is furnished to do so, subject to
** the following conditions:
**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Software.
**
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef EXPAT_BASE_H
#define EXPAT_BASE_H
#include <exec/libraries.h>
#include <dos/dos.h>
#include <interfaces/exec.h>
#include <interfaces/utility.h>
struct ExpatBase {
struct Library libNode;
uint16 pad;
BPTR SegList;
struct ExecIFace *IExec;
};
#endif

116
3party/expat/amiga/expat_lib.c Normal file → Executable file
View file

@ -1,5 +1,5 @@
/*
** Copyright (c) 2001-2007 Expat maintainers.
** Copyright (c) 2001-2009 Expat maintainers.
**
** Permission is hereby granted, free of charge, to any person obtaining
** a copy of this software and associated documentation files (the
@ -8,10 +8,10 @@
** distribute, sublicense, and/or sell copies of the Software, and to
** permit persons to whom the Software is furnished to do so, subject to
** the following conditions:
**
**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Software.
**
**
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@ -21,24 +21,30 @@
** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifdef __USE_INLINE__
#undef __USE_INLINE__
#endif
#define __NOLIBBASE__
#define __NOGLOBALIFACE__
#include <dos/dos.h>
#include <proto/exec.h>
#include "expat_base.h"
#define LIBNAME "expat.library"
#define LIBPRI 0
#define VERSION 4
#define REVISION 2
#define VSTRING "expat.library 4.2 (2.6.2007)" /* dd.mm.yyyy */
#define VERSION 53
#define REVISION 1
#define VSTRING "expat.library 53.1 (7.8.2009)" /* dd.mm.yyyy */
static const char* __attribute__((used)) verstag = "\0$VER: " VSTRING;
struct ExpatBase {
struct Library libNode;
uint16 pad;
BPTR SegList;
};
struct Interface *INewlib = 0;
struct ExpatBase * libInit(struct ExpatBase *libBase, BPTR seglist, struct ExecIFace *ISys);
@ -47,6 +53,8 @@ uint32 libRelease (struct LibraryManagerInterface *Self);
struct ExpatBase *libOpen (struct LibraryManagerInterface *Self, uint32 version);
BPTR libClose (struct LibraryManagerInterface *Self);
BPTR libExpunge (struct LibraryManagerInterface *Self);
struct Interface *openInterface(struct ExecIFace *IExec, CONST_STRPTR libName, uint32 libVer);
void closeInterface(struct ExecIFace *IExec, struct Interface *iface);
static APTR lib_manager_vectors[] = {
@ -87,10 +95,13 @@ static APTR libInterfaces[] = {
};
extern void *VecTable68K[];
static struct TagItem libCreateTags[] = {
{ CLT_DataSize, sizeof(struct ExpatBase) },
{ CLT_InitFunc, (uint32)libInit },
{ CLT_Interfaces, (uint32)libInterfaces },
{ CLT_Vector68K, (uint32)VecTable68K },
{ TAG_END, 0 }
};
@ -109,20 +120,13 @@ static struct Resident __attribute__((used)) lib_res = {
};
struct Library *DOSLib = 0;
struct Library *UtilityBase = 0;
struct ExecIFace *IExec = 0;
struct DOSIFace *IDOS = 0;
struct UtilityIFace *IUtility = 0;
void _start()
int32 _start()
{
return RETURN_FAIL;
}
struct ExpatBase *libInit(struct ExpatBase *libBase, BPTR seglist, struct ExecIFace *ISys)
struct ExpatBase *libInit(struct ExpatBase *libBase, BPTR seglist, struct ExecIFace *iexec)
{
libBase->libNode.lib_Node.ln_Type = NT_LIBRARY;
libBase->libNode.lib_Node.ln_Pri = LIBPRI;
@ -131,30 +135,21 @@ struct ExpatBase *libInit(struct ExpatBase *libBase, BPTR seglist, struct ExecIF
libBase->libNode.lib_Version = VERSION;
libBase->libNode.lib_Revision = REVISION;
libBase->libNode.lib_IdString = VSTRING;
libBase->SegList = seglist;
IExec = ISys;
libBase->IExec = iexec;
INewlib = openInterface(iexec, "newlib.library", 0);
DOSLib = OpenLibrary("dos.library", 51);
if ( DOSLib != 0 ) {
IDOS = (struct DOSIFace *)GetInterface(DOSLib, "main", 1, NULL);
if ( IDOS != 0 ) {
UtilityBase = OpenLibrary("utility.library", 51);
if ( UtilityBase != 0 ) {
IUtility = (struct UtilityIFace*)GetInterface(UtilityBase, "main", 1, NULL);
if ( IUtility != 0 ) {
return libBase;
}
CloseLibrary(UtilityBase);
}
DropInterface((struct Interface *)IDOS);
}
CloseLibrary(DOSLib);
if ( INewlib != 0 ) {
return libBase;
}
closeInterface(iexec, INewlib);
INewlib = 0;
iexec->DeleteLibrary(&libBase->libNode);
return NULL;
}
@ -201,29 +196,25 @@ BPTR libClose( struct LibraryManagerInterface *Self )
return (BPTR)Self->LibExpunge();
}
else {
return 0;
return ZERO;
}
}
BPTR libExpunge( struct LibraryManagerInterface *Self )
{
struct ExpatBase *libBase;
BPTR result = 0;
libBase = (struct ExpatBase *)Self->Data.LibBase;
struct ExpatBase *libBase = (struct ExpatBase *)Self->Data.LibBase;
BPTR result = ZERO;
if (libBase->libNode.lib_OpenCnt == 0) {
Remove(&libBase->libNode.lib_Node);
libBase->IExec->Remove(&libBase->libNode.lib_Node);
result = libBase->SegList;
DropInterface((struct Interface *)IUtility);
CloseLibrary(UtilityBase);
DropInterface((struct Interface *)IDOS);
CloseLibrary(DOSLib);
closeInterface(libBase->IExec, INewlib);
INewlib = 0;
DeleteLibrary(&libBase->libNode);
libBase->IExec->DeleteLibrary(&libBase->libNode);
}
else {
libBase->libNode.lib_Flags |= LIBF_DELEXP;
@ -231,3 +222,26 @@ BPTR libExpunge( struct LibraryManagerInterface *Self )
return result;
}
struct Interface *openInterface(struct ExecIFace *IExec, CONST_STRPTR libName, uint32 libVer)
{
struct Library *base = IExec->OpenLibrary(libName, libVer);
struct Interface *iface = IExec->GetInterface(base, "main", 1, 0);
if (iface == 0) {
IExec->CloseLibrary(base);
}
return iface;
}
void closeInterface(struct ExecIFace *IExec, struct Interface *iface)
{
if (iface != 0)
{
struct Library *base = iface->Data.LibBase;
IExec->DropInterface(iface);
IExec->CloseLibrary(base);
}
}

View file

@ -1,5 +1,5 @@
/*
** Copyright (c) 2001-2007 Expat maintainers.
** Copyright (c) 2001-2009 Expat maintainers.
**
** Permission is hereby granted, free of charge, to any person obtaining
** a copy of this software and associated documentation files (the
@ -8,10 +8,10 @@
** distribute, sublicense, and/or sell copies of the Software, and to
** permit persons to whom the Software is furnished to do so, subject to
** the following conditions:
**
**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Software.
**
**
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

29
3party/expat/amiga/launch.c Normal file → Executable file
View file

@ -1,5 +1,5 @@
/*
** Copyright (c) 2001-2007 Expat maintainers.
** Copyright (c) 2001-2009 Expat maintainers.
**
** Permission is hereby granted, free of charge, to any person obtaining
** a copy of this software and associated documentation files (the
@ -8,10 +8,10 @@
** distribute, sublicense, and/or sell copies of the Software, and to
** permit persons to whom the Software is furnished to do so, subject to
** the following conditions:
**
**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Software.
**
**
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@ -21,6 +21,10 @@
** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifdef __USE_INLINE__
#undef __USE_INLINE__
#endif
#include <stdlib.h>
#include <proto/exec.h>
@ -34,23 +38,20 @@ void cleanup() __attribute__((destructor));
void setup()
{
ExpatBase = OpenLibrary("expat.library", 4);
IExpat = (struct ExpatIFace*)GetInterface(ExpatBase, "main", 1, NULL);
ExpatBase = IExec->OpenLibrary("expat.library", 53);
IExpat = (struct ExpatIFace*)IExec->GetInterface(ExpatBase, "main", 1, NULL);
if ( IExpat == 0 ) {
DebugPrintF("Can't open expat.library\n");
IExec->DebugPrintF("Can't open expat.library\n");
}
}
void cleanup()
{
if ( IExpat != 0 ) {
DropInterface((struct Interface*)IExpat);
IExpat = 0;
}
IExec->DropInterface((struct Interface*)IExpat);
IExpat = 0;
if ( ExpatBase != 0 ) {
CloseLibrary(ExpatBase);
ExpatBase = 0;
}
IExec->CloseLibrary(ExpatBase);
ExpatBase = 0;
}

View file

@ -1,109 +0,0 @@
/*
** Copyright (c) 2001-2007 Expat maintainers.
**
** Permission is hereby granted, free of charge, to any person obtaining
** a copy of this software and associated documentation files (the
** "Software"), to deal in the Software without restriction, including
** without limitation the rights to use, copy, modify, merge, publish,
** distribute, sublicense, and/or sell copies of the Software, and to
** permit persons to whom the Software is furnished to do so, subject to
** the following conditions:
**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Software.
**
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <stdlib.h>
#include <exec/memory.h>
#include <proto/exec.h>
#include <proto/utility.h>
void * malloc (size_t len)
{
uint32 size = sizeof(uint32) + len;
uint32 *mem = AllocMem(size, MEMF_SHARED);
if ( mem != 0 ) {
*mem = size;
++mem;
}
return mem;
}
void * realloc (void * mem, size_t len2)
{
if ( mem == 0 ) {
return malloc(len2);
}
if ( len2 == 0 ) {
free(mem);
return 0;
}
void * new_mem = malloc(len2);
if ( new_mem == 0 ) {
return 0;
}
uint32 mem_size = *(((uint32*)mem) - 1);
CopyMem(mem, new_mem, mem_size);
free(mem);
return new_mem;
}
void free (void * mem)
{
if ( mem != 0 ) {
uint32 * size_ptr = ((uint32*)mem) - 1;
FreeMem(size_ptr, *size_ptr);
}
}
int memcmp (const void * a, const void * b, size_t len)
{
size_t i;
int diff;
for ( i = 0; i < len; ++i ) {
diff = *((uint8 *)a++) - *((uint8 *)b++);
if ( diff ) {
return diff;
}
}
return 0;
}
void * memcpy (void * t, const void * a, size_t len)
{
CopyMem((APTR)a, t, len);
return t;
}
void * memmove (void * t1, const void * t2, size_t len)
{
MoveMem((APTR)t2, t1, len);
return t1;
}
void * memset (void * t, int c, size_t len)
{
return SetMem(t, c, len);
}

29103
3party/expat/configure vendored Normal file → Executable file

File diff suppressed because it is too large Load diff

View file

@ -10,8 +10,8 @@ dnl under the terms of the License (based on the MIT/X license) contained
dnl in the file COPYING that comes with this distribution.
dnl
dnl Ensure that Expat is configured with autoconf 2.52 or newer
AC_PREREQ(2.52)
dnl Ensure that Expat is configured with autoconf 2.58 or newer
AC_PREREQ(2.58)
dnl Get the version number of Expat, using m4's esyscmd() command to run
dnl the command at m4-generation time. This allows us to create an m4
@ -25,12 +25,13 @@ 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.0.x]))
[2.1.x]))
AC_INIT(expat, expat_version, expat-bugs@libexpat.org)
undefine([expat_version])
AC_CONFIG_SRCDIR(Makefile.in)
AC_CONFIG_AUX_DIR(conftools)
AC_CONFIG_MACRO_DIR([m4])
dnl
@ -44,13 +45,12 @@ dnl
dnl If the API changes incompatibly set LIBAGE back to 0
dnl
LIBCURRENT=6
LIBREVISION=2
LIBAGE=5
LIBCURRENT=7
LIBREVISION=0
LIBAGE=6
AC_CONFIG_HEADER(expat_config.h)
sinclude(conftools/libtool.m4)
sinclude(conftools/ac_c_bigendian_cross.m4)
AC_LIBTOOL_WIN32_DLL
@ -62,6 +62,7 @@ AC_SUBST(LIBAGE)
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
if test "$GCC" = yes ; then
@ -144,7 +145,7 @@ AC_DEFINE([XML_DTD], 1,
AC_DEFINE([XML_CONTEXT_BYTES], 1024,
[Define to specify how much context to retain around the current parse point.])
AC_CONFIG_FILES(Makefile)
AC_CONFIG_FILES([Makefile expat.pc])
AC_OUTPUT
abs_srcdir="`cd $srcdir && pwd`"

0
3party/expat/conftools/PrintPath Normal file → Executable file
View file

491
3party/expat/conftools/config.guess vendored Normal file → Executable file
View file

@ -1,10 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc.
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011 Free Software Foundation, Inc.
timestamp='2006-07-02'
timestamp='2011-05-11'
# 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
@ -27,16 +27,16 @@ timestamp='2006-07-02'
# the same distribution terms that you use for the rest of that program.
# Originally written by Per Bothner <per@bothner.com>.
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
# Originally written by Per Bothner. Please send patches (context
# diff format) to <config-patches@gnu.org> and include a ChangeLog
# entry.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
# exits with 0. Otherwise, it exits with 1.
#
# The plan is that this can be called by configure scripts if you
# don't specify an explicit build system type.
# 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
me=`echo "$0" | sed -e 's,.*/,,'`
@ -56,8 +56,9 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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."
@ -161,6 +162,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
@ -169,7 +171,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep __ELF__ >/dev/null
| grep -q __ELF__
then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX?
@ -179,7 +181,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
fi
;;
*)
os=netbsd
os=netbsd
;;
esac
# The OS release
@ -222,7 +224,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
;;
*5.*)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;;
esac
# According to Compaq, /usr/sbin/psrinfo has been available on
@ -268,7 +270,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# 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'`
exit ;;
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
exit $exitcode ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead
@ -294,7 +299,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo s390-ibm-zvmoe
exit ;;
*:OS400:*:*)
echo powerpc-ibm-os400
echo powerpc-ibm-os400
exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
@ -323,14 +328,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7; exit ;;
esac ;;
s390x:SunOS:*:*)
echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
i86pc:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
echo i386-pc-auroraux${UNAME_RELEASE}
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
eval $set_cc_for_build
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 (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
SUN_ARCH="x86_64"
fi
fi
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
@ -374,23 +398,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
echo m68k-milan-mint${UNAME_RELEASE}
exit ;;
echo m68k-milan-mint${UNAME_RELEASE}
exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
echo m68k-hades-mint${UNAME_RELEASE}
exit ;;
echo m68k-hades-mint${UNAME_RELEASE}
exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
exit ;;
echo m68k-unknown-mint${UNAME_RELEASE}
exit ;;
m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE}
exit ;;
@ -460,8 +484,8 @@ EOF
echo m88k-motorola-sysv3
exit ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@ -474,7 +498,7 @@ EOF
else
echo i586-dg-dgux${UNAME_RELEASE}
fi
exit ;;
exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
exit ;;
@ -531,7 +555,7 @@ EOF
echo rs6000-ibm-aix3.2
fi
exit ;;
*:AIX:*:[45])
*:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
@ -574,52 +598,52 @@ EOF
9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then
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
532) # CPU_PA_RISC2_0
case "${sc_kernel_bits}" in
32) HP_ARCH="hppa2.0n" ;;
64) HP_ARCH="hppa2.0w" ;;
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
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
esac ;;
esac
esac ;;
esac
fi
if [ "${HP_ARCH}" = "" ]; then
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
sed 's/^ //' << EOF >$dummy.c
#define _HPUX_SOURCE
#include <stdlib.h>
#include <unistd.h>
#define _HPUX_SOURCE
#include <stdlib.h>
#include <unistd.h>
int main ()
{
#if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS);
#endif
long cpu = sysconf (_SC_CPU_VERSION);
int main ()
{
#if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS);
#endif
long cpu = sysconf (_SC_CPU_VERSION);
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
case CPU_PA_RISC2_0:
#if defined(_SC_KERNEL_BITS)
switch (bits)
{
case 64: puts ("hppa2.0w"); break;
case 32: puts ("hppa2.0n"); break;
default: puts ("hppa2.0"); break;
} break;
#else /* !defined(_SC_KERNEL_BITS) */
puts ("hppa2.0"); break;
#endif
default: puts ("hppa1.0"); break;
}
exit (0);
}
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
case CPU_PA_RISC2_0:
#if defined(_SC_KERNEL_BITS)
switch (bits)
{
case 64: puts ("hppa2.0w"); break;
case 32: puts ("hppa2.0n"); break;
default: puts ("hppa2.0"); break;
} break;
#else /* !defined(_SC_KERNEL_BITS) */
puts ("hppa2.0"); break;
#endif
default: puts ("hppa1.0"); break;
}
exit (0);
}
EOF
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa
@ -639,7 +663,7 @@ EOF
# => hppa64-hp-hpux11.23
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
grep __LP64__ >/dev/null
grep -q __LP64__
then
HP_ARCH="hppa2.0w"
else
@ -710,22 +734,22 @@ EOF
exit ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit ;;
exit ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit ;;
exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
exit ;;
exit ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
exit ;;
exit ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
exit ;;
exit ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
@ -749,14 +773,14 @@ EOF
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_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
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/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
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:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
@ -780,25 +804,34 @@ EOF
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
i*:MINGW*:*)
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:windows32*:*)
# uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32
# uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32
exit ;;
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
x86:Interix*:[3456]*)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
EM64T:Interix*:[3456]*)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
*:Interix*:*)
case ${UNAME_MACHINE} in
x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
authenticamd | genuineintel | EM64T)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
IA64)
echo ia64-unknown-interix${UNAME_RELEASE}
exit ;;
esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
8664:Windows_NT:*)
echo x86_64-pc-mks
exit ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@ -828,8 +861,35 @@ EOF
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
EV56) UNAME_MACHINE=alphaev56 ;;
PCA56) UNAME_MACHINE=alphapca56 ;;
PCA57) UNAME_MACHINE=alphapca56 ;;
EV6) UNAME_MACHINE=alphaev6 ;;
EV67) UNAME_MACHINE=alphaev67 ;;
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
exit ;;
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
echo ${UNAME_MACHINE}-unknown-linux-gnu
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
else
echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
@ -841,7 +901,18 @@ EOF
echo crisv32-axis-linux-gnu
exit ;;
frv:Linux:*:*)
echo frv-unknown-linux-gnu
echo frv-unknown-linux-gnu
exit ;;
i*86:Linux:*:*)
LIBC=gnu
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#ifdef __dietlibc__
LIBC=dietlibc
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
@ -852,74 +923,33 @@ EOF
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
mips:Linux:*:*)
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef mips
#undef mipsel
#undef ${UNAME_MACHINE}
#undef ${UNAME_MACHINE}el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=mipsel
CPU=${UNAME_MACHINE}el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=mips
CPU=${UNAME_MACHINE}
#else
CPU=
#endif
#endif
EOF
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^CPU/{
s: ::g
p
}'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef mips64
#undef mips64el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=mips64el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=mips64
#else
CPU=
#endif
#endif
EOF
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^CPU/{
s: ::g
p
}'`"
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
echo or32-unknown-linux-gnu
exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
padre:Linux:*:*)
echo sparc-unknown-linux-gnu
exit ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
EV56) UNAME_MACHINE=alphaev56 ;;
PCA56) UNAME_MACHINE=alphapca56 ;;
PCA57) UNAME_MACHINE=alphapca56 ;;
EV6) UNAME_MACHINE=alphaev6 ;;
EV67) UNAME_MACHINE=alphaev67 ;;
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-gnu
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
@ -929,14 +959,17 @@ EOF
*) echo hppa-unknown-linux-gnu ;;
esac
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-gnu
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
exit ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
@ -944,75 +977,18 @@ EOF
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
tile*:Linux:*:*)
echo ${UNAME_MACHINE}-tilera-linux-gnu
exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
exit ;;
i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
# problems with other programs or directories called `ld' in the path.
# Set LC_ALL=C to ensure ld outputs messages in English.
ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
| sed -ne '/supported targets:/!d
s/[ ][ ]*/ /g
s/.*supported targets: *//
s/ .*//
p'`
case "$ld_supported_targets" in
elf32-i386)
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
;;
a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
exit ;;
coff-i386)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
exit ;;
"")
# Either a pre-BFD a.out linker (linux-gnuoldld) or
# one that does not give us useful --help.
echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
exit ;;
esac
# Determine whether the default compiler is a.out or elf
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include <features.h>
#ifdef __ELF__
# ifdef __GLIBC__
# if __GLIBC__ >= 2
LIBC=gnu
# else
LIBC=gnulibc1
# endif
# else
LIBC=gnulibc1
# endif
#else
#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
LIBC=gnu
#else
LIBC=gnuaout
#endif
#endif
#ifdef __dietlibc__
LIBC=dietlibc
#endif
EOF
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^LIBC/{
s: ::g
p
}'`"
test x"${LIBC}" != x && {
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit
}
test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both
@ -1020,11 +996,11 @@ EOF
echo i386-sequent-sysv4
exit ;;
i*86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
# I am not positive that other SVR4 systems won't match this,
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
# I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit ;;
i*86:OS/2:*:*)
@ -1041,7 +1017,7 @@ EOF
i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
exit ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit ;;
i*86:*DOS:*:*)
@ -1056,7 +1032,7 @@ EOF
fi
exit ;;
i*86:*:5:[678]*)
# UnixWare 7.x, OpenUNIX and OpenServer 6.
# UnixWare 7.x, OpenUNIX and OpenServer 6.
case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;;
@ -1084,10 +1060,13 @@ EOF
exit ;;
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i386.
echo i386-pc-msdosdjgpp
exit ;;
# 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
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
exit ;;
@ -1122,8 +1101,18 @@ EOF
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
OS_REL='.3'
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
exit ;;
@ -1136,7 +1125,7 @@ EOF
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
exit ;;
SM[BE]S:UNIX_SV:*:*)
@ -1156,10 +1145,10 @@ EOF
echo ns32k-sni-sysv
fi
exit ;;
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
exit ;;
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
exit ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm
@ -1185,11 +1174,11 @@ EOF
exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
echo mips-nec-sysv${UNAME_RELEASE}
else
echo mips-unknown-sysv${UNAME_RELEASE}
echo mips-unknown-sysv${UNAME_RELEASE}
fi
exit ;;
exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
exit ;;
@ -1199,6 +1188,9 @@ EOF
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
exit ;;
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@ -1208,6 +1200,15 @@ EOF
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
exit ;;
SX-7:SUPER-UX:*:*)
echo sx7-nec-superux${UNAME_RELEASE}
exit ;;
SX-8:SUPER-UX:*:*)
echo sx8-nec-superux${UNAME_RELEASE}
exit ;;
SX-8R:SUPER-UX:*:*)
echo sx8r-nec-superux${UNAME_RELEASE}
exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
@ -1217,6 +1218,16 @@ EOF
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
i386)
eval $set_cc_for_build
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) | \
grep IS_64BIT_ARCH >/dev/null
then
UNAME_PROCESSOR="x86_64"
fi
fi ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@ -1232,6 +1243,9 @@ EOF
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
NSE-?:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
@ -1277,13 +1291,13 @@ EOF
echo pdp10-unknown-its
exit ;;
SEI:*:*:SEIUX)
echo mips-sei-seiux${UNAME_RELEASE}
echo mips-sei-seiux${UNAME_RELEASE}
exit ;;
*:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit ;;
*:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null`
UNAME_MACHINE=`(uname -p) 2>/dev/null`
case "${UNAME_MACHINE}" in
A*) echo alpha-dec-vms ; exit ;;
I*) echo ia64-dec-vms ; exit ;;
@ -1298,6 +1312,9 @@ EOF
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
exit ;;
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
@ -1320,11 +1337,11 @@ main ()
#include <sys/param.h>
printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4
"4"
"4"
#else
""
""
#endif
); exit (0);
); exit (0);
#endif
#endif
@ -1458,9 +1475,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://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
If the version you run ($0) is already up to date, please
send the following data and any information you think might be

276
3party/expat/conftools/config.sub vendored Normal file → Executable file
View file

@ -1,10 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc.
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011 Free Software Foundation, Inc.
timestamp='2006-09-20'
timestamp='2011-03-23'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@ -32,13 +32,16 @@ timestamp='2006-09-20'
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
# diff and a properly formatted GNU ChangeLog entry.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# 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
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
@ -72,8 +75,9 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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."
@ -120,8 +124,10 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@ -148,10 +154,13 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple | -axis | -knuth | -cray)
-apple | -axis | -knuth | -cray | -microblaze)
os=
basic_machine=$1
;;
-bluegene*)
os=-cnk
;;
-sim | -cisco | -oki | -wec | -winbond)
os=
basic_machine=$1
@ -166,10 +175,10 @@ case $os in
os=-chorusos
basic_machine=$1
;;
-chorusrdb)
os=-chorusrdb
-chorusrdb)
os=-chorusrdb
basic_machine=$1
;;
;;
-hiux*)
os=-hiuxwe2
;;
@ -245,17 +254,20 @@ case $basic_machine in
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
| fr30 | frv \
| fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore \
| maxq | mb | microblaze | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
| mips64vr | mips64vrel \
| mips64octeon | mips64octeonel \
| mips64orion | mips64orionel \
| mips64r5900 | mips64r5900el \
| mips64vr | mips64vrel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
@ -268,28 +280,42 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
| nios | nios2 \
| ns16k | ns32k \
| open8 \
| or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
| rx \
| score \
| sh | sh[1234] | sh[24]a | 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[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| spu \
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e \
| we32k \
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k)
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
basic_machine=$basic_machine-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12)
c54x)
basic_machine=tic54x-unknown
;;
c55x)
basic_machine=tic55x-unknown
;;
c6x)
basic_machine=tic6x-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12 | picochip)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
os=-none
@ -300,6 +326,18 @@ case $basic_machine in
basic_machine=mt-unknown
;;
strongarm | thumb | xscale)
basic_machine=arm-unknown
;;
xscaleeb)
basic_machine=armeb-unknown
;;
xscaleel)
basic_machine=armel-unknown
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
@ -320,23 +358,26 @@ case $basic_machine in
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
| mips64vr-* | mips64vrel-* \
| mips64octeon-* | mips64octeonel-* \
| mips64orion-* | mips64orionel-* \
| mips64r5900-* | mips64r5900el-* \
| mips64vr-* | mips64vrel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
@ -351,27 +392,35 @@ case $basic_machine in
| mmix-* \
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
| nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pyramid-* \
| romp-* | rs6000-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| 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-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile-* | tilegx-* \
| tron-* \
| ubicom32-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
| ymp-* \
| z8k-*)
| z8k-* | z80-*)
;;
# Recognize the basic CPU types without company name, with glob match.
xtensa*)
basic_machine=$basic_machine-unknown
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
@ -389,7 +438,7 @@ case $basic_machine in
basic_machine=a29k-amd
os=-udi
;;
abacus)
abacus)
basic_machine=abacus-unknown
;;
adobe68k)
@ -435,6 +484,10 @@ case $basic_machine in
basic_machine=m68k-apollo
os=-bsd
;;
aros)
basic_machine=i386-pc
os=-aros
;;
aux)
basic_machine=m68k-apple
os=-aux
@ -443,10 +496,35 @@ case $basic_machine in
basic_machine=ns32k-sequent
os=-dynix
;;
blackfin)
basic_machine=bfin-unknown
os=-linux
;;
blackfin-*)
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
bluegene*)
basic_machine=powerpc-ibm
os=-cnk
;;
c54x-*)
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c55x-*)
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c6x-*)
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c90)
basic_machine=c90-cray
os=-unicos
;;
cegcc)
basic_machine=arm-unknown
os=-cegcc
;;
convex-c1)
basic_machine=c1-convex
os=-bsd
@ -475,8 +553,8 @@ case $basic_machine in
basic_machine=craynv-cray
os=-unicosmp
;;
cr16c)
basic_machine=cr16c-unknown
cr16 | cr16-*)
basic_machine=cr16-unknown
os=-elf
;;
crds | unos)
@ -514,6 +592,10 @@ case $basic_machine in
basic_machine=m88k-motorola
os=-sysv3
;;
dicos)
basic_machine=i686-pc
os=-dicos
;;
djgpp)
basic_machine=i586-pc
os=-msdosdjgpp
@ -668,6 +750,14 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
;;
m68knommu-*)
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
m88k-omron*)
basic_machine=m88k-omron
;;
@ -679,10 +769,17 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
microblaze)
basic_machine=microblaze-xilinx
;;
mingw32)
basic_machine=i386-pc
os=-mingw32
;;
mingw32ce)
basic_machine=arm-unknown
os=-mingw32ce
;;
miniframe)
basic_machine=m68000-convergent
;;
@ -779,6 +876,12 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
neo-tandem)
basic_machine=neo-tandem
;;
nse-tandem)
basic_machine=nse-tandem
;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@ -809,6 +912,14 @@ case $basic_machine in
basic_machine=i860-intel
os=-osf
;;
parisc)
basic_machine=hppa-unknown
os=-linux
;;
parisc-*)
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
pbd)
basic_machine=sparc-tti
;;
@ -853,9 +964,10 @@ case $basic_machine in
;;
power) basic_machine=power-ibm
;;
ppc) basic_machine=powerpc-unknown
ppc | ppcbe) basic_machine=powerpc-unknown
;;
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
ppc-* | ppcbe-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
@ -925,6 +1037,9 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
sh5el)
basic_machine=sh5le-unknown
;;
sh64)
basic_machine=sh64-unknown
;;
@ -946,6 +1061,9 @@ case $basic_machine in
basic_machine=i860-stratus
os=-sysv4
;;
strongarm-* | thumb-*)
basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
sun2)
basic_machine=m68000-sun
;;
@ -1002,17 +1120,14 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
# This must be matched before tile*.
tilegx*)
basic_machine=tilegx-unknown
os=-linux-gnu
;;
tic55x | c55x*)
basic_machine=tic55x-unknown
os=-coff
;;
tic6x | c6x*)
basic_machine=tic6x-unknown
os=-coff
tile*)
basic_machine=tile-unknown
os=-linux-gnu
;;
tx39)
basic_machine=mipstx39-unknown
@ -1081,6 +1196,9 @@ case $basic_machine in
xps | xps100)
basic_machine=xps100-honeywell
;;
xscale-* | xscalee[bl]-*)
basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
;;
ymp)
basic_machine=ymp-cray
os=-unicos
@ -1089,6 +1207,10 @@ case $basic_machine in
basic_machine=z8k-unknown
os=-sim
;;
z80-*-coff)
basic_machine=z80-unknown
os=-sim
;;
none)
basic_machine=none-none
os=-none
@ -1127,7 +1249,7 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
@ -1174,9 +1296,12 @@ esac
if [ x"$os" != x"" ]
then
case $os in
# First match some system type aliases
# that might get confused with valid system types.
# First match some system type aliases
# that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
-auroraux)
os=-auroraux
;;
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
@ -1197,10 +1322,11 @@ case $os in
# Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* \
| -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@ -1209,9 +1335,10 @@ case $os in
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
| -mingw32* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@ -1219,7 +1346,7 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers*)
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@ -1258,7 +1385,7 @@ case $os in
-opened*)
os=-openedition
;;
-os400*)
-os400*)
os=-os400
;;
-wince*)
@ -1307,7 +1434,7 @@ case $os in
-sinix*)
os=-sysv4
;;
-tpf*)
-tpf*)
os=-tpf
;;
-triton*)
@ -1349,6 +1476,11 @@ case $os in
-zvmoe)
os=-zvmoe
;;
-dicos*)
os=-dicos
;;
-nacl*)
;;
-none)
;;
*)
@ -1371,10 +1503,10 @@ else
# system, and we'll never get to this point.
case $basic_machine in
score-*)
score-*)
os=-elf
;;
spu-*)
spu-*)
os=-elf
;;
*-acorn)
@ -1386,8 +1518,17 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
c4x-* | tic4x-*)
os=-coff
c4x-* | tic4x-*)
os=-coff
;;
tic54x-*)
os=-coff
;;
tic55x-*)
os=-coff
;;
tic6x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
@ -1414,6 +1555,9 @@ case $basic_machine in
m68*-cisco)
os=-aout
;;
mep-*)
os=-elf
;;
mips*-cisco)
os=-elf
;;
@ -1438,7 +1582,7 @@ case $basic_machine in
*-ibm)
os=-aix
;;
*-knuth)
*-knuth)
os=-mmixware
;;
*-wec)
@ -1543,7 +1687,7 @@ case $basic_machine in
-sunos*)
vendor=sun
;;
-aix*)
-cnk*|-aix*)
vendor=ibm
;;
-beos*)

View file

@ -7,7 +7,7 @@ dnl If --with-expat has not been specified, set with_expat to 'no'.
dnl In addition, an Automake conditional EXPAT_INSTALLED is set accordingly.
dnl This is necessary to adapt a whole lot of packages that have expat
dnl bundled as a static library.
AC_DEFUN(AM_WITH_EXPAT,
AC_DEFUN([AM_WITH_EXPAT],
[ AC_ARG_WITH(expat,
[ --with-expat=PREFIX Use system Expat library],
, with_expat=no)

0
3party/expat/conftools/get-version.sh Normal file → Executable file
View file

669
3party/expat/conftools/install-sh Normal file → Executable file
View file

@ -1,251 +1,520 @@
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
scriptversion=2009-04-28.21; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright 1991 by the Massachusetts Institute of Technology
# Copyright (C) 1994 X Consortium
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# from scratch.
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
doit=${DOITPROG-}
if test -z "$doit"; then
doit_exec=exec
else
true
doit_exec=$doit
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
chmodcmd=""
else
instcmd=mkdir
fi
else
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
if [ -f $src -o -d $src ]
then
true
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
true
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
true
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
IFS="${IFS-${defaultIFS}}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
posix_mkdir=
pathcomp=''
# Desired mode of installed file.
mode=0755
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
stripcmd=
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
true
fi
src=
dst=
dir_arg=
dst_arg=
pathcomp="${pathcomp}/"
copy_on_change=false
no_target_directory=
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--help display this help and exit.
--version display version info and exit.
-c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
"
while test $# -ne 0; do
case $1 in
-c) ;;
-C) copy_on_change=true;;
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
shift;;
-T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
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.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else
if test -z "$dir_arg"; then
trap '(exit $?); exit' 1 2 13 15
# If we're going to rename the final executable, determine the name now.
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
# Protect names starting with `-'.
case $src in
-*) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dst_arg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst;;
esac
# 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
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'
`
test -d "$dstdir"
dstdir_status=$?
fi
fi
obsolete_mkdir_used=false
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;;
*[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
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
mkdir_mode=
fi
# don't allow the sed command to completely eliminate the filename
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 [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
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-writeable 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"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
-*) prefix='./';;
*) prefix='';;
esac
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob set -f
set fnord $dstdir
shift
$posix_glob set +f
IFS=$oIFS
prefixes=
for d
do
test -z "$d" && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
true
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
# Make a temp file name in the proper directory.
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
fi
fi
fi
dsttmp=$dstdir/#inst.$$#
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Move or copy the file name to the temp name
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
$doit $instcmd $src $dsttmp &&
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
trap "rm -f ${dsttmp}" 0 &&
# Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
# 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` &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f &&
# Now rename the file to the real destination.
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
# The rename failed, perhaps because mv can't rename something else
# 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
}
} &&
fi &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done
exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

File diff suppressed because it is too large Load diff

10193
3party/expat/conftools/ltmain.sh Normal file → Executable file

File diff suppressed because it is too large Load diff

0
3party/expat/conftools/mkinstalldirs Normal file → Executable file
View file

View file

@ -129,8 +129,10 @@ interface.</p>
<li><a href="#XML_GetBase">XML_GetBase</a></li>
<li><a href="#XML_GetSpecifiedAttributeCount">XML_GetSpecifiedAttributeCount</a></li>
<li><a href="#XML_GetIdAttributeIndex">XML_GetIdAttributeIndex</a></li>
<li><a href="#XML_GetAttributeInfo">XML_GetAttributeInfo</a></li>
<li><a href="#XML_SetEncoding">XML_SetEncoding</a></li>
<li><a href="#XML_SetParamEntityParsing">XML_SetParamEntityParsing</a></li>
<li><a href="#XML_SetHashSalt">XML_SetHashSalt</a></li>
<li><a href="#XML_UseForeignDTD">XML_UseForeignDTD</a></li>
<li><a href="#XML_SetReturnNSTriplet">XML_SetReturnNSTriplet</a></li>
<li><a href="#XML_DefaultCurrent">XML_DefaultCurrent</a></li>
@ -369,6 +371,11 @@ footprint and can be faster.</dd>
statically with the code that calls it; this is required to get all
the right MSVC magic annotations correct. This is ignored on other
platforms.</dd>
<dt>XML_ATTR_INFO</dt>
<dd>If defined, makes the the additional function <code><a href=
"#XML_GetAttributeInfo" >XML_GetAttributeInfo</a></code> available
for reporting attribute byte offsets.</dd>
</dl>
<hr />
@ -917,12 +924,15 @@ XML_ParserCreateNS(const XML_Char *encoding,
Constructs a new parser that has namespace processing in effect. Namespace
expanded element names and attribute names are returned as a concatenation
of the namespace URI, <em>sep</em>, and the local part of the name. This
means that you should pick a character for <em>sep</em> that can't be
part of a legal URI. There is a special case when <em>sep</em> is the null
character <code>'\0'</code>: the namespace URI and the local part will be
concatenated without any separator - this is intended to support RDF processors.
It is a programming error to use the null separator with
<a href= "#XML_SetReturnNSTriplet">namespace triplets</a>.</div>
means that you should pick a character for <em>sep</em> that can't be part
of an URI. Since Expat does not check namespace URIs for conformance, the
only safe choice for a namespace separator is a character that is illegal
in XML. For instance, <code>'\xFF'</code> is not legal in UTF-8, and
<code>'\xFFFF'</code> is not legal in UTF-16. There is a special case when
<em>sep</em> is the null character <code>'\0'</code>: the namespace URI and
the local part will be concatenated without any separator - this is intended
to support RDF processors. It is a programming error to use the null separator
with <a href= "#XML_SetReturnNSTriplet">namespace triplets</a>.</div>
<pre class="fcndec" id="XML_ParserCreate_MM">
XML_Parser XMLCALL
@ -2074,6 +2084,27 @@ attribute. If called inside a start handler, then that means the
current call.
</div>
<pre class="fcndec" id="XML_GetAttributeInfo">
const XML_AttrInfo * XMLCALL
XML_GetAttributeInfo(XML_Parser parser);
</pre>
<pre class="signature">
typedef struct {
XML_Index nameStart; /* Offset to beginning of the attribute name. */
XML_Index nameEnd; /* Offset after the attribute name's last byte. */
XML_Index valueStart; /* Offset to beginning of the attribute value. */
XML_Index valueEnd; /* Offset after the attribute value's last byte. */
} XML_AttrInfo;
</pre>
<div class="fcndef">
Returns an array of <code>XML_AttrInfo</code> structures for the
attribute/value pairs passed in the last call to the
<code>XML_StartElementHandler</code> that were specified
in the start-tag rather than defaulted. Each attribute/value pair counts
as 1; thus the number of entries in the array is
<code>XML_GetSpecifiedAttributeCount(parser) / 2</code>.
</div>
<pre class="fcndec" id="XML_SetEncoding">
enum XML_Status XMLCALL
XML_SetEncoding(XML_Parser p,
@ -2104,6 +2135,24 @@ The choices for <code>code</code> are:
<li><code>XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE</code></li>
<li><code>XML_PARAM_ENTITY_PARSING_ALWAYS</code></li>
</ul>
<b>Note:</b> If <code>XML_SetParamEntityParsing</code> is called after
<code>XML_Parse</code> or <code>XML_ParseBuffer</code>, then it has
no effect and will always return 0.
</div>
<pre class="fcndec" id="XML_SetHashSalt">
int XMLCALL
XML_SetHashSalt(XML_Parser p,
unsigned long hash_salt);
</pre>
<div class="fcndef">
Sets the hash salt to use for internal hash calculations.
Helps in preventing DoS attacks based on predicting hash
function behavior. In order to have an effect this must be called
before parsing has started. Returns 1 if successful, 0 when called
after <code>XML_Parse</code> or <code>XML_ParseBuffer</code>.
<p><b>Note:</b> This call is optional, as the parser will auto-generate a new
random salt value if no value has been set at the start of parsing.</p>
</div>
<pre class="fcndec" id="XML_UseForeignDTD">

View file

@ -388,11 +388,6 @@ supports both.
<refsect1>
<title>BUGS</title>
<para>
According to the W3C standard, an XML file without a
declaration at the beginning is not considered well-formed.
However, <command>&dhpackage;</command> allows this to pass.
</para>
<para>
<command>&dhpackage;</command> returns a 0 - noerr result,
even if the file is not well-formed. There is no good way for

View file

@ -50,8 +50,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 odbccp32.lib libexpatMT.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib /nologo /subsystem:console /pdb:none /machine:I386 /libpath:"..\win32\bin\Release"
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
# ADD LINK32 libexpatMT.lib /nologo /subsystem:console /pdb:none /machine:I386 /libpath:"..\win32\bin\Release" /out:"..\win32\bin\Release\elements.exe"
!ELSEIF "$(CFG)" == "elements - Win32 Debug"
@ -74,8 +74,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 odbccp32.lib libexpatMT.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /libpath:"..\win32\bin\Debug"
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 libexpatMT.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /libpath:"..\win32\bin\Debug" /out:"..\win32\bin\Debug\elements.exe"
!ENDIF

View file

@ -50,8 +50,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /machine:I386
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
# ADD LINK32 libexpat.lib /nologo /subsystem:console /pdb:none /machine:I386 /libpath:"..\win32\bin\Release" /out:"..\win32\bin\Release\outline.exe"
!ELSEIF "$(CFG)" == "outline - Win32 Debug"
@ -74,8 +74,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 libexpat.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /libpath:"..\win32\bin\Debug" /out:"..\win32\bin\Debug\outline.exe"
!ENDIF

0
3party/expat/expat.dsw Normal file → Executable file
View file

11
3party/expat/expat.pc.in Normal file
View file

@ -0,0 +1,11 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: expat
Version: @PACKAGE_VERSION@
Description: expat XML parser
URL: http://www.libexpat.org
Libs: -L${libdir} -lexpat
Cflags: -I${includedir}

View file

@ -9,6 +9,8 @@ DEPENDENCIES =
include($$ROOT_DIR/common.pri)
DEFINES += HAVE_MEMMOVE
CONFIG -= warn_on
CONFIG *= warn_off

View file

@ -0,0 +1,91 @@
/* expat_config.h.in. Generated from configure.in by autoheader. */
/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
#cmakedefine BYTEORDER @BYTEORDER@
/* Define to 1 if you have the `bcopy' function. */
#cmakedefine HAVE_BCOPY
/* Define to 1 if you have the <dlfcn.h> header file. */
#cmakedefine HAVE_DLFCN_H
/* Define to 1 if you have the <fcntl.h> header file. */
#cmakedefine HAVE_FCNTL_H
/* Define to 1 if you have the `getpagesize' function. */
#cmakedefine HAVE_GETPAGESIZE
/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H
/* Define to 1 if you have the `memmove' function. */
#cmakedefine HAVE_MEMMOVE
/* Define to 1 if you have the <memory.h> header file. */
#cmakedefine HAVE_MEMORY_H
/* Define to 1 if you have a working `mmap' system call. */
#cmakedefine HAVE_MMAP
/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#cmakedefine HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#cmakedefine HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#cmakedefine HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#cmakedefine HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#cmakedefine HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H
/* Define to the address where bug reports for this package should be sent. */
#cmakedefine PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#cmakedefine PACKAGE_NAME
/* Define to the full name and version of this package. */
#cmakedefine PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#cmakedefine PACKAGE_TARNAME
/* Define to the version of this package. */
#cmakedefine PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#cmakedefine STDC_HEADERS
/* whether byteorder is bigendian */
#cmakedefine WORDS_BIGENDIAN
/* Define to specify how much context to retain around the current parse
point. */
#cmakedefine XML_CONTEXT_BYTES @XML_CONTEXT_BYTES@
/* Define to make parameter entity parsing functionality available. */
#cmakedefine XML_DTD
/* Define to make XML Namespaces functionality available. */
#cmakedefine XML_NS
/* Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C. */
#ifdef _MSC_VER
# define __func__ __FUNCTION__
#endif
/* Define to `long' if <sys/types.h> does not define. */
#cmakedefine off_t @OFF_T@
/* Define to `unsigned' if <sys/types.h> does not define. */
#cmakedefine size_t @SIZE_T@

View file

@ -39,6 +39,9 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
@ -48,6 +51,10 @@
/* 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.
*/
#undef LT_OBJDIR
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
@ -60,6 +67,9 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
@ -85,8 +95,8 @@
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
/* Define to `long' if <sys/types.h> does not define. */
/* Define to `long int' if <sys/types.h> does not define. */
#undef off_t
/* Define to `unsigned' if <sys/types.h> does not define. */
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t

View file

@ -53,8 +53,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /pdb:none /machine:I386 /out:"..\win32\bin\Release/libexpat.dll"
# ADD BASE LINK32 /nologo /dll /machine:I386
# ADD LINK32 /nologo /dll /pdb:none /machine:I386 /out:"..\win32\bin\Release\libexpat.dll"
!ELSEIF "$(CFG)" == "expat - Win32 Debug"
@ -79,8 +79,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /pdb:none /debug /machine:I386 /out:"..\win32\bin\Debug/libexpat.dll"
# ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 /nologo /dll /pdb:none /debug /machine:I386 /out:"..\win32\bin\Debug\libexpat.dll"
!ENDIF

View file

@ -2,7 +2,6 @@
See the file COPYING for copying permission.
*/
#pragma once
#ifndef Expat_INCLUDED
#define Expat_INCLUDED 1
@ -743,6 +742,29 @@ XML_GetSpecifiedAttributeCount(XML_Parser parser);
XMLPARSEAPI(int)
XML_GetIdAttributeIndex(XML_Parser parser);
#ifdef XML_ATTR_INFO
/* Source file byte offsets for the start and end of attribute names and values.
The value indices are exclusive of surrounding quotes; thus in a UTF-8 source
file an attribute value of "blah" will yield:
info->valueEnd - info->valueStart = 4 bytes.
*/
typedef struct {
XML_Index nameStart; /* Offset to beginning of the attribute name. */
XML_Index nameEnd; /* Offset after the attribute name's last byte. */
XML_Index valueStart; /* Offset to beginning of the attribute value. */
XML_Index valueEnd; /* Offset after the attribute value's last byte. */
} XML_AttrInfo;
/* Returns an array of XML_AttrInfo structures for the attribute/value pairs
passed in last call to the XML_StartElementHandler that were specified
in the start-tag rather than defaulted. Each attribute/value pair counts
as 1; thus the number of entries in the array is
XML_GetSpecifiedAttributeCount(parser) / 2.
*/
XMLPARSEAPI(const XML_AttrInfo *)
XML_GetAttributeInfo(XML_Parser parser);
#endif
/* Parses some input. Returns XML_STATUS_ERROR if a fatal error is
detected. The last call to XML_Parse must have isFinal true; len
may be zero for this call (or any other).
@ -884,6 +906,15 @@ XMLPARSEAPI(int)
XML_SetParamEntityParsing(XML_Parser parser,
enum XML_ParamEntityParsing parsing);
/* Sets the hash salt to use for internal hash calculations.
Helps in preventing DoS attacks based on predicting hash
function behavior. This must be called before parsing is started.
Returns 1 if successful, 0 when called after parsing has started.
*/
XMLPARSEAPI(int)
XML_SetHashSalt(XML_Parser parser,
unsigned long hash_salt);
/* If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then
XML_GetErrorCode returns information about the error.
*/
@ -985,7 +1016,8 @@ enum XML_FeatureEnum {
XML_FEATURE_SIZEOF_XML_CHAR,
XML_FEATURE_SIZEOF_XML_LCHAR,
XML_FEATURE_NS,
XML_FEATURE_LARGE_SIZE
XML_FEATURE_LARGE_SIZE,
XML_FEATURE_ATTR_INFO
/* Additional features must be added to the end of this enum. */
};
@ -1005,8 +1037,8 @@ XML_GetFeatureList(void);
change to major or minor version.
*/
#define XML_MAJOR_VERSION 2
#define XML_MINOR_VERSION 0
#define XML_MICRO_VERSION 1
#define XML_MINOR_VERSION 1
#define XML_MICRO_VERSION 0
#ifdef __cplusplus
}

View file

@ -50,7 +50,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\win32\bin\Release/libexpatMT.lib"
# ADD LIB32 /nologo /out:"..\win32\bin\Release\libexpatMT.lib"
!ELSEIF "$(CFG)" == "expat_static - Win32 Debug"

View file

@ -53,8 +53,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /pdb:none /machine:I386 /out:"..\win32\bin\Release/libexpatw.dll"
# ADD BASE LINK32 /nologo /dll /machine:I386
# ADD LINK32 /nologo /dll /pdb:none /machine:I386 /out:"..\win32\bin\Release\libexpatw.dll"
!ELSEIF "$(CFG)" == "expatw - Win32 Debug"
@ -79,8 +79,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /pdb:none /debug /machine:I386 /out:"..\win32\bin\Debug/libexpatw.dll"
# ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 /nologo /dll /pdb:none /debug /machine:I386 /out:"..\win32\bin\Debug\libexpatw.dll"
!ENDIF

File diff suppressed because it is too large Load diff

View file

@ -8,7 +8,7 @@
#include "winconfig.h"
#elif defined(MACOS_CLASSIC)
#include "macconfig.h"
#elif defined(__amigaos4__)
#elif defined(__amigaos__)
#include "amigaconfig.h"
#elif defined(__WATCOMC__)
#include "watcomconfig.h"

View file

@ -8,7 +8,7 @@
#include "winconfig.h"
#elif defined(MACOS_CLASSIC)
#include "macconfig.h"
#elif defined(__amigaos4__)
#elif defined(__amigaos__)
#include "amigaconfig.h"
#elif defined(__WATCOMC__)
#include "watcomconfig.h"
@ -1345,7 +1345,7 @@ unknown_toUtf16(const ENCODING *enc,
ENCODING *
XmlInitUnknownEncoding(void *mem,
int *table,
CONVERTER convert,
CONVERTER convert,
void *userData)
{
int i;
@ -1639,7 +1639,7 @@ initScan(const ENCODING * const *encodingTable,
ENCODING *
XmlInitUnknownEncodingNS(void *mem,
int *table,
CONVERTER convert,
CONVERTER convert,
void *userData)
{
ENCODING *enc = XmlInitUnknownEncoding(mem, table, convert, userData);

View file

@ -885,7 +885,7 @@ PREFIX(scanPercent)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr)
{
if (ptr == end)
return -XML_TOK_PERCENT;
return XML_TOK_PARTIAL;
switch (BYTE_TYPE(enc, ptr)) {
CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
case BT_S: case BT_LF: case BT_CR: case BT_PERCNT:
@ -1744,7 +1744,7 @@ PREFIX(updatePosition)(const ENCODING *enc,
const char *end,
POSITION *pos)
{
while (ptr != end) {
while (ptr < end) {
switch (BYTE_TYPE(enc, ptr)) {
#define LEAD_CASE(n) \
case BT_LEAD ## n: \

7851
3party/expat/m4/libtool.m4 vendored Normal file

File diff suppressed because it is too large Load diff

369
3party/expat/m4/ltoptions.m4 vendored Normal file
View file

@ -0,0 +1,369 @@
# Helper functions for option handling. -*- Autoconf -*-
#
# Copyright (C) 2004, 2005, 2007, 2008, 2009 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
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
# ------------------------------------------
m4_define([_LT_MANGLE_OPTION],
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
# ---------------------------------------
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
# saved as a flag.
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
])
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
# ------------------------------------------------------------
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
m4_define([_LT_IF_OPTION],
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
# -------------------------------------------------------
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
# are set.
m4_define([_LT_UNLESS_OPTIONS],
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
[m4_define([$0_found])])])[]dnl
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
])[]dnl
])
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
# ----------------------------------------
# OPTION-LIST is a space-separated list of Libtool options associated
# with MACRO-NAME. If any OPTION has a matching handler declared with
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
# the unknown option and exit.
m4_defun([_LT_SET_OPTIONS],
[# Set options
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
[_LT_SET_OPTION([$1], _LT_Option)])
m4_if([$1],[LT_INIT],[
dnl
dnl Simply set some default values (i.e off) if boolean options were not
dnl specified:
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
])
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
])
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 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_SET_OPTIONS
## --------------------------------- ##
## Macros to handle LT_INIT options. ##
## --------------------------------- ##
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
# -----------------------------------------
m4_define([_LT_MANGLE_DEFUN],
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
# -----------------------------------------------
m4_define([LT_OPTION_DEFINE],
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
])# LT_OPTION_DEFINE
# dlopen
# ------
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
])
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.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
# win32-dll
# ---------
# Declare package support for building win32 dll's.
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
[enable_win32_dll=yes
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
AC_CHECK_TOOL(AS, as, false)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(OBJDUMP, objdump, false)
;;
esac
test -z "$AS" && AS=as
_LT_DECL([], [AS], [1], [Assembler program])dnl
test -z "$DLLTOOL" && DLLTOOL=dlltool
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
test -z "$OBJDUMP" && OBJDUMP=objdump
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
])# win32-dll
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
_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.])
])
dnl aclocal-1.4 backwards compatibility:
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'.
m4_define([_LT_ENABLE_SHARED],
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([shared],
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_shared=yes ;;
no) enable_shared=no ;;
*)
enable_shared=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_shared=yes
fi
done
IFS="$lt_save_ifs"
;;
esac],
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
_LT_DECL([build_libtool_libs], [enable_shared], [0],
[Whether or not to build shared libraries])
])# _LT_ENABLE_SHARED
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
# Old names:
AC_DEFUN([AC_ENABLE_SHARED],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
])
AC_DEFUN([AC_DISABLE_SHARED],
[_LT_SET_OPTION([LT_INIT], [disable-shared])
])
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
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'.
m4_define([_LT_ENABLE_STATIC],
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([static],
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_static=yes ;;
no) enable_static=no ;;
*)
enable_static=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_static=yes
fi
done
IFS="$lt_save_ifs"
;;
esac],
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
_LT_DECL([build_old_libs], [enable_static], [0],
[Whether or not to build static libraries])
])# _LT_ENABLE_STATIC
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
# Old names:
AC_DEFUN([AC_ENABLE_STATIC],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
])
AC_DEFUN([AC_DISABLE_STATIC],
[_LT_SET_OPTION([LT_INIT], [disable-static])
])
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
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'.
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],
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
*)
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,"
for pkg in $enableval; do
IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_fast_install=yes
fi
done
IFS="$lt_save_ifs"
;;
esac],
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
_LT_DECL([fast_install], [enable_fast_install], [0],
[Whether or not to optimize for fast installation])dnl
])# _LT_ENABLE_FAST_INSTALL
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
# Old names:
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.])
])
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.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
# _LT_WITH_PIC([MODE])
# --------------------
# 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'.
m4_define([_LT_WITH_PIC],
[AC_ARG_WITH([pic],
[AS_HELP_STRING([--with-pic],
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
[pic_mode="$withval"],
[pic_mode=default])
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
])# _LT_WITH_PIC
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
# Old name:
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.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
## ----------------- ##
## LTDL_INIT Options ##
## ----------------- ##
m4_define([_LTDL_MODE], [])
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
[m4_define([_LTDL_MODE], [nonrecursive])])
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
[m4_define([_LTDL_MODE], [recursive])])
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
[m4_define([_LTDL_MODE], [subproject])])
m4_define([_LTDL_TYPE], [])
LT_OPTION_DEFINE([LTDL_INIT], [installable],
[m4_define([_LTDL_TYPE], [installable])])
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
[m4_define([_LTDL_TYPE], [convenience])])

123
3party/expat/m4/ltsugar.m4 vendored Normal file
View file

@ -0,0 +1,123 @@
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
# Copyright (C) 2004, 2005, 2007, 2008 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 6 ltsugar.m4
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
# lt_join(SEP, ARG1, [ARG2...])
# -----------------------------
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
# associated separator.
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
# versions in m4sugar had bugs.
m4_define([lt_join],
[m4_if([$#], [1], [],
[$#], [2], [[$2]],
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
m4_define([_lt_join],
[m4_if([$#$2], [2], [],
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
# lt_car(LIST)
# lt_cdr(LIST)
# ------------
# Manipulate m4 lists.
# These macros are necessary as long as will still need to support
# 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])],
[$#], 1, [],
[m4_dquote(m4_shift($@))])])
m4_define([lt_unquote], $1)
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
# ------------------------------------------
# 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
# than defined and empty).
#
# This macro is needed until we can rely on Autoconf 2.62, since earlier
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
m4_define([lt_append],
[m4_define([$1],
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
# ----------------------------------------------------------
# Produce a SEP delimited list of all paired combinations of elements of
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
# has the form PREFIXmINFIXSUFFIXn.
# Needed until we can rely on m4_combine added in Autoconf 2.62.
m4_define([lt_combine],
[m4_if(m4_eval([$# > 3]), [1],
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
[[m4_foreach([_Lt_prefix], [$2],
[m4_foreach([_Lt_suffix],
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
# -----------------------------------------------------------------------
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
m4_define([lt_if_append_uniq],
[m4_ifdef([$1],
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
[lt_append([$1], [$2], [$3])$4],
[$5])],
[lt_append([$1], [$2], [$3])$4])])
# lt_dict_add(DICT, KEY, VALUE)
# -----------------------------
m4_define([lt_dict_add],
[m4_define([$1($2)], [$3])])
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
# --------------------------------------------
m4_define([lt_dict_add_subkey],
[m4_define([$1($2:$3)], [$4])])
# lt_dict_fetch(DICT, KEY, [SUBKEY])
# ----------------------------------
m4_define([lt_dict_fetch],
[m4_ifval([$3],
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
# -----------------------------------------------------------------
m4_define([lt_if_dict_fetch],
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
[$5],
[$6])])
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
# --------------------------------------------------------------
m4_define([lt_dict_filter],
[m4_if([$5], [], [],
[lt_join(m4_quote(m4_default([$4], [[, ]])),
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
])

23
3party/expat/m4/ltversion.m4 vendored Normal file
View file

@ -0,0 +1,23 @@
# ltversion.m4 -- version numbers -*- Autoconf -*-
#
# Copyright (C) 2004 Free Software Foundation, Inc.
# Written by Scott James Remnant, 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.
# @configure_input@
# serial 3293 ltversion.m4
# This file is part of GNU Libtool
m4_define([LT_PACKAGE_VERSION], [2.4])
m4_define([LT_PACKAGE_REVISION], [1.3293])
AC_DEFUN([LTVERSION_VERSION],
[macro_version='2.4'
macro_revision='1.3293'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])

98
3party/expat/m4/lt~obsolete.m4 vendored Normal file
View file

@ -0,0 +1,98 @@
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
#
# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
# Written by Scott James Remnant, 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 5 lt~obsolete.m4
# These exist entirely to fool aclocal when bootstrapping libtool.
#
# 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.
#
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
# using a macro with the same name in our local m4/libtool.m4 it'll
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
# and doesn't know about Autoconf macros at all.)
#
# So we provide this file, which has a silly filename so it's always
# 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.
#
# 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
# we give up compatibility with versions before 1.7, at which point
# we need to keep only those names which we still refer to.
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])

View file

@ -8,7 +8,6 @@ unit testing framework for C. More information on Check can be found at:
http://check.sourceforge.net/
Expat must be built and installed before "make check" can be executed.
Expat must be built and, depending on platform, must be installed, before "make check" can be executed.
Since both Check and this test suite are young, it can all change in a
later version.
This test suite can all change in a later version.

View file

@ -48,8 +48,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
# ADD LINK32 libexpat.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\win32\bin\Release"
!ELSEIF "$(CFG)" == "benchmark - Win32 Debug"
@ -71,8 +71,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 libexpat.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\win32\bin\Debug"
!ENDIF

View file

@ -18,10 +18,11 @@ extern "C" {
#define CK_NORMAL 1
#define CK_VERBOSE 2
/* Workaround for Tru64 Unix systems where the C compiler has a working
__func__, but the C++ compiler only has a working __FUNCTION__. This
could be fixed in configure.in, but it's not worth it right now. */
#if defined(__osf__) && defined(__cplusplus)
/* Workaround for Microsoft's compiler and Tru64 Unix systems where the
C compiler has a working __func__, but the C++ compiler only has a
working __FUNCTION__. This could be fixed in configure.in, but it's
not worth it right now. */
#if defined (_MSC_VER) || (defined(__osf__) && defined(__cplusplus))
#define __func__ __FUNCTION__
#endif

View file

@ -12,6 +12,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include "expat.h"
#include "chardata.h"
@ -1254,7 +1255,7 @@ external_entity_handler(XML_Parser parser,
const XML_Char *systemId,
const XML_Char *publicId)
{
long callno = 1 + (long)XML_GetUserData(parser);
intptr_t callno = 1 + (intptr_t)XML_GetUserData(parser);
char *text;
XML_Parser p2;

7
3party/expat/tests/xmltest.sh Normal file → Executable file
View file

@ -6,7 +6,7 @@
# w3c.org xml test suite, available from
# http://www.w3.org/XML/Test/xmlts20020606.zip.
# To run this script, first set XMLWF so that xmlwf can be
# To run this script, first set XMLWF below so that xmlwf can be
# found, then set the output directory with OUTPUT.
# The script lists all test cases where Expat shows a discrepancy
@ -39,7 +39,7 @@ RunXmlwfNotWF() {
$XMLWF -p "$file" > outfile || return $?
read outdata < outfile
if test "$outdata" = "" ; then
echo "Expected well-formed: $reldir$file"
echo "Expected not well-formed: $reldir$file"
return 1
else
return 0
@ -55,7 +55,7 @@ RunXmlwfWF() {
read outdata < outfile
if test "$outdata" = "" ; then
if [ -f "out/$file" ] ; then
diff "$OUTPUT$reldir$file" "out/$file" > outfile
diff -u "$OUTPUT$reldir$file" "out/$file" > outfile
if [ -s outfile ] ; then
cp outfile "$OUTPUT$reldir$file.diff"
echo "Output differs: $reldir$file"
@ -117,6 +117,7 @@ rm outfile
cd "$TS/xmlconf"
for xmldir in ibm/not-wf/P* \
ibm/not-wf/p28a \
ibm/not-wf/misc \
xmltest/not-wf/ext-sa \
xmltest/not-wf/not-sa \

View file

@ -13,7 +13,7 @@ Expat can be built on Windows in three ways:
Based on the workspace file expat.dsw. The related project
files (.dsp) are located in the lib subdirectory.
* MS Visual Studio .NET 2002, 2003, 2005:
* 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.

View file

@ -2,22 +2,22 @@
; information on the free installer builder, see www.jrsoftware.org.
;
; This script was contributed by Tim Peters.
; The current version is used with Inno Setup 2.0.19.
; It was designed for Inno Setup 2.0.19 but works with later versions as well.
[Setup]
AppName=Expat
AppId=expat
AppVersion=2.0.1
AppVerName=Expat 2.0.1
AppCopyright=Copyright © 1998-2006 Thai Open Source Software Center, Clark Cooper, and the Expat maintainers
AppVersion=2.1.0
AppVerName=Expat 2.1.0
AppCopyright=Copyright © 1998-2012 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.0.1
VersionInfoVersion=2.0.1
UninstallDisplayName=Expat XML Parser 2.1.0
VersionInfoVersion=2.1.0
DefaultDirName={pf}\Expat 2.0.1
DefaultDirName={pf}\Expat 2.1.0
UninstallFilesDir={app}\Uninstall
Compression=lzma

0
3party/expat/xmlwf/codepage.c Normal file → Executable file
View file

0
3party/expat/xmlwf/codepage.h Normal file → Executable file
View file

0
3party/expat/xmlwf/ct.c Normal file → Executable file
View file

0
3party/expat/xmlwf/filemap.h Normal file → Executable file
View file

2
3party/expat/xmlwf/readfilemap.c Normal file → Executable file
View file

@ -58,10 +58,12 @@ filemap(const char *name,
}
if (fstat(fd, &sb) < 0) {
perror(name);
close(fd);
return 0;
}
if (!S_ISREG(sb.st_mode)) {
fprintf(stderr, "%s: not a regular file\n", name);
close(fd);
return 0;
}
nbytes = sb.st_size;

0
3party/expat/xmlwf/unixfilemap.c Normal file → Executable file
View file

0
3party/expat/xmlwf/win32filemap.c Normal file → Executable file
View file

0
3party/expat/xmlwf/xmlfile.c Normal file → Executable file
View file

0
3party/expat/xmlwf/xmlfile.h Normal file → Executable file
View file

0
3party/expat/xmlwf/xmlmime.c Normal file → Executable file
View file

0
3party/expat/xmlwf/xmlmime.h Normal file → Executable file
View file

0
3party/expat/xmlwf/xmltchar.h Normal file → Executable file
View file

0
3party/expat/xmlwf/xmlurl.h Normal file → Executable file
View file

4
3party/expat/xmlwf/xmlwf.c Normal file → Executable file
View file

@ -849,8 +849,10 @@ tmain(int argc, XML_Char **argv)
if (outputType == 'm')
metaEndDocument(parser);
fclose(fp);
if (!result)
if (!result) {
tremove(outName);
exit(2);
}
free(outName);
}
XML_ParserFree(parser);

8
3party/expat/xmlwf/xmlwf.dsp Normal file → Executable file
View file

@ -50,8 +50,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 setargv.obj kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /machine:I386
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
# ADD LINK32 libexpat.lib setargv.obj /nologo /subsystem:console /pdb:none /machine:I386 /libpath:"..\win32\bin\Release" /out:"..\win32\bin\Release\xmlwf.exe"
# SUBTRACT LINK32 /nodefaultlib
!ELSEIF "$(CFG)" == "xmlwf - Win32 Debug"
@ -76,8 +76,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
# ADD LINK32 setargv.obj kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386
# ADD LINK32 libexpat.lib setargv.obj /nologo /subsystem:console /pdb:none /debug /machine:I386 /libpath:"..\win32\bin\Debug" /out:"..\win32\bin\Debug\xmlwf.exe"
!ENDIF

0
3party/expat/xmlwf/xmlwin32url.cxx Normal file → Executable file
View file