summaryrefslogtreecommitdiff
path: root/srclib/apr
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/apr
parent1acac7a6b494db24f8f58e44dab7657b6de68742 (diff)
downloadapache2-9e615cb6aa4afcee97f8a1646e5a586261a7b81f.tar.gz
Upstream tarball 2.2.8upstream/2.2.8
Diffstat (limited to 'srclib/apr')
-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
83 files changed, 4881 insertions, 1495 deletions
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);