summaryrefslogtreecommitdiff
path: root/srclib
diff options
context:
space:
mode:
authorStefan Fritsch <sf@sfritsch.de>2011-12-27 19:42:17 +0100
committerStefan Fritsch <sf@sfritsch.de>2011-12-27 19:42:17 +0100
commit9e615cb6aa4afcee97f8a1646e5a586261a7b81f (patch)
tree0e09fde2404555dc5daf167b38243b5f89c16549 /srclib
parent1acac7a6b494db24f8f58e44dab7657b6de68742 (diff)
downloadapache2-9e615cb6aa4afcee97f8a1646e5a586261a7b81f.tar.gz
Upstream tarball 2.2.8upstream/2.2.8
Diffstat (limited to 'srclib')
-rw-r--r--srclib/apr-util/CHANGES30
-rw-r--r--srclib/apr-util/INSTALL.MySQL14
-rw-r--r--srclib/apr-util/Makefile.win278
-rw-r--r--srclib/apr-util/README.MySQL3
-rw-r--r--srclib/apr-util/aprutil.dsp167
-rw-r--r--srclib/apr-util/aprutil.dsw45
-rw-r--r--srclib/apr-util/apu-config.in12
-rw-r--r--srclib/apr-util/buckets/apr_brigade.c36
-rw-r--r--srclib/apr-util/buckets/apr_buckets.c12
-rw-r--r--srclib/apr-util/buckets/apr_buckets_alloc.c12
-rw-r--r--srclib/apr-util/buckets/apr_buckets_eos.c12
-rw-r--r--srclib/apr-util/buckets/apr_buckets_file.c12
-rw-r--r--srclib/apr-util/buckets/apr_buckets_flush.c12
-rw-r--r--srclib/apr-util/buckets/apr_buckets_heap.c12
-rw-r--r--srclib/apr-util/buckets/apr_buckets_mmap.c12
-rw-r--r--srclib/apr-util/buckets/apr_buckets_pipe.c12
-rw-r--r--srclib/apr-util/buckets/apr_buckets_pool.c12
-rw-r--r--srclib/apr-util/buckets/apr_buckets_refcount.c12
-rw-r--r--srclib/apr-util/buckets/apr_buckets_simple.c12
-rw-r--r--srclib/apr-util/buckets/apr_buckets_socket.c12
-rw-r--r--srclib/apr-util/build-outputs.mk3
-rw-r--r--srclib/apr-util/build/apr_common.m416
-rw-r--r--srclib/apr-util/build/apu-conf.m433
-rw-r--r--srclib/apr-util/build/apu-hints.m412
-rw-r--r--srclib/apr-util/build/apu-iconv.m441
-rw-r--r--srclib/apr-util/build/dbd.m4138
-rw-r--r--srclib/apr-util/build/dbm.m412
-rw-r--r--srclib/apr-util/build/find_apu.m412
-rwxr-xr-xsrclib/apr-util/build/pkg/buildpkg.sh12
-rwxr-xr-xsrclib/apr-util/buildconf12
-rwxr-xr-xsrclib/apr-util/configure682
-rw-r--r--srclib/apr-util/configure.in10
-rw-r--r--srclib/apr-util/crypto/apr_md4.c12
-rw-r--r--srclib/apr-util/crypto/apr_md5.c14
-rw-r--r--srclib/apr-util/crypto/apr_sha1.c12
-rw-r--r--srclib/apr-util/crypto/getuuid.c12
-rw-r--r--srclib/apr-util/crypto/uuid.c12
-rw-r--r--srclib/apr-util/dbd/NWGNUdbdmysql8
-rw-r--r--srclib/apr-util/dbd/NWGNUdbdpgsql2
-rw-r--r--srclib/apr-util/dbd/NWGNUdbdsqli26
-rw-r--r--srclib/apr-util/dbd/NWGNUdbdsqli32
-rw-r--r--srclib/apr-util/dbd/apr_dbd.c12
-rw-r--r--srclib/apr-util/dbd/apr_dbd_mysql.c771
-rw-r--r--srclib/apr-util/dbd/apr_dbd_pgsql.c12
-rw-r--r--srclib/apr-util/dbd/apr_dbd_sqlite2.c12
-rw-r--r--srclib/apr-util/dbd/apr_dbd_sqlite3.c12
-rw-r--r--srclib/apr-util/dbm/apr_dbm.c12
-rw-r--r--srclib/apr-util/dbm/apr_dbm_berkeleydb.c12
-rw-r--r--srclib/apr-util/dbm/apr_dbm_gdbm.c14
-rw-r--r--srclib/apr-util/dbm/apr_dbm_ndbm.c12
-rw-r--r--srclib/apr-util/dbm/apr_dbm_sdbm.c18
-rw-r--r--srclib/apr-util/dbm/sdbm/sdbm.c12
-rw-r--r--srclib/apr-util/dbm/sdbm/sdbm_hash.c12
-rw-r--r--srclib/apr-util/dbm/sdbm/sdbm_lock.c12
-rw-r--r--srclib/apr-util/dbm/sdbm/sdbm_pair.c14
-rw-r--r--srclib/apr-util/dbm/sdbm/sdbm_pair.h12
-rw-r--r--srclib/apr-util/dbm/sdbm/sdbm_private.h12
-rw-r--r--srclib/apr-util/dbm/sdbm/sdbm_tune.h12
-rw-r--r--srclib/apr-util/encoding/apr_base64.c24
-rw-r--r--srclib/apr-util/hooks/apr_hooks.c12
-rw-r--r--srclib/apr-util/include/apr_anylock.h12
-rw-r--r--srclib/apr-util/include/apr_base64.h17
-rw-r--r--srclib/apr-util/include/apr_buckets.h12
-rw-r--r--srclib/apr-util/include/apr_date.h12
-rw-r--r--srclib/apr-util/include/apr_dbd.h28
-rw-r--r--srclib/apr-util/include/apr_dbm.h12
-rw-r--r--srclib/apr-util/include/apr_hooks.h12
-rw-r--r--srclib/apr-util/include/apr_ldap.h.in36
-rw-r--r--srclib/apr-util/include/apr_ldap.hnw12
-rw-r--r--srclib/apr-util/include/apr_ldap.hw19
-rw-r--r--srclib/apr-util/include/apr_ldap_init.h12
-rw-r--r--srclib/apr-util/include/apr_ldap_option.h12
-rw-r--r--srclib/apr-util/include/apr_ldap_url.h12
-rw-r--r--srclib/apr-util/include/apr_md4.h12
-rw-r--r--srclib/apr-util/include/apr_md5.h12
-rw-r--r--srclib/apr-util/include/apr_optional.h12
-rw-r--r--srclib/apr-util/include/apr_optional_hooks.h12
-rw-r--r--srclib/apr-util/include/apr_queue.h12
-rw-r--r--srclib/apr-util/include/apr_reslist.h12
-rw-r--r--srclib/apr-util/include/apr_rmm.h12
-rw-r--r--srclib/apr-util/include/apr_sdbm.h12
-rw-r--r--srclib/apr-util/include/apr_sha1.h12
-rw-r--r--srclib/apr-util/include/apr_strmatch.h12
-rw-r--r--srclib/apr-util/include/apr_uri.h12
-rw-r--r--srclib/apr-util/include/apr_uuid.h12
-rw-r--r--srclib/apr-util/include/apr_xlate.h12
-rw-r--r--srclib/apr-util/include/apr_xml.h12
-rw-r--r--srclib/apr-util/include/apu.h.in12
-rw-r--r--srclib/apr-util/include/apu.hnw33
-rw-r--r--srclib/apr-util/include/apu.hw34
-rw-r--r--srclib/apr-util/include/apu_version.h14
-rw-r--r--srclib/apr-util/include/apu_want.h.in12
-rw-r--r--srclib/apr-util/include/apu_want.hnw12
-rw-r--r--srclib/apr-util/include/apu_want.hw14
-rw-r--r--srclib/apr-util/include/private/apr_dbd_internal.h12
-rw-r--r--srclib/apr-util/include/private/apr_dbm_private.h12
-rw-r--r--srclib/apr-util/include/private/apu_config.h.in3
-rw-r--r--srclib/apr-util/include/private/apu_config.hnw50
-rw-r--r--srclib/apr-util/include/private/apu_config.hw12
-rw-r--r--srclib/apr-util/include/private/apu_select_dbm.h.in12
-rw-r--r--srclib/apr-util/include/private/apu_select_dbm.hnw28
-rw-r--r--srclib/apr-util/include/private/apu_select_dbm.hw24
-rw-r--r--srclib/apr-util/ldap/apr_ldap_init.c12
-rw-r--r--srclib/apr-util/ldap/apr_ldap_option.c12
-rw-r--r--srclib/apr-util/ldap/apr_ldap_url.c12
-rw-r--r--srclib/apr-util/libaprutil.dsp191
-rw-r--r--srclib/apr-util/misc/apr_date.c75
-rw-r--r--srclib/apr-util/misc/apr_queue.c12
-rw-r--r--srclib/apr-util/misc/apr_reslist.c13
-rw-r--r--srclib/apr-util/misc/apr_rmm.c12
-rw-r--r--srclib/apr-util/misc/apu_version.c12
-rw-r--r--srclib/apr-util/strmatch/apr_strmatch.c20
-rw-r--r--srclib/apr-util/test/Makefile.in110
-rw-r--r--srclib/apr-util/test/Makefile.win255
-rw-r--r--srclib/apr-util/test/abts.c3
-rw-r--r--srclib/apr-util/test/abts.h6
-rw-r--r--srclib/apr-util/test/abts_tests.h21
-rw-r--r--srclib/apr-util/test/dbd.c12
-rw-r--r--srclib/apr-util/test/test_apu.h12
-rw-r--r--srclib/apr-util/test/testall.dsw278
-rw-r--r--srclib/apr-util/test/testbuckets.c12
-rw-r--r--srclib/apr-util/test/testdate.c162
-rw-r--r--srclib/apr-util/test/testdbd.c12
-rw-r--r--srclib/apr-util/test/testdbm.c512
-rw-r--r--srclib/apr-util/test/testldap.c12
-rw-r--r--srclib/apr-util/test/testmd4.c14
-rw-r--r--srclib/apr-util/test/testmd5.c14
-rw-r--r--srclib/apr-util/test/testpass.c14
-rw-r--r--srclib/apr-util/test/testqueue.c307
-rw-r--r--srclib/apr-util/test/testreslist.c254
-rw-r--r--srclib/apr-util/test/testrmm.c224
-rw-r--r--srclib/apr-util/test/teststrmatch.c12
-rw-r--r--srclib/apr-util/test/testuri.c12
-rw-r--r--srclib/apr-util/test/testutil.c12
-rw-r--r--srclib/apr-util/test/testutil.h20
-rw-r--r--srclib/apr-util/test/testutildll.dsp266
-rw-r--r--srclib/apr-util/test/testutillib.dsp266
-rw-r--r--srclib/apr-util/test/testuuid.c12
-rw-r--r--srclib/apr-util/test/testxlate.c135
-rw-r--r--srclib/apr-util/test/testxml.c234
-rw-r--r--srclib/apr-util/uri/apr_uri.c12
-rw-r--r--srclib/apr-util/xlate/xlate.c24
-rw-r--r--srclib/apr-util/xml/apr_xml.c14
-rw-r--r--srclib/apr-util/xml/expat/lib/osd_ebcdic_df04_1.h12
-rw-r--r--srclib/apr-util/xml/expat/lib/xml.dsp105
-rw-r--r--srclib/apr/CHANGES65
-rw-r--r--srclib/apr/Makefile.win176
-rw-r--r--srclib/apr/apr.dsp168
-rw-r--r--srclib/apr/apr.dsw36
-rw-r--r--srclib/apr/atomic/os390/atomic.c24
-rw-r--r--srclib/apr/atomic/win32/apr_atomic.c2
-rw-r--r--srclib/apr/build/NWGNUmakefile8
-rw-r--r--srclib/apr/build/apr_app.dsp110
-rw-r--r--srclib/apr/build/apr_common.m416
-rw-r--r--srclib/apr/build/libapr_app.dsp110
-rwxr-xr-xsrclib/apr/configure2248
-rw-r--r--srclib/apr/configure.in82
-rw-r--r--srclib/apr/dso/os390/dso.c2
-rw-r--r--srclib/apr/file_io/netware/filestat.c17
-rw-r--r--srclib/apr/file_io/unix/filestat.c38
-rw-r--r--srclib/apr/file_io/win32/filedup.c116
-rw-r--r--srclib/apr/file_io/win32/open.c72
-rw-r--r--srclib/apr/file_io/win32/readwrite.c2
-rw-r--r--srclib/apr/file_io/win32/seek.c7
-rwxr-xr-xsrclib/apr/helpers/apr_rename.pl106
-rw-r--r--srclib/apr/include/apr.h.in8
-rw-r--r--srclib/apr/include/apr.hnw8
-rw-r--r--srclib/apr/include/apr.hw8
-rw-r--r--srclib/apr/include/apr_file_info.h14
-rw-r--r--srclib/apr/include/apr_file_io.h2
-rw-r--r--srclib/apr/include/apr_network_io.h6
-rw-r--r--srclib/apr/include/apr_shm.h10
-rw-r--r--srclib/apr/include/apr_version.h2
-rw-r--r--srclib/apr/include/arch/unix/apr_arch_file_io.h4
-rw-r--r--srclib/apr/include/arch/unix/apr_private.h.in33
-rw-r--r--srclib/apr/include/arch/win32/apr_arch_file_io.h9
-rw-r--r--srclib/apr/include/arch/win32/apr_arch_misc.h15
-rw-r--r--srclib/apr/libapr.dsp214
-rw-r--r--srclib/apr/memory/unix/apr_pools.c33
-rw-r--r--srclib/apr/misc/unix/rand.c5
-rw-r--r--srclib/apr/misc/win32/env.c5
-rw-r--r--srclib/apr/mmap/unix/common.c4
-rw-r--r--srclib/apr/network_io/unix/inet_pton.c4
-rw-r--r--srclib/apr/network_io/unix/multicast.c13
-rw-r--r--srclib/apr/network_io/unix/sendrecv.c5
-rw-r--r--srclib/apr/network_io/win32/sendrecv.c6
-rw-r--r--srclib/apr/random/unix/apr_random.c4
-rw-r--r--srclib/apr/renames_pending39
-rw-r--r--srclib/apr/shmem/win32/shm.c4
-rw-r--r--srclib/apr/strings/apr_snprintf.c142
-rw-r--r--srclib/apr/test/Makefile.in163
-rw-r--r--srclib/apr/test/Makefile.win284
-rw-r--r--srclib/apr/test/abts.c19
-rw-r--r--srclib/apr/test/abts.h9
-rw-r--r--srclib/apr/test/aprtest.def3
-rw-r--r--srclib/apr/test/aprtest.dsp195
-rw-r--r--srclib/apr/test/aprtest.win18
-rw-r--r--srclib/apr/test/internal/Makefile.win109
-rw-r--r--srclib/apr/test/internal/testucs.c133
-rw-r--r--srclib/apr/test/proc_child.c6
-rw-r--r--srclib/apr/test/sockchild.c4
-rw-r--r--srclib/apr/test/testall.dsw23
-rw-r--r--srclib/apr/test/testapp.dsp102
-rw-r--r--srclib/apr/test/testappnt.dsp113
-rw-r--r--srclib/apr/test/testatomic.c38
-rw-r--r--srclib/apr/test/testdll.dsp442
-rw-r--r--srclib/apr/test/testdso.c6
-rw-r--r--srclib/apr/test/testdup.c8
-rw-r--r--srclib/apr/test/testfile.c30
-rw-r--r--srclib/apr/test/testflock.c2
-rw-r--r--srclib/apr/test/testglobalmutex.c2
-rw-r--r--srclib/apr/test/testhash.c118
-rw-r--r--srclib/apr/test/testipsub.c6
-rw-r--r--srclib/apr/test/testlib.dsp (renamed from srclib/apr/test/testall.dsp)255
-rw-r--r--srclib/apr/test/testlockperf.c6
-rw-r--r--srclib/apr/test/testmmap.c18
-rw-r--r--srclib/apr/test/testmutexscope.c1
-rw-r--r--srclib/apr/test/testnames.c16
-rw-r--r--srclib/apr/test/testoc.c2
-rw-r--r--srclib/apr/test/testpipe.c8
-rw-r--r--srclib/apr/test/testpoll.c4
-rw-r--r--srclib/apr/test/testproc.c6
-rw-r--r--srclib/apr/test/testshm.c37
-rw-r--r--srclib/apr/test/testsock.c6
-rw-r--r--srclib/apr/test/testsockets.c65
-rw-r--r--srclib/apr/test/testutil.h12
-rw-r--r--srclib/apr/threadproc/win32/proc.c103
-rw-r--r--srclib/apr/threadproc/win32/thread.c2
228 files changed, 9295 insertions, 4283 deletions
diff --git a/srclib/apr-util/CHANGES b/srclib/apr-util/CHANGES
index 15b37d87..97f55c70 100644
--- a/srclib/apr-util/CHANGES
+++ b/srclib/apr-util/CHANGES
@@ -1,4 +1,34 @@
-*- coding: utf-8 -*-
+
+Changes with APR-util 1.2.12
+
+ *) Wakeup threads waiting for a reslist resource after a resource was
+ invalidated. [Ruediger Pluem]
+
+ *) Fix GMT offset for several date formats and add a new format.
+ [Maxime Petazzoni <maxime.petazzoni bulix.org>]
+
+ *) Numerous fixes to the test/ framework, including better handling of
+ long size_t comparisons and more consistent Makefile.(in|win) setup
+ for authoring new tests. [William Rowe]
+
+ *) Win32 build fixes including a Makefile.win scheme, fixes for 64P
+ model x86_64 compiles and VC8 builds. [William Rowe]
+
+ *) Type mismatch between apr_datum_t and GDBM's datum type could
+ yield a corrupt apr_datum_t when reading from a GDBM database.
+ PR 43025. [Björn Wiberg <Bjorn.Wiberg its.uu.se>, Davi Arnaut]
+
+ *) Add the #define APR_LDAP_SIZELIMIT that is set appropriately
+ for the LDAP SDK that is being used. Also include ZOS as an
+ LDAP Platform.
+ PR 37814. [David Jones <oscaremma gmail com>, Davi Arnaut]
+
+ *) Fix exported LDFLAGS with new expat detection. PR 43337.
+ [Justin Erenkrantz]
+
+ *) Add MySQL DBD driver [Nick Kew, Bojan Smojver]
+
Changes with APR-util 1.2.10
*) Support BerkeleyDB 4.6. [Arfrever Frehtes Taifersar Arahesis]
diff --git a/srclib/apr-util/INSTALL.MySQL b/srclib/apr-util/INSTALL.MySQL
deleted file mode 100644
index 67718bf9..00000000
--- a/srclib/apr-util/INSTALL.MySQL
+++ /dev/null
@@ -1,14 +0,0 @@
-The MySQL driver is not distributed from apache.org due to licensing issues.
-
-If you wish to build the driver, download apr_dbd_mysql.c from
-http://apache.webthing.com/database/
-and copy it into the dbd directory.
-Now run buildconf, followed by configure.
-
-It is distributed under the GPL to conform with MySQL License terms
-This means it cannot be distributed from apache.org, as that would
-violate ASF policy.
-
-Using the driver with APR and Apache is of course allowed,
-and there is no problem with a third party bundling the driver,
-provided you respect both the ASF and GPL licenses.
diff --git a/srclib/apr-util/Makefile.win b/srclib/apr-util/Makefile.win
new file mode 100644
index 00000000..ba2c55a0
--- /dev/null
+++ b/srclib/apr-util/Makefile.win
@@ -0,0 +1,278 @@
+# Makefile.win for Win32 APR + APR-iconv + APR-util
+#
+# Targets are:
+#
+# buildall - compile everything
+# checkall - run APR + APR-util regression tests
+# install - compile everything
+# clean - mop up everything
+#
+# You can override the build mechansim, choose only one;
+#
+# USEMAK=1 - compile from exported make files
+# USEDSW=1 - compile from .dsw / .dsp VC6 projects
+# USESLN=1 - compile from converted .sln / .vcproj VC7+ files
+#
+# Define ARCH to your desired preference (your PATH must point
+# to the correct compiler tools!) Choose only one;
+#
+# ARCH="Win32 Release"
+# ARCH="Win32 Debug"
+# ARCH="Win32 ReleaseNT"
+# ARCH="Win32 DebugNT"
+# ARCH="x64 Release"
+# ARCH="x64 Debug"
+#
+# Provide the APR_PATH, API_PATH and APU_PATH entirely relative
+# to one another! At this time, building the libraries themselves
+# is only expected to work if the defaults (../apr, ../apr-iconv
+# and ../apr-util) are used, or if they are built with USEMAK=1.
+#
+# APR_PATH=..\apr-1.2.12
+# API_PATH=..\apr-iconv-1.2.1
+# APU_PATH=..\apr-util-1.2.12
+#
+# For example;
+#
+# nmake -f Makefile.win PREFIX=C:\APR buildall checkall installall clean
+#
+
+!IF EXIST("aprutil.sln") && ([devenv /help > NUL 2>&1] == 0) \
+ && !defined(USEMAK) && !defined(USEDSW)
+USESLN=1
+USEMAK=0
+USEDSW=0
+!ELSEIF EXIST("aprutil.mak") && !defined(USEDSW)
+USESLN=0
+USEMAK=1
+USEDSW=0
+!ELSE
+USESLN=0
+USEMAK=0
+USEDSW=1
+!ENDIF
+
+PREFIX=..\apr-dist
+
+!IF [$(COMSPEC) /c cl /nologo /? | find "x64" >NUL ] == 0
+ARCH=x64 Release
+!ELSE
+ARCH=Win32 Release
+!ENDIF
+
+APR_PATH=..\apr
+API_PATH=..\apr-iconv
+APU_PATH=..\apr-util
+
+!MESSAGE ARCH = $(ARCH)
+!MESSAGE APR_PATH = $(APR_PATH)
+!MESSAGE API_PATH = $(API_PATH) (apr-iconv)
+!MESSAGE APU_PATH = $(APU_PATH) (apr-util)
+!MESSAGE PREFIX = $(PREFIX) (install path)
+
+
+# Utility and Translation things, nothing here for the user
+#
+!IF "$(ARCH)" == "Win32 Release"
+SLNARCH=Release|Win32
+ARCHPATH=Release
+LIBSPATH=LibR
+ARCHOSPATH=Release
+LIBSOSPATH=LibR
+!ELSEIF "$(ARCH)" == "Win32 Debug"
+SLNARCH=Debug|Win32
+ARCHPATH=Debug
+LIBSPATH=LibD
+ARCHOSPATH=Debug
+LIBSOSPATH=LibD
+!ELSEIF "$(ARCH)" == "Win32 ReleaseNT"
+SLNARCH=ReleaseNT|Win32
+ARCHPATH=Release
+LIBSPATH=LibR
+ARCHOSPATH=NT\Release
+LIBSOSPATH=NT\LibR
+!ELSEIF "$(ARCH)" == "Win32 DebugNT"
+SLNARCH=DebugNT|Win32
+ARCHPATH=Debug
+LIBSPATH=LibD
+ARCHOSPATH=NT\Debug
+LIBSOSPATH=NT\LibD
+!ELSEIF "$(ARCH)" == "x64 Release"
+SLNARCH=Release|x64
+ARCHPATH=x64\Release
+LIBSPATH=x64\LibR
+ARCHOSPATH=x64\Release
+LIBSOSPATH=x64\LibR
+!ELSEIF "$(ARCH)" == "x64 Debug"
+SLNARCH=Debug|x64
+ARCHPATH=x64\Debug
+LIBSPATH=x64\LibD
+ARCHOSPATH=x64\Debug
+LIBSOSPATH=x64\LibD
+!ENDIF
+
+!IFNDEF MAKEOPT
+# Only default the behavior if MAKEOPT= is omitted
+!IFDEF _NMAKE_VER
+# Microsoft NMake options
+MAKEOPT=-nologo
+!ELSEIF "$(MAKE)" == "make"
+# Borland make options? Not really supported (yet)
+MAKEOPT=-s -N
+!ENDIF
+!ENDIF
+
+
+# Sanity Checks
+#
+!IF !EXIST("$(APR_PATH)\apr.dsp") || !EXIST("$(API_PATH)\apriconv.dsp") \
+ || !EXIST("$(APU_PATH)\aprutil.dsp")
+!MESSAGE Please check out or download and unpack the Apache Portability Runtime
+!MESSAGE sources (apr, apr-iconv and apr-util) under a single parent dir,
+!MESSAGE or provide APR_PATH, API_PATH and APU_PATH (all relative to each other,
+!MESSAGE or all absolute paths).
+!MESSAGE Apache cannot build without these libraries!
+!MESSAGE
+!ERROR Need apr and apr-iconv alongside apr-util to build!
+!ENDIF
+
+
+all: buildall checkall
+
+# To help win32 pick up the locations where they don't fall in the usual
+# path locations. This may not be completely effective for USESLN/USEDSP
+# oriented builds, just yet
+#
+LIB=$(APR_PATH)\$(ARCHOSPATH);$(APR_PATH)\$(LIBSOSPATH);$(API_PATH)\$(ARCHPATH);$(API_PATH)\$(LIBSPATH);$(APU_PATH)\$(ARCHPATH);$(APU_PATH)\$(LIBSPATH);$(LIB)
+INCLUDE=$(APR_PATH)\include;$(API_PATH)\include;$(INCLUDE)
+
+!IF $(USEMAK) == 1
+
+clean:
+ $(MAKE) $(MAKEOPT) -f Makefile.win ARCH="$(ARCH)" \
+ CTARGET=CLEAN buildall
+
+buildall:
+ cd $(APR_PATH)
+ $(MAKE) $(MAKEOPT) -f apr.mak CFG="apr - $(ARCH)" RECURSE=0 $(CTARGET)
+ $(MAKE) $(MAKEOPT) -f libapr.mak CFG="libapr - $(ARCH)" RECURSE=0 $(CTARGET)
+ cd build
+ $(MAKE) $(MAKEOPT) -f apr_app.mak CFG="apr_app - $(ARCH)" RECURSE=0 $(CTARGET)
+ $(MAKE) $(MAKEOPT) -f libapr_app.mak CFG="libapr_app - $(ARCH)" RECURSE=0 $(CTARGET)
+ cd ..
+ cd $(API_PATH)
+ $(MAKE) $(MAKEOPT) -f apriconv.mak CFG="apriconv - $(ARCH)" RECURSE=0 $(CTARGET)
+ $(MAKE) $(MAKEOPT) -f libapriconv.mak CFG="libapriconv - $(ARCH)" RECURSE=0 $(CTARGET)
+!IF "$(CTARGET)" == "CLEAN"
+ $(MAKE) $(MAKEOPT) -f build\modules.mk.win clean \
+ BUILD_MODE="$(ARCH)" BIND_MODE=shared API_SOURCE=.
+!ELSE
+ cd ccs
+ $(MAKE) $(MAKEOPT) -f Makefile.win all \
+ BUILD_MODE="$(ARCH)" BIND_MODE=shared
+ cd ..\ces
+ $(MAKE) $(MAKEOPT) -f Makefile.win all \
+ BUILD_MODE="$(ARCH)" BIND_MODE=shared
+ cd ..
+!ENDIF
+ cd $(APU_PATH)\xml\expat\lib
+ $(MAKE) $(MAKEOPT) -f xml.mak CFG="xml - $(ARCH)" RECURSE=0 $(CTARGET)
+ cd ..\..\..
+ $(MAKE) $(MAKEOPT) -f aprutil.mak CFG="aprutil - $(ARCH)" RECURSE=0 $(CTARGET)
+ $(MAKE) $(MAKEOPT) -f libaprutil.mak CFG="libaprutil - $(ARCH)" RECURSE=0 $(CTARGET)
+
+!ELSEIF $(USESLN) == 1
+
+clean:
+ -devenv aprutil.sln /useenv /clean "$(SLNARCH)" /project libaprutil
+ -devenv aprutil.sln /useenv /clean "$(SLNARCH)" /project libapr_app
+ -devenv aprutil.sln /useenv /clean "$(SLNARCH)" /project aprutil
+ -devenv aprutil.sln /useenv /clean "$(SLNARCH)" /project apr_app
+ cd $(API_PATH)
+ $(MAKE) $(MAKEOPT) -f build\modules.mk.win clean \
+ BUILD_MODE="$(ARCH)" BIND_MODE=shared API_SOURCE=.
+ cd $(APU_PATH)
+
+buildall:
+ devenv aprutil.sln /useenv /build "$(SLNARCH)" /project apr_app
+ devenv aprutil.sln /useenv /build "$(SLNARCH)" /project aprutil
+ devenv aprutil.sln /useenv /build "$(SLNARCH)" /project libapr_app
+ devenv aprutil.sln /useenv /build "$(SLNARCH)" /project libaprutil
+
+!ELSE
+# $(USEDSP) == 1
+
+clean:
+ -msdev aprutil.dsw /USEENV /MAKE "libaprutil - $(ARCH)" /CLEAN
+ -msdev aprutil.dsw /USEENV /MAKE "libapr_app - $(ARCH)" /CLEAN
+ -msdev aprutil.dsw /USEENV /MAKE "aprutil - $(ARCH)" /CLEAN
+ -msdev aprutil.dsw /USEENV /MAKE "apr_app - $(ARCH)" /CLEAN
+ cd $(API_PATH)
+ $(MAKE) $(MAKEOPT) -f build\modules.mk.win clean \
+ BUILD_MODE="$(ARCH)" BIND_MODE=shared API_SOURCE=.
+ cd $(APU_PATH)
+
+buildall:
+ @msdev aprutil.dsw /USEENV /MAKE "apr_app - $(ARCH)"
+ @msdev aprutil.dsw /USEENV /MAKE "aprutil - $(ARCH)"
+ @msdev aprutil.dsw /USEENV /MAKE "libapr_app - $(ARCH)"
+ @msdev aprutil.dsw /USEENV /MAKE "libaprutil - $(ARCH)"
+
+!ENDIF
+
+
+checkapr:
+ cd $(APR_PATH)\test
+ $(MAKE) $(MAKEOPT) -f Makefile.win MODEL=static \
+ OUTDIR=$(LIBSOSPATH) check
+ $(MAKE) $(MAKEOPT) -f Makefile.win MODEL=dynamic \
+ OUTDIR=$(ARCHOSPATH) check
+ cd ..
+ cd $(APU_PATH)
+
+checkapu:
+ cd $(APU_PATH)
+ cd test
+ $(MAKE) $(MAKEOPT) -f Makefile.win MODEL=static \
+ OUTDIR=$(LIBSPATH) APROUTDIR=$(LIBSOSPATH) \
+ APR_PATH=..\$(APR_PATH) API_PATH=..\$(API_PATH) check
+ $(MAKE) $(MAKEOPT) -f Makefile.win MODEL=dynamic \
+ OUTDIR=$(ARCHPATH) APROUTDIR=$(ARCHOSPATH) \
+ APR_PATH=..\$(APR_PATH) API_PATH=..\$(API_PATH) check
+ cd ..
+
+checkall: checkapr checkapu
+
+
+install:
+ echo Y >.y
+ echo A >.A
+ @if NOT EXIST "$(PREFIX)\." mkdir "$(PREFIX)"
+ @if NOT EXIST "$(PREFIX)\bin\." mkdir "$(PREFIX)\bin"
+ @if NOT EXIST "$(PREFIX)\bin\iconv\." mkdir "$(PREFIX)\bin\iconv"
+ @if NOT EXIST "$(PREFIX)\include\." mkdir "$(PREFIX)\include"
+ @if NOT EXIST "$(PREFIX)\lib\." mkdir "$(PREFIX)\lib"
+ copy CHANGES "$(PREFIX)\CHANGES.txt" <.y
+ copy LICENSE "$(PREFIX)\LICENSE.txt" <.y
+ copy NOTICE "$(PREFIX)\NOTICE.txt" <.y
+ xcopy $(APR_PATH)\include\*.h "$(PREFIX)\include\" /d < .a
+ xcopy $(APU_PATH)\include\*.h "$(PREFIX)\include\" /d < .a
+ copy $(APR_PATH)\$(LIBSOSPATH)\apr-1.lib "$(PREFIX)\lib\" <.y
+ copy $(APR_PATH)\$(LIBSOSPATH)\apr-1.pdb "$(PREFIX)\lib\" <.y
+ copy $(APU_PATH)\$(LIBSPATH)\aprutil-1.lib "$(PREFIX)\lib\" <.y
+ copy $(APU_PATH)\$(LIBSPATH)\aprutil-1.pdb "$(PREFIX)\lib\" <.y
+ copy $(APR_PATH)\$(ARCHOSPATH)\libapr-1.lib "$(PREFIX)\lib\" <.y
+ copy $(APR_PATH)\$(ARCHOSPATH)\libapr-1.exp "$(PREFIX)\lib\" <.y
+ copy $(APU_PATH)\$(ARCHPATH)\libaprutil-1.lib "$(PREFIX)\lib\" <.y
+ copy $(APU_PATH)\$(ARCHPATH)\libaprutil-1.exp "$(PREFIX)\lib\" <.y
+ copy $(APR_PATH)\$(ARCHOSPATH)\libapr-1.dll "$(PREFIX)\bin\" <.y
+ copy $(APR_PATH)\$(ARCHOSPATH)\libapr-1.pdb "$(PREFIX)\bin\" <.y
+ copy $(API_PATH)\$(ARCHPATH)\libapriconv-1.dll "$(PREFIX)\bin\" <.y
+ copy $(API_PATH)\$(ARCHPATH)\libapriconv-1.pdb "$(PREFIX)\bin\" <.y
+ copy $(APU_PATH)\$(ARCHPATH)\libaprutil-1.dll "$(PREFIX)\bin\" <.y
+ copy $(APU_PATH)\$(ARCHPATH)\libaprutil-1.pdb "$(PREFIX)\bin\" <.y
+ xcopy $(API_PATH)\$(ARCHPATH)\iconv\*.so "$(PREFIX)\bin\iconv\" /d < .a
+ xcopy $(API_PATH)\$(ARCHPATH)\iconv\*.pdb "$(PREFIX)\bin\iconv\" /d < .a
+ del .y
+ del .a
+
diff --git a/srclib/apr-util/README.MySQL b/srclib/apr-util/README.MySQL
new file mode 100644
index 00000000..e3af3488
--- /dev/null
+++ b/srclib/apr-util/README.MySQL
@@ -0,0 +1,3 @@
+As of apr-util version 1.2.11, MySQL DBD driver is shipped as part of the
+distribution. However, unless you specify --with-mysql option to configure,
+MySQL DBD driver will NOT be built to avoid ABI breakage.
diff --git a/srclib/apr-util/aprutil.dsp b/srclib/apr-util/aprutil.dsp
index efa1f823..9fd6d2db 100644
--- a/srclib/apr-util/aprutil.dsp
+++ b/srclib/apr-util/aprutil.dsp
@@ -4,7 +4,7 @@
# TARGTYPE "Win32 (x86) Static Library" 0x0104
-CFG=aprutil - Win32 Debug
+CFG=aprutil - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
@@ -13,12 +13,14 @@ CFG=aprutil - Win32 Debug
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
-!MESSAGE NMAKE /f "aprutil.mak" CFG="aprutil - Win32 Debug"
+!MESSAGE NMAKE /f "aprutil.mak" CFG="aprutil - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "aprutil - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "aprutil - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE "aprutil - x64 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "aprutil - x64 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
@@ -41,7 +43,7 @@ RSC=rc.exe
# PROP Intermediate_Dir "LibR"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
-# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "./include" /I "../apr/include" /I "./include/private" /I "../apr-iconv/include" /I "./dbm/sdbm" /I "./xml/expat/lib" /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "API_DECLARE_STATIC" /D "APU_USE_SDBM" /D "XML_STATIC" /D "WIN32" /D "_WINDOWS" /Fd"LibR\aprutil_src" /FD /c
+# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "./include" /I "../apr/include" /I "./include/private" /I "../apr-iconv/include" /I "./dbm/sdbm" /I "./xml/expat/lib" /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "API_DECLARE_STATIC" /D "APU_USE_SDBM" /D "XML_STATIC" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\aprutil-1" /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
@@ -65,7 +67,7 @@ LIB32=link.exe -lib
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
-# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "./include" /I "../apr/include" /I "./include/private" /I "../apr-iconv/include" /I "./dbm/sdbm" /I "./xml/expat/lib" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "API_DECLARE_STATIC" /D "APU_USE_SDBM" /D "XML_STATIC" /D "WIN32" /D "_WINDOWS" /Fd"LibD\aprutil_src" /FD /c
+# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "./include" /I "../apr/include" /I "./include/private" /I "../apr-iconv/include" /I "./dbm/sdbm" /I "./xml/expat/lib" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "API_DECLARE_STATIC" /D "APU_USE_SDBM" /D "XML_STATIC" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\aprutil-1" /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
@@ -75,12 +77,61 @@ LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"LibD\aprutil-1.lib"
+!ELSEIF "$(CFG)" == "aprutil - x64 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "x64\LibR"
+# PROP BASE Intermediate_Dir "x64\LibR"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "x64\LibR"
+# PROP Intermediate_Dir "x64\LibR"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "../apr/include" /I "./include/private" /I "../apr-iconv/include" /I "./dbm/sdbm" /I "./xml/expat/lib" /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "API_DECLARE_STATIC" /D "APU_USE_SDBM" /D "XML_STATIC" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\aprutil-1" /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"x64\LibR\aprutil-1.lib"
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "x64\LibD"
+# PROP BASE Intermediate_Dir "x64\LibD"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "x64\LibD"
+# PROP Intermediate_Dir "x64\LibD"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "../apr/include" /I "./include/private" /I "../apr-iconv/include" /I "./dbm/sdbm" /I "./xml/expat/lib" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "API_DECLARE_STATIC" /D "APU_USE_SDBM" /D "XML_STATIC" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\aprutil-1" /FD /EHsc /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"x64\LibD\aprutil-1.lib"
+
!ENDIF
# Begin Target
# Name "aprutil - Win32 Release"
# Name "aprutil - Win32 Debug"
+# Name "aprutil - x64 Release"
+# Name "aprutil - x64 Debug"
# Begin Group "Source Files"
# PROP Default_Filter ""
@@ -172,6 +223,10 @@ SOURCE=.\dbd\apr_dbd.c
# End Source File
# Begin Source File
+SOURCE=.\dbd\apr_dbd_mysql.c
+# End Source File
+# Begin Source File
+
SOURCE=.\dbd\apr_dbd_pgsql.c
# End Source File
# Begin Source File
@@ -359,6 +414,26 @@ InputPath=.\include\apr_ldap.hw
# End Custom Build
+!ELSEIF "$(CFG)" == "aprutil - x64 Release"
+
+# Begin Custom Build - Creating apr_ldap.h from apr_ldap.hw
+InputPath=.\include\apr_ldap.hw
+
+".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apr_ldap.hw > .\include\apr_ldap.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Debug"
+
+# Begin Custom Build - Creating apr_ldap.h from apr_ldap.hw
+InputPath=.\include\apr_ldap.hw
+
+".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apr_ldap.hw > .\include\apr_ldap.h
+
+# End Custom Build
+
!ENDIF
# End Source File
@@ -394,6 +469,26 @@ InputPath=.\include\apu.hw
# End Custom Build
+!ELSEIF "$(CFG)" == "aprutil - x64 Release"
+
+# Begin Custom Build - Creating apu.h from apu.hw
+InputPath=.\include\apu.hw
+
+".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apu.hw > .\include\apu.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Debug"
+
+# Begin Custom Build - Creating apu.h from apu.hw
+InputPath=.\include\apu.hw
+
+".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apu.hw > .\include\apu.h
+
+# End Custom Build
+
!ENDIF
# End Source File
@@ -425,6 +520,26 @@ InputPath=.\include\private\apu_config.hw
# End Custom Build
+!ELSEIF "$(CFG)" == "aprutil - x64 Release"
+
+# Begin Custom Build - Creating apu_config.h from apu_config.hw
+InputPath=.\include\private\apu_config.hw
+
+".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\private\apu_config.hw > .\include\private\apu_config.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Debug"
+
+# Begin Custom Build - Creating apu_config.h from apu_config.hw
+InputPath=.\include\private\apu_config.hw
+
+".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\private\apu_config.hw > .\include\private\apu_config.h
+
+# End Custom Build
+
!ENDIF
# End Source File
@@ -456,6 +571,26 @@ InputPath=.\include\private\apu_select_dbm.hw
# End Custom Build
+!ELSEIF "$(CFG)" == "aprutil - x64 Release"
+
+# Begin Custom Build - Creating apu_select_dbm.h from apu_select_dbm.hw
+InputPath=.\include\private\apu_select_dbm.hw
+
+".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\private\apu_select_dbm.hw > .\include\private\apu_select_dbm.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Debug"
+
+# Begin Custom Build - Creating apu_select_dbm.h from apu_select_dbm.hw
+InputPath=.\include\private\apu_select_dbm.hw
+
+".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\private\apu_select_dbm.hw > .\include\private\apu_select_dbm.h
+
+# End Custom Build
+
!ENDIF
# End Source File
@@ -491,6 +626,26 @@ InputPath=.\include\apu_want.hw
# End Custom Build
+!ELSEIF "$(CFG)" == "aprutil - x64 Release"
+
+# Begin Custom Build - Creating apu_want.h from apu_want.hw
+InputPath=.\include\apu_want.hw
+
+".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apu_want.hw > .\include\apu_want.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Debug"
+
+# Begin Custom Build - Creating apu_want.h from apu_want.hw
+InputPath=.\include\apu_want.hw
+
+".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apu_want.hw > .\include\apu_want.h
+
+# End Custom Build
+
!ENDIF
# End Source File
@@ -582,6 +737,10 @@ SOURCE=.\include\apr_xlate.h
SOURCE=.\include\apr_xml.h
# End Source File
+# Begin Source File
+
+SOURCE=.\include\apu_version.h
+# End Source File
# End Group
# End Target
# End Project
diff --git a/srclib/apr-util/aprutil.dsw b/srclib/apr-util/aprutil.dsw
index 75352c29..a96e3a05 100644
--- a/srclib/apr-util/aprutil.dsw
+++ b/srclib/apr-util/aprutil.dsw
@@ -15,7 +15,7 @@ Package=<4>
###############################################################################
-Project: "apriconv"="..\apr-iconv\apriconv.dsp" - Package Owner=<4>
+Project: "apr_app"="..\apr\build\apr_app.dsp" - Package Owner=<4>
Package=<5>
{{{
@@ -30,7 +30,7 @@ Package=<4>
###############################################################################
-Project: "aprutil"=".\aprutil.dsp" - Package Owner=<4>
+Project: "apriconv"="..\apr-iconv\apriconv.dsp" - Package Owner=<4>
Package=<5>
{{{
@@ -41,11 +41,23 @@ Package=<4>
Begin Project Dependency
Project_Dep_Name apr
End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "aprutil"=".\aprutil.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
Begin Project Dependency
- Project_Dep_Name xml
+ Project_Dep_Name apriconv
End Project Dependency
Begin Project Dependency
- Project_Dep_Name apriconv
+ Project_Dep_Name xml
End Project Dependency
}}}
@@ -63,6 +75,21 @@ Package=<4>
###############################################################################
+Project: "libapr_app"="..\apr\build\libapr_app.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libapr
+ End Project Dependency
+}}}
+
+###############################################################################
+
Project: "libapriconv"="..\apr-iconv\libapriconv.dsp" - Package Owner=<4>
Package=<5>
@@ -126,10 +153,16 @@ Package=<4>
Project_Dep_Name libapr
End Project Dependency
Begin Project Dependency
- Project_Dep_Name xml
+ Project_Dep_Name libapriconv
End Project Dependency
Begin Project Dependency
- Project_Dep_Name libapriconv
+ Project_Dep_Name libapriconv_ccs_modules
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libapriconv_ces_modules
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name xml
End Project Dependency
}}}
diff --git a/srclib/apr-util/apu-config.in b/srclib/apr-util/apu-config.in
index b4d896e0..cb28dc25 100644
--- a/srclib/apr-util/apu-config.in
+++ b/srclib/apr-util/apu-config.in
@@ -1,10 +1,10 @@
#!/bin/sh
-# Copyright 2001-2005 The Apache Software Foundation or its licensors, as
-# applicable.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
diff --git a/srclib/apr-util/buckets/apr_brigade.c b/srclib/apr-util/buckets/apr_brigade.c
index 69813f29..b5d938a9 100644
--- a/srclib/apr-util/buckets/apr_brigade.c
+++ b/srclib/apr-util/buckets/apr_brigade.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -29,6 +29,12 @@
#include <sys/uio.h>
#endif
+/* TODO: ~((apr_size_t)0) appears to be the best way to quickly
+ * represent MAX_APR_SIZE_T for any CPU we support. Move this
+ * out as APR_MAX_SIZE_T to our public headers...
+ */
+#define MAX_APR_SIZE_T (~((apr_size_t)0))
+
static apr_status_t brigade_cleanup(void *data)
{
return apr_brigade_cleanup(data);
@@ -114,7 +120,10 @@ APU_DECLARE(apr_status_t) apr_brigade_partition(apr_bucket_brigade *b,
e != APR_BRIGADE_SENTINEL(b);
e = APR_BUCKET_NEXT(e))
{
- if ((e->length == (apr_size_t)(-1)) && (point > (apr_size_t)(-1))) {
+ /* For an unknown length bucket, while 'point' is beyond the possible
+ * size contained in apr_size_t, read and continue...
+ */
+ if ((e->length == (apr_size_t)(-1)) && (point > MAX_APR_SIZE_T)) {
/* point is too far out to simply split this bucket,
* we must fix this bucket's size and keep going... */
rv = apr_bucket_read(e, &s, &len, APR_BLOCK_READ);
@@ -123,9 +132,12 @@ APU_DECLARE(apr_status_t) apr_brigade_partition(apr_bucket_brigade *b,
return rv;
}
}
- if ((point < e->length) || (e->length == (apr_size_t)(-1))) {
- /* We already checked e->length -1 above, so we now
- * trust e->length < MAX_APR_SIZE_T.
+ else if (((apr_size_t)point < e->length) || (e->length == (apr_size_t)(-1))) {
+ /* We already consumed buckets where point is beyond
+ * our interest ( point > MAX_APR_SIZE_T ), above.
+ * Here point falls between 0 and MAX_APR_SIZE_T
+ * and is within this bucket, or this bucket's len
+ * is undefined, so now we are ready to split it.
* First try to split the bucket natively... */
if ((rv = apr_bucket_split(e, (apr_size_t)point))
!= APR_ENOTIMPL) {
@@ -144,7 +156,7 @@ APU_DECLARE(apr_status_t) apr_brigade_partition(apr_bucket_brigade *b,
/* this assumes that len == e->length, which is okay because e
* might have been morphed by the apr_bucket_read() above, but
* if it was, the length would have been adjusted appropriately */
- if (point < e->length) {
+ if ((apr_size_t)point < e->length) {
rv = apr_bucket_split(e, (apr_size_t)point);
*after_point = APR_BUCKET_NEXT(e);
return rv;
@@ -342,7 +354,7 @@ APU_DECLARE(apr_status_t) apr_brigade_to_iovec(apr_bucket_brigade *b,
++vec;
}
- *nvec = vec - orig;
+ *nvec = (int)(vec - orig);
return APR_SUCCESS;
}
diff --git a/srclib/apr-util/buckets/apr_buckets.c b/srclib/apr-util/buckets/apr_buckets.c
index 69b7f6cf..802f4e25 100644
--- a/srclib/apr-util/buckets/apr_buckets.c
+++ b/srclib/apr-util/buckets/apr_buckets.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/buckets/apr_buckets_alloc.c b/srclib/apr-util/buckets/apr_buckets_alloc.c
index 81a82714..76031c76 100644
--- a/srclib/apr-util/buckets/apr_buckets_alloc.c
+++ b/srclib/apr-util/buckets/apr_buckets_alloc.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/buckets/apr_buckets_eos.c b/srclib/apr-util/buckets/apr_buckets_eos.c
index 5783857d..25cff756 100644
--- a/srclib/apr-util/buckets/apr_buckets_eos.c
+++ b/srclib/apr-util/buckets/apr_buckets_eos.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/buckets/apr_buckets_file.c b/srclib/apr-util/buckets/apr_buckets_file.c
index 7462bb70..214b53d2 100644
--- a/srclib/apr-util/buckets/apr_buckets_file.c
+++ b/srclib/apr-util/buckets/apr_buckets_file.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/buckets/apr_buckets_flush.c b/srclib/apr-util/buckets/apr_buckets_flush.c
index 68b6bfa2..a5d84d75 100644
--- a/srclib/apr-util/buckets/apr_buckets_flush.c
+++ b/srclib/apr-util/buckets/apr_buckets_flush.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/buckets/apr_buckets_heap.c b/srclib/apr-util/buckets/apr_buckets_heap.c
index d1ebd294..00f9808b 100644
--- a/srclib/apr-util/buckets/apr_buckets_heap.c
+++ b/srclib/apr-util/buckets/apr_buckets_heap.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/buckets/apr_buckets_mmap.c b/srclib/apr-util/buckets/apr_buckets_mmap.c
index 3e7a9d73..19de291b 100644
--- a/srclib/apr-util/buckets/apr_buckets_mmap.c
+++ b/srclib/apr-util/buckets/apr_buckets_mmap.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/buckets/apr_buckets_pipe.c b/srclib/apr-util/buckets/apr_buckets_pipe.c
index 36c0cd55..46b46970 100644
--- a/srclib/apr-util/buckets/apr_buckets_pipe.c
+++ b/srclib/apr-util/buckets/apr_buckets_pipe.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/buckets/apr_buckets_pool.c b/srclib/apr-util/buckets/apr_buckets_pool.c
index 2226a751..56ba585e 100644
--- a/srclib/apr-util/buckets/apr_buckets_pool.c
+++ b/srclib/apr-util/buckets/apr_buckets_pool.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/buckets/apr_buckets_refcount.c b/srclib/apr-util/buckets/apr_buckets_refcount.c
index 72747878..0e765d94 100644
--- a/srclib/apr-util/buckets/apr_buckets_refcount.c
+++ b/srclib/apr-util/buckets/apr_buckets_refcount.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/buckets/apr_buckets_simple.c b/srclib/apr-util/buckets/apr_buckets_simple.c
index aabe0864..cef748be 100644
--- a/srclib/apr-util/buckets/apr_buckets_simple.c
+++ b/srclib/apr-util/buckets/apr_buckets_simple.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/buckets/apr_buckets_socket.c b/srclib/apr-util/buckets/apr_buckets_socket.c
index 7885d08e..68eae43b 100644
--- a/srclib/apr-util/buckets/apr_buckets_socket.c
+++ b/srclib/apr-util/buckets/apr_buckets_socket.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/build-outputs.mk b/srclib/apr-util/build-outputs.mk
index cf154fcf..cc4ee01d 100644
--- a/srclib/apr-util/build-outputs.mk
+++ b/srclib/apr-util/build-outputs.mk
@@ -42,11 +42,12 @@ xml/apr_xml.lo: xml/apr_xml.c .make.dirs include/apr_xml.h include/apr_xlate.h
strmatch/apr_strmatch.lo: strmatch/apr_strmatch.c .make.dirs include/apr_strmatch.h
xlate/xlate.lo: xlate/xlate.c .make.dirs include/apr_xlate.h
dbd/apr_dbd.lo: dbd/apr_dbd.c .make.dirs include/apr_dbd.h
+dbd/apr_dbd_mysql.lo: dbd/apr_dbd_mysql.c .make.dirs include/apu_version.h include/apr_buckets.h
dbd/apr_dbd_pgsql.lo: dbd/apr_dbd_pgsql.c .make.dirs
dbd/apr_dbd_sqlite2.lo: dbd/apr_dbd_sqlite2.c .make.dirs
dbd/apr_dbd_sqlite3.lo: dbd/apr_dbd_sqlite3.c .make.dirs
-OBJECTS_all = buckets/apr_brigade.lo buckets/apr_buckets.lo buckets/apr_buckets_alloc.lo buckets/apr_buckets_eos.lo buckets/apr_buckets_file.lo buckets/apr_buckets_flush.lo buckets/apr_buckets_heap.lo buckets/apr_buckets_mmap.lo buckets/apr_buckets_pipe.lo buckets/apr_buckets_pool.lo buckets/apr_buckets_refcount.lo buckets/apr_buckets_simple.lo buckets/apr_buckets_socket.lo crypto/apr_md4.lo crypto/apr_md5.lo crypto/apr_sha1.lo crypto/getuuid.lo crypto/uuid.lo dbm/apr_dbm.lo dbm/apr_dbm_berkeleydb.lo dbm/apr_dbm_gdbm.lo dbm/apr_dbm_ndbm.lo dbm/apr_dbm_sdbm.lo dbm/sdbm/sdbm.lo dbm/sdbm/sdbm_hash.lo dbm/sdbm/sdbm_lock.lo dbm/sdbm/sdbm_pair.lo encoding/apr_base64.lo hooks/apr_hooks.lo ldap/apr_ldap_init.lo ldap/apr_ldap_option.lo ldap/apr_ldap_url.lo misc/apr_date.lo misc/apr_queue.lo misc/apr_reslist.lo misc/apr_rmm.lo misc/apu_version.lo uri/apr_uri.lo xml/apr_xml.lo strmatch/apr_strmatch.lo xlate/xlate.lo dbd/apr_dbd.lo dbd/apr_dbd_pgsql.lo dbd/apr_dbd_sqlite2.lo dbd/apr_dbd_sqlite3.lo
+OBJECTS_all = buckets/apr_brigade.lo buckets/apr_buckets.lo buckets/apr_buckets_alloc.lo buckets/apr_buckets_eos.lo buckets/apr_buckets_file.lo buckets/apr_buckets_flush.lo buckets/apr_buckets_heap.lo buckets/apr_buckets_mmap.lo buckets/apr_buckets_pipe.lo buckets/apr_buckets_pool.lo buckets/apr_buckets_refcount.lo buckets/apr_buckets_simple.lo buckets/apr_buckets_socket.lo crypto/apr_md4.lo crypto/apr_md5.lo crypto/apr_sha1.lo crypto/getuuid.lo crypto/uuid.lo dbm/apr_dbm.lo dbm/apr_dbm_berkeleydb.lo dbm/apr_dbm_gdbm.lo dbm/apr_dbm_ndbm.lo dbm/apr_dbm_sdbm.lo dbm/sdbm/sdbm.lo dbm/sdbm/sdbm_hash.lo dbm/sdbm/sdbm_lock.lo dbm/sdbm/sdbm_pair.lo encoding/apr_base64.lo hooks/apr_hooks.lo ldap/apr_ldap_init.lo ldap/apr_ldap_option.lo ldap/apr_ldap_url.lo misc/apr_date.lo misc/apr_queue.lo misc/apr_reslist.lo misc/apr_rmm.lo misc/apu_version.lo uri/apr_uri.lo xml/apr_xml.lo strmatch/apr_strmatch.lo xlate/xlate.lo dbd/apr_dbd.lo dbd/apr_dbd_mysql.lo dbd/apr_dbd_pgsql.lo dbd/apr_dbd_sqlite2.lo dbd/apr_dbd_sqlite3.lo
OBJECTS_unix = $(OBJECTS_all)
diff --git a/srclib/apr-util/build/apr_common.m4 b/srclib/apr-util/build/apr_common.m4
index 90793ee1..caae9bfa 100644
--- a/srclib/apr-util/build/apr_common.m4
+++ b/srclib/apr-util/build/apr_common.m4
@@ -959,3 +959,19 @@ fi
AC_SUBST(MKDEP)
])
+
+dnl
+dnl APR_CHECK_TYPES_COMPATIBLE(TYPE-1, TYPE-2, [ACTION-IF-TRUE])
+dnl
+dnl Try to determine whether two types are the same. Only works
+dnl for gcc and icc.
+dnl
+AC_DEFUN([APR_CHECK_TYPES_COMPATIBLE], [
+define([apr_cvname], apr_cv_typematch_[]translit([$1], [ ], [_])_[]translit([$2], [ ], [_]))
+AC_CACHE_CHECK([whether $1 and $2 are the same], apr_cvname, [
+AC_TRY_COMPILE(AC_INCLUDES_DEFAULT, [
+ int foo[0 - !__builtin_types_compatible_p($1, $2)];
+], [apr_cvname=yes
+$3], [apr_cvname=no])])
+])
+
diff --git a/srclib/apr-util/build/apu-conf.m4 b/srclib/apr-util/build/apu-conf.m4
index cba3fd65..157980b8 100644
--- a/srclib/apr-util/build/apu-conf.m4
+++ b/srclib/apr-util/build/apu-conf.m4
@@ -1,10 +1,10 @@
dnl -------------------------------------------------------- -*- autoconf -*-
-dnl Copyright 2000-2005 The Apache Software Foundation or its licensors, as
-dnl applicable.
-dnl
-dnl Licensed under the Apache License, Version 2.0 (the "License");
-dnl you may not use this file except in compliance with the License.
-dnl You may obtain a copy of the License at
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements. See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License. You may obtain a copy of the License at
dnl
dnl http://www.apache.org/licenses/LICENSE-2.0
dnl
@@ -111,7 +111,8 @@ AC_DEFUN([APU_SYSTEM_EXPAT], [
APU_TRY_EXPAT_LINK([Expat 1.95.x in /usr/local],
apu_cv_expat_usrlocal, [expat.h], [-lexpat],
- [APR_ADDTO(APRUTIL_INCLUDES, [-I/usr/local/include])],[
+ [APR_ADDTO(APRUTIL_INCLUDES, [-I/usr/local/include])
+ APR_ADDTO(APRUTIL_LDFLAGS, [-L/usr/local/lib])],[
APR_REMOVEFROM(LDFLAGS, [-L/usr/local/lib])
APR_REMOVEFROM(CPPFLAGS, [-I/usr/local/include])
])
@@ -124,6 +125,9 @@ dnl APU_FIND_EXPAT: figure out where EXPAT is located (or use bundled)
dnl
AC_DEFUN([APU_FIND_EXPAT], [
+save_cppflags="$CPPFLAGS"
+save_ldflags="$LDFLAGS"
+
apu_has_expat=0
# Default: will use either external or bundled expat.
@@ -144,6 +148,7 @@ AC_ARG_WITH([expat],
APR_ADDTO(LDFLAGS, [-L$withval/lib])
APR_ADDTO(CPPFLAGS, [-I$withval/include])
APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include])
+ APR_ADDTO(APRUTIL_LDFLAGS, [-L$withval/lib])
fi
# ...and refuse to fall back on the builtin expat.
apu_try_builtin_expat=0
@@ -169,6 +174,9 @@ APR_ADDTO(APRUTIL_LIBS, [$apu_expat_libs])
APR_XML_DIR=$bundled_subdir
AC_SUBST(APR_XML_DIR)
+
+CPPFLAGS=$save_cppflags
+LDFLAGS=$save_ldflags
])
@@ -219,6 +227,7 @@ apu_has_ldap_novell="0"
apu_has_ldap_microsoft="0"
apu_has_ldap_netscape="0"
apu_has_ldap_mozilla="0"
+apu_has_ldap_zos="0"
apu_has_ldap_other="0"
AC_ARG_WITH(ldap-include,[ --with-ldap-include=path path to ldap include files with trailing slash])
@@ -320,6 +329,15 @@ dnl The iPlanet C SDK 5.0 is as yet untested...
apr_cv_ldap_toolkit="Mozilla"])
fi
if test "x$apr_cv_ldap_toolkit" = "x"; then
+ case "$host" in
+ *-ibm-os390)
+ AC_EGREP_CPP([IBM], [$lber_h
+ $ldap_h], [apu_has_ldap_zos="1"
+ apr_cv_ldap_toolkit="zOS"])
+ ;;
+ esac
+ fi
+ if test "x$apr_cv_ldap_toolkit" = "x"; then
apu_has_ldap_other="1"
apr_cv_ldap_toolkit="unknown"
fi
@@ -348,6 +366,7 @@ AC_SUBST(apu_has_ldap_novell)
AC_SUBST(apu_has_ldap_microsoft)
AC_SUBST(apu_has_ldap_netscape)
AC_SUBST(apu_has_ldap_mozilla)
+AC_SUBST(apu_has_ldap_zos)
AC_SUBST(apu_has_ldap_other)
])
diff --git a/srclib/apr-util/build/apu-hints.m4 b/srclib/apr-util/build/apu-hints.m4
index ecdb384e..6d6784a8 100644
--- a/srclib/apr-util/build/apu-hints.m4
+++ b/srclib/apr-util/build/apu-hints.m4
@@ -1,10 +1,10 @@
dnl -------------------------------------------------------- -*- autoconf -*-
-dnl Copyright 2003-2005 The Apache Software Foundation or its licensors, as
-dnl applicable.
-dnl
-dnl Licensed under the Apache License, Version 2.0 (the "License");
-dnl you may not use this file except in compliance with the License.
-dnl You may obtain a copy of the License at
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements. See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License. You may obtain a copy of the License at
dnl
dnl http://www.apache.org/licenses/LICENSE-2.0
dnl
diff --git a/srclib/apr-util/build/apu-iconv.m4 b/srclib/apr-util/build/apu-iconv.m4
index b27b75ce..13042273 100644
--- a/srclib/apr-util/build/apu-iconv.m4
+++ b/srclib/apr-util/build/apu-iconv.m4
@@ -1,10 +1,10 @@
dnl -------------------------------------------------------- -*- autoconf -*-
-dnl Copyright 2002-2005 The Apache Software Foundation, or its licensors, as
-dnl applicable.
-dnl
-dnl Licensed under the Apache License, Version 2.0 (the "License");
-dnl you may not use this file except in compliance with the License.
-dnl You may obtain a copy of the License at
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements. See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License. You may obtain a copy of the License at
dnl
dnl http://www.apache.org/licenses/LICENSE-2.0
dnl
@@ -35,21 +35,30 @@ AC_DEFUN([APU_FIND_ICONV], [
apu_iconv_dir="unknown"
have_apr_iconv="0"
+want_iconv="1"
AC_ARG_WITH(iconv,[ --with-iconv[=DIR] path to iconv installation],
[ apu_iconv_dir="$withval"
- if test "$apu_iconv_dir" != "yes"; then
- APR_ADDTO(CPPFLAGS,[-I$apu_iconv_dir/include])
- APR_ADDTO(LDFLAGS,[-L$apu_iconv_dir/lib])
- fi
- if test -f "$apu_iconv_dir/include/api_version.h"; then
- have_apr_iconv="1"
+ if test "$apu_iconv_dir" = "no"; then
+ have_apr_iconv="0"
have_iconv="0"
- APR_REMOVEFROM(LIBS,[-lapriconv])
- AC_MSG_RESULT("Using apr-iconv")
+ want_iconv="0"
+ elif test "$apu_iconv_dir" != "yes"; then
+ if test -f "$apu_iconv_dir/include/apr-1/api_version.h"; then
+ have_apr_iconv="1"
+ have_iconv="0"
+ APR_ADDTO(APRUTIL_INCLUDES,[-I$apu_iconv_dir/include/apr-1])
+ APR_ADDTO(APRUTIL_LIBS,[$apu_iconv_dir/lib/libapriconv-1.la])
+ AC_MSG_RESULT(using apr-iconv)
+ elif test -f "$apu_iconv_dir/include/iconv.h"; then
+ have_apr_iconv="0"
+ have_iconv="1"
+ APR_ADDTO(CPPFLAGS,[-I$apu_iconv_dir/include])
+ APR_ADDTO(LDFLAGS,[-L$apu_iconv_dir/lib])
+ fi
fi
])
-if test "$have_apr_iconv" != "1"; then
+if test "$want_iconv" = "1" -a "$have_apr_iconv" != "1"; then
AC_CHECK_HEADER(iconv.h, [
APU_TRY_ICONV([ have_iconv="1" ], [
@@ -67,7 +76,7 @@ if test "$have_apr_iconv" != "1"; then
], [ have_iconv="0" ])
fi
-if test "$apu_iconv_dir" != "unknown"; then
+if test "$want_iconv" = "1" -a "$apu_iconv_dir" != "unknown"; then
if test "$have_iconv" != "1"; then
if test "$have_apr_iconv" != "1"; then
AC_MSG_ERROR([iconv support requested, but not found])
diff --git a/srclib/apr-util/build/dbd.m4 b/srclib/apr-util/build/dbd.m4
index 076efb51..2cc18fc0 100644
--- a/srclib/apr-util/build/dbd.m4
+++ b/srclib/apr-util/build/dbd.m4
@@ -1,10 +1,10 @@
dnl -------------------------------------------------------- -*- autoconf -*-
-dnl Copyright 2005 The Apache Software Foundation or its licensors, as
-dnl applicable.
-dnl
-dnl Licensed under the Apache License, Version 2.0 (the "License");
-dnl you may not use this file except in compliance with the License.
-dnl You may obtain a copy of the License at
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements. See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License. You may obtain a copy of the License at
dnl
dnl http://www.apache.org/licenses/LICENSE-2.0
dnl
@@ -24,9 +24,9 @@ dnl
AC_DEFUN([APU_CHECK_DBD], [
apu_have_pgsql=0
- AC_ARG_WITH([pgsql], [
- --with-pgsql=DIR specify PostgreSQL location
- ], [
+ AC_ARG_WITH([pgsql],
+ APR_HELP_STRING([--with-pgsql=DIR], [specify PostgreSQL location]),
+ [
apu_have_pgsql=0
if test "$withval" = "yes"; then
AC_CHECK_HEADERS(libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1]))
@@ -78,99 +78,71 @@ dnl
AC_DEFUN([APU_CHECK_DBD_MYSQL], [
apu_have_mysql=0
- AC_CHECK_FILES([dbd/apr_dbd_mysql.c],[
- AC_ARG_WITH([mysql], [
- --with-mysql=DIR **** SEE INSTALL.MySQL ****
- ], [
- apu_have_mysql=0
- if test "$withval" = "yes"; then
- old_cppflags="$CPPFLAGS"
- old_ldflags="$LDFLAGS"
-
- AC_PATH_PROG([MYSQL_CONFIG],[mysql_config])
- if test "x$MYSQL_CONFIG" != 'x'; then
- mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
- mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r`"
-
- APR_ADDTO(CPPFLAGS, [$mysql_CPPFLAGS])
- APR_ADDTO(LDFLAGS, [$mysql_LDFLAGS])
- fi
-
- AC_CHECK_HEADERS(mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
- if test "$apu_have_mysql" = "0"; then
- AC_CHECK_HEADERS(mysql/mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
- else
- if test "x$MYSQL_CONFIG" != 'x'; then
- APR_ADDTO(APRUTIL_INCLUDES, [$mysql_CPPFLAGS])
- APR_ADDTO(APRUTIL_LDFLAGS, [$mysql_LDFLAGS])
- fi
- fi
-
- CPPFLAGS="$old_cppflags"
- LDFLAGS="$old_ldflags"
- elif test "$withval" = "no"; then
- apu_have_mysql=0
- else
- old_cppflags="$CPPFLAGS"
- old_ldflags="$LDFLAGS"
+ AC_ARG_WITH([mysql],
+ APR_HELP_STRING([--with-mysql=DIR], [specify MySQL location (disabled by default)]),
+ [
+ apu_have_mysql=0
+ if test "$withval" = "yes"; then
+ old_cppflags="$CPPFLAGS"
+ old_ldflags="$LDFLAGS"
- AC_PATH_PROG([MYSQL_CONFIG],[mysql_config],,[$withval/bin])
- if test "x$MYSQL_CONFIG" != 'x'; then
- mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
- mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r`"
- else
- mysql_CPPFLAGS="-I$withval/include"
- mysql_LDFLAGS="-L$withval/lib "
- fi
+ AC_PATH_PROG([MYSQL_CONFIG],[mysql_config])
+ if test "x$MYSQL_CONFIG" != 'x'; then
+ mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
+ mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r`"
APR_ADDTO(CPPFLAGS, [$mysql_CPPFLAGS])
APR_ADDTO(LDFLAGS, [$mysql_LDFLAGS])
+ fi
- AC_MSG_NOTICE(checking for mysql in $withval)
- AC_CHECK_HEADERS(mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
- if test "$apu_have_mysql" != "0"; then
+ AC_CHECK_HEADERS(mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
+ if test "$apu_have_mysql" = "0"; then
+ AC_CHECK_HEADERS(mysql/mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
+ else
+ if test "x$MYSQL_CONFIG" != 'x'; then
APR_ADDTO(APRUTIL_INCLUDES, [$mysql_CPPFLAGS])
APR_ADDTO(APRUTIL_LDFLAGS, [$mysql_LDFLAGS])
fi
-
- if test "$apu_have_mysql" != "1"; then
- AC_CHECK_HEADERS(mysql/mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
- if test "$apu_have_mysql" != "0"; then
- APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include/mysql])
- APR_ADDTO(APRUTIL_LDFLAGS, [-L$withval/lib])
- fi
- fi
-
- CPPFLAGS="$old_cppflags"
- LDFLAGS="$old_ldflags"
fi
- ], [
- apu_have_mysql=0
+ CPPFLAGS="$old_cppflags"
+ LDFLAGS="$old_ldflags"
+ elif test "$withval" = "no"; then
+ apu_have_mysql=0
+ else
old_cppflags="$CPPFLAGS"
old_ldflags="$LDFLAGS"
- AC_PATH_PROG([MYSQL_CONFIG],[mysql_config])
+ AC_PATH_PROG([MYSQL_CONFIG],[mysql_config],,[$withval/bin])
if test "x$MYSQL_CONFIG" != 'x'; then
mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r`"
-
- APR_ADDTO(CPPFLAGS, [$mysql_CPPFLAGS])
- APR_ADDTO(LDFLAGS, [$mysql_LDFLAGS])
+ else
+ mysql_CPPFLAGS="-I$withval/include"
+ mysql_LDFLAGS="-L$withval/lib "
fi
- AC_CHECK_HEADERS(mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
+ APR_ADDTO(CPPFLAGS, [$mysql_CPPFLAGS])
+ APR_ADDTO(LDFLAGS, [$mysql_LDFLAGS])
+ AC_MSG_NOTICE(checking for mysql in $withval)
+ AC_CHECK_HEADERS(mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
if test "$apu_have_mysql" != "0"; then
- if test "x$MYSQL_CONFIG" != 'x'; then
- APR_ADDTO(APRUTIL_INCLUDES, [$mysql_CPPFLAGS])
- APR_ADDTO(APRUTIL_LDFLAGS, [$mysql_LDFLAGS])
+ APR_ADDTO(APRUTIL_INCLUDES, [$mysql_CPPFLAGS])
+ APR_ADDTO(APRUTIL_LDFLAGS, [$mysql_LDFLAGS])
+ fi
+
+ if test "$apu_have_mysql" != "1"; then
+ AC_CHECK_HEADERS(mysql/mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
+ if test "$apu_have_mysql" != "0"; then
+ APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include/mysql])
+ APR_ADDTO(APRUTIL_LDFLAGS, [-L$withval/lib])
fi
fi
CPPFLAGS="$old_cppflags"
LDFLAGS="$old_ldflags"
- ])
+ fi
])
AC_SUBST(apu_have_mysql)
@@ -186,9 +158,9 @@ dnl
AC_DEFUN([APU_CHECK_DBD_SQLITE3], [
apu_have_sqlite3=0
- AC_ARG_WITH([sqlite3], [
- --with-sqlite3=DIR
- ], [
+ AC_ARG_WITH([sqlite3],
+ APR_HELP_STRING([--with-sqlite3=DIR], [enable sqlite3 DBD driver]),
+ [
apu_have_sqlite3=0
if test "$withval" = "yes"; then
AC_CHECK_HEADERS(sqlite3.h, AC_CHECK_LIB(sqlite3, sqlite3_open, [apu_have_sqlite3=1]))
@@ -232,9 +204,9 @@ dnl
AC_DEFUN([APU_CHECK_DBD_SQLITE2], [
apu_have_sqlite2=0
- AC_ARG_WITH([sqlite2], [
- --with-sqlite2=DIR
- ], [
+ AC_ARG_WITH([sqlite2],
+ APR_HELP_STRING([--with-sqlite2=DIR], [enable sqlite2 DBD driver]),
+ [
apu_have_sqlite2=0
if test "$withval" = "yes"; then
AC_CHECK_HEADERS(sqlite.h, AC_CHECK_LIB(sqlite, sqlite_open, [apu_have_sqlite2=1]))
diff --git a/srclib/apr-util/build/dbm.m4 b/srclib/apr-util/build/dbm.m4
index 61a12495..85f1cb54 100644
--- a/srclib/apr-util/build/dbm.m4
+++ b/srclib/apr-util/build/dbm.m4
@@ -1,10 +1,10 @@
dnl -------------------------------------------------------- -*- autoconf -*-
-dnl Copyright 2002-2005 The Apache Software Foundation or its licensors, as
-dnl applicable.
-dnl
-dnl Licensed under the Apache License, Version 2.0 (the "License");
-dnl you may not use this file except in compliance with the License.
-dnl You may obtain a copy of the License at
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements. See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License. You may obtain a copy of the License at
dnl
dnl http://www.apache.org/licenses/LICENSE-2.0
dnl
diff --git a/srclib/apr-util/build/find_apu.m4 b/srclib/apr-util/build/find_apu.m4
index e2e27311..4ee01e68 100644
--- a/srclib/apr-util/build/find_apu.m4
+++ b/srclib/apr-util/build/find_apu.m4
@@ -1,10 +1,10 @@
dnl -------------------------------------------------------- -*- autoconf -*-
-dnl Copyright 2002-2005 The Apache Software Foundation or its licensors, as
-dnl applicable.
-dnl
-dnl Licensed under the Apache License, Version 2.0 (the "License");
-dnl you may not use this file except in compliance with the License.
-dnl You may obtain a copy of the License at
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements. See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License. You may obtain a copy of the License at
dnl
dnl http://www.apache.org/licenses/LICENSE-2.0
dnl
diff --git a/srclib/apr-util/build/pkg/buildpkg.sh b/srclib/apr-util/build/pkg/buildpkg.sh
index ba4f4d13..b0a35aa6 100755
--- a/srclib/apr-util/build/pkg/buildpkg.sh
+++ b/srclib/apr-util/build/pkg/buildpkg.sh
@@ -1,10 +1,10 @@
#!/bin/sh
-# Copyright 2000-2005 The Apache Software Foundation or its licensors, as
-# applicable.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
diff --git a/srclib/apr-util/buildconf b/srclib/apr-util/buildconf
index 1b39f1bd..3a8467a1 100755
--- a/srclib/apr-util/buildconf
+++ b/srclib/apr-util/buildconf
@@ -1,11 +1,11 @@
#!/bin/sh
#
-# Copyright 1999-2005 The Apache Software Foundation or its licensors, as
-# applicable.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
diff --git a/srclib/apr-util/configure b/srclib/apr-util/configure
index 21207fc5..7b1c89cb 100755
--- a/srclib/apr-util/configure
+++ b/srclib/apr-util/configure
@@ -651,6 +651,7 @@ target_os
INSTALL_PROGRAM
INSTALL_SCRIPT
INSTALL_DATA
+LT_NO_INSTALL
top_builddir
abs_srcdir
abs_builddir
@@ -687,6 +688,7 @@ apu_has_ldap_novell
apu_has_ldap_microsoft
apu_has_ldap_netscape
apu_has_ldap_mozilla
+apu_has_ldap_zos
apu_has_ldap_other
apu_use_sdbm
apu_use_gdbm
@@ -1333,18 +1335,10 @@ Optional Packages:
the \`=PATH' part completely, the configure script will search
for Berkeley DB in a number of standard places.
-
- --with-pgsql=DIR specify PostgreSQL location
-
-
- --with-mysql=DIR **** SEE INSTALL.MySQL ****
-
-
- --with-sqlite3=DIR
-
-
- --with-sqlite2=DIR
-
+ --with-pgsql=DIR specify PostgreSQL location
+ --with-mysql=DIR specify MySQL location (disabled by default)
+ --with-sqlite3=DIR enable sqlite3 DBD driver
+ --with-sqlite2=DIR enable sqlite2 DBD driver
--with-expat=DIR specify Expat location, or 'builtin'
--with-iconv=DIR path to iconv installation
@@ -1979,6 +1973,9 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+
rm -f config.nice
cat >config.nice<<EOF
#! /bin/sh
@@ -2263,6 +2260,16 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+# Use -no-install to link the test programs on all platforms
+# but Darwin, where it would cause the programs to be linked
+# against installed versions of libapr instead of those just
+# built.
+case $host in
+*-apple-darwin*) LT_NO_INSTALL="" ;;
+*) LT_NO_INSTALL="-no-install" ;;
+esac
+
+
top_builddir="$abs_builddir"
@@ -4731,6 +4738,7 @@ apu_has_ldap_novell="0"
apu_has_ldap_microsoft="0"
apu_has_ldap_netscape="0"
apu_has_ldap_mozilla="0"
+apu_has_ldap_zos="0"
apu_has_ldap_other="0"
@@ -16153,6 +16161,28 @@ rm -f conftest*
fi
if test "x$apr_cv_ldap_toolkit" = "x"; then
+ case "$host" in
+ *-ibm-os390)
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$lber_h
+ $ldap_h
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "IBM" >/dev/null 2>&1; then
+ apu_has_ldap_zos="1"
+ apr_cv_ldap_toolkit="zOS"
+fi
+rm -f conftest*
+
+ ;;
+ esac
+ fi
+ if test "x$apr_cv_ldap_toolkit" = "x"; then
apu_has_ldap_other="1"
apr_cv_ldap_toolkit="unknown"
fi
@@ -16190,6 +16220,7 @@ fi
+
apu_use_sdbm=0
apu_use_ndbm=0
apu_use_gdbm=0
@@ -40848,40 +40879,16 @@ fi
apu_have_mysql=0
- { echo "$as_me:$LINENO: checking for dbd/apr_dbd_mysql.c" >&5
-echo $ECHO_N "checking for dbd/apr_dbd_mysql.c... $ECHO_C" >&6; }
-if test "${ac_cv_file_dbd_apr_dbd_mysql_c+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- test "$cross_compiling" = yes &&
- { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
- { (exit 1); exit 1; }; }
-if test -r "dbd/apr_dbd_mysql.c"; then
- ac_cv_file_dbd_apr_dbd_mysql_c=yes
-else
- ac_cv_file_dbd_apr_dbd_mysql_c=no
-fi
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_file_dbd_apr_dbd_mysql_c" >&5
-echo "${ECHO_T}$ac_cv_file_dbd_apr_dbd_mysql_c" >&6; }
-if test $ac_cv_file_dbd_apr_dbd_mysql_c = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DBD_APR_DBD_MYSQL_C 1
-_ACEOF
-
-
# Check whether --with-mysql was given.
if test "${with_mysql+set}" = set; then
withval=$with_mysql;
- apu_have_mysql=0
- if test "$withval" = "yes"; then
- old_cppflags="$CPPFLAGS"
- old_ldflags="$LDFLAGS"
+ apu_have_mysql=0
+ if test "$withval" = "yes"; then
+ old_cppflags="$CPPFLAGS"
+ old_ldflags="$LDFLAGS"
- # Extract the first word of "mysql_config", so it can be a program name with args.
+ # Extract the first word of "mysql_config", so it can be a program name with args.
set dummy mysql_config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
@@ -40921,9 +40928,9 @@ echo "${ECHO_T}no" >&6; }
fi
- if test "x$MYSQL_CONFIG" != 'x'; then
- mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
- mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r`"
+ if test "x$MYSQL_CONFIG" != 'x'; then
+ mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
+ mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r`"
if test "x$CPPFLAGS" = "x"; then
@@ -40967,7 +40974,7 @@ fi
done
fi
- fi
+ fi
for ac_header in mysql.h
@@ -41213,7 +41220,7 @@ fi
done
- if test "$apu_have_mysql" = "0"; then
+ if test "$apu_have_mysql" = "0"; then
for ac_header in mysql/mysql.h
do
@@ -41458,8 +41465,8 @@ fi
done
- else
- if test "x$MYSQL_CONFIG" != 'x'; then
+ else
+ if test "x$MYSQL_CONFIG" != 'x'; then
if test "x$APRUTIL_INCLUDES" = "x"; then
test "x$silent" != "xyes" && echo " setting APRUTIL_INCLUDES to \"$mysql_CPPFLAGS\""
@@ -41502,18 +41509,18 @@ done
done
fi
- fi
fi
+ fi
- CPPFLAGS="$old_cppflags"
- LDFLAGS="$old_ldflags"
- elif test "$withval" = "no"; then
- apu_have_mysql=0
- else
- old_cppflags="$CPPFLAGS"
- old_ldflags="$LDFLAGS"
+ CPPFLAGS="$old_cppflags"
+ LDFLAGS="$old_ldflags"
+ elif test "$withval" = "no"; then
+ apu_have_mysql=0
+ else
+ old_cppflags="$CPPFLAGS"
+ old_ldflags="$LDFLAGS"
- # Extract the first word of "mysql_config", so it can be a program name with args.
+ # Extract the first word of "mysql_config", so it can be a program name with args.
set dummy mysql_config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
@@ -41553,13 +41560,13 @@ echo "${ECHO_T}no" >&6; }
fi
- if test "x$MYSQL_CONFIG" != 'x'; then
- mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
- mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r`"
- else
- mysql_CPPFLAGS="-I$withval/include"
- mysql_LDFLAGS="-L$withval/lib "
- fi
+ if test "x$MYSQL_CONFIG" != 'x'; then
+ mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
+ mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r`"
+ else
+ mysql_CPPFLAGS="-I$withval/include"
+ mysql_LDFLAGS="-L$withval/lib "
+ fi
if test "x$CPPFLAGS" = "x"; then
@@ -41604,7 +41611,7 @@ fi
fi
- { echo "$as_me:$LINENO: checking for mysql in $withval" >&5
+ { echo "$as_me:$LINENO: checking for mysql in $withval" >&5
echo "$as_me: checking for mysql in $withval" >&6;}
for ac_header in mysql.h
@@ -41850,7 +41857,7 @@ fi
done
- if test "$apu_have_mysql" != "0"; then
+ if test "$apu_have_mysql" != "0"; then
if test "x$APRUTIL_INCLUDES" = "x"; then
test "x$silent" != "xyes" && echo " setting APRUTIL_INCLUDES to \"$mysql_CPPFLAGS\""
@@ -41893,9 +41900,9 @@ done
done
fi
- fi
+ fi
- if test "$apu_have_mysql" != "1"; then
+ if test "$apu_have_mysql" != "1"; then
for ac_header in mysql/mysql.h
do
@@ -42140,7 +42147,7 @@ fi
done
- if test "$apu_have_mysql" != "0"; then
+ if test "$apu_have_mysql" != "0"; then
if test "x$APRUTIL_INCLUDES" = "x"; then
test "x$silent" != "xyes" && echo " setting APRUTIL_INCLUDES to \"-I$withval/include/mysql\""
@@ -42183,405 +42190,12 @@ done
done
fi
- fi
- fi
-
- CPPFLAGS="$old_cppflags"
- LDFLAGS="$old_ldflags"
- fi
-
-else
-
- apu_have_mysql=0
-
- old_cppflags="$CPPFLAGS"
- old_ldflags="$LDFLAGS"
-
- # Extract the first word of "mysql_config", so it can be a program name with args.
-set dummy mysql_config; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_MYSQL_CONFIG+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $MYSQL_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_MYSQL_CONFIG="$MYSQL_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_MYSQL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-MYSQL_CONFIG=$ac_cv_path_MYSQL_CONFIG
-if test -n "$MYSQL_CONFIG"; then
- { echo "$as_me:$LINENO: result: $MYSQL_CONFIG" >&5
-echo "${ECHO_T}$MYSQL_CONFIG" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
- if test "x$MYSQL_CONFIG" != 'x'; then
- mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
- mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r`"
-
-
- if test "x$CPPFLAGS" = "x"; then
- test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"$mysql_CPPFLAGS\""
- CPPFLAGS="$mysql_CPPFLAGS"
- else
- apr_addto_bugger="$mysql_CPPFLAGS"
- for i in $apr_addto_bugger; do
- apr_addto_duplicate="0"
- for j in $CPPFLAGS; do
- if test "x$i" = "x$j"; then
- apr_addto_duplicate="1"
- break
- fi
- done
- if test $apr_addto_duplicate = "0"; then
- test "x$silent" != "xyes" && echo " adding \"$i\" to CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $i"
- fi
- done
- fi
-
-
- if test "x$LDFLAGS" = "x"; then
- test "x$silent" != "xyes" && echo " setting LDFLAGS to \"$mysql_LDFLAGS\""
- LDFLAGS="$mysql_LDFLAGS"
- else
- apr_addto_bugger="$mysql_LDFLAGS"
- for i in $apr_addto_bugger; do
- apr_addto_duplicate="0"
- for j in $LDFLAGS; do
- if test "x$i" = "x$j"; then
- apr_addto_duplicate="1"
- break
- fi
- done
- if test $apr_addto_duplicate = "0"; then
- test "x$silent" != "xyes" && echo " adding \"$i\" to LDFLAGS"
- LDFLAGS="$LDFLAGS $i"
- fi
- done
- fi
-
- fi
-
-
-for ac_header in mysql.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-else
- # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
- ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- { echo "$as_me:$LINENO: checking for mysql_init in -lmysqlclient_r" >&5
-echo $ECHO_N "checking for mysql_init in -lmysqlclient_r... $ECHO_C" >&6; }
-if test "${ac_cv_lib_mysqlclient_r_mysql_init+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmysqlclient_r $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char mysql_init ();
-int
-main ()
-{
-return mysql_init ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_mysqlclient_r_mysql_init=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_mysqlclient_r_mysql_init=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_mysqlclient_r_mysql_init" >&5
-echo "${ECHO_T}$ac_cv_lib_mysqlclient_r_mysql_init" >&6; }
-if test $ac_cv_lib_mysqlclient_r_mysql_init = yes; then
- apu_have_mysql=1
-fi
-
-fi
-
-done
-
-
- if test "$apu_have_mysql" != "0"; then
- if test "x$MYSQL_CONFIG" != 'x'; then
-
- if test "x$APRUTIL_INCLUDES" = "x"; then
- test "x$silent" != "xyes" && echo " setting APRUTIL_INCLUDES to \"$mysql_CPPFLAGS\""
- APRUTIL_INCLUDES="$mysql_CPPFLAGS"
- else
- apr_addto_bugger="$mysql_CPPFLAGS"
- for i in $apr_addto_bugger; do
- apr_addto_duplicate="0"
- for j in $APRUTIL_INCLUDES; do
- if test "x$i" = "x$j"; then
- apr_addto_duplicate="1"
- break
- fi
- done
- if test $apr_addto_duplicate = "0"; then
- test "x$silent" != "xyes" && echo " adding \"$i\" to APRUTIL_INCLUDES"
- APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
- fi
- done
- fi
-
-
- if test "x$APRUTIL_LDFLAGS" = "x"; then
- test "x$silent" != "xyes" && echo " setting APRUTIL_LDFLAGS to \"$mysql_LDFLAGS\""
- APRUTIL_LDFLAGS="$mysql_LDFLAGS"
- else
- apr_addto_bugger="$mysql_LDFLAGS"
- for i in $apr_addto_bugger; do
- apr_addto_duplicate="0"
- for j in $APRUTIL_LDFLAGS; do
- if test "x$i" = "x$j"; then
- apr_addto_duplicate="1"
- break
- fi
- done
- if test $apr_addto_duplicate = "0"; then
- test "x$silent" != "xyes" && echo " adding \"$i\" to APRUTIL_LDFLAGS"
- APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
- fi
- done
- fi
-
fi
fi
CPPFLAGS="$old_cppflags"
LDFLAGS="$old_ldflags"
-
-fi
-
+ fi
fi
@@ -44431,6 +44045,9 @@ fi
+save_cppflags="$CPPFLAGS"
+save_ldflags="$LDFLAGS"
+
apu_has_expat=0
# Default: will use either external or bundled expat.
@@ -44517,6 +44134,27 @@ echo "$as_me: error: Expat cannot be disabled (at this time)" >&2;}
done
fi
+
+ if test "x$APRUTIL_LDFLAGS" = "x"; then
+ test "x$silent" != "xyes" && echo " setting APRUTIL_LDFLAGS to \"-L$withval/lib\""
+ APRUTIL_LDFLAGS="-L$withval/lib"
+ else
+ apr_addto_bugger="-L$withval/lib"
+ for i in $apr_addto_bugger; do
+ apr_addto_duplicate="0"
+ for j in $APRUTIL_LDFLAGS; do
+ if test "x$i" = "x$j"; then
+ apr_addto_duplicate="1"
+ break
+ fi
+ done
+ if test $apr_addto_duplicate = "0"; then
+ test "x$silent" != "xyes" && echo " adding \"$i\" to APRUTIL_LDFLAGS"
+ APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
+ fi
+ done
+ fi
+
fi
# ...and refuse to fall back on the builtin expat.
apu_try_builtin_expat=0
@@ -45042,6 +44680,27 @@ _ACEOF
done
fi
+
+ if test "x$APRUTIL_LDFLAGS" = "x"; then
+ test "x$silent" != "xyes" && echo " setting APRUTIL_LDFLAGS to \"-L/usr/local/lib\""
+ APRUTIL_LDFLAGS="-L/usr/local/lib"
+ else
+ apr_addto_bugger="-L/usr/local/lib"
+ for i in $apr_addto_bugger; do
+ apr_addto_duplicate="0"
+ for j in $APRUTIL_LDFLAGS; do
+ if test "x$i" = "x$j"; then
+ apr_addto_duplicate="1"
+ break
+ fi
+ done
+ if test $apr_addto_duplicate = "0"; then
+ test "x$silent" != "xyes" && echo " adding \"$i\" to APRUTIL_LDFLAGS"
+ APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
+ fi
+ done
+ fi
+
else
apu_has_expat=0
@@ -45315,15 +44974,73 @@ fi
APR_XML_DIR=$bundled_subdir
+CPPFLAGS=$save_cppflags
+LDFLAGS=$save_ldflags
+
apu_iconv_dir="unknown"
have_apr_iconv="0"
+want_iconv="1"
# Check whether --with-iconv was given.
if test "${with_iconv+set}" = set; then
withval=$with_iconv; apu_iconv_dir="$withval"
- if test "$apu_iconv_dir" != "yes"; then
+ if test "$apu_iconv_dir" = "no"; then
+ have_apr_iconv="0"
+ have_iconv="0"
+ want_iconv="0"
+ elif test "$apu_iconv_dir" != "yes"; then
+ if test -f "$apu_iconv_dir/include/apr-1/api_version.h"; then
+ have_apr_iconv="1"
+ have_iconv="0"
+
+ if test "x$APRUTIL_INCLUDES" = "x"; then
+ test "x$silent" != "xyes" && echo " setting APRUTIL_INCLUDES to \"-I$apu_iconv_dir/include/apr-1\""
+ APRUTIL_INCLUDES="-I$apu_iconv_dir/include/apr-1"
+ else
+ apr_addto_bugger="-I$apu_iconv_dir/include/apr-1"
+ for i in $apr_addto_bugger; do
+ apr_addto_duplicate="0"
+ for j in $APRUTIL_INCLUDES; do
+ if test "x$i" = "x$j"; then
+ apr_addto_duplicate="1"
+ break
+ fi
+ done
+ if test $apr_addto_duplicate = "0"; then
+ test "x$silent" != "xyes" && echo " adding \"$i\" to APRUTIL_INCLUDES"
+ APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
+ fi
+ done
+ fi
+
+
+ if test "x$APRUTIL_LIBS" = "x"; then
+ test "x$silent" != "xyes" && echo " setting APRUTIL_LIBS to \"$apu_iconv_dir/lib/libapriconv-1.la\""
+ APRUTIL_LIBS="$apu_iconv_dir/lib/libapriconv-1.la"
+ else
+ apr_addto_bugger="$apu_iconv_dir/lib/libapriconv-1.la"
+ for i in $apr_addto_bugger; do
+ apr_addto_duplicate="0"
+ for j in $APRUTIL_LIBS; do
+ if test "x$i" = "x$j"; then
+ apr_addto_duplicate="1"
+ break
+ fi
+ done
+ if test $apr_addto_duplicate = "0"; then
+ test "x$silent" != "xyes" && echo " adding \"$i\" to APRUTIL_LIBS"
+ APRUTIL_LIBS="$APRUTIL_LIBS $i"
+ fi
+ done
+ fi
+
+ { echo "$as_me:$LINENO: result: using apr-iconv" >&5
+echo "${ECHO_T}using apr-iconv" >&6; }
+ elif test -f "$apu_iconv_dir/include/iconv.h"; then
+ have_apr_iconv="0"
+ have_iconv="1"
if test "x$CPPFLAGS" = "x"; then
test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-I$apu_iconv_dir/include\""
@@ -45366,38 +45083,13 @@ if test "${with_iconv+set}" = set; then
done
fi
- fi
- if test -f "$apu_iconv_dir/include/api_version.h"; then
- have_apr_iconv="1"
- have_iconv="0"
-
- if test "x$LIBS" = "x-lapriconv"; then
- test "x$silent" != "xyes" && echo " nulling LIBS"
- LIBS=""
- else
- apr_new_bugger=""
- apr_removed=0
- for i in $LIBS; do
- if test "x$i" != "x-lapriconv"; then
- apr_new_bugger="$apr_new_bugger $i"
- else
- apr_removed=1
fi
- done
- if test $apr_removed = "1"; then
- test "x$silent" != "xyes" && echo " removed \"-lapriconv\" from LIBS"
- LIBS=$apr_new_bugger
- fi
- fi
-
- { echo "$as_me:$LINENO: result: \"Using apr-iconv\"" >&5
-echo "${ECHO_T}\"Using apr-iconv\"" >&6; }
fi
fi
-if test "$have_apr_iconv" != "1"; then
+if test "$want_iconv" = "1" -a "$have_apr_iconv" != "1"; then
if test "${ac_cv_header_iconv_h+set}" = set; then
{ echo "$as_me:$LINENO: checking for iconv.h" >&5
echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6; }
@@ -45780,7 +45472,7 @@ fi
fi
-if test "$apu_iconv_dir" != "unknown"; then
+if test "$want_iconv" = "1" -a "$apu_iconv_dir" != "unknown"; then
if test "$have_iconv" != "1"; then
if test "$have_apr_iconv" != "1"; then
{ { echo "$as_me:$LINENO: error: iconv support requested, but not found" >&5
@@ -47424,6 +47116,7 @@ target_os!$target_os$ac_delim
INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
INSTALL_DATA!$INSTALL_DATA$ac_delim
+LT_NO_INSTALL!$LT_NO_INSTALL$ac_delim
top_builddir!$top_builddir$ac_delim
abs_srcdir!$abs_srcdir$ac_delim
abs_builddir!$abs_builddir$ac_delim
@@ -47460,14 +47153,13 @@ apu_has_ldap_novell!$apu_has_ldap_novell$ac_delim
apu_has_ldap_microsoft!$apu_has_ldap_microsoft$ac_delim
apu_has_ldap_netscape!$apu_has_ldap_netscape$ac_delim
apu_has_ldap_mozilla!$apu_has_ldap_mozilla$ac_delim
+apu_has_ldap_zos!$apu_has_ldap_zos$ac_delim
apu_has_ldap_other!$apu_has_ldap_other$ac_delim
apu_use_sdbm!$apu_use_sdbm$ac_delim
apu_use_gdbm!$apu_use_gdbm$ac_delim
apu_use_ndbm!$apu_use_ndbm$ac_delim
apu_use_db!$apu_use_db$ac_delim
apu_have_sdbm!$apu_have_sdbm$ac_delim
-apu_have_gdbm!$apu_have_gdbm$ac_delim
-apu_have_ndbm!$apu_have_ndbm$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -47509,6 +47201,8 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
+apu_have_gdbm!$apu_have_gdbm$ac_delim
+apu_have_ndbm!$apu_have_ndbm$ac_delim
apu_have_db!$apu_have_db$ac_delim
apu_db_header!$apu_db_header$ac_delim
apu_db_version!$apu_db_version$ac_delim
@@ -47534,7 +47228,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 23; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 25; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/srclib/apr-util/configure.in b/srclib/apr-util/configure.in
index 2534eb14..13d61bd7 100644
--- a/srclib/apr-util/configure.in
+++ b/srclib/apr-util/configure.in
@@ -40,6 +40,16 @@ AC_CANONICAL_SYSTEM
AC_PROG_INSTALL
+# Use -no-install to link the test programs on all platforms
+# but Darwin, where it would cause the programs to be linked
+# against installed versions of libapr instead of those just
+# built.
+case $host in
+*-apple-darwin*) LT_NO_INSTALL="" ;;
+*) LT_NO_INSTALL="-no-install" ;;
+esac
+AC_SUBST(LT_NO_INSTALL)
+
dnl
dnl compute the top directory of the build
dnl note: this is needed for LIBTOOL and exporting the bundled Expat
diff --git a/srclib/apr-util/crypto/apr_md4.c b/srclib/apr-util/crypto/apr_md4.c
index 6b9d9f4b..ada51400 100644
--- a/srclib/apr-util/crypto/apr_md4.c
+++ b/srclib/apr-util/crypto/apr_md4.c
@@ -1,9 +1,9 @@
-/* Copyright 2001-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/crypto/apr_md5.c b/srclib/apr-util/crypto/apr_md5.c
index 40942e30..313896f3 100644
--- a/srclib/apr-util/crypto/apr_md5.c
+++ b/srclib/apr-util/crypto/apr_md5.c
@@ -31,12 +31,12 @@
documentation and/or software.
*/
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -686,7 +686,7 @@ APU_DECLARE(apr_status_t) apr_password_validate(const char *passwd,
apr_md5_encode(passwd, hash, sample, sizeof(sample));
}
else if (!strncmp(hash, APR_SHA1PW_ID, APR_SHA1PW_IDLEN)) {
- apr_sha1_base64(passwd, strlen(passwd), sample);
+ apr_sha1_base64(passwd, (int)strlen(passwd), sample);
}
else {
/*
diff --git a/srclib/apr-util/crypto/apr_sha1.c b/srclib/apr-util/crypto/apr_sha1.c
index 0b139127..31a9f9cc 100644
--- a/srclib/apr-util/crypto/apr_sha1.c
+++ b/srclib/apr-util/crypto/apr_sha1.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/crypto/getuuid.c b/srclib/apr-util/crypto/getuuid.c
index dd18bfc2..0cb324bb 100644
--- a/srclib/apr-util/crypto/getuuid.c
+++ b/srclib/apr-util/crypto/getuuid.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/crypto/uuid.c b/srclib/apr-util/crypto/uuid.c
index 451481b5..6e45d718 100644
--- a/srclib/apr-util/crypto/uuid.c
+++ b/srclib/apr-util/crypto/uuid.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/dbd/NWGNUdbdmysql b/srclib/apr-util/dbd/NWGNUdbdmysql
index c5acb2f3..cc207e20 100644
--- a/srclib/apr-util/dbd/NWGNUdbdmysql
+++ b/srclib/apr-util/dbd/NWGNUdbdmysql
@@ -54,7 +54,7 @@ XCFLAGS += \
# These defines will come after DEFINES
#
XDEFINES += \
- -DAPU_HAVE_MYSQL \
+ -DAPU_HAVE_MYSQL=1 \
-DHAVE_MYSQL_H \
$(EOLIST)
@@ -130,12 +130,6 @@ NLM_NAME = dbdmysql
NLM_DESCRIPTION = Apache Portability Runtime Library $(VERSION_STR) DBD MySQL Driver Module
#
-# This is used by the link '-copy ' directive.
-# If left blank, the ASF copyright defined in NWGNUtail.inc will be used.
-#
-NLM_COPYRIGHT = Copyright (c) 2003-2007 WebThing Ltd and other contributors
-
-#
# This is used by the '-threadname' directive. If left blank,
# NLM_NAME Thread will be used.
#
diff --git a/srclib/apr-util/dbd/NWGNUdbdpgsql b/srclib/apr-util/dbd/NWGNUdbdpgsql
index 96c95895..e90665cd 100644
--- a/srclib/apr-util/dbd/NWGNUdbdpgsql
+++ b/srclib/apr-util/dbd/NWGNUdbdpgsql
@@ -54,7 +54,7 @@ XCFLAGS += \
# These defines will come after DEFINES
#
XDEFINES += \
- -DAPU_HAVE_PGSQL \
+ -DAPU_HAVE_PGSQL=1 \
-DHAVE_LIBPQ_FE_H \
$(EOLIST)
diff --git a/srclib/apr-util/dbd/NWGNUdbdsqli2 b/srclib/apr-util/dbd/NWGNUdbdsqli2
index 111e3ad8..7aa95c90 100644
--- a/srclib/apr-util/dbd/NWGNUdbdsqli2
+++ b/srclib/apr-util/dbd/NWGNUdbdsqli2
@@ -54,7 +54,7 @@ XCFLAGS += \
# These defines will come after DEFINES
#
XDEFINES += \
- -DAPU_HAVE_SQLITE2 \
+ -DAPU_HAVE_SQLITE2=1 \
$(EOLIST)
#
@@ -120,7 +120,7 @@ endif
# This is used by the link 'name' directive to name the nlm. If left blank
# TARGET_nlm (see below) will be used.
#
-NLM_NAME = dbdsqli3
+NLM_NAME = dbdsqli2
#
# This is used by the link '-desc ' directive.
@@ -132,7 +132,7 @@ NLM_DESCRIPTION = Apache Portability Runtime Library $(VERSION_STR) DBD SQLite2
# This is used by the '-threadname' directive. If left blank,
# NLM_NAME Thread will be used.
#
-NLM_THREAD_NAME = dbdsqli3
+NLM_THREAD_NAME = dbdsqli2
#
# If this is specified, it will override VERSION value in
diff --git a/srclib/apr-util/dbd/NWGNUdbdsqli3 b/srclib/apr-util/dbd/NWGNUdbdsqli3
index b32b0777..81bd4dbb 100644
--- a/srclib/apr-util/dbd/NWGNUdbdsqli3
+++ b/srclib/apr-util/dbd/NWGNUdbdsqli3
@@ -54,7 +54,7 @@ XCFLAGS += \
# These defines will come after DEFINES
#
XDEFINES += \
- -DAPU_HAVE_SQLITE3 \
+ -DAPU_HAVE_SQLITE3=1 \
$(EOLIST)
#
diff --git a/srclib/apr-util/dbd/apr_dbd.c b/srclib/apr-util/dbd/apr_dbd.c
index f13dc457..4eed3918 100644
--- a/srclib/apr-util/dbd/apr_dbd.c
+++ b/srclib/apr-util/dbd/apr_dbd.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/dbd/apr_dbd_mysql.c b/srclib/apr-util/dbd/apr_dbd_mysql.c
new file mode 100644
index 00000000..65b862e6
--- /dev/null
+++ b/srclib/apr-util/dbd/apr_dbd_mysql.c
@@ -0,0 +1,771 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "apu.h"
+#define HAVE_MYSQL_MYSQL_H
+
+#if APU_HAVE_MYSQL
+
+#include "apu_version.h"
+#include "apu_config.h"
+
+#include <ctype.h>
+#include <stdlib.h>
+
+#ifdef HAVE_MYSQL_H
+#include <mysql.h>
+#include <errmsg.h>
+#elif defined(HAVE_MYSQL_MYSQL_H)
+#include <mysql/mysql.h>
+#include <mysql/errmsg.h>
+#endif
+
+#include "apr_strings.h"
+#include "apr_buckets.h"
+
+#include "apr_dbd_internal.h"
+
+/* default maximum field size 1 MB */
+#define FIELDSIZE 1048575
+
+struct apr_dbd_prepared_t {
+ MYSQL_STMT* stmt;
+};
+
+struct apr_dbd_transaction_t {
+ int errnum;
+ apr_dbd_t *handle;
+};
+
+struct apr_dbd_t {
+ MYSQL* conn ;
+ apr_dbd_transaction_t* trans ;
+ unsigned long fldsz;
+};
+
+struct apr_dbd_results_t {
+ int random;
+ MYSQL_RES *res;
+ MYSQL_STMT *statement;
+ MYSQL_BIND *bind;
+};
+struct apr_dbd_row_t {
+ MYSQL_ROW row;
+ apr_dbd_results_t *res;
+};
+
+static apr_status_t free_result(void *data)
+{
+ mysql_free_result(data);
+ return APR_SUCCESS;
+}
+
+static int dbd_mysql_select(apr_pool_t *pool, apr_dbd_t *sql,
+ apr_dbd_results_t **results,
+ const char *query, int seek)
+{
+ int sz;
+ int ret;
+ if (sql->trans && sql->trans->errnum) {
+ return sql->trans->errnum;
+ }
+ ret = mysql_query(sql->conn, query);
+ if (!ret) {
+ if (sz = mysql_field_count(sql->conn), sz > 0) {
+ if (!*results) {
+ *results = apr_palloc(pool, sizeof(apr_dbd_results_t));
+ }
+ (*results)->random = seek;
+ (*results)->statement = NULL;
+ if (seek) {
+ (*results)->res = mysql_store_result(sql->conn);
+ }
+ else {
+ (*results)->res = mysql_use_result(sql->conn);
+ }
+ apr_pool_cleanup_register(pool, (*results)->res,
+ free_result,apr_pool_cleanup_null);
+ }
+ } else {
+ ret = mysql_errno(sql->conn);
+ }
+
+ if (sql->trans) {
+ sql->trans->errnum = ret;
+ }
+ return ret;
+}
+
+static int dbd_mysql_get_row(apr_pool_t *pool, apr_dbd_results_t *res,
+ apr_dbd_row_t **row, int rownum)
+{
+ MYSQL_ROW r = NULL;
+ int ret = 0;
+
+ if (res->statement) {
+ if (res->random) {
+ if (rownum >= 0) {
+ mysql_stmt_data_seek(res->statement, (my_ulonglong)rownum);
+ }
+ }
+ ret = mysql_stmt_fetch(res->statement);
+ switch (ret) {
+ case 1:
+ ret = mysql_stmt_errno(res->statement);
+ break;
+ case MYSQL_NO_DATA:
+ ret = -1;
+ break;
+ default:
+ ret = 0; /* bad luck - get_entry will deal with this */
+ break;
+ }
+ }
+ else {
+ if (res->random) {
+ if (rownum >= 0) {
+ mysql_data_seek(res->res, (my_ulonglong) rownum);
+ }
+ }
+ r = mysql_fetch_row(res->res);
+ if (r == NULL) {
+ ret = -1;
+ }
+ }
+ if (ret == 0) {
+ if (!*row) {
+ *row = apr_palloc(pool, sizeof(apr_dbd_row_t));
+ }
+ (*row)->row = r;
+ (*row)->res = res;
+ }
+ else {
+ apr_pool_cleanup_run(pool, res->res, free_result);
+ }
+ return ret;
+}
+#if 0
+/* An improved API that was proposed but not followed up */
+static int dbd_mysql_get_entry(const apr_dbd_row_t *row, int n,
+ apr_dbd_datum_t *val)
+{
+ MYSQL_BIND *bind;
+ if (row->res->statement) {
+ bind = &row->res->bind[n];
+ if (mysql_stmt_fetch_column(row->res->statement, bind, n, 0) != 0) {
+ val->type = APR_DBD_VALUE_NULL;
+ return -1;
+ }
+ if (*bind->is_null) {
+ val->type = APR_DBD_VALUE_NULL;
+ return -1;
+ }
+ else {
+ val->type = APR_DBD_VALUE_STRING;
+ val->value.stringval = bind->buffer;
+ }
+ }
+ else {
+ val->type = APR_DBD_VALUE_STRING;
+ val->value.stringval = row->row[n];
+ }
+ return 0;
+}
+#else
+
+static const char *dbd_mysql_get_entry(const apr_dbd_row_t *row, int n)
+{
+ MYSQL_BIND *bind;
+ if (row->res->statement) {
+ bind = &row->res->bind[n];
+ if (mysql_stmt_fetch_column(row->res->statement, bind, n, 0) != 0) {
+ return NULL;
+ }
+ if (*bind->is_null) {
+ return NULL;
+ }
+ else {
+ return bind->buffer;
+ }
+ }
+ else {
+ return row->row[n];
+ }
+ return NULL;
+}
+#endif
+
+static const char *dbd_mysql_error(apr_dbd_t *sql, int n)
+{
+ return mysql_error(sql->conn);
+}
+
+static int dbd_mysql_query(apr_dbd_t *sql, int *nrows, const char *query)
+{
+ int ret;
+ if (sql->trans && sql->trans->errnum) {
+ return sql->trans->errnum;
+ }
+ ret = mysql_query(sql->conn, query);
+ if (ret != 0) {
+ ret = mysql_errno(sql->conn);
+ }
+ *nrows = mysql_affected_rows(sql->conn);
+ if (sql->trans) {
+ sql->trans->errnum = ret;
+ }
+ return ret;
+}
+
+static const char *dbd_mysql_escape(apr_pool_t *pool, const char *arg,
+ apr_dbd_t *sql)
+{
+ unsigned long len = strlen(arg);
+ char *ret = apr_palloc(pool, 2*len + 1);
+ mysql_real_escape_string(sql->conn, ret, arg, len);
+ return ret;
+}
+
+static apr_status_t stmt_close(void *data)
+{
+ mysql_stmt_close(data);
+ return APR_SUCCESS;
+}
+
+static int dbd_mysql_prepare(apr_pool_t *pool, apr_dbd_t *sql,
+ const char *query, const char *label,
+ apr_dbd_prepared_t **statement)
+{
+ /* Translate from apr_dbd to native query format */
+ char *myquery = apr_pstrdup(pool, query);
+ char *p = myquery;
+ const char *q;
+ int ret;
+ for (q = query; *q; ++q) {
+ if (q[0] == '%') {
+ if (isalpha(q[1])) {
+ *p++ = '?';
+ ++q;
+ }
+ else if (q[1] == '%') {
+ /* reduce %% to % */
+ *p++ = *q++;
+ }
+ else {
+ *p++ = *q;
+ }
+ }
+ else {
+ *p++ = *q;
+ }
+ }
+ *p = 0;
+ if (!*statement) {
+ *statement = apr_palloc(pool, sizeof(apr_dbd_prepared_t));
+ }
+ (*statement)->stmt = mysql_stmt_init(sql->conn);
+
+ if ((*statement)->stmt) {
+ apr_pool_cleanup_register(pool, (*statement)->stmt,
+ stmt_close, apr_pool_cleanup_null);
+ ret = mysql_stmt_prepare((*statement)->stmt, myquery, strlen(myquery));
+
+ if (ret != 0) {
+ ret = mysql_stmt_errno((*statement)->stmt);
+ }
+
+ return ret;
+ }
+
+ return CR_OUT_OF_MEMORY;
+}
+
+static int dbd_mysql_pquery(apr_pool_t *pool, apr_dbd_t *sql,
+ int *nrows, apr_dbd_prepared_t *statement,
+ int nargs, const char **values)
+{
+ MYSQL_BIND *bind;
+ char *arg;
+ int ret;
+ int i;
+ my_bool is_null = FALSE;
+
+ if (sql->trans && sql->trans->errnum) {
+ return sql->trans->errnum;
+ }
+ nargs = mysql_stmt_param_count(statement->stmt);
+
+ bind = apr_palloc(pool, nargs*sizeof(MYSQL_BIND));
+ for (i=0; i < nargs; ++i) {
+ arg = (char*)values[i];
+ bind[i].buffer_type = MYSQL_TYPE_VAR_STRING;
+ bind[i].buffer = arg;
+ bind[i].buffer_length = strlen(arg);
+ bind[i].length = &bind[i].buffer_length;
+ bind[i].is_null = &is_null;
+ bind[i].is_unsigned = 0;
+ }
+
+ ret = mysql_stmt_bind_param(statement->stmt, bind);
+ if (ret != 0) {
+ *nrows = 0;
+ ret = mysql_stmt_errno(statement->stmt);
+ }
+ else {
+ ret = mysql_stmt_execute(statement->stmt);
+ if (ret != 0) {
+ ret = mysql_stmt_errno(statement->stmt);
+ }
+ *nrows = mysql_stmt_affected_rows(statement->stmt);
+ }
+ if (sql->trans) {
+ sql->trans->errnum = ret;
+ }
+ return ret;
+}
+
+static int dbd_mysql_pvquery(apr_pool_t *pool, apr_dbd_t *sql, int *nrows,
+ apr_dbd_prepared_t *statement, va_list args)
+{
+ MYSQL_BIND *bind;
+ char *arg;
+ int ret;
+ int nargs = 0;
+ int i;
+ my_bool is_null = FALSE;
+
+ if (sql->trans && sql->trans->errnum) {
+ return sql->trans->errnum;
+ }
+ nargs = mysql_stmt_param_count(statement->stmt);
+
+ bind = apr_palloc(pool, nargs*sizeof(MYSQL_BIND));
+ for (i=0; i < nargs; ++i) {
+ arg = va_arg(args, char*);
+ bind[i].buffer_type = MYSQL_TYPE_VAR_STRING;
+ bind[i].buffer = arg;
+ bind[i].buffer_length = strlen(arg);
+ bind[i].length = &bind[i].buffer_length;
+ bind[i].is_null = &is_null;
+ bind[i].is_unsigned = 0;
+ }
+
+ ret = mysql_stmt_bind_param(statement->stmt, bind);
+ if (ret != 0) {
+ *nrows = 0;
+ ret = mysql_stmt_errno(statement->stmt);
+ }
+ else {
+ ret = mysql_stmt_execute(statement->stmt);
+ if (ret != 0) {
+ ret = mysql_stmt_errno(statement->stmt);
+ }
+ *nrows = mysql_stmt_affected_rows(statement->stmt);
+ }
+ if (sql->trans) {
+ sql->trans->errnum = ret;
+ }
+ return ret;
+}
+
+static int dbd_mysql_pselect(apr_pool_t *pool, apr_dbd_t *sql,
+ apr_dbd_results_t **res,
+ apr_dbd_prepared_t *statement, int random,
+ int nargs, const char **args)
+{
+ int i;
+ int nfields;
+ char *arg;
+ my_bool is_null = FALSE;
+ my_bool *is_nullr;
+#if MYSQL_VERSION_ID >= 50000
+ my_bool *error;
+#endif
+ int ret;
+ unsigned long *length, maxlen;
+ MYSQL_BIND *bind;
+
+ if (sql->trans && sql->trans->errnum) {
+ return sql->trans->errnum;
+ }
+
+ nargs = mysql_stmt_param_count(statement->stmt);
+ bind = apr_palloc(pool, nargs*sizeof(MYSQL_BIND));
+
+ for (i=0; i < nargs; ++i) {
+ arg = (char*)args[i];
+ bind[i].buffer_type = MYSQL_TYPE_VAR_STRING;
+ bind[i].buffer = arg;
+ bind[i].buffer_length = strlen(arg);
+ bind[i].length = &bind[i].buffer_length;
+ bind[i].is_null = &is_null;
+ bind[i].is_unsigned = 0;
+ }
+
+ ret = mysql_stmt_bind_param(statement->stmt, bind);
+ if (ret == 0) {
+ ret = mysql_stmt_execute(statement->stmt);
+ if (!ret) {
+ if (!*res) {
+ *res = apr_pcalloc(pool, sizeof(apr_dbd_results_t));
+ }
+ (*res)->random = random;
+ (*res)->statement = statement->stmt;
+ (*res)->res = mysql_stmt_result_metadata(statement->stmt);
+ apr_pool_cleanup_register(pool, (*res)->res,
+ free_result, apr_pool_cleanup_null);
+ nfields = mysql_num_fields((*res)->res);
+ if (!(*res)->bind) {
+ (*res)->bind = apr_palloc(pool, nfields*sizeof(MYSQL_BIND));
+ length = apr_pcalloc(pool, nfields*sizeof(unsigned long));
+#if MYSQL_VERSION_ID >= 50000
+ error = apr_palloc(pool, nfields*sizeof(my_bool));
+#endif
+ is_nullr = apr_pcalloc(pool, nfields*sizeof(my_bool));
+ for ( i = 0; i < nfields; ++i ) {
+ maxlen = ((*res)->res->fields[i].length < sql->fldsz ?
+ (*res)->res->fields[i].length : sql->fldsz) + 1;
+ (*res)->bind[i].buffer_type = MYSQL_TYPE_VAR_STRING;
+ (*res)->bind[i].buffer_length = maxlen;
+ (*res)->bind[i].length = &length[i];
+ (*res)->bind[i].buffer = apr_palloc(pool, maxlen);
+ (*res)->bind[i].is_null = is_nullr+i;
+#if MYSQL_VERSION_ID >= 50000
+ (*res)->bind[i].error = error+i;
+#endif
+ }
+ }
+ ret = mysql_stmt_bind_result(statement->stmt, (*res)->bind);
+ if (!ret) {
+ ret = mysql_stmt_store_result(statement->stmt);
+ }
+ }
+ }
+ if (ret != 0) {
+ ret = mysql_stmt_errno(statement->stmt);
+ }
+ if (sql->trans) {
+ sql->trans->errnum = ret;
+ }
+ return ret;
+}
+
+static int dbd_mysql_pvselect(apr_pool_t *pool, apr_dbd_t *sql,
+ apr_dbd_results_t **res,
+ apr_dbd_prepared_t *statement, int random,
+ va_list args)
+{
+ int i;
+ int nfields;
+ char *arg;
+ my_bool is_null = FALSE;
+ my_bool *is_nullr;
+#if MYSQL_VERSION_ID >= 50000
+ my_bool *error;
+#endif
+ int ret;
+ unsigned long *length, maxlen;
+ int nargs;
+ MYSQL_BIND *bind;
+
+ if (sql->trans && sql->trans->errnum) {
+ return sql->trans->errnum;
+ }
+
+ nargs = mysql_stmt_param_count(statement->stmt);
+ bind = apr_palloc(pool, nargs*sizeof(MYSQL_BIND));
+
+ for (i=0; i < nargs; ++i) {
+ arg = va_arg(args, char*);
+ bind[i].buffer_type = MYSQL_TYPE_VAR_STRING;
+ bind[i].buffer = arg;
+ bind[i].buffer_length = strlen(arg);
+ bind[i].length = &bind[i].buffer_length;
+ bind[i].is_null = &is_null;
+ bind[i].is_unsigned = 0;
+ }
+
+ ret = mysql_stmt_bind_param(statement->stmt, bind);
+ if (ret == 0) {
+ ret = mysql_stmt_execute(statement->stmt);
+ if (!ret) {
+ if (!*res) {
+ *res = apr_pcalloc(pool, sizeof(apr_dbd_results_t));
+ }
+ (*res)->random = random;
+ (*res)->statement = statement->stmt;
+ (*res)->res = mysql_stmt_result_metadata(statement->stmt);
+ apr_pool_cleanup_register(pool, (*res)->res,
+ free_result, apr_pool_cleanup_null);
+ nfields = mysql_num_fields((*res)->res);
+ if (!(*res)->bind) {
+ (*res)->bind = apr_palloc(pool, nfields*sizeof(MYSQL_BIND));
+ length = apr_pcalloc(pool, nfields*sizeof(unsigned long));
+#if MYSQL_VERSION_ID >= 50000
+ error = apr_palloc(pool, nfields*sizeof(my_bool));
+#endif
+ is_nullr = apr_pcalloc(pool, nfields*sizeof(my_bool));
+ for ( i = 0; i < nfields; ++i ) {
+ maxlen = ((*res)->res->fields[i].length < sql->fldsz ?
+ (*res)->res->fields[i].length : sql->fldsz) + 1;
+ (*res)->bind[i].buffer_type = MYSQL_TYPE_VAR_STRING;
+ (*res)->bind[i].buffer_length = maxlen;
+ (*res)->bind[i].length = &length[i];
+ (*res)->bind[i].buffer = apr_palloc(pool, maxlen);
+ (*res)->bind[i].is_null = is_nullr+i;
+#if MYSQL_VERSION_ID >= 50000
+ (*res)->bind[i].error = error+i;
+#endif
+ }
+ }
+ ret = mysql_stmt_bind_result(statement->stmt, (*res)->bind);
+ if (!ret) {
+ ret = mysql_stmt_store_result(statement->stmt);
+ }
+ }
+ }
+ if (ret != 0) {
+ ret = mysql_stmt_errno(statement->stmt);
+ }
+ if (sql->trans) {
+ sql->trans->errnum = ret;
+ }
+ return ret;
+}
+
+static int dbd_mysql_end_transaction(apr_dbd_transaction_t *trans)
+{
+ int ret = -1;
+ if (trans) {
+ if (trans->errnum) {
+ trans->errnum = 0;
+ ret = mysql_rollback(trans->handle->conn);
+ }
+ else {
+ ret = mysql_commit(trans->handle->conn);
+ }
+ }
+ ret |= mysql_autocommit(trans->handle->conn, 1);
+ trans->handle->trans = NULL;
+ return ret;
+}
+/* Whether or not transactions work depends on whether the
+ * underlying DB supports them within MySQL. Unfortunately
+ * it fails silently with the default InnoDB.
+ */
+
+static int dbd_mysql_transaction(apr_pool_t *pool, apr_dbd_t *handle,
+ apr_dbd_transaction_t **trans)
+{
+ /* Don't try recursive transactions here */
+ if (handle->trans) {
+ dbd_mysql_end_transaction(handle->trans) ;
+ }
+ if (!*trans) {
+ *trans = apr_pcalloc(pool, sizeof(apr_dbd_transaction_t));
+ }
+ (*trans)->errnum = mysql_autocommit(handle->conn, 0);
+ (*trans)->handle = handle;
+ handle->trans = *trans;
+ return (*trans)->errnum;
+}
+
+static apr_dbd_t *dbd_mysql_open(apr_pool_t *pool, const char *params)
+{
+ static const char *const delims = " \r\n\t;|,";
+ const char *ptr;
+ int i;
+ const char *key;
+ size_t klen;
+ const char *value;
+ size_t vlen;
+#if MYSQL_VERSION_ID >= 50013
+ my_bool do_reconnect = 1;
+#endif
+ MYSQL *real_conn;
+ unsigned long flags = 0;
+
+ struct {
+ const char *field;
+ const char *value;
+ } fields[] = {
+ {"host", NULL},
+ {"user", NULL},
+ {"pass", NULL},
+ {"dbname", NULL},
+ {"port", NULL},
+ {"sock", NULL},
+ {"flags", NULL},
+ {"fldsz", NULL},
+ {"group", NULL},
+ {NULL, NULL}
+ };
+ unsigned int port = 0;
+ apr_dbd_t *sql = apr_pcalloc(pool, sizeof(apr_dbd_t));
+ sql->fldsz = FIELDSIZE;
+ sql->conn = mysql_init(sql->conn);
+ if ( sql->conn == NULL ) {
+ return NULL;
+ }
+ for (ptr = strchr(params, '='); ptr; ptr = strchr(ptr, '=')) {
+ for (key = ptr-1; isspace(*key); --key);
+ klen = 0;
+ while (isalpha(*key)) {
+ /* don't parse backwards off the start of the string */
+ if (key == params) {
+ --key;
+ ++klen;
+ break;
+ }
+ --key;
+ ++klen;
+ }
+ ++key;
+ for (value = ptr+1; isspace(*value); ++value);
+ vlen = strcspn(value, delims);
+ for (i = 0; fields[i].field != NULL; i++) {
+ if (!strncasecmp(fields[i].field, key, klen)) {
+ fields[i].value = apr_pstrndup(pool, value, vlen);
+ break;
+ }
+ }
+ ptr = value+vlen;
+ }
+ if (fields[4].value != NULL) {
+ port = atoi(fields[4].value);
+ }
+ if (fields[6].value != NULL &&
+ !strcmp(fields[6].value, "CLIENT_FOUND_ROWS")) {
+ flags |= CLIENT_FOUND_ROWS; /* only option we know */
+ }
+ if (fields[7].value != NULL) {
+ sql->fldsz = atol(fields[7].value);
+ }
+ if (fields[8].value != NULL) {
+ mysql_options(sql->conn, MYSQL_READ_DEFAULT_GROUP, fields[8].value);
+ }
+
+#if MYSQL_VERSION_ID >= 50013
+ /* the MySQL manual says this should be BEFORE mysql_real_connect */
+ mysql_options(sql->conn, MYSQL_OPT_RECONNECT, &do_reconnect);
+#endif
+
+ real_conn = mysql_real_connect(sql->conn, fields[0].value,
+ fields[1].value, fields[2].value,
+ fields[3].value, port,
+ fields[5].value, flags);
+
+ if(real_conn == NULL) {
+ mysql_close(sql->conn);
+ return NULL;
+ }
+
+#if MYSQL_VERSION_ID >= 50013
+ /* Some say this should be AFTER mysql_real_connect */
+ mysql_options(sql->conn, MYSQL_OPT_RECONNECT, &do_reconnect);
+#endif
+
+ return sql;
+}
+
+static apr_status_t dbd_mysql_close(apr_dbd_t *handle)
+{
+ mysql_close(handle->conn);
+ return APR_SUCCESS;
+}
+
+static apr_status_t dbd_mysql_check_conn(apr_pool_t *pool,
+ apr_dbd_t *handle)
+{
+ return mysql_ping(handle->conn) ? APR_EGENERAL : APR_SUCCESS;
+}
+
+static int dbd_mysql_select_db(apr_pool_t *pool, apr_dbd_t* handle,
+ const char* name)
+{
+ return mysql_select_db(handle->conn, name);
+}
+
+static void *dbd_mysql_native(apr_dbd_t *handle)
+{
+ return handle->conn;
+}
+
+static int dbd_mysql_num_cols(apr_dbd_results_t *res)
+{
+ if (res->statement) {
+ return mysql_stmt_field_count(res->statement);
+ }
+ else {
+ return mysql_num_fields(res->res);
+ }
+}
+
+static int dbd_mysql_num_tuples(apr_dbd_results_t *res)
+{
+ if (res->random) {
+ if (res->statement) {
+ return (int) mysql_stmt_num_rows(res->statement);
+ }
+ else {
+ return (int) mysql_num_rows(res->res);
+ }
+ }
+ else {
+ return -1;
+ }
+}
+
+static apr_status_t thread_end(void *data)
+{
+ mysql_thread_end();
+ return APR_SUCCESS;
+}
+
+static void dbd_mysql_init(apr_pool_t *pool)
+{
+ my_init();
+ mysql_thread_init();
+
+ /* FIXME: this is a guess; find out what it really does */
+ apr_pool_cleanup_register(pool, NULL, thread_end, apr_pool_cleanup_null);
+}
+APU_DECLARE_DATA const apr_dbd_driver_t apr_dbd_mysql_driver = {
+ "mysql",
+ dbd_mysql_init,
+ dbd_mysql_native,
+ dbd_mysql_open,
+ dbd_mysql_check_conn,
+ dbd_mysql_close,
+ dbd_mysql_select_db,
+ dbd_mysql_transaction,
+ dbd_mysql_end_transaction,
+ dbd_mysql_query,
+ dbd_mysql_select,
+ dbd_mysql_num_cols,
+ dbd_mysql_num_tuples,
+ dbd_mysql_get_row,
+ dbd_mysql_get_entry,
+ dbd_mysql_error,
+ dbd_mysql_escape,
+ dbd_mysql_prepare,
+ dbd_mysql_pvquery,
+ dbd_mysql_pvselect,
+ dbd_mysql_pquery,
+ dbd_mysql_pselect
+};
+
+#endif
diff --git a/srclib/apr-util/dbd/apr_dbd_pgsql.c b/srclib/apr-util/dbd/apr_dbd_pgsql.c
index 76bfa0c1..2fc28ac7 100644
--- a/srclib/apr-util/dbd/apr_dbd_pgsql.c
+++ b/srclib/apr-util/dbd/apr_dbd_pgsql.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/dbd/apr_dbd_sqlite2.c b/srclib/apr-util/dbd/apr_dbd_sqlite2.c
index d93bf111..6907be7b 100644
--- a/srclib/apr-util/dbd/apr_dbd_sqlite2.c
+++ b/srclib/apr-util/dbd/apr_dbd_sqlite2.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/dbd/apr_dbd_sqlite3.c b/srclib/apr-util/dbd/apr_dbd_sqlite3.c
index d82e3d31..32073fcb 100644
--- a/srclib/apr-util/dbd/apr_dbd_sqlite3.c
+++ b/srclib/apr-util/dbd/apr_dbd_sqlite3.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/dbm/apr_dbm.c b/srclib/apr-util/dbm/apr_dbm.c
index 88cf08e6..d4fed7b1 100644
--- a/srclib/apr-util/dbm/apr_dbm.c
+++ b/srclib/apr-util/dbm/apr_dbm.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/dbm/apr_dbm_berkeleydb.c b/srclib/apr-util/dbm/apr_dbm_berkeleydb.c
index 46ededcc..06277421 100644
--- a/srclib/apr-util/dbm/apr_dbm_berkeleydb.c
+++ b/srclib/apr-util/dbm/apr_dbm_berkeleydb.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/dbm/apr_dbm_gdbm.c b/srclib/apr-util/dbm/apr_dbm_gdbm.c
index 93fb942a..f0baee8d 100644
--- a/srclib/apr-util/dbm/apr_dbm_gdbm.c
+++ b/srclib/apr-util/dbm/apr_dbm_gdbm.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -41,7 +41,7 @@ typedef datum *cvt_datum_t;
#define CONVERT_DATUM(cvt, pinput) ((cvt) = (datum *)(pinput))
typedef datum result_datum_t;
-#define RETURN_DATUM(poutput, rd) (*(poutput) = *(apr_datum_t *)&(rd))
+#define RETURN_DATUM(poutput, rd) ((poutput)->dptr = (rd).dptr, (poutput)->dsize = (apr_size_t) (rd).dsize)
#define APR_DBM_CLOSE(f) gdbm_close(f)
#define APR_DBM_FETCH(f, k, v) ((v) = gdbm_fetch(f, *(k)), APR_SUCCESS)
diff --git a/srclib/apr-util/dbm/apr_dbm_ndbm.c b/srclib/apr-util/dbm/apr_dbm_ndbm.c
index d770ed44..c4bcfcf7 100644
--- a/srclib/apr-util/dbm/apr_dbm_ndbm.c
+++ b/srclib/apr-util/dbm/apr_dbm_ndbm.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/dbm/apr_dbm_sdbm.c b/srclib/apr-util/dbm/apr_dbm_sdbm.c
index dadb1e26..f99b3805 100644
--- a/srclib/apr-util/dbm/apr_dbm_sdbm.c
+++ b/srclib/apr-util/dbm/apr_dbm_sdbm.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -41,10 +41,12 @@
typedef apr_sdbm_t *real_file_t;
typedef apr_sdbm_datum_t cvt_datum_t;
-#define CONVERT_DATUM(cvt, pinput) ((cvt).dptr = (pinput)->dptr, (cvt).dsize = (pinput)->dsize)
+#define CONVERT_DATUM(cvt, pinput) \
+ ((cvt).dptr = (pinput)->dptr, (cvt).dsize = (int)(pinput)->dsize)
typedef apr_sdbm_datum_t result_datum_t;
-#define RETURN_DATUM(poutput, rd) ((poutput)->dptr = (rd).dptr, (poutput)->dsize = (rd).dsize)
+#define RETURN_DATUM(poutput, rd) \
+ ((poutput)->dptr = (rd).dptr, (poutput)->dsize = (rd).dsize)
#define APR_DBM_CLOSE(f) apr_sdbm_close(f)
#define APR_DBM_FETCH(f, k, v) apr_sdbm_fetch(f, &(v), (k))
diff --git a/srclib/apr-util/dbm/sdbm/sdbm.c b/srclib/apr-util/dbm/sdbm/sdbm.c
index 537a5b72..787f235c 100644
--- a/srclib/apr-util/dbm/sdbm/sdbm.c
+++ b/srclib/apr-util/dbm/sdbm/sdbm.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/dbm/sdbm/sdbm_hash.c b/srclib/apr-util/dbm/sdbm/sdbm_hash.c
index 012e3d07..e4d75179 100644
--- a/srclib/apr-util/dbm/sdbm/sdbm_hash.c
+++ b/srclib/apr-util/dbm/sdbm/sdbm_hash.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/dbm/sdbm/sdbm_lock.c b/srclib/apr-util/dbm/sdbm/sdbm_lock.c
index a001ed41..b2a30112 100644
--- a/srclib/apr-util/dbm/sdbm/sdbm_lock.c
+++ b/srclib/apr-util/dbm/sdbm/sdbm_lock.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/dbm/sdbm/sdbm_pair.c b/srclib/apr-util/dbm/sdbm/sdbm_pair.c
index 3fe82b66..21302007 100644
--- a/srclib/apr-util/dbm/sdbm/sdbm_pair.c
+++ b/srclib/apr-util/dbm/sdbm/sdbm_pair.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -183,7 +183,7 @@ apr_sdbm_datum_t key;
register int m;
register char *dst = pag + (i == 1 ? PBLKSIZ : ino[i - 1]);
register char *src = pag + ino[i + 1];
- register int zoo = dst - src;
+ register short zoo = (short) (dst - src);
debug(("free-up %d ", zoo));
/*
diff --git a/srclib/apr-util/dbm/sdbm/sdbm_pair.h b/srclib/apr-util/dbm/sdbm/sdbm_pair.h
index 51d10658..222c5e17 100644
--- a/srclib/apr-util/dbm/sdbm/sdbm_pair.h
+++ b/srclib/apr-util/dbm/sdbm/sdbm_pair.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/dbm/sdbm/sdbm_private.h b/srclib/apr-util/dbm/sdbm/sdbm_private.h
index a1ad29d4..f5d1ae06 100644
--- a/srclib/apr-util/dbm/sdbm/sdbm_private.h
+++ b/srclib/apr-util/dbm/sdbm/sdbm_private.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/dbm/sdbm/sdbm_tune.h b/srclib/apr-util/dbm/sdbm/sdbm_tune.h
index 92ed6a25..9bf3d09f 100644
--- a/srclib/apr-util/dbm/sdbm/sdbm_tune.h
+++ b/srclib/apr-util/dbm/sdbm/sdbm_tune.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/encoding/apr_base64.c b/srclib/apr-util/encoding/apr_base64.c
index 4a1f49c5..1eed1530 100644
--- a/srclib/apr-util/encoding/apr_base64.c
+++ b/srclib/apr-util/encoding/apr_base64.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -111,13 +111,13 @@ APU_DECLARE(int) apr_base64_decode_len(const char *bufcoded)
{
int nbytesdecoded;
register const unsigned char *bufin;
- register int nprbytes;
+ register apr_size_t nprbytes;
bufin = (const unsigned char *) bufcoded;
while (pr2six[*(bufin++)] <= 63);
nprbytes = (bufin - (const unsigned char *) bufcoded) - 1;
- nbytesdecoded = ((nprbytes + 3) / 4) * 3;
+ nbytesdecoded = (((int)nprbytes + 3) / 4) * 3;
return nbytesdecoded + 1;
}
@@ -148,12 +148,12 @@ APU_DECLARE(int) apr_base64_decode_binary(unsigned char *bufplain,
int nbytesdecoded;
register const unsigned char *bufin;
register unsigned char *bufout;
- register int nprbytes;
+ register apr_size_t nprbytes;
bufin = (const unsigned char *) bufcoded;
while (pr2six[*(bufin++)] <= 63);
nprbytes = (bufin - (const unsigned char *) bufcoded) - 1;
- nbytesdecoded = ((nprbytes + 3) / 4) * 3;
+ nbytesdecoded = (((int)nprbytes + 3) / 4) * 3;
bufout = (unsigned char *) bufplain;
bufin = (const unsigned char *) bufcoded;
@@ -183,7 +183,7 @@ APU_DECLARE(int) apr_base64_decode_binary(unsigned char *bufplain,
(unsigned char) (pr2six[bufin[2]] << 6 | pr2six[bufin[3]]);
}
- nbytesdecoded -= (4 - nprbytes) & 3;
+ nbytesdecoded -= (4 - (int)nprbytes) & 3;
return nbytesdecoded;
}
@@ -264,5 +264,5 @@ APU_DECLARE(int) apr_base64_encode_binary(char *encoded,
}
*p++ = '\0';
- return p - encoded;
+ return (int)(p - encoded);
}
diff --git a/srclib/apr-util/hooks/apr_hooks.c b/srclib/apr-util/hooks/apr_hooks.c
index da0ae970..44353cbb 100644
--- a/srclib/apr-util/hooks/apr_hooks.c
+++ b/srclib/apr-util/hooks/apr_hooks.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apr_anylock.h b/srclib/apr-util/include/apr_anylock.h
index 6b724de2..51e97ff3 100644
--- a/srclib/apr-util/include/apr_anylock.h
+++ b/srclib/apr-util/include/apr_anylock.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apr_base64.h b/srclib/apr-util/include/apr_base64.h
index d26aeb2d..b4b2b88f 100644
--- a/srclib/apr-util/include/apr_base64.h
+++ b/srclib/apr-util/include/apr_base64.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -80,9 +80,10 @@ APU_DECLARE(int) apr_base64_encode_binary(char * coded_dst,
int len_plain_src);
/**
- * Determine the length of a plain text string given the encoded version
+ * Determine the maximum buffer length required to decode the plain text
+ * string given the encoded string.
* @param coded_src The encoded string
- * @return the length of the plain text string
+ * @return the maximum required buffer length for the plain text string
*/
APU_DECLARE(int) apr_base64_decode_len(const char * coded_src);
diff --git a/srclib/apr-util/include/apr_buckets.h b/srclib/apr-util/include/apr_buckets.h
index 01f6743d..8983a372 100644
--- a/srclib/apr-util/include/apr_buckets.h
+++ b/srclib/apr-util/include/apr_buckets.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apr_date.h b/srclib/apr-util/include/apr_date.h
index 87500a33..b098b542 100644
--- a/srclib/apr-util/include/apr_date.h
+++ b/srclib/apr-util/include/apr_date.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apr_dbd.h b/srclib/apr-util/include/apr_dbd.h
index 103ff9cb..3fd19e1c 100644
--- a/srclib/apr-util/include/apr_dbd.h
+++ b/srclib/apr-util/include/apr_dbd.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -79,13 +79,15 @@ APU_DECLARE(apr_status_t) apr_dbd_get_driver(apr_pool_t *pool, const char *name,
* function as a filename to be opened (check SQLite3 documentation for more
* details).
* @remarks MySQL: the params can have "host", "port", "user", "pass",
- * "dbname", "sock", "flags" and "fldsz" keys, each followed by an equal sign
- * and a value. Such key/value pairs can be delimited by space, CR, LF, tab,
- * semicolon, vertical bar or comma. For now, "flags" can only recognise
- * CLIENT_FOUND_ROWS (check MySQL manual for details). The value associated
- * with "fldsz" determines maximum amount of memory (in bytes) for each of
- * the fields in the result set of prepared statements. By default, this
- * value is 1 MB.
+ * "dbname", "sock", "flags" "fldsz" and "group" keys, each followed by an
+ * equal sign and a value. Such key/value pairs can be delimited by space,
+ * CR, LF, tab, semicolon, vertical bar or comma. For now, "flags" can only
+ * recognise CLIENT_FOUND_ROWS (check MySQL manual for details). The value
+ * associated with "fldsz" determines maximum amount of memory (in bytes) for
+ * each of the fields in the result set of prepared statements. By default,
+ * this value is 1 MB. The value associated with "group" determines which
+ * group from configuration file to use (see MYSQL_READ_DEFAULT_GROUP option
+ * of mysql_options() in MySQL manual).
*/
APU_DECLARE(apr_status_t) apr_dbd_open(const apr_dbd_driver_t *driver,
apr_pool_t *pool, const char *params,
diff --git a/srclib/apr-util/include/apr_dbm.h b/srclib/apr-util/include/apr_dbm.h
index d34f9ad3..9f6e8b47 100644
--- a/srclib/apr-util/include/apr_dbm.h
+++ b/srclib/apr-util/include/apr_dbm.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apr_hooks.h b/srclib/apr-util/include/apr_hooks.h
index 287fb8cb..1a528332 100644
--- a/srclib/apr-util/include/apr_hooks.h
+++ b/srclib/apr-util/include/apr_hooks.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apr_ldap.h.in b/srclib/apr-util/include/apr_ldap.h.in
index e44729d6..d66f1fd6 100644
--- a/srclib/apr-util/include/apr_ldap.h.in
+++ b/srclib/apr-util/include/apr_ldap.h.in
@@ -1,9 +1,9 @@
-/* Copyright 2002-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -40,6 +40,7 @@
#define APR_HAS_MOZILLA_LDAPSDK @apu_has_ldap_mozilla@
#define APR_HAS_OPENLDAP_LDAPSDK @apu_has_ldap_openldap@
#define APR_HAS_MICROSOFT_LDAPSDK @apu_has_ldap_microsoft@
+#define APR_HAS_ZOS_LDAPSDK @apu_has_ldap_zos@
#define APR_HAS_OTHER_LDAPSDK @apu_has_ldap_other@
@@ -93,6 +94,29 @@
#define LDAPS_PORT 636 /* ldaps:/// default LDAP over TLS port */
#endif
+/*
+ * For ldap function calls that input a size limit on the number of returned elements
+ * Some SDKs do not have the define for LDAP_DEFAULT_LIMIT (-1) or LDAP_NO_LIMIT (0)
+ */
+#if APR_HAS_ZOS_LDAPSDK
+#define APR_LDAP_SIZELIMIT LDAP_NO_LIMIT
+#else
+#ifdef LDAP_DEFAULT_LIMIT
+#define APR_LDAP_SIZELIMIT LDAP_DEFAULT_LIMIT
+#else
+#define APR_LDAP_SIZELIMIT -1 /* equivalent to LDAP_DEFAULT_LIMIT */
+#endif
+#endif
+
+/*
+ * z/OS is missing some defines
+ */
+#ifndef LDAP_VERSION_MAX
+#define LDAP_VERSION_MAX LDAP_VERSION
+#endif
+#if APR_HAS_ZOS_LDAPSDK
+#define LDAP_VENDOR_NAME "IBM z/OS"
+#endif
/* Note: Macros defining const casting has been removed in APR v1.0,
* pending real support for LDAP v2.0 toolkits.
diff --git a/srclib/apr-util/include/apr_ldap.hnw b/srclib/apr-util/include/apr_ldap.hnw
index 947eaac2..105dfff0 100644
--- a/srclib/apr-util/include/apr_ldap.hnw
+++ b/srclib/apr-util/include/apr_ldap.hnw
@@ -1,9 +1,9 @@
-/* Copyright 2002-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apr_ldap.hw b/srclib/apr-util/include/apr_ldap.hw
index 7a4d67f8..57b11639 100644
--- a/srclib/apr-util/include/apr_ldap.hw
+++ b/srclib/apr-util/include/apr_ldap.hw
@@ -1,9 +1,9 @@
-/* Copyright 2002-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -87,6 +87,13 @@
#endif
+/*
+ * For ldap function calls that input a size limit on the number of returned elements
+ * Some SDKs do not have the define for LDAP_DEFAULT_LIMIT (-1) or LDAP_NO_LIMIT (0)
+ */
+#define APR_LDAP_SIZELIMIT LDAP_NO_LIMIT
+
+
/* Note: Macros defining const casting has been removed in APR v1.0,
* pending real support for LDAP v2.0 toolkits.
*
diff --git a/srclib/apr-util/include/apr_ldap_init.h b/srclib/apr-util/include/apr_ldap_init.h
index bd13d070..2120262c 100644
--- a/srclib/apr-util/include/apr_ldap_init.h
+++ b/srclib/apr-util/include/apr_ldap_init.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apr_ldap_option.h b/srclib/apr-util/include/apr_ldap_option.h
index 489dc0c8..32041329 100644
--- a/srclib/apr-util/include/apr_ldap_option.h
+++ b/srclib/apr-util/include/apr_ldap_option.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apr_ldap_url.h b/srclib/apr-util/include/apr_ldap_url.h
index de591614..6ebda832 100644
--- a/srclib/apr-util/include/apr_ldap_url.h
+++ b/srclib/apr-util/include/apr_ldap_url.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apr_md4.h b/srclib/apr-util/include/apr_md4.h
index 42d108df..43fb33e3 100644
--- a/srclib/apr-util/include/apr_md4.h
+++ b/srclib/apr-util/include/apr_md4.h
@@ -1,9 +1,9 @@
-/* Copyright 2001-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apr_md5.h b/srclib/apr-util/include/apr_md5.h
index c6a306e3..367324a7 100644
--- a/srclib/apr-util/include/apr_md5.h
+++ b/srclib/apr-util/include/apr_md5.h
@@ -28,12 +28,12 @@
documentation and/or software.
*/
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apr_optional.h b/srclib/apr-util/include/apr_optional.h
index 8c9413f9..3301d66e 100644
--- a/srclib/apr-util/include/apr_optional.h
+++ b/srclib/apr-util/include/apr_optional.h
@@ -1,9 +1,9 @@
-/* Copyright 2001-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apr_optional_hooks.h b/srclib/apr-util/include/apr_optional_hooks.h
index 7d01ab00..54bf65ef 100644
--- a/srclib/apr-util/include/apr_optional_hooks.h
+++ b/srclib/apr-util/include/apr_optional_hooks.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apr_queue.h b/srclib/apr-util/include/apr_queue.h
index 5a0181b2..5d24c67c 100644
--- a/srclib/apr-util/include/apr_queue.h
+++ b/srclib/apr-util/include/apr_queue.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apr_reslist.h b/srclib/apr-util/include/apr_reslist.h
index e6b64846..e7025939 100644
--- a/srclib/apr-util/include/apr_reslist.h
+++ b/srclib/apr-util/include/apr_reslist.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apr_rmm.h b/srclib/apr-util/include/apr_rmm.h
index a1f0d676..976fe9c5 100644
--- a/srclib/apr-util/include/apr_rmm.h
+++ b/srclib/apr-util/include/apr_rmm.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apr_sdbm.h b/srclib/apr-util/include/apr_sdbm.h
index 7fcf7f6e..d5a5cbf1 100644
--- a/srclib/apr-util/include/apr_sdbm.h
+++ b/srclib/apr-util/include/apr_sdbm.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apr_sha1.h b/srclib/apr-util/include/apr_sha1.h
index 1ad50655..2a4edf36 100644
--- a/srclib/apr-util/include/apr_sha1.h
+++ b/srclib/apr-util/include/apr_sha1.h
@@ -1,9 +1,9 @@
-/* Copyright 2001-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apr_strmatch.h b/srclib/apr-util/include/apr_strmatch.h
index 4753318b..53fadad5 100644
--- a/srclib/apr-util/include/apr_strmatch.h
+++ b/srclib/apr-util/include/apr_strmatch.h
@@ -1,9 +1,9 @@
-/* Copyright 2002-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apr_uri.h b/srclib/apr-util/include/apr_uri.h
index 82a86b24..99db4d96 100644
--- a/srclib/apr-util/include/apr_uri.h
+++ b/srclib/apr-util/include/apr_uri.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apr_uuid.h b/srclib/apr-util/include/apr_uuid.h
index 820d7409..5312a9f6 100644
--- a/srclib/apr-util/include/apr_uuid.h
+++ b/srclib/apr-util/include/apr_uuid.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apr_xlate.h b/srclib/apr-util/include/apr_xlate.h
index 19402a76..32636685 100644
--- a/srclib/apr-util/include/apr_xlate.h
+++ b/srclib/apr-util/include/apr_xlate.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apr_xml.h b/srclib/apr-util/include/apr_xml.h
index ab184e7a..2a43b283 100644
--- a/srclib/apr-util/include/apr_xml.h
+++ b/srclib/apr-util/include/apr_xml.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apu.h.in b/srclib/apr-util/include/apu.h.in
index 5bd7d00f..13e6a6d4 100644
--- a/srclib/apr-util/include/apu.h.in
+++ b/srclib/apr-util/include/apu.h.in
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apu.hnw b/srclib/apr-util/include/apu.hnw
index d31996a1..ced27a43 100644
--- a/srclib/apr-util/include/apu.hnw
+++ b/srclib/apr-util/include/apu.hnw
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -21,15 +21,16 @@
/* @file apu.h
* @brief APR-Utility main file
*/
+
+#ifdef NETWARE
+#ifndef APU_H
+#define APU_H
/**
* @defgroup APR_Util APR Utility Functions
* @{
*/
-#ifndef APU_H
-#define APU_H
-
/**
* APU_DECLARE_EXPORT is defined when building the APR-UTIL dynamic library,
* so that all public symbols are exported.
@@ -71,27 +72,19 @@
* we always have SDBM (it's in our codebase)
*/
#define APU_HAVE_SDBM 1
+#define APU_HAVE_NDBM 0
#define APU_HAVE_GDBM 0
#define APU_HAVE_DB 0
-
-#define HAVE_ICONV_H 1
#define APU_HAVE_APR_ICONV 0
#define APU_HAVE_ICONV 1
#define APR_HAS_XLATE (APU_HAVE_APR_ICONV || APU_HAVE_ICONV)
-/*
- * check for newer NDKs which use now correctly 'const char*' with iconv.
- */
-#include <ndkvers.h>
-#if (CURRENT_NDK_THRESHOLD >= 705110000)
-#define APU_ICONV_INBUF_CONST
-#endif
-
/*
* Hack to enable dynamic loads within apr_dbd
*/
#define APR_DSO_BUILD APR_HAS_DSO
#endif /* APU_H */
-/** @} */
+#endif /* NETWARE */
+
diff --git a/srclib/apr-util/include/apu.hw b/srclib/apr-util/include/apu.hw
index 494a8b72..0a912bcf 100644
--- a/srclib/apr-util/include/apu.hw
+++ b/srclib/apr-util/include/apu.hw
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -87,27 +87,23 @@
* we always have SDBM (it's in our codebase)
*/
#define APU_HAVE_SDBM 1
+#define APU_HAVE_NDBM 0
#define APU_HAVE_GDBM 0
-
-/* Allow external override */
-#if !defined(APU_HAVE_DB)
#define APU_HAVE_DB 0
+
+#if APU_HAVE_DB
+#define APU_HAVE_DB_VERSION UNKNOWN
#endif
+#define APU_HAVE_PGSQL 0
+#define APU_HAVE_MYSQL 0
+#define APU_HAVE_SQLITE2 0
+#define APU_HAVE_SQLITE3 0
+#define APU_HAVE_ORACLE 0
#define APU_HAVE_APR_ICONV 1
#define APU_HAVE_ICONV 0
#define APR_HAS_XLATE (APU_HAVE_APR_ICONV || APU_HAVE_ICONV)
-#if !defined(APU_HAVE_PGSQL)
-#define APU_HAVE_PGSQL 0
-#endif
-#if !defined(APU_HAVE_SQLITE2)
-#define APU_HAVE_SQLITE2 0
-#endif
-#if !defined(APU_HAVE_SQLITE3)
-#define APU_HAVE_SQLITE3 0
-#endif
-
#endif /* APU_H */
#endif /* WIN32 */
diff --git a/srclib/apr-util/include/apu_version.h b/srclib/apr-util/include/apu_version.h
index 17076831..f39d3b40 100644
--- a/srclib/apr-util/include/apu_version.h
+++ b/srclib/apr-util/include/apu_version.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -59,7 +59,7 @@
* The Patch Level never includes API changes, simply bug fixes.
* Reset to 0 when upgrading APR_MINOR_VERSION
*/
-#define APU_PATCH_VERSION 10
+#define APU_PATCH_VERSION 12
/**
* The symbol APU_IS_DEV_VERSION is only defined for internal,
diff --git a/srclib/apr-util/include/apu_want.h.in b/srclib/apr-util/include/apu_want.h.in
index ac297292..a296e5c5 100644
--- a/srclib/apr-util/include/apu_want.h.in
+++ b/srclib/apr-util/include/apu_want.h.in
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apu_want.hnw b/srclib/apr-util/include/apu_want.hnw
index 4927da8b..afdc9f74 100644
--- a/srclib/apr-util/include/apu_want.hnw
+++ b/srclib/apr-util/include/apu_want.hnw
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/apu_want.hw b/srclib/apr-util/include/apu_want.hw
index 4927da8b..8bb56ce7 100644
--- a/srclib/apr-util/include/apu_want.hw
+++ b/srclib/apr-util/include/apu_want.hw
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -23,7 +23,7 @@
* <PRE>
* Features:
*
- * APU_WANT_DB: <@apu_db_header>
+ * APU_WANT_DB: <db.h>
*
* Typical usage:
*
diff --git a/srclib/apr-util/include/private/apr_dbd_internal.h b/srclib/apr-util/include/private/apr_dbd_internal.h
index fcefc234..1769d466 100644
--- a/srclib/apr-util/include/private/apr_dbd_internal.h
+++ b/srclib/apr-util/include/private/apr_dbd_internal.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/private/apr_dbm_private.h b/srclib/apr-util/include/private/apr_dbm_private.h
index 7faae8bf..c598752f 100644
--- a/srclib/apr-util/include/private/apr_dbm_private.h
+++ b/srclib/apr-util/include/private/apr_dbm_private.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/private/apu_config.h.in b/srclib/apr-util/include/private/apu_config.h.in
index 1e905718..1c65b912 100644
--- a/srclib/apr-util/include/private/apu_config.h.in
+++ b/srclib/apr-util/include/private/apu_config.h.in
@@ -18,9 +18,6 @@
/* Define to 1 if you have the `crypt_r' function. */
#undef HAVE_CRYPT_R
-/* Define to 1 if you have the file `AC_File'. */
-#undef HAVE_DBD_APR_DBD_MYSQL_C
-
/* Define if expat.h is available */
#undef HAVE_EXPAT_H
diff --git a/srclib/apr-util/include/private/apu_config.hnw b/srclib/apr-util/include/private/apu_config.hnw
new file mode 100644
index 00000000..a92da1bf
--- /dev/null
+++ b/srclib/apr-util/include/private/apu_config.hnw
@@ -0,0 +1,50 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * Note: This is a NetWare specific version of apu_config.hnw. It is copied
+ * as apu_config.h at the start of a NetWare build.
+ */
+
+#ifdef NETWARE
+
+#ifndef APU_CONFIG_H
+#define APU_CONFIG_H
+
+/*
+ * NetWare does not have GDBM, and we always use the bundled (new) Expat
+ */
+
+/* Define if you have the gdbm library (-lgdbm). */
+/* #undef HAVE_LIBGDBM */
+
+/* define if Expat 1.0 or 1.1 was found */
+/* #undef APR_HAVE_OLD_EXPAT */
+
+/* NetWare uses its own ICONV implementation. */
+#define HAVE_ICONV_H 1
+
+/*
+ * check for newer NDKs which use now correctly 'const char*' with iconv.
+ */
+#include <ndkvers.h>
+#if (CURRENT_NDK_THRESHOLD >= 705110000)
+#define APU_ICONV_INBUF_CONST
+#endif
+
+#endif /* APU_CONFIG_H */
+#endif /* NETWARE */
+
diff --git a/srclib/apr-util/include/private/apu_config.hw b/srclib/apr-util/include/private/apu_config.hw
index c4d7d093..72cea511 100644
--- a/srclib/apr-util/include/private/apu_config.hw
+++ b/srclib/apr-util/include/private/apu_config.hw
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/private/apu_select_dbm.h.in b/srclib/apr-util/include/private/apu_select_dbm.h.in
index c24ebe52..b69aec03 100644
--- a/srclib/apr-util/include/private/apu_select_dbm.h.in
+++ b/srclib/apr-util/include/private/apu_select_dbm.h.in
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/include/private/apu_select_dbm.hnw b/srclib/apr-util/include/private/apu_select_dbm.hnw
new file mode 100644
index 00000000..baa6c144
--- /dev/null
+++ b/srclib/apr-util/include/private/apu_select_dbm.hnw
@@ -0,0 +1,28 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef APU_SELECT_DBM_H
+#define APU_SELECT_DBM_H
+
+/*
+** The following macros control what features APRUTIL will use
+*/
+#define APU_USE_SDBM 1
+#define APU_USE_GDBM 0
+#define APU_USE_NDBM 0
+#define APU_USE_DB 0
+
+#endif /* !APU_SELECT_DBM_H */
diff --git a/srclib/apr-util/include/private/apu_select_dbm.hw b/srclib/apr-util/include/private/apu_select_dbm.hw
index 0561cb8f..97c7b6c2 100644
--- a/srclib/apr-util/include/private/apu_select_dbm.hw
+++ b/srclib/apr-util/include/private/apu_select_dbm.hw
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -20,13 +20,9 @@
/*
** The following macros control what features APRUTIL will use
*/
-#define APU_USE_SDBM 1
-#define APU_USE_GDBM 0
-#define APU_USE_NDBM 0
-#define APU_USE_DB 0
-
-#if APU_USE_DB
-#include <db.h>
-#endif
+#define APU_USE_SDBM 1
+#define APU_USE_GDBM 0
+#define APU_USE_NDBM 0
+#define APU_USE_DB 0
#endif /* !APU_SELECT_DBM_H */
diff --git a/srclib/apr-util/ldap/apr_ldap_init.c b/srclib/apr-util/ldap/apr_ldap_init.c
index 6aec5d16..767faade 100644
--- a/srclib/apr-util/ldap/apr_ldap_init.c
+++ b/srclib/apr-util/ldap/apr_ldap_init.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/ldap/apr_ldap_option.c b/srclib/apr-util/ldap/apr_ldap_option.c
index 43eb8d09..15d216a2 100644
--- a/srclib/apr-util/ldap/apr_ldap_option.c
+++ b/srclib/apr-util/ldap/apr_ldap_option.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/ldap/apr_ldap_url.c b/srclib/apr-util/ldap/apr_ldap_url.c
index 29684b77..52e37b25 100644
--- a/srclib/apr-util/ldap/apr_ldap_url.c
+++ b/srclib/apr-util/ldap/apr_ldap_url.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/libaprutil.dsp b/srclib/apr-util/libaprutil.dsp
index 7b22eff3..bc9afeb1 100644
--- a/srclib/apr-util/libaprutil.dsp
+++ b/srclib/apr-util/libaprutil.dsp
@@ -4,7 +4,7 @@
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-CFG=libaprutil - Win32 Debug
+CFG=libaprutil - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
@@ -13,12 +13,14 @@ CFG=libaprutil - Win32 Debug
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
-!MESSAGE NMAKE /f "libaprutil.mak" CFG="libaprutil - Win32 Debug"
+!MESSAGE NMAKE /f "libaprutil.mak" CFG="libaprutil - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "libaprutil - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "libaprutil - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "libaprutil - x64 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "libaprutil - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
@@ -43,7 +45,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
-# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "./include" /I "../apr/include" /I "./include/private" /I "../apr-iconv/include" /I "./dbm/sdbm" /I "./xml/expat/lib" /D "NDEBUG" /D "APU_DECLARE_EXPORT" /D "APU_USE_SDBM" /D "WIN32" /D "_WINDOWS" /Fd"Release\libaprutil_src" /FD /c
+# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "../apr/include" /I "./include/private" /I "../apr-iconv/include" /I "./dbm/sdbm" /I "./xml/expat/lib" /D "NDEBUG" /D "APU_DECLARE_EXPORT" /D "APU_USE_SDBM" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\libaprutil_src" /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
# ADD BASE RSC /l 0x409 /d "NDEBUG"
@@ -53,9 +55,9 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib ole32.lib /nologo /base:"0x6EE60000" /subsystem:windows /dll /incremental:no /debug /opt:ref
-# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib ole32.lib /nologo /base:"0x6EE60000" /subsystem:windows /dll /incremental:no /debug /out:".\Release\libaprutil-1.dll" /opt:ref
+# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib ole32.lib /nologo /base:"0x6EE60000" /subsystem:windows /dll /incremental:no /debug /out:"Release\libaprutil-1.dll" /pdb:"Release\libaprutil-1.pdb" /implib:"Release\libaprutil-1.lib" /MACHINE:X86 /opt:ref
# Begin Special Build Tool
-TargetPath=.\Release\libaprutil-1.dll
+TargetPath=Release\libaprutil-1.dll
SOURCE="$(InputPath)"
PostBuild_Desc=Embed .manifest
PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
@@ -74,8 +76,8 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
-# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "./include" /I "../apr/include" /I "./include/private" /I "../apr-iconv/include" /I "./dbm/sdbm" /I "./xml/expat/lib" /D "_DEBUG" /D "APU_DECLARE_EXPORT" /D "APU_USE_SDBM" /D "WIN32" /D "_WINDOWS" /Fd"Debug\libaprutil_src" /FD /c
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "../apr/include" /I "./include/private" /I "../apr-iconv/include" /I "./dbm/sdbm" /I "./xml/expat/lib" /D "_DEBUG" /D "APU_DECLARE_EXPORT" /D "APU_USE_SDBM" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\libaprutil_src" /FD /EHsc /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
# ADD BASE RSC /l 0x409 /d "_DEBUG"
@@ -85,9 +87,73 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib ole32.lib /nologo /base:"0x6EE60000" /subsystem:windows /dll /incremental:no /debug
-# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib ole32.lib /nologo /base:"0x6EE60000" /subsystem:windows /dll /incremental:no /debug /out:".\Debug\libaprutil-1.dll"
+# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib ole32.lib /nologo /base:"0x6EE60000" /subsystem:windows /dll /incremental:no /debug /out:"Debug\libaprutil-1.dll" /pdb:"Debug\libaprutil-1.pdb" /implib:"Debug\libaprutil-1.lib" /MACHINE:X86
# Begin Special Build Tool
-TargetPath=.\Debug\libaprutil-1.dll
+TargetPath=Debug\libaprutil-1.dll
+SOURCE="$(InputPath)"
+PostBuild_Desc=Embed .manifest
+PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
+# End Special Build Tool
+
+!ELSEIF "$(CFG)" == "libaprutil - x64 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "x64\Release"
+# PROP BASE Intermediate_Dir "x64\Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "x64\Release"
+# PROP Intermediate_Dir "x64\Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "../apr/include" /I "./include/private" /I "../apr-iconv/include" /I "./dbm/sdbm" /I "./xml/expat/lib" /D "NDEBUG" /D "APU_DECLARE_EXPORT" /D "APU_USE_SDBM" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\libaprutil_src" /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG" /d "APU_VERSION_ONLY" /I "./include" /I "../apr/include"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib ole32.lib /nologo /base:"0x6EE60000" /subsystem:windows /dll /incremental:no /debug /opt:ref
+# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib ole32.lib /nologo /base:"0x6EE60000" /subsystem:windows /dll /incremental:no /debug /out:"x64\Release\libaprutil-1.dll" /pdb:"x64\Release\libaprutil-1.pdb" /implib:"x64\Release\libaprutil-1.lib" /MACHINE:X64 /opt:ref
+# Begin Special Build Tool
+TargetPath=x64\Release\libaprutil-1.dll
+SOURCE="$(InputPath)"
+PostBuild_Desc=Embed .manifest
+PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
+# End Special Build Tool
+
+!ELSEIF "$(CFG)" == "libaprutil - x64 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "x64\Debug"
+# PROP BASE Intermediate_Dir "x64\Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "x64\Debug"
+# PROP Intermediate_Dir "x64\Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "../apr/include" /I "./include/private" /I "../apr-iconv/include" /I "./dbm/sdbm" /I "./xml/expat/lib" /D "_DEBUG" /D "APU_DECLARE_EXPORT" /D "APU_USE_SDBM" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\libaprutil_src" /FD /EHsc /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG" /d "APU_VERSION_ONLY" /I "./include" /I "../apr/include"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib ole32.lib /nologo /base:"0x6EE60000" /subsystem:windows /dll /incremental:no /debug
+# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib ole32.lib /nologo /base:"0x6EE60000" /subsystem:windows /dll /incremental:no /debug /out:"x64\Debug\libaprutil-1.dll" /pdb:"x64\Debug\libaprutil-1.pdb" /implib:"x64\Debug\libaprutil-1.lib" /MACHINE:X64
+# Begin Special Build Tool
+TargetPath=x64\Debug\libaprutil-1.dll
SOURCE="$(InputPath)"
PostBuild_Desc=Embed .manifest
PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
@@ -99,6 +165,8 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
# Name "libaprutil - Win32 Release"
# Name "libaprutil - Win32 Debug"
+# Name "libaprutil - x64 Release"
+# Name "libaprutil - x64 Debug"
# Begin Group "Source Files"
# PROP Default_Filter ""
@@ -190,6 +258,10 @@ SOURCE=.\dbd\apr_dbd.c
# End Source File
# Begin Source File
+SOURCE=.\dbd\apr_dbd_mysql.c
+# End Source File
+# Begin Source File
+
SOURCE=.\dbd\apr_dbd_pgsql.c
# End Source File
# Begin Source File
@@ -377,6 +449,26 @@ InputPath=.\include\apr_ldap.hw
# End Custom Build
+!ELSEIF "$(CFG)" == "libaprutil - x64 Release"
+
+# Begin Custom Build - Creating apr_ldap.h from apr_ldap.hw
+InputPath=.\include\apr_ldap.hw
+
+".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apr_ldap.hw > .\include\apr_ldap.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "libaprutil - x64 Debug"
+
+# Begin Custom Build - Creating apr_ldap.h from apr_ldap.hw
+InputPath=.\include\apr_ldap.hw
+
+".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apr_ldap.hw > .\include\apr_ldap.h
+
+# End Custom Build
+
!ENDIF
# End Source File
@@ -412,6 +504,26 @@ InputPath=.\include\apu.hw
# End Custom Build
+!ELSEIF "$(CFG)" == "libaprutil - x64 Release"
+
+# Begin Custom Build - Creating apu.h from apu.hw
+InputPath=.\include\apu.hw
+
+".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apu.hw > .\include\apu.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "libaprutil - x64 Debug"
+
+# Begin Custom Build - Creating apu.h from apu.hw
+InputPath=.\include\apu.hw
+
+".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apu.hw > .\include\apu.h
+
+# End Custom Build
+
!ENDIF
# End Source File
@@ -443,6 +555,26 @@ InputPath=.\include\private\apu_config.hw
# End Custom Build
+!ELSEIF "$(CFG)" == "libaprutil - x64 Release"
+
+# Begin Custom Build - Creating apu_config.h from apu_config.hw
+InputPath=.\include\private\apu_config.hw
+
+".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\private\apu_config.hw > .\include\private\apu_config.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "libaprutil - x64 Debug"
+
+# Begin Custom Build - Creating apu_config.h from apu_config.hw
+InputPath=.\include\private\apu_config.hw
+
+".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\private\apu_config.hw > .\include\private\apu_config.h
+
+# End Custom Build
+
!ENDIF
# End Source File
@@ -474,6 +606,26 @@ InputPath=.\include\private\apu_select_dbm.hw
# End Custom Build
+!ELSEIF "$(CFG)" == "libaprutil - x64 Release"
+
+# Begin Custom Build - Creating apu_select_dbm.h from apu_select_dbm.hw
+InputPath=.\include\private\apu_select_dbm.hw
+
+".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\private\apu_select_dbm.hw > .\include\private\apu_select_dbm.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "libaprutil - x64 Debug"
+
+# Begin Custom Build - Creating apu_select_dbm.h from apu_select_dbm.hw
+InputPath=.\include\private\apu_select_dbm.hw
+
+".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\private\apu_select_dbm.hw > .\include\private\apu_select_dbm.h
+
+# End Custom Build
+
!ENDIF
# End Source File
@@ -509,6 +661,26 @@ InputPath=.\include\apu_want.hw
# End Custom Build
+!ELSEIF "$(CFG)" == "libaprutil - x64 Release"
+
+# Begin Custom Build - Creating apu_want.h from apu_want.hw
+InputPath=.\include\apu_want.hw
+
+".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apu_want.hw > .\include\apu_want.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "libaprutil - x64 Debug"
+
+# Begin Custom Build - Creating apu_want.h from apu_want.hw
+InputPath=.\include\apu_want.hw
+
+".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apu_want.hw > .\include\apu_want.h
+
+# End Custom Build
+
!ENDIF
# End Source File
@@ -609,6 +781,5 @@ SOURCE=.\include\apu_version.h
SOURCE=.\libaprutil.rc
# End Source File
-
# End Target
# End Project
diff --git a/srclib/apr-util/misc/apr_date.c b/srclib/apr-util/misc/apr_date.c
index f584e093..28086e33 100644
--- a/srclib/apr-util/misc/apr_date.c
+++ b/srclib/apr-util/misc/apr_date.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -334,7 +334,7 @@ APU_DECLARE(apr_time_t) apr_date_parse_rfc(const char *date)
if (!date)
return APR_DATE_BAD;
- /* Not all dates have text months at the beginning. */
+ /* Not all dates have text days at the beginning. */
if (!apr_isdigit(date[0]))
{
while (*date && apr_isspace(*date)) /* Find first non-whitespace char */
@@ -361,7 +361,7 @@ APU_DECLARE(apr_time_t) apr_date_parse_rfc(const char *date)
monstr = date + 3;
timstr = date + 12;
- gmtstr = date + 20;
+ gmtstr = date + 21;
TIMEPARSE_STD(ds, timstr);
}
@@ -418,7 +418,9 @@ APU_DECLARE(apr_time_t) apr_date_parse_rfc(const char *date)
}
else if (apr_date_checkmask(date, "## @$$ ## ##:##:## *")) {
/* This is the old RFC 1123 date format - many many years ago, people
- * used two-digit years. Oh, how foolish. */
+ * used two-digit years. Oh, how foolish.
+ *
+ * Two-digit day, two-digit year version. */
ds.tm_year = ((date[7] - '0') * 10) + (date[8] - '0');
if (ds.tm_year < 70)
@@ -432,9 +434,29 @@ APU_DECLARE(apr_time_t) apr_date_parse_rfc(const char *date)
TIMEPARSE_STD(ds, timstr);
}
+ else if (apr_date_checkmask(date, " # @$$ ## ##:##:## *")) {
+ /* This is the old RFC 1123 date format - many many years ago, people
+ * used two-digit years. Oh, how foolish.
+ *
+ * Space + one-digit day, two-digit year version.*/
+ ds.tm_year = ((date[7] - '0') * 10) + (date[8] - '0');
+
+ if (ds.tm_year < 70)
+ ds.tm_year += 100;
+
+ ds.tm_mday = (date[1] - '0');
+
+ monstr = date + 3;
+ timstr = date + 10;
+ gmtstr = date + 19;
+
+ TIMEPARSE_STD(ds, timstr);
+ }
else if (apr_date_checkmask(date, "# @$$ ## ##:##:## *")) {
/* This is the old RFC 1123 date format - many many years ago, people
- * used two-digit years. Oh, how foolish. */
+ * used two-digit years. Oh, how foolish.
+ *
+ * One-digit day, two-digit year version. */
ds.tm_year = ((date[6] - '0') * 10) + (date[7] - '0');
if (ds.tm_year < 70)
@@ -521,7 +543,7 @@ APU_DECLARE(apr_time_t) apr_date_parse_rfc(const char *date)
monstr = date + 3;
timstr = date + 12;
- gmtstr = date + 20;
+ gmtstr = date + 21;
TIMEPARSE_STD(ds, timstr);
}
@@ -583,22 +605,21 @@ APU_DECLARE(apr_time_t) apr_date_parse_rfc(const char *date)
* If there is any confusion, tm_gmtoff will remain 0.
*/
ds.tm_gmtoff = 0;
- if (gmtstr && *gmtstr != '\0') {
- /* Do we have a GMT? */
- if (*(++gmtstr) != '\0') {
- int offset;
- switch (*(gmtstr++)) {
- case '-':
- offset = atoi(gmtstr);
- ds.tm_gmtoff -= (offset / 100) * 60 * 60;
- ds.tm_gmtoff -= (offset % 100) * 60;
- break;
- case '+':
- offset = atoi(gmtstr);
- ds.tm_gmtoff += (offset / 100) * 60 * 60;
- ds.tm_gmtoff += (offset % 100) * 60;
- break;
- }
+
+ /* Do we have a timezone ? */
+ if (gmtstr) {
+ int offset;
+ switch (*gmtstr) {
+ case '-':
+ offset = atoi(gmtstr+1);
+ ds.tm_gmtoff -= (offset / 100) * 60 * 60;
+ ds.tm_gmtoff -= (offset % 100) * 60;
+ break;
+ case '+':
+ offset = atoi(gmtstr+1);
+ ds.tm_gmtoff += (offset / 100) * 60 * 60;
+ ds.tm_gmtoff += (offset % 100) * 60;
+ break;
}
}
diff --git a/srclib/apr-util/misc/apr_queue.c b/srclib/apr-util/misc/apr_queue.c
index a869cf9f..8636a824 100644
--- a/srclib/apr-util/misc/apr_queue.c
+++ b/srclib/apr-util/misc/apr_queue.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/misc/apr_reslist.c b/srclib/apr-util/misc/apr_reslist.c
index 531b7450..058fc7d3 100644
--- a/srclib/apr-util/misc/apr_reslist.c
+++ b/srclib/apr-util/misc/apr_reslist.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -370,6 +370,7 @@ APU_DECLARE(apr_status_t) apr_reslist_invalidate(apr_reslist_t *reslist,
apr_thread_mutex_lock(reslist->listlock);
ret = reslist->destructor(resource, reslist->params, reslist->pool);
reslist->ntotal--;
+ apr_thread_cond_signal(reslist->avail);
apr_thread_mutex_unlock(reslist->listlock);
return ret;
}
diff --git a/srclib/apr-util/misc/apr_rmm.c b/srclib/apr-util/misc/apr_rmm.c
index 87d05132..ed67dc25 100644
--- a/srclib/apr-util/misc/apr_rmm.c
+++ b/srclib/apr-util/misc/apr_rmm.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/misc/apu_version.c b/srclib/apr-util/misc/apu_version.c
index dab34b71..97e73099 100644
--- a/srclib/apr-util/misc/apu_version.c
+++ b/srclib/apr-util/misc/apu_version.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/strmatch/apr_strmatch.c b/srclib/apr-util/strmatch/apr_strmatch.c
index 86f874f3..7fec638c 100644
--- a/srclib/apr-util/strmatch/apr_strmatch.c
+++ b/srclib/apr-util/strmatch/apr_strmatch.c
@@ -1,9 +1,9 @@
-/* Copyright 2002-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -36,7 +36,7 @@ static const char *match_boyer_moore_horspool(
const char *s, apr_size_t slen)
{
const char *s_end = s + slen;
- int *shift = (int *)(this_pattern->context);
+ apr_size_t *shift = (apr_size_t *)(this_pattern->context);
const char *s_next = s + this_pattern->length - 1;
const char *p_start = this_pattern->pattern;
const char *p_end = p_start + this_pattern->length - 1;
@@ -60,7 +60,7 @@ static const char *match_boyer_moore_horspool_nocase(
const char *s, apr_size_t slen)
{
const char *s_end = s + slen;
- int *shift = (int *)(this_pattern->context);
+ apr_size_t *shift = (apr_size_t *)(this_pattern->context);
const char *s_next = s + this_pattern->length - 1;
const char *p_start = this_pattern->pattern;
const char *p_end = p_start + this_pattern->length - 1;
@@ -85,7 +85,7 @@ APU_DECLARE(const apr_strmatch_pattern *) apr_strmatch_precompile(
{
apr_strmatch_pattern *pattern;
apr_size_t i;
- int *shift;
+ apr_size_t *shift;
pattern = apr_palloc(p, sizeof(*pattern));
pattern->pattern = s;
@@ -96,7 +96,7 @@ APU_DECLARE(const apr_strmatch_pattern *) apr_strmatch_precompile(
return pattern;
}
- shift = (int *)apr_palloc(p, sizeof(int) * NUM_CHARS);
+ shift = (apr_size_t *)apr_palloc(p, sizeof(apr_size_t) * NUM_CHARS);
for (i = 0; i < NUM_CHARS; i++) {
shift[i] = pattern->length;
}
diff --git a/srclib/apr-util/test/Makefile.in b/srclib/apr-util/test/Makefile.in
index 98a56572..97a97635 100644
--- a/srclib/apr-util/test/Makefile.in
+++ b/srclib/apr-util/test/Makefile.in
@@ -1,26 +1,64 @@
+srcdir = @srcdir@
VPATH = @srcdir@
+# PROGRAMS includes all test programs built on this platform.
+# STDTEST_PORTABLE
+# test programs invoked via standard user interface, run on all platforms
+# ALL_TESTS
+# test modules invoked through the abts suite (./testall)
+# OTHER_PROGRAMS
+# programs such as sockperf, that have to be invoked in a special sequence
+# or with special parameters
+
INCLUDES = @APRUTIL_PRIV_INCLUDES@ @APR_INCLUDES@ @APRUTIL_INCLUDES@
-PROGRAMS = testall testdbm testdate testxml testrmm \
- testreslist testqueue testxlate dbd
+STDTEST_PORTABLE = testall dbd
+
+TESTS = teststrmatch.lo testuri.lo testuuid.lo testbuckets.lo testpass.lo \
+ testmd4.lo testmd5.lo testldap.lo testdate.lo testdbm.lo testdbd.lo \
+ testxml.lo testrmm.lo testreslist.lo testqueue.lo testxlate.lo
+
+OTHER_PROGRAMS =
+
+PROGRAMS = $(STDTEST_PORTABLE) $(OTHER_PROGRAMS)
+
TARGETS = $(PROGRAMS)
-APRUTIL_DOTTED_VERSION=@APRUTIL_DOTTED_VERSION@
-APRUTIL_MAJOR_VERSION=@APRUTIL_MAJOR_VERSION@
-TARGET_LIB_PATH = ../lib@APRUTIL_LIBNAME@.la
+LOCAL_LIBS = ../lib@APRUTIL_LIBNAME@@APRUTIL_MAJOR_VERSION@.la
CLEAN_TARGETS = manyfile.bin testfile.txt data/sqlite*.db
# bring in rules.mk for standard functionality
@INCLUDE_RULES@
-PROGRAM_DEPENDENCIES = @APRUTIL_LIBS@
-APRUTIL_LDFLAGS = -no-install @APRUTIL_LDFLAGS@
+APRUTIL_LIBS = @APRUTIL_LIBS@
+APRUTIL_LDFLAGS = $(ALL_LDFLAGS) @LT_NO_INSTALL@ @APRUTIL_LDFLAGS@
+
+# link programs using -no-install to get real executables not
+# libtool wrapper scripts which link an executable when first run.
+LINK_PROG = $(LIBTOOL) $(LTFLAGS) --mode=link $(LT_LDFLAGS) $(COMPILE) \
+ $(APRUTIL_LDFLAGS) -o $@
-all: $(PROGRAMS)
+# STDTEST_PORTABLE;
-check: $(PROGRAMS)
- for prog in $(PROGRAMS); do \
+abts.lo: $(srcdir)/abts.c $(srcdir)/abts.h $(srcdir)/abts_tests.h \
+ $(srcdir)/testutil.h
+
+testutil.lo: $(srcdir)/abts.c $(srcdir)/abts.h $(srcdir)/abts_tests.h \
+ $(srcdir)/testutil.h
+
+OBJECTS_testall = abts.lo testutil.lo $(TESTS) $(LOCAL_LIBS)
+testall: $(OBJECTS_testall)
+ $(LINK_PROG) $(OBJECTS_testall) $(APRUTIL_LIBS)
+# For VPATH builds; where we have no ./data, copy us some data
+# if we wait until 'make check', then 'make; ./testall' fails;
+ if test ! -d "./data"; then cp -r $(srcdir)/data data; fi
+
+OBJECTS_dbd = dbd.lo $(LOCAL_LIBS)
+dbd: $(OBJECTS_dbd)
+ $(LINK_PROG) $(OBJECTS_dbd) $(APRUTIL_LIBS)
+
+check: $(TESTALL_COMPONENTS) $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE)
+ for prog in $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE); do \
if test "$$prog" = 'dbd'; then \
for driver in sqlite2 sqlite3; do \
./$$prog $$driver; \
@@ -38,54 +76,4 @@ check: $(PROGRAMS)
fi; \
done
-testdbm_OBJECTS = testdbm.lo
-testdbm_LDADD = $(TARGET_LIB_PATH)
-testdbm: $(testdbm_OBJECTS) $(testdbm_LDADD)
- $(LINK) $(APRUTIL_LDFLAGS) $(testdbm_OBJECTS) $(testdbm_LDADD) $(PROGRAM_DEPENDENCIES)
-
-dbd_OBJECTS = dbd.lo
-dbd_LDADD = $(TARGET_LIB_PATH)
-dbd: $(dbd_OBJECTS) $(dbd_LDADD)
- $(LINK) $(APRUTIL_LDFLAGS) $(dbd_OBJECTS) $(dbd_LDADD) $(PROGRAM_DEPENDENCIES)
-
-testdbd_OBJECTS = testdbd.lo
-testdbd_LDADD = $(TARGET_LIB_PATH)
-testdbd: $(testdbd_OBJECTS) $(testdbd_LDADD)
- $(LINK) $(APRUTIL_LDFLAGS) $(testdbd_OBJECTS) $(testdbd_LDADD) $(PROGRAM_DEPENDENCIES)
-
-testdate_OBJECTS = testdate.lo
-testdate_LDADD = $(TARGET_LIB_PATH)
-testdate: $(testdate_OBJECTS) $(testdate_LDADD)
- $(LINK) $(APRUTIL_LDFLAGS) $(testdate_OBJECTS) $(testdate_LDADD) $(PROGRAM_DEPENDENCIES)
-
-testxml_OBJECTS = testxml.lo
-testxml_LDADD = $(TARGET_LIB_PATH)
-testxml: $(testxml_OBJECTS) $(testxml_LDADD)
- $(LINK) $(APRUTIL_LDFLAGS) $(testxml_OBJECTS) $(testxml_LDADD) $(PROGRAM_DEPENDENCIES)
-
-testrmm_OBJECTS = testrmm.lo
-testrmm_LDADD = $(TARGET_LIB_PATH)
-testrmm: $(testrmm_OBJECTS) $(testrmm_LDADD)
- $(LINK) $(APRUTIL_LDFLAGS) $(testrmm_OBJECTS) $(testrmm_LDADD) $(PROGRAM_DEPENDENCIES)
-
-testreslist_OBJECTS = testreslist.lo
-testreslist_LDADD = $(TARGET_LIB_PATH)
-testreslist: $(testreslist_OBJECTS) $(testreslist_LDADD)
- $(LINK) $(APRUTIL_LDFLAGS) $(testreslist_OBJECTS) $(testreslist_LDADD) $(PROGRAM_DEPENDENCIES)
-
-testqueue_OBJECTS = testqueue.lo
-testqueue_LDADD = $(TARGET_LIB_PATH)
-testqueue: $(testqueue_OBJECTS) $(testqueue_LDADD)
- $(LINK) $(APRUTIL_LDFLAGS) $(testqueue_OBJECTS) $(testqueue_LDADD) $(PROGRAM_DEPENDENCIES)
-
-testxlate_OBJECTS = testxlate.lo
-testxlate_LDADD = $(TARGET_LIB_PATH)
-testxlate: $(testxlate_OBJECTS) $(testxlate_LDADD)
- $(LINK) $(APRUTIL_LDFLAGS) $(testxlate_OBJECTS) $(testxlate_LDADD) $(PROGRAM_DEPENDENCIES)
-
-testall_OBJECTS = teststrmatch.lo testuri.lo testuuid.lo abts.lo testutil.lo \
- testbuckets.lo testpass.lo testmd4.lo testmd5.lo testldap.lo testdbd.lo
-testall_LDADD = $(TARGET_LIB_PATH)
-testall: $(testall_OBJECTS) $(testall_LDADD)
- $(LINK) $(APRUTIL_LDFLAGS) $(testall_OBJECTS) $(testall_LDADD) $(PROGRAM_DEPENDENCIES)
-
+# DO NOT REMOVE
diff --git a/srclib/apr-util/test/Makefile.win b/srclib/apr-util/test/Makefile.win
index 374f0ebb..e9b44b3a 100644
--- a/srclib/apr-util/test/Makefile.win
+++ b/srclib/apr-util/test/Makefile.win
@@ -1,131 +1,162 @@
-# -*- Makefile -*-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-rmdir=rd /s /q
-!ELSE
-NULL=nul
-rmdir=deltree /y
+# PROGRAMS
+# test programs invoked via standard user interface, run on all platforms
+# ALL_TESTS
+# test modules invoked through the abts suite (./testall)
+# OTHER_PROGRAMS
+# programs such as sendfile, that have to be invoked in a special sequence
+# or with special parameters
+
+# Windows Specific;
+# MODEL
+# dynamic or static - refers to which set of bindings are desired
+# and controls which libraries (apr-1 or libapr-1) will be linked.
+# OUTDIR
+# the library path of the libraries, and also the path within test/
+# where all of the tests for that library will be built
+# APR_PATH
+# relative or absolute path to locate apr libs and includes
+# API_PATH
+# relative or absolute path to locate apr-iconv libs and includes
+
+!IFNDEF MODEL
+MODEL=dynamic
!ENDIF
-SILENT=@
+APROUTDIR=OUTDIR
-# Default build and bind modes
-BUILD_MODE = release
-BIND_MODE = shared
+!IFNDEF OUTDIR
+!IF "$(MODEL)" == "static"
+OUTDIR=LibR
+!ELSE
+OUTDIR=Release
+!ENDIF
-!IF "$(BUILD_MODE)" == "release" || "$(BUILD_MODE)" == "Release"
-!IF "$(BIND_MODE)" == "shared"
-# release shared
-APR_LIB_PFX = $(APR_SOURCE)\Release\lib
-APU_LIB_PFX = $(APU_SOURCE)\Release\lib
-API_LIB_PFX = $(API_SOURCE)\Release\lib
-CFG_CFLAGS = /MD /O2
-CFG_DEFINES = /D "NDEBUG"
-CFG_OUTPUT = Release
+!IF [$(COMSPEC) /c cl /nologo /? | find "x64" >NUL ] == 0
+OUTDIR=x64\$(OUTDIR)
+!ENDIF
+!ENDIF
-!ELSE
-!IF "$(BIND_MODE)" == "static"
-# release static
-APR_LIB_PFX = $(APR_SOURCE)\LibR\ # no line continuation
-APU_LIB_PFX = $(APU_SOURCE)\LibR\ # no line continuation
-API_LIB_PFX = $(API_SOURCE)\LibR\ # no line continuation
-CFG_CFLAGS = /MD /O2
-CFG_DEFINES = /D "NDEBUG" /D "APR_DECLARE_STATIC" \
- /D "APU_DECLARE_STATIC" /D "API_DECLARE_STATIC"
-CFG_API_LIB = $(API_LIB_PFX)apriconv-1.lib
-CFG_OUTPUT = LibR
+!IF !EXIST("$(OUTDIR)\.")
+!IF ([$(COMSPEC) /C mkdir $(OUTDIR)] == 0)
+!ENDIF
+!ENDIF
+!IFNDEF INTDIR
+INTDIR=$(OUTDIR)
!ELSE
-!ERROR Unknown bind mode "$(BIND_MODE)"
+!IF !EXIST("$(INTDIR)\.")
+!IF ([$(COMSPEC) /C mkdir $(INTDIR)] == 0)
+!ENDIF
!ENDIF
!ENDIF
-!ELSE
-!IF "$(BUILD_MODE)" == "debug" || "$(BUILD_MODE)" == "Debug"
-!IF "$(BIND_MODE)" == "shared"
-# debug shared
-APR_LIB_PFX = $(APR_SOURCE)\Debug\lib
-APU_LIB_PFX = $(APU_SOURCE)\Debug\lib
-API_LIB_PFX = $(API_SOURCE)\Debug\lib
-CFG_CFLAGS = /MDd /Zi /Od
-CFG_DEFINES = /D "_DEBUG"
-CFG_LDFLAGS = /DEBUG
-CFG_OUTPUT = Debug
+!MESSAGE Building tests into $(OUTDIR) for $(MODEL)
-!ELSE
-!IF "$(BIND_MODE)" == "static"
-# debug static
-APR_LIB_PFX = $(APR_SOURCE)\LibD\ # no line continuation
-APU_LIB_PFX = $(APU_SOURCE)\LibD\ # no line continuation
-API_LIB_PFX = $(API_SOURCE)\LibD\ # no line continuation
-CFG_CFLAGS = /MDd /Zi /Od
-CFG_DEFINES = /D "_DEBUG" /D "APR_DECLARE_STATIC" \
- /D "APU_DECLARE_STATIC" /D "API_DECLARE_STATIC"
-CFG_LDFLAGS = /DEBUG
-CFG_API_LIB = $(API_LIB_PFX)apriconv-1.lib
-CFG_OUTPUT = LibD
+ALL_TESTS = $(INTDIR)\teststrmatch.obj $(INTDIR)\testuri.obj \
+ $(INTDIR)\testuuid.obj $(INTDIR)\testutil.obj \
+ $(INTDIR)\testbuckets.obj $(INTDIR)\testpass.obj \
+ $(INTDIR)\testmd4.obj $(INTDIR)\testmd5.obj \
+ $(INTDIR)\testldap.obj $(INTDIR)\testdbd.obj \
+ $(OUTDIR)\testdbm.obj $(OUTDIR)\testreslist.obj \
+ $(OUTDIR)\testxml.obj $(OUTDIR)\testqueue.obj \
+ $(OUTDIR)\testrmm.obj $(OUTDIR)\testxlate.obj \
+ $(OUTDIR)\testdate.obj
+
+CLEAN_DATA = manyfile.bin testfile.txt data\sqlite*.db
+
+CLEAN_BUILDDIRS = Debug Release LibD LibR 9x x64
+
+PROGRAMS = $(OUTDIR)\testall.exe
+
+OTHER_PROGRAMS = $(OUTDIR)\dbd.exe
+
+# bring in rules.mk for standard functionality
+ALL: $(PROGRAMS) $(OTHER_PROGRAMS)
+
+CL = cl.exe
+LD = link.exe
+
+APR_PATH = ..\..\apr
+API_PATH = ..\..\apr-iconv
+
+APROUTDIR=$(OUTDIR)
+!IF "$(MODEL)" == "static"
+PROGRAM_DEPENDENCIES = \
+ $(APR_PATH)\$(APROUTDIR)\apr-1.lib \
+ $(API_PATH)\$(OUTDIR)\apriconv-1.lib \
+ ..\$(OUTDIR)\aprutil-1.lib
+STATIC_CFLAGS = /D APR_DECLARE_STATIC /D APU_DECLARE_STATIC
!ELSE
-!ERROR Unknown bind mode "$(BIND_MODE)"
-!ENDIF
+PROGRAM_DEPENDENCIES = \
+ $(APR_PATH)\$(APROUTDIR)\libapr-1.lib \
+ $(API_PATH)\$(OUTDIR)\libapriconv-1.lib \
+ ..\$(OUTDIR)\libaprutil-1.lib
+STATIC_CFLAGS =
!ENDIF
+!IFDEF _DEBUG
+DEBUG_CFLAGS = /MDd
!ELSE
-!ERROR Unknown build mode "$(BUILD_MODE)"
-!ENDIF
+DEBUG_CFLAGS = /MD
!ENDIF
+INCLUDES=/I "../include" /I "$(API_PATH)/include" /I "$(APR_PATH)/include"
+
+CFLAGS = /nologo /c /W3 /Gm /EHsc /Zi /Od $(INCLUDES) \
+ $(STATIC_CFLAGS) $(DEBUG_CFLAGS) /D "BINPATH=$(OUTDIR:\=/)" \
+ /D _DEBUG /D WIN32 /Fo"$(INTDIR)/" /FD
+
+LD_LIBS = kernel32.lib advapi32.lib ws2_32.lib wsock32.lib \
+ ole32.lib shell32.lib rpcrt4.lib wldap32.lib
+
+LDFLAGS = /nologo /debug /subsystem:console /incremental:no
+SHLDFLAGS = /nologo /dll /debug /subsystem:windows /incremental:no
+
+.c{$(INTDIR)}.obj::
+ $(CL) $(CFLAGS) -c $< -Fd$(INTDIR)\ $(INCLUDES)
+
+# PROGRAMS;
+
+abts.c: abts.h abts_tests.h testutil.h
+
+testutil.c: abts.h abts_tests.h testutil.h
+
+$(OUTDIR)\testall.exe: $(ALL_TESTS) $(INTDIR)\abts.obj $(PROGRAM_DEPENDENCIES)
+ $(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
+ @if exist "$@.manifest" \
+ mt.exe -manifest "$@.manifest" -outputresource:$@;1
+
+# OTHER_PROGRAMS;
+
+$(OUTDIR)\dbd.exe: $(INTDIR)\dbd.obj $(PROGRAM_DEPENDENCIES)
+ $(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
+ @if exist "$@.manifest" \
+ mt.exe -manifest "$@.manifest" -outputresource:$@;1
+
+
+cleandata:
+ @for %f in ($(CLEAN_DATA)) do @if EXIST %f del /f %f
+
+clean: cleandata
+ @if EXIST $(INTDIR)\. rmdir /s /q $(INTDIR)
+ @if EXIST $(OUTDIR)\. rmdir /s /q $(OUTDIR)
+
+cleanall:
+ @for %d in ($(CLEAN_BUILDDIRS) $(INTDIR) $(OUTDIR)) do \
+ @if EXIST %d\. rmdir /s /q %d
+
+
+PATH=$(OUTDIR);..\$(OUTDIR);$(API_PATH)\$(OUTDIR);$(APR_PATH)\$(APROUTDIR);$(PATH)
+APR_ICONV1_PATH=$(API_PATH)\$(OUTDIR)\iconv
+
+check: $(PROGRAMS) $(OTHER_PROGRAMS)
+ @for %p in ($(PROGRAMS)) do @( \
+ echo Testing %p && %p -v || echo %p failed \
+ )
+ echo Testing dbd sqlite2 && $(OUTDIR)\dbd.exe sqlite2 || echo Failed
+ echo Testing dbd sqlite3 && $(OUTDIR)\dbd.exe sqlite3 || echo Failed
+
+checkall: check
-APR_SOURCE = ..\..\apr
-APU_SOURCE = ..
-API_SOURCE = ..\..\apr-iconv
-OUTPUT_DIR = .\$(CFG_OUTPUT)
-
-INT_CFLAGS = /nologo $(CFG_CFLAGS) /Fp"$(OUTPUT_DIR)\iconv.pch" /YX"iconv.h"
-INT_INCLUDES = /I "$(APU_SOURCE)\include" /I "$(APR_SOURCE)\include"
-# /I "$(API_SOURCE)\include"
-INT_DEFINES = /D "WIN32" /D "_CONSOLE" /D "_MBCS" $(CFG_DEFINES)
-INT_LDFLAGS = /nologo /incremental:no /subsystem:console $(CFG_LDFLAGS)
-
-CFLAGS = /W3
-ALL_CFLAGS = $(INT_CFLAGS) $(INT_INCLUDES) $(INT_DEFINES) $(CFLAGS)
-
-LDFLAGS = /WARN:0
-ALL_LDFLAGS = $(INT_LDFLAGS) $(LDFLAGS)
-
-.c{$(OUTPUT_DIR)}.exe:
- -$(SILENT)if not exist "$(OUTPUT_DIR)\$(NULL)" mkdir "$(OUTPUT_DIR)"
- $(SILENT)echo Compiling and linking $@...
- $(SILENT)cl $(ALL_CFLAGS) /Fo"$*.obj" /Fd"$*" $< \
- /link $(ALL_LDFLAGS) /out:$@ \
- "$(APU_LIB_PFX)aprutil-1.lib" \
- "$(APR_LIB_PFX)apr-1.lib" \
- "$(CFG_API)" \
- kernel32.lib advapi32.lib ws2_32.lib mswsock.lib
-
-
-##!ALL_TARGETS = $(OUTPUT_DIR)\testdate.exe \
-##! $(OUTPUT_DIR)\testdbm.exe \
-##! $(OUTPUT_DIR)\testmd4.exe \
-##! $(OUTPUT_DIR)\testmd5.exe \
-##! $(OUTPUT_DIR)\testqueue.exe \
-##! $(OUTPUT_DIR)\testreslist.exe \
-##! $(OUTPUT_DIR)\testrmm.exe \
-##! $(OUTPUT_DIR)\teststrmatch.exe \
-##! $(OUTPUT_DIR)\testuri.exe \
-##! $(OUTPUT_DIR)\testuuid.exe \
-##! $(OUTPUT_DIR)\testxlate.exe \
-##! $(OUTPUT_DIR)\testxml.exe
-
-ALL_TARGETS = $(OUTPUT_DIR)\testxlate.exe \
- $(OUTPUT_DIR)\testdbm.exe \
- $(OUTPUT_DIR)\testqueue.exe \
- $(OUTPUT_DIR)\testrmm.exe \
- $(OUTPUT_DIR)\testmd4.exe \
- $(OUTPUT_DIR)\testmd5.exe \
- $(OUTPUT_DIR)\testxml.exe
-
-all: $(ALL_TARGETS)
-
-clean:
- -$(SILENT)if exist "$(OUTPUT_DIR)/$(NULL)" $(rmdir) $(OUTPUT_DIR)
+# DO NOT REMOVE
diff --git a/srclib/apr-util/test/abts.c b/srclib/apr-util/test/abts.c
index 03ae16d1..596ad0a2 100644
--- a/srclib/apr-util/test/abts.c
+++ b/srclib/apr-util/test/abts.c
@@ -372,6 +372,9 @@ int main(int argc, const char *const argv[]) {
abts_suite *suite = NULL;
initialize();
+
+ quiet = !isatty(STDOUT_FILENO);
+
for (i = 1; i < argc; i++) {
if (!strcmp(argv[i], "-v")) {
verbose = 1;
diff --git a/srclib/apr-util/test/abts.h b/srclib/apr-util/test/abts.h
index 51123ff0..3ae41d26 100644
--- a/srclib/apr-util/test/abts.h
+++ b/srclib/apr-util/test/abts.h
@@ -22,6 +22,12 @@ extern "C" {
#include <stdlib.h>
#include <string.h>
+#ifdef WIN32
+#include <io.h>
+#else
+#include <unistd.h>
+#endif
+
#ifndef ABTS_H
#define ABTS_H
diff --git a/srclib/apr-util/test/abts_tests.h b/srclib/apr-util/test/abts_tests.h
index b137ce58..ca157bbb 100644
--- a/srclib/apr-util/test/abts_tests.h
+++ b/srclib/apr-util/test/abts_tests.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -31,7 +31,14 @@ const struct testlist {
{testmd4},
{testmd5},
{testldap},
- {testdbd}
+ {testdbd},
+ {testdate},
+ {testxml},
+ {testxlate},
+ {testrmm},
+ {testdbm},
+ {testqueue},
+ {testreslist}
};
#endif /* APR_TEST_INCLUDES */
diff --git a/srclib/apr-util/test/dbd.c b/srclib/apr-util/test/dbd.c
index f8832539..b5ae9630 100644
--- a/srclib/apr-util/test/dbd.c
+++ b/srclib/apr-util/test/dbd.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/test/test_apu.h b/srclib/apr-util/test/test_apu.h
index 8d5f6dde..642edec2 100644
--- a/srclib/apr-util/test/test_apu.h
+++ b/srclib/apr-util/test/test_apu.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/test/testall.dsw b/srclib/apr-util/test/testall.dsw
new file mode 100644
index 00000000..a3f5c2a3
--- /dev/null
+++ b/srclib/apr-util/test/testall.dsw
@@ -0,0 +1,278 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "apr"="..\..\apr\apr.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "apr_app"="..\..\apr\build\apr_app.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name apr
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "apriconv"="..\..\apr-iconv\apriconv.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name apr
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "aprutil"="..\aprutil.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name apriconv
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name xml
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "libapr"="..\..\apr\libapr.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "libapr_app"="..\..\apr\build\libapr_app.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libapr
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "libapriconv"="..\..\apr-iconv\libapriconv.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libapr
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "libapriconv_ccs_modules"="..\..\apr-iconv\ccs\libapriconv_ccs_modules.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libapr
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libapriconv
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "libapriconv_ces_modules"="..\..\apr-iconv\ces\libapriconv_ces_modules.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libapr
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libapriconv
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "libaprutil"="..\libaprutil.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libapr
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libapriconv
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libapriconv_ccs_modules
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libapriconv_ces_modules
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name xml
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "testdll"="..\..\apr\test\testdll.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libapr
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libapr_app
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "testlib"="..\..\apr\test\testlib.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name apr
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name apr_app
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "testutildll"=".\testutildll.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libapr
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libapriconv
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libaprutil
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libapr_app
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "testutillib"=".\testutillib.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name apr
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name apriconv
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name aprutil
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name apr_app
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "xml"="..\xml\expat\lib\xml.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/srclib/apr-util/test/testbuckets.c b/srclib/apr-util/test/testbuckets.c
index 52b48400..6c23a771 100644
--- a/srclib/apr-util/test/testbuckets.c
+++ b/srclib/apr-util/test/testbuckets.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/test/testdate.c b/srclib/apr-util/test/testdate.c
index 173f03bf..b4e2edf2 100644
--- a/srclib/apr-util/test/testdate.c
+++ b/srclib/apr-util/test/testdate.c
@@ -1,32 +1,43 @@
-/* This program tests the date_parse_http routine in ../main/util_date.c.
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * It is only semiautomated in that I would run it, modify the code to
- * use a different algorithm or seed, recompile and run again, etc.
- * Obviously it should use an argument for that, but I never got around
- * to changing the implementation.
- *
- * gcc -g -O2 -I../main -o test_date ../main/util_date.o test_date.c
- * test_date | egrep '^No '
- *
- * Roy Fielding, 1996
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <time.h>
+#include "abts.h"
+#include "testutil.h"
#include "apr_date.h"
+#include "apr_general.h"
-#ifndef srand48
-#define srand48 srandom
-#endif
-
-#ifndef mrand48
-#define mrand48 random
-#endif
+#if APR_HAVE_TIME_H
+#include <time.h>
+#endif /* APR_HAVE_TIME_H */
-void gm_timestr_822(char *ts, apr_time_t sec);
-void gm_timestr_850(char *ts, apr_time_t sec);
-void gm_timestr_ccc(char *ts, apr_time_t sec);
+static struct datetest {
+ const char *input;
+ const char *output;
+} tests[] = {
+ { "Mon, 27 Feb 1995 20:49:44 -0800", "Tue, 28 Feb 1995 04:49:44 GMT" },
+ { "Fri, 1 Jul 2005 11:34:25 -0400", "Fri, 01 Jul 2005 15:34:25 GMT" },
+ { "Monday, 27-Feb-95 20:49:44 -0800", "Tue, 28 Feb 1995 04:49:44 GMT" },
+ { "Tue, 4 Mar 1997 12:43:52 +0200", "Tue, 04 Mar 1997 10:43:52 GMT" },
+ { "Mon, 27 Feb 95 20:49:44 -0800", "Tue, 28 Feb 1995 04:49:44 GMT" },
+ { "Tue, 4 Mar 97 12:43:52 +0200", "Tue, 04 Mar 1997 10:43:52 GMT" },
+ { "Tue, 4 Mar 97 12:43:52 +0200", "Tue, 04 Mar 1997 10:43:52 GMT" },
+ { "Mon, 27 Feb 95 20:49 GMT", "Mon, 27 Feb 1995 20:49:00 GMT" },
+ { "Tue, 4 Mar 97 12:43 GMT", "Tue, 04 Mar 1997 12:43:00 GMT" },
+ { NULL, NULL }
+};
static const apr_time_t year2secs[] = {
APR_INT64_C(0), /* 1970 */
@@ -104,7 +115,8 @@ const char month_snames[12][4] = {
"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"
};
-void gm_timestr_822(char *ts, apr_time_t sec)
+/* XXX: non-portable */
+static void gm_timestr_822(char *ts, apr_time_t sec)
{
static const char *const days[7]=
{"Sun","Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
@@ -112,52 +124,26 @@ void gm_timestr_822(char *ts, apr_time_t sec)
time_t ls = (time_t)sec;
tms = gmtime(&ls);
-
+
sprintf(ts, "%s, %.2d %s %d %.2d:%.2d:%.2d GMT", days[tms->tm_wday],
tms->tm_mday, month_snames[tms->tm_mon], tms->tm_year + 1900,
tms->tm_hour, tms->tm_min, tms->tm_sec);
}
-void gm_timestr_850(char *ts, apr_time_t sec)
+/* Linear congruential generator */
+static apr_uint32_t lgc(apr_uint32_t a)
{
- static const char *const days[7]=
- {"Sunday","Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
- "Saturday"};
- struct tm *tms;
- int year;
- time_t ls = (time_t)sec;
-
- tms = gmtime(&ls);
-
- year = tms->tm_year;
- if (year >= 100) year -= 100;
-
- sprintf(ts, "%s, %.2d-%s-%.2d %.2d:%.2d:%.2d GMT", days[tms->tm_wday],
- tms->tm_mday, month_snames[tms->tm_mon], year,
- tms->tm_hour, tms->tm_min, tms->tm_sec);
+ apr_uint64_t z = a;
+ z *= 279470273;
+ z %= APR_UINT64_C(4294967291);
+ return (apr_uint32_t)z;
}
-void gm_timestr_ccc(char *ts, apr_time_t sec)
-{
- static const char *const days[7]=
- {"Sun","Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
- struct tm *tms;
- time_t ls = (time_t)sec;
-
- tms = gmtime(&ls);
-
- sprintf(ts, "%s %s %2d %.2d:%.2d:%.2d %d", days[tms->tm_wday],
- month_snames[tms->tm_mon], tms->tm_mday,
- tms->tm_hour, tms->tm_min, tms->tm_sec, tms->tm_year + 1900);
-}
-
-int main (void)
+static void test_date_parse_http(abts_case *tc, void *data)
{
int year, i;
apr_time_t guess;
apr_time_t offset = 0;
- /* apr_time_t offset = 0; */
- /* apr_time_t offset = ((31 + 28) * 24 * 3600) - 1; */
apr_time_t secstodate, newsecs;
char datestr[50];
@@ -166,33 +152,51 @@ int main (void)
gm_timestr_822(datestr, secstodate);
secstodate *= APR_USEC_PER_SEC;
newsecs = apr_date_parse_http(datestr);
- if (secstodate == newsecs)
- printf("Yes %4d %19" APR_TIME_T_FMT " %s\n", year, secstodate, datestr);
- else if (newsecs == APR_DATE_BAD)
- printf("No %4d %19" APR_TIME_T_FMT " %19" APR_TIME_T_FMT " %s\n",
- year, secstodate, newsecs, datestr);
- else
- printf("No* %4d %19" APR_TIME_T_FMT " %19" APR_TIME_T_FMT " %s\n",
- year, secstodate, newsecs, datestr);
+ ABTS_TRUE(tc, secstodate == newsecs);
}
-
- srand48(978245L);
+
+#if APR_HAS_RANDOM
+ apr_generate_random_bytes((unsigned char *)&guess, sizeof(guess));
+#else
+ guess = apr_time_now() % APR_TIME_C(4294967291);
+#endif
for (i = 0; i < 10000; ++i) {
- guess = (time_t)mrand48();
- if (guess < 0) guess *= -1;
+ guess = (time_t)lgc((apr_uint32_t)guess);
+ if (guess < 0)
+ guess *= -1;
secstodate = guess + offset;
gm_timestr_822(datestr, secstodate);
secstodate *= APR_USEC_PER_SEC;
newsecs = apr_date_parse_http(datestr);
- if (secstodate == newsecs)
- printf("Yes %" APR_TIME_T_FMT " %s\n", secstodate, datestr);
- else if (newsecs == APR_DATE_BAD)
- printf("No %" APR_TIME_T_FMT " %" APR_TIME_T_FMT " %s\n",
- secstodate, newsecs, datestr);
- else
- printf("No* %" APR_TIME_T_FMT " %" APR_TIME_T_FMT " %s\n",
- secstodate, newsecs, datestr);
+ ABTS_TRUE(tc, secstodate == newsecs);
+ }
+}
+
+static void test_date_rfc(abts_case *tc, void *data)
+{
+ apr_time_t date;
+ int i = 0;
+
+ while (tests[i].input) {
+ char str_date[APR_RFC822_DATE_LEN] = { 0 };
+
+ date = apr_date_parse_rfc(tests[i].input);
+
+ apr_rfc822_date(str_date, date);
+
+ ABTS_STR_EQUAL(tc, str_date, tests[i].output);
+
+ i++;
}
- exit(0);
+}
+
+abts_suite *testdate(abts_suite *suite)
+{
+ suite = ADD_SUITE(suite);
+
+ abts_run_test(suite, test_date_parse_http, NULL);
+ abts_run_test(suite, test_date_rfc, NULL);
+
+ return suite;
}
diff --git a/srclib/apr-util/test/testdbd.c b/srclib/apr-util/test/testdbd.c
index 9f2dcbc8..fd9a7874 100644
--- a/srclib/apr-util/test/testdbd.c
+++ b/srclib/apr-util/test/testdbd.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/test/testdbm.c b/srclib/apr-util/test/testdbm.c
index da787125..fc64c5dc 100644
--- a/srclib/apr-util/test/testdbm.c
+++ b/srclib/apr-util/test/testdbm.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -13,413 +13,209 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-/* This file came from the SDBM package (written by oz@nexus.yorku.ca).
- * That package was under public domain. This file has been ported to
- * APR, updated to ANSI C and other, newer idioms, and added to the Apache
- * codebase under the above copyright and license.
- */
-
-/*
- * testdbm: Simple APR dbm tester.
- * Automatic test case: ./testdbm auto foo
- * - Attempts to store and fetch values from the DBM.
- *
- * Run the program for more help.
- */
#include "apr.h"
#include "apr_general.h"
#include "apr_pools.h"
#include "apr_errno.h"
-#include "apr_getopt.h"
-#include "apr_time.h"
-#define APR_WANT_STRFUNC
-#include "apr_want.h"
-
-#if APR_HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if APR_HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#include <stdlib.h> /* for atexit(), malloc() */
-#include <string.h>
-
#include "apr_dbm.h"
+#include "apr_uuid.h"
+#include "apr_strings.h"
+#include "abts.h"
+#include "testutil.h"
-static const char *progname;
-static int rflag;
-
-#define DERROR 0
-#define DLOOK 1
-
-#define DDELETE 3
-#define DCAT 4
-#define DBUILD 5
-#define DPRESS 6
-#define DCREAT 7
-#define DNAME 8
-#define DTRUNC 9
-#define DAUTO 10
-
-#define LINEMAX 8192
+#define NUM_TABLE_ROWS 1024
typedef struct {
- const char *sname;
- int scode;
- int flags;
-} cmd;
-
-static const cmd cmds[] = {
-
- { "fetch", DLOOK, APR_DBM_READONLY },
- { "get", DLOOK, APR_DBM_READONLY },
- { "look", DLOOK, APR_DBM_READONLY },
- { "add", DBUILD, APR_DBM_READWRITE },
- { "insert", DBUILD, APR_DBM_READWRITE },
- { "store", DBUILD, APR_DBM_READWRITE },
- { "delete", DDELETE, APR_DBM_READWRITE },
- { "remove", DDELETE, APR_DBM_READWRITE },
- { "dump", DCAT, APR_DBM_READONLY },
- { "list", DCAT, APR_DBM_READONLY },
- { "cat", DCAT, APR_DBM_READONLY },
- { "build", DBUILD, APR_DBM_RWCREATE }, /** this one creates the DB */
- { "creat", DCREAT, APR_DBM_RWCREATE },
- { "trunc", DTRUNC, APR_DBM_RWTRUNC },
- { "new", DCREAT, APR_DBM_RWCREATE },
- { "names", DNAME, APR_DBM_READONLY },
-#if 0
- {"squash", DPRESS, APR_DBM_READWRITE, },
- {"compact", DPRESS, APR_DBM_READWRITE, },
- {"compress", DPRESS, APR_DBM_READWRITE, },
-#endif
- { "auto", DAUTO, APR_DBM_RWCREATE },
-};
-
-#define CMD_SIZE (sizeof(cmds)/sizeof(cmd))
-
-static void doit(const cmd *act, const char*type, const char *file, apr_pool_t *pool);
-static const cmd *parse_command(const char *str);
-static void prdatum(FILE *stream, apr_datum_t d);
-static void oops(apr_dbm_t *dbm, apr_status_t rv, const char *s1,
- const char *s2);
-static void show_usage(void);
+ apr_datum_t key;
+ apr_datum_t val;
+ int deleted;
+ int visited;
+} dbm_table_t;
-int main(int argc, const char * const * argv)
+static dbm_table_t *generate_table(void)
{
- apr_pool_t *pool;
- const cmd *act;
- apr_getopt_t *os;
- char optch;
- const char *optarg;
- const char*dbtype;
-
- (void) apr_initialize();
- apr_pool_create(&pool, NULL);
- atexit(apr_terminate);
-
- (void) apr_getopt_init(&os, pool, argc, argv);
-
- progname = argv[0];
- dbtype = "default";
-
- while (apr_getopt(os, "Rt:", &optch, &optarg) == APR_SUCCESS) {
- switch (optch) {
- case 'R': /* raw processing */
- rflag++;
- break;
- case 't':
- dbtype = optarg;
- break;
- default:
- show_usage();
- fputs("unknown option.",stderr);
- exit(-1);
- break;
- }
+ unsigned int i;
+ apr_uuid_t uuid;
+ dbm_table_t *table = apr_pcalloc(p, sizeof(*table) * NUM_TABLE_ROWS);
+
+ for (i = 0; i < NUM_TABLE_ROWS/2; i++) {
+ apr_uuid_get(&uuid);
+ table[i].key.dptr = apr_pmemdup(p, uuid.data, sizeof(uuid.data));
+ table[i].key.dsize = sizeof(uuid.data);
+ table[i].val.dptr = apr_palloc(p, APR_UUID_FORMATTED_LENGTH);
+ table[i].val.dsize = APR_UUID_FORMATTED_LENGTH;
+ apr_uuid_format(table[i].val.dptr, &uuid);
}
- if (argc <= os->ind) {
- show_usage();
- fputs("Note: If you have no clue what this program is, start with:\n", stderr);
- fputs(" ./testdbm auto foo\n", stderr);
- fputs(" where foo is the DBM prefix.\n", stderr);
- exit(-2);
+ for (; i < NUM_TABLE_ROWS; i++) {
+ apr_uuid_get(&uuid);
+ table[i].val.dptr = apr_pmemdup(p, uuid.data, sizeof(uuid.data));
+ table[i].val.dsize = sizeof(uuid.data);
+ table[i].key.dptr = apr_palloc(p, APR_UUID_FORMATTED_LENGTH);
+ table[i].key.dsize = APR_UUID_FORMATTED_LENGTH;
+ apr_uuid_format(table[i].key.dptr, &uuid);
}
- if ((act = parse_command(argv[os->ind])) == NULL) {
- show_usage();
- fprintf(stderr, "unrecognized command: %s\n", argv[os->ind]);
- exit(-3);
- }
-
- if (++os->ind >= argc) {
- show_usage();
- fputs("please supply a DB file to use (may be created)\n", stderr);
- exit(-4);
- }
+ return table;
+}
- doit(act, dbtype, argv[os->ind], pool);
+static void test_dbm_store(abts_case *tc, apr_dbm_t *db, dbm_table_t *table)
+{
+ apr_status_t rv;
+ unsigned int i = NUM_TABLE_ROWS - 1;
- apr_pool_destroy(pool);
+ for (; i >= NUM_TABLE_ROWS/2; i--) {
+ rv = apr_dbm_store(db, table[i].key, table[i].val);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+ table[i].deleted = FALSE;
+ }
- return 0;
+ for (i = 0; i < NUM_TABLE_ROWS/2; i++) {
+ rv = apr_dbm_store(db, table[i].key, table[i].val);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+ table[i].deleted = FALSE;
+ }
}
-static void doit(const cmd *act, const char*type, const char *file,
- apr_pool_t *pool)
+static void test_dbm_fetch(abts_case *tc, apr_dbm_t *db, dbm_table_t *table)
{
apr_status_t rv;
- apr_datum_t key;
+ unsigned int i;
apr_datum_t val;
- apr_dbm_t *db;
- char *op;
- int n;
- char *line;
- const char *use1;
- const char *use2;
-#ifdef TIME
- long start;
- extern long time();
-#endif
-
- rv = apr_dbm_open_ex(&db, type, file, act->flags, APR_OS_DEFAULT, pool);
- if (rv != APR_SUCCESS)
- oops(db, rv, "cannot open: %s", file);
- line = (char *) apr_palloc(pool,LINEMAX);
-
- switch (act->scode) {
-
- case DLOOK:
- while (fgets(line, LINEMAX, stdin) != NULL) {
- n = strlen(line) - 1;
- line[n] = 0;
- if (n == 0)
- break;
-
- key.dptr = line;
- key.dsize = n;
- rv = apr_dbm_fetch(db, key, &val);
- if (rv == APR_SUCCESS) {
- prdatum(stdout, val);
- putchar('\n');
- continue;
- }
- prdatum(stderr, key);
- fprintf(stderr, ": not found.\n");
+ for (i = 0; i < NUM_TABLE_ROWS; i++) {
+ memset(&val, 0, sizeof(val));
+ rv = apr_dbm_fetch(db, table[i].key, &val);
+ if (!table[i].deleted) {
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+ ABTS_INT_EQUAL(tc, (int)table[i].val.dsize, (int)val.dsize);
+ ABTS_INT_EQUAL(tc, 0, memcmp(table[i].val.dptr, val.dptr, val.dsize));
+ apr_dbm_freedatum(db, val);
+ } else {
+ ABTS_INT_EQUAL(tc, 0, (int)val.dsize);
}
- break;
-
- case DDELETE:
- while (fgets(line, LINEMAX, stdin) != NULL) {
- n = strlen(line) - 1;
- line[n] = 0;
- if (n == 0)
- break;
-
- key.dptr = line;
- key.dsize = n;
- if (apr_dbm_delete(db, key) != APR_SUCCESS) {
- prdatum(stderr, key);
- fprintf(stderr, ": not found.\n");
- }
- }
- break;
- case DCAT:
- rv = apr_dbm_firstkey(db, &key);
- if (rv != APR_SUCCESS)
- oops(db, rv, "could not fetch first key: %s", file);
-
- while (key.dptr != NULL) {
- prdatum(stdout, key);
- putchar('\t');
- rv = apr_dbm_fetch(db, key, &val);
- if (rv != APR_SUCCESS)
- oops(db, rv, "apr_dbm_fetch", "failure");
- prdatum(stdout, val);
- putchar('\n');
- rv = apr_dbm_nextkey(db, &key);
- if (rv != APR_SUCCESS)
- oops(db, rv, "NextKey", "failure");
- }
- break;
- case DBUILD:
-#ifdef TIME
- start = time(0);
-#endif
- while (fgets(line, LINEMAX, stdin) != NULL) {
- n = strlen(line) - 1;
- line[n] = 0;
- if (n == 0)
- break;
-
- key.dptr = line;
- if ((op = strchr(line, '\t')) != 0) {
- key.dsize = op - line;
- *op++ = 0;
- val.dptr = op;
- val.dsize = line + n - op;
- }
- else
- oops(NULL, APR_EGENERAL, "bad input: %s", line);
-
- rv = apr_dbm_store(db, key, val);
- if (rv != APR_SUCCESS) {
- prdatum(stderr, key);
- fprintf(stderr, ": ");
- oops(db, rv, "store: %s", "failed");
- }
- }
-#ifdef TIME
- printf("done: %d seconds.\n", time(0) - start);
-#endif
- break;
- case DPRESS:
- break;
- case DCREAT:
- break;
- case DTRUNC:
- break;
- case DNAME:
- apr_dbm_get_usednames(pool, file, &use1, &use2);
- fprintf(stderr, "%s %s\n", use1, use2);
- break;
- case DAUTO:
- {
- int i;
- char *valdata = "0123456789";
- fprintf(stderr, "Generating data: ");
- for (i = 0; i < 10; i++) {
- int j;
- char c, keydata[10];
- for (j = 0, c = 'A' + (i % 16); j < 10; j++, c++) {
- keydata[j] = c;
- }
- key.dptr = keydata;
- key.dsize = 10;
- val.dptr = valdata;
- val.dsize = 10;
- rv = apr_dbm_store(db, key, val);
- if (rv != APR_SUCCESS) {
- prdatum(stderr, key);
- fprintf(stderr, ": ");
- oops(db, rv, "store: %s", "failed");
- }
- }
- fputs("OK\n", stderr);
- fputs("Testing existence/retrieval: ", stderr);
- for (i = 0; i < 10; i++) {
- int j;
- char c, keydata[10];
- for (j = 0, c = 'A' + (i % 16); j < 10; j++, c++) {
- keydata[j] = c;
- }
- key.dptr = keydata;
- key.dsize = 10;
- if (!apr_dbm_exists(db, key)) {
- prdatum(stderr, key);
- oops(db, 0, "exists: %s", "failed");
- }
- rv = apr_dbm_fetch(db, key, &val);
- if (rv != APR_SUCCESS || val.dsize != 10 ||
- (strncmp(val.dptr, valdata, 10) != 0) ) {
- prdatum(stderr, key);
- fprintf(stderr, ": ");
- oops(db, rv, "fetch: %s", "failed");
- }
- }
- fputs("OK\n", stderr);
- }
- break;
}
-
- apr_dbm_close(db);
}
-static const cmd *parse_command(const char *str)
+static void test_dbm_delete(abts_case *tc, apr_dbm_t *db, dbm_table_t *table)
{
- int i;
-
- for (i = 0; i < CMD_SIZE; i++)
- if (strcasecmp(cmds[i].sname, str) == 0)
- return &cmds[i];
-
- return NULL;
+ apr_status_t rv;
+ unsigned int i;
+
+ for (i = 0; i < NUM_TABLE_ROWS; i++) {
+ /* XXX: random */
+ if (i & 1)
+ continue;
+ rv = apr_dbm_delete(db, table[i].key);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+ table[i].deleted = TRUE;
+ }
}
-static void prdatum(FILE *stream, apr_datum_t d)
+static void test_dbm_exists(abts_case *tc, apr_dbm_t *db, dbm_table_t *table)
{
- int c;
- const char *p = d.dptr;
- int n = d.dsize;
-
- while (n--) {
- c = *p++ & 0377;
- if (c & 0200) {
- fprintf(stream, "M-");
- c &= 0177;
+ unsigned int i;
+ int cond;
+
+ for (i = 0; i < NUM_TABLE_ROWS; i++) {
+ cond = apr_dbm_exists(db, table[i].key);
+ if (table[i].deleted) {
+ ABTS_TRUE(tc, cond == 0);
+ } else {
+ ABTS_TRUE(tc, cond != 0);
}
- if (c == 0177 || c < ' ')
- fprintf(stream, "^%c", (c == 0177) ? '?' : c + '@');
- else
- putc(c, stream);
}
}
-static void oops(apr_dbm_t * dbm, apr_status_t rv, const char *s1,
- const char *s2)
+static void test_dbm_traversal(abts_case *tc, apr_dbm_t *db, dbm_table_t *table)
{
- char errbuf[200];
+ apr_status_t rv;
+ unsigned int i;
+ apr_datum_t key;
- if (progname) {
- fprintf(stderr, "%s: ", progname);
- }
- fprintf(stderr, s1, s2);
- fprintf(stderr, "\n");
+ rv = apr_dbm_firstkey(db, &key);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
- if (rv != APR_SUCCESS) {
- apr_strerror(rv, errbuf, sizeof(errbuf));
- fprintf(stderr, "APR Error %d - %s\n", rv, errbuf);
+ do {
+ if (key.dptr == NULL || key.dsize == 0)
+ break;
- if (dbm) {
- apr_dbm_geterror(dbm, &rv, errbuf, sizeof(errbuf));
- fprintf(stderr, "APR_DB Error %d - %s\n", rv, errbuf);
+ for (i = 0; i < NUM_TABLE_ROWS; i++) {
+ if (table[i].key.dsize != key.dsize)
+ continue;
+ if (memcmp(table[i].key.dptr, key.dptr, key.dsize))
+ continue;
+ ABTS_INT_EQUAL(tc, table[i].deleted, 0);
+ ABTS_INT_EQUAL(tc, table[i].visited, 0);
+ table[i].visited++;
}
+
+ rv = apr_dbm_nextkey(db, &key);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+ } while (1);
+
+ for (i = 0; i < NUM_TABLE_ROWS; i++) {
+ if (table[i].deleted)
+ continue;
+ ABTS_INT_EQUAL(tc, table[i].visited, 1);
+ table[i].visited = 0;
}
- exit(1);
}
-static void show_usage(void)
+static void test_dbm(abts_case *tc, void *data)
{
- int i;
+ apr_dbm_t *db;
+ apr_status_t rv;
+ dbm_table_t *table;
+ const char *type = data;
+ const char *file = apr_pstrcat(p, "data/test-", type, NULL);
- if (!progname) {
- progname = "testdbm";
- }
+ rv = apr_dbm_open_ex(&db, type, file, APR_DBM_RWCREATE, APR_OS_DEFAULT, p);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+
+ if (rv != APR_SUCCESS)
+ return;
+
+ table = generate_table();
+
+ test_dbm_store(tc, db, table);
+ test_dbm_fetch(tc, db, table);
+ test_dbm_delete(tc, db, table);
+ test_dbm_exists(tc, db, table);
+ test_dbm_traversal(tc, db, table);
+
+ apr_dbm_close(db);
- fprintf(stderr, "%s [-t DBM-type] [-R] [commands] dbm-file-path\n",
- progname);
+ rv = apr_dbm_open_ex(&db, type, file, APR_DBM_READONLY, APR_OS_DEFAULT, p);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+
+ if (rv != APR_SUCCESS)
+ return;
+
+ test_dbm_exists(tc, db, table);
+ test_dbm_traversal(tc, db, table);
+ test_dbm_fetch(tc, db, table);
+
+ apr_dbm_close(db);
+}
+
+abts_suite *testdbm(abts_suite *suite)
+{
+ suite = ADD_SUITE(suite);
- fputs("Available DBM-types:", stderr);
#if APU_HAVE_GDBM
- fputs(" GDBM", stderr);
+ abts_run_test(suite, test_dbm, "gdbm");
#endif
#if APU_HAVE_NDBM
- fputs(" NDBM", stderr);
+ abts_run_test(suite, test_dbm, "ndbm");
#endif
#if APU_HAVE_SDBM
- fputs(" SDBM", stderr);
+ abts_run_test(suite, test_dbm, "sdbm");
#endif
#if APU_HAVE_DB
- fputs(" DB", stderr);
+ abts_run_test(suite, test_dbm, "db");
#endif
- fputs(" default\n", stderr);
- fputs("Available commands:\n", stderr);
- for (i = 0; i < CMD_SIZE; i++) {
- fprintf(stderr, "%-8s%c", cmds[i].sname,
- ((i + 1) % 6 == 0) ? '\n' : ' ');
- }
- fputs("\n", stderr);
+ return suite;
}
diff --git a/srclib/apr-util/test/testldap.c b/srclib/apr-util/test/testldap.c
index b0a63692..7595a55f 100644
--- a/srclib/apr-util/test/testldap.c
+++ b/srclib/apr-util/test/testldap.c
@@ -1,9 +1,9 @@
-/* Copyright 2002-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/test/testmd4.c b/srclib/apr-util/test/testmd4.c
index 494529d3..345650e5 100644
--- a/srclib/apr-util/test/testmd4.c
+++ b/srclib/apr-util/test/testmd4.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -95,7 +95,7 @@ static void test_md4sum(abts_case *tc, void *data)
unsigned char digest[APR_MD4_DIGESTSIZE];
const void *string = md4sums[count].string;
const void *sum = md4sums[count].md4sum;
- unsigned int len = strlen(string);
+ apr_size_t len = strlen(string);
ABTS_ASSERT(tc, "apr_md4_init", (apr_md4_init(&context) == 0));
ABTS_ASSERT(tc, "apr_md4_update",
diff --git a/srclib/apr-util/test/testmd5.c b/srclib/apr-util/test/testmd5.c
index 4f06f0d7..5f8241a8 100644
--- a/srclib/apr-util/test/testmd5.c
+++ b/srclib/apr-util/test/testmd5.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -55,7 +55,7 @@ static void test_md5sum(abts_case *tc, void *data)
unsigned char digest[APR_MD5_DIGESTSIZE];
const void *string = md5sums[count].string;
const void *sum = md5sums[count].digest;
- unsigned int len = strlen(string);
+ apr_size_t len = strlen(string);
ABTS_ASSERT(tc, "apr_md5_init", (apr_md5_init(&context) == 0));
ABTS_ASSERT(tc, "apr_md5_update",
diff --git a/srclib/apr-util/test/testpass.c b/srclib/apr-util/test/testpass.c
index 67bbdbea..66ab77d4 100644
--- a/srclib/apr-util/test/testpass.c
+++ b/srclib/apr-util/test/testpass.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -108,7 +108,7 @@ static void test_shapass(abts_case *tc, void *data)
const char *pass = "hellojed";
char hash[100];
- apr_sha1_base64(pass, strlen(pass), hash);
+ apr_sha1_base64(pass, (int)strlen(pass), hash);
apr_assert_success(tc, "SHA1 password validated",
apr_password_validate(pass, hash));
diff --git a/srclib/apr-util/test/testqueue.c b/srclib/apr-util/test/testqueue.c
index 9a971f4b..b442f902 100644
--- a/srclib/apr-util/test/testqueue.c
+++ b/srclib/apr-util/test/testqueue.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -14,269 +14,128 @@
* limitations under the License.
*/
-#include <apr_thread_proc.h>
-#include <apr_errno.h>
-#include <apr_general.h>
-#include <apr_getopt.h>
-#include <apr_strings.h>
-#include "errno.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <apr_time.h>
-#if APR_HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#include <apr_portable.h>
+#include "apu.h"
#include "apr_queue.h"
+#include "apr_thread_proc.h"
+#include "apr_time.h"
+#include "abts.h"
+#include "testutil.h"
-#if !APR_HAS_THREADS
-int main(void)
-{
- fprintf(stderr,
- "This program won't work on this platform because there is no "
- "support for threads.\n");
- return 0;
-}
-#else /* !APR_HAS_THREADS */
+#if APR_HAS_THREADS
+
+#define NUMBER_CONSUMERS 3
+#define CONSUMER_ACTIVITY 4
+#define NUMBER_PRODUCERS 4
+#define PRODUCER_ACTIVITY 5
+#define QUEUE_SIZE 100
-apr_pool_t *context;
-int consumer_activity=400;
-int producer_activity=300;
-int verbose=0;
-static void * APR_THREAD_FUNC consumer(apr_thread_t *thd, void *data);
-static void * APR_THREAD_FUNC producer(apr_thread_t *thd, void *data);
-static void usage(void);
+static apr_queue_t *queue;
static void * APR_THREAD_FUNC consumer(apr_thread_t *thd, void *data)
{
long sleeprate;
- apr_queue_t *q = (apr_queue_t*)data;
+ abts_case *tc = data;
apr_status_t rv;
- int val;
void *v;
- char current_thread_str[30];
- apr_os_thread_t current_thread = apr_os_thread_current();
- apr_snprintf(current_thread_str, sizeof current_thread_str,
- "%pT", &current_thread);
-
- sleeprate = 1000000/consumer_activity;
+ sleeprate = 1000000/CONSUMER_ACTIVITY;
apr_sleep( (rand() % 4 ) * 1000000 ); /* sleep random seconds */
- while (1) {
- do {
- rv = apr_queue_pop(q, &v);
- if (rv == APR_EINTR) {
- fprintf(stderr, "%s\tconsumer intr\n", current_thread_str);
- }
- } while (rv == APR_EINTR) ;
- if (rv != APR_SUCCESS) {
- if (rv == APR_EOF) {
- fprintf(stderr, "%s\tconsumer:queue terminated APR_EOF\n", current_thread_str);
- rv=APR_SUCCESS;
- }
- else
- fprintf(stderr, "%s\tconsumer thread exit rv %d\n", current_thread_str, rv);
- apr_thread_exit(thd, rv);
- return NULL;
- }
- val = *(int*)v;
- if (verbose)
- fprintf(stderr, "%s\tpop %d\n", current_thread_str, val);
+ while (1)
+ {
+ rv = apr_queue_pop(queue, &v);
+
+ if (rv == APR_EINTR)
+ continue;
+
+ if (rv == APR_EOF)
+ break;
+
+ ABTS_TRUE(tc, v == NULL);
+ ABTS_TRUE(tc, rv == APR_SUCCESS);
+
apr_sleep( sleeprate ); /* sleep this long to acheive our rate */
}
+
+ apr_thread_exit(thd, rv);
+
/* not reached */
return NULL;
}
static void * APR_THREAD_FUNC producer(apr_thread_t *thd, void *data)
{
- int i=0;
long sleeprate;
- apr_queue_t *q = (apr_queue_t*)data;
+ abts_case *tc = data;
apr_status_t rv;
- int *val;
- char current_thread_str[30];
- apr_os_thread_t current_thread = apr_os_thread_current();
-
- apr_snprintf(current_thread_str, sizeof current_thread_str,
- "%pT", &current_thread);
- sleeprate = 1000000/producer_activity;
+ sleeprate = 1000000/PRODUCER_ACTIVITY;
apr_sleep( (rand() % 4 ) * 1000000 ); /* sleep random seconds */
+
+ while (1)
+ {
+ rv = apr_queue_push(queue, NULL);
+
+ if (rv == APR_EINTR)
+ continue;
- while(1) {
- val = apr_palloc(context, sizeof(int));
- *val=i;
- if (verbose)
- fprintf(stderr, "%s\tpush %d\n", current_thread_str, *val);
- do {
- rv = apr_queue_push(q, val);
- if (rv == APR_EINTR)
- fprintf(stderr, "%s\tproducer intr\n", current_thread_str);
- } while (rv == APR_EINTR);
+ if (rv == APR_EOF)
+ break;
+
+ ABTS_TRUE(tc, rv == APR_SUCCESS);
- if (rv != APR_SUCCESS) {
- if (rv == APR_EOF) {
- fprintf(stderr, "%s\tproducer: queue terminated APR_EOF\n", current_thread_str);
- rv = APR_SUCCESS;
- }
- else
- fprintf(stderr, "%s\tproducer thread exit rv %d\n", current_thread_str, rv);
- apr_thread_exit(thd, rv);
- return NULL;
- }
- i++;
apr_sleep( sleeprate ); /* sleep this long to acheive our rate */
}
- /* not reached */
+
+ apr_thread_exit(thd, rv);
+
+ /* not reached */
return NULL;
}
-static void usage(void)
-{
- fprintf(stderr,"usage: testqueue -p n -P n -c n -C n -q n -s n\n");
- fprintf(stderr,"-c # of consumer\n");
- fprintf(stderr,"-C amount they consumer before dying\n");
- fprintf(stderr,"-p # of producers\n");
- fprintf(stderr,"-P amount they produce before dying\n");
- fprintf(stderr,"-q queue size\n");
- fprintf(stderr,"-s amount of time to sleep before killing it\n");
- fprintf(stderr,"-v verbose\n");
-}
-
-int main(int argc, const char* const argv[])
+static void test_queue_producer_consumer(abts_case *tc, void *data)
{
- apr_thread_t **t;
- apr_queue_t *queue;
- int i;
+ unsigned int i;
apr_status_t rv;
- apr_getopt_t *opt;
- const char *optarg;
- char c;
- int numconsumers=3;
- int numproducers=4;
- int queuesize=100;
- int sleeptime=30;
- char errorbuf[200];
+ apr_thread_t **t;
- apr_initialize();
+ /* XXX: non-portable */
srand((unsigned int)apr_time_now());
- printf("APR Queue Test\n======================\n\n");
- printf("%-60s", "Initializing the context");
- if (apr_pool_create(&context, NULL) != APR_SUCCESS) {
- fflush(stdout);
- fprintf(stderr, "Failed.\nCould not initialize\n");
- exit(-1);
+ rv = apr_queue_create(&queue, QUEUE_SIZE, p);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+
+ t = apr_palloc(p, sizeof(apr_thread_t*) * (NUMBER_CONSUMERS
+ + NUMBER_PRODUCERS));
+ for (i = 0; i < NUMBER_CONSUMERS; ++i) {
+ rv = apr_thread_create(&t[i], NULL, consumer, tc, p);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
}
- printf("OK\n");
-
- apr_getopt_init(&opt, context, argc, argv);
- while ((rv = apr_getopt(opt, "p:c:P:C:q:s:v", &c, &optarg))
- == APR_SUCCESS) {
- switch (c) {
- case 'c':
- numconsumers = atoi( optarg);
- break;
- case 'p':
- numproducers = atoi( optarg);
- break;
- case 'C':
- consumer_activity = atoi( optarg);
- break;
- case 'P':
- producer_activity = atoi( optarg);
- break;
- case 's':
- sleeptime= atoi(optarg);
- break;
- case 'q':
- queuesize = atoi(optarg);
- break;
- case 'v':
- verbose= 1;
- break;
- default:
- usage();
- exit(-1);
- }
- }
- /* bad cmdline option? then we die */
- if (rv != APR_EOF || opt->ind < opt->argc) {
- usage();
- exit(-1);
+ for (i = NUMBER_CONSUMERS; i < NUMBER_CONSUMERS + NUMBER_PRODUCERS; ++i) {
+ rv = apr_thread_create(&t[i], NULL, producer, tc, p);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
}
+ apr_sleep(5000000); /* sleep 5 seconds */
-
- printf("test stats %d consumers (rate %d/sec) %d producers (rate %d/sec) queue size %d sleep %d\n",
- numconsumers,consumer_activity, numproducers, producer_activity, queuesize,sleeptime);
- printf("%-60s", "Initializing the queue");
- rv = apr_queue_create(&queue, queuesize, context);
-
- if (rv != APR_SUCCESS) {
- fflush(stdout);
- fprintf(stderr, "Failed\nCould not create queue %d\n",rv);
- apr_strerror(rv, errorbuf,200);
- fprintf(stderr,"%s\n",errorbuf);
- exit(-1);
- }
- printf("OK\n");
-
- t = apr_palloc( context, sizeof(apr_thread_t*) * (numconsumers+numproducers));
- printf("%-60s", "Starting consumers");
- for (i=0;i<numconsumers;i++) {
- rv = apr_thread_create(&t[i], NULL, consumer, queue, context);
- if (rv != APR_SUCCESS) {
- apr_strerror(rv, errorbuf,200);
- fprintf(stderr, "Failed\nError starting consumer thread (%d) rv=%d:%s\n",i, rv,errorbuf);
- exit(-1);
-
- }
- }
- for (i=numconsumers;i<(numconsumers+numproducers);i++) {
- rv = apr_thread_create(&t[i], NULL, producer, queue, context);
- if (rv != APR_SUCCESS) {
- apr_strerror(rv, errorbuf,200);
- fprintf(stderr, "Failed\nError starting producer thread (%d) rv=%d:%s\n",i, rv,errorbuf);
- exit(-1);
-
- }
- }
-
- printf("OK\n");
- printf("%-60s", "Sleeping\n");
- apr_sleep( sleeptime * 1000000 ); /* sleep 10 seconds */
- printf("OK\n");
-
- printf("%-60s", "Terminating queue");
rv = apr_queue_term(queue);
- if (rv != APR_SUCCESS) {
- apr_strerror(rv, errorbuf,200);
- fprintf( stderr, "apr_queue_term failed %d:%s\n",rv,errorbuf);
- }
- printf("OK\n");
-
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
- printf("%-60s", "Waiting for threads to exit\n");
- fflush(stdout);
- for (i=0;i<numconsumers+numproducers;i++) {
+ for (i = 0; i < NUMBER_CONSUMERS + NUMBER_PRODUCERS; ++i) {
apr_thread_join(&rv, t[i]);
- if (rv != 0 ) {
- apr_strerror(rv, errorbuf,200);
- if (i<numconsumers)
- fprintf( stderr, "consumer thread %d failed rv %d:%s\n",i,rv,errorbuf);
- else
- fprintf( stderr, "producer thread %d failed rv %d:%s\n",i,rv,errorbuf);
- }
+ ABTS_INT_EQUAL(tc, rv, APR_EOF);
}
+}
- printf("OK\n");
+#endif /* APR_HAS_THREADS */
- apr_terminate();
+abts_suite *testqueue(abts_suite *suite)
+{
+ suite = ADD_SUITE(suite);
- return 0;
-}
+#if APR_HAS_THREADS
+ abts_run_test(suite, test_queue_producer_consumer, NULL);
+#endif /* APR_HAS_THREADS */
-#endif /* !APR_HAS_THREADS */
+ return suite;
+}
diff --git a/srclib/apr-util/test/testreslist.c b/srclib/apr-util/test/testreslist.c
index 5ecfcea4..a91de158 100644
--- a/srclib/apr-util/test/testreslist.c
+++ b/srclib/apr-util/test/testreslist.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -16,32 +16,28 @@
#include <stdio.h>
#include <stdlib.h>
+#include "apr_general.h"
+#include "apu.h"
#include "apr_reslist.h"
#include "apr_thread_proc.h"
-
#if APR_HAVE_TIME_H
#include <time.h>
#endif /* APR_HAVE_TIME_H */
-#if !APR_HAS_THREADS
-
-int main(void)
-{
- fprintf(stderr, "this program requires APR thread support\n");
- return 0;
-}
+#include "abts.h"
+#include "testutil.h"
-#else
+#if APR_HAS_THREADS
#define RESLIST_MIN 3
#define RESLIST_SMAX 10
#define RESLIST_HMAX 20
-#define RESLIST_TTL APR_TIME_C(350000) /* 35 ms */
+#define RESLIST_TTL APR_TIME_C(35000) /* 35 ms */
#define CONSUMER_THREADS 25
#define CONSUMER_ITERATIONS 250
-#define CONSTRUCT_SLEEP_TIME APR_TIME_C(250000) /* 25 ms */
-#define DESTRUCT_SLEEP_TIME APR_TIME_C(100000) /* 10 ms */
-#define WORK_DELAY_SLEEP_TIME APR_TIME_C(150000) /* 15 ms */
+#define CONSTRUCT_SLEEP_TIME APR_TIME_C(25000) /* 25 ms */
+#define DESTRUCT_SLEEP_TIME APR_TIME_C(10000) /* 10 ms */
+#define WORK_DELAY_SLEEP_TIME APR_TIME_C(15000) /* 15 ms */
typedef struct {
apr_interval_time_t sleep_upon_construct;
@@ -54,6 +50,15 @@ typedef struct {
int id;
} my_resource_t;
+/* Linear congruential generator */
+static apr_uint32_t lgc(apr_uint32_t a)
+{
+ apr_uint64_t z = a;
+ z *= 279470273;
+ z %= APR_UINT64_C(4294967291);
+ return (apr_uint32_t)z;
+}
+
static apr_status_t my_constructor(void **resource, void *params,
apr_pool_t *pool)
{
@@ -64,9 +69,6 @@ static apr_status_t my_constructor(void **resource, void *params,
res = apr_palloc(pool, sizeof(*res));
res->id = my_params->c_count++;
- printf("++ constructing new resource [id:%d, #%d/%d]\n", res->id,
- my_params->c_count, my_params->d_count);
-
/* Sleep for awhile, to simulate construction overhead. */
apr_sleep(my_params->sleep_upon_construct);
@@ -80,9 +82,7 @@ static apr_status_t my_destructor(void *resource, void *params,
{
my_resource_t *res = resource;
my_parameters_t *my_params = params;
-
- printf("-- destructing old resource [id:%d, #%d/%d]\n", res->id,
- my_params->c_count, ++my_params->d_count);
+ res->id = my_params->d_count++;
apr_sleep(my_params->sleep_upon_destruct);
@@ -91,54 +91,51 @@ static apr_status_t my_destructor(void *resource, void *params,
typedef struct {
int tid;
+ abts_case *tc;
apr_reslist_t *reslist;
apr_interval_time_t work_delay_sleep;
} my_thread_info_t;
+#define PERCENT95th ( ( 2u^30 / 5u ) * 19u )
+
static void * APR_THREAD_FUNC resource_consuming_thread(apr_thread_t *thd,
void *data)
{
+ int i;
+ apr_uint32_t chance;
+ void *vp;
apr_status_t rv;
+ my_resource_t *res;
my_thread_info_t *thread_info = data;
apr_reslist_t *rl = thread_info->reslist;
- int i;
+
+#if APR_HAS_RANDOM
+ apr_generate_random_bytes((void*)&chance, sizeof(chance));
+#else
+ chance = (apr_uint32_t)(apr_time_now() % APR_TIME_C(4294967291));
+#endif
for (i = 0; i < CONSUMER_ITERATIONS; i++) {
- my_resource_t *res;
- void *vp;
rv = apr_reslist_acquire(rl, &vp);
- if (rv != APR_SUCCESS) {
- fprintf(stderr, "Failed to retrieve resource from reslist\n");
- apr_thread_exit(thd, rv);
- return NULL;
- }
+ ABTS_INT_EQUAL(thread_info->tc, rv, APR_SUCCESS);
res = vp;
- printf(" [tid:%d,iter:%d] using resource id:%d\n", thread_info->tid,
- i, res->id);
apr_sleep(thread_info->work_delay_sleep);
-/* simulate a 5% chance of the resource being bad */
- if ( drand48() < 0.95 ) {
- rv = apr_reslist_release(rl, res);
- if (rv != APR_SUCCESS) {
- fprintf(stderr, "Failed to return resource to reslist\n");
- apr_thread_exit(thd, rv);
- return NULL;
- }
+
+ /* simulate a 5% chance of the resource being bad */
+ chance = lgc(chance);
+ if ( chance < PERCENT95th ) {
+ rv = apr_reslist_release(rl, res);
+ ABTS_INT_EQUAL(thread_info->tc, rv, APR_SUCCESS);
} else {
- printf("invalidating resource id:%d\n", res->id) ;
- rv = apr_reslist_invalidate(rl, res);
- if (rv != APR_SUCCESS) {
- fprintf(stderr, "Failed to invalidate resource\n");
- apr_thread_exit(thd, rv);
- return NULL;
- }
+ rv = apr_reslist_invalidate(rl, res);
+ ABTS_INT_EQUAL(thread_info->tc, rv, APR_SUCCESS);
}
}
return APR_SUCCESS;
}
-static void test_timeout(apr_reslist_t *rl)
+static void test_timeout(abts_case *tc, apr_reslist_t *rl)
{
apr_status_t rv;
my_resource_t *resources[RESLIST_HMAX];
@@ -146,9 +143,7 @@ static void test_timeout(apr_reslist_t *rl)
void *vp;
int i;
- printf("Setting timeout to 1000us: ");
apr_reslist_timeout_set(rl, 1000);
- fprintf(stdout, "OK\n");
/* deplete all possible resources from the resource list
* so that the next call will block until timeout is reached
@@ -158,19 +153,13 @@ static void test_timeout(apr_reslist_t *rl)
for (i = 0; i < RESLIST_HMAX; i++) {
rv = apr_reslist_acquire(rl, (void**)&resources[i]);
- if (rv != APR_SUCCESS) {
- fprintf(stderr, "couldn't acquire resource: %d\n", rv);
- exit(1);
- }
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
}
/* next call will block until timeout is reached */
rv = apr_reslist_acquire(rl, &vp);
- if (!APR_STATUS_IS_TIMEUP(rv)) {
- fprintf(stderr, "apr_reslist_acquire()->%d instead of TIMEUP\n",
- rv);
- exit(1);
- }
+ ABTS_TRUE(tc, APR_STATUS_IS_TIMEUP(rv));
+
res = vp;
/* release the resources; otherwise the destroy operation
@@ -178,51 +167,38 @@ static void test_timeout(apr_reslist_t *rl)
*/
for (i = 0; i < RESLIST_HMAX; i++) {
rv = apr_reslist_release(rl, resources[i]);
- if (rv != APR_SUCCESS) {
- fprintf(stderr, "couldn't release resource: %d\n", rv);
- exit(1);
- }
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
}
}
-static void test_shrinking(apr_reslist_t *rl)
+static void test_shrinking(abts_case *tc, apr_reslist_t *rl)
{
apr_status_t rv;
my_resource_t *resources[RESLIST_HMAX];
my_resource_t *res;
+ void *vp;
int i;
int sleep_time = RESLIST_TTL / RESLIST_HMAX;
/* deplete all possible resources from the resource list */
for (i = 0; i < RESLIST_HMAX; i++) {
rv = apr_reslist_acquire(rl, (void**)&resources[i]);
- if (rv != APR_SUCCESS) {
- fprintf(stderr, "couldn't acquire resource: %d\n", rv);
- exit(1);
- }
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
}
/* Free all resources above RESLIST_SMAX - 1 */
for (i = RESLIST_SMAX - 1; i < RESLIST_HMAX; i++) {
rv = apr_reslist_release(rl, resources[i]);
- if (rv != APR_SUCCESS) {
- fprintf(stderr, "couldn't release resource: %d\n", rv);
- exit(1);
- }
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
}
for (i = 0; i < RESLIST_HMAX; i++) {
- rv = apr_reslist_acquire(rl, (void**)&res);
- if (rv != APR_SUCCESS) {
- fprintf(stderr, "couldn't acquire resource: %d\n", rv);
- exit(1);
- }
+ rv = apr_reslist_acquire(rl, &vp);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+ res = vp;
apr_sleep(sleep_time);
rv = apr_reslist_release(rl, res);
- if (rv != APR_SUCCESS) {
- fprintf(stderr, "couldn't release resource: %d\n", rv);
- exit(1);
- }
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
}
apr_sleep(sleep_time);
@@ -232,132 +208,74 @@ static void test_shrinking(apr_reslist_t *rl)
*/
for (i = 0; i < RESLIST_SMAX - 1; i++) {
rv = apr_reslist_release(rl, resources[i]);
- if (rv != APR_SUCCESS) {
- fprintf(stderr, "couldn't release resource: %d\n", rv);
- exit(1);
- }
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
}
}
-static apr_status_t test_reslist(apr_pool_t *parpool)
+static void test_reslist(abts_case *tc, void *data)
{
+ int i;
+ apr_pool_t *p;
apr_status_t rv;
- apr_pool_t *pool;
apr_reslist_t *rl;
my_parameters_t *params;
- int i;
apr_thread_t *my_threads[CONSUMER_THREADS];
my_thread_info_t my_thread_info[CONSUMER_THREADS];
- srand48(time(0)) ;
- printf("Creating child pool.......................");
- rv = apr_pool_create(&pool, parpool);
- if (rv != APR_SUCCESS) {
- fprintf(stderr, "Error creating child pool\n");
- return rv;
- }
- printf("OK\n");
+ rv = apr_pool_create(&p, NULL);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
/* Create some parameters that will be passed into each
* constructor and destructor call. */
- params = apr_pcalloc(pool, sizeof(*params));
+ params = apr_pcalloc(p, sizeof(*params));
params->sleep_upon_construct = CONSTRUCT_SLEEP_TIME;
params->sleep_upon_destruct = DESTRUCT_SLEEP_TIME;
/* We're going to want 10 blocks of data from our target rmm. */
- printf("Creating resource list:\n"
- " min/smax/hmax: %d/%d/%d\n"
- " ttl: %" APR_TIME_T_FMT "\n", RESLIST_MIN, RESLIST_SMAX,
- RESLIST_HMAX, RESLIST_TTL);
rv = apr_reslist_create(&rl, RESLIST_MIN, RESLIST_SMAX, RESLIST_HMAX,
RESLIST_TTL, my_constructor, my_destructor,
- params, pool);
- if (rv != APR_SUCCESS) {
- fprintf(stderr, "Error allocating shared memory block\n");
- return rv;
- }
- fprintf(stdout, "OK\n");
+ params, p);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
- printf("Creating %d threads", CONSUMER_THREADS);
for (i = 0; i < CONSUMER_THREADS; i++) {
putchar('.');
my_thread_info[i].tid = i;
+ my_thread_info[i].tc = tc;
my_thread_info[i].reslist = rl;
my_thread_info[i].work_delay_sleep = WORK_DELAY_SLEEP_TIME;
rv = apr_thread_create(&my_threads[i], NULL,
resource_consuming_thread, &my_thread_info[i],
- pool);
- if (rv != APR_SUCCESS) {
- fprintf(stderr, "Failed to create thread %d\n", i);
- return rv;
- }
+ p);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
}
- printf("\nDone!\n");
- printf("Waiting for threads to finish");
for (i = 0; i < CONSUMER_THREADS; i++) {
apr_status_t thread_rv;
- putchar('.');
apr_thread_join(&thread_rv, my_threads[i]);
- if (rv != APR_SUCCESS) {
- fprintf(stderr, "Failed to join thread %d\n", i);
- return rv;
- }
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
}
- printf("\nDone!\n");
- test_timeout(rl);
+ test_timeout(tc, rl);
- test_shrinking(rl);
- if (params->c_count - params->d_count != RESLIST_SMAX) {
- printf("FAILED: Resourcelist has not shrinked back to RESLIST_SMAX\n");
- return APR_EGENERAL;
- }
- else {
- printf("OK: Resource list shrinked back to RESLIST_SMAX\n");
- }
+ test_shrinking(tc, rl);
+ ABTS_INT_EQUAL(tc, RESLIST_SMAX, params->c_count - params->d_count);
- printf("Destroying resource list.................");
rv = apr_reslist_destroy(rl);
- if (rv != APR_SUCCESS) {
- printf("FAILED\n");
- return rv;
- }
- printf("OK\n");
-
- apr_pool_destroy(pool);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
- return APR_SUCCESS;
+ apr_pool_destroy(p);
}
-int main(void)
+#endif /* APR_HAS_THREADS */
+
+abts_suite *testreslist(abts_suite *suite)
{
- apr_status_t rv;
- apr_pool_t *pool;
- char errmsg[200];
-
- apr_initialize();
-
- printf("APR Resource List Test\n");
- printf("======================\n\n");
-
- printf("Initializing the pool............................");
- if (apr_pool_create(&pool, NULL) != APR_SUCCESS) {
- printf("could not initialize pool\n");
- exit(-1);
- }
- printf("OK\n");
+ suite = ADD_SUITE(suite);
- rv = test_reslist(pool);
- if (rv != APR_SUCCESS) {
- printf("Resource list test FAILED: [%d] %s\n",
- rv, apr_strerror(rv, errmsg, sizeof(errmsg)));
- exit(-2);
- }
- printf("Resource list test passed!\n");
+#if APR_HAS_THREADS
+ abts_run_test(suite, test_reslist, NULL);
+#endif
- return 0;
+ return suite;
}
-
-#endif /* APR_HAS_THREADS */
diff --git a/srclib/apr-util/test/testrmm.c b/srclib/apr-util/test/testrmm.c
index 3c3ac604..c899308b 100644
--- a/srclib/apr-util/test/testrmm.c
+++ b/srclib/apr-util/test/testrmm.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -21,12 +21,8 @@
#include "apr_lib.h"
#include "apr_strings.h"
#include "apr_time.h"
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#if APR_HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+#include "abts.h"
+#include "testutil.h"
#if APR_HAS_SHARED_MEMORY
@@ -34,163 +30,119 @@
#define FRAG_COUNT 10
#define SHARED_SIZE (apr_size_t)(FRAG_SIZE * FRAG_COUNT * sizeof(char*))
-static apr_status_t test_rmm(apr_pool_t *parpool)
+static void test_rmm(abts_case *tc, void *data)
{
apr_status_t rv;
apr_pool_t *pool;
apr_shm_t *shm;
apr_rmm_t *rmm;
apr_size_t size, fragsize;
- apr_rmm_off_t *off;
+ apr_rmm_off_t *off, off2;
int i;
void *entity;
- rv = apr_pool_create(&pool, parpool);
- if (rv != APR_SUCCESS) {
- fprintf(stderr, "Error creating child pool\n");
- return rv;
- }
+ rv = apr_pool_create(&pool, p);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
/* We're going to want 10 blocks of data from our target rmm. */
size = SHARED_SIZE + apr_rmm_overhead_get(FRAG_COUNT + 1);
- printf("Creating anonymous shared memory (%"
- APR_SIZE_T_FMT " bytes).....", size);
rv = apr_shm_create(&shm, size, NULL, pool);
- if (rv != APR_SUCCESS) {
- fprintf(stderr, "Error allocating shared memory block\n");
- return rv;
- }
- fprintf(stdout, "OK\n");
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
- printf("Creating rmm segment.............................");
- rv = apr_rmm_init(&rmm, NULL, apr_shm_baseaddr_get(shm), size,
- pool);
+ if (rv != APR_SUCCESS)
+ return;
- if (rv != APR_SUCCESS) {
- fprintf(stderr, "Error allocating rmm..............\n");
- return rv;
- }
- fprintf(stdout, "OK\n");
+ rv = apr_rmm_init(&rmm, NULL, apr_shm_baseaddr_get(shm), size, pool);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+
+ if (rv != APR_SUCCESS)
+ return;
+ /* Creating each fragment of size fragsize */
fragsize = SHARED_SIZE / FRAG_COUNT;
- printf("Creating each fragment of size %" APR_SIZE_T_FMT "................",
- fragsize);
off = apr_palloc(pool, FRAG_COUNT * sizeof(apr_rmm_off_t));
for (i = 0; i < FRAG_COUNT; i++) {
off[i] = apr_rmm_malloc(rmm, fragsize);
- }
- fprintf(stdout, "OK\n");
-
- printf("Checking for out of memory allocation............");
- if (apr_rmm_malloc(rmm, FRAG_SIZE * FRAG_COUNT) == 0) {
- fprintf(stdout, "OK\n");
- }
- else {
- return APR_EGENERAL;
}
- printf("Checking each fragment for address alignment.....");
+ /* Checking for out of memory allocation */
+ off2 = apr_rmm_malloc(rmm, FRAG_SIZE * FRAG_COUNT);
+ ABTS_TRUE(tc, !off2);
+
+ /* Checking each fragment for address alignment */
for (i = 0; i < FRAG_COUNT; i++) {
char *c = apr_rmm_addr_get(rmm, off[i]);
apr_size_t sc = (apr_size_t)c;
- if (off[i] == 0) {
- printf("allocation failed for offset %d\n", i);
- return APR_ENOMEM;
- }
-
- if (sc & 7) {
- printf("Bad alignment for fragment %d; %p not %p!\n",
- i, c, (void *)APR_ALIGN_DEFAULT((apr_size_t)c));
- return APR_EGENERAL;
- }
+ ABTS_TRUE(tc, !!off[i]);
+ ABTS_TRUE(tc, !(sc & 7));
}
- fprintf(stdout, "OK\n");
-
- printf("Setting each fragment to a unique value..........");
+
+ /* Setting each fragment to a unique value */
for (i = 0; i < FRAG_COUNT; i++) {
int j;
char **c = apr_rmm_addr_get(rmm, off[i]);
for (j = 0; j < FRAG_SIZE; j++, c++) {
*c = apr_itoa(pool, i + j);
}
- }
- fprintf(stdout, "OK\n");
+ }
- printf("Checking each fragment for its unique value......");
+ /* Checking each fragment for its unique value */
for (i = 0; i < FRAG_COUNT; i++) {
int j;
char **c = apr_rmm_addr_get(rmm, off[i]);
for (j = 0; j < FRAG_SIZE; j++, c++) {
char *d = apr_itoa(pool, i + j);
- if (strcmp(*c, d) != 0) {
- return APR_EGENERAL;
- }
+ ABTS_STR_EQUAL(tc, *c, d);
}
- }
- fprintf(stdout, "OK\n");
+ }
- printf("Freeing each fragment............................");
+ /* Freeing each fragment */
for (i = 0; i < FRAG_COUNT; i++) {
rv = apr_rmm_free(rmm, off[i]);
- if (rv != APR_SUCCESS) {
- return rv;
- }
- }
- fprintf(stdout, "OK\n");
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+ }
- printf("Creating one large segment.......................");
+ /* Creating one large segment */
off[0] = apr_rmm_calloc(rmm, SHARED_SIZE);
- fprintf(stdout, "OK\n");
- printf("Setting large segment............................");
+ /* Setting large segment */
for (i = 0; i < FRAG_COUNT * FRAG_SIZE; i++) {
char **c = apr_rmm_addr_get(rmm, off[0]);
c[i] = apr_itoa(pool, i);
}
- fprintf(stdout, "OK\n");
- printf("Freeing large segment............................");
- apr_rmm_free(rmm, off[0]);
- fprintf(stdout, "OK\n");
+ /* Freeing large segment */
+ rv = apr_rmm_free(rmm, off[0]);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
- printf("Creating each fragment of size %" APR_SIZE_T_FMT " (again)........",
- fragsize);
+ /* Creating each fragment of size fragsize */
for (i = 0; i < FRAG_COUNT; i++) {
off[i] = apr_rmm_malloc(rmm, fragsize);
- }
- fprintf(stdout, "OK\n");
+ }
- printf("Freeing each fragment backwards..................");
+ /* Freeing each fragment backwards */
for (i = FRAG_COUNT - 1; i >= 0; i--) {
rv = apr_rmm_free(rmm, off[i]);
- if (rv != APR_SUCCESS) {
- return rv;
- }
- }
- fprintf(stdout, "OK\n");
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+ }
- printf("Creating one large segment (again)...............");
+ /* Creating one large segment (again) */
off[0] = apr_rmm_calloc(rmm, SHARED_SIZE);
- fprintf(stdout, "OK\n");
- printf("Freeing large segment............................");
- apr_rmm_free(rmm, off[0]);
- fprintf(stdout, "OK\n");
+ /* Freeing large segment */
+ rv = apr_rmm_free(rmm, off[0]);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
- printf("Checking realloc.................................");
+ /* Checking realloc */
off[0] = apr_rmm_calloc(rmm, SHARED_SIZE - 100);
off[1] = apr_rmm_calloc(rmm, 100);
- if (off[0] == 0 || off[1] == 0) {
- printf("FAILED\n");
- return APR_EINVAL;
- }
+ ABTS_TRUE(tc, !!off[0]);
+ ABTS_TRUE(tc, !!off[1]);
+
entity = apr_rmm_addr_get(rmm, off[1]);
rv = apr_rmm_free(rmm, off[0]);
- if (rv != APR_SUCCESS) {
- printf("FAILED\n");
- return rv;
- }
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
{
unsigned char *c = entity;
@@ -205,77 +157,35 @@ static apr_status_t test_rmm(apr_pool_t *parpool)
/* now we can realloc off[1] and get many more bytes */
off[0] = apr_rmm_realloc(rmm, entity, SHARED_SIZE - 100);
- if (off[0] == 0) {
- printf("FAILED\n");
- return APR_EINVAL;
- }
+ ABTS_TRUE(tc, !!off[0]);
{
unsigned char *c = apr_rmm_addr_get(rmm, off[0]);
/* fill in the region */
for (i = 0; i < 100; i++) {
- if (c[i] != (i < 50 ? 0 : i)) {
- printf("FAILED at offset %d: %hx\n", i, c[i]);
- return APR_EGENERAL;
- }
+ ABTS_TRUE(tc, c[i] == (i < 50 ? 0 : i));
}
}
- fprintf(stdout, "OK\n");
-
- printf("Destroying rmm segment...........................");
rv = apr_rmm_destroy(rmm);
- if (rv != APR_SUCCESS) {
- printf("FAILED\n");
- return rv;
- }
- printf("OK\n");
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
- printf("Destroying shared memory segment.................");
rv = apr_shm_destroy(shm);
- if (rv != APR_SUCCESS) {
- printf("FAILED\n");
- return rv;
- }
- printf("OK\n");
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
apr_pool_destroy(pool);
-
- return APR_SUCCESS;
}
+#endif /* APR_HAS_SHARED_MEMORY */
-int main(void)
+abts_suite *testrmm(abts_suite *suite)
{
- apr_status_t rv;
- apr_pool_t *pool;
- char errmsg[200];
-
- apr_initialize();
-
- printf("APR RMM Memory Test\n");
- printf("======================\n\n");
+ suite = ADD_SUITE(suite);
- printf("Initializing the pool............................");
- if (apr_pool_create(&pool, NULL) != APR_SUCCESS) {
- printf("could not initialize pool\n");
- exit(-1);
- }
- printf("OK\n");
-
- rv = test_rmm(pool);
- if (rv != APR_SUCCESS) {
- printf("Anonymous shared memory test FAILED: [%d] %s\n",
- rv, apr_strerror(rv, errmsg, sizeof(errmsg)));
- exit(-2);
- }
- printf("RMM test passed!\n");
+#if APR_HAS_SHARED_MEMORY
+ abts_run_test(suite, test_rmm, NULL);
+#endif
- return 0;
+ return suite;
}
-
-#else /* APR_HAS_SHARED_MEMORY */
-#error shmem is not supported on this platform
-#endif /* APR_HAS_SHARED_MEMORY */
-
diff --git a/srclib/apr-util/test/teststrmatch.c b/srclib/apr-util/test/teststrmatch.c
index e86b4c13..5ed70f84 100644
--- a/srclib/apr-util/test/teststrmatch.c
+++ b/srclib/apr-util/test/teststrmatch.c
@@ -1,9 +1,9 @@
-/* Copyright 2002-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/test/testuri.c b/srclib/apr-util/test/testuri.c
index c4d385d3..b84df9a1 100644
--- a/srclib/apr-util/test/testuri.c
+++ b/srclib/apr-util/test/testuri.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/test/testutil.c b/srclib/apr-util/test/testutil.c
index f60ef21a..11a1923a 100644
--- a/srclib/apr-util/test/testutil.c
+++ b/srclib/apr-util/test/testutil.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/test/testutil.h b/srclib/apr-util/test/testutil.h
index 95318e17..6b8e5f84 100644
--- a/srclib/apr-util/test/testutil.h
+++ b/srclib/apr-util/test/testutil.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -52,5 +52,13 @@ abts_suite *testmd4(abts_suite *suite);
abts_suite *testmd5(abts_suite *suite);
abts_suite *testldap(abts_suite *suite);
abts_suite *testdbd(abts_suite *suite);
+abts_suite *testdate(abts_suite *suite);
+abts_suite *testmemcache(abts_suite *suite);
+abts_suite *testreslist(abts_suite *suite);
+abts_suite *testqueue(abts_suite *suite);
+abts_suite *testxml(abts_suite *suite);
+abts_suite *testxlate(abts_suite *suite);
+abts_suite *testrmm(abts_suite *suite);
+abts_suite *testdbm(abts_suite *suite);
#endif /* APR_TEST_INCLUDES */
diff --git a/srclib/apr-util/test/testutildll.dsp b/srclib/apr-util/test/testutildll.dsp
new file mode 100644
index 00000000..474853fc
--- /dev/null
+++ b/srclib/apr-util/test/testutildll.dsp
@@ -0,0 +1,266 @@
+# Microsoft Developer Studio Project File - Name="testutildll" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) External Target" 0x0106
+
+CFG=testutildll - Win32 Release
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "testutildll.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "testutildll.mak" CFG="testutildll - Win32 Release"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "testutildll - Win32 Release" (based on "Win32 (x86) External Target")
+!MESSAGE "testutildll - Win32 Debug" (based on "Win32 (x86) External Target")
+!MESSAGE "testutildll - Win32 ReleaseNT" (based on "Win32 (x86) External Target")
+!MESSAGE "testutildll - Win32 DebugNT" (based on "Win32 (x86) External Target")
+!MESSAGE "testutildll - x64 Release" (based on "Win32 (x86) External Target")
+!MESSAGE "testutildll - x64 Debug" (based on "Win32 (x86) External Target")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+
+!IF "$(CFG)" == "testutildll - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ""
+# PROP BASE Intermediate_Dir ""
+# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=Release OUTDIR=Release MODEL=dynamic all check"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "Release\testall.exe"
+# PROP BASE Bsc_Name ""
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=Release OUTDIR=Release MODEL=dynamic all check"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "Release\testall.exe"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "testutildll - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ""
+# PROP BASE Intermediate_Dir ""
+# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=Debug OUTDIR=Debug MODEL=dynamic _DEBUG=1 all check"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "Debug\testall.exe"
+# PROP BASE Bsc_Name ""
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=Debug OUTDIR=Debug MODEL=dynamic _DEBUG=1 all check"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "Debug\testall.exe"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "testutildll - Win32 ReleaseNT"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ""
+# PROP BASE Intermediate_Dir ""
+# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=NT\Release OUTDIR=NT\Release MODEL=dynamic all check"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "NT\Release\testall.exe"
+# PROP BASE Bsc_Name ""
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=NT\Release OUTDIR=NT\Release MODEL=dynamic all check"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "NT\Release\testall.exe"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "testutildll - Win32 DebugNT"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ""
+# PROP BASE Intermediate_Dir ""
+# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=NT\Debug OUTDIR=NT\Debug MODEL=dynamic _DEBUG=1 all check"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "NT\Debug\testall.exe"
+# PROP BASE Bsc_Name ""
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=NT\Debug OUTDIR=NT\Debug MODEL=dynamic _DEBUG=1 all check"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "NT\Debug\testall.exe"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "testutildll - x64 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ""
+# PROP BASE Intermediate_Dir ""
+# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=x64\Release OUTDIR=x64\Release MODEL=dynamic all check"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "x64\Release\testall.exe"
+# PROP BASE Bsc_Name ""
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=x64\Release OUTDIR=x64\Release MODEL=dynamic all check"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "x64\Release\testall.exe"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "testutildll - x64 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ""
+# PROP BASE Intermediate_Dir ""
+# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=x64\Debug OUTDIR=x64\Debug MODEL=dynamic _DEBUG=1 all check"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "x64\Debug\testall.exe"
+# PROP BASE Bsc_Name ""
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=x64\Debug OUTDIR=x64\Debug MODEL=dynamic _DEBUG=1 all check"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "x64\Debug\testall.exe"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ENDIF
+
+# Begin Target
+
+# Name "testutildll - Win32 Release"
+# Name "testutildll - Win32 Debug"
+# Name "testutildll - Win32 ReleaseNT"
+# Name "testutildll - Win32 DebugNT"
+# Name "testutildll - x64 Release"
+# Name "testutildll - x64 Debug"
+# Begin Group "testall Source Files"
+
+# PROP Default_Filter ".c"
+# Begin Source File
+
+SOURCE=.\abts.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\abts.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\abts_tests.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\testbuckets.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testdate.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testdbd.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testdbm.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testldap.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testmd4.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testmd5.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testpass.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testqueue.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testreslist.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testrmm.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\teststrmatch.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testuri.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testutil.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testuuid.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testxlate.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testxml.c
+# End Source File
+# End Group
+# Begin Group "Other Source Files"
+
+# PROP Default_Filter ".c"
+# Begin Source File
+
+SOURCE=.\dbd.c
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\Makefile.win
+# End Source File
+# End Target
+# End Project
diff --git a/srclib/apr-util/test/testutillib.dsp b/srclib/apr-util/test/testutillib.dsp
new file mode 100644
index 00000000..c6396dd8
--- /dev/null
+++ b/srclib/apr-util/test/testutillib.dsp
@@ -0,0 +1,266 @@
+# Microsoft Developer Studio Project File - Name="testutillib" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) External Target" 0x0106
+
+CFG=testutillib - Win32 Release
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "testutillib.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "testutillib.mak" CFG="testutillib - Win32 Release"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "testutillib - Win32 Release" (based on "Win32 (x86) External Target")
+!MESSAGE "testutillib - Win32 Debug" (based on "Win32 (x86) External Target")
+!MESSAGE "testutillib - Win32 ReleaseNT" (based on "Win32 (x86) External Target")
+!MESSAGE "testutillib - Win32 DebugNT" (based on "Win32 (x86) External Target")
+!MESSAGE "testutillib - x64 Release" (based on "Win32 (x86) External Target")
+!MESSAGE "testutillib - x64 Debug" (based on "Win32 (x86) External Target")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+
+!IF "$(CFG)" == "testutillib - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ""
+# PROP BASE Intermediate_Dir ""
+# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=LibR OUTDIR=LibR MODEL=static all check"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "LibR\testall.exe"
+# PROP BASE Bsc_Name ""
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=LibR OUTDIR=LibR MODEL=static all check"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "LibR\testall.exe"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "testutillib - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ""
+# PROP BASE Intermediate_Dir ""
+# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=LibD OUTDIR=LibD MODEL=static _DEBUG=1 all check"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "LibD\testall.exe"
+# PROP BASE Bsc_Name ""
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=LibD OUTDIR=LibD MODEL=static _DEBUG=1 all check"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "LibD\testall.exe"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "testutillib - Win32 ReleaseNT"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ""
+# PROP BASE Intermediate_Dir ""
+# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=NT\LibR OUTDIR=NT\LibR MODEL=static all check"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "NT\LibR\testall.exe"
+# PROP BASE Bsc_Name ""
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=NT\LibR OUTDIR=NT\LibR MODEL=static all check"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "NT\LibR\testall.exe"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "testutillib - Win32 DebugNT"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ""
+# PROP BASE Intermediate_Dir ""
+# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=NT\LibD OUTDIR=NT\LibD MODEL=static _DEBUG=1 all check"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "NT\LibD\testall.exe"
+# PROP BASE Bsc_Name ""
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=NT\LibD OUTDIR=NT\LibD MODEL=static _DEBUG=1 all check"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "NT\LibD\testall.exe"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "testutillib - x64 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ""
+# PROP BASE Intermediate_Dir ""
+# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=x64\LibR OUTDIR=x64\LibR MODEL=static all check"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "x64\LibR\testall.exe"
+# PROP BASE Bsc_Name ""
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=x64\LibR OUTDIR=x64\LibR MODEL=static all check"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "x64\LibR\testall.exe"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "testutillib - x64 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ""
+# PROP BASE Intermediate_Dir ""
+# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=x64\LibD OUTDIR=x64\LibD MODEL=static _DEBUG=1 all check"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "x64\LibD\testall.exe"
+# PROP BASE Bsc_Name ""
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=x64\LibD OUTDIR=x64\LibD MODEL=static _DEBUG=1 all check"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "x64\LibD\testall.exe"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ENDIF
+
+# Begin Target
+
+# Name "testutillib - Win32 Release"
+# Name "testutillib - Win32 Debug"
+# Name "testutillib - Win32 ReleaseNT"
+# Name "testutillib - Win32 DebugNT"
+# Name "testutillib - x64 Release"
+# Name "testutillib - x64 Debug"
+# Begin Group "testall Source Files"
+
+# PROP Default_Filter ".c"
+# Begin Source File
+
+SOURCE=.\abts.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\abts.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\abts_tests.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\testbuckets.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testdate.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testdbd.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testdbm.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testldap.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testmd4.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testmd5.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testpass.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testqueue.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testreslist.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testrmm.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\teststrmatch.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testuri.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testutil.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testuuid.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testxlate.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testxml.c
+# End Source File
+# End Group
+# Begin Group "Other Source Files"
+
+# PROP Default_Filter ".c"
+# Begin Source File
+
+SOURCE=.\dbd.c
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\Makefile.win
+# End Source File
+# End Target
+# End Project
diff --git a/srclib/apr-util/test/testuuid.c b/srclib/apr-util/test/testuuid.c
index 2bd6ef37..f33adde1 100644
--- a/srclib/apr-util/test/testuuid.c
+++ b/srclib/apr-util/test/testuuid.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/test/testxlate.c b/srclib/apr-util/test/testxlate.c
index f6819914..8dbc4c8e 100644
--- a/srclib/apr-util/test/testxlate.c
+++ b/srclib/apr-util/test/testxlate.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -14,111 +14,90 @@
* limitations under the License.
*/
-#include <stdio.h>
-#include <stdlib.h>
-
#include "apr.h"
#include "apr_errno.h"
#include "apr_general.h"
#include "apr_strings.h"
#include "apr_xlate.h"
+#include "abts.h"
+#include "testutil.h"
+
+#ifdef APR_HAS_XLATE
static const char test_utf8[] = "Edelwei\xc3\x9f";
static const char test_utf7[] = "Edelwei+AN8-";
static const char test_latin1[] = "Edelwei\xdf";
static const char test_latin2[] = "Edelwei\xdf";
-
-static int check_status (apr_status_t status, const char *msg)
-{
- if (status)
- {
- static char buf[1024];
- printf("ERROR: %s\n %s\n", msg,
- apr_strerror(status, buf, sizeof(buf)));
- return 1;
- }
- return 0;
-}
-
-static int test_conversion (apr_xlate_t *convset,
- const char *inbuf,
- const char *expected)
+static void test_conversion(abts_case *tc, apr_xlate_t *convset,
+ const char *inbuf, const char *expected)
{
static char buf[1024];
- int retcode = 0;
apr_size_t inbytes_left = strlen(inbuf);
apr_size_t outbytes_left = sizeof(buf) - 1;
- apr_status_t status = apr_xlate_conv_buffer(convset,
- inbuf,
- &inbytes_left,
- buf,
- &outbytes_left);
- if (status == APR_SUCCESS) {
- status = apr_xlate_conv_buffer(convset, NULL, NULL,
- buf + sizeof(buf) - outbytes_left - 1,
- &outbytes_left);
- }
+ apr_status_t rv;
+
+ rv = apr_xlate_conv_buffer(convset, inbuf, &inbytes_left, buf, &outbytes_left);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+
+ if (rv != APR_SUCCESS)
+ return;
+
+ rv = apr_xlate_conv_buffer(convset, NULL, NULL, buf + sizeof(buf) -
+ outbytes_left - 1, &outbytes_left);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+
buf[sizeof(buf) - outbytes_left - 1] = '\0';
- retcode |= check_status(status, "apr_xlate_conv_buffer");
- if ((!status || APR_STATUS_IS_INCOMPLETE(status))
- && strcmp(buf, expected))
- {
- printf("ERROR: expected: '%s'\n actual: '%s'"
- "\n inbytes_left: %"APR_SIZE_T_FMT"\n",
- expected, buf, inbytes_left);
- retcode |= 1;
- }
- return retcode;
+
+ ABTS_STR_EQUAL(tc, buf, expected);
}
-static int one_test (const char *cs1, const char *cs2,
+static void one_test(abts_case *tc, const char *cs1, const char *cs2,
const char *str1, const char *str2,
apr_pool_t *pool)
{
+ apr_status_t rv;
apr_xlate_t *convset;
- const char *msg = apr_psprintf(pool, "apr_xlate_open(%s, %s)", cs2, cs1);
- int retcode = check_status(apr_xlate_open(&convset, cs2, cs1, pool), msg);
- if (!retcode)
- {
- retcode |= test_conversion(convset, str1, str2);
- retcode |= check_status(apr_xlate_close(convset), "apr_xlate_close");
- }
- printf("%s: %s -> %s\n", (retcode ? "FAIL" : "PASS"), cs1, cs2);
- return retcode;
-}
+ rv = apr_xlate_open(&convset, cs2, cs1, pool);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
-int main (int argc, char **argv)
-{
- apr_pool_t *pool;
- int retcode = 0;
+ if (rv != APR_SUCCESS)
+ return;
-#ifndef APR_HAS_XLATE
- puts("SKIP: apr_xlate not implemented");
- return 0;
-#endif
+ test_conversion(tc, convset, str1, str2);
- apr_initialize();
- atexit(apr_terminate);
- apr_pool_create(&pool, NULL);
+ rv = apr_xlate_close(convset);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+}
+static void test_transformation(abts_case *tc, void *data)
+{
/* 1. Identity transformation: UTF-8 -> UTF-8 */
- retcode |= one_test("UTF-8", "UTF-8", test_utf8, test_utf8, pool);
+ one_test(tc, "UTF-8", "UTF-8", test_utf8, test_utf8, p);
/* 2. UTF-8 <-> ISO-8859-1 */
- retcode |= one_test("UTF-8", "ISO-8859-1", test_utf8, test_latin1, pool);
- retcode |= one_test("ISO-8859-1", "UTF-8", test_latin1, test_utf8, pool);
+ one_test(tc, "UTF-8", "ISO-8859-1", test_utf8, test_latin1, p);
+ one_test(tc, "ISO-8859-1", "UTF-8", test_latin1, test_utf8, p);
/* 3. ISO-8859-1 <-> ISO-8859-2, identity */
- retcode |= one_test("ISO-8859-1", "ISO-8859-2",
- test_latin1, test_latin2, pool);
- retcode |= one_test("ISO-8859-2", "ISO-8859-1",
- test_latin2, test_latin1, pool);
+ one_test(tc, "ISO-8859-1", "ISO-8859-2", test_latin1, test_latin2, p);
+ one_test(tc, "ISO-8859-2", "ISO-8859-1", test_latin2, test_latin1, p);
/* 4. Transformation using charset aliases */
- retcode |= one_test("UTF-8", "UTF-7", test_utf8, test_utf7, pool);
- retcode |= one_test("UTF-7", "UTF-8", test_utf7, test_utf8, pool);
+ one_test(tc, "UTF-8", "UTF-7", test_utf8, test_utf7, p);
+ one_test(tc, "UTF-7", "UTF-8", test_utf7, test_utf8, p);
+}
+
+#endif /* APR_HAS_XLATE */
+
+abts_suite *testxlate(abts_suite *suite)
+{
+ suite = ADD_SUITE(suite);
+
+#ifdef APR_HAS_XLATE
+ abts_run_test(suite, test_transformation, NULL);
+#endif
- return retcode;
+ return suite;
}
diff --git a/srclib/apr-util/test/testxml.c b/srclib/apr-util/test/testxml.c
index 9808f210..8db40535 100644
--- a/srclib/apr-util/test/testxml.c
+++ b/srclib/apr-util/test/testxml.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -17,203 +17,143 @@
#include "apr.h"
#include "apr_general.h"
#include "apr_xml.h"
+#include "abts.h"
+#include "testutil.h"
-#if APR_HAVE_STDLIB_H
-#include <stdlib.h> /* for exit() */
-#endif
-
-static const char *progname;
-static const char *usage = "%s [xmlfile]\nIt will create "
- "a dummy XML file if none is supplied";
-/*
- * If our platform knows about the tmpnam() external buffer size, create
- * a buffer to pass in. This is needed in a threaded environment, or
- * one that thinks it is (like HP-UX).
- */
-
-#ifdef L_tmpnam
-static char tname_buf[L_tmpnam];
-#else
-static char *tname_buf = NULL;
-#endif
-
-static apr_status_t create_dummy_file_error(apr_pool_t *p, apr_file_t **fd)
+static apr_status_t create_dummy_file_error(abts_case *tc, apr_pool_t *p,
+ apr_file_t **fd)
{
- apr_status_t rv;
- char *tmpfile;
int i;
+ apr_status_t rv;
apr_off_t off = 0L;
- tmpfile = tmpnam(tname_buf);
+ char template[] = "data/testxmldummyerrorXXXXXX";
- if ((tmpfile == NULL) || (*tmpfile == '\0')) {
- fprintf(stderr, "unable to generate temporary filename\n");
- if (errno == 0) {
- errno = ENOENT;
- }
- perror("tmpnam");
- return APR_ENOENT;
- }
- rv = apr_file_open(fd, tmpfile, APR_CREATE|APR_TRUNCATE|APR_DELONCLOSE|
- APR_READ|APR_WRITE|APR_EXCL, APR_OS_DEFAULT, p);
+ rv = apr_file_mktemp(fd, template, APR_CREATE | APR_TRUNCATE | APR_DELONCLOSE |
+ APR_READ | APR_WRITE | APR_EXCL, p);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
if (rv != APR_SUCCESS)
return rv;
+
rv = apr_file_puts("<?xml version=\"1.0\" ?>\n<maryx>"
"<had a=\"little\"/><lamb its='fleece "
"was white as snow' />\n", *fd);
- if (rv != APR_SUCCESS)
- return rv;
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
for (i = 0; i < 5000; i++) {
rv = apr_file_puts("<hmm roast=\"lamb\" "
"for=\"dinner\">yummy</hmm>\n", *fd);
- if (rv != APR_SUCCESS)
- return rv;
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
}
+
rv = apr_file_puts("</mary>\n", *fd);
- if (rv != APR_SUCCESS)
- return rv;
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+
+ rv = apr_file_seek(*fd, APR_SET, &off);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
- return apr_file_seek(*fd, APR_SET, &off);
+ return rv;
}
-static apr_status_t create_dummy_file(apr_pool_t *p, apr_file_t **fd)
+static apr_status_t create_dummy_file(abts_case *tc, apr_pool_t *p,
+ apr_file_t **fd)
{
- apr_status_t rv;
- char *tmpfile;
int i;
+ apr_status_t rv;
apr_off_t off = 0L;
- tmpfile = tmpnam(tname_buf);
+ char template[] = "data/testxmldummyXXXXXX";
- if ((tmpfile == NULL) || (*tmpfile == '\0')) {
- fprintf(stderr, "unable to generate temporary filename\n");
- if (errno == 0) {
- errno = ENOENT;
- }
- perror("tmpnam");
- return APR_ENOENT;
- }
- rv = apr_file_open(fd, tmpfile, APR_CREATE|APR_TRUNCATE|APR_DELONCLOSE|
- APR_READ|APR_WRITE|APR_EXCL, APR_OS_DEFAULT, p);
+ rv = apr_file_mktemp(fd, template, APR_CREATE | APR_TRUNCATE | APR_DELONCLOSE |
+ APR_READ | APR_WRITE | APR_EXCL, p);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
if (rv != APR_SUCCESS)
return rv;
- rv = apr_file_puts("<?xml version=\"1.0\" ?>\n<mary>"
- "<had a=\"little\"/><lamb its='fleece "
- "was white as snow' />\n", *fd);
- if (rv != APR_SUCCESS)
- return rv;
+
+ rv = apr_file_puts("<?xml version=\"1.0\" ?>\n<mary>\n", *fd);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
for (i = 0; i < 5000; i++) {
rv = apr_file_puts("<hmm roast=\"lamb\" "
"for=\"dinner\">yummy</hmm>\n", *fd);
- if (rv != APR_SUCCESS)
- return rv;
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
}
+
rv = apr_file_puts("</mary>\n", *fd);
- if (rv != APR_SUCCESS)
- return rv;
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
rv = apr_file_seek(*fd, APR_SET, &off);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+
return rv;
}
-static void dump_xml(apr_xml_elem *e, int level)
+static void dump_xml(abts_case *tc, apr_xml_elem *e, int level)
{
apr_xml_attr *a;
apr_xml_elem *ec;
- printf("%d: element %s\n", level, e->name);
+ if (level == 0) {
+ ABTS_STR_EQUAL(tc, e->name, "mary");
+ } else {
+ ABTS_STR_EQUAL(tc, e->name, "hmm");
+ }
+
if (e->attr) {
a = e->attr;
- printf("%d:\tattrs\t", level);
- while (a) {
- printf("%s=%s\t", a->name, a->value);
- a = a->next;
- }
- printf("\n");
+ ABTS_PTR_NOTNULL(tc, a);
+ ABTS_STR_EQUAL(tc, a->name, "for");
+ ABTS_STR_EQUAL(tc, a->value, "dinner");
+ a = a->next;
+ ABTS_PTR_NOTNULL(tc, a);
+ ABTS_STR_EQUAL(tc, a->name, "roast");
+ ABTS_STR_EQUAL(tc, a->value, "lamb");
}
if (e->first_child) {
ec = e->first_child;
while (ec) {
- dump_xml(ec, level + 1);
+ dump_xml(tc, ec, level + 1);
ec = ec->next;
}
}
}
-static void oops(const char *s1, const char *s2, apr_status_t rv)
+static void test_xml_parser(abts_case *tc, void *data)
{
- if (progname)
- fprintf(stderr, "%s: ", progname);
- fprintf(stderr, s1, s2);
- if (rv != APR_SUCCESS) {
- char buf[120];
-
- fprintf(stderr, " (%s)", apr_strerror(rv, buf, sizeof buf));
- }
- fprintf(stderr, "\n");
- exit(1);
-}
-
-int main(int argc, const char *const * argv)
-{
- apr_pool_t *pool;
apr_file_t *fd;
apr_xml_parser *parser;
apr_xml_doc *doc;
apr_status_t rv;
- char errbuf[2000];
- char errbufXML[2000];
-
- (void) apr_initialize();
- apr_pool_create(&pool, NULL);
- progname = argv[0];
- if (argc == 1) {
- rv = create_dummy_file(pool, &fd);
- if (rv != APR_SUCCESS) {
- oops("cannot create dummy file", "oops", rv);
- }
- }
- else {
- if (argc == 2) {
- rv = apr_file_open(&fd, argv[1], APR_READ, APR_OS_DEFAULT, pool);
- if (rv != APR_SUCCESS) {
- oops("cannot open: %s", argv[1], rv);
- }
- }
- else {
- oops("usage: %s", usage, 0);
- }
- }
- rv = apr_xml_parse_file(pool, &parser, &doc, fd, 2000);
- if (rv != APR_SUCCESS) {
- fprintf(stderr, "APR Error %s\nXML Error: %s\n",
- apr_strerror(rv, errbuf, sizeof(errbuf)),
- apr_xml_parser_geterror(parser, errbufXML, sizeof(errbufXML)));
- return rv;
- }
- dump_xml(doc->root, 0);
- apr_file_close(fd);
- if (argc == 1) {
- rv = create_dummy_file_error(pool, &fd);
- if (rv != APR_SUCCESS) {
- oops("cannot create error dummy file", "oops", rv);
- }
- rv = apr_xml_parse_file(pool, &parser, &doc, fd, 2000);
- if (rv != APR_SUCCESS) {
- fprintf(stdout, "APR Error %s\nXML Error: %s "
- "(EXPECTED) This is good.\n",
- apr_strerror(rv, errbuf, sizeof(errbuf)),
- apr_xml_parser_geterror(parser, errbufXML, sizeof(errbufXML)));
- rv = APR_SUCCESS; /* reset the return code, as the test is supposed to get this error */
- }
- else {
- fprintf(stderr, "Expected an error, but didn't get one ;( ");
- return APR_EGENERAL;
- }
- }
- apr_pool_destroy(pool);
- apr_terminate();
- return rv;
+
+ rv = create_dummy_file(tc, p, &fd);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+
+ if (rv != APR_SUCCESS)
+ return;
+
+ rv = apr_xml_parse_file(p, &parser, &doc, fd, 2000);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+
+ dump_xml(tc, doc->root, 0);
+
+ rv = apr_file_close(fd);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+
+ rv = create_dummy_file_error(tc, p, &fd);
+ ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+
+ if (rv != APR_SUCCESS)
+ return;
+
+ rv = apr_xml_parse_file(p, &parser, &doc, fd, 2000);
+ ABTS_TRUE(tc, rv != APR_SUCCESS);
+}
+
+abts_suite *testxml(abts_suite *suite)
+{
+ suite = ADD_SUITE(suite);
+
+ abts_run_test(suite, test_xml_parser, NULL);
+
+ return suite;
}
diff --git a/srclib/apr-util/uri/apr_uri.c b/srclib/apr-util/uri/apr_uri.c
index 3245c19a..2a5aa3cd 100644
--- a/srclib/apr-util/uri/apr_uri.c
+++ b/srclib/apr-util/uri/apr_uri.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/xlate/xlate.c b/srclib/apr-util/xlate/xlate.c
index 5e955ef2..1ea840e9 100644
--- a/srclib/apr-util/xlate/xlate.c
+++ b/srclib/apr-util/xlate/xlate.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -310,22 +310,22 @@ APU_DECLARE(apr_status_t) apr_xlate_conv_buffer(apr_xlate_t *convset,
*/
switch (status) {
- case E2BIG: /* out of space on output */
+ case APR_BADARG: /* out of space on output */
status = 0; /* change table lookup code below if you
make this an error */
break;
- case EINVAL: /* input character not complete (yet) */
+ case APR_EINVAL: /* input character not complete (yet) */
status = APR_INCOMPLETE;
break;
- case EILSEQ: /* bad input byte */
+ case APR_BADCH: /* bad input byte */
status = APR_EINVAL;
break;
/* Sometimes, iconv is not good about setting errno. */
case 0:
- if (*inbytes_left)
+ if (inbytes_left && *inbytes_left)
status = APR_INCOMPLETE;
break;
@@ -387,8 +387,8 @@ APU_DECLARE(apr_status_t) apr_xlate_conv_buffer(apr_xlate_t *convset,
#endif
if (inbuf) {
- int to_convert = min(*inbytes_left, *outbytes_left);
- int converted = to_convert;
+ apr_size_t to_convert = min(*inbytes_left, *outbytes_left);
+ apr_size_t converted = to_convert;
char *table = convset->sbcs_table;
while (to_convert) {
diff --git a/srclib/apr-util/xml/apr_xml.c b/srclib/apr-util/xml/apr_xml.c
index dc362205..256223f4 100644
--- a/srclib/apr-util/xml/apr_xml.c
+++ b/srclib/apr-util/xml/apr_xml.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -383,7 +383,7 @@ static apr_status_t do_parse(apr_xml_parser *parser,
parser->error = APR_XML_ERROR_PARSE_DONE;
}
else {
- int rv = XML_Parse(parser->xp, data, len, is_final);
+ int rv = XML_Parse(parser->xp, data, (int)len, is_final);
if (rv == 0) {
parser->error = APR_XML_ERROR_EXPAT;
diff --git a/srclib/apr-util/xml/expat/lib/osd_ebcdic_df04_1.h b/srclib/apr-util/xml/expat/lib/osd_ebcdic_df04_1.h
index 968256ba..6f4b6b91 100644
--- a/srclib/apr-util/xml/expat/lib/osd_ebcdic_df04_1.h
+++ b/srclib/apr-util/xml/expat/lib/osd_ebcdic_df04_1.h
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/srclib/apr-util/xml/expat/lib/xml.dsp b/srclib/apr-util/xml/expat/lib/xml.dsp
index 55baa486..1c5b0676 100644
--- a/srclib/apr-util/xml/expat/lib/xml.dsp
+++ b/srclib/apr-util/xml/expat/lib/xml.dsp
@@ -4,7 +4,7 @@
# TARGTYPE "Win32 (x86) Static Library" 0x0104
-CFG=xml - Win32 Debug
+CFG=xml - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
@@ -13,12 +13,14 @@ CFG=xml - Win32 Debug
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
-!MESSAGE NMAKE /f "xml.mak" CFG="xml - Win32 Debug"
+!MESSAGE NMAKE /f "xml.mak" CFG="xml - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "xml - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "xml - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE "xml - x64 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "xml - x64 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
@@ -41,7 +43,7 @@ RSC=rc.exe
# PROP Intermediate_Dir "LibR"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FD /c
-# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D VERSION=\"expat_1.95.2\" /Fd"LibR\xml_src" /FD /c
+# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D VERSION=\"expat_1.95.2\" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\xml" /FD /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
@@ -49,7 +51,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
+# ADD LIB32 /nologo /out:"LibR\xml.lib"
!ELSEIF "$(CFG)" == "xml - Win32 Debug"
@@ -64,8 +66,8 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "LibD"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FD /c
-# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D VERSION=\"expat_1.95.2\" /Fd"LibD\xml_src" /FD /c
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FD /EHsc /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D VERSION=\"expat_1.95.2\" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\xml" /FD /EHsc /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
@@ -73,7 +75,54 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
+# ADD LIB32 /nologo /out:"LibD\xml.lib"
+
+!ELSEIF "$(CFG)" == "xml - x64 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "x64\LibR"
+# PROP BASE Intermediate_Dir "x64\LibR"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "x64\LibR"
+# PROP Intermediate_Dir "x64\LibR"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FD /c
+# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D VERSION=\"expat_1.95.2\" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\xml" /FD /c
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"x64\LibR\xml.lib"
+
+!ELSEIF "$(CFG)" == "xml - x64 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "x64\LibD"
+# PROP BASE Intermediate_Dir "x64\LibD"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "x64\LibD"
+# PROP Intermediate_Dir "x64\LibD"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FD /EHsc /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D VERSION=\"expat_1.95.2\" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\xml" /FD /EHsc /c
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"x64\LibD\xml.lib"
!ENDIF
@@ -81,6 +130,8 @@ LIB32=link.exe -lib
# Name "xml - Win32 Release"
# Name "xml - Win32 Debug"
+# Name "xml - x64 Release"
+# Name "xml - x64 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
@@ -182,6 +233,26 @@ InputPath=.\expat.h.in
# End Custom Build
+!ELSEIF "$(CFG)" == "xml - x64 Release"
+
+# Begin Custom Build - Creating expat.h from expat.h.in
+InputPath=.\expat.h.in
+
+".\expat.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\expat.h.in > .\expat.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "xml - x64 Debug"
+
+# Begin Custom Build - Creating expat.h from expat.h.in
+InputPath=.\expat.h.in
+
+".\expat.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\expat.h.in > .\expat.h
+
+# End Custom Build
+
!ENDIF
# End Source File
@@ -209,6 +280,26 @@ InputPath=.\winconfig.h
# End Custom Build
+!ELSEIF "$(CFG)" == "xml - x64 Release"
+
+# Begin Custom Build - Creating config.h from winconfig.h
+InputPath=.\winconfig.h
+
+".\config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\winconfig.h > .\config.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "xml - x64 Debug"
+
+# Begin Custom Build - Creating config.h from winconfig.h
+InputPath=.\winconfig.h
+
+".\config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\winconfig.h > .\config.h
+
+# End Custom Build
+
!ENDIF
# End Source File
diff --git a/srclib/apr/CHANGES b/srclib/apr/CHANGES
index 2d48c08e..bb9c989b 100644
--- a/srclib/apr/CHANGES
+++ b/srclib/apr/CHANGES
@@ -1,7 +1,68 @@
-*- coding: utf-8 -*-
+Changes for APR 1.2.12
+
+ *) Numerous fixes to the test/ framework, including better handling of
+ long size_t comparisons and more consistent Makefile.(in|win) setup
+ for authoring new tests. [William Rowe]
+
+ *) Win32 build fixes including a Makefile.win scheme, fixes for 64P
+ model x86_64 compiles and VC8 builds. [William Rowe]
+
+ *) Fix --disable-ipv6 build on platforms with getifaddrs().
+ PR 39199. [Joe Orton]
+
+ *) Fix DSO-related crash on z/OS caused by incorrect memory
+ allocation. [David Jones <oscaremma gmail.com>]
+
+ *) Define apr_ino_t in such a way that it doesn't change definition
+ based on the library consumer's -D'efines to the filesystem.
+ [Lucian Adrian Grijincu <lucian.grijincu gmail.com>]
+
+ *) Implement apr_atomic_casptr() for z/OS.
+ [David Jones <oscaremma gmail.com>]
+
+ *) Fill in apr_fileinfo_t member st_csize on Netware and Unix (PR 41678),
+ and refine the file times down to apr_time_t resolution if supported
+ by a st_atimensec or st_atim.tv_nsec value by the OS. Additional
+ msec implementations are possible if exposed through autoconf.
+ [William Rowe, Nicklas Edmundsson <nikke acc.umu.se>]
+
+ *) Fix apr_socket_recvfrom() to ensure the peer's port and address
+ is returned through the "from" parameter on Unix and Win32.
+ [Joe Orton, William Rowe]
+
+ *) The WIN32 cleanup routine for shared memory segments could wrongly
+ return unknown errors and leak a open handle.
+ [Joe Mudd <Joe.Mudd sas.com>]
+
+ *) apr_procattr_io_set() on Windows: Set non-blocking pipe handles
+ to a default timeout of 0, following the Unix default. No effect
+ on pipe handles configured to block. PR 43522.
+ [Eric Covener <covener gmail.com>]
+
+ *) apr_file_write() on Windows: Fix return code when writing to a non-
+ blocking pipe would have blocked. PR 43563.
+ [Eric Covener <covener gmail.com>]
+
+ *) Cause apr_file_dup2() on Win32 to update the MSVCRT psuedo-stdio
+ handles for fd-based and FILE * based I/O. [William Rowe]
+
+ *) Revert Win32 to the 1.2.8 behavior of apr_proc_create() for any
+ of the three stdio streams which are not initialized, through either
+ apr_procattr_io_set() or apr_procattr_child_XXX_set(), when given a
+ procattr_t with one or two streams which were initialized through
+ apr_procattr_child_XXX_set(). Once again, these do not inherit the
+ parent process stdio stream to WIN32 child processes (passing
+ INVALID_HANDLE_VALUE instead) as on Unix. Note APR 1.3.0 adopts
+ the Unix behavior of inheriting any uninitialized streams as the
+ parent's corresponding stdio stream, in such cases. [William Rowe]
+
Changes for APR 1.2.11
- *) Win32 apr_file_read; Correctly handle completion-based read-to-EOF.
+ *) Fix handling of EINTR from read() in apr_generate_random_bytes()
+ on platforms with /dev/random. PR 39790. [Joe Orton]
+
+ *) Win32 apr_file_read: Correctly handle completion-based read-to-EOF.
[Steven Naim <steven.naim googlemail.com>]
*) Fixed Win32 regression of stdout inheritance in apr_proc_create.
@@ -9,7 +70,7 @@ Changes for APR 1.2.11
Changes for APR 1.2.10
- *) Solve winNT inherited pipe leaks by mutexing apr_proc_create calls,
+ *) Solve WinNT inherited pipe leaks by mutexing apr_proc_create calls,
on WinNT (not WinCE, nor 9x) so that we toggle the inherited state
of the stdin/out/err pipes. All other file handles are treated as
not-inherited until apr_file_dup2'ed a std handle of this process,
diff --git a/srclib/apr/Makefile.win b/srclib/apr/Makefile.win
new file mode 100644
index 00000000..51b31652
--- /dev/null
+++ b/srclib/apr/Makefile.win
@@ -0,0 +1,176 @@
+# Makefile.win for Win32 APR alone
+#
+# Targets are:
+#
+# buildall - compile everything
+# checkall - run APR regression tests
+# install - compile everything
+# clean - mop up everything
+#
+# You can override the build mechansim, choose only one;
+#
+# USEMAK=1 - compile from exported make files
+# USEDSW=1 - compile from .dsw / .dsp VC6 projects
+# USESLN=1 - compile from converted .sln / .vcproj VC7+ files
+#
+# Define ARCH to your desired preference (your PATH must point
+# to the correct compiler tools!) Choose only one;
+#
+# ARCH="Win32 Release"
+# ARCH="Win32 Debug"
+# ARCH="Win32 ReleaseNT"
+# ARCH="Win32 DebugNT"
+# ARCH="x64 Release"
+# ARCH="x64 Debug"
+#
+# For example;
+#
+# nmake -f Makefile.win PREFIX=C:\APR buildall checkall installall clean
+#
+
+!IF EXIST("apr.sln") && ([devenv /help > NUL 2>&1] == 0) \
+ && !defined(USEMAK) && !defined(USEDSW)
+USESLN=1
+USEMAK=0
+USEDSW=0
+!ELSEIF EXIST("apr.mak") && !defined(USEDSW)
+USESLN=0
+USEMAK=1
+USEDSW=0
+!ELSE
+USESLN=0
+USEMAK=0
+USEDSW=1
+!ENDIF
+
+PREFIX=..\apr-dist
+
+!IF [$(COMSPEC) /c cl /nologo /? | find "x64" >NUL ] == 0
+ARCH=x64 Release
+!ELSE
+ARCH=Win32 Release
+!ENDIF
+
+!MESSAGE ARCH = $(ARCH)
+!MESSAGE PREFIX = $(PREFIX) (install path)
+
+
+# Utility and Translation things, nothing here for the user
+#
+!IF "$(ARCH)" == "Win32 Release"
+SLNARCH=Release|Win32
+ARCHOSPATH=Release
+LIBSOSPATH=LibR
+!ELSEIF "$(ARCH)" == "Win32 Debug"
+SLNARCH=Debug|Win32
+ARCHOSPATH=Debug
+LIBSOSPATH=LibD
+!ELSEIF "$(ARCH)" == "Win32 ReleaseNT"
+SLNARCH=ReleaseNT|Win32
+ARCHOSPATH=NT\Release
+LIBSOSPATH=NT\LibR
+!ELSEIF "$(ARCH)" == "Win32 DebugNT"
+SLNARCH=DebugNT|Win32
+ARCHOSPATH=NT\Debug
+LIBSOSPATH=NT\LibD
+!ELSEIF "$(ARCH)" == "x64 Release"
+SLNARCH=Release|x64
+ARCHOSPATH=x64\Release
+LIBSOSPATH=x64\LibR
+!ELSEIF "$(ARCH)" == "x64 Debug"
+SLNARCH=Debug|x64
+ARCHOSPATH=x64\Debug
+LIBSOSPATH=x64\LibD
+!ENDIF
+
+!IFNDEF MAKEOPT
+# Only default the behavior if MAKEOPT= is omitted
+!IFDEF _NMAKE_VER
+# Microsoft NMake options
+MAKEOPT=-nologo
+!ELSEIF "$(MAKE)" == "make"
+# Borland make options? Not really supported (yet)
+MAKEOPT=-s -N
+!ENDIF
+!ENDIF
+
+
+all: buildall checkall
+
+!IF $(USEMAK) == 1
+
+clean:
+ $(MAKE) $(MAKEOPT) -f Makefile.win ARCH="$(ARCH)" \
+ CTARGET=CLEAN buildall
+
+buildall:
+ $(MAKE) $(MAKEOPT) -f apr.mak CFG="apr - $(ARCH)" RECURSE=0 $(CTARGET)
+ $(MAKE) $(MAKEOPT) -f libapr.mak CFG="libapr - $(ARCH)" RECURSE=0 $(CTARGET)
+ cd build
+ $(MAKE) $(MAKEOPT) -f apr_app.mak CFG="apr_app - $(ARCH)" RECURSE=0 $(CTARGET)
+ $(MAKE) $(MAKEOPT) -f libapr_app.mak CFG="libapr_app - $(ARCH)" RECURSE=0 $(CTARGET)
+ cd ..
+
+!ELSEIF $(USESLN) == 1
+
+clean:
+ -devenv apr.sln /useenv /clean "$(SLNARCH)" /project libapr_app
+ -devenv apr.sln /useenv /clean "$(SLNARCH)" /project libapr
+ -devenv apr.sln /useenv /clean "$(SLNARCH)" /project apr_app
+ -devenv apr.sln /useenv /clean "$(SLNARCH)" /project apr
+
+buildall:
+ devenv apr.sln /useenv /build "$(SLNARCH)" /project apr
+ devenv apr.sln /useenv /build "$(SLNARCH)" /project apr_app
+ devenv apr.sln /useenv /build "$(SLNARCH)" /project libapr
+ devenv apr.sln /useenv /build "$(SLNARCH)" /project libapr_app
+
+!ELSE
+# $(USEDSP) == 1
+
+clean:
+ -msdev apr.dsw /USEENV /MAKE "libapr_app - $(ARCH)" /CLEAN
+ -msdev apr.dsw /USEENV /MAKE "libapr - $(ARCH)" /CLEAN
+ -msdev apr.dsw /USEENV /MAKE "apr_app - $(ARCH)" /CLEAN
+ -msdev apr.dsw /USEENV /MAKE "apr - $(ARCH)" /CLEAN
+
+buildall:
+ @msdev apr.dsw /USEENV /MAKE "apr - $(ARCH)"
+ @msdev apr.dsw /USEENV /MAKE "apr_app - $(ARCH)"
+ @msdev apr.dsw /USEENV /MAKE "libapr - $(ARCH)"
+ @msdev apr.dsw /USEENV /MAKE "libapr_app - $(ARCH)"
+
+!ENDIF
+
+
+checkapr:
+ cd test
+ $(MAKE) $(MAKEOPT) -f Makefile.win MODEL=static \
+ OUTDIR=$(LIBSOSPATH) check
+ $(MAKE) $(MAKEOPT) -f Makefile.win MODEL=dynamic \
+ OUTDIR=$(ARCHOSPATH) check
+ cd ..
+
+checkall: checkapr
+
+
+install:
+ echo Y >.y
+ echo A >.A
+ @if NOT EXIST "$(PREFIX)\." mkdir "$(PREFIX)"
+ @if NOT EXIST "$(PREFIX)\bin\." mkdir "$(PREFIX)\bin"
+ @if NOT EXIST "$(PREFIX)\include\." mkdir "$(PREFIX)\include"
+ @if NOT EXIST "$(PREFIX)\lib\." mkdir "$(PREFIX)\lib"
+ copy CHANGES "$(PREFIX)\CHANGES.txt" <.y
+ copy LICENSE "$(PREFIX)\LICENSE.txt" <.y
+ copy NOTICE "$(PREFIX)\NOTICE.txt" <.y
+ xcopy include\*.h "$(PREFIX)\include\" /d < .a
+ copy $(LIBSOSPATH)\apr-1.lib "$(PREFIX)\lib\" <.y
+ copy $(LIBSOSPATH)\apr-1.pdb "$(PREFIX)\lib\" <.y
+ copy $(ARCHOSPATH)\libapr-1.lib "$(PREFIX)\lib\" <.y
+ copy $(ARCHOSPATH)\libapr-1.exp "$(PREFIX)\lib\" <.y
+ copy $(ARCHOSPATH)\libapr-1.dll "$(PREFIX)\bin\" <.y
+ copy $(ARCHOSPATH)\libapr-1.pdb "$(PREFIX)\bin\" <.y
+ del .y
+ del .a
+
diff --git a/srclib/apr/apr.dsp b/srclib/apr/apr.dsp
index d1c1b29c..c19e30d7 100644
--- a/srclib/apr/apr.dsp
+++ b/srclib/apr/apr.dsp
@@ -4,7 +4,7 @@
# TARGTYPE "Win32 (x86) Static Library" 0x0104
-CFG=apr - Win32 Debug
+CFG=apr - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
@@ -13,12 +13,16 @@ CFG=apr - Win32 Debug
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
-!MESSAGE NMAKE /f "apr.mak" CFG="apr - Win32 Debug"
+!MESSAGE NMAKE /f "apr.mak" CFG="apr - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "apr - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "apr - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE "apr - Win32 ReleaseNT" (based on "Win32 (x86) Static Library")
+!MESSAGE "apr - Win32 DebugNT" (based on "Win32 (x86) Static Library")
+!MESSAGE "apr - x64 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "apr - x64 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
@@ -41,7 +45,7 @@ RSC=rc.exe
# PROP Intermediate_Dir "LibR"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
-# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "_WINDOWS" /Fd"LibR\apr_src" /FD /c
+# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\apr-1" /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
@@ -64,8 +68,8 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "LibD"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
-# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "_WINDOWS" /Fd"LibD\apr_src" /FD /c
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\apr-1" /FD /EHsc /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
@@ -75,12 +79,110 @@ LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"LibD\apr-1.lib"
+!ELSEIF "$(CFG)" == "apr - Win32 ReleaseNT"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "NT\LibR"
+# PROP BASE Intermediate_Dir "NT\LibR"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "NT\LibR"
+# PROP Intermediate_Dir "NT\LibR"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "WINNT" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\apr-1" /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"NT\LibR\apr-1.lib"
+
+!ELSEIF "$(CFG)" == "apr - Win32 DebugNT"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "NT\LibD"
+# PROP BASE Intermediate_Dir "NT\LibD"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "NT\LibD"
+# PROP Intermediate_Dir "NT\LibD"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "WINNT" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\apr-1" /FD /EHsc /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"NT\LibD\apr-1.lib"
+
+!ELSEIF "$(CFG)" == "apr - x64 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "x64\LibR"
+# PROP BASE Intermediate_Dir "x64\LibR"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "x64\LibR"
+# PROP Intermediate_Dir "x64\LibR"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "WINNT" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\apr-1" /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"x64\LibR\apr-1.lib"
+
+!ELSEIF "$(CFG)" == "apr - x64 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "x64\LibD"
+# PROP BASE Intermediate_Dir "x64\LibD"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "x64\LibD"
+# PROP Intermediate_Dir "x64\LibD"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "WINNT" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\apr-1" /FD /EHsc /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"x64\LibD\apr-1.lib"
+
!ENDIF
# Begin Target
# Name "apr - Win32 Release"
# Name "apr - Win32 Debug"
+# Name "apr - Win32 ReleaseNT"
+# Name "apr - Win32 DebugNT"
+# Name "apr - x64 Release"
+# Name "apr - x64 Debug"
# Begin Group "Source Files"
# PROP Default_Filter ".c"
@@ -274,10 +376,6 @@ SOURCE=.\network_io\unix\inet_pton.c
# End Source File
# Begin Source File
-SOURCE=.\poll\unix\select.c
-# End Source File
-# Begin Source File
-
SOURCE=.\network_io\unix\multicast.c
# End Source File
# Begin Source File
@@ -305,6 +403,14 @@ SOURCE=.\network_io\win32\sockopt.c
SOURCE=.\passwd\apr_getpass.c
# End Source File
# End Group
+# Begin Group "poll"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\poll\unix\select.c
+# End Source File
+# End Group
# Begin Group "random"
# PROP Default_Filter ""
@@ -507,6 +613,46 @@ InputPath=.\include\apr.hw
# End Custom Build
+!ELSEIF "$(CFG)" == "apr - Win32 ReleaseNT"
+
+# Begin Custom Build - Creating apr.h from apr.hw
+InputPath=.\include\apr.hw
+
+".\include\apr.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apr.hw > .\include\apr.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "apr - Win32 DebugNT"
+
+# Begin Custom Build - Creating apr.h from apr.hw
+InputPath=.\include\apr.hw
+
+".\include\apr.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apr.hw > .\include\apr.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "apr - x64 Release"
+
+# Begin Custom Build - Creating apr.h from apr.hw
+InputPath=.\include\apr.hw
+
+".\include\apr.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apr.hw > .\include\apr.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "apr - x64 Debug"
+
+# Begin Custom Build - Creating apr.h from apr.hw
+InputPath=.\include\apr.hw
+
+".\include\apr.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apr.hw > .\include\apr.h
+
+# End Custom Build
+
!ENDIF
# End Source File
@@ -592,6 +738,10 @@ SOURCE=.\include\apr_proc_mutex.h
# End Source File
# Begin Source File
+SOURCE=.\include\apr_random.h
+# End Source File
+# Begin Source File
+
SOURCE=.\include\apr_ring.h
# End Source File
# Begin Source File
diff --git a/srclib/apr/apr.dsw b/srclib/apr/apr.dsw
index dc0871bb..6d67f340 100644
--- a/srclib/apr/apr.dsw
+++ b/srclib/apr/apr.dsw
@@ -15,7 +15,7 @@ Package=<4>
###############################################################################
-Project: "apr_app"=".\build\apr_app.dsp" - Package Owner=<4>
+Project: "aprapp"=".\build\aprapp.dsp" - Package Owner=<4>
Package=<5>
{{{
@@ -24,7 +24,7 @@ Package=<5>
Package=<4>
{{{
Begin Project Dependency
- Project_Dep_Name apr
+ Project_Dep_Name preaprapp
End Project Dependency
}}}
@@ -42,7 +42,37 @@ Package=<4>
###############################################################################
-Project: "libapr_app"=".\build\libapr_app.dsp" - Package Owner=<4>
+Project: "libaprapp"=".\build\libaprapp.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name prelibaprapp
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "preaprapp"=".\build\preaprapp.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name apr
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "prelibaprapp"=".\build\prelibaprapp.dsp" - Package Owner=<4>
Package=<5>
{{{
diff --git a/srclib/apr/atomic/os390/atomic.c b/srclib/apr/atomic/os390/atomic.c
index 35ddf1c2..3c57668b 100644
--- a/srclib/apr/atomic/os390/atomic.c
+++ b/srclib/apr/atomic/os390/atomic.c
@@ -82,6 +82,30 @@ apr_uint32_t apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t swap,
return old; /* old is automatically updated from mem on cs failure */
}
+#if APR_SIZEOF_VOIDP == 4
+void *apr_atomic_casptr(volatile void **mem_ptr,
+ void *swap_ptr,
+ const void *cmp_ptr)
+{
+ __cs1(&cmp_ptr, /* automatically updated from mem on __cs1 failure */
+ mem_ptr, /* set from swap when __cs1 succeeds */
+ &swap_ptr);
+ return (void *)cmp_ptr;
+}
+#elif APR_SIZEOF_VOIDP == 8
+void *apr_atomic_casptr(volatile void **mem_ptr,
+ void *swap_ptr,
+ const void *cmp_ptr)
+{
+ __csg(&cmp_ptr, /* automatically updated from mem on __csg failure */
+ mem_ptr, /* set from swap when __csg succeeds */
+ &swap_ptr);
+ return (void *)cmp_ptr;
+}
+#else
+#error APR_SIZEOF_VOIDP value not supported
+#endif /* APR_SIZEOF_VOIDP */
+
apr_uint32_t apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val)
{
apr_uint32_t old, new_val;
diff --git a/srclib/apr/atomic/win32/apr_atomic.c b/srclib/apr/atomic/win32/apr_atomic.c
index 9393fcb0..42c19876 100644
--- a/srclib/apr/atomic/win32/apr_atomic.c
+++ b/srclib/apr/atomic/win32/apr_atomic.c
@@ -106,7 +106,7 @@ APR_DECLARE(apr_uint32_t) apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint3
APR_DECLARE(void *) apr_atomic_casptr(volatile void **mem, void *with, const void *cmp)
{
#if (defined(_M_IA64) || defined(_M_AMD64)) && !defined(RC_INVOKED)
- return InterlockedCompareExchangePointer(mem, with, cmp);
+ return InterlockedCompareExchangePointer((void* volatile*)mem, with, (void *)cmp);
#else
/* Too many VC6 users have stale win32 API files, stub this */
return ((apr_atomic_win32_ptr_ptr_ptr_fn)InterlockedCompareExchange)(mem, with, cmp);
diff --git a/srclib/apr/build/NWGNUmakefile b/srclib/apr/build/NWGNUmakefile
index b8c94ce1..84ed7fed 100644
--- a/srclib/apr/build/NWGNUmakefile
+++ b/srclib/apr/build/NWGNUmakefile
@@ -56,13 +56,13 @@ $(APR)/include/%.h: $(subst /,\,$(APR))\include\%.hnw
@echo Creating $(subst /,\,$@)
copy $< $(subst /,\,$(APR))\include\$(@F)
-$(APRUTIL)/include/%.h: $(subst /,\,$(APRUTIL))\include\%.hnw
+$(APRUTIL)/include/private/%.h: $(subst /,\,$(APRUTIL))\include\private\%.hnw
@echo Creating $(subst /,\,$@)
- copy $< $(subst /,\,$(APRUTIL))\include\$(@F)
+ copy $< $(subst /,\,$(APRUTIL))\include\private\$(@F)
-$(APRUTIL)/include/private/%.h: $(subst /,\,$(APRUTIL))\include\private\%.hw
+$(APRUTIL)/include/%.h: $(subst /,\,$(APRUTIL))\include\%.hnw
@echo Creating $(subst /,\,$@)
- copy $< $(subst /,\,$(APRUTIL))\include\private\$(@F)
+ copy $< $(subst /,\,$(APRUTIL))\include\$(@F)
$(APRUTIL)/xml/expat/lib/%.h: $(subst /,\,$(APRUTIL))\xml\expat\lib\%.hnw
@echo Creating $(subst /,\,$@)
diff --git a/srclib/apr/build/apr_app.dsp b/srclib/apr/build/apr_app.dsp
index ac060a50..1b41f958 100644
--- a/srclib/apr/build/apr_app.dsp
+++ b/srclib/apr/build/apr_app.dsp
@@ -4,7 +4,7 @@
# TARGTYPE "Win32 (x86) Static Library" 0x0104
-CFG=apr_app - Win32 Debug
+CFG=apr_app - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
@@ -13,12 +13,16 @@ CFG=apr_app - Win32 Debug
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
-!MESSAGE NMAKE /f "apr_app.mak" CFG="apr_app - Win32 Debug"
+!MESSAGE NMAKE /f "apr_app.mak" CFG="apr_app - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "apr_app - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "apr_app - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE "apr_app - Win32 ReleaseNT" (based on "Win32 (x86) Static Library")
+!MESSAGE "apr_app - Win32 DebugNT" (based on "Win32 (x86) Static Library")
+!MESSAGE "apr_app - x64 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "apr_app - x64 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
@@ -41,7 +45,7 @@ RSC=rc.exe
# PROP Intermediate_Dir "LibR"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
-# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /D "APR_DECLARE_STATIC" /Fd"LibR\apr_app_src" /FD /c
+# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /D "APR_DECLARE_STATIC" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\apr_app-1" /FD /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
@@ -65,7 +69,7 @@ LIB32=link.exe -lib
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
-# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /D "APR_DECLARE_STATIC" /Fd"LibD\apr_app_src" /FD /c
+# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /D "APR_DECLARE_STATIC" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\apr_app-1" /FD /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
@@ -75,12 +79,110 @@ LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"LibD\apr_app-1.lib"
+!ELSEIF "$(CFG)" == "apr_app - Win32 ReleaseNT"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "NT\LibR"
+# PROP BASE Intermediate_Dir "NT\LibR"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "NT\LibR"
+# PROP Intermediate_Dir "NT\LibR"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "NDEBUG" /D "WINNT" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /D "APR_DECLARE_STATIC" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\apr_app-1" /FD /c
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"NT\LibR\apr_app-1.lib"
+
+!ELSEIF "$(CFG)" == "apr_app - Win32 DebugNT"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "NT\LibD"
+# PROP BASE Intermediate_Dir "NT\LibD"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "NT\LibD"
+# PROP Intermediate_Dir "NT\LibD"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "_DEBUG" /D "WINNT" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /D "APR_DECLARE_STATIC" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\apr_app-1" /FD /c
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"NT\LibD\apr_app-1.lib"
+
+!ELSEIF "$(CFG)" == "apr_app - x64 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "x64\LibR"
+# PROP BASE Intermediate_Dir "x64\LibR"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "x64\LibR"
+# PROP Intermediate_Dir "x64\LibR"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "NDEBUG" /D "WINNT" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /D "APR_DECLARE_STATIC" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\apr_app-1" /FD /c
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"x64\LibR\apr_app-1.lib"
+
+!ELSEIF "$(CFG)" == "apr_app - x64 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "x64\LibD"
+# PROP BASE Intermediate_Dir "x64\LibD"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "x64\LibD"
+# PROP Intermediate_Dir "x64\LibD"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "_DEBUG" /D "WINNT" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /D "APR_DECLARE_STATIC" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\apr_app-1" /FD /c
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"x64\LibD\apr_app-1.lib"
+
!ENDIF
# Begin Target
# Name "apr_app - Win32 Release"
# Name "apr_app - Win32 Debug"
+# Name "apr_app - Win32 ReleaseNT"
+# Name "apr_app - Win32 DebugNT"
+# Name "apr_app - x64 Release"
+# Name "apr_app - x64 Debug"
# Begin Source File
SOURCE=..\misc\win32\apr_app.c
diff --git a/srclib/apr/build/apr_common.m4 b/srclib/apr/build/apr_common.m4
index 90793ee1..caae9bfa 100644
--- a/srclib/apr/build/apr_common.m4
+++ b/srclib/apr/build/apr_common.m4
@@ -959,3 +959,19 @@ fi
AC_SUBST(MKDEP)
])
+
+dnl
+dnl APR_CHECK_TYPES_COMPATIBLE(TYPE-1, TYPE-2, [ACTION-IF-TRUE])
+dnl
+dnl Try to determine whether two types are the same. Only works
+dnl for gcc and icc.
+dnl
+AC_DEFUN([APR_CHECK_TYPES_COMPATIBLE], [
+define([apr_cvname], apr_cv_typematch_[]translit([$1], [ ], [_])_[]translit([$2], [ ], [_]))
+AC_CACHE_CHECK([whether $1 and $2 are the same], apr_cvname, [
+AC_TRY_COMPILE(AC_INCLUDES_DEFAULT, [
+ int foo[0 - !__builtin_types_compatible_p($1, $2)];
+], [apr_cvname=yes
+$3], [apr_cvname=no])])
+])
+
diff --git a/srclib/apr/build/libapr_app.dsp b/srclib/apr/build/libapr_app.dsp
index 0cd962e5..b6ce86aa 100644
--- a/srclib/apr/build/libapr_app.dsp
+++ b/srclib/apr/build/libapr_app.dsp
@@ -4,7 +4,7 @@
# TARGTYPE "Win32 (x86) Static Library" 0x0104
-CFG=libapr_app - Win32 Debug
+CFG=libapr_app - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
@@ -13,12 +13,16 @@ CFG=libapr_app - Win32 Debug
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
-!MESSAGE NMAKE /f "libapr_app.mak" CFG="libapr_app - Win32 Debug"
+!MESSAGE NMAKE /f "libapr_app.mak" CFG="libapr_app - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "libapr_app - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "libapr_app - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE "libapr_app - Win32 ReleaseNT" (based on "Win32 (x86) Static Library")
+!MESSAGE "libapr_app - Win32 DebugNT" (based on "Win32 (x86) Static Library")
+!MESSAGE "libapr_app - x64 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "libapr_app - x64 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
@@ -41,7 +45,7 @@ RSC=rc.exe
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
-# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /Fd"Release\libapr_app_src" /FD /c
+# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\libapr_app-1" /FD /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
@@ -65,7 +69,7 @@ LIB32=link.exe -lib
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
-# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /Fd"Debug\libapr_app_src" /FD /c
+# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\libapr_app-1" /FD /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
@@ -75,12 +79,110 @@ LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"Debug\libapr_app-1.lib"
+!ELSEIF "$(CFG)" == "libapr_app - Win32 ReleaseNT"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "NT\Release"
+# PROP BASE Intermediate_Dir "NT\Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "NT\Release"
+# PROP Intermediate_Dir "NT\Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "NDEBUG" /D "WINNT" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\libapr_app-1" /FD /c
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"NT\Release\libapr_app-1.lib"
+
+!ELSEIF "$(CFG)" == "libapr_app - Win32 DebugNT"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "NT\Debug"
+# PROP BASE Intermediate_Dir "NT\Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "NT\Debug"
+# PROP Intermediate_Dir "NT\Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "_DEBUG" /D "WINNT" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\libapr_app-1" /FD /c
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"NT\Debug\libapr_app-1.lib"
+
+!ELSEIF "$(CFG)" == "libapr_app - x64 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "x64\Release"
+# PROP BASE Intermediate_Dir "x64\Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "x64\Release"
+# PROP Intermediate_Dir "x64\Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "NDEBUG" /D "WINNT" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\libapr_app-1" /FD /c
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"x64\Release\libapr_app-1.lib"
+
+!ELSEIF "$(CFG)" == "libapr_app - x64 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "x64\Debug"
+# PROP BASE Intermediate_Dir "x64\Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "x64\Debug"
+# PROP Intermediate_Dir "x64\Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../include" /I "../include/arch" /I "../include/arch/win32" /I "../include/arch/unix" /D "_DEBUG" /D "WINNT" /D "WIN32" /D "_WINDOWS" /D "APR_APP" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\libapr_app-1" /FD /c
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"x64\Debug\libapr_app-1.lib"
+
!ENDIF
# Begin Target
# Name "libapr_app - Win32 Release"
# Name "libapr_app - Win32 Debug"
+# Name "libapr_app - Win32 ReleaseNT"
+# Name "libapr_app - Win32 DebugNT"
+# Name "libapr_app - x64 Release"
+# Name "libapr_app - x64 Debug"
# Begin Source File
SOURCE=..\misc\win32\apr_app.c
diff --git a/srclib/apr/configure b/srclib/apr/configure
index 1745dc52..c7afc0d7 100755
--- a/srclib/apr/configure
+++ b/srclib/apr/configure
@@ -943,6 +943,7 @@ uint64_literal
stdint
bigendian
aprlfs
+ino_t_value
have_strnicmp
have_strncasecmp
have_stricmp
@@ -2230,6 +2231,9 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
## Free Software Foundation, Inc.
@@ -9539,7 +9543,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 9542 "configure"' > conftest.$ac_ext
+ echo '#line 9546 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -11857,11 +11861,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11860: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11864: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11864: \$? = $ac_status" >&5
+ echo "$as_me:11868: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -12125,11 +12129,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12128: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12132: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:12132: \$? = $ac_status" >&5
+ echo "$as_me:12136: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -12229,11 +12233,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12232: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12236: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:12236: \$? = $ac_status" >&5
+ echo "$as_me:12240: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14681,7 +14685,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 14684 "configure"
+#line 14688 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -14781,7 +14785,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 14784 "configure"
+#line 14788 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -17153,11 +17157,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:17156: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17160: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:17160: \$? = $ac_status" >&5
+ echo "$as_me:17164: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -17257,11 +17261,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:17260: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17264: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:17264: \$? = $ac_status" >&5
+ echo "$as_me:17268: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -18827,11 +18831,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18830: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18834: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:18834: \$? = $ac_status" >&5
+ echo "$as_me:18838: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -18931,11 +18935,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18934: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18938: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:18938: \$? = $ac_status" >&5
+ echo "$as_me:18942: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -21165,11 +21169,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:21168: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:21172: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:21172: \$? = $ac_status" >&5
+ echo "$as_me:21176: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -21433,11 +21437,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:21436: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:21440: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:21440: \$? = $ac_status" >&5
+ echo "$as_me:21444: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -21537,11 +21541,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:21540: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:21544: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:21544: \$? = $ac_status" >&5
+ echo "$as_me:21548: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -24818,7 +24822,7 @@ INSTALL_SUBDIRS="none"
OBJECTS_PLATFORM='$(OBJECTS_unix)'
case $host in
- i386-ibm-aix* | *-ibm-aix1-2.* | *-ibm-aix3.* | *-ibm-aix4.1 | *-ibm-aix4.1.* | *-ibm-aix4.2 | *-ibm-aix4.2.*)
+ i386-ibm-aix* | *-ibm-aix[1-2].* | *-ibm-aix3.* | *-ibm-aix4.1 | *-ibm-aix4.1.* | *-ibm-aix4.2 | *-ibm-aix4.2.*)
OSDIR="aix"
if test "x$LDFLAGS" = "x"; then
@@ -31133,6 +31137,10 @@ _ACEOF
sendfile="0"
fi
;;
+ *darwin*)
+ # darwin semantics in 9.0.0 appear to be fubar
+ sendfile="0"
+ ;;
esac
if test "$orig_sendfile" != "$sendfile"; then
echo "sendfile support disabled to avoid system problem"
@@ -32374,243 +32382,6 @@ _ACEOF
fi
-{ echo "$as_me:$LINENO: checking for inode member of struct dirent" >&5
-echo $ECHO_N "checking for inode member of struct dirent... $ECHO_C" >&6; }
-if test "${apr_cv_dirent_inode+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-apr_cv_dirent_inode=no
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-#include <sys/types.h>
-#include <dirent.h>
-
-int
-main ()
-{
-
-#ifdef d_ino
-#undef d_ino
-#endif
-struct dirent de; de.d_fileno;
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- apr_cv_dirent_inode=d_fileno
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-if test "$apr_cv_dirent_inode" = "no"; then
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-#include <sys/types.h>
-#include <dirent.h>
-
-int
-main ()
-{
-
-#ifdef d_fileno
-#undef d_fileno
-#endif
-struct dirent de; de.d_ino;
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- apr_cv_dirent_inode=d_ino
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-fi
-{ echo "$as_me:$LINENO: result: $apr_cv_dirent_inode" >&5
-echo "${ECHO_T}$apr_cv_dirent_inode" >&6; }
-if test "$apr_cv_dirent_inode" != "no"; then
-
-cat >>confdefs.h <<_ACEOF
-#define DIRENT_INODE $apr_cv_dirent_inode
-_ACEOF
-
-fi
-
-
-{ echo "$as_me:$LINENO: checking for file type member of struct dirent" >&5
-echo $ECHO_N "checking for file type member of struct dirent... $ECHO_C" >&6; }
-if test "${apr_cv_dirent_type+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-apr_cv_dirent_type=no
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-#include <sys/types.h>
-#include <dirent.h>
-
-int
-main ()
-{
-
-struct dirent de; de.d_type = DT_REG;
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- apr_cv_dirent_type=d_type
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ echo "$as_me:$LINENO: result: $apr_cv_dirent_type" >&5
-echo "${ECHO_T}$apr_cv_dirent_type" >&6; }
-if test "$apr_cv_dirent_type" != "no"; then
-
-cat >>confdefs.h <<_ACEOF
-#define DIRENT_TYPE $apr_cv_dirent_type
-_ACEOF
-
-fi
-
-
{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
if test "${ac_cv_header_stdc+set}" = set; then
@@ -32867,6 +32638,7 @@ fi
+
for ac_header in alloca.h \
ByteOrder.h \
conio.h \
@@ -32914,6 +32686,7 @@ for ac_header in alloca.h \
sys/file.h \
sys/ioctl.h \
sys/mman.h \
+ sys/param.h \
sys/poll.h \
sys/resource.h \
sys/select.h \
@@ -33139,6 +32912,7 @@ for aprt_i in alloca.h \
sys/file.h \
sys/ioctl.h \
sys/mman.h \
+ sys/param.h \
sys/poll.h \
sys/resource.h \
sys/select.h \
@@ -37733,6 +37507,96 @@ fi
{ echo "$as_me:$LINENO: result: $off_t_value" >&5
echo "${ECHO_T}$off_t_value" >&6; }
+# Regardless of whether _LARGEFILE64_SOURCE is used, on 32-bit
+# platforms _FILE_OFFSET_BITS will affect the size of ino_t and hence
+# the build-time ABI may be different from the apparent ABI when using
+# APR with another package which *does* define _FILE_OFFSET_BITS.
+# (Exactly as per the case above with off_t where LFS is *not* used)
+#
+# To be safe, hard-code apr_ino_t as 'unsigned long' iff that is
+# exactly the size of ino_t here; otherwise use ino_t as existing
+# releases did. To be correct, apr_ino_t should have been made an
+# ino64_t as apr_off_t is off64_t, but this can't be done now without
+# breaking ABI.
+ino_t_value=ino_t
+if test "$ac_cv_sizeof_long" = "4"; then
+
+
+{ echo "$as_me:$LINENO: checking whether ino_t and unsigned long are the same" >&5
+echo $ECHO_N "checking whether ino_t and unsigned long are the same... $ECHO_C" >&6; }
+if test "${apr_cv_typematch_ino_t_unsigned_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ int foo[0 - !__builtin_types_compatible_p(ino_t, unsigned long)];
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ apr_cv_typematch_ino_t_unsigned_long=yes
+ino_t_value="unsigned long"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ apr_cv_typematch_ino_t_unsigned_long=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $apr_cv_typematch_ino_t_unsigned_long" >&5
+echo "${ECHO_T}$apr_cv_typematch_ino_t_unsigned_long" >&6; }
+
+fi
+{ echo "$as_me:$LINENO: using $ino_t_value for ino_t" >&5
+echo "$as_me: using $ino_t_value for ino_t" >&6;}
+
{ echo "$as_me:$LINENO: checking size of pid_t" >&5
echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
if test "${ac_cv_sizeof_pid_t+set}" = set; then
@@ -38124,7 +37988,7 @@ case $host in
;;
*aix4*|*aix5*)
ssize_t_fmt='#define APR_SSIZE_T_FMT "ld"'
- size_t_fmt='#define APR_SIZE_T_FMT "ld"'
+ size_t_fmt='#define APR_SIZE_T_FMT "lu"'
;;
*beos*)
ssize_t_fmt='#define APR_SSIZE_T_FMT "ld"'
@@ -38133,7 +37997,7 @@ case $host in
*apple-darwin*)
osver=`uname -r`
case $osver in
- 0-7.*)
+ [0-7].*)
ssize_t_fmt='#define APR_SSIZE_T_FMT "d"'
;;
*)
@@ -38167,6 +38031,7 @@ esac
+
for ac_func in strnicmp
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -39203,8 +39068,11 @@ fi
if test "$dsotype" = "any"; then
- # Darwin:
- { echo "$as_me:$LINENO: checking for NSLinkModule" >&5
+ if test "$dsotype" = "any"; then
+ case $host in
+ *darwin[0-8]\.*)
+ # Original Darwin, not for 9.0!:
+ { echo "$as_me:$LINENO: checking for NSLinkModule" >&5
echo $ECHO_N "checking for NSLinkModule... $ECHO_C" >&6; }
if test "${ac_cv_func_NSLinkModule+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -39304,10 +39172,11 @@ echo "${ECHO_T}$ac_cv_func_NSLinkModule" >&6; }
if test $ac_cv_func_NSLinkModule = yes; then
dsotype=dyld
fi
-
- if test "$dsotype" = "any"; then
- # Original HP-UX:
- { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+;;
+ *-hpux[1-9]\.*|*-hpux1[01]*)
+ # shl is specific to hpux(?), and is suboptimal for 64 bit builds,
+ # and most unlikely to be the choice of 12.x developers.
+ { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
if test "${ac_cv_lib_dld_shl_load+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -39385,7 +39254,11 @@ fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
if test $ac_cv_lib_dld_shl_load = yes; then
- dsotype=shl;
+ have_shl=1
+fi
+
+ if test "$ac_cv_sizeof_voidp$have_shl" = "41"; then
+ dsotype=shl;
if test "x$LIBS" = "x"; then
test "x$silent" != "xyes" && echo " setting LIBS to \"-ldld\""
LIBS="-ldld"
@@ -39406,8 +39279,15 @@ if test $ac_cv_lib_dld_shl_load = yes; then
done
fi
-fi
-
+ fi;;
+ *-os2*)
+ # several 'other's below probably belong up here. If they always
+ # use a platform implementation and shouldn't test the dlopen/dlfcn
+ # features, then bring them up here.
+ # But if they -should- optionally use dlfcn, and/or need the config
+ # detection of dlopen/dlsym, do not move them up.
+ dsotype=other ;;
+ esac
fi
# Normal POSIX:
if test "$dsotype" = "any"; then
@@ -39912,7 +39792,33 @@ fi
# Everything else:
if test "$dsotype" = "any"; then
case $host in
- *os390|*-os2*|*os400|*-aix*) dsotype=other ;;
+ *os390|*os400|*-aix*)
+ # Some -aix5 will use dl, no hassles. Keep that pattern here.
+ dsotype=other ;;
+ *-hpux*)
+ if test "$have_shl" = "1"; then
+ dsotype=shl;
+ if test "x$LIBS" = "x"; then
+ test "x$silent" != "xyes" && echo " setting LIBS to \"-ldld\""
+ LIBS="-ldld"
+ else
+ apr_addto_bugger="-ldld"
+ for i in $apr_addto_bugger; do
+ apr_addto_duplicate="0"
+ for j in $LIBS; do
+ if test "x$i" = "x$j"; then
+ apr_addto_duplicate="1"
+ break
+ fi
+ done
+ if test $apr_addto_duplicate = "0"; then
+ test "x$silent" != "xyes" && echo " adding \"$i\" to LIBS"
+ LIBS="$LIBS $i"
+ fi
+ done
+ fi
+
+ fi;;
esac
fi
fi
@@ -41996,6 +41902,1797 @@ fi
+echo "${nl}Checking for File Info Support..."
+{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
+echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
+if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+int
+main ()
+{
+static struct stat ac_aggr;
+if (ac_aggr.st_blocks)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_stat_st_blocks=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+int
+main ()
+{
+static struct stat ac_aggr;
+if (sizeof ac_aggr.st_blocks)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_stat_st_blocks=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_member_struct_stat_st_blocks=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
+echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
+if test $ac_cv_member_struct_stat_st_blocks = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_BLOCKS 1
+_ACEOF
+
+
+fi
+{ echo "$as_me:$LINENO: checking for struct stat.st_atimensec" >&5
+echo $ECHO_N "checking for struct stat.st_atimensec... $ECHO_C" >&6; }
+if test "${ac_cv_member_struct_stat_st_atimensec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+int
+main ()
+{
+static struct stat ac_aggr;
+if (ac_aggr.st_atimensec)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_stat_st_atimensec=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+int
+main ()
+{
+static struct stat ac_aggr;
+if (sizeof ac_aggr.st_atimensec)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_stat_st_atimensec=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_member_struct_stat_st_atimensec=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_atimensec" >&5
+echo "${ECHO_T}$ac_cv_member_struct_stat_st_atimensec" >&6; }
+if test $ac_cv_member_struct_stat_st_atimensec = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
+_ACEOF
+
+
+fi
+{ echo "$as_me:$LINENO: checking for struct stat.st_ctimensec" >&5
+echo $ECHO_N "checking for struct stat.st_ctimensec... $ECHO_C" >&6; }
+if test "${ac_cv_member_struct_stat_st_ctimensec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+int
+main ()
+{
+static struct stat ac_aggr;
+if (ac_aggr.st_ctimensec)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_stat_st_ctimensec=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+int
+main ()
+{
+static struct stat ac_aggr;
+if (sizeof ac_aggr.st_ctimensec)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_stat_st_ctimensec=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_member_struct_stat_st_ctimensec=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_ctimensec" >&5
+echo "${ECHO_T}$ac_cv_member_struct_stat_st_ctimensec" >&6; }
+if test $ac_cv_member_struct_stat_st_ctimensec = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_CTIMENSEC 1
+_ACEOF
+
+
+fi
+{ echo "$as_me:$LINENO: checking for struct stat.st_mtimensec" >&5
+echo $ECHO_N "checking for struct stat.st_mtimensec... $ECHO_C" >&6; }
+if test "${ac_cv_member_struct_stat_st_mtimensec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+int
+main ()
+{
+static struct stat ac_aggr;
+if (ac_aggr.st_mtimensec)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_stat_st_mtimensec=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+int
+main ()
+{
+static struct stat ac_aggr;
+if (sizeof ac_aggr.st_mtimensec)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_stat_st_mtimensec=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_member_struct_stat_st_mtimensec=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_mtimensec" >&5
+echo "${ECHO_T}$ac_cv_member_struct_stat_st_mtimensec" >&6; }
+if test $ac_cv_member_struct_stat_st_mtimensec = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_MTIMENSEC 1
+_ACEOF
+
+
+fi
+{ echo "$as_me:$LINENO: checking for struct stat.st_atim.tv_nsec" >&5
+echo $ECHO_N "checking for struct stat.st_atim.tv_nsec... $ECHO_C" >&6; }
+if test "${ac_cv_member_struct_stat_st_atim_tv_nsec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+int
+main ()
+{
+static struct stat ac_aggr;
+if (ac_aggr.st_atim.tv_nsec)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_stat_st_atim_tv_nsec=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+int
+main ()
+{
+static struct stat ac_aggr;
+if (sizeof ac_aggr.st_atim.tv_nsec)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_stat_st_atim_tv_nsec=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_member_struct_stat_st_atim_tv_nsec=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_atim_tv_nsec" >&5
+echo "${ECHO_T}$ac_cv_member_struct_stat_st_atim_tv_nsec" >&6; }
+if test $ac_cv_member_struct_stat_st_atim_tv_nsec = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
+_ACEOF
+
+
+fi
+{ echo "$as_me:$LINENO: checking for struct stat.st_ctim.tv_nsec" >&5
+echo $ECHO_N "checking for struct stat.st_ctim.tv_nsec... $ECHO_C" >&6; }
+if test "${ac_cv_member_struct_stat_st_ctim_tv_nsec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+int
+main ()
+{
+static struct stat ac_aggr;
+if (ac_aggr.st_ctim.tv_nsec)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_stat_st_ctim_tv_nsec=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+int
+main ()
+{
+static struct stat ac_aggr;
+if (sizeof ac_aggr.st_ctim.tv_nsec)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_stat_st_ctim_tv_nsec=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_member_struct_stat_st_ctim_tv_nsec=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_ctim_tv_nsec" >&5
+echo "${ECHO_T}$ac_cv_member_struct_stat_st_ctim_tv_nsec" >&6; }
+if test $ac_cv_member_struct_stat_st_ctim_tv_nsec = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_CTIM_TV_NSEC 1
+_ACEOF
+
+
+fi
+{ echo "$as_me:$LINENO: checking for struct stat.st_mtim.tv_nsec" >&5
+echo $ECHO_N "checking for struct stat.st_mtim.tv_nsec... $ECHO_C" >&6; }
+if test "${ac_cv_member_struct_stat_st_mtim_tv_nsec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+int
+main ()
+{
+static struct stat ac_aggr;
+if (ac_aggr.st_mtim.tv_nsec)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_stat_st_mtim_tv_nsec=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+int
+main ()
+{
+static struct stat ac_aggr;
+if (sizeof ac_aggr.st_mtim.tv_nsec)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_stat_st_mtim_tv_nsec=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_member_struct_stat_st_mtim_tv_nsec=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_mtim_tv_nsec" >&5
+echo "${ECHO_T}$ac_cv_member_struct_stat_st_mtim_tv_nsec" >&6; }
+if test $ac_cv_member_struct_stat_st_mtim_tv_nsec = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1
+_ACEOF
+
+
+fi
+{ echo "$as_me:$LINENO: checking for struct stat.st_atime_n" >&5
+echo $ECHO_N "checking for struct stat.st_atime_n... $ECHO_C" >&6; }
+if test "${ac_cv_member_struct_stat_st_atime_n+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+int
+main ()
+{
+static struct stat ac_aggr;
+if (ac_aggr.st_atime_n)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_stat_st_atime_n=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+int
+main ()
+{
+static struct stat ac_aggr;
+if (sizeof ac_aggr.st_atime_n)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_stat_st_atime_n=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_member_struct_stat_st_atime_n=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_atime_n" >&5
+echo "${ECHO_T}$ac_cv_member_struct_stat_st_atime_n" >&6; }
+if test $ac_cv_member_struct_stat_st_atime_n = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_ATIME_N 1
+_ACEOF
+
+
+fi
+{ echo "$as_me:$LINENO: checking for struct stat.st_ctime_n" >&5
+echo $ECHO_N "checking for struct stat.st_ctime_n... $ECHO_C" >&6; }
+if test "${ac_cv_member_struct_stat_st_ctime_n+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+int
+main ()
+{
+static struct stat ac_aggr;
+if (ac_aggr.st_ctime_n)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_stat_st_ctime_n=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+int
+main ()
+{
+static struct stat ac_aggr;
+if (sizeof ac_aggr.st_ctime_n)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_stat_st_ctime_n=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_member_struct_stat_st_ctime_n=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_ctime_n" >&5
+echo "${ECHO_T}$ac_cv_member_struct_stat_st_ctime_n" >&6; }
+if test $ac_cv_member_struct_stat_st_ctime_n = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_CTIME_N 1
+_ACEOF
+
+
+fi
+{ echo "$as_me:$LINENO: checking for struct stat.st_mtime_n" >&5
+echo $ECHO_N "checking for struct stat.st_mtime_n... $ECHO_C" >&6; }
+if test "${ac_cv_member_struct_stat_st_mtime_n+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+int
+main ()
+{
+static struct stat ac_aggr;
+if (ac_aggr.st_mtime_n)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_stat_st_mtime_n=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+int
+main ()
+{
+static struct stat ac_aggr;
+if (sizeof ac_aggr.st_mtime_n)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_stat_st_mtime_n=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_member_struct_stat_st_mtime_n=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_mtime_n" >&5
+echo "${ECHO_T}$ac_cv_member_struct_stat_st_mtime_n" >&6; }
+if test $ac_cv_member_struct_stat_st_mtime_n = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_MTIME_N 1
+_ACEOF
+
+
+fi
+
+
+
+{ echo "$as_me:$LINENO: checking for inode member of struct dirent" >&5
+echo $ECHO_N "checking for inode member of struct dirent... $ECHO_C" >&6; }
+if test "${apr_cv_dirent_inode+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+apr_cv_dirent_inode=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <dirent.h>
+
+int
+main ()
+{
+
+#ifdef d_ino
+#undef d_ino
+#endif
+struct dirent de; de.d_fileno;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ apr_cv_dirent_inode=d_fileno
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+if test "$apr_cv_dirent_inode" = "no"; then
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <dirent.h>
+
+int
+main ()
+{
+
+#ifdef d_fileno
+#undef d_fileno
+#endif
+struct dirent de; de.d_ino;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ apr_cv_dirent_inode=d_ino
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $apr_cv_dirent_inode" >&5
+echo "${ECHO_T}$apr_cv_dirent_inode" >&6; }
+if test "$apr_cv_dirent_inode" != "no"; then
+
+cat >>confdefs.h <<_ACEOF
+#define DIRENT_INODE $apr_cv_dirent_inode
+_ACEOF
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking for file type member of struct dirent" >&5
+echo $ECHO_N "checking for file type member of struct dirent... $ECHO_C" >&6; }
+if test "${apr_cv_dirent_type+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+apr_cv_dirent_type=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <dirent.h>
+
+int
+main ()
+{
+
+struct dirent de; de.d_type = DT_REG;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ apr_cv_dirent_type=d_type
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ echo "$as_me:$LINENO: result: $apr_cv_dirent_type" >&5
+echo "${ECHO_T}$apr_cv_dirent_type" >&6; }
+if test "$apr_cv_dirent_type" != "no"; then
+
+cat >>confdefs.h <<_ACEOF
+#define DIRENT_TYPE $apr_cv_dirent_type
+_ACEOF
+
+fi
+
+
echo "${nl}Checking for OS UUID Support..."
@@ -46508,9 +48205,9 @@ uint64_literal!$uint64_literal$ac_delim
stdint!$stdint$ac_delim
bigendian!$bigendian$ac_delim
aprlfs!$aprlfs$ac_delim
+ino_t_value!$ino_t_value$ac_delim
have_strnicmp!$have_strnicmp$ac_delim
have_strncasecmp!$have_strncasecmp$ac_delim
-have_stricmp!$have_stricmp$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -46552,6 +48249,7 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
+have_stricmp!$have_stricmp$ac_delim
have_strcasecmp!$have_strcasecmp$ac_delim
have_strdup!$have_strdup$ac_delim
have_strstr!$have_strstr$ac_delim
@@ -46604,7 +48302,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 50; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 51; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/srclib/apr/configure.in b/srclib/apr/configure.in
index 15b44eb4..6b02ec8e 100644
--- a/srclib/apr/configure.in
+++ b/srclib/apr/configure.in
@@ -359,7 +359,7 @@ INSTALL_SUBDIRS="none"
OBJECTS_PLATFORM='$(OBJECTS_unix)'
case $host in
- i386-ibm-aix* | *-ibm-aix[1-2].* | *-ibm-aix3.* | *-ibm-aix4.1 | *-ibm-aix4.1.* | *-ibm-aix4.2 | *-ibm-aix4.2.*)
+ i386-ibm-aix* | *-ibm-aix[[1-2]].* | *-ibm-aix3.* | *-ibm-aix4.1 | *-ibm-aix4.1.* | *-ibm-aix4.2 | *-ibm-aix4.2.*)
OSDIR="aix"
APR_ADDTO(LDFLAGS,-lld)
eolstr="\\n"
@@ -929,6 +929,10 @@ AC_ARG_WITH(sendfile, [ --with-sendfile Override decision to use sendfi
sendfile="0"
fi
;;
+ *darwin*)
+ # darwin semantics in 9.0.0 appear to be fubar
+ sendfile="0"
+ ;;
esac
if test "$orig_sendfile" != "$sendfile"; then
echo "sendfile support disabled to avoid system problem"
@@ -966,8 +970,6 @@ AC_SUBST(mmap)
AC_SUBST(have_memmove)
APR_CHECK_SIGWAIT_ONE_ARG
-APR_CHECK_DIRENT_INODE
-APR_CHECK_DIRENT_TYPE
dnl ----------------------------- Checks for Any required Headers
AC_HEADER_STDC
@@ -1020,6 +1022,7 @@ APR_FLAG_HEADERS(
sys/file.h \
sys/ioctl.h \
sys/mman.h \
+ sys/param.h \
sys/poll.h \
sys/resource.h \
sys/select.h \
@@ -1299,6 +1302,24 @@ else
fi
AC_MSG_RESULT($off_t_value)
+# Regardless of whether _LARGEFILE64_SOURCE is used, on 32-bit
+# platforms _FILE_OFFSET_BITS will affect the size of ino_t and hence
+# the build-time ABI may be different from the apparent ABI when using
+# APR with another package which *does* define _FILE_OFFSET_BITS.
+# (Exactly as per the case above with off_t where LFS is *not* used)
+#
+# To be safe, hard-code apr_ino_t as 'unsigned long' iff that is
+# exactly the size of ino_t here; otherwise use ino_t as existing
+# releases did. To be correct, apr_ino_t should have been made an
+# ino64_t as apr_off_t is off64_t, but this can't be done now without
+# breaking ABI.
+ino_t_value=ino_t
+if test "$ac_cv_sizeof_long" = "4"; then
+ APR_CHECK_TYPES_COMPATIBLE(ino_t, unsigned long,
+ ino_t_value="unsigned long")
+fi
+AC_MSG_NOTICE([using $ino_t_value for ino_t])
+
APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], pid_t, 8)
if test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_short"; then
@@ -1340,7 +1361,7 @@ case $host in
;;
*aix4*|*aix5*)
ssize_t_fmt='#define APR_SSIZE_T_FMT "ld"'
- size_t_fmt='#define APR_SIZE_T_FMT "ld"'
+ size_t_fmt='#define APR_SIZE_T_FMT "lu"'
;;
*beos*)
ssize_t_fmt='#define APR_SSIZE_T_FMT "ld"'
@@ -1349,7 +1370,7 @@ case $host in
*apple-darwin*)
osver=`uname -r`
case $osver in
- [0-7].*)
+ [[0-7]].*)
ssize_t_fmt='#define APR_SSIZE_T_FMT "d"'
;;
*)
@@ -1381,6 +1402,7 @@ AC_SUBST(uint64_literal)
AC_SUBST(stdint)
AC_SUBST(bigendian)
AC_SUBST(aprlfs)
+AC_SUBST(ino_t_value)
dnl ----------------------------- Checking for string functions
AC_CHECK_FUNCS(strnicmp, have_strnicmp="1", have_strnicmp="0")
@@ -1429,11 +1451,26 @@ AC_ARG_ENABLE(dso,
], [dsotype=any])
if test "$dsotype" = "any"; then
- # Darwin:
- AC_CHECK_FUNC(NSLinkModule, [dsotype=dyld])
if test "$dsotype" = "any"; then
- # Original HP-UX:
- AC_CHECK_LIB(dld, shl_load, [dsotype=shl; APR_ADDTO(LIBS,-ldld)])
+ case $host in
+ *darwin[[0-8]]\.*)
+ # Original Darwin, not for 9.0!:
+ AC_CHECK_FUNC(NSLinkModule, [dsotype=dyld]);;
+ *-hpux[[1-9]]\.*|*-hpux1[[01]]*)
+ # shl is specific to hpux(?), and is suboptimal for 64 bit builds,
+ # and most unlikely to be the choice of 12.x developers.
+ AC_CHECK_LIB(dld, shl_load, [have_shl=1])
+ if test "$ac_cv_sizeof_voidp$have_shl" = "41"; then
+ dsotype=shl; APR_ADDTO(LIBS,-ldld)
+ fi;;
+ *-os2*)
+ # several 'other's below probably belong up here. If they always
+ # use a platform implementation and shouldn't test the dlopen/dlfcn
+ # features, then bring them up here.
+ # But if they -should- optionally use dlfcn, and/or need the config
+ # detection of dlopen/dlsym, do not move them up.
+ dsotype=other ;;
+ esac
fi
# Normal POSIX:
if test "$dsotype" = "any"; then
@@ -1457,7 +1494,13 @@ if test "$dsotype" = "any"; then
# Everything else:
if test "$dsotype" = "any"; then
case $host in
- *os390|*-os2*|*os400|*-aix*) dsotype=other ;;
+ *os390|*os400|*-aix*)
+ # Some -aix5 will use dl, no hassles. Keep that pattern here.
+ dsotype=other ;;
+ *-hpux*)
+ if test "$have_shl" = "1"; then
+ dsotype=shl; APR_ADDTO(LIBS,-ldld)
+ fi;;
esac
fi
fi
@@ -1819,6 +1862,25 @@ fi
AC_SUBST(rand)
+dnl ----------------------------- Checking for File Info Support
+echo "${nl}Checking for File Info Support..."
+AC_CHECK_MEMBERS([struct stat.st_blocks, struct stat.st_atimensec,
+struct stat.st_ctimensec, struct stat.st_mtimensec, struct stat.st_atim.tv_nsec,
+struct stat.st_ctim.tv_nsec, struct stat.st_mtim.tv_nsec,
+struct stat.st_atime_n, struct stat.st_ctime_n, struct stat.st_mtime_n],,,[
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif])
+
+APR_CHECK_DIRENT_INODE
+APR_CHECK_DIRENT_TYPE
+
dnl ----------------------------- Checking for UUID Support
echo "${nl}Checking for OS UUID Support..."
diff --git a/srclib/apr/dso/os390/dso.c b/srclib/apr/dso/os390/dso.c
index 293d0653..034ffe84 100644
--- a/srclib/apr/dso/os390/dso.c
+++ b/srclib/apr/dso/os390/dso.c
@@ -63,7 +63,7 @@ APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
dllhandle *handle;
int rc;
- *res_handle = apr_pcalloc(ctx, sizeof(*res_handle));
+ *res_handle = apr_pcalloc(ctx, sizeof(**res_handle));
(*res_handle)->pool = ctx;
if ((handle = dllload(path)) != NULL) {
(*res_handle)->handle = handle;
diff --git a/srclib/apr/file_io/netware/filestat.c b/srclib/apr/file_io/netware/filestat.c
index 0293b973..b344e814 100644
--- a/srclib/apr/file_io/netware/filestat.c
+++ b/srclib/apr/file_io/netware/filestat.c
@@ -58,6 +58,7 @@ static void fill_out_finfo(apr_finfo_t *finfo, struct stat *info,
{
finfo->valid = APR_FINFO_MIN | APR_FINFO_IDENT | APR_FINFO_NLINK
| APR_FINFO_OWNER | APR_FINFO_PROT;
+
finfo->protection = apr_unix_mode2perms(info->st_mode);
finfo->filetype = filetype_from_mode(info->st_mode);
finfo->user = info->st_uid;
@@ -66,15 +67,19 @@ static void fill_out_finfo(apr_finfo_t *finfo, struct stat *info,
finfo->inode = info->st_ino;
finfo->device = info->st_dev;
finfo->nlink = info->st_nlink;
+
apr_time_ansi_put(&finfo->atime, info->st_atime.tv_sec);
apr_time_ansi_put(&finfo->mtime, info->st_mtime.tv_sec);
apr_time_ansi_put(&finfo->ctime, info->st_ctime.tv_sec);
- /* ### needs to be revisited
- * if (wanted & APR_FINFO_CSIZE) {
- * finfo->csize = info->st_blocks * 512;
- * finfo->valid |= APR_FINFO_CSIZE;
- * }
- */
+
+#ifdef HAVE_STRUCT_STAT_ST_BLOCKS
+#ifdef DEV_BSIZE
+ finfo->csize = (apr_off_t)info->st_blocks * (apr_off_t)DEV_BSIZE;
+#else
+ finfo->csize = (apr_off_t)info->st_blocks * (apr_off_t)512;
+#endif
+ finfo->valid |= APR_FINFO_CSIZE;
+#endif
}
apr_status_t apr_file_info_get_locked(apr_finfo_t *finfo, apr_int32_t wanted,
diff --git a/srclib/apr/file_io/unix/filestat.c b/srclib/apr/file_io/unix/filestat.c
index 2779152c..93b6a2b8 100644
--- a/srclib/apr/file_io/unix/filestat.c
+++ b/srclib/apr/file_io/unix/filestat.c
@@ -81,14 +81,40 @@ static void fill_out_finfo(apr_finfo_t *finfo, struct_stat *info,
finfo->device = info->st_dev;
finfo->nlink = info->st_nlink;
apr_time_ansi_put(&finfo->atime, info->st_atime);
+#ifdef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC
+ finfo->atime += info->st_atim.tv_nsec / APR_TIME_C(1000);
+#elif defined(HAVE_STRUCT_STAT_ST_ATIMENSEC)
+ finfo->atime += info->st_atimensec / APR_TIME_C(1000);
+#elif defined(HAVE_STRUCT_STAT_ST_ATIME_N)
+ finfo->ctime += info->st_atime_n / APR_TIME_C(1000);
+#endif
+
apr_time_ansi_put(&finfo->mtime, info->st_mtime);
+#ifdef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
+ finfo->mtime += info->st_mtim.tv_nsec / APR_TIME_C(1000);
+#elif defined(HAVE_STRUCT_STAT_ST_MTIMENSEC)
+ finfo->mtime += info->st_mtimensec / APR_TIME_C(1000);
+#elif defined(HAVE_STRUCT_STAT_ST_MTIME_N)
+ finfo->ctime += info->st_mtime_n / APR_TIME_C(1000);
+#endif
+
apr_time_ansi_put(&finfo->ctime, info->st_ctime);
- /* ### needs to be revisited
- * if (wanted & APR_FINFO_CSIZE) {
- * finfo->csize = info->st_blocks * 512;
- * finfo->valid |= APR_FINFO_CSIZE;
- * }
- */
+#ifdef HAVE_STRUCT_STAT_ST_CTIM_TV_NSEC
+ finfo->ctime += info->st_ctim.tv_nsec / APR_TIME_C(1000);
+#elif defined(HAVE_STRUCT_STAT_ST_CTIMENSEC)
+ finfo->ctime += info->st_ctimensec / APR_TIME_C(1000);
+#elif defined(HAVE_STRUCT_STAT_ST_CTIME_N)
+ finfo->ctime += info->st_ctime_n / APR_TIME_C(1000);
+#endif
+
+#ifdef HAVE_STRUCT_STAT_ST_BLOCKS
+#ifdef DEV_BSIZE
+ finfo->csize = (apr_off_t)info->st_blocks * (apr_off_t)DEV_BSIZE;
+#else
+ finfo->csize = (apr_off_t)info->st_blocks * (apr_off_t)512;
+#endif
+ finfo->valid |= APR_FINFO_CSIZE;
+#endif
}
apr_status_t apr_file_info_get_locked(apr_finfo_t *finfo, apr_int32_t wanted,
diff --git a/srclib/apr/file_io/win32/filedup.c b/srclib/apr/file_io/win32/filedup.c
index 69e4d913..1f3b6b0f 100644
--- a/srclib/apr/file_io/win32/filedup.c
+++ b/srclib/apr/file_io/win32/filedup.c
@@ -20,6 +20,8 @@
#include "apr_strings.h"
#include <string.h>
#include "apr_arch_inherit.h"
+#include <io.h> /* for [_open/_get]_osfhandle */
+
APR_DECLARE(apr_status_t) apr_file_dup(apr_file_t **new_file,
apr_file_t *old_file, apr_pool_t *p)
@@ -38,7 +40,7 @@ APR_DECLARE(apr_status_t) apr_file_dup(apr_file_t **new_file,
(*new_file) = (apr_file_t *) apr_pcalloc(p, sizeof(apr_file_t));
(*new_file)->filehand = newhand;
- (*new_file)->flags = old_file->flags & ~APR_INHERIT;
+ (*new_file)->flags = old_file->flags & ~(APR_STD_FLAGS | APR_INHERIT);
(*new_file)->pool = p;
(*new_file)->fname = apr_pstrdup(p, old_file->fname);
(*new_file)->append = old_file->append;
@@ -63,10 +65,6 @@ APR_DECLARE(apr_status_t) apr_file_dup(apr_file_t **new_file,
#endif /* !defined(_WIN32_WCE) */
}
-#define stdin_handle 0x01
-#define stdout_handle 0x02
-#define stderr_handle 0x04
-
APR_DECLARE(apr_status_t) apr_file_dup2(apr_file_t *new_file,
apr_file_t *old_file, apr_pool_t *p)
{
@@ -77,34 +75,81 @@ APR_DECLARE(apr_status_t) apr_file_dup2(apr_file_t *new_file,
HANDLE hproc = GetCurrentProcess();
HANDLE newhand = NULL;
apr_int32_t newflags;
-
- /* dup2 is not supported literaly with native Windows handles.
- * We can, however, emulate dup2 for the standard i/o handles,
- * and close and replace other handles with duped handles.
- * The os_handle will change, however.
- */
- if (new_file->filehand == GetStdHandle(STD_ERROR_HANDLE)) {
- stdhandle |= stderr_handle;
- }
- if (new_file->filehand == GetStdHandle(STD_OUTPUT_HANDLE)) {
- stdhandle |= stdout_handle;
- }
- if (new_file->filehand == GetStdHandle(STD_INPUT_HANDLE)) {
- stdhandle |= stdin_handle;
- }
-
- if (stdhandle) {
- if (!DuplicateHandle(hproc, old_file->filehand,
- hproc, &newhand, 0,
- TRUE, DUPLICATE_SAME_ACCESS)) {
- return apr_get_os_error();
+ int fd;
+
+ if (new_file->flags & APR_STD_FLAGS)
+ {
+ if ((new_file->flags & APR_STD_FLAGS) == APR_STDERR_FLAG)
+ {
+ /* Flush stderr and unset its buffer, then commit the fd-based buffer.
+ * This is typically a noop for Win2K/XP since services with NULL std
+ * handles [but valid FILE *'s, oddly enough], but is required
+ * for NT 4.0 and to use this code outside of services.
+ */
+ fflush(stderr);
+ setvbuf(stderr, NULL, _IONBF, 0);
+ _commit(2 /* stderr */);
+
+ /* Clone a handle can _close() without harming the source handle,
+ * open an MSVCRT-based pseudo-fd for the file handle, then dup2
+ * and close our temporary pseudo-fd once it's been duplicated.
+ * This will incidently keep the FILE-based stderr in sync.
+ * Note the apparently redundant _O_BINARY coersions are required.
+ * Note the _dup2 will close the previous std Win32 handle.
+ */
+ if (!DuplicateHandle(hproc, old_file->filehand, hproc, &newhand,
+ 0, FALSE, DUPLICATE_SAME_ACCESS)) {
+ return apr_get_os_error();
+ }
+ fd = _open_osfhandle((INT_PTR)newhand, _O_WRONLY | _O_BINARY);
+ _dup2(fd, 2);
+ _close(fd);
+ _setmode(2, _O_BINARY);
+
+ /* hPipeWrite was _close()'ed above, and _dup2()'ed
+ * to fd 2 creating a new, inherited Win32 handle.
+ * Recover that real handle from fd 2. Note that
+ * SetStdHandle(STD_ERROR_HANDLE, _get_osfhandle(2))
+ * is implicit in the dup2() call above
+ */
+ newhand = (HANDLE)_get_osfhandle(2);
}
- if (((stdhandle & stderr_handle) && !SetStdHandle(STD_ERROR_HANDLE, newhand)) ||
- ((stdhandle & stdout_handle) && !SetStdHandle(STD_OUTPUT_HANDLE, newhand)) ||
- ((stdhandle & stdin_handle) && !SetStdHandle(STD_INPUT_HANDLE, newhand))) {
- return apr_get_os_error();
+ else if ((new_file->flags & APR_STD_FLAGS) == APR_STDOUT_FLAG) {
+ /* For the process flow see the stderr case above */
+ fflush(stdout);
+ setvbuf(stdout, NULL, _IONBF, 0);
+ _commit(1 /* stdout */);
+
+ if (!DuplicateHandle(hproc, old_file->filehand, hproc, &newhand,
+ 0, FALSE, DUPLICATE_SAME_ACCESS)) {
+ return apr_get_os_error();
+ }
+ fd = _open_osfhandle((INT_PTR)newhand, _O_WRONLY | _O_BINARY);
+ _dup2(fd, 1);
+ _close(fd);
+ _setmode(1, _O_BINARY);
+ newhand = (HANDLE)_get_osfhandle(1);
+ }
+ else if ((new_file->flags & APR_STD_FLAGS) == APR_STDIN_FLAG) {
+ /* For the process flow see the stderr case above */
+ fflush(stdin);
+ setvbuf(stdin, NULL, _IONBF, 0);
+ _commit(0 /* stdin */);
+
+ if (!DuplicateHandle(hproc, old_file->filehand, hproc, &newhand,
+ 0, FALSE, DUPLICATE_SAME_ACCESS)) {
+ return apr_get_os_error();
+ }
+ fd = _open_osfhandle((INT_PTR)newhand, _O_RDONLY | _O_BINARY);
+ _dup2(fd, 0);
+ _close(fd);
+ _setmode(0, _O_BINARY);
+ newhand = (HANDLE)_get_osfhandle(0);
}
- newflags = old_file->flags | APR_INHERIT;
+ newflags = (new_file->flags & APR_STD_FLAGS)
+ | (old_file->flags & ~APR_STD_FLAGS) | APR_INHERIT;
+
+ /* No need to close the old file, _dup2() above did that for us */
}
else {
if (!DuplicateHandle(hproc, old_file->filehand,
@@ -112,11 +157,12 @@ APR_DECLARE(apr_status_t) apr_file_dup2(apr_file_t *new_file,
FALSE, DUPLICATE_SAME_ACCESS)) {
return apr_get_os_error();
}
- newflags = old_file->flags & ~APR_INHERIT;
- }
+ newflags = old_file->flags & ~(APR_STD_FLAGS | APR_INHERIT);
- if (new_file->filehand && (new_file->filehand != INVALID_HANDLE_VALUE)) {
- CloseHandle(new_file->filehand);
+ if (new_file->filehand
+ && (new_file->filehand != INVALID_HANDLE_VALUE)) {
+ CloseHandle(new_file->filehand);
+ }
}
new_file->flags = newflags;
diff --git a/srclib/apr/file_io/win32/open.c b/srclib/apr/file_io/win32/open.c
index b3a51767..6e8221c8 100644
--- a/srclib/apr/file_io/win32/open.c
+++ b/srclib/apr/file_io/win32/open.c
@@ -31,6 +31,7 @@
#endif
#include "apr_arch_misc.h"
#include "apr_arch_inherit.h"
+#include <io.h>
#if APR_HAS_UNICODE_FS
apr_status_t utf8_to_unicode_path(apr_wchar_t* retstr, apr_size_t retlen,
@@ -227,25 +228,34 @@ apr_status_t file_cleanup(void *thefile)
if (file->filehand != INVALID_HANDLE_VALUE) {
+ if (file->buffered) {
+ /* XXX: flush here is not mutex protected */
+ flush_rv = apr_file_flush((apr_file_t *)thefile);
+ }
+
/* In order to avoid later segfaults with handle 'reuse',
* we must protect against the case that a dup2'ed handle
* is being closed, and invalidate the corresponding StdHandle
+ * We also tell msvcrt when stdhandles are closed.
*/
- if (file->filehand == GetStdHandle(STD_ERROR_HANDLE)) {
- SetStdHandle(STD_ERROR_HANDLE, INVALID_HANDLE_VALUE);
- }
- if (file->filehand == GetStdHandle(STD_OUTPUT_HANDLE)) {
- SetStdHandle(STD_OUTPUT_HANDLE, INVALID_HANDLE_VALUE);
- }
- if (file->filehand == GetStdHandle(STD_INPUT_HANDLE)) {
- SetStdHandle(STD_INPUT_HANDLE, INVALID_HANDLE_VALUE);
+ if (file->flags & APR_STD_FLAGS)
+ {
+ if ((file->flags & APR_STD_FLAGS) == APR_STDERR_FLAG) {
+ _close(2);
+ SetStdHandle(STD_ERROR_HANDLE, INVALID_HANDLE_VALUE);
+ }
+ else if ((file->flags & APR_STD_FLAGS) == APR_STDOUT_FLAG) {
+ _close(1);
+ SetStdHandle(STD_OUTPUT_HANDLE, INVALID_HANDLE_VALUE);
+ }
+ else if ((file->flags & APR_STD_FLAGS) == APR_STDIN_FLAG) {
+ _close(0);
+ SetStdHandle(STD_INPUT_HANDLE, INVALID_HANDLE_VALUE);
+ }
}
+ else
+ CloseHandle(file->filehand);
- if (file->buffered) {
- /* XXX: flush here is not mutex protected */
- flush_rv = apr_file_flush((apr_file_t *)thefile);
- }
- CloseHandle(file->filehand);
file->filehand = INVALID_HANDLE_VALUE;
}
if (file->pOverlapped && file->pOverlapped->hEvent) {
@@ -574,15 +584,11 @@ APR_DECLARE(apr_status_t) apr_file_open_stderr(apr_file_t **thefile, apr_pool_t
apr_set_os_error(APR_SUCCESS);
file_handle = GetStdHandle(STD_ERROR_HANDLE);
- if (!file_handle || (file_handle == INVALID_HANDLE_VALUE)) {
- apr_status_t rv = apr_get_os_error();
- if (rv == APR_SUCCESS) {
- return APR_EINVAL;
- }
- return rv;
- }
+ if (!file_handle)
+ file_handle = INVALID_HANDLE_VALUE;
- return apr_os_file_put(thefile, &file_handle, 0, pool);
+ return apr_os_file_put(thefile, &file_handle,
+ APR_WRITE | APR_STDERR_FLAG, pool);
#endif
}
@@ -595,15 +601,11 @@ APR_DECLARE(apr_status_t) apr_file_open_stdout(apr_file_t **thefile, apr_pool_t
apr_set_os_error(APR_SUCCESS);
file_handle = GetStdHandle(STD_OUTPUT_HANDLE);
- if (!file_handle || (file_handle == INVALID_HANDLE_VALUE)) {
- apr_status_t rv = apr_get_os_error();
- if (rv == APR_SUCCESS) {
- return APR_EINVAL;
- }
- return rv;
- }
+ if (!file_handle)
+ file_handle = INVALID_HANDLE_VALUE;
- return apr_os_file_put(thefile, &file_handle, 0, pool);
+ return apr_os_file_put(thefile, &file_handle,
+ APR_WRITE | APR_STDOUT_FLAG, pool);
#endif
}
@@ -616,15 +618,11 @@ APR_DECLARE(apr_status_t) apr_file_open_stdin(apr_file_t **thefile, apr_pool_t *
apr_set_os_error(APR_SUCCESS);
file_handle = GetStdHandle(STD_INPUT_HANDLE);
- if (!file_handle || (file_handle == INVALID_HANDLE_VALUE)) {
- apr_status_t rv = apr_get_os_error();
- if (rv == APR_SUCCESS) {
- return APR_EINVAL;
- }
- return rv;
- }
+ if (!file_handle)
+ file_handle = INVALID_HANDLE_VALUE;
- return apr_os_file_put(thefile, &file_handle, 0, pool);
+ return apr_os_file_put(thefile, &file_handle,
+ APR_READ | APR_STDIN_FLAG, pool);
#endif
}
diff --git a/srclib/apr/file_io/win32/readwrite.c b/srclib/apr/file_io/win32/readwrite.c
index ac04d5a0..65bdc5df 100644
--- a/srclib/apr/file_io/win32/readwrite.c
+++ b/srclib/apr/file_io/win32/readwrite.c
@@ -348,7 +348,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
rv = APR_SUCCESS;
break;
case WAIT_TIMEOUT:
- rv = APR_TIMEUP;
+ rv = (timeout_ms == 0) ? APR_EAGAIN : APR_TIMEUP;
break;
case WAIT_FAILED:
rv = apr_get_os_error();
diff --git a/srclib/apr/file_io/win32/seek.c b/srclib/apr/file_io/win32/seek.c
index 2566d061..98c5ea50 100644
--- a/srclib/apr/file_io/win32/seek.c
+++ b/srclib/apr/file_io/win32/seek.c
@@ -21,7 +21,7 @@
static apr_status_t setptr(apr_file_t *thefile, apr_off_t pos )
{
- apr_size_t newbufpos;
+ apr_off_t newbufpos;
apr_status_t rv;
DWORD rc;
@@ -37,10 +37,9 @@ static apr_status_t setptr(apr_file_t *thefile, apr_off_t pos )
/* We may be truncating to size here.
* XXX: testing an 'unsigned' as >= 0 below indicates a bug
*/
- newbufpos = (apr_size_t)(pos - (thefile->filePtr
- - thefile->dataRead));
+ newbufpos = pos - (thefile->filePtr - thefile->dataRead);
- if (newbufpos >= 0 && newbufpos <= thefile->dataRead) {
+ if (newbufpos >= 0 && newbufpos <= (apr_off_t)thefile->dataRead) {
thefile->bufpos = (apr_size_t)newbufpos;
rv = APR_SUCCESS;
} else {
diff --git a/srclib/apr/helpers/apr_rename.pl b/srclib/apr/helpers/apr_rename.pl
deleted file mode 100755
index 25b9d52d..00000000
--- a/srclib/apr/helpers/apr_rename.pl
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/usr/bin/perl -w
-use strict;
-use ExtUtils::MakeMaker qw(prompt);
-use File::Find;
-
-my $just_check = @ARGV ? $ARGV[0] eq '-c' : 0;
-shift if $just_check;
-my $dir = shift || '.';
-my %names;
-
-my $prefix = 'apr_';
-
-while (<DATA>) {
- chomp;
- my($old, $new) = grep { s/^$prefix//o } split;
- next unless $old and $new;
- $names{$old} = $new;
-}
-
-my $pattern = join '|', keys %names;
-#print "replacement pattern=$pattern\n";
-
-find sub {
- chomp;
- return unless /\.[ch]$/;
- my $file = "$File::Find::dir/$_";
- print "looking in $file\n";
-
- replace($_, !$just_check);
-
-}, $dir;
-
-sub replace {
- my($file, $replace) = @_;
- local *IN, *OUT;
- my @lines;
- my $found = 0;
-
- open IN, $file or die "open $file: $!";
-
- while (<IN>) {
- for (m/[^_\"]*$prefix($pattern)\b/og) {
- $found++;
- print " $file:$. apr_$_ -> apr_$names{$_}\n";
- }
- push @lines, $_ if $replace;
- }
-
- close IN;
-
- return unless $found and $replace;
-
-# my $ans = prompt("replace?", 'y');
-# return unless $ans =~ /^y/i;
-
- open OUT, ">$file" or die "open $file: $!";
-
- for (@lines) {
- unless (/^\#include/) {
- s/([^_\"]*$prefix)($pattern)\b/$1$names{$2}/og;
- }
- print OUT $_;
- }
-
- close OUT;
-}
-
-__DATA__
-apr_time_t:
-apr_implode_gmt apr_time_exp_gmt_get
-
-apr_socket_t:
-apr_close_socket apr_socket_close
-apr_create_socket apr_socket_create
-apr_get_sockaddr apr_socket_addr_get
-apr_get_socketdata apr_socket_data_get
-apr_set_socketdata apr_socket_data_set
-apr_shutdown apr_socket_shutdown
-apr_bind apr_socket_bind
-apr_listen apr_socket_listen
-apr_accept apr_socket_accept
-apr_connect apr_socket_connect
-apr_send apr_socket_send
-apr_sendv apr_socket_sendv
-apr_sendto apr_socket_sendto
-apr_recvfrom apr_socket_recvfrom
-apr_sendfile apr_socket_sendfile
-apr_recv apr_socket_recv
-
-apr_filepath_*:
-apr_filename_of_pathname apr_filepath_name_get
-
-apr_gid_t:
-apr_get_groupid apr_gid_get
-apr_get_groupname apr_gid_name_get
-apr_group_name_get apr_gid_name_get
-apr_compare_groups apr_gid_compare
-
-apr_uid_t:
-apr_get_home_directory apr_uid_homepath_get
-apr_get_userid apr_uid_get
-apr_current_userid apr_uid_current
-apr_compare_users apr_uid_compare
-apr_get_username apr_uid_name_get
-apr_compare_users apr_uid_compare
-
diff --git a/srclib/apr/include/apr.h.in b/srclib/apr/include/apr.h.in
index 1341bed7..a4bb922d 100644
--- a/srclib/apr/include/apr.h.in
+++ b/srclib/apr/include/apr.h.in
@@ -272,6 +272,14 @@ typedef @size_t_value@ apr_size_t;
typedef @ssize_t_value@ apr_ssize_t;
typedef @off_t_value@ apr_off_t;
typedef @socklen_t_value@ apr_socklen_t;
+typedef @ino_t_value@ apr_ino_t;
+
+/* As we don't want to break users who author for 1.2.x, we can't
+ * present this type until they have included apr_file_info.h
+ * where it was originally declared in release 1.2.0.
+ * Mask it from accedental misuse here.
+ */
+#define apr_ino_t apr_ino_t__requires__apr_file_info_h
#define APR_SIZEOF_VOIDP @voidp_size@
diff --git a/srclib/apr/include/apr.hnw b/srclib/apr/include/apr.hnw
index 6f1e1559..19992125 100644
--- a/srclib/apr/include/apr.hnw
+++ b/srclib/apr/include/apr.hnw
@@ -255,6 +255,14 @@ typedef int apr_socklen_t;
#else
typedef size_t apr_socklen_t;
#endif
+typedef apr_uint64_t apr_ino_t;
+
+/* As we don't want to break users who author for 1.2.x, we can't
+ * present this type until they have included apr_file_info.h
+ * where it was originally declared in release 1.2.0.
+ * Mask it from accedental misuse here.
+ */
+#define apr_ino_t apr_ino_t__requires__apr_file_info_h
/* Are we big endian? */
/* XXX: Fatal assumption on Alpha platforms */
diff --git a/srclib/apr/include/apr.hw b/srclib/apr/include/apr.hw
index 60940284..c382acdb 100644
--- a/srclib/apr/include/apr.hw
+++ b/srclib/apr/include/apr.hw
@@ -345,6 +345,14 @@ typedef __int64 apr_off_t;
typedef int apr_off_t;
#endif
typedef int apr_socklen_t;
+typedef apr_uint64_t apr_ino_t;
+
+/* As we don't want to break users who author for 1.2.x, we can't
+ * present this type until they have included apr_file_info.h
+ * where it was originally declared in release 1.2.0.
+ * Mask it from accedental misuse here.
+ */
+#define apr_ino_t apr_ino_t__requires__apr_file_info_h
/* Are we big endian? */
/* XXX: Fatal assumption on Alpha platforms */
diff --git a/srclib/apr/include/apr_file_info.h b/srclib/apr/include/apr_file_info.h
index 94146f0a..297b3815 100644
--- a/srclib/apr/include/apr_file_info.h
+++ b/srclib/apr/include/apr_file_info.h
@@ -125,22 +125,24 @@ typedef struct apr_dir_t apr_dir_t;
typedef apr_int32_t apr_fileperms_t;
#if (defined WIN32) || (defined NETWARE)
/**
- * Structure for determining the inode of the file.
- */
-typedef apr_uint64_t apr_ino_t;
-/**
* Structure for determining the device the file is on.
*/
typedef apr_uint32_t apr_dev_t;
#else
-/** The inode of the file. */
-typedef ino_t apr_ino_t;
/**
* Structure for determining the device the file is on.
*/
typedef dev_t apr_dev_t;
#endif
+/* See apr.h.in (.hw or .hnw) for the declaration of apr_ino_t,
+ * but as we don't want to break users who author for 1.2.x, we
+ * can't present this type until they have included apr_file_info.h
+ * where it was originally declared in release 1.2.0.
+ * Unmask it for use here.
+ */
+#undef apr_ino_t
+
/**
* @defgroup apr_file_stat Stat Functions
* @{
diff --git a/srclib/apr/include/apr_file_io.h b/srclib/apr/include/apr_file_io.h
index 7cf7df96..34d5b3a4 100644
--- a/srclib/apr/include/apr_file_io.h
+++ b/srclib/apr/include/apr_file_io.h
@@ -724,6 +724,8 @@ APR_DECLARE(apr_status_t) apr_dir_make_recursive(const char *path,
* Remove directory from the file system.
* @param path the path for the directory to be removed. (use / on all systems)
* @param pool the pool to use.
+ * @remark Removing a directory which is in-use (e.g., the current working
+ * directory, or during apr_dir_read, or with an open file) is not portable.
*/
APR_DECLARE(apr_status_t) apr_dir_remove(const char *path, apr_pool_t *pool);
diff --git a/srclib/apr/include/apr_network_io.h b/srclib/apr/include/apr_network_io.h
index 24708c55..2d50329d 100644
--- a/srclib/apr/include/apr_network_io.h
+++ b/srclib/apr/include/apr_network_io.h
@@ -507,7 +507,11 @@ APR_DECLARE(apr_status_t) apr_socket_sendto(apr_socket_t *sock,
apr_size_t *len);
/**
- * @param from The apr_sockaddr_t to fill in the recipient info
+ * Read data from a socket. On success, the address of the peer from
+ * which the data was sent is copied into the @param from parameter,
+ * and the @param len parameter is updated to give the number of bytes
+ * written to @param buf.
+ * @param from Updated with the address from which the data was received
* @param sock The socket to use
* @param flags The flags to use
* @param buf The buffer to use
diff --git a/srclib/apr/include/apr_shm.h b/srclib/apr/include/apr_shm.h
index 4875ee1f..2b1d50f6 100644
--- a/srclib/apr/include/apr_shm.h
+++ b/srclib/apr/include/apr_shm.h
@@ -71,13 +71,19 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
apr_pool_t *pool);
/**
- * Remove shared memory segment associated with a filename.
+ * Remove named resource associated with a shared memory segment,
+ * preventing attachments to the resource, but not destroying it.
* @param filename The filename associated with shared-memory segment which
* needs to be removed
* @param pool The pool used for file operations
* @remark This function is only supported on platforms which support
* name-based shared memory segments, and will return APR_ENOTIMPL on
- * platforms without such support.
+ * platforms without such support. Removing the file while the shm
+ * is in use is not entirely portable, caller may use this to enhance
+ * obscurity of the resource, but be prepared for the the call to fail,
+ * and for concurrent attempts to create a resource of the same name
+ * to also fail. The pool cleanup of apr_shm_create (apr_shm_destroy)
+ * also removes the named resource.
*/
APR_DECLARE(apr_status_t) apr_shm_remove(const char *filename,
apr_pool_t *pool);
diff --git a/srclib/apr/include/apr_version.h b/srclib/apr/include/apr_version.h
index 0f6d5c84..71859fd6 100644
--- a/srclib/apr/include/apr_version.h
+++ b/srclib/apr/include/apr_version.h
@@ -59,7 +59,7 @@
* The Patch Level never includes API changes, simply bug fixes.
* Reset to 0 when upgrading APR_MINOR_VERSION
*/
-#define APR_PATCH_VERSION 11
+#define APR_PATCH_VERSION 12
/**
* The symbol APR_IS_DEV_VERSION is only defined for internal,
diff --git a/srclib/apr/include/arch/unix/apr_arch_file_io.h b/srclib/apr/include/arch/unix/apr_arch_file_io.h
index 4311082e..4216e131 100644
--- a/srclib/apr/include/arch/unix/apr_arch_file_io.h
+++ b/srclib/apr/include/arch/unix/apr_arch_file_io.h
@@ -70,6 +70,10 @@
#ifdef BEOS
#include <kernel/OS.h>
#endif
+/* Hunting down DEV_BSIZE if not from dirent.h, sys/stat.h etc */
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
#if BEOS_BONE
# ifndef BONE7
diff --git a/srclib/apr/include/arch/unix/apr_private.h.in b/srclib/apr/include/arch/unix/apr_private.h.in
index 72d30658..94689637 100644
--- a/srclib/apr/include/arch/unix/apr_private.h.in
+++ b/srclib/apr/include/arch/unix/apr_private.h.in
@@ -452,6 +452,36 @@
/* Define if struct impreq was found */
#undef HAVE_STRUCT_IPMREQ
+/* Define to 1 if `st_atimensec' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_ATIMENSEC
+
+/* Define to 1 if `st_atime_n' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_ATIME_N
+
+/* Define to 1 if `st_atim.tv_nsec' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC
+
+/* Define to 1 if `st_blocks' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_BLOCKS
+
+/* Define to 1 if `st_ctimensec' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_CTIMENSEC
+
+/* Define to 1 if `st_ctime_n' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_CTIME_N
+
+/* Define to 1 if `st_ctim.tv_nsec' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_CTIM_TV_NSEC
+
+/* Define to 1 if `st_mtimensec' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_MTIMENSEC
+
+/* Define to 1 if `st_mtime_n' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_MTIME_N
+
+/* Define to 1 if `st_mtim.tv_nsec' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
+
/* Define to 1 if `tm_gmtoff' is member of `struct tm'. */
#undef HAVE_STRUCT_TM_TM_GMTOFF
@@ -479,6 +509,9 @@
/* Define to 1 if you have the <sys/mutex.h> header file. */
#undef HAVE_SYS_MUTEX_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/poll.h> header file. */
#undef HAVE_SYS_POLL_H
diff --git a/srclib/apr/include/arch/win32/apr_arch_file_io.h b/srclib/apr/include/arch/win32/apr_arch_file_io.h
index 66b86668..776dc169 100644
--- a/srclib/apr/include/arch/win32/apr_arch_file_io.h
+++ b/srclib/apr/include/arch/win32/apr_arch_file_io.h
@@ -97,8 +97,13 @@ void *res_name_from_filename(const char *file, int global, apr_pool_t *pool);
#define APR_OPENINFO 0x00100000 /* Open without READ or WRITE access */
#define APR_OPENLINK 0x00200000 /* Open a link itself, if supported */
#define APR_READCONTROL 0x00400000 /* Read the file's owner/perms */
-#define APR_WRITECONTROL 0x00800000 /* Modifythe file's owner/perms */
-#define APR_WRITEATTRS 0x01000000 /* Modify the file's attributes */
+#define APR_WRITECONTROL 0x00800000 /* Modify the file's owner/perms */
+/* #define APR_INHERIT 0x01000000 -- Defined in apr_arch_inherit.h! */
+#define APR_STDIN_FLAG 0x02000000 /* Obtained via apr_file_open_stdin() */
+#define APR_STDOUT_FLAG 0x04000000 /* Obtained via apr_file_open_stdout() */
+#define APR_STDERR_FLAG 0x06000000 /* Obtained via apr_file_open_stderr() */
+#define APR_STD_FLAGS (APR_STDIN_FLAG | APR_STDOUT_FLAG | APR_STDERR_FLAG)
+#define APR_WRITEATTRS 0x08000000 /* Modify the file's attributes */
/* Entries missing from the MSVC 5.0 Win32 SDK:
*/
diff --git a/srclib/apr/include/arch/win32/apr_arch_misc.h b/srclib/apr/include/arch/win32/apr_arch_misc.h
index 6db6a1b9..5113e955 100644
--- a/srclib/apr/include/arch/win32/apr_arch_misc.h
+++ b/srclib/apr/include/arch/win32/apr_arch_misc.h
@@ -291,16 +291,13 @@ APR_DECLARE_LATE_DLL_FUNC(DLL_NTDLL, DWORD, WINAPI, NtSetTimerResolution, 0, (
(ReqRes, Acquire, pNewRes));
#define SetTimerResolution apr_winapi_NtSetTimerResolution
-/* ### These are ULONG_PTR values, but that's int32 for all we care
- * until the Win64 port is prepared.
- */
typedef struct PBI {
- DWORD ExitStatus;
- PVOID PebBaseAddress;
- ULONG AffinityMask;
- LONG BasePriority;
- ULONG UniqueProcessId;
- ULONG InheritedFromUniqueProcessId;
+ LONG ExitStatus;
+ PVOID PebBaseAddress;
+ ULONG_PTR AffinityMask;
+ LONG BasePriority;
+ ULONG_PTR UniqueProcessId;
+ ULONG_PTR InheritedFromUniqueProcessId;
} PBI, *PPBI;
APR_DECLARE_LATE_DLL_FUNC(DLL_NTDLL, DWORD, WINAPI, NtQueryInformationProcess, 0, (
diff --git a/srclib/apr/libapr.dsp b/srclib/apr/libapr.dsp
index 373ac5a7..a92cf2b5 100644
--- a/srclib/apr/libapr.dsp
+++ b/srclib/apr/libapr.dsp
@@ -4,7 +4,7 @@
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-CFG=libapr - Win32 Debug
+CFG=libapr - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
@@ -13,12 +13,16 @@ CFG=libapr - Win32 Debug
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
-!MESSAGE NMAKE /f "libapr.mak" CFG="libapr - Win32 Debug"
+!MESSAGE NMAKE /f "libapr.mak" CFG="libapr - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "libapr - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "libapr - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "libapr - Win32 ReleaseNT" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "libapr - Win32 DebugNT" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "libapr - x64 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "libapr - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
@@ -43,19 +47,19 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
-# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "NDEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "_WINDOWS" /Fd"Release\libapr_src" /FD /c
+# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "NDEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\libapr_src" /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG" /d "APR_VERSION_ONLY" /I "./include"
+# ADD RSC /l 0x409 /i "./include" /d "NDEBUG" /d "APR_VERSION_ONLY"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /debug /opt:ref
-# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /debug /out:".\Release\libapr-1.dll" /opt:ref
+# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /debug /out:"Release\libapr-1.dll" /pdb:"Release\libapr-1.pdb" /implib:"Release\libapr-1.lib" /MACHINE:X86 /opt:ref
# Begin Special Build Tool
-TargetPath=.\Release\libapr-1.dll
+TargetPath=Release\libapr-1.dll
SOURCE="$(InputPath)"
PostBuild_Desc=Embed .manifest
PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
@@ -74,20 +78,148 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
-# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "_DEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "_WINDOWS" /Fd"Debug\libapr_src" /FD /c
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "_DEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\libapr_src" /FD /EHsc /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG" /d "APR_VERSION_ONLY" /I "./include"
+# ADD RSC /l 0x409 /i "./include" /d "_DEBUG" /d "APR_VERSION_ONLY"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /debug
-# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /debug /out:".\Debug\libapr-1.dll"
+# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /debug /out:"Debug\libapr-1.dll" /pdb:"Debug\libapr-1.pdb" /implib:"Debug\libapr-1.lib" /MACHINE:X86
# Begin Special Build Tool
-TargetPath=.\Debug\libapr-1.dll
+TargetPath=Debug\libapr-1.dll
+SOURCE="$(InputPath)"
+PostBuild_Desc=Embed .manifest
+PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
+# End Special Build Tool
+
+!ELSEIF "$(CFG)" == "libapr - Win32 ReleaseNT"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "NT\Release"
+# PROP BASE Intermediate_Dir "NT\Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "NT\Release"
+# PROP Intermediate_Dir "NT\Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "NDEBUG" /D "APR_DECLARE_EXPORT" /D "WINNT" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\libapr_src" /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /i "./include" /d "NDEBUG" /d "APR_VERSION_ONLY"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /debug /opt:ref
+# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /debug /out:"NT\Release\libapr-1.dll" /pdb:"NT\Release\libapr-1.pdb" /implib:"NT\Release\libapr-1.lib" /MACHINE:X86 /opt:ref
+# Begin Special Build Tool
+TargetPath=NT\Release\libapr.dll
+SOURCE="$(InputPath)"
+PostBuild_Desc=Embed .manifest
+PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
+# End Special Build Tool
+
+!ELSEIF "$(CFG)" == "libapr - Win32 DebugNT"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "NT\Debug"
+# PROP BASE Intermediate_Dir "NT\Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "NT\Debug"
+# PROP Intermediate_Dir "NT\Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "_DEBUG" /D "APR_DECLARE_EXPORT" /D "WINNT" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\libapr_src" /FD /EHsc /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /i "./include" /d "_DEBUG" /d "APR_VERSION_ONLY"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /debug
+# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /debug /out:"NT\Debug\libapr-1.dll" /pdb:"NT\Debug\libapr-1.pdb" /implib:"NT\Debug\libapr-1.lib" /MACHINE:X86
+# Begin Special Build Tool
+TargetPath=NT\Debug\libapr-1.dll
+SOURCE="$(InputPath)"
+PostBuild_Desc=Embed .manifest
+PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
+# End Special Build Tool
+
+!ELSEIF "$(CFG)" == "libapr - x64 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "x64\Release"
+# PROP BASE Intermediate_Dir "x64\Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "x64\Release"
+# PROP Intermediate_Dir "x64\Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "NDEBUG" /D "APR_DECLARE_EXPORT" /D "WINNT" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\libapr_src" /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /i "./include" /d "NDEBUG" /d "APR_VERSION_ONLY"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /debug /opt:ref
+# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /debug /out:"x64\Release\libapr-1.dll" /pdb:"x64\Release\libapr-1.pdb" /implib:"x64\Release\libapr-1.lib" /MACHINE:X64 /opt:ref
+# Begin Special Build Tool
+TargetPath=x64\Release\libapr-1.dll
+SOURCE="$(InputPath)"
+PostBuild_Desc=Embed .manifest
+PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
+# End Special Build Tool
+
+!ELSEIF "$(CFG)" == "libapr - x64 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "x64\Debug"
+# PROP BASE Intermediate_Dir "x64\Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "x64\Debug"
+# PROP Intermediate_Dir "x64\Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "_DEBUG" /D "APR_DECLARE_EXPORT" /D "WINNT" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\libapr_src" /FD /EHsc /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /i "./include" /d "_DEBUG" /d "APR_VERSION_ONLY"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /debug
+# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /debug /out:"x64\Debug\libapr-1.dll" /pdb:"x64\Debug\libapr-1.pdb" /implib:"x64\Debug\libapr-1.lib" /MACHINE:X64
+# Begin Special Build Tool
+TargetPath=x64\Debug\libapr-1.dll
SOURCE="$(InputPath)"
PostBuild_Desc=Embed .manifest
PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
@@ -99,6 +231,10 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
# Name "libapr - Win32 Release"
# Name "libapr - Win32 Debug"
+# Name "libapr - Win32 ReleaseNT"
+# Name "libapr - Win32 DebugNT"
+# Name "libapr - x64 Release"
+# Name "libapr - x64 Debug"
# Begin Group "Source Files"
# PROP Default_Filter ".c"
@@ -292,10 +428,6 @@ SOURCE=.\network_io\unix\inet_pton.c
# End Source File
# Begin Source File
-SOURCE=.\poll\unix\select.c
-# End Source File
-# Begin Source File
-
SOURCE=.\network_io\unix\multicast.c
# End Source File
# Begin Source File
@@ -323,6 +455,14 @@ SOURCE=.\network_io\win32\sockopt.c
SOURCE=.\passwd\apr_getpass.c
# End Source File
# End Group
+# Begin Group "poll"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\poll\unix\select.c
+# End Source File
+# End Group
# Begin Group "random"
# PROP Default_Filter ""
@@ -525,6 +665,46 @@ InputPath=.\include\apr.hw
# End Custom Build
+!ELSEIF "$(CFG)" == "libapr - Win32 ReleaseNT"
+
+# Begin Custom Build - Creating apr.h from apr.hw
+InputPath=.\include\apr.hw
+
+".\include\apr.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apr.hw > .\include\apr.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "libapr - Win32 DebugNT"
+
+# Begin Custom Build - Creating apr.h from apr.hw
+InputPath=.\include\apr.hw
+
+".\include\apr.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apr.hw > .\include\apr.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "libapr - x64 Release"
+
+# Begin Custom Build - Creating apr.h from apr.hw
+InputPath=.\include\apr.hw
+
+".\include\apr.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apr.hw > .\include\apr.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "libapr - x64 Debug"
+
+# Begin Custom Build - Creating apr.h from apr.hw
+InputPath=.\include\apr.hw
+
+".\include\apr.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apr.hw > .\include\apr.h
+
+# End Custom Build
+
!ENDIF
# End Source File
@@ -610,6 +790,10 @@ SOURCE=.\include\apr_proc_mutex.h
# End Source File
# Begin Source File
+SOURCE=.\include\apr_random.h
+# End Source File
+# Begin Source File
+
SOURCE=.\include\apr_ring.h
# End Source File
# Begin Source File
diff --git a/srclib/apr/memory/unix/apr_pools.c b/srclib/apr/memory/unix/apr_pools.c
index 4faf2aac..2e3d5378 100644
--- a/srclib/apr/memory/unix/apr_pools.c
+++ b/srclib/apr/memory/unix/apr_pools.c
@@ -62,16 +62,39 @@
/*
* Allocator
+ *
+ * @note The max_free_index and current_free_index fields are not really
+ * indices, but quantities of BOUNDARY_SIZE big memory blocks.
*/
struct apr_allocator_t {
+ /** largest used index into free[], always < MAX_INDEX */
apr_uint32_t max_index;
+ /** Total size (in BOUNDARY_SIZE multiples) of unused memory before
+ * blocks are given back. @see apr_allocator_max_free_set().
+ * @note Initialized to APR_ALLOCATOR_MAX_FREE_UNLIMITED,
+ * which means to never give back blocks.
+ */
apr_uint32_t max_free_index;
+ /**
+ * Memory size (in BOUNDARY_SIZE multiples) that currently must be freed
+ * before blocks are given back. Range: 0..max_free_index
+ */
apr_uint32_t current_free_index;
#if APR_HAS_THREADS
apr_thread_mutex_t *mutex;
#endif /* APR_HAS_THREADS */
apr_pool_t *owner;
+ /**
+ * Lists of free nodes. Slot 0 is used for oversized nodes,
+ * and the slots 1..MAX_INDEX-1 contain nodes of sizes
+ * (i+1) * BOUNDARY_SIZE. Example for BOUNDARY_INDEX == 12:
+ * slot 0: nodes larger than 81920
+ * slot 1: size 8192
+ * slot 2: size 12288
+ * ...
+ * slot 19: size 81920
+ */
apr_memnode_t *free[MAX_INDEX];
};
@@ -345,7 +368,10 @@ void allocator_free(apr_allocator_t *allocator, apr_memnode_t *node)
max_index = index;
}
allocator->free[index] = node;
- current_free_index -= index;
+ if (current_free_index >= index)
+ current_free_index -= index;
+ else
+ current_free_index = 0;
}
else {
/* This node is too large to keep in a specific size bucket,
@@ -353,7 +379,10 @@ void allocator_free(apr_allocator_t *allocator, apr_memnode_t *node)
*/
node->next = allocator->free[0];
allocator->free[0] = node;
- current_free_index -= index;
+ if (current_free_index >= index)
+ current_free_index -= index;
+ else
+ current_free_index = 0;
}
} while ((node = next) != NULL);
diff --git a/srclib/apr/misc/unix/rand.c b/srclib/apr/misc/unix/rand.c
index 7af77eb5..c1e1e8f6 100644
--- a/srclib/apr/misc/unix/rand.c
+++ b/srclib/apr/misc/unix/rand.c
@@ -101,7 +101,10 @@ APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char *buf,
if ((fd = open(DEV_RANDOM, O_RDONLY)) == -1)
return errno;
- rc = read(fd, buf, length);
+ do {
+ rc = read(fd, buf, length);
+ } while (rc == -1 && errno == EINTR);
+
if (rc < 0) {
int errnum = errno;
close(fd);
diff --git a/srclib/apr/misc/win32/env.c b/srclib/apr/misc/win32/env.c
index abb983d7..644f59b8 100644
--- a/srclib/apr/misc/win32/env.c
+++ b/srclib/apr/misc/win32/env.c
@@ -78,12 +78,9 @@ APR_DECLARE(apr_status_t) apr_env_get(char **value,
wvalue = apr_palloc(pool, size * sizeof(*wvalue));
size = GetEnvironmentVariableW(wenvvar, wvalue, size);
- if (size == 0)
- /* Mid-air collision?. Somebody must've changed the env. var. */
- return APR_INCOMPLETE;
inchars = wcslen(wvalue) + 1;
- outchars = 3 * inchars; /* Enougn for any UTF-8 representation */
+ outchars = 3 * inchars; /* Enough for any UTF-8 representation */
val = apr_palloc(pool, outchars);
status = apr_conv_ucs2_to_utf8(wvalue, &inchars, val, &outchars);
if (status)
diff --git a/srclib/apr/mmap/unix/common.c b/srclib/apr/mmap/unix/common.c
index a9789928..1172f3c8 100644
--- a/srclib/apr/mmap/unix/common.c
+++ b/srclib/apr/mmap/unix/common.c
@@ -32,8 +32,8 @@
APR_DECLARE(apr_status_t) apr_mmap_offset(void **addr, apr_mmap_t *mmap,
apr_off_t offset)
-{
- if (offset < 0 || offset > mmap->size)
+{
+ if (offset < 0 || (apr_size_t)offset > mmap->size)
return APR_EINVAL;
(*addr) = (char *) mmap->mm + offset;
diff --git a/srclib/apr/network_io/unix/inet_pton.c b/srclib/apr/network_io/unix/inet_pton.c
index 22b15390..d41f7496 100644
--- a/srclib/apr/network_io/unix/inet_pton.c
+++ b/srclib/apr/network_io/unix/inet_pton.c
@@ -223,8 +223,8 @@ inet_pton6(const char *src, unsigned char *dst)
* Since some memmove()'s erroneously fail to handle
* overlapping regions, we'll do the shift by hand.
*/
- const int n = tp - colonp;
- int i;
+ const apr_ssize_t n = tp - colonp;
+ apr_ssize_t i;
for (i = 1; i <= n; i++) {
endp[- i] = colonp[n - i];
diff --git a/srclib/apr/network_io/unix/multicast.c b/srclib/apr/network_io/unix/multicast.c
index df98b5a7..8e8ac5ce 100644
--- a/srclib/apr/network_io/unix/multicast.c
+++ b/srclib/apr/network_io/unix/multicast.c
@@ -57,11 +57,13 @@ static void fill_mip_v4(struct ip_mreq *mip, apr_sockaddr_t *mcast,
}
}
-#if APR_HAVE_IPV6
+/* This function is only interested in AF_INET6 sockets, so a noop
+ * "return 0" implementation for the !APR_HAVE_IPV6 build is
+ * sufficient. */
static unsigned int find_if_index(const apr_sockaddr_t *iface)
{
unsigned int index = 0;
-#ifdef HAVE_GETIFADDRS
+#if defined(HAVE_GETIFADDRS) && APR_HAVE_IPV6
struct ifaddrs *ifp, *ifs;
/**
@@ -92,6 +94,7 @@ static unsigned int find_if_index(const apr_sockaddr_t *iface)
return index;
}
+#if APR_HAVE_IPV6
static void fill_mip_v6(struct ipv6_mreq *mip, const apr_sockaddr_t *mcast,
const apr_sockaddr_t *iface)
{
@@ -203,7 +206,7 @@ static apr_status_t do_mcast(int type, apr_socket_t *sock,
fill_mip_v6(&mip6, mcast, iface);
if (setsockopt(sock->socketdes, IPPROTO_IPV6, type,
- &mip6, sizeof(mip6)) == -1) {
+ (const void *) &mip6, sizeof(mip6)) == -1) {
rv = errno;
}
}
@@ -237,7 +240,7 @@ static apr_status_t do_mcast_opt(int type, apr_socket_t *sock,
unsigned int loopopt = value;
type = IPV6_MULTICAST_LOOP;
if (setsockopt(sock->socketdes, IPPROTO_IPV6, type,
- &loopopt, sizeof(loopopt)) == -1) {
+ (const void *) &loopopt, sizeof(loopopt)) == -1) {
rv = errno;
}
}
@@ -323,7 +326,7 @@ APR_DECLARE(apr_status_t) apr_mcast_interface(apr_socket_t *sock,
else if (sock_is_ipv6(sock)) {
unsigned int idx = find_if_index(iface);
if (setsockopt(sock->socketdes, IPPROTO_IPV6, IPV6_MULTICAST_IF,
- &idx, sizeof(idx)) == -1) {
+ (const void *) &idx, sizeof(idx)) == -1) {
rv = errno;
}
}
diff --git a/srclib/apr/network_io/unix/sendrecv.c b/srclib/apr/network_io/unix/sendrecv.c
index ec33a326..beb281db 100644
--- a/srclib/apr/network_io/unix/sendrecv.c
+++ b/srclib/apr/network_io/unix/sendrecv.c
@@ -148,6 +148,8 @@ apr_status_t apr_socket_recvfrom(apr_sockaddr_t *from, apr_socket_t *sock,
apr_size_t *len)
{
apr_ssize_t rv;
+
+ from->salen = sizeof(from->sa);
do {
rv = recvfrom(sock->socketdes, buf, (*len), flags,
@@ -172,6 +174,9 @@ apr_status_t apr_socket_recvfrom(apr_sockaddr_t *from, apr_socket_t *sock,
return errno;
}
+ apr_sockaddr_vars_set(from, from->sa.sin.sin_family,
+ ntohs(from->sa.sin.sin_port));
+
(*len) = rv;
if (rv == 0 && sock->type == SOCK_STREAM) {
return APR_EOF;
diff --git a/srclib/apr/network_io/win32/sendrecv.c b/srclib/apr/network_io/win32/sendrecv.c
index faab51d4..80adccdd 100644
--- a/srclib/apr/network_io/win32/sendrecv.c
+++ b/srclib/apr/network_io/win32/sendrecv.c
@@ -190,12 +190,18 @@ APR_DECLARE(apr_status_t) apr_socket_recvfrom(apr_sockaddr_t *from,
{
apr_ssize_t rv;
+ from->salen = sizeof(from->sa);
+
rv = recvfrom(sock->socketdes, buf, (int)*len, flags,
(struct sockaddr*)&from->sa, &from->salen);
if (rv == SOCKET_ERROR) {
(*len) = 0;
return apr_get_netos_error();
}
+
+ apr_sockaddr_vars_set(from, from->sa.sin.sin_family,
+ ntohs(from->sa.sin.sin_port));
+
(*len) = rv;
if (rv == 0 && sock->type == SOCK_STREAM)
return APR_EOF;
diff --git a/srclib/apr/random/unix/apr_random.c b/srclib/apr/random/unix/apr_random.c
index f574b590..41887d4b 100644
--- a/srclib/apr/random/unix/apr_random.c
+++ b/srclib/apr/random/unix/apr_random.c
@@ -219,7 +219,7 @@ APR_DECLARE(void) apr_random_add_entropy(apr_random_t *g,const void *entropy_,
p->pool[p->bytes++] = entropy[n];
if (p->bytes == g->rehash_size) {
- unsigned int r;
+ apr_size_t r;
for (r = 0; r < p->bytes/2; r+=g->pool_hash->size)
hash(g->pool_hash,p->pool+r,p->pool+r*2,g->pool_hash->size*2);
@@ -246,7 +246,7 @@ static void apr_random_bytes(apr_random_t *g,unsigned char *random,
apr_size_t n;
for (n = 0; n < bytes; ) {
- int l;
+ apr_size_t l;
if (g->random_bytes == 0) {
apr_random_block(g,g->randomness);
diff --git a/srclib/apr/renames_pending b/srclib/apr/renames_pending
deleted file mode 100644
index ca007a72..00000000
--- a/srclib/apr/renames_pending
+++ /dev/null
@@ -1,39 +0,0 @@
-Pending symbol renames for APR [for some discussion yet]
-
-apr_file_info_t from apr_finfo_t
-apr_file_attrs_t from apr_fileattrs_t
-apr_file_seek_where_t from apr_seek_where_t
-
-#apr_filepath_name_get from apr_filename_of_pathname
-
-apr_lock_mech_e from apr_lockmech_e
-
-#apr_gid_get from apr_get_groupid
-#apr_gid_name_get from apr_get_groupname
-#apr_gid_name_get from apr_group_name_get
-#apr_gid_compare from apr_compare_groups
-
-#apr_socket_shutdown from apr_shutdown
-#apr_socket_bind from apr_bind
-#apr_socket_listen from apr_listen
-#apr_socket_accept from apr_accept
-#apr_socket_connect from apr_connect
-#apr_socket_send from apr_send
-#apr_socket_sendv from apr_sendv
-#apr_socket_sendto from apr_sendto
-#apr_socket_recvfrom from apr_recvfrom
-#apr_socket_sendfile from apr_sendfile
-#apr_socket_recv from apr_recv
-#apr_socket_inherit_set from apr_socket_set_inherit
-#apr_socket_inherit_unset from apr_socket_unset_inherit
-
-
-#apr_time_exp_gmt_get from apr_implode_gmt
-apr_time_interval_t from apr_interval_time_t
-apr_time_interval_short_t from apr_short_interval_time_t
-
-#apr_uid_homepath_get from apr_get_home_directory
-#apr_uid_get from apr_get_userid
-#apr_uid_current from apr_current_userid
-#apr_uid_compare from apr_compare_users
-#apr_uid_name_get from apr_get_username
diff --git a/srclib/apr/shmem/win32/shm.c b/srclib/apr/shmem/win32/shm.c
index a7260bdb..7bce1331 100644
--- a/srclib/apr/shmem/win32/shm.c
+++ b/srclib/apr/shmem/win32/shm.c
@@ -40,10 +40,10 @@ static apr_status_t shm_cleanup(void* shm)
apr_status_t rv = APR_SUCCESS;
apr_shm_t *m = shm;
- if (UnmapViewOfFile(m->memblk)) {
+ if (!UnmapViewOfFile(m->memblk)) {
rv = apr_get_os_error();
}
- if (CloseHandle(m->hMap)) {
+ if (!CloseHandle(m->hMap)) {
return (rv != APR_SUCCESS) ? rv : apr_get_os_error();
}
/* ### Do we want to make a point of unlinking m->file here?
diff --git a/srclib/apr/strings/apr_snprintf.c b/srclib/apr/strings/apr_snprintf.c
index 74bdb951..46673080 100644
--- a/srclib/apr/strings/apr_snprintf.c
+++ b/srclib/apr/strings/apr_snprintf.c
@@ -51,19 +51,19 @@ typedef enum {
#ifndef TRUE
#define TRUE 1
#endif
-#define NUL '\0'
-#define WIDE_INT long
-
-typedef WIDE_INT wide_int;
-typedef unsigned WIDE_INT u_wide_int;
-typedef apr_int64_t widest_int;
-#ifdef __TANDEM
-/* Although Tandem supports "long long" there is no unsigned variant. */
-typedef unsigned long u_widest_int;
-#else
-typedef apr_uint64_t u_widest_int;
+
+/* For APR 1.2.x only (solved globally in 1.3.0) to be portable
+ * to non-2's compliment architectures, fall through to the 64
+ * bit code path for the signed or unsigned value 0x...80000000
+ */
+#ifndef INT32_MIN
+#define INT32_MIN -(0x7fffffff)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX 0x7fffffff
#endif
-typedef int bool_int;
+
+#define NUL '\0'
#define S_NULL "(null)"
#define S_NULL_LEN 6
@@ -337,15 +337,14 @@ while (width > len)
* (conv_10_quad), the other when we don't (conv_10). We're assuming the
* latter is faster.
*/
-static char *conv_10(register wide_int num, register bool_int is_unsigned,
- register bool_int *is_negative, char *buf_end,
+static char *conv_10(register apr_int32_t num, register int is_unsigned,
+ register int *is_negative, char *buf_end,
register apr_size_t *len)
{
register char *p = buf_end;
- register u_wide_int magnitude;
+ register apr_uint32_t magnitude = num;
if (is_unsigned) {
- magnitude = (u_wide_int) num;
*is_negative = FALSE;
}
else {
@@ -361,19 +360,16 @@ static char *conv_10(register wide_int num, register bool_int is_unsigned,
* d. add 1
*/
if (*is_negative) {
- wide_int t = num + 1;
-
- magnitude = ((u_wide_int) -t) + 1;
+ apr_int32_t t = num + 1;
+ magnitude = ((apr_uint32_t) -t) + 1;
}
- else
- magnitude = (u_wide_int) num;
}
/*
* We use a do-while loop so that we write at least 1 digit
*/
do {
- register u_wide_int new_magnitude = magnitude / 10;
+ register apr_uint32_t new_magnitude = magnitude / 10;
*--p = (char) (magnitude - new_magnitude * 10 + '0');
magnitude = new_magnitude;
@@ -384,25 +380,23 @@ static char *conv_10(register wide_int num, register bool_int is_unsigned,
return (p);
}
-static char *conv_10_quad(widest_int num, register bool_int is_unsigned,
- register bool_int *is_negative, char *buf_end,
+static char *conv_10_quad(apr_int64_t num, register int is_unsigned,
+ register int *is_negative, char *buf_end,
register apr_size_t *len)
{
register char *p = buf_end;
- u_widest_int magnitude;
+ apr_uint64_t magnitude = num;
/*
* We see if we can use the faster non-quad version by checking the
* number against the largest long value it can be. If <=, we
* punt to the quicker version.
*/
- if (((u_widest_int)num <= (u_widest_int)ULONG_MAX && is_unsigned)
- || (num <= LONG_MAX && num >= LONG_MIN && !is_unsigned))
- return(conv_10( (wide_int)num, is_unsigned, is_negative,
- buf_end, len));
+ if ((magnitude <= APR_UINT32_MAX && is_unsigned)
+ || (num <= INT32_MAX && num >= INT32_MIN && !is_unsigned))
+ return(conv_10((apr_int32_t)num, is_unsigned, is_negative, buf_end, len));
if (is_unsigned) {
- magnitude = (u_widest_int) num;
*is_negative = FALSE;
}
else {
@@ -418,19 +412,16 @@ static char *conv_10_quad(widest_int num, register bool_int is_unsigned,
* d. add 1
*/
if (*is_negative) {
- widest_int t = num + 1;
-
- magnitude = ((u_widest_int) -t) + 1;
+ apr_int64_t t = num + 1;
+ magnitude = ((apr_uint64_t) -t) + 1;
}
- else
- magnitude = (u_widest_int) num;
}
/*
* We use a do-while loop so that we write at least 1 digit
*/
do {
- u_widest_int new_magnitude = magnitude / 10;
+ apr_uint64_t new_magnitude = magnitude / 10;
*--p = (char) (magnitude - new_magnitude * 10 + '0');
magnitude = new_magnitude;
@@ -441,13 +432,11 @@ static char *conv_10_quad(widest_int num, register bool_int is_unsigned,
return (p);
}
-
-
static char *conv_in_addr(struct in_addr *ia, char *buf_end, apr_size_t *len)
{
unsigned addr = ntohl(ia->s_addr);
char *p = buf_end;
- bool_int is_negative;
+ int is_negative;
apr_size_t sub_len;
p = conv_10((addr & 0x000000FF) , TRUE, &is_negative, p, &sub_len);
@@ -463,11 +452,12 @@ static char *conv_in_addr(struct in_addr *ia, char *buf_end, apr_size_t *len)
}
-
+/* Must be passed a buffer of size NUM_BUF_SIZE where buf_end points
+ * to 1 byte past the end of the buffer. */
static char *conv_apr_sockaddr(apr_sockaddr_t *sa, char *buf_end, apr_size_t *len)
{
char *p = buf_end;
- bool_int is_negative;
+ int is_negative;
apr_size_t sub_len;
char *ipaddr_str;
@@ -528,7 +518,7 @@ static char *conv_os_thread_t(apr_os_thread_t *tid, char *buf_end, apr_size_t *l
* in buf).
*/
static char *conv_fp(register char format, register double num,
- boolean_e add_dp, int precision, bool_int *is_negative,
+ boolean_e add_dp, int precision, int *is_negative,
char *buf, apr_size_t *len)
{
register char *s = buf;
@@ -584,12 +574,12 @@ static char *conv_fp(register char format, register double num,
if (format != 'f') {
char temp[EXPONENT_LENGTH]; /* for exponent conversion */
apr_size_t t_len;
- bool_int exponent_is_negative;
+ int exponent_is_negative;
*s++ = format; /* either e or E */
decimal_point--;
if (decimal_point != 0) {
- p = conv_10((wide_int) decimal_point, FALSE, &exponent_is_negative,
+ p = conv_10((apr_int32_t) decimal_point, FALSE, &exponent_is_negative,
&temp[EXPONENT_LENGTH], &t_len);
*s++ = exponent_is_negative ? '-' : '+';
@@ -626,7 +616,7 @@ static char *conv_fp(register char format, register double num,
* As with conv_10, we have a faster version which is used when
* the number isn't quad size.
*/
-static char *conv_p2(register u_wide_int num, register int nbits,
+static char *conv_p2(register apr_uint32_t num, register int nbits,
char format, char *buf_end, register apr_size_t *len)
{
register int mask = (1 << nbits) - 1;
@@ -645,7 +635,7 @@ static char *conv_p2(register u_wide_int num, register int nbits,
return (p);
}
-static char *conv_p2_quad(u_widest_int num, register int nbits,
+static char *conv_p2_quad(apr_uint64_t num, register int nbits,
char format, char *buf_end, register apr_size_t *len)
{
register int mask = (1 << nbits) - 1;
@@ -654,8 +644,8 @@ static char *conv_p2_quad(u_widest_int num, register int nbits,
static const char upper_digits[] = "0123456789ABCDEF";
register const char *digits = (format == 'X') ? upper_digits : low_digits;
- if (num <= ULONG_MAX)
- return(conv_p2((u_wide_int)num, nbits, format, buf_end, len));
+ if (num <= APR_UINT32_MAX)
+ return(conv_p2((apr_uint32_t)num, nbits, format, buf_end, len));
do {
*--p = digits[num & mask];
@@ -714,10 +704,10 @@ APR_DECLARE(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *),
char prefix_char;
double fp_num;
- widest_int i_quad = (widest_int) 0;
- u_widest_int ui_quad;
- wide_int i_num = (wide_int) 0;
- u_wide_int ui_num;
+ apr_int64_t i_quad = 0;
+ apr_uint64_t ui_quad;
+ apr_int32_t i_num = 0;
+ apr_uint32_t ui_num;
char num_buf[NUM_BUF_SIZE];
char char_buf[2]; /* for printing %% and %<unknown> */
@@ -735,7 +725,7 @@ APR_DECLARE(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *),
boolean_e print_blank;
boolean_e adjust_precision;
boolean_e adjust_width;
- bool_int is_negative;
+ int is_negative;
sp = vbuff->curpos;
bep = vbuff->endpos;
@@ -868,17 +858,17 @@ APR_DECLARE(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *),
switch (*fmt) {
case 'u':
if (var_type == IS_QUAD) {
- i_quad = va_arg(ap, u_widest_int);
+ i_quad = va_arg(ap, apr_uint64_t);
s = conv_10_quad(i_quad, 1, &is_negative,
&num_buf[NUM_BUF_SIZE], &s_len);
}
else {
if (var_type == IS_LONG)
- i_num = (wide_int) va_arg(ap, u_wide_int);
+ i_num = (apr_int32_t) va_arg(ap, apr_uint32_t);
else if (var_type == IS_SHORT)
- i_num = (wide_int) (unsigned short) va_arg(ap, unsigned int);
+ i_num = (apr_int32_t) (unsigned short) va_arg(ap, unsigned int);
else
- i_num = (wide_int) va_arg(ap, unsigned int);
+ i_num = (apr_int32_t) va_arg(ap, unsigned int);
s = conv_10(i_num, 1, &is_negative,
&num_buf[NUM_BUF_SIZE], &s_len);
}
@@ -888,17 +878,17 @@ APR_DECLARE(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *),
case 'd':
case 'i':
if (var_type == IS_QUAD) {
- i_quad = va_arg(ap, widest_int);
+ i_quad = va_arg(ap, apr_int64_t);
s = conv_10_quad(i_quad, 0, &is_negative,
&num_buf[NUM_BUF_SIZE], &s_len);
}
else {
if (var_type == IS_LONG)
- i_num = (wide_int) va_arg(ap, wide_int);
+ i_num = va_arg(ap, apr_int32_t);
else if (var_type == IS_SHORT)
- i_num = (wide_int) (short) va_arg(ap, int);
+ i_num = (short) va_arg(ap, int);
else
- i_num = (wide_int) va_arg(ap, int);
+ i_num = va_arg(ap, int);
s = conv_10(i_num, 0, &is_negative,
&num_buf[NUM_BUF_SIZE], &s_len);
}
@@ -915,17 +905,17 @@ APR_DECLARE(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *),
case 'o':
if (var_type == IS_QUAD) {
- ui_quad = va_arg(ap, u_widest_int);
+ ui_quad = va_arg(ap, apr_uint64_t);
s = conv_p2_quad(ui_quad, 3, *fmt,
&num_buf[NUM_BUF_SIZE], &s_len);
}
else {
if (var_type == IS_LONG)
- ui_num = (u_wide_int) va_arg(ap, u_wide_int);
+ ui_num = va_arg(ap, apr_uint32_t);
else if (var_type == IS_SHORT)
- ui_num = (u_wide_int) (unsigned short) va_arg(ap, unsigned int);
+ ui_num = (unsigned short) va_arg(ap, unsigned int);
else
- ui_num = (u_wide_int) va_arg(ap, unsigned int);
+ ui_num = va_arg(ap, unsigned int);
s = conv_p2(ui_num, 3, *fmt,
&num_buf[NUM_BUF_SIZE], &s_len);
}
@@ -940,17 +930,17 @@ APR_DECLARE(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *),
case 'x':
case 'X':
if (var_type == IS_QUAD) {
- ui_quad = va_arg(ap, u_widest_int);
+ ui_quad = va_arg(ap, apr_uint64_t);
s = conv_p2_quad(ui_quad, 4, *fmt,
&num_buf[NUM_BUF_SIZE], &s_len);
}
else {
if (var_type == IS_LONG)
- ui_num = (u_wide_int) va_arg(ap, u_wide_int);
+ ui_num = va_arg(ap, apr_uint32_t);
else if (var_type == IS_SHORT)
- ui_num = (u_wide_int) (unsigned short) va_arg(ap, unsigned int);
+ ui_num = (unsigned short) va_arg(ap, unsigned int);
else
- ui_num = (u_wide_int) va_arg(ap, unsigned int);
+ ui_num = va_arg(ap, unsigned int);
s = conv_p2(ui_num, 4, *fmt,
&num_buf[NUM_BUF_SIZE], &s_len);
}
@@ -1029,7 +1019,7 @@ APR_DECLARE(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *),
#endif
if (!s) {
s = conv_fp(*fmt, fp_num, alternate_form,
- (adjust_precision == NO) ? FLOAT_DIGITS : precision,
+ (int)((adjust_precision == NO) ? FLOAT_DIGITS : precision),
&is_negative, &num_buf[1], &s_len);
if (is_negative)
prefix_char = '-';
@@ -1050,7 +1040,7 @@ APR_DECLARE(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *),
/*
* * We use &num_buf[ 1 ], so that we have room for the sign
*/
- s = apr_gcvt(va_arg(ap, double), precision, &num_buf[1],
+ s = apr_gcvt(va_arg(ap, double), (int) precision, &num_buf[1],
alternate_form);
if (*s == '-')
prefix_char = *s++;
@@ -1088,7 +1078,7 @@ APR_DECLARE(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *),
case 'n':
if (var_type == IS_QUAD)
- *(va_arg(ap, widest_int *)) = cc;
+ *(va_arg(ap, apr_int64_t *)) = cc;
else if (var_type == IS_LONG)
*(va_arg(ap, long *)) = cc;
else if (var_type == IS_SHORT)
@@ -1112,14 +1102,14 @@ APR_DECLARE(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *),
*/
case 'p':
#if APR_SIZEOF_VOIDP == 8
- if (sizeof(void *) <= sizeof(u_widest_int)) {
- ui_quad = (u_widest_int) va_arg(ap, void *);
+ if (sizeof(void *) <= sizeof(apr_uint64_t)) {
+ ui_quad = (apr_uint64_t) va_arg(ap, void *);
s = conv_p2_quad(ui_quad, 4, 'x',
&num_buf[NUM_BUF_SIZE], &s_len);
}
#else
- if (sizeof(void *) <= sizeof(u_wide_int)) {
- ui_num = (u_wide_int) va_arg(ap, void *);
+ if (sizeof(void *) <= sizeof(apr_uint32_t)) {
+ ui_num = (apr_uint32_t) va_arg(ap, void *);
s = conv_p2(ui_num, 4, 'x',
&num_buf[NUM_BUF_SIZE], &s_len);
}
diff --git a/srclib/apr/test/Makefile.in b/srclib/apr/test/Makefile.in
index 4e4640d6..a54117b5 100644
--- a/srclib/apr/test/Makefile.in
+++ b/srclib/apr/test/Makefile.in
@@ -4,23 +4,49 @@ VPATH = @srcdir@
# PROGRAMS includes all test programs built on this platform.
# STDTEST_PORTABLE
# test programs invoked via standard user interface, run on all platforms
+# TESTS
+# test modules invoked through the abts suite (./testall)
# STDTEST_NONPORTABLE
# test programs invoked via standard user interface, not portable
# OTHER_PROGRAMS
# programs such as sendfile, that have to be invoked in a special sequence
# or with special parameters
+# TESTALL_COMPONENTS
+# programs such as globalmutexchild which the various TESTS will invoke
+# to validate process creation, pipes, dso mechansims and so forth
STDTEST_PORTABLE = \
testlockperf@EXEEXT@ \
testmutexscope@EXEEXT@ \
testall@EXEEXT@
+TESTS = testtime.lo teststr.lo testvsn.lo testipsub.lo \
+ testmmap.lo testud.lo testtable.lo testsleep.lo testpools.lo \
+ testfmt.lo testfile.lo testdir.lo testfileinfo.lo testrand.lo \
+ testdso.lo testoc.lo testdup.lo testsockets.lo testproc.lo \
+ testpoll.lo testlock.lo testsockopt.lo testpipe.lo testthread.lo \
+ testhash.lo testargs.lo testnames.lo testuser.lo testpath.lo \
+ testenv.lo testprocmutex.lo testrand2.lo testfnmatch.lo \
+ testatomic.lo testflock.lo testshm.lo testsock.lo testglobalmutex.lo \
+ teststrnatcmp.lo testfilecopy.lo testtemp.lo testlfs.lo
+
OTHER_PROGRAMS = \
- sendfile@EXEEXT@ \
+ sendfile@EXEEXT@
+
+TESTALL_COMPONENTS = \
+ globalmutexchild@EXEEXT@ \
+ libmod_test.la \
+ mod_test.la \
+ occhild@EXEEXT@ \
+ proc_child@EXEEXT@ \
+ readchild@EXEEXT@ \
+ sockchild@EXEEXT@ \
testshmproducer@EXEEXT@ \
- testshmconsumer@EXEEXT@
+ testshmconsumer@EXEEXT@ \
+ tryread@EXEEXT@
-PROGRAMS = $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE) $(OTHER_PROGRAMS)
+PROGRAMS = $(TESTALL_COMPONENTS) $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE) \
+ $(OTHER_PROGRAMS)
TARGETS = $(PROGRAMS)
@@ -29,10 +55,9 @@ TARGETS = $(PROGRAMS)
LOCAL_LIBS=../lib@APR_LIBNAME@.la
-CLEAN_TARGETS = testfile.tmp mod_test.slo proc_child@EXEEXT@ occhild@EXEEXT@ \
- readchild@EXEEXT@ tryread@EXEEXT@ sockchild@EXEEXT@ \
- globalmutexchild@EXEEXT@ lfstests/large.bin \
+CLEAN_TARGETS = testfile.tmp lfstests/large.bin \
data/test*.txt data/test*.dat
+
CLEAN_SUBDIRS = internal
INCDIR=../include
@@ -40,78 +65,96 @@ INCLUDES=-I$(INCDIR) -I$(srcdir)/../include
# link programs using -no-install to get real executables not
# libtool wrapper scripts which link an executable when first run.
-LINK_PROG = $(LIBTOOL) $(LTFLAGS) --mode=link $(LT_LDFLAGS) $(COMPILE) @LT_NO_INSTALL@ $(ALL_LDFLAGS) -o $@
+LINK_PROG = $(LIBTOOL) $(LTFLAGS) --mode=link $(LT_LDFLAGS) $(COMPILE) \
+ @LT_NO_INSTALL@ $(ALL_LDFLAGS) -o $@
-check: $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE)
- for prog in $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE); do \
- ./$$prog; \
- if test $$? = 255; then \
- echo "$$prog failed"; \
- break; \
- fi; \
- done
+# STDTEST_PORTABLE;
-occhild@EXEEXT@: occhild.lo $(LOCAL_LIBS)
- $(LINK_PROG) occhild.lo $(LOCAL_LIBS) $(ALL_LIBS)
+abts.lo: $(srcdir)/abts.c $(srcdir)/abts.h $(srcdir)/abts_tests.h \
+ $(srcdir)/testutil.h
-sockchild@EXEEXT@: sockchild.lo $(LOCAL_LIBS)
- $(LINK_PROG) sockchild.lo $(LOCAL_LIBS) $(ALL_LIBS)
+testutil.lo: $(srcdir)/abts.c $(srcdir)/abts.h $(srcdir)/abts_tests.h \
+ $(srcdir)/testutil.h
-readchild@EXEEXT@: readchild.lo $(LOCAL_LIBS)
- $(LINK_PROG) readchild.lo $(LOCAL_LIBS) $(ALL_LIBS)
+OBJECTS_testall = abts.lo testutil.lo $(TESTS) $(LOCAL_LIBS)
+testall@EXEEXT@: $(OBJECTS_testall)
+ $(LINK_PROG) $(OBJECTS_testall) $(ALL_LIBS)
+# For VPATH builds; where we have no ./data, copy us some data
+# if we wait until 'make check', then 'make; ./testall' fails;
+ if test ! -d "./data"; then cp -r $(srcdir)/data data; fi
-globalmutexchild@EXEEXT@: globalmutexchild.lo $(LOCAL_LIBS)
- $(LINK_PROG) globalmutexchild.lo $(LOCAL_LIBS) $(ALL_LIBS)
+OBJECTS_testlockperf = testlockperf.lo $(LOCAL_LIBS)
+testlockperf@EXEEXT@: $(OBJECTS_testlockperf)
+ $(LINK_PROG) $(OBJECTS_testlockperf) $(ALL_LIBS)
-tryread@EXEEXT@: tryread.lo $(LOCAL_LIBS)
- $(LINK_PROG) tryread.lo $(LOCAL_LIBS) $(ALL_LIBS)
+OBJECTS_testmutexscope = testmutexscope.lo $(LOCAL_LIBS)
+testmutexscope@EXEEXT@: $(OBJECTS_testmutexscope)
+ $(LINK_PROG) $(OBJECTS_testmutexscope) $(ALL_LIBS)
-proc_child@EXEEXT@: proc_child.lo $(LOCAL_LIBS)
- $(LINK_PROG) proc_child.lo $(LOCAL_LIBS) $(ALL_LIBS)
+# OTHER_PROGRAMS;
-# FIXME: -prefer-pic is only supported with libtool-1.4+
-mod_test.slo: $(srcdir)/mod_test.c
- $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE) -prefer-pic -c $(srcdir)/mod_test.c && touch $@
+OBJECTS_sendfile = sendfile.lo $(LOCAL_LIBS)
+sendfile@EXEEXT@: $(OBJECTS_sendfile)
+ $(LINK_PROG) $(OBJECTS_sendfile) $(ALL_LIBS)
-mod_test.la: mod_test.slo $(LOCAL_LIBS)
- $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -rpath `pwd` -avoid-version -module mod_test.lo $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@
+# TESTALL_COMPONENTS;
-libmod_test.la: mod_test.slo $(LOCAL_LIBS)
- $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -rpath `pwd` -avoid-version mod_test.lo $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@ $(LOCAL_LIBS) $(ALL_LIBS)
+OBJECTS_globalmutexchild = globalmutexchild.lo $(LOCAL_LIBS)
+globalmutexchild@EXEEXT@: $(OBJECTS_globalmutexchild)
+ $(LINK_PROG) $(OBJECTS_globalmutexchild) $(ALL_LIBS)
-testlockperf@EXEEXT@: testlockperf.lo $(LOCAL_LIBS)
- $(LINK_PROG) testlockperf.lo $(LOCAL_LIBS) $(ALL_LIBS)
+# Note: -prefer-pic is only supported with libtool-1.4+
+mod_test.lo: $(srcdir)/mod_test.c
+ $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE) -prefer-pic -o $@ \
+ -c $(srcdir)/mod_test.c
-sendfile@EXEEXT@: sendfile.lo $(LOCAL_LIBS)
- $(LINK_PROG) sendfile.lo $(LOCAL_LIBS) $(ALL_LIBS)
+OBJECTS_mod_test = mod_test.lo
+mod_test.la: $(OBJECTS_mod_test)
+ $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -rpath `pwd` -module \
+ -avoid-version $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@ \
+ $(OBJECTS_mod_test)
-testshmproducer@EXEEXT@: testshmproducer.lo $(LOCAL_LIBS)
- $(LINK_PROG) testshmproducer.lo $(LOCAL_LIBS) $(ALL_LIBS)
+OBJECTS_libmod_test = mod_test.lo $(LOCAL_LIBS)
+libmod_test.la: $(OBJECTS_libmod_test)
+ $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -rpath `pwd` \
+ -avoid-version $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@ \
+ $(OBJECTS_libmod_test) $(ALL_LIBS)
-testshmconsumer@EXEEXT@: testshmconsumer.lo $(LOCAL_LIBS)
- $(LINK_PROG) testshmconsumer.lo $(LOCAL_LIBS) $(ALL_LIBS)
+OBJECTS_occhild = occhild.lo $(LOCAL_LIBS)
+occhild@EXEEXT@: $(OBJECTS_occhild)
+ $(LINK_PROG) $(OBJECTS_occhild) $(ALL_LIBS)
-testprocmutex@EXEEXT@: testprocmutex.lo $(LOCAL_LIBS)
- $(LINK_PROG) testprocmutex.lo $(LOCAL_LIBS) $(ALL_LIBS)
+OBJECTS_proc_child = proc_child.lo $(LOCAL_LIBS)
+proc_child@EXEEXT@: $(OBJECTS_proc_child)
+ $(LINK_PROG) $(OBJECTS_proc_child) $(ALL_LIBS)
-testmutexscope@EXEEXT@: testmutexscope.lo $(LOCAL_LIBS)
- $(LINK_PROG) testmutexscope.lo $(LOCAL_LIBS) $(ALL_LIBS)
+OBJECTS_readchild = readchild.lo $(LOCAL_LIBS)
+readchild@EXEEXT@: $(OBJECTS_readchild)
+ $(LINK_PROG) $(OBJECTS_readchild) $(ALL_LIBS)
-TESTS = testutil.lo testtime.lo teststr.lo testvsn.lo testipsub.lo \
- testmmap.lo testud.lo testtable.lo testsleep.lo testpools.lo \
- testfmt.lo testfile.lo testdir.lo testfileinfo.lo testrand.lo \
- testdso.lo testoc.lo testdup.lo testsockets.lo testproc.lo \
- testpoll.lo testlock.lo testsockopt.lo testpipe.lo testthread.lo \
- testhash.lo testargs.lo testnames.lo testuser.lo testpath.lo \
- testenv.lo testprocmutex.lo testrand2.lo testfnmatch.lo \
- testatomic.lo testflock.lo testshm.lo testsock.lo testglobalmutex.lo \
- teststrnatcmp.lo testfilecopy.lo testtemp.lo testlfs.lo
+OBJECTS_sockchild = sockchild.lo $(LOCAL_LIBS)
+sockchild@EXEEXT@: $(OBJECTS_sockchild)
+ $(LINK_PROG) $(OBJECTS_sockchild) $(ALL_LIBS)
+
+OBJECTS_testshmconsumer = testshmconsumer.lo $(LOCAL_LIBS)
+testshmconsumer@EXEEXT@: $(OBJECTS_testshmconsumer) $(LOCAL_LIBS)
+ $(LINK_PROG) $(OBJECTS_testshmconsumer) $(ALL_LIBS)
+
+OBJECTS_testshmproducer = testshmproducer.lo $(LOCAL_LIBS)
+testshmproducer@EXEEXT@: $(OBJECTS_testshmproducer)
+ $(LINK_PROG) $(OBJECTS_testshmproducer) $(ALL_LIBS)
-testall@EXEEXT@: $(TESTS) mod_test.la libmod_test.la occhild@EXEEXT@ \
- readchild@EXEEXT@ abts.lo proc_child@EXEEXT@ \
- tryread@EXEEXT@ sockchild@EXEEXT@ globalmutexchild@EXEEXT@ \
- $(LOCAL_LIBS)
- $(LINK_PROG) $(TESTS) abts.lo $(LOCAL_LIBS) $(ALL_LIBS)
+OBJECTS_tryread = tryread.lo $(LOCAL_LIBS)
+tryread@EXEEXT@: $(OBJECTS_tryread)
+ $(LINK_PROG) $(OBJECTS_tryread) $(ALL_LIBS)
+check: $(TESTALL_COMPONENTS) $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE)
+ for prog in $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE); do \
+ ./$$prog; \
+ if test $$? = 255; then \
+ echo "$$prog failed"; \
+ break; \
+ fi; \
+ done
# DO NOT REMOVE
diff --git a/srclib/apr/test/Makefile.win b/srclib/apr/test/Makefile.win
index 0594694d..019124fb 100644
--- a/srclib/apr/test/Makefile.win
+++ b/srclib/apr/test/Makefile.win
@@ -1,22 +1,113 @@
# PROGRAMS includes all test programs built on this platform.
# STDTEST_PORTABLE
# test programs invoked via standard user interface, run on all platforms
+# TESTS
+# test modules invoked through the abts suite (./testall)
# STDTEST_NONPORTABLE
# test programs invoked via standard user interface, not portable
# OTHER_PROGRAMS
# programs such as sendfile, that have to be invoked in a special sequence
# or with special parameters
+# TESTALL_COMPONENTS
+# programs such as globalmutexchild which the various TESTS will invoke
+# to validate process creation, pipes, dso mechansims and so forth
+
+# Windows Specific;
+# MODEL
+# dynamic or static - refers to which set of bindings are desired
+# and controls which libraries (apr-1 or libapr-1) will be linked.
+# OUTDIR
+# the library path of the libraries, and also the path within test/
+# where all of the tests for that library will be built
+
+!IFNDEF MODEL
+MODEL=dynamic
+!ENDIF
+
+INCDIR=../include
+
+!IFNDEF OUTDIR
+!IF "$(MODEL)" == "static"
+OUTDIR=LibR
+!ELSE
+OUTDIR=Release
+!ENDIF
+
+!IF [$(COMSPEC) /c cl /nologo /? | find "x64" >NUL ] == 0
+OUTDIR=x64\$(OUTDIR)
+!ENDIF
+!ENDIF
+
+!IF !EXIST("$(OUTDIR)\.")
+!IF ([$(COMSPEC) /C mkdir $(OUTDIR)] == 0)
+!ENDIF
+!ENDIF
+
+!IFNDEF INTDIR
+INTDIR=$(OUTDIR)
+!ELSE
+!IF !EXIST("$(INTDIR)\.")
+!IF ([$(COMSPEC) /C mkdir $(INTDIR)] == 0)
+!ENDIF
+!ENDIF
+!ENDIF
+
+!MESSAGE Building tests into $(OUTDIR) for $(MODEL)
STDTEST_PORTABLE = \
- testlockperf.exe \
- testshmproducer.exe \
- testshmconsumer.exe \
- testmutexscope.exe \
- testall.exe
+ $(OUTDIR)\testapp.exe \
+ $(OUTDIR)\testall.exe \
+ $(OUTDIR)\testlockperf.exe \
+ $(OUTDIR)\testmutexscope.exe
+
+OTHER_PROGRAMS = \
+ $(OUTDIR)\sendfile.exe
+
+TESTALL_COMPONENTS = \
+ $(OUTDIR)\mod_test.dll \
+ $(OUTDIR)\occhild.exe \
+ $(OUTDIR)\readchild.exe \
+ $(OUTDIR)\proc_child.exe \
+ $(OUTDIR)\tryread.exe \
+ $(OUTDIR)\sockchild.exe \
+ $(OUTDIR)\testshmproducer.exe \
+ $(OUTDIR)\testshmconsumer.exe \
+ $(OUTDIR)\globalmutexchild.exe
+
+ALL_TESTS = $(INTDIR)\testutil.obj $(INTDIR)\testtime.obj \
+ $(INTDIR)\teststr.obj $(INTDIR)\testvsn.obj \
+ $(INTDIR)\testipsub.obj $(INTDIR)\testmmap.obj \
+ $(INTDIR)\testud.obj $(INTDIR)\testtable.obj \
+ $(INTDIR)\testsleep.obj $(INTDIR)\testpools.obj \
+ $(INTDIR)\testfmt.obj $(INTDIR)\testfile.obj \
+ $(INTDIR)\testdir.obj $(INTDIR)\testfileinfo.obj \
+ $(INTDIR)\testrand.obj $(INTDIR)\testdso.obj \
+ $(INTDIR)\testoc.obj $(INTDIR)\testdup.obj \
+ $(INTDIR)\testsockets.obj $(INTDIR)\testproc.obj \
+ $(INTDIR)\testpoll.obj $(INTDIR)\testlock.obj \
+ $(INTDIR)\testsockopt.obj $(INTDIR)\testpipe.obj \
+ $(INTDIR)\testthread.obj $(INTDIR)\testhash.obj \
+ $(INTDIR)\testargs.obj $(INTDIR)\testnames.obj \
+ $(INTDIR)\testuser.obj $(INTDIR)\testpath.obj \
+ $(INTDIR)\testenv.obj $(INTDIR)\testprocmutex.obj \
+ $(INTDIR)\testfnmatch.obj $(INTDIR)\testatomic.obj \
+ $(INTDIR)\testflock.obj $(INTDIR)\testshm.obj \
+ $(INTDIR)\testsock.obj $(INTDIR)\testglobalmutex.obj \
+ $(INTDIR)\teststrnatcmp.obj $(INTDIR)\testfilecopy.obj \
+ $(INTDIR)\testtemp.obj $(INTDIR)\testlfs.obj \
+ $(INTDIR)\testrand2.obj
+
+CLEAN_DATA = testfile.tmp lfstests\large.bin \
+ data\testputs.txt data\testbigfprintf.dat \
+ data\testwritev.txt data\testwritev_full.txt \
+ data\testflush.dat data\testxthread.dat \
+ data\apr.testshm.shm
-OTHER_PROGRAMS = sendfile.exe
+CLEAN_BUILDDIRS = Debug Release LibD LibR 9x x64
-PROGRAMS = $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE) $(OTHER_PROGRAMS)
+TEST_SUBDIRS = internal
+
+PROGRAMS = $(TESTALL_COMPONENTS) $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE) $(OTHER_PROGRAMS)
TARGETS = $(PROGRAMS)
@@ -24,95 +115,142 @@ TARGETS = $(PROGRAMS)
ALL: $(TARGETS)
CL = cl.exe
+LD = link.exe
-CFLAGS = /nologo /c /MDd /W3 /Gm /EHsc /Zi /Od /D _DEBUG /D WIN32 /D APR_DECLARE_STATIC /FD
+!IF "$(MODEL)" == "static"
+LOCAL_LIB= ..\$(OUTDIR)\apr-1.lib
+APP_LIB= ..\build\$(OUTDIR)\apr_app-1.lib
+STATIC_CFLAGS = /D APR_DECLARE_STATIC
+!ELSE
+LOCAL_LIB= ..\$(OUTDIR)\libapr-1.lib
+APP_LIB= ..\build\$(OUTDIR)\libapr_app-1.lib
+STATIC_CFLAGS =
+!ENDIF
-.c.obj::
- $(CL) -c $< $(CFLAGS) $(INCLUDES)
+!IFDEF _DEBUG
+DEBUG_CFLAGS = /MDd
+!ELSE
+DEBUG_CFLAGS = /MD
+!ENDIF
-LOCAL_LIBS= ../LibD/apr-1.lib
-ALL_LIBS= kernel32.lib user32.lib advapi32.lib Rpcrt4.lib ws2_32.lib wsock32.lib ole32.lib
+INCLUDES=/I "$(INCDIR)"
+CFLAGS = /nologo /c /W3 /Gm /EHsc /Zi /Od $(INCLUDES) \
+ $(STATIC_CFLAGS) $(DEBUG_CFLAGS) /D "BINPATH=$(OUTDIR:\=/)" \
+ /D _DEBUG /D WIN32 /Fo"$(INTDIR)/" /FD
-CLEAN_TARGETS = testfile.tmp mod_test.dll proc_child.exe occhild.exe \
- readchild.exe tryread.exe sockchild.exe \
- globalmutexchild.exe lfstests/large.bin \
- data/testputs.txt data/testbigfprintf.dat data/testwritev.txt \
- data/testwritev_full.txt
-CLEAN_SUBDIRS = internal
+LD_LIBS = kernel32.lib advapi32.lib ws2_32.lib wsock32.lib \
+ ole32.lib shell32.lib rpcrt4.lib
-INCDIR=../include
-INCLUDES=/I "$(INCDIR)"
+LDFLAGS = /nologo /debug /subsystem:console /incremental:no
+SHLDFLAGS = /nologo /dll /debug /subsystem:windows /incremental:no
+
+.c{$(INTDIR)}.obj::
+ $(CL) $(CFLAGS) -c $< -Fd$(INTDIR)\ $(INCLUDES)
+
+# STDTEST_PORTABLE;
+
+$(OUTDIR)\testall.exe: $(ALL_TESTS) $(INTDIR)\abts.obj $(LOCAL_LIB)
+ $(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
+ @if exist "$@.manifest" \
+ mt.exe -manifest "$@.manifest" -outputresource:$@;1
+
+$(OUTDIR)\testapp.exe: $(INTDIR)/testapp.obj $(LOCAL_LIB) $(APP_LIB)
+ $(LD) $(LDFLAGS) /entry:wmainCRTStartup /out:"$@" $** $(LD_LIBS)
+ @if exist "$@.manifest" \
+ mt.exe -manifest "$@.manifest" -outputresource:$@;2
+
+$(OUTDIR)\testlockperf.exe: $(INTDIR)\testlockperf.obj $(LOCAL_LIB)
+ $(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
+ @if exist "$@.manifest" \
+ mt.exe -manifest "$@.manifest" -outputresource:$@;1
+
+$(OUTDIR)\testmutexscope.exe: $(INTDIR)\testmutexscope.obj $(LOCAL_LIB)
+ $(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
+ @if exist "$@.manifest" \
+ mt.exe -manifest "$@.manifest" -outputresource:$@;1
+
+# OTHER_PROGRAMS;
+
+$(OUTDIR)\sendfile.exe: $(INTDIR)\sendfile.obj $(LOCAL_LIB)
+ $(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
+ @if exist "$@.manifest" \
+ mt.exe -manifest "$@.manifest" -outputresource:$@;1
-# link programs using -no-install to get real executables not
-# libtool wrapper scripts which link an executable when first run.
-LINK_PROG = link.exe /nologo /debug /subsystem:console /incremental:no
-LINK_LIB = link.exe /nologo /dll /debug /subsystem:windows /incremental:no
+# TESTALL_COMPONENTS;
-check: $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE)
- for prog in $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE); do \
- ./$$prog; \
- if test $$? = 255; then \
- echo "$$prog failed"; \
- break; \
- fi; \
- done
+$(OUTDIR)\globalmutexchild.exe: $(INTDIR)\globalmutexchild.obj $(LOCAL_LIB)
+ $(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
+ @if exist "$@.manifest" \
+ mt.exe -manifest "$@.manifest" -outputresource:$@;1
-occhild.exe: occhild.obj $(LOCAL_LIBS)
- $(LINK_PROG) occhild.obj $(LOCAL_LIBS) $(ALL_LIBS)
+$(OUTDIR)\mod_test.dll: $(INTDIR)/mod_test.obj $(LOCAL_LIB)
+ $(LD) $(SHLDFLAGS) /out:"$@" $** \
+ /export:print_hello /export:count_reps $(LD_LIBS)
+ @if exist "$@.manifest" \
+ mt.exe -manifest "$@.manifest" -outputresource:$@;2
-sockchild.exe: sockchild.obj $(LOCAL_LIBS)
- $(LINK_PROG) sockchild.obj $(LOCAL_LIBS) $(ALL_LIBS)
+$(OUTDIR)\occhild.exe: $(INTDIR)\occhild.obj $(LOCAL_LIB)
+ $(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
+ @if exist "$@.manifest" \
+ mt.exe -manifest "$@.manifest" -outputresource:$@;1
-readchild.exe: readchild.obj $(LOCAL_LIBS)
- $(LINK_PROG) readchild.obj $(LOCAL_LIBS) $(ALL_LIBS)
+$(OUTDIR)\proc_child.exe: $(INTDIR)\proc_child.obj $(LOCAL_LIB)
+ $(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
+ @if exist "$@.manifest" \
+ mt.exe -manifest "$@.manifest" -outputresource:$@;1
-globalmutexchild.exe: globalmutexchild.obj $(LOCAL_LIBS)
- $(LINK_PROG) globalmutexchild.obj $(LOCAL_LIBS) $(ALL_LIBS)
+$(OUTDIR)\readchild.exe: $(INTDIR)\readchild.obj $(LOCAL_LIB)
+ $(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
+ @if exist "$@.manifest" \
+ mt.exe -manifest "$@.manifest" -outputresource:$@;1
-tryread.exe: tryread.obj $(LOCAL_LIBS)
- $(LINK_PROG) tryread.obj $(LOCAL_LIBS) $(ALL_LIBS)
+$(OUTDIR)\sockchild.exe: $(INTDIR)\sockchild.obj $(LOCAL_LIB)
+ $(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
+ @if exist "$@.manifest" \
+ mt.exe -manifest "$@.manifest" -outputresource:$@;1
-proc_child.exe: proc_child.obj $(LOCAL_LIBS)
- $(LINK_PROG) proc_child.obj $(LOCAL_LIBS) $(ALL_LIBS)
+$(OUTDIR)\testshmconsumer.exe: $(INTDIR)\testshmconsumer.obj $(LOCAL_LIB)
+ $(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
+ @if exist "$@.manifest" \
+ mt.exe -manifest "$@.manifest" -outputresource:$@;1
-# FIXME: -prefer-pic is only supported with libtool-1.4+
-mod_test.dll: mod_test.obj
- $(LINK_LIB) mod_test.obj /export:print_hello /export:count_reps $(LOCAL_LIBS) $(ALL_LIBS)
+$(OUTDIR)\testshmproducer.exe: $(INTDIR)\testshmproducer.obj $(LOCAL_LIB)
+ $(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
+ @if exist "$@.manifest" \
+ mt.exe -manifest "$@.manifest" -outputresource:$@;1
-testlockperf.exe: testlockperf.obj $(LOCAL_LIBS)
- $(LINK_PROG) testlockperf.obj $(LOCAL_LIBS) $(ALL_LIBS)
+$(OUTDIR)\tryread.exe: $(INTDIR)\tryread.obj $(LOCAL_LIB)
+ $(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
+ @if exist "$@.manifest" \
+ mt.exe -manifest "$@.manifest" -outputresource:$@;1
-sendfile.exe: sendfile.obj $(LOCAL_LIBS)
- $(LINK_PROG) sendfile.obj $(LOCAL_LIBS) $(ALL_LIBS)
-testshmproducer.exe: testshmproducer.obj $(LOCAL_LIBS)
- $(LINK_PROG) testshmproducer.obj $(LOCAL_LIBS) $(ALL_LIBS)
+cleandata:
+ @for %f in ($(CLEAN_DATA)) do @if EXIST %f del /f %f
-testshmconsumer.exe: testshmconsumer.obj $(LOCAL_LIBS)
- $(LINK_PROG) testshmconsumer.obj $(LOCAL_LIBS) $(ALL_LIBS)
+clean: cleandata
+ @if EXIST $(INTDIR)\. rmdir /s /q $(INTDIR)
+ @if EXIST $(OUTDIR)\. rmdir /s /q $(OUTDIR)
+ @for %d in ($(TEST_SUBDIRS)) do \
+ %COMSPEC% /c "cd %%d && $(MAKE) -f Makefile.win clean" \
-testprocmutex.exe: testprocmutex.obj $(LOCAL_LIBS)
- $(LINK_PROG) testprocmutex.obj $(LOCAL_LIBS) $(ALL_LIBS)
+cleanall:
+ @for %d in ($(CLEAN_BUILDDIRS) $(INTDIR) $(OUTDIR)) do \
+ @if EXIST %d\. rmdir /s /q %d
+ @for %d in ($(TEST_SUBDIRS)) do \
+ %COMSPEC% /c "cd %%d & $(MAKE) -f Makefile.win cleanall" \
-testmutexscope.exe: testmutexscope.obj $(LOCAL_LIBS)
- $(LINK_PROG) testmutexscope.obj $(LOCAL_LIBS) $(ALL_LIBS)
-TESTS = testutil.obj testtime.obj teststr.obj testvsn.obj testipsub.obj \
- testmmap.obj testud.obj testtable.obj testsleep.obj testpools.obj \
- testfmt.obj testfile.obj testdir.obj testfileinfo.obj testrand.obj \
- testdso.obj testoc.obj testdup.obj testsockets.obj testproc.obj \
- testpoll.obj testlock.obj testsockopt.obj testpipe.obj testthread.obj \
- testhash.obj testargs.obj testnames.obj testuser.obj testpath.obj \
- testenv.obj testprocmutex.obj testrand2.obj testfnmatch.obj \
- testatomic.obj testflock.obj testshm.obj testsock.obj testglobalmutex.obj \
- teststrnatcmp.obj testfilecopy.obj testtemp.obj testlfs.obj
+PATH=$(OUTDIR);..\$(OUTDIR);$(PATH)
-testall.exe: $(TESTS) mod_test.dll occhild.exe \
- readchild.exe abts.obj proc_child.exe \
- tryread.exe sockchild.exe globalmutexchild.exe \
- $(LOCAL_LIBS)
- $(LINK_PROG) /out:testall.exe $(TESTS) abts.obj $(LOCAL_LIBS) $(ALL_LIBS)
+check: $(TESTALL_COMPONENTS) $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE)
+ @for %p in ($(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE)) do @( \
+ echo Testing %p && %p -v || echo %p failed \
+ )
+checkall: check
+ @for %d in ($(TEST_SUBDIRS)) do \
+ %COMSPEC% /c "cd %%d && $(MAKE) -f Makefile.win check" \
# DO NOT REMOVE
diff --git a/srclib/apr/test/abts.c b/srclib/apr/test/abts.c
index 2905a259..d8cb2c9d 100644
--- a/srclib/apr/test/abts.c
+++ b/srclib/apr/test/abts.c
@@ -252,6 +252,22 @@ void abts_int_nequal(abts_case *tc, const int expected, const int actual, int li
}
}
+void abts_size_equal(abts_case *tc, size_t expected, size_t actual, int lineno)
+{
+ update_status();
+ if (tc->failed) return;
+
+ if (expected == actual) return;
+
+ tc->failed = TRUE;
+ if (verbose) {
+ /* Note that the comparison is type-exact, reporting must be a best-fit */
+ fprintf(stderr, "Line %d: expected %lu, but saw %lu\n", lineno,
+ (unsigned long)expected, (unsigned long)actual);
+ fflush(stderr);
+ }
+}
+
void abts_str_equal(abts_case *tc, const char *expected, const char *actual, int lineno)
{
update_status();
@@ -369,6 +385,9 @@ int main(int argc, const char *const argv[]) {
abts_suite *suite = NULL;
initialize();
+
+ quiet = !isatty(STDOUT_FILENO);
+
for (i = 1; i < argc; i++) {
if (!strcmp(argv[i], "-v")) {
verbose = 1;
diff --git a/srclib/apr/test/abts.h b/srclib/apr/test/abts.h
index 51123ff0..4d6470ae 100644
--- a/srclib/apr/test/abts.h
+++ b/srclib/apr/test/abts.h
@@ -21,6 +21,11 @@ extern "C" {
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifdef WIN32
+#include <io.h>
+#else
+#include <unistd.h>
+#endif
#ifndef ABTS_H
#define ABTS_H
@@ -73,6 +78,7 @@ void abts_true(abts_case *tc, int condition, int lineno);
void abts_fail(abts_case *tc, const char *message, int lineno);
void abts_not_impl(abts_case *tc, const char *message, int lineno);
void abts_assert(abts_case *tc, const char *message, int condition, int lineno);
+void abts_size_equal(abts_case *tc, size_t expected, size_t actual, int lineno);
/* Convenience macros. Ryan hates these! */
#define ABTS_INT_EQUAL(a, b, c) abts_int_equal(a, b, c, __LINE__)
@@ -86,6 +92,9 @@ void abts_assert(abts_case *tc, const char *message, int condition, int lineno);
#define ABTS_NOT_IMPL(a, b) abts_not_impl(a, b, __LINE__);
#define ABTS_ASSERT(a, b, c) abts_assert(a, b, c, __LINE__);
+#define ABTS_SIZE_EQUAL(a, b, c) abts_size_equal(a, b, c, __LINE__)
+
+
abts_suite *run_tests(abts_suite *suite);
abts_suite *run_tests1(abts_suite *suite);
diff --git a/srclib/apr/test/aprtest.def b/srclib/apr/test/aprtest.def
deleted file mode 100644
index bfea210d..00000000
--- a/srclib/apr/test/aprtest.def
+++ /dev/null
@@ -1,3 +0,0 @@
-MODULE LIBC.NLM
-MODULE APRLIB.NLM
-
diff --git a/srclib/apr/test/aprtest.dsp b/srclib/apr/test/aprtest.dsp
deleted file mode 100644
index 9d6994f5..00000000
--- a/srclib/apr/test/aprtest.dsp
+++ /dev/null
@@ -1,195 +0,0 @@
-# Microsoft Developer Studio Project File - Name="aprtest" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) External Target" 0x0106
-
-CFG=aprtest - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "aprtest.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "aprtest.mak" CFG="aprtest - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "aprtest - Win32 Release" (based on "Win32 (x86) External Target")
-!MESSAGE "aprtest - Win32 Debug" (based on "Win32 (x86) External Target")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-
-!IF "$(CFG)" == "aprtest - Win32 Release"
-
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Cmd_Line "NMAKE /f Makefile"
-# PROP BASE Rebuild_Opt "/a"
-# PROP BASE Target_File "aprtest.exe"
-# PROP BASE Bsc_Name "aprtest.bsc"
-# PROP BASE Target_Dir ""
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Cmd_Line "NMAKE /f aprtest.win"
-# PROP Rebuild_Opt "/a"
-# PROP Bsc_Name ""
-# PROP Target_Dir ""
-
-!ELSEIF "$(CFG)" == "aprtest - Win32 Debug"
-
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Cmd_Line "NMAKE /f aprtest.mak"
-# PROP BASE Rebuild_Opt "/a"
-# PROP BASE Target_File "aprtest.exe"
-# PROP BASE Bsc_Name "aprtest.bsc"
-# PROP BASE Target_Dir ""
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Cmd_Line "NMAKE /f aprtest.win"
-# PROP Rebuild_Opt "/a"
-# PROP Bsc_Name ""
-# PROP Target_Dir ""
-
-!ENDIF
-
-# Begin Target
-
-# Name "aprtest - Win32 Release"
-# Name "aprtest - Win32 Debug"
-
-!IF "$(CFG)" == "aprtest - Win32 Release"
-
-!ELSEIF "$(CFG)" == "aprtest - Win32 Debug"
-
-!ENDIF
-
-# Begin Group "Sources"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\abc.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\client.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\mod_test.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\occhild.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\sendfile.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\server.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\testargs.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\testcontext.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\testdso.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\testfile.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\testflock.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\testlock.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\testmmap.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\testnames.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\testoc.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\testpath.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\testpipe.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\testproc.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\testshm.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\testsock.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\testthread.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\testtime.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\testucs.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\testuser.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\testuuid.c
-# End Source File
-# End Group
-# Begin Source File
-
-SOURCE=.\aprtest.win
-# End Source File
-# Begin Source File
-
-SOURCE=.\Makefile
-# End Source File
-# Begin Source File
-
-SOURCE=.\Makefile.in
-# End Source File
-# End Target
-# End Project
diff --git a/srclib/apr/test/aprtest.win b/srclib/apr/test/aprtest.win
deleted file mode 100644
index 85ad5b4d..00000000
--- a/srclib/apr/test/aprtest.win
+++ /dev/null
@@ -1,18 +0,0 @@
-# Note:
-#
-# You may need to modify the configuration of Build - Options - Directories
-# for the Executable path to include the perl interpreter within DevStudio.
-# E.g. add c:\program files\perl\bin to the list of directories
-
-!IF "$(TARGET)" == ""
-TARGET=ALL
-!ENDIF
-
-$(TARGET): Makefile
- $(MAKE) /nologo /f Makefile $(TARGET)
-
-Makefile: Makefile.in MakeWin32Make.awk
- awk -f MakeWin32Make.awk <Makefile.in >Makefile
-
-clean:
- del Makefile *.obj *.exe *.idb *.pdb
diff --git a/srclib/apr/test/internal/Makefile.win b/srclib/apr/test/internal/Makefile.win
new file mode 100644
index 00000000..9832b682
--- /dev/null
+++ b/srclib/apr/test/internal/Makefile.win
@@ -0,0 +1,109 @@
+# PROGRAMS includes all test programs built on this platform.
+# STDTEST_PORTABLE
+# test programs invoked via standard user interface, run on all platforms
+# STDTEST_NONPORTABLE
+# test programs invoked via standard user interface, not portable
+# OTHER_PROGRAMS
+# programs such as sendfile, that have to be invoked in a special sequence
+# or with special parameters
+
+!IFNDEF MODEL
+MODEL=dynamic
+!ENDIF
+
+INCDIR=../../include
+
+!IFNDEF OUTDIR
+!IF "$(MODEL)" == "static"
+OUTDIR=LibR
+!ELSE
+OUTDIR=Release
+!ENDIF
+
+!IF [$(COMSPEC) /c cl /nologo /? | find "x64" >NUL ] == 0
+OUTDIR=x64\$(OUTDIR)
+!ENDIF
+!ENDIF
+
+!IF !EXIST("$(OUTDIR)\.")
+!IF ([$(COMSPEC) /C mkdir $(OUTDIR)] == 0)
+!ENDIF
+!ENDIF
+
+!IFNDEF INTDIR
+INTDIR=$(OUTDIR)
+!ELSE
+!IF !EXIST("$(INTDIR)\.")
+!IF ([$(COMSPEC) /C mkdir $(INTDIR)] == 0)
+!ENDIF
+!ENDIF
+!ENDIF
+
+!MESSAGE Building tests into $(OUTDIR) for $(MODEL)
+
+NONPORTABLE = \
+ $(OUTDIR)\testucs.exe
+
+CLEAN_BUILDDIRS = Release Debug NT x64
+
+PROGRAMS =
+
+TARGETS = $(PROGRAMS) $(NONPORTABLE)
+
+# bring in rules.mk for standard functionality
+ALL: $(TARGETS)
+
+CL = cl.exe
+LD = link.exe
+
+!IF "$(MODEL)" == "static"
+LOCAL_LIB= ..\..\$(OUTDIR)\apr-1.lib
+STATIC_CFLAGS = /D APR_DECLARE_STATIC
+!ELSE
+LOCAL_LIB= ..\..\$(OUTDIR)\libapr-1.lib
+STATIC_CFLAGS =
+!ENDIF
+
+!IFDEF _DEBUG
+DEBUG_CFLAGS = /MDd
+!ELSE
+DEBUG_CFLAGS = /MD
+!ENDIF
+
+INCLUDES=/I "$(INCDIR)"
+
+CFLAGS = /nologo /c /W3 /Gm /EHsc /Zi /Od $(INCLUDES) \
+ $(STATIC_CFLAGS) $(DEBUG_CFLAGS) /D "BINPATH=$(OUTDIR:\=/)" \
+ /D _DEBUG /D WIN32 /Fo"$(INTDIR)/" /FD
+
+LD_LIBS = kernel32.lib advapi32.lib ws2_32.lib wsock32.lib \
+ ole32.lib shell32.lib rpcrt4.lib
+
+LDFLAGS = /nologo /debug /subsystem:console /incremental:no
+SHLDFLAGS = /nologo /dll /debug /subsystem:windows /incremental:no
+
+.c{$(INTDIR)}.obj:
+ $(CL) $(CFLAGS) -c $< -Fd$(INTDIR)\ $(INCLUDES)
+
+$(OUTDIR)\testucs.exe: $(INTDIR)\testucs.obj $(LOCAL_LIB)
+ $(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
+ @if exist "$@.manifest" \
+ mt.exe -manifest "$@.manifest" -outputresource:$@;1
+
+
+clean:
+ @if EXIST $(INTDIR)\. rmdir /s /q $(INTDIR)
+ @if EXIST $(OUTDIR)\. rmdir /s /q $(OUTDIR)
+
+cleanall:
+ @for %d in ($(CLEAN_BUILDDIRS)) do @if EXIST %d\. rmdir /s /q %d
+
+
+PATH=$(OUTDIR);..\..\$(OUTDIR);$(PATH)
+
+check: $(NONPORTABLE)
+ @for %p in ($(NONPORTABLE)) do @( \
+ echo Testing %p && %p || echo %p failed \
+ )
+
+# DO NOT REMOVE
diff --git a/srclib/apr/test/internal/testucs.c b/srclib/apr/test/internal/testucs.c
index ca735d23..abfa2121 100644
--- a/srclib/apr/test/internal/testucs.c
+++ b/srclib/apr/test/internal/testucs.c
@@ -18,6 +18,7 @@
#include "arch/win32/apr_arch_utf8.h"
#include <wchar.h>
#include <string.h>
+#include <assert.h>
struct testval {
unsigned char n[8];
@@ -32,17 +33,18 @@ void displaynw(struct testval *f, struct testval *l)
int i;
for (i = 0; i < f->nl; ++i)
t += sprintf(t, "%02X ", f->n[i]);
- *(t++) = '-';
+ *(t++) = '-';
for (i = 0; i < l->nl; ++i)
t += sprintf(t, " %02X", l->n[i]);
*(t++) = ' ';
*(t++) = '=';
- *(t++) = ' ';
+ *(t++) = ' ';
for (i = 0; i < f->wl; ++i)
t += sprintf(t, "%04X ", f->w[i]);
*(t++) = '-';
for (i = 0; i < l->wl; ++i)
t += sprintf(t, " %04X", l->w[i]);
+ *t = '\0';
puts(x);
}
@@ -155,22 +157,143 @@ void test_wrange(struct testval *p)
}
/*
+ * Test every possible byte value.
+ * If the test passes or fails at this byte value we are done.
+ * Otherwise iterate test_nrange again, appending another byte.
+ */
+void test_ranges()
+{
+ struct testval ntest, wtest;
+ apr_status_t nrc, wrc;
+ apr_size_t inlen;
+ unsigned long matches = 0;
+
+ memset(&ntest, 0, sizeof(ntest));
+ ++ntest.nl;
+
+ memset(&wtest, 0, sizeof(wtest));
+ ++wtest.wl;
+
+ do {
+ do {
+ inlen = ntest.nl;
+ ntest.wl = sizeof(ntest.w) / 2;
+ nrc = apr_conv_utf8_to_ucs2(ntest.n, &inlen, ntest.w, &ntest.wl);
+ if (nrc == APR_SUCCESS) {
+ ntest.wl = (sizeof(ntest.w) / 2) - ntest.wl;
+ break;
+ }
+ if (nrc == APR_INCOMPLETE) {
+ ++ntest.nl;
+ if (ntest.nl > 6) {
+ printf ("\n\nUnexpected utf8 sequence of >6 bytes;\n");
+ exit(255);
+ }
+ continue;
+ }
+ else {
+ while (!(++ntest.n[ntest.nl - 1])) {
+ if (!(--ntest.nl))
+ break;
+ }
+ }
+ } while (ntest.nl);
+
+ do {
+ inlen = wtest.wl;
+ wtest.nl = sizeof(wtest.n);
+ wrc = apr_conv_ucs2_to_utf8(wtest.w, &inlen, wtest.n, &wtest.nl);
+ if (wrc == APR_SUCCESS) {
+ wtest.nl = sizeof(wtest.n) - wtest.nl;
+ break;
+ }
+ else {
+ if (!(++wtest.w[wtest.wl - 1])) {
+ if (wtest.wl == 1)
+ ++wtest.wl;
+ else
+ ++wtest.w[0];
+
+ /* On the second pass, ensure lead word is incomplete */
+ do {
+ inlen = 1;
+ wtest.nl = sizeof(wtest.n);
+ if (apr_conv_ucs2_to_utf8(wtest.w, &inlen, wtest.n, &wtest.nl)
+ == APR_INCOMPLETE)
+ break;
+ if (!(++wtest.w[0])) {
+ wtest.wl = 0;
+ break;
+ }
+ } while (1);
+ }
+ }
+ } while (wtest.wl);
+
+ if (!ntest.nl && !wtest.wl)
+ break;
+
+ /* Identical? */
+ if ((wtest.nl != ntest.nl)
+ || (memcmp(wtest.n, ntest.n, ntest.nl) != 0)
+ || (wtest.wl != ntest.wl)
+ || (memcmp(ntest.w, wtest.w, wtest.wl * 2) != 0)) {
+ printf ("\n\nMismatch of w/n conversion at;\n");
+ displaynw(&ntest, &wtest);
+ exit(255);
+ }
+ ++matches;
+
+ while (!(++ntest.n[ntest.nl - 1])) {
+ if (!(--ntest.nl))
+ break;
+ }
+
+ if (!(++wtest.w[wtest.wl - 1])) {
+ if (wtest.wl == 1)
+ ++wtest.wl;
+ else
+ ++wtest.w[0];
+
+ /* On the second pass, ensure lead word is incomplete */
+ do {
+ inlen = 1;
+ wtest.nl = sizeof(wtest.n);
+ if (apr_conv_ucs2_to_utf8(wtest.w, &inlen, wtest.n, &wtest.nl)
+ == APR_INCOMPLETE)
+ break;
+ if (!(++wtest.w[0])) {
+ wtest.wl = 0;
+ break;
+ }
+ } while (1);
+ }
+ } while (wtest.wl || ntest.nl);
+
+ printf ("\n\nutf8 and ucs2 sequences of %lu transformations matched OK.\n",
+ matches);
+}
+
+/*
* Syntax: testucs [w|n]
*
- * If arg is not recognized, run both tests.
+ * If no arg or arg is not recognized, run equality sequence test.
*/
int main(int argc, char **argv)
{
struct testval s;
memset (&s, 0, sizeof(s));
- if (argc < 2 || apr_tolower(*argv[1]) != 'w') {
+ if (argc >= 2 && apr_tolower(*argv[1]) != 'w') {
printf ("\n\nTesting Narrow Char Ranges\n");
test_nrange(&s);
}
- if (argc < 2 || apr_tolower(*argv[1]) != 'n') {
+ else if (argc >= 2 && apr_tolower(*argv[1]) != 'n') {
printf ("\n\nTesting Wide Char Ranges\n");
test_wrange(&s);
}
+ else {
+ test_ranges();
+ }
return 0;
}
diff --git a/srclib/apr/test/proc_child.c b/srclib/apr/test/proc_child.c
index 405bb7f5..6cfc8fc9 100644
--- a/srclib/apr/test/proc_child.c
+++ b/srclib/apr/test/proc_child.c
@@ -11,11 +11,11 @@
int main(void)
{
char buf[256];
- apr_ssize_t bytes;
+ int bytes;
- bytes = read(STDIN_FILENO, buf, 256);
+ bytes = (int)read(STDIN_FILENO, buf, 256);
if (bytes > 0)
- write(STDOUT_FILENO, buf, bytes);
+ write(STDOUT_FILENO, buf, (unsigned int)bytes);
return 0; /* just to keep the compiler happy */
}
diff --git a/srclib/apr/test/sockchild.c b/srclib/apr/test/sockchild.c
index 5c15d113..3803d00a 100644
--- a/srclib/apr/test/sockchild.c
+++ b/srclib/apr/test/sockchild.c
@@ -67,14 +67,14 @@ int main(int argc, char *argv[])
exit(-1);
}
- exit(length);
+ exit((int)length);
}
else if (!strcmp("write", argv[1])) {
apr_size_t length = strlen(DATASTR);
apr_socket_send(sock, DATASTR, &length);
apr_socket_close(sock);
- exit(length);
+ exit((int)length);
}
exit(-1);
}
diff --git a/srclib/apr/test/testall.dsw b/srclib/apr/test/testall.dsw
index f4be05d9..f9abcbc5 100644
--- a/srclib/apr/test/testall.dsw
+++ b/srclib/apr/test/testall.dsw
@@ -30,21 +30,6 @@ Package=<4>
###############################################################################
-Project: "testall"=".\testall.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name apr
- End Project Dependency
-}}}
-
-###############################################################################
-
Project: "libapr"="..\libapr.dsp" - Package Owner=<4>
Package=<5>
@@ -72,7 +57,7 @@ Package=<4>
###############################################################################
-Project: "testapp"=".\testapp.dsp" - Package Owner=<4>
+Project: "testdll"=".\testdll.dsp" - Package Owner=<4>
Package=<5>
{{{
@@ -81,16 +66,16 @@ Package=<5>
Package=<4>
{{{
Begin Project Dependency
- Project_Dep_Name apr
+ Project_Dep_Name libapr
End Project Dependency
Begin Project Dependency
- Project_Dep_Name apr_app
+ Project_Dep_Name libapr_app
End Project Dependency
}}}
###############################################################################
-Project: "testappnt"=".\testappnt.dsp" - Package Owner=<4>
+Project: "testlib"=".\testlib.dsp" - Package Owner=<4>
Package=<5>
{{{
diff --git a/srclib/apr/test/testapp.dsp b/srclib/apr/test/testapp.dsp
deleted file mode 100644
index 153cbd36..00000000
--- a/srclib/apr/test/testapp.dsp
+++ /dev/null
@@ -1,102 +0,0 @@
-# Microsoft Developer Studio Project File - Name="testapp" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=testapp - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "testapp.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "testapp.mak" CFG="testapp - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "testapp - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "testapp - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "testapp - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "."
-# PROP BASE Intermediate_Dir "."
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "."
-# PROP Intermediate_Dir "."
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /FD /c
-# ADD CPP /nologo /MD /W3 /O2 /I "../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /Fd"./testapp" /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console
-# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console
-# Begin Special Build Tool
-TargetPath=.\testapp.exe
-SOURCE="$(InputPath)"
-PostBuild_Desc=Embed .manifest
-PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "testapp - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "."
-# PROP BASE Intermediate_Dir "."
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "."
-# PROP Intermediate_Dir "."
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /FD /c
-# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /Fd"./testapp" /FD /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console /incremental:no /debug
-# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console /incremental:no /debug
-# Begin Special Build Tool
-TargetPath=.\testapp.exe
-SOURCE="$(InputPath)"
-PostBuild_Desc=Embed .manifest
-PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "testapp - Win32 Release"
-# Name "testapp - Win32 Debug"
-# Begin Source File
-
-SOURCE=.\testapp.c
-# End Source File
-# End Target
-# End Project
diff --git a/srclib/apr/test/testappnt.dsp b/srclib/apr/test/testappnt.dsp
deleted file mode 100644
index af21c294..00000000
--- a/srclib/apr/test/testappnt.dsp
+++ /dev/null
@@ -1,113 +0,0 @@
-# Microsoft Developer Studio Project File - Name="testappnt" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=testappnt - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "testappnt.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "testappnt.mak" CFG="testappnt - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "testappnt - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "testappnt - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "testappnt - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "."
-# PROP BASE Intermediate_Dir "."
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "."
-# PROP Intermediate_Dir "."
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "WINNT" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /FD /c
-# ADD CPP /nologo /MD /W3 /O2 /I "../include" /D "NDEBUG" /D "WIN32" /D "WINNT" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /Fd"./testappnt" /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console
-# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /entry:"wmainCRTStartup" /subsystem:console
-# Begin Special Build Tool
-TargetPath=.\testappnt.exe
-SOURCE="$(InputPath)"
-PostBuild_Desc=Embed .manifest
-PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "testappnt - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "."
-# PROP BASE Intermediate_Dir "."
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "."
-# PROP Intermediate_Dir "."
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /FD /c
-# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../include" /D "_DEBUG" /D "WIN32" /D "WINNT" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /Fd"./testappnt" /FD /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console /incremental:no /debug
-# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /entry:"wmainCRTStartup" /subsystem:console /incremental:no /debug
-# Begin Special Build Tool
-TargetPath=.\testappnt.exe
-SOURCE="$(InputPath)"
-PostBuild_Desc=Embed .manifest
-PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "testappnt - Win32 Release"
-# Name "testappnt - Win32 Debug"
-# Begin Source File
-
-SOURCE=.\testapp.c
-
-!IF "$(CFG)" == "testappnt - Win32 Release"
-
-# ADD CPP /Fo"testappnt"
-
-!ELSEIF "$(CFG)" == "testappnt - Win32 Debug"
-
-# ADD CPP /Fo"testappnt"
-
-!ENDIF
-
-# End Source File
-# End Target
-# End Project
diff --git a/srclib/apr/test/testatomic.c b/srclib/apr/test/testatomic.c
index 7fae5c75..b733db39 100644
--- a/srclib/apr/test/testatomic.c
+++ b/srclib/apr/test/testatomic.c
@@ -111,6 +111,39 @@ static void test_cas_notequal(abts_case *tc, void *data)
ABTS_INT_EQUAL(tc, 12, casval);
}
+static void test_casptr_equal(abts_case *tc, void *data)
+{
+ int a;
+ volatile void *target_ptr = NULL;
+ void *old_ptr;
+
+ old_ptr = apr_atomic_casptr(&target_ptr, &a, NULL);
+ ABTS_PTR_EQUAL(tc, NULL, old_ptr);
+ ABTS_PTR_EQUAL(tc, &a, (void *) target_ptr);
+}
+
+static void test_casptr_equal_nonnull(abts_case *tc, void *data)
+{
+ int a, b;
+ volatile void *target_ptr = &a;
+ void *old_ptr;
+
+ old_ptr = apr_atomic_casptr(&target_ptr, &b, &a);
+ ABTS_PTR_EQUAL(tc, &a, old_ptr);
+ ABTS_PTR_EQUAL(tc, &b, (void *) target_ptr);
+}
+
+static void test_casptr_notequal(abts_case *tc, void *data)
+{
+ int a, b;
+ volatile void *target_ptr = &a;
+ void *old_ptr;
+
+ old_ptr = apr_atomic_casptr(&target_ptr, &a, &b);
+ ABTS_PTR_EQUAL(tc, &a, old_ptr);
+ ABTS_PTR_EQUAL(tc, &a, (void *) target_ptr);
+}
+
static void test_add32(abts_case *tc, void *data)
{
apr_uint32_t oldval;
@@ -169,7 +202,7 @@ static void test_inc_neg1(abts_case *tc, void *data)
rv = apr_atomic_inc32(&y32);
- ABTS_ASSERT(tc, "apr_atomic_dec32 on zero returned zero.", rv == minus1);
+ ABTS_ASSERT(tc, "apr_atomic_inc32 on zero returned zero.", rv == minus1);
str = apr_psprintf(p, "zero wrap failed: -1 + 1 = %d", y32);
ABTS_ASSERT(tc, str, y32 == 0);
}
@@ -290,6 +323,9 @@ abts_suite *testatomic(abts_suite *suite)
abts_run_test(suite, test_cas_equal, NULL);
abts_run_test(suite, test_cas_equal_nonnull, NULL);
abts_run_test(suite, test_cas_notequal, NULL);
+ abts_run_test(suite, test_casptr_equal, NULL);
+ abts_run_test(suite, test_casptr_equal_nonnull, NULL);
+ abts_run_test(suite, test_casptr_notequal, NULL);
abts_run_test(suite, test_add32, NULL);
abts_run_test(suite, test_inc32, NULL);
abts_run_test(suite, test_set_add_inc_sub, NULL);
diff --git a/srclib/apr/test/testdll.dsp b/srclib/apr/test/testdll.dsp
new file mode 100644
index 00000000..dbeee8f9
--- /dev/null
+++ b/srclib/apr/test/testdll.dsp
@@ -0,0 +1,442 @@
+# Microsoft Developer Studio Project File - Name="testdll" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) External Target" 0x0106
+
+CFG=testdll - Win32 Release
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "testdll.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "testdll.mak" CFG="testdll - Win32 Release"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "testdll - Win32 Release" (based on "Win32 (x86) External Target")
+!MESSAGE "testdll - Win32 Debug" (based on "Win32 (x86) External Target")
+!MESSAGE "testdll - Win32 ReleaseNT" (based on "Win32 (x86) External Target")
+!MESSAGE "testdll - Win32 DebugNT" (based on "Win32 (x86) External Target")
+!MESSAGE "testdll - x64 Release" (based on "Win32 (x86) External Target")
+!MESSAGE "testdll - x64 Debug" (based on "Win32 (x86) External Target")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+
+!IF "$(CFG)" == "testdll - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ""
+# PROP BASE Intermediate_Dir ""
+# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=Release OUTDIR=Release MODEL=dynamic all check"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "Release\testall.exe"
+# PROP BASE Bsc_Name ""
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=Release OUTDIR=Release MODEL=dynamic all check"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "Release\testall.exe"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "testdll - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ""
+# PROP BASE Intermediate_Dir ""
+# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=Debug OUTDIR=Debug MODEL=dynamic _DEBUG=1 all check"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "Debug\testall.exe"
+# PROP BASE Bsc_Name ""
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=Debug OUTDIR=Debug MODEL=dynamic _DEBUG=1 all check"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "Debug\testall.exe"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "testdll - Win32 ReleaseNT"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ""
+# PROP BASE Intermediate_Dir ""
+# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=NT\Release OUTDIR=NT\Release MODEL=dynamic all check"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "NT\Release\testall.exe"
+# PROP BASE Bsc_Name ""
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=NT\Release OUTDIR=NT\Release MODEL=dynamic all check"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "NT\Release\testall.exe"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "testdll - Win32 DebugNT"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ""
+# PROP BASE Intermediate_Dir ""
+# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=NT\Debug OUTDIR=NT\Debug MODEL=dynamic _DEBUG=1 all check"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "NT\Debug\testall.exe"
+# PROP BASE Bsc_Name ""
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=NT\Debug OUTDIR=NT\Debug MODEL=dynamic _DEBUG=1 all check"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "NT\Debug\testall.exe"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "testdll - x64 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ""
+# PROP BASE Intermediate_Dir ""
+# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=x64\Release OUTDIR=x64\Release MODEL=dynamic all check"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "x64\Release\testall.exe"
+# PROP BASE Bsc_Name ""
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=x64\Release OUTDIR=x64\Release MODEL=dynamic all check"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "x64\Release\testall.exe"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "testdll - x64 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ""
+# PROP BASE Intermediate_Dir ""
+# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=x64\Debug OUTDIR=x64\Debug MODEL=dynamic _DEBUG=1 all check"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "x64\Debug\testall.exe"
+# PROP BASE Bsc_Name ""
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=x64\Debug OUTDIR=x64\Debug MODEL=dynamic _DEBUG=1 all check"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "x64\Debug\testall.exe"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ENDIF
+
+# Begin Target
+
+# Name "testdll - Win32 Release"
+# Name "testdll - Win32 Debug"
+# Name "testdll - Win32 ReleaseNT"
+# Name "testdll - Win32 DebugNT"
+# Name "testdll - x64 Release"
+# Name "testdll - x64 Debug"
+# Begin Group "testall Source Files"
+
+# PROP Default_Filter ".c"
+# Begin Source File
+
+SOURCE=.\abts.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\abts.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\abts_tests.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\testapp.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testargs.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testatomic.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testdir.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testdso.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testdup.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testenv.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testfile.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testfilecopy.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testfileinfo.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testflock.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testflock.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\testfmt.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testfnmatch.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testglobalmutex.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testglobalmutex.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\testhash.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testipsub.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testlfs.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testlock.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testmmap.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testnames.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testoc.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testpath.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testpipe.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testpoll.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testpools.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testproc.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testrand.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testrand2.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testshm.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testshm.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\testsleep.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testsock.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testsock.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\testsockets.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testsockopt.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\teststr.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\teststrnatcmp.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testtable.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testtemp.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testthread.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testtime.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testud.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testuser.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testutil.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testutil.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\testvsn.c
+# End Source File
+# End Group
+# Begin Group "Other Source Files"
+
+# PROP Default_Filter ".c"
+# Begin Source File
+
+SOURCE=.\globalmutexchild.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\mod_test.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\nw_misc.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\occhild.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\proc_child.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\readchild.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\sendfile.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\sockchild.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testlockperf.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testmutexscope.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testprocmutex.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testshmconsumer.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testshmproducer.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\tryread.c
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\Makefile.win
+# End Source File
+# End Target
+# End Project
diff --git a/srclib/apr/test/testdso.c b/srclib/apr/test/testdso.c
index b87bdf70..6ab94010 100644
--- a/srclib/apr/test/testdso.c
+++ b/srclib/apr/test/testdso.c
@@ -15,6 +15,7 @@
*/
+#include "apr.h"
#include "testutil.h"
#include "apr_general.h"
#include "apr_pools.h"
@@ -22,7 +23,6 @@
#include "apr_dso.h"
#include "apr_strings.h"
#include "apr_file_info.h"
-#include "apr.h"
#if APR_HAVE_UNISTD_H
#include <unistd.h>
#endif
@@ -31,10 +31,10 @@
#ifdef NETWARE
# define MOD_NAME "mod_test.nlm"
-#elif defined(BEOS)
+#elif defined(BEOS) || defined(__MVS__)
# define MOD_NAME "mod_test.so"
#elif defined(WIN32)
-# define MOD_NAME "mod_test.dll"
+# define MOD_NAME TESTBINPATH "mod_test.dll"
#elif defined(DARWIN)
# define MOD_NAME ".libs/mod_test.so"
# define LIB_NAME ".libs/libmod_test.dylib"
diff --git a/srclib/apr/test/testdup.c b/srclib/apr/test/testdup.c
index 9d064ec0..a7463379 100644
--- a/srclib/apr/test/testdup.c
+++ b/srclib/apr/test/testdup.c
@@ -76,7 +76,7 @@ static void test_file_readwrite(abts_case *tc, void *data)
rv = apr_file_write(file3, TEST, &txtlen);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- ABTS_INT_EQUAL(tc, sizeof(TEST), txtlen);
+ ABTS_SIZE_EQUAL(tc, sizeof(TEST), txtlen);
fpos = 0;
rv = apr_file_seek(file1, APR_SET, &fpos);
@@ -128,6 +128,8 @@ static void test_dup2(abts_case *tc, void *data)
rv = apr_file_dup2(errfile, saveerr, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
ABTS_PTR_NOTNULL(tc, errfile);
+
+ apr_file_close(saveerr);
}
static void test_dup2_readwrite(abts_case *tc, void *data)
@@ -161,7 +163,7 @@ static void test_dup2_readwrite(abts_case *tc, void *data)
txtlen = sizeof(TEST2);
rv = apr_file_write(errfile, TEST2, &txtlen);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- ABTS_INT_EQUAL(tc, sizeof(TEST2), txtlen);
+ ABTS_SIZE_EQUAL(tc, sizeof(TEST2), txtlen);
fpos = 0;
rv = apr_file_seek(testfile, APR_SET, &fpos);
@@ -178,6 +180,8 @@ static void test_dup2_readwrite(abts_case *tc, void *data)
rv = apr_file_dup2(errfile, saveerr, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
ABTS_PTR_NOTNULL(tc, errfile);
+
+ apr_file_close(saveerr);
}
abts_suite *testdup(abts_suite *suite)
diff --git a/srclib/apr/test/testfile.c b/srclib/apr/test/testfile.c
index 8f70823d..dbbc35da 100644
--- a/srclib/apr/test/testfile.c
+++ b/srclib/apr/test/testfile.c
@@ -85,7 +85,7 @@ static void test_read(abts_case *tc, void *data)
APR_ASSERT_SUCCESS(tc, "Opening test file " FILENAME, rv);
rv = apr_file_read(filetest, str, &nbytes);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- ABTS_INT_EQUAL(tc, strlen(TESTSTR), nbytes);
+ ABTS_SIZE_EQUAL(tc, strlen(TESTSTR), nbytes);
ABTS_STR_EQUAL(tc, TESTSTR, str);
apr_file_close(filetest);
@@ -103,7 +103,7 @@ static void test_readzero(abts_case *tc, void *data)
rv = apr_file_read(filetest, str, &nbytes);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- ABTS_INT_EQUAL(tc, 0, nbytes);
+ ABTS_SIZE_EQUAL(tc, 0, nbytes);
apr_file_close(filetest);
}
@@ -232,7 +232,7 @@ static void test_seek(abts_case *tc, void *data)
rv = apr_file_read(filetest, str, &nbytes);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- ABTS_INT_EQUAL(tc, strlen(TESTSTR), nbytes);
+ ABTS_SIZE_EQUAL(tc, strlen(TESTSTR), nbytes);
ABTS_STR_EQUAL(tc, TESTSTR, str);
memset(str, 0, nbytes + 1);
@@ -242,7 +242,7 @@ static void test_seek(abts_case *tc, void *data)
rv = apr_file_read(filetest, str, &nbytes);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- ABTS_INT_EQUAL(tc, strlen(TESTSTR) - 5, nbytes);
+ ABTS_SIZE_EQUAL(tc, strlen(TESTSTR) - 5, nbytes);
ABTS_STR_EQUAL(tc, TESTSTR + 5, str);
apr_file_close(filetest);
@@ -257,13 +257,13 @@ static void test_seek(abts_case *tc, void *data)
offset = -5;
rv = apr_file_seek(filetest, SEEK_END, &offset);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- ABTS_INT_EQUAL(tc, strlen(TESTSTR) - 5, nbytes);
+ ABTS_SIZE_EQUAL(tc, strlen(TESTSTR) - 5, nbytes);
memset(str, 0, nbytes + 1);
nbytes = 256;
rv = apr_file_read(filetest, str, &nbytes);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- ABTS_INT_EQUAL(tc, 5, nbytes);
+ ABTS_SIZE_EQUAL(tc, 5, nbytes);
ABTS_STR_EQUAL(tc, TESTSTR + strlen(TESTSTR) - 5, str);
apr_file_close(filetest);
@@ -428,7 +428,7 @@ static void test_bigread(abts_case *tc, void *data)
rv = apr_file_write(f, buf, &nbytes);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- ABTS_INT_EQUAL(tc, APR_BUFFERSIZE, nbytes);
+ ABTS_SIZE_EQUAL(tc, APR_BUFFERSIZE, nbytes);
rv = apr_file_close(f);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -440,7 +440,7 @@ static void test_bigread(abts_case *tc, void *data)
nbytes = sizeof buf;
rv = apr_file_read(f, buf, &nbytes);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- ABTS_INT_EQUAL(tc, APR_BUFFERSIZE, nbytes);
+ ABTS_SIZE_EQUAL(tc, APR_BUFFERSIZE, nbytes);
rv = apr_file_close(f);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -471,28 +471,28 @@ static void test_mod_neg(abts_case *tc, void *data)
nbytes = strlen(s);
rv = apr_file_write(f, s, &nbytes);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- ABTS_INT_EQUAL(tc, strlen(s), nbytes);
+ ABTS_SIZE_EQUAL(tc, strlen(s), nbytes);
for (i = 0; i < 7980; i++) {
s = "0";
nbytes = strlen(s);
rv = apr_file_write(f, s, &nbytes);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- ABTS_INT_EQUAL(tc, strlen(s), nbytes);
+ ABTS_SIZE_EQUAL(tc, strlen(s), nbytes);
}
s = "end456789\n";
nbytes = strlen(s);
rv = apr_file_write(f, s, &nbytes);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- ABTS_INT_EQUAL(tc, strlen(s), nbytes);
+ ABTS_SIZE_EQUAL(tc, strlen(s), nbytes);
for (i = 0; i < 10000; i++) {
s = "1";
nbytes = strlen(s);
rv = apr_file_write(f, s, &nbytes);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- ABTS_INT_EQUAL(tc, strlen(s), nbytes);
+ ABTS_SIZE_EQUAL(tc, strlen(s), nbytes);
}
rv = apr_file_close(f);
@@ -513,7 +513,7 @@ static void test_mod_neg(abts_case *tc, void *data)
nbytes = sizeof(buf);
rv = apr_file_read(f, buf, &nbytes);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- ABTS_INT_EQUAL(tc, nbytes, sizeof(buf));
+ ABTS_SIZE_EQUAL(tc, nbytes, sizeof(buf));
cur = -((apr_off_t)nbytes - 7980);
rv = apr_file_seek(f, APR_CUR, &cur);
@@ -645,7 +645,7 @@ static void test_writev_full(abts_case *tc, void *data)
APR_ASSERT_SUCCESS(tc, "writev_full of size 5 to file",
apr_file_writev_full(f, vec, 5, &nbytes));
- ABTS_INT_EQUAL(tc, strlen(LINE1)*3 + strlen(LINE2)*2, nbytes);
+ ABTS_SIZE_EQUAL(tc, strlen(LINE1)*3 + strlen(LINE2)*2, nbytes);
APR_ASSERT_SUCCESS(tc, "close for writing",
apr_file_close(f));
@@ -743,7 +743,7 @@ static void test_truncate(abts_case *tc, void *data)
nbytes = strlen(s);
rv = apr_file_write(f, s, &nbytes);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- ABTS_INT_EQUAL(tc, strlen(s), nbytes);
+ ABTS_SIZE_EQUAL(tc, strlen(s), nbytes);
rv = apr_file_close(f);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
diff --git a/srclib/apr/test/testflock.c b/srclib/apr/test/testflock.c
index 6eac94a7..f4350590 100644
--- a/srclib/apr/test/testflock.c
+++ b/srclib/apr/test/testflock.c
@@ -44,7 +44,7 @@ static int launch_reader(abts_case *tc)
args[0] = "tryread" EXTENSION;
args[1] = NULL;
- rv = apr_proc_create(&proc, "./tryread" EXTENSION, args, NULL, procattr, p);
+ rv = apr_proc_create(&proc, TESTBINPATH "tryread" EXTENSION, args, NULL, procattr, p);
APR_ASSERT_SUCCESS(tc, "Couldn't launch program", rv);
ABTS_ASSERT(tc, "wait for child process",
diff --git a/srclib/apr/test/testglobalmutex.c b/srclib/apr/test/testglobalmutex.c
index a10742d9..d6b716c0 100644
--- a/srclib/apr/test/testglobalmutex.c
+++ b/srclib/apr/test/testglobalmutex.c
@@ -41,7 +41,7 @@ static void launch_child(abts_case *tc, apr_lockmech_e mech,
args[0] = "globalmutexchild" EXTENSION;
args[1] = (const char*)apr_itoa(p, (int)mech);
args[2] = NULL;
- rv = apr_proc_create(proc, "./globalmutexchild" EXTENSION, args, NULL,
+ rv = apr_proc_create(proc, TESTBINPATH "globalmutexchild" EXTENSION, args, NULL,
procattr, p);
APR_ASSERT_SUCCESS(tc, "Couldn't launch program", rv);
}
diff --git a/srclib/apr/test/testhash.c b/srclib/apr/test/testhash.c
index c9b1cdb0..f844f906 100644
--- a/srclib/apr/test/testhash.c
+++ b/srclib/apr/test/testhash.c
@@ -21,22 +21,40 @@
#include "apr_pools.h"
#include "apr_hash.h"
-static void dump_hash(apr_pool_t *p, apr_hash_t *h, char *str)
+#define MAX_LTH 256
+#define MAX_DEPTH 11
+
+static int comp_string(const void *str1, const void *str2)
+{
+ return strcmp(str1,str2);
+}
+
+static void dump_hash(apr_pool_t *p, apr_hash_t *h, char str[][MAX_LTH])
{
apr_hash_index_t *hi;
char *val, *key;
apr_ssize_t len;
int i = 0;
- str[0] = '\0';
-
for (hi = apr_hash_first(p, h); hi; hi = apr_hash_next(hi)) {
apr_hash_this(hi,(void*) &key, &len, (void*) &val);
- apr_snprintf(str, 8196, "%sKey %s (%" APR_SSIZE_T_FMT ") Value %s\n",
- str, key, len, val);
+ str[i][0]='\0';
+ apr_snprintf(str[i], MAX_LTH, "%sKey %s (%" APR_SSIZE_T_FMT ") Value %s\n",
+ str[i], key, len, val);
i++;
}
- apr_snprintf(str, 8196, "%s#entries %d\n", str, i);
+ str[i][0]='\0';
+ apr_snprintf(str[i], MAX_LTH, "%s#entries %d\n", str[i], i);
+
+ /* Sort the result strings so that they can be checked for expected results easily,
+ * without having to worry about platform quirks
+ */
+ qsort(
+ str, /* Pointer to elements */
+ i, /* number of elements */
+ MAX_LTH, /* size of one element */
+ comp_string /* Pointer to comparison routine */
+ );
}
static void sum_hash(apr_pool_t *p, apr_hash_t *h, int *pcount, int *keySum, int *valSum)
@@ -159,7 +177,7 @@ static void key_space(abts_case *tc, void *data)
static void hash_traverse(abts_case *tc, void *data)
{
apr_hash_t *h;
- char str[8196];
+ char StrArray[MAX_DEPTH][MAX_LTH];
h = apr_hash_make(p);
ABTS_PTR_NOTNULL(tc, h);
@@ -174,15 +192,16 @@ static void hash_traverse(abts_case *tc, void *data)
apr_hash_set(h, "SAME2", APR_HASH_KEY_STRING, "same");
apr_hash_set(h, "OVERWRITE", APR_HASH_KEY_STRING, "Overwrite key");
- dump_hash(p, h, str);
- ABTS_STR_EQUAL(tc, "Key FOO1 (4) Value bar1\n"
- "Key FOO2 (4) Value bar2\n"
- "Key OVERWRITE (9) Value Overwrite key\n"
- "Key FOO3 (4) Value bar3\n"
- "Key SAME1 (5) Value same\n"
- "Key FOO4 (4) Value bar4\n"
- "Key SAME2 (5) Value same\n"
- "#entries 7\n", str);
+ dump_hash(p, h, StrArray);
+
+ ABTS_STR_EQUAL(tc, "Key FOO1 (4) Value bar1\n", StrArray[0]);
+ ABTS_STR_EQUAL(tc, "Key FOO2 (4) Value bar2\n", StrArray[1]);
+ ABTS_STR_EQUAL(tc, "Key FOO3 (4) Value bar3\n", StrArray[2]);
+ ABTS_STR_EQUAL(tc, "Key FOO4 (4) Value bar4\n", StrArray[3]);
+ ABTS_STR_EQUAL(tc, "Key OVERWRITE (9) Value Overwrite key\n", StrArray[4]);
+ ABTS_STR_EQUAL(tc, "Key SAME1 (5) Value same\n", StrArray[5]);
+ ABTS_STR_EQUAL(tc, "Key SAME2 (5) Value same\n", StrArray[6]);
+ ABTS_STR_EQUAL(tc, "#entries 7\n", StrArray[7]);
}
/* This is kind of a hack, but I am just keeping an existing test. This is
@@ -296,7 +315,7 @@ static void overlay_empty(abts_case *tc, void *data)
apr_hash_t *overlay = NULL;
apr_hash_t *result = NULL;
int count;
- char str[8196];
+ char StrArray[MAX_DEPTH][MAX_LTH];
base = apr_hash_make(p);
overlay = apr_hash_make(p);
@@ -314,13 +333,14 @@ static void overlay_empty(abts_case *tc, void *data)
count = apr_hash_count(result);
ABTS_INT_EQUAL(tc, 5, count);
- dump_hash(p, result, str);
- ABTS_STR_EQUAL(tc, "Key key1 (4) Value value1\n"
- "Key key2 (4) Value value2\n"
- "Key key3 (4) Value value3\n"
- "Key key4 (4) Value value4\n"
- "Key key5 (4) Value value5\n"
- "#entries 5\n", str);
+ dump_hash(p, result, StrArray);
+
+ ABTS_STR_EQUAL(tc, "Key key1 (4) Value value1\n", StrArray[0]);
+ ABTS_STR_EQUAL(tc, "Key key2 (4) Value value2\n", StrArray[1]);
+ ABTS_STR_EQUAL(tc, "Key key3 (4) Value value3\n", StrArray[2]);
+ ABTS_STR_EQUAL(tc, "Key key4 (4) Value value4\n", StrArray[3]);
+ ABTS_STR_EQUAL(tc, "Key key5 (4) Value value5\n", StrArray[4]);
+ ABTS_STR_EQUAL(tc, "#entries 5\n", StrArray[5]);
}
static void overlay_2unique(abts_case *tc, void *data)
@@ -329,7 +349,7 @@ static void overlay_2unique(abts_case *tc, void *data)
apr_hash_t *overlay = NULL;
apr_hash_t *result = NULL;
int count;
- char str[8196];
+ char StrArray[MAX_DEPTH][MAX_LTH];
base = apr_hash_make(p);
overlay = apr_hash_make(p);
@@ -353,21 +373,19 @@ static void overlay_2unique(abts_case *tc, void *data)
count = apr_hash_count(result);
ABTS_INT_EQUAL(tc, 10, count);
- dump_hash(p, result, str);
- /* I don't know why these are out of order, but they are. I would probably
- * consider this a bug, but others should comment.
- */
- ABTS_STR_EQUAL(tc, "Key base5 (5) Value value5\n"
- "Key overlay1 (8) Value value1\n"
- "Key overlay2 (8) Value value2\n"
- "Key overlay3 (8) Value value3\n"
- "Key overlay4 (8) Value value4\n"
- "Key overlay5 (8) Value value5\n"
- "Key base1 (5) Value value1\n"
- "Key base2 (5) Value value2\n"
- "Key base3 (5) Value value3\n"
- "Key base4 (5) Value value4\n"
- "#entries 10\n", str);
+ dump_hash(p, result, StrArray);
+
+ ABTS_STR_EQUAL(tc, "Key base1 (5) Value value1\n", StrArray[0]);
+ ABTS_STR_EQUAL(tc, "Key base2 (5) Value value2\n", StrArray[1]);
+ ABTS_STR_EQUAL(tc, "Key base3 (5) Value value3\n", StrArray[2]);
+ ABTS_STR_EQUAL(tc, "Key base4 (5) Value value4\n", StrArray[3]);
+ ABTS_STR_EQUAL(tc, "Key base5 (5) Value value5\n", StrArray[4]);
+ ABTS_STR_EQUAL(tc, "Key overlay1 (8) Value value1\n", StrArray[5]);
+ ABTS_STR_EQUAL(tc, "Key overlay2 (8) Value value2\n", StrArray[6]);
+ ABTS_STR_EQUAL(tc, "Key overlay3 (8) Value value3\n", StrArray[7]);
+ ABTS_STR_EQUAL(tc, "Key overlay4 (8) Value value4\n", StrArray[8]);
+ ABTS_STR_EQUAL(tc, "Key overlay5 (8) Value value5\n", StrArray[9]);
+ ABTS_STR_EQUAL(tc, "#entries 10\n", StrArray[10]);
}
static void overlay_same(abts_case *tc, void *data)
@@ -375,7 +393,7 @@ static void overlay_same(abts_case *tc, void *data)
apr_hash_t *base = NULL;
apr_hash_t *result = NULL;
int count;
- char str[8196];
+ char StrArray[MAX_DEPTH][MAX_LTH];
base = apr_hash_make(p);
ABTS_PTR_NOTNULL(tc, base);
@@ -391,16 +409,14 @@ static void overlay_same(abts_case *tc, void *data)
count = apr_hash_count(result);
ABTS_INT_EQUAL(tc, 5, count);
- dump_hash(p, result, str);
- /* I don't know why these are out of order, but they are. I would probably
- * consider this a bug, but others should comment.
- */
- ABTS_STR_EQUAL(tc, "Key base5 (5) Value value5\n"
- "Key base1 (5) Value value1\n"
- "Key base2 (5) Value value2\n"
- "Key base3 (5) Value value3\n"
- "Key base4 (5) Value value4\n"
- "#entries 5\n", str);
+ dump_hash(p, result, StrArray);
+
+ ABTS_STR_EQUAL(tc, "Key base1 (5) Value value1\n", StrArray[0]);
+ ABTS_STR_EQUAL(tc, "Key base2 (5) Value value2\n", StrArray[1]);
+ ABTS_STR_EQUAL(tc, "Key base3 (5) Value value3\n", StrArray[2]);
+ ABTS_STR_EQUAL(tc, "Key base4 (5) Value value4\n", StrArray[3]);
+ ABTS_STR_EQUAL(tc, "Key base5 (5) Value value5\n", StrArray[4]);
+ ABTS_STR_EQUAL(tc, "#entries 5\n", StrArray[5]);
}
abts_suite *testhash(abts_suite *suite)
diff --git a/srclib/apr/test/testipsub.c b/srclib/apr/test/testipsub.c
index 1411cd05..ea29487e 100644
--- a/srclib/apr/test/testipsub.c
+++ b/srclib/apr/test/testipsub.c
@@ -111,11 +111,13 @@ static void test_interesting_subnets(abts_case *tc, void *data)
char *in_subnet, *not_in_subnet;
} testcases[] =
{
- {"9.67", NULL, APR_INET, "9.67.113.15", "10.1.2.3"}
+ {"9.67", NULL, APR_INET, "9.67.113.15", "10.1.2.3"}
,{"9.67.0.0", "16", APR_INET, "9.67.113.15", "10.1.2.3"}
,{"9.67.0.0", "255.255.0.0", APR_INET, "9.67.113.15", "10.1.2.3"}
,{"9.67.113.99", "16", APR_INET, "9.67.113.15", "10.1.2.3"}
,{"9.67.113.99", "255.255.255.0", APR_INET, "9.67.113.15", "10.1.2.3"}
+ ,{"127", NULL, APR_INET, "127.0.0.1", "10.1.2.3"}
+ ,{"127.0.0.1", "8", APR_INET, "127.0.0.1", "10.1.2.3"}
#if APR_HAVE_IPV6
,{"fe80::", "8", APR_INET6, "fe80::1", "ff01::1"}
,{"ff01::", "8", APR_INET6, "ff01::1", "fe80::1"}
@@ -134,6 +136,8 @@ static void test_interesting_subnets(abts_case *tc, void *data)
ABTS_TRUE(tc, rv == APR_SUCCESS);
rv = apr_sockaddr_info_get(&sa, testcases[i].in_subnet, testcases[i].family, 0, 0, p);
ABTS_TRUE(tc, rv == APR_SUCCESS);
+ ABTS_TRUE(tc, sa != NULL);
+ if (!sa) continue;
rc = apr_ipsubnet_test(ipsub, sa);
ABTS_TRUE(tc, rc != 0);
rv = apr_sockaddr_info_get(&sa, testcases[i].not_in_subnet, testcases[i].family, 0, 0, p);
diff --git a/srclib/apr/test/testall.dsp b/srclib/apr/test/testlib.dsp
index 8689b877..faf2528b 100644
--- a/srclib/apr/test/testall.dsp
+++ b/srclib/apr/test/testlib.dsp
@@ -1,24 +1,28 @@
-# Microsoft Developer Studio Project File - Name="testall" - Package Owner=<4>
+# Microsoft Developer Studio Project File - Name="testlib" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) External Target" 0x0106
-CFG=testall - Win32 Debug
+CFG=testlib - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
-!MESSAGE NMAKE /f "testall.mak".
+!MESSAGE NMAKE /f "testlib.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
-!MESSAGE NMAKE /f "testall.mak" CFG="testall - Win32 Debug"
+!MESSAGE NMAKE /f "testlib.mak" CFG="testlib - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
-!MESSAGE "testall - Win32 Release" (based on "Win32 (x86) External Target")
-!MESSAGE "testall - Win32 Debug" (based on "Win32 (x86) External Target")
+!MESSAGE "testlib - Win32 Release" (based on "Win32 (x86) External Target")
+!MESSAGE "testlib - Win32 Debug" (based on "Win32 (x86) External Target")
+!MESSAGE "testlib - Win32 ReleaseNT" (based on "Win32 (x86) External Target")
+!MESSAGE "testlib - Win32 DebugNT" (based on "Win32 (x86) External Target")
+!MESSAGE "testlib - x64 Release" (based on "Win32 (x86) External Target")
+!MESSAGE "testlib - x64 Debug" (based on "Win32 (x86) External Target")
!MESSAGE
# Begin Project
@@ -26,100 +30,156 @@ CFG=testall - Win32 Debug
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-!IF "$(CFG)" == "testall - Win32 Release"
+!IF "$(CFG)" == "testlib - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir ""
# PROP BASE Intermediate_Dir ""
-# PROP BASE Cmd_Line "NMAKE /f Makefile.win all"
+# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=LibR OUTDIR=LibR MODEL=static all check"
# PROP BASE Rebuild_Opt "/a"
-# PROP BASE Target_File "testall.exe"
-# PROP BASE Bsc_Name "testall.bsc"
+# PROP BASE Target_File "LibR\testall.exe"
+# PROP BASE Bsc_Name ""
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir ""
# PROP Intermediate_Dir ""
-# PROP Cmd_Line "NMAKE /f Makefile.win all"
+# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=LibR OUTDIR=LibR MODEL=static all check"
# PROP Rebuild_Opt "/a"
-# PROP Target_File "testall.exe"
+# PROP Target_File "LibR\testall.exe"
# PROP Bsc_Name ""
# PROP Target_Dir ""
-!ELSEIF "$(CFG)" == "testall - Win32 Debug"
+!ELSEIF "$(CFG)" == "testlib - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir ""
# PROP BASE Intermediate_Dir ""
-# PROP BASE Cmd_Line "NMAKE /f Makefile.win all"
+# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=LibD OUTDIR=LibD MODEL=static _DEBUG=1 all check"
# PROP BASE Rebuild_Opt "/a"
-# PROP BASE Target_File "testall.exe"
-# PROP BASE Bsc_Name "testall.bsc"
+# PROP BASE Target_File "LibD\testall.exe"
+# PROP BASE Bsc_Name ""
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir ""
# PROP Intermediate_Dir ""
-# PROP Cmd_Line "NMAKE /f Makefile.win all"
+# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=LibD OUTDIR=LibD MODEL=static _DEBUG=1 all check"
# PROP Rebuild_Opt "/a"
-# PROP Target_File "testall.exe"
+# PROP Target_File "LibD\testall.exe"
# PROP Bsc_Name ""
# PROP Target_Dir ""
-!ENDIF
-
-# Begin Target
+!ELSEIF "$(CFG)" == "testlib - Win32 ReleaseNT"
-# Name "testall - Win32 Release"
-# Name "testall - Win32 Debug"
-
-!IF "$(CFG)" == "testall - Win32 Release"
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ""
+# PROP BASE Intermediate_Dir ""
+# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=NT\LibR OUTDIR=NT\LibR MODEL=static all check"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "NT\LibR\testall.exe"
+# PROP BASE Bsc_Name ""
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=NT\LibR OUTDIR=NT\LibR MODEL=static all check"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "NT\LibR\testall.exe"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
-!ELSEIF "$(CFG)" == "testall - Win32 Debug"
+!ELSEIF "$(CFG)" == "testlib - Win32 DebugNT"
-!ENDIF
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ""
+# PROP BASE Intermediate_Dir ""
+# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=NT\LibD OUTDIR=NT\LibD MODEL=static _DEBUG=1 all check"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "NT\LibD\testall.exe"
+# PROP BASE Bsc_Name ""
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=NT\LibD OUTDIR=NT\LibD MODEL=static _DEBUG=1 all check"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "NT\LibD\testall.exe"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
-# Begin Source File
+!ELSEIF "$(CFG)" == "testlib - x64 Release"
-SOURCE=.\abts.c
-# End Source File
-# Begin Source File
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ""
+# PROP BASE Intermediate_Dir ""
+# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=x64\LibR OUTDIR=x64\LibR MODEL=static all check"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "x64\LibR\testall.exe"
+# PROP BASE Bsc_Name ""
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=x64\LibR OUTDIR=x64\LibR MODEL=static all check"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "x64\LibR\testall.exe"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
-SOURCE=.\globalmutexchild.c
-# End Source File
-# Begin Source File
+!ELSEIF "$(CFG)" == "testlib - x64 Debug"
-SOURCE=.\Makefile.win
-# End Source File
-# Begin Source File
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ""
+# PROP BASE Intermediate_Dir ""
+# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=x64\LibD OUTDIR=x64\LibD MODEL=static _DEBUG=1 all check"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "x64\LibD\testall.exe"
+# PROP BASE Bsc_Name ""
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=x64\LibD OUTDIR=x64\LibD MODEL=static _DEBUG=1 all check"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "x64\LibD\testall.exe"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
-SOURCE=.\mod_test.c
-# End Source File
-# Begin Source File
+!ENDIF
-SOURCE=.\nw_misc.c
-# End Source File
-# Begin Source File
+# Begin Target
-SOURCE=.\occhild.c
-# End Source File
-# Begin Source File
+# Name "testlib - Win32 Release"
+# Name "testlib - Win32 Debug"
+# Name "testlib - Win32 ReleaseNT"
+# Name "testlib - Win32 DebugNT"
+# Name "testlib - x64 Release"
+# Name "testlib - x64 Debug"
+# Begin Group "testall Source Files"
-SOURCE=.\proc_child.c
-# End Source File
+# PROP Default_Filter ".c"
# Begin Source File
-SOURCE=.\readchild.c
+SOURCE=.\abts.c
# End Source File
# Begin Source File
-SOURCE=.\sendfile.c
+SOURCE=.\abts.h
# End Source File
# Begin Source File
-SOURCE=.\sockchild.c
+SOURCE=.\abts_tests.h
# End Source File
# Begin Source File
@@ -167,6 +227,10 @@ SOURCE=.\testflock.c
# End Source File
# Begin Source File
+SOURCE=.\testflock.h
+# End Source File
+# Begin Source File
+
SOURCE=.\testfmt.c
# End Source File
# Begin Source File
@@ -179,6 +243,10 @@ SOURCE=.\testglobalmutex.c
# End Source File
# Begin Source File
+SOURCE=.\testglobalmutex.h
+# End Source File
+# Begin Source File
+
SOURCE=.\testhash.c
# End Source File
# Begin Source File
@@ -195,18 +263,10 @@ SOURCE=.\testlock.c
# End Source File
# Begin Source File
-SOURCE=.\testlockperf.c
-# End Source File
-# Begin Source File
-
SOURCE=.\testmmap.c
# End Source File
# Begin Source File
-SOURCE=.\testmutexscope.c
-# End Source File
-# Begin Source File
-
SOURCE=.\testnames.c
# End Source File
# Begin Source File
@@ -235,10 +295,6 @@ SOURCE=.\testproc.c
# End Source File
# Begin Source File
-SOURCE=.\testprocmutex.c
-# End Source File
-# Begin Source File
-
SOURCE=.\testrand.c
# End Source File
# Begin Source File
@@ -251,19 +307,19 @@ SOURCE=.\testshm.c
# End Source File
# Begin Source File
-SOURCE=.\testshmconsumer.c
+SOURCE=.\testshm.h
# End Source File
# Begin Source File
-SOURCE=.\testshmproducer.c
+SOURCE=.\testsleep.c
# End Source File
# Begin Source File
-SOURCE=.\testsleep.c
+SOURCE=.\testsock.c
# End Source File
# Begin Source File
-SOURCE=.\testsock.c
+SOURCE=.\testsock.h
# End Source File
# Begin Source File
@@ -311,11 +367,76 @@ SOURCE=.\testutil.c
# End Source File
# Begin Source File
+SOURCE=.\testutil.h
+# End Source File
+# Begin Source File
+
SOURCE=.\testvsn.c
# End Source File
+# End Group
+# Begin Group "Other Source Files"
+
+# PROP Default_Filter ".c"
+# Begin Source File
+
+SOURCE=.\globalmutexchild.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\mod_test.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\nw_misc.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\occhild.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\proc_child.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\readchild.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\sendfile.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\sockchild.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testlockperf.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testmutexscope.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testprocmutex.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testshmconsumer.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\testshmproducer.c
+# End Source File
# Begin Source File
SOURCE=.\tryread.c
# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\Makefile.win
+# End Source File
# End Target
# End Project
diff --git a/srclib/apr/test/testlockperf.c b/srclib/apr/test/testlockperf.c
index e0bf75ae..f673e5f7 100644
--- a/srclib/apr/test/testlockperf.c
+++ b/srclib/apr/test/testlockperf.c
@@ -38,6 +38,7 @@ int main(void)
#define MAX_COUNTER 1000000
#define MAX_THREADS 6
+static int verbose = 0;
static long mutex_counter;
static apr_thread_mutex_t *thread_lock;
@@ -244,7 +245,10 @@ int main(int argc, const char * const *argv)
exit(-1);
}
- while ((rv = apr_getopt(opt, "f:", &optchar, &optarg)) == APR_SUCCESS) {
+ while ((rv = apr_getopt(opt, "vf:", &optchar, &optarg)) == APR_SUCCESS) {
+ if (optchar == 'v') {
+ verbose = 1;
+ }
if (optchar == 'f') {
lockname = optarg;
}
diff --git a/srclib/apr/test/testmmap.c b/srclib/apr/test/testmmap.c
index 61b7481e..6e901380 100644
--- a/srclib/apr/test/testmmap.c
+++ b/srclib/apr/test/testmmap.c
@@ -39,8 +39,8 @@ static void not_implemented(abts_case *tc, void *data)
static apr_mmap_t *themmap = NULL;
static apr_file_t *thefile = NULL;
static char *file1;
-static apr_finfo_t finfo;
-static int fsize;
+static apr_finfo_t thisfinfo;
+static apr_size_t thisfsize;
static void create_filename(abts_case *tc, void *data)
{
@@ -82,16 +82,16 @@ static void test_get_filesize(abts_case *tc, void *data)
{
apr_status_t rv;
- rv = apr_file_info_get(&finfo, APR_FINFO_NORM, thefile);
+ rv = apr_file_info_get(&thisfinfo, APR_FINFO_NORM, thefile);
ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
- ABTS_ASSERT(tc, "File size mismatch", fsize == finfo.size);
+ ABTS_ASSERT(tc, "File size mismatch", thisfsize == thisfinfo.size);
}
static void test_mmap_create(abts_case *tc, void *data)
{
apr_status_t rv;
- rv = apr_mmap_create(&themmap, thefile, 0, (apr_size_t) finfo.size,
+ rv = apr_mmap_create(&themmap, thefile, 0, (apr_size_t) thisfinfo.size,
APR_MMAP_READ, p);
ABTS_PTR_NOTNULL(tc, themmap);
ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
@@ -102,10 +102,10 @@ static void test_mmap_contents(abts_case *tc, void *data)
ABTS_PTR_NOTNULL(tc, themmap);
ABTS_PTR_NOTNULL(tc, themmap->mm);
- ABTS_INT_EQUAL(tc, fsize, themmap->size);
+ ABTS_SIZE_EQUAL(tc, thisfsize, themmap->size);
/* Must use nEquals since the string is not guaranteed to be NULL terminated */
- ABTS_STR_NEQUAL(tc, themmap->mm, TEST_STRING, fsize);
+ ABTS_STR_NEQUAL(tc, themmap->mm, TEST_STRING, thisfsize);
}
static void test_mmap_delete(abts_case *tc, void *data)
@@ -126,7 +126,7 @@ static void test_mmap_offset(abts_case *tc, void *data)
rv = apr_mmap_offset(&addr, themmap, 5);
/* Must use nEquals since the string is not guaranteed to be NULL terminated */
- ABTS_STR_NEQUAL(tc, addr, TEST_STRING + 5, fsize-5);
+ ABTS_STR_NEQUAL(tc, addr, TEST_STRING + 5, thisfsize-5);
}
#endif
@@ -135,7 +135,7 @@ abts_suite *testmmap(abts_suite *suite)
suite = ADD_SUITE(suite)
#if APR_HAS_MMAP
- fsize = strlen(TEST_STRING);
+ thisfsize = strlen(TEST_STRING);
abts_run_test(suite, create_filename, NULL);
abts_run_test(suite, test_file_open, NULL);
diff --git a/srclib/apr/test/testmutexscope.c b/srclib/apr/test/testmutexscope.c
index 0ea08cc6..5318a27c 100644
--- a/srclib/apr/test/testmutexscope.c
+++ b/srclib/apr/test/testmutexscope.c
@@ -96,6 +96,7 @@ static void * APR_THREAD_FUNC eachThread(apr_thread_t *id, void *p)
assert(apr_thread_mutex_lock(thread_mutex) == APR_SUCCESS);
assert(apr_thread_mutex_unlock(thread_mutex) == APR_SUCCESS);
lock_release(test_mode);
+ apr_thread_exit(id, 0);
return NULL;
}
diff --git a/srclib/apr/test/testnames.c b/srclib/apr/test/testnames.c
index fca79f3e..a96a9b2f 100644
--- a/srclib/apr/test/testnames.c
+++ b/srclib/apr/test/testnames.c
@@ -228,13 +228,18 @@ static void root_from_cwd_and_back(abts_case *tc, void *data)
const char *path = "//";
char *origpath;
char *testpath;
+ int hadfailed;
ABTS_INT_EQUAL(tc, APR_SUCCESS, apr_filepath_get(&origpath, 0, p));
path = origpath;
rv = apr_filepath_root(&root, &path, APR_FILEPATH_TRUENAME, p);
#if defined(WIN32) || defined(OS2)
- ABTS_INT_EQUAL(tc, origpath[0], root[0]);
+ hadfailed = tc->failed;
+ /* It appears some mingw/cygwin and more modern builds can return
+ * a lowercase drive designation, but we canonicalize to uppercase
+ */
+ ABTS_INT_EQUAL(tc, toupper(origpath[0]), root[0]);
ABTS_INT_EQUAL(tc, ':', root[1]);
ABTS_INT_EQUAL(tc, '/', root[2]);
ABTS_INT_EQUAL(tc, 0, root[3]);
@@ -262,7 +267,16 @@ static void root_from_cwd_and_back(abts_case *tc, void *data)
| APR_FILEPATH_NOTABOVEROOT
| APR_FILEPATH_NOTRELATIVE, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
+ hadfailed = tc->failed;
+ /* The API doesn't promise equality!!!
+ * apr_filepath_get never promised a canonical filepath.
+ * We'll emit noise under verbose so the user is aware,
+ * but translate this back to success.
+ */
ABTS_STR_EQUAL(tc, origpath, testpath);
+#if defined(WIN32) || defined(OS2) || defined(NETWARE)
+ if (!hadfailed) tc->failed = 0;
+#endif
}
diff --git a/srclib/apr/test/testoc.c b/srclib/apr/test/testoc.c
index 9dbaff8c..a5342b1f 100644
--- a/srclib/apr/test/testoc.c
+++ b/srclib/apr/test/testoc.c
@@ -73,7 +73,7 @@ static void test_child_kill(abts_case *tc, void *data)
APR_NO_PIPE);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- rv = apr_proc_create(&newproc, "./occhild" EXTENSION, args, NULL, procattr, p);
+ rv = apr_proc_create(&newproc, TESTBINPATH "occhild" EXTENSION, args, NULL, procattr, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
ABTS_PTR_NOTNULL(tc, newproc.in);
ABTS_PTR_EQUAL(tc, NULL, newproc.out);
diff --git a/srclib/apr/test/testpipe.c b/srclib/apr/test/testpipe.c
index db3c77ff..d60707a3 100644
--- a/srclib/apr/test/testpipe.c
+++ b/srclib/apr/test/testpipe.c
@@ -94,7 +94,7 @@ static void read_write(abts_case *tc, void *data)
if (!rv) {
rv = apr_file_read(readp, buf, &nbytes);
ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_TIMEUP(rv));
- ABTS_INT_EQUAL(tc, 0, nbytes);
+ ABTS_SIZE_EQUAL(tc, 0, nbytes);
}
}
@@ -113,14 +113,14 @@ static void read_write_notimeout(abts_case *tc, void *data)
ABTS_PTR_NOTNULL(tc, writep);
rv = apr_file_write(writep, buf, &nbytes);
- ABTS_INT_EQUAL(tc, strlen("this is a test"), nbytes);
+ ABTS_SIZE_EQUAL(tc, strlen("this is a test"), nbytes);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
nbytes = 256;
input = apr_pcalloc(p, nbytes + 1);
rv = apr_file_read(readp, input, &nbytes);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- ABTS_INT_EQUAL(tc, strlen("this is a test"), nbytes);
+ ABTS_SIZE_EQUAL(tc, strlen("this is a test"), nbytes);
ABTS_STR_EQUAL(tc, "this is a test", input);
}
@@ -151,7 +151,7 @@ static void test_pipe_writefull(abts_case *tc, void *data)
args[0] = "readchild" EXTENSION;
args[1] = NULL;
- rv = apr_proc_create(&proc, "./readchild" EXTENSION, args, NULL, procattr, p);
+ rv = apr_proc_create(&proc, TESTBINPATH "readchild" EXTENSION, args, NULL, procattr, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
rv = apr_file_pipe_timeout_set(proc.in, apr_time_from_sec(10));
diff --git a/srclib/apr/test/testpoll.c b/srclib/apr/test/testpoll.c
index 36dd8a06..f4ca8258 100644
--- a/srclib/apr/test/testpoll.c
+++ b/srclib/apr/test/testpoll.c
@@ -90,7 +90,7 @@ static void send_msg(apr_socket_t **sockarray, apr_sockaddr_t **sas, int which,
rv = apr_socket_sendto(sockarray[which], sas[which], 0, "hello", &len);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- ABTS_INT_EQUAL(tc, strlen("hello"), len);
+ ABTS_SIZE_EQUAL(tc, strlen("hello"), len);
}
static void recv_msg(apr_socket_t **sockarray, int which, apr_pool_t *p,
@@ -107,7 +107,7 @@ static void recv_msg(apr_socket_t **sockarray, int which, apr_pool_t *p,
rv = apr_socket_recvfrom(recsa, sockarray[which], 0, buffer, &buflen);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- ABTS_INT_EQUAL(tc, strlen("hello"), buflen);
+ ABTS_SIZE_EQUAL(tc, strlen("hello"), buflen);
ABTS_STR_EQUAL(tc, "hello", buffer);
}
diff --git a/srclib/apr/test/testproc.c b/srclib/apr/test/testproc.c
index b025c8e5..4791b928 100644
--- a/srclib/apr/test/testproc.c
+++ b/srclib/apr/test/testproc.c
@@ -50,7 +50,7 @@ static void test_create_proc(abts_case *tc, void *data)
args[0] = "proc_child" EXTENSION;
args[1] = NULL;
- rv = apr_proc_create(&newproc, "../proc_child" EXTENSION, args, NULL,
+ rv = apr_proc_create(&newproc, "../" TESTBINPATH "proc_child" EXTENSION, args, NULL,
attr, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -59,7 +59,7 @@ static void test_create_proc(abts_case *tc, void *data)
length = strlen(TESTSTR);
rv = apr_file_write(testfile, TESTSTR, &length);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- ABTS_INT_EQUAL(tc, strlen(TESTSTR), length);
+ ABTS_SIZE_EQUAL(tc, strlen(TESTSTR), length);
testfile = newproc.out;
length = 256;
@@ -126,7 +126,7 @@ static void test_file_redir(abts_case *tc, void *data)
args[0] = "proc_child";
args[1] = NULL;
- rv = apr_proc_create(&newproc, "../proc_child" EXTENSION, args, NULL,
+ rv = apr_proc_create(&newproc, "../" TESTBINPATH "proc_child" EXTENSION, args, NULL,
attr, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
diff --git a/srclib/apr/test/testshm.c b/srclib/apr/test/testshm.c
index 3691dd52..ab9b76c2 100644
--- a/srclib/apr/test/testshm.c
+++ b/srclib/apr/test/testshm.c
@@ -83,7 +83,7 @@ static void test_check_size(abts_case *tc, void *data)
ABTS_PTR_NOTNULL(tc, shm);
retsize = apr_shm_size_get(shm);
- ABTS_INT_EQUAL(tc, SHARED_SIZE, retsize);
+ ABTS_SIZE_EQUAL(tc, SHARED_SIZE, retsize);
rv = apr_shm_destroy(shm);
APR_ASSERT_SUCCESS(tc, "Error destroying shared memory block", rv);
@@ -177,7 +177,7 @@ static void test_named(abts_case *tc, void *data)
ABTS_PTR_NOTNULL(tc, shm);
retsize = apr_shm_size_get(shm);
- ABTS_INT_EQUAL(tc, SHARED_SIZE, retsize);
+ ABTS_SIZE_EQUAL(tc, SHARED_SIZE, retsize);
boxes = apr_shm_baseaddr_get(shm);
ABTS_PTR_NOTNULL(tc, boxes);
@@ -187,7 +187,7 @@ static void test_named(abts_case *tc, void *data)
APR_ASSERT_SUCCESS(tc, "Couldn't create attr1", rv);
args[0] = apr_pstrdup(p, "testshmproducer" EXTENSION);
args[1] = NULL;
- rv = apr_proc_create(&pidproducer, "./testshmproducer" EXTENSION, args,
+ rv = apr_proc_create(&pidproducer, TESTBINPATH "testshmproducer" EXTENSION, args,
NULL, attr1, p);
APR_ASSERT_SUCCESS(tc, "Couldn't launch producer", rv);
@@ -195,7 +195,7 @@ static void test_named(abts_case *tc, void *data)
ABTS_PTR_NOTNULL(tc, attr2);
APR_ASSERT_SUCCESS(tc, "Couldn't create attr2", rv);
args[0] = apr_pstrdup(p, "testshmconsumer" EXTENSION);
- rv = apr_proc_create(&pidconsumer, "./testshmconsumer" EXTENSION, args,
+ rv = apr_proc_create(&pidconsumer, TESTBINPATH "testshmconsumer" EXTENSION, args,
NULL, attr2, p);
APR_ASSERT_SUCCESS(tc, "Couldn't launch consumer", rv);
@@ -221,7 +221,7 @@ static void test_named(abts_case *tc, void *data)
static void test_named_remove(abts_case *tc, void *data)
{
apr_status_t rv;
- apr_shm_t *shm;
+ apr_shm_t *shm, *shm2;
apr_shm_remove(SHARED_FILENAME, p);
@@ -233,20 +233,29 @@ static void test_named_remove(abts_case *tc, void *data)
ABTS_PTR_NOTNULL(tc, shm);
rv = apr_shm_remove(SHARED_FILENAME, p);
- APR_ASSERT_SUCCESS(tc, "Error removing shared memory block", rv);
- if (rv != APR_SUCCESS) {
- return ;
- }
- rv = apr_shm_create(&shm, SHARED_SIZE, SHARED_FILENAME, p);
- APR_ASSERT_SUCCESS(tc, "Error allocating shared memory block", rv);
- if (rv != APR_SUCCESS) {
- return;
+ /* On platforms which acknowledge the removal of the shared resource,
+ * ensure another of the same name may be created after removal;
+ */
+ if (rv == APR_SUCCESS)
+ {
+ rv = apr_shm_create(&shm2, SHARED_SIZE, SHARED_FILENAME, p);
+ APR_ASSERT_SUCCESS(tc, "Error allocating shared memory block", rv);
+ if (rv != APR_SUCCESS) {
+ return;
+ }
+ ABTS_PTR_NOTNULL(tc, shm2);
+
+ rv = apr_shm_destroy(shm2);
+ APR_ASSERT_SUCCESS(tc, "Error destroying shared memory block", rv);
}
- ABTS_PTR_NOTNULL(tc, shm);
rv = apr_shm_destroy(shm);
APR_ASSERT_SUCCESS(tc, "Error destroying shared memory block", rv);
+
+ /* Now ensure no named resource remains which we may attach to */
+ rv = apr_shm_attach(&shm, SHARED_FILENAME, p);
+ ABTS_TRUE(tc, rv != 0);
}
#endif
diff --git a/srclib/apr/test/testsock.c b/srclib/apr/test/testsock.c
index 7c1759e9..2ca31137 100644
--- a/srclib/apr/test/testsock.c
+++ b/srclib/apr/test/testsock.c
@@ -43,7 +43,7 @@ static void launch_child(abts_case *tc, apr_proc_t *proc, const char *arg1, apr_
args[0] = "sockchild" EXTENSION;
args[1] = arg1;
args[2] = NULL;
- rv = apr_proc_create(proc, "./sockchild" EXTENSION, args, NULL,
+ rv = apr_proc_create(proc, TESTBINPATH "sockchild" EXTENSION, args, NULL,
procattr, p);
APR_ASSERT_SUCCESS(tc, "Couldn't launch program", rv);
}
@@ -133,7 +133,7 @@ static void test_send(abts_case *tc, void *data)
apr_socket_send(sock2, DATASTR, &length);
/* Make sure that the client received the data we sent */
- ABTS_INT_EQUAL(tc, strlen(DATASTR), wait_child(tc, &proc));
+ ABTS_SIZE_EQUAL(tc, strlen(DATASTR), wait_child(tc, &proc));
rv = apr_socket_close(sock2);
APR_ASSERT_SUCCESS(tc, "Problem closing connected socket", rv);
@@ -167,7 +167,7 @@ static void test_recv(abts_case *tc, void *data)
/* Make sure that the server received the data we sent */
ABTS_STR_EQUAL(tc, DATASTR, datastr);
- ABTS_INT_EQUAL(tc, strlen(datastr), wait_child(tc, &proc));
+ ABTS_SIZE_EQUAL(tc, strlen(datastr), wait_child(tc, &proc));
rv = apr_socket_close(sock2);
APR_ASSERT_SUCCESS(tc, "Problem closing connected socket", rv);
diff --git a/srclib/apr/test/testsockets.c b/srclib/apr/test/testsockets.c
index 934cd410..b5741a85 100644
--- a/srclib/apr/test/testsockets.c
+++ b/srclib/apr/test/testsockets.c
@@ -59,15 +59,21 @@ static void udp_socket(abts_case *tc, void *data)
/* On recent Linux systems, whilst IPv6 is always supported by glibc,
* socket(AF_INET6, ...) calls will fail with EAFNOSUPPORT if the
* "ipv6" kernel module is not loaded. */
-#ifdef EAFNOSUPPORT
+#if defined(WSAEAFNOSUPPORT)
+#define V6_NOT_ENABLED(e) ((e) == APR_OS_START_SYSERR + WSAEAFNOSUPPORT)
+#elif defined(SOCEAFNOSUPPORT)
+#define V6_NOT_ENABLED(e) ((e) == APR_OS_START_SYSERR + SOCEAFNOSUPPORT)
+#elif defined(EAFNOSUPPORT)
#define V6_NOT_ENABLED(e) ((e) == EAFNOSUPPORT)
+#elif !APR_HAVE_IPV6
+#define V6_NOT_ENABLED(e) (1)
#else
-#define V6_NOT_ENABLED(e) (0)
+#error MUST have an EAFNOSUPPORT class of error code to enable IPv6!
#endif
+#if APR_HAVE_IPV6
static void tcp6_socket(abts_case *tc, void *data)
{
-#if APR_HAVE_IPV6
apr_status_t rv;
apr_socket_t *sock = NULL;
@@ -79,14 +85,10 @@ static void tcp6_socket(abts_case *tc, void *data)
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
ABTS_PTR_NOTNULL(tc, sock);
apr_socket_close(sock);
-#else
- ABTS_NOT_IMPL(tc, "IPv6");
-#endif
}
static void udp6_socket(abts_case *tc, void *data)
{
-#if APR_HAVE_IPV6
apr_status_t rv;
apr_socket_t *sock = NULL;
@@ -98,12 +100,11 @@ static void udp6_socket(abts_case *tc, void *data)
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
ABTS_PTR_NOTNULL(tc, sock);
apr_socket_close(sock);
-#else
- ABTS_NOT_IMPL(tc, "IPv6");
-#endif
}
+#endif
-static void sendto_receivefrom_helper(abts_case *tc, const char *addr, int family)
+static void sendto_receivefrom_helper(abts_case *tc, const char *addr,
+ int family)
{
apr_status_t rv;
apr_socket_t *sock = NULL;
@@ -117,6 +118,12 @@ static void sendto_receivefrom_helper(abts_case *tc, const char *addr, int famil
apr_size_t len = 30;
rv = apr_socket_create(&sock, family, SOCK_DGRAM, 0, p);
+#if APR_HAVE_IPV6
+ if ((family == APR_INET6) && V6_NOT_ENABLED(rv)) {
+ ABTS_NOT_IMPL(tc, "IPv6 not enabled");
+ return;
+ }
+#endif
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
if (rv != APR_SUCCESS)
return;
@@ -148,12 +155,24 @@ static void sendto_receivefrom_helper(abts_case *tc, const char *addr, int famil
len = STRLEN;
rv = apr_socket_sendto(sock2, to, 0, sendbuf, &len);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- ABTS_INT_EQUAL(tc, STRLEN, len);
+ ABTS_SIZE_EQUAL(tc, STRLEN, len);
+
+ /* fill the "from" sockaddr with a random address from another
+ * family to ensure that recvfrom sets it up properly. */
+#if APR_HAVE_IPV6
+ if (family == APR_INET)
+ rv = apr_sockaddr_info_get(&from, "3ffE:816e:abcd:1234::1",
+ APR_INET6, 4242, 0, p);
+ else
+#else
+ rv = apr_sockaddr_info_get(&from, "127.1.2.3", APR_INET, 4242, 0, p);
+#endif
+ ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
len = 80;
rv = apr_socket_recvfrom(from, sock, 0, recvbuf, &len);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- ABTS_INT_EQUAL(tc, STRLEN, len);
+ ABTS_SIZE_EQUAL(tc, STRLEN, len);
ABTS_STR_EQUAL(tc, "APR_INET, SOCK_DGRAM", recvbuf);
apr_sockaddr_ip_get(&ip_addr, from);
@@ -167,11 +186,21 @@ static void sendto_receivefrom_helper(abts_case *tc, const char *addr, int famil
static void sendto_receivefrom(abts_case *tc, void *data)
{
+ int failed;
+ sendto_receivefrom_helper(tc, "127.0.0.1", APR_INET);
+ failed = tc->failed; tc->failed = 0;
+ ABTS_TRUE(tc, !failed);
+}
+
#if APR_HAVE_IPV6
+static void sendto_receivefrom6(abts_case *tc, void *data)
+{
+ int failed;
sendto_receivefrom_helper(tc, "::1", APR_INET6);
-#endif
- sendto_receivefrom_helper(tc, "127.0.0.1", APR_INET);
+ failed = tc->failed; tc->failed = 0;
+ ABTS_TRUE(tc, !failed);
}
+#endif
static void socket_userdata(abts_case *tc, void *data)
{
@@ -205,10 +234,14 @@ abts_suite *testsockets(abts_suite *suite)
abts_run_test(suite, tcp_socket, NULL);
abts_run_test(suite, udp_socket, NULL);
+ abts_run_test(suite, sendto_receivefrom, NULL);
+
+#if APR_HAVE_IPV6
abts_run_test(suite, tcp6_socket, NULL);
abts_run_test(suite, udp6_socket, NULL);
- abts_run_test(suite, sendto_receivefrom, NULL);
+ abts_run_test(suite, sendto_receivefrom6, NULL);
+#endif
abts_run_test(suite, socket_userdata, NULL);
diff --git a/srclib/apr/test/testutil.h b/srclib/apr/test/testutil.h
index 96394c5e..6d7639bc 100644
--- a/srclib/apr/test/testutil.h
+++ b/srclib/apr/test/testutil.h
@@ -15,12 +15,22 @@
*/
#include "apr_pools.h"
+#include "apr_general.h"
#include "abts.h"
#ifndef APR_TEST_UTIL
#define APR_TEST_UTIL
-/* XXX FIXME */
+#ifdef WIN32
+#ifdef BINPATH
+#define TESTBINPATH APR_STRINGIFY(BINPATH) "/"
+#else
+#define TESTBINPATH ""
+#endif
+#else
+#define TESTBINPATH "./"
+#endif
+
#ifdef WIN32
#define EXTENSION ".exe"
#elif NETWARE
diff --git a/srclib/apr/threadproc/win32/proc.c b/srclib/apr/threadproc/win32/proc.c
index 7533ad7b..aa85fe4d 100644
--- a/srclib/apr/threadproc/win32/proc.c
+++ b/srclib/apr/threadproc/win32/proc.c
@@ -32,6 +32,10 @@
#include <process.h>
#endif
+/* We have very carefully excluded volumes of definitions from the
+ * Microsoft Platform SDK, which kill the build time performance.
+ * These the sole constants we borrow from WinBase.h and WinUser.h
+ */
#ifndef LOGON32_LOGON_NETWORK
#define LOGON32_LOGON_NETWORK 3
#endif
@@ -83,20 +87,66 @@ APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr,
in = APR_READ_BLOCK;
else if (in == APR_PARENT_BLOCK)
in = APR_WRITE_BLOCK;
- stat = apr_create_nt_pipe(&attr->child_in, &attr->parent_in, in,
- attr->pool);
+
+ stat = apr_create_nt_pipe(&attr->child_in, &attr->parent_in,
+ in, attr->pool);
+ if (stat == APR_SUCCESS) {
+ switch (in) {
+ case APR_FULL_BLOCK:
+ break;
+ case APR_READ_BLOCK:
+ apr_file_pipe_timeout_set(attr->parent_in, 0);
+ break;
+ case APR_WRITE_BLOCK:
+ apr_file_pipe_timeout_set(attr->child_in, 0);
+ break;
+ default:
+ apr_file_pipe_timeout_set(attr->child_in, 0);
+ apr_file_pipe_timeout_set(attr->parent_in, 0);
+ }
+ }
if (stat == APR_SUCCESS)
stat = apr_file_inherit_unset(attr->parent_in);
}
if (out && stat == APR_SUCCESS) {
- stat = apr_create_nt_pipe(&attr->parent_out, &attr->child_out, out,
- attr->pool);
+ stat = apr_create_nt_pipe(&attr->parent_out, &attr->child_out,
+ out, attr->pool);
+ if (stat == APR_SUCCESS) {
+ switch (out) {
+ case APR_FULL_BLOCK:
+ break;
+ case APR_PARENT_BLOCK:
+ apr_file_pipe_timeout_set(attr->child_out, 0);
+ break;
+ case APR_CHILD_BLOCK:
+ apr_file_pipe_timeout_set(attr->parent_out, 0);
+ break;
+ default:
+ apr_file_pipe_timeout_set(attr->child_out, 0);
+ apr_file_pipe_timeout_set(attr->parent_out, 0);
+ }
+ }
if (stat == APR_SUCCESS)
stat = apr_file_inherit_unset(attr->parent_out);
}
if (err && stat == APR_SUCCESS) {
- stat = apr_create_nt_pipe(&attr->parent_err, &attr->child_err, err,
- attr->pool);
+ stat = apr_create_nt_pipe(&attr->parent_err, &attr->child_err,
+ err, attr->pool);
+ if (stat == APR_SUCCESS) {
+ switch (err) {
+ case APR_FULL_BLOCK:
+ break;
+ case APR_PARENT_BLOCK:
+ apr_file_pipe_timeout_set(attr->child_err, 0);
+ break;
+ case APR_CHILD_BLOCK:
+ apr_file_pipe_timeout_set(attr->parent_err, 0);
+ break;
+ default:
+ apr_file_pipe_timeout_set(attr->child_err, 0);
+ apr_file_pipe_timeout_set(attr->parent_err, 0);
+ }
+ }
if (stat == APR_SUCCESS)
stat = apr_file_inherit_unset(attr->parent_err);
}
@@ -776,46 +826,49 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
si.dwFlags |= STARTF_USESTDHANDLES;
si.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
+ if (GetHandleInformation(si.hStdInput, &stdin_reset)
+ && (stdin_reset &= HANDLE_FLAG_INHERIT))
+ SetHandleInformation(si.hStdInput,
+ HANDLE_FLAG_INHERIT, 0);
+
if (attr->child_in && attr->child_in->filehand)
{
- if (GetHandleInformation(si.hStdInput,
- &stdin_reset)
- && (stdin_reset &= HANDLE_FLAG_INHERIT))
- SetHandleInformation(si.hStdInput,
- HANDLE_FLAG_INHERIT, 0);
-
si.hStdInput = attr->child_in->filehand;
SetHandleInformation(si.hStdInput, HANDLE_FLAG_INHERIT,
HANDLE_FLAG_INHERIT);
}
+ else
+ si.hStdInput = INVALID_HANDLE_VALUE;
si.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
+ if (GetHandleInformation(si.hStdOutput, &stdout_reset)
+ && (stdout_reset &= HANDLE_FLAG_INHERIT))
+ SetHandleInformation(si.hStdOutput,
+ HANDLE_FLAG_INHERIT, 0);
+
if (attr->child_out && attr->child_out->filehand)
{
- if (GetHandleInformation(si.hStdOutput,
- &stdout_reset)
- && (stdout_reset &= HANDLE_FLAG_INHERIT))
- SetHandleInformation(si.hStdOutput,
- HANDLE_FLAG_INHERIT, 0);
-
si.hStdOutput = attr->child_out->filehand;
SetHandleInformation(si.hStdOutput, HANDLE_FLAG_INHERIT,
HANDLE_FLAG_INHERIT);
}
+ else
+ si.hStdOutput = INVALID_HANDLE_VALUE;
si.hStdError = GetStdHandle(STD_ERROR_HANDLE);
+ if (GetHandleInformation(si.hStdError, &stderr_reset)
+ && (stderr_reset &= HANDLE_FLAG_INHERIT))
+ SetHandleInformation(si.hStdError,
+ HANDLE_FLAG_INHERIT, 0);
+
if (attr->child_err && attr->child_err->filehand)
{
- if (GetHandleInformation(si.hStdError,
- &stderr_reset)
- && (stderr_reset &= HANDLE_FLAG_INHERIT))
- SetHandleInformation(si.hStdError,
- HANDLE_FLAG_INHERIT, 0);
-
si.hStdError = attr->child_err->filehand;
SetHandleInformation(si.hStdError, HANDLE_FLAG_INHERIT,
- HANDLE_FLAG_INHERIT);
+ HANDLE_FLAG_INHERIT);
}
+ else
+ si.hStdError = INVALID_HANDLE_VALUE;
}
if (attr->user_token) {
/* XXX: for terminal services, handles can't be cannot be
diff --git a/srclib/apr/threadproc/win32/thread.c b/srclib/apr/threadproc/win32/thread.c
index bb378559..dd7c09a8 100644
--- a/srclib/apr/threadproc/win32/thread.c
+++ b/srclib/apr/threadproc/win32/thread.c
@@ -108,7 +108,7 @@ APR_DECLARE(apr_status_t) apr_thread_create(apr_thread_t **new,
*/
#ifndef _WIN32_WCE
if ((handle = (HANDLE)_beginthreadex(NULL,
- attr && attr->stacksize > 0 ? attr->stacksize : 0,
+ (DWORD) (attr ? attr->stacksize : 0),
(unsigned int (APR_THREAD_FUNC *)(void *))dummy_worker,
(*new), 0, &temp)) == 0) {
return APR_FROM_OS_ERROR(_doserrno);