Update apr to 1.7.0. See contrib/apr/CHANGES for a summary of changes.

MFC after:	2 weeks
X-MFC-With:	r361677
This commit is contained in:
Dimitry Andric 2020-05-31 22:12:56 +00:00
commit b081c245fd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=361678
104 changed files with 9999 additions and 3826 deletions

View File

@ -1,179 +1,61 @@
-*- coding: utf-8 -*-
Changes for APR 1.5.2
Changes for APR 1.7.0
*) SECURITY: CVE-2015-1829 (cve.mitre.org)
APR applications using APR named pipe support on Windows can be
vulnerable to a pipe squatting attack from a local process; the extent
of the vulnerability, when present, depends on the application.
Initial analysis and report was provided by John Hernandez of Casaba
Security via HP SSRT Security Alert. [Yann Ylavic]
*) apr_dir_read: [Unix] Dropped the preference of the dirread_r() flavor
for dirread(), because the former is both deprecated and unneeded.
[Yann Ylavic, William Rowe]
*) apr_atomic: Fix errors when building on Visual Studio 2013 while
maintaining the ability to build on Visual Studio 6 with Windows
Server 2003 R2 SDK. PR 57191. [Gregg Smith]
*) apr_file_info: [Win32 only] Treat only "name surrogate" reparse points
as symlinks, and not other reparse tag types. PR47630
[Oleg Liatte <olegliatte gmail.com>]
*) Switch to generic atomics for early/unpatched Solaris 10 not exporting
some atomic functions. PR 55418. [Yann Ylavic]
*) Test %ld vs. %lld to avoid compiler emits using APR_OFF_T_FMT, in the
case of apparently equivilant long and long long types. [William Rowe]
*) apr_file_mktemp() on HP-UX: Remove limitation of 26 temporary files
per process. PR 57677. [Jeff Trawick]
*) Recognize APPLE predefined macros as equivilant to DARWIN. [Jim Jagielski]
*) apr_escape: Correctly calculate the size of the returned string in
apr_escape_path and set the correct return value in case we actually
escape the string. [<aduryagin gmail.com>] PR 57230.
*) Signals: Allow handling of SIGUSR2 in apr_signal_thread. [Yann Ylavic]
*) pollcb on Windows: Handle calls with no file/socket descriptors.
Follow up to PR 49882. [Jeff Trawick, Yann Ylavic]
*) Atomics: Support for 64bit ints. [Jim Jagielski]
*) apr_poll(cb): fix error paths returned values and leaks. [Yann Ylavic]
*) Add the apr_encode_* API that implements RFC4648 and RFC7515
compliant BASE64, BASE64URL, BASE32, BASE32HEX and BASE16
encode/decode functions. [Graham Leggett]
*) apr_thread_cond_*wait() on BeOS: Fix broken logic. PR 45800.
[Jochen Voss (no e-mail)]
*) rand: Use arc4random_buf() on BSD platforms and getrandom() on Linux,
when available. [Christian Weisgerber <naddy openbsd.org, Yann Ylavic]
*) apr_skiplist: Optimize the number of allocations by reusing pooled or
malloc()ed nodes for the lifetime of the skiplist. [Yann Ylavic]
*) Add apr_sockaddr_zone_set, apr_sockaddr_zone_set to set and retrieve
the zone for link-local IPv6 addresses. [Joe Orton]
*) apr_skiplist: Fix possible multiple-free() on the same value in
apr_skiplist_remove_all(). [Yann Ylavic]
*) apr_sockaddr_equal: Compare link-local IPv6 addresses with different
zones as not equal. [Joe Orton]
*) apr_pollset: On z/OS, threadsafe apr_pollset_poll() may return
"EDC8102I Operation would block" under load.
[Pat Odonnell <patod us.ibm.com>]
*) apr_sockaddr_ip_getbuf, apr_sockaddr_ip_get: Append "%zone" for
IPv6 link-local addresses. [Joe Orton]
*) On z/OS, apr_sockaddr_info_get() with family == APR_UNSPEC was not
returning IPv4 addresses if any IPv6 addresses were returned.
[Eric Covener]
*) Locks: add a --disable-timedlocks config option in case users
encounter more platforms where it fails [Nick Kew].
*) Windows cmake build: Fix an incompatibility with cmake 2.8.12 and
later. [Jeff Trawick]
*) apr_allocator, apr_pools: Add apr_allocator_page_size() and
apr_allocator_min_order_set() to respectively get the (system's) page size
in use and set the minimum allocation size for an allocator (expressed in
2^order pages). [Yann Ylavic]
*) apr_global_mutex/apr_proc_mutex: Resolve failures with the
POSIX sem implementation in environments which receive signals.
[Jeff Trawick]
*) locks: provide portable implementations of timedlock()s for
posix-sems, sysv-sems and pthreads for those platforms that
lack native versions (eg: OSX/macOS). [Jim Jagielski]
*) apr_skiplist: Fix potential corruption of skiplists leading to
results or crashes. [Takashi Sato <takashi tks st>, Eric Covener]
PR 56654.
*) locks: Introduce apr_{thread,proc,global}_mutex_timedlock().
[Yann Ylavic]
*) Improve platform detection by updating config.guess and config.sub.
[Rainer Jung]
Changes for APR 1.6.x and later:
Changes for APR 1.5.1
*) http://svn.apache.org/viewvc/apr/apr/branches/1.6.x/CHANGES?view=markup
*) apr_os_proc_mutex_get() on Unix: Avoid segfault for cross-
process pthread mutexes. [Yann Ylavic <ylavic.dev gmail.com>]
Changes for APR 1.5.x and later:
*) When using shmget-based shared memory, the ID used for ftok is
now an APR hash of the filename instead of the constant '1'.
We do this to help avoid collisions. PR 53996 [Jim Jagielski]
*) apr_socket_atreadeof(): Fix breakage on OS X. [Jim Jagielski]
*) Fix POSIX shared memory (shm_open) use for named shared memory.
Includes adding '--enable-posix-shm' to force POSIX shm if
available, and OS X compatibility. PR 55928.
[Jozef Hatala <jh-asf skrt org>, Jim Jagielski]
*) Fix race condition when calling apr_dir_make_recursive from
multiple threads on Windows.
[Bert Huijben]
*) Fix apr_escape.c compilation errors on EBCDIC platforms.
[Eric Covener]
*) FreeBSD 10: Correct a regression in 1.5.0 which affected non-
blocking sockets in some applications, including httpd. [Jeff
Trawick]
*) Windows cmake build: Fix incorrect installation of some .pdb
files. Fix incorrect use of some logic intended for Windows 9x,
including legacy filesystem interfaces and dynamic loading of
some Windows APIs. [Jeff Trawick]
*) apr_skiplist: Add compatibility with C++ applications.
[Jeff Trawick]
*) Correct a regression in 1.5.0 which affected out-of-tree
builds on Unix. [Rainer Jung]
*) Improve platform detection by updating config.guess and config.sub.
[Rainer Jung]
Changes for APR 1.5.0
*) Fix Linux kernel version check to recognize more versions,
including versions 3.10 and later. PR 55690. [Joe Orton,
Arfrever Frehtes Taifersar Arahesis <arfrever.fta gmail.com>]
*) Add apr_sockaddr_is_wildcard() to check if a socket address
refers to the wildcard address for the protocol family (e.g.,
0.0.0.0/INADDR_ANY for IPv4). [Jeff Trawick]
*) apr_file_dup2() on Windows: Fix debug RTL assertion when
attempting to _commit(stdout) or _commit(stderr). [Mike Rumph
<mike.rumph oracle.com>]
*) apr_socket_connect() on Windows: Handle WSAEISCONN. PR 48736.
[<inoue ariel-networks.com>, Jeff Trawick]
*) z/OS: threadsafe apr_pollset_poll support for sockets [Greg Ames]
*) Windows: Don't obtain a mutex for buffered file I/O unless the
file was opened with the APR_FOPEN_XTHREAD flag. [Ivan Zhakov
<ivan visualsvn.com>]
*) Windows: Create named shared memory segments under the "Local"
namespace if the caller is unprivileged, fixing an inability of
unprivileged callers to use apr_shm_create() with named shared
memory segments under recent Windows. As before, shared memory
segments are created under the "Global" namespace for privileged
callers. Add apr_shm_create_ex() and apr_shm_attach_ex(), which
provide the ability to override the normal namespace selection.
[Jeff Trawick]
*) Update compile settings for MINT OS. PR 47181. [Alan Hourihane
<alanh fairlite.co.uk>]
*) Files and pipes on Windows: Don't create an unused pollset when
files and pipes are opened. [Mladen Turk]
*) apr_socket_timeout_set() on Windows: If the socket was in a non-
blocking state before, disable that setting so that timeouts work.
[Jeff Trawick]
*) File info APIs: Fix calculation of atime and mtime on AIX. PR 51146.
[Ruediger Pluem]
*) Add the apr_escape interface. [Graham Leggett]
*) Cygwin build fixes. PRs 51016 and 55586. [Carlo Bramini
<carlo.bramix libero.it>]
*) Add apr_skiplist family. [Jim Jagielski]
*) Add experimental cmake-based build system for Windows. Refer to
README.cmake for more information. [Jeff Trawick, Tom Donovan]
*) Add the apr_table_getm() call, which transparently handles the
merging of keys with multiple values. [Graham Leggett]
*) Add apr_hash_this_key(), apr_hash_this_key_len(), and
apr_hash_this_val() for easier access to those attributes from
a hash iterator. [Hyrum K. Wright <hyrum_wright mail.utexas.edu>]
*) MinGW/MSYS: Support shared builds of APR, other general improvements
to support of this toolchain. PR 46175. [Carlo Bramini
<carlo.bramix libero.it>]
*) Improve platform detection by updating config.guess and config.sub.
[Rainer Jung]
*) apr_socket_opt_set: Add support for APR_SO_BROADCAST. PR 46389.
[Armin Müller <mueller itestra com>]
*) Enable platform specific support for the opening of a file or
pipe in non-blocking mode through the APR_FOPEN_NONBLOCK flag.
[Graham Leggett]
*) http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/CHANGES?view=markup
Changes for APR 1.4.x and later:

View File

@ -87,6 +87,7 @@ INCLUDE_DIRECTORIES(${APR_INCLUDE_DIRECTORIES})
SET(APR_PUBLIC_HEADERS_STATIC
include/apr_allocator.h
include/apr_atomic.h
include/apr_cstr.h
include/apr_dso.h
include/apr_env.h
include/apr_errno.h
@ -102,6 +103,7 @@ SET(APR_PUBLIC_HEADERS_STATIC
include/apr_lib.h
include/apr_mmap.h
include/apr_network_io.h
include/apr_perms_set.h
include/apr_poll.h
include/apr_pools.h
include/apr_portable.h
@ -179,11 +181,13 @@ SET(APR_SOURCES
poll/unix/pollcb.c
poll/unix/pollset.c
poll/unix/select.c
poll/unix/wakeup.c
random/unix/apr_random.c
random/unix/sha2.c
random/unix/sha2_glue.c
shmem/win32/shm.c
strings/apr_cpystrn.c
strings/apr_cstr.c
strings/apr_fnmatch.c
strings/apr_snprintf.c
strings/apr_strings.c

View File

@ -63,6 +63,8 @@ exec_prefix=@exec_prefix@
bindir=@bindir@
libdir=@libdir@
includedir=@includedir@
datarootdir=@datarootdir@
datadir=@datadir@
installbuilddir=@installbuilddir@
# Create apr-config script suitable for the install tree

View File

@ -18,8 +18,6 @@
#
# ARCH="Win32 Release"
# ARCH="Win32 Debug"
# ARCH="Win32 Release9x"
# ARCH="Win32 Debug9x"
# ARCH="x64 Release"
# ARCH="x64 Debug"
#
@ -66,14 +64,6 @@ LIBSOSPATH=LibR
SLNARCH=Debug|Win32
ARCHOSPATH=Debug
LIBSOSPATH=LibD
!ELSEIF "$(ARCH)" == "Win32 Release9x"
SLNARCH=Release9x|Win32
ARCHOSPATH=9x\Release
LIBSOSPATH=9x\LibR
!ELSEIF "$(ARCH)" == "Win32 Debug9x"
SLNARCH=Debug9x|Win32
ARCHOSPATH=9x\Debug
LIBSOSPATH=9x\LibD
!ELSEIF "$(ARCH)" == "x64 Release"
SLNARCH=Release|x64
ARCHOSPATH=x64\Release

View File

@ -1,5 +1,5 @@
Apache Portable Runtime
Copyright (c) 2000-2015 The Apache Software Foundation.
Copyright (c) 2000-2019 The Apache Software Foundation.
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

View File

@ -362,6 +362,7 @@ FILES_lib_objs = \
$(OBJDIR)/userinfo.o \
$(OBJDIR)/version.o \
$(OBJDIR)/waitio.o \
$(OBJDIR)/wakeup.o \
$(EOLIST)

View File

@ -19,8 +19,6 @@ CFG=apr - Win32 Release
!MESSAGE
!MESSAGE "apr - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "apr - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE "apr - Win32 Release9x" (based on "Win32 (x86) Static Library")
!MESSAGE "apr - Win32 Debug9x" (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
@ -45,7 +43,7 @@ RSC=rc.exe
# PROP Intermediate_Dir "LibR"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
# ADD CPP /nologo /MD /W3 /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 "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\apr-1" /FD /c
# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /I "./include/private" /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "WINNT" /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
@ -69,7 +67,7 @@ LIB32=link.exe -lib
# 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 "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\apr-1" /FD /EHsc /c
# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /I "./include/private" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "WINNT" /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
@ -79,53 +77,6 @@ LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"LibD\apr-1.lib"
!ELSEIF "$(CFG)" == "apr - Win32 Release9x"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "9x\LibR"
# PROP BASE Intermediate_Dir "9x\LibR"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "9x\LibR"
# PROP Intermediate_Dir "9x\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 "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:"9x\LibR\apr-1.lib"
!ELSEIF "$(CFG)" == "apr - Win32 Debug9x"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "9x\LibD"
# PROP BASE Intermediate_Dir "9x\LibD"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "9x\LibD"
# PROP Intermediate_Dir "9x\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 "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:"9x\LibD\apr-1.lib"
!ELSEIF "$(CFG)" == "apr - x64 Release"
# PROP BASE Use_MFC 0
@ -139,7 +90,7 @@ LIB32=link.exe -lib
# 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 "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\apr-1" /FD /c
# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /I "./include/private" /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "WINNT" /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
@ -163,7 +114,7 @@ LIB32=link.exe -lib
# 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 "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\apr-1" /FD /EHsc /c
# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /I "./include/private" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "WINNT" /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
@ -179,8 +130,6 @@ LIB32=link.exe -lib
# Name "apr - Win32 Release"
# Name "apr - Win32 Debug"
# Name "apr - Win32 Release9x"
# Name "apr - Win32 Debug9x"
# Name "apr - x64 Release"
# Name "apr - x64 Debug"
# Begin Group "Source Files"
@ -193,6 +142,10 @@ LIB32=link.exe -lib
SOURCE=.\atomic\win32\apr_atomic.c
# End Source File
# Begin Source File
SOURCE=.\atomic\win32\apr_atomic64.c
# End Source File
# End Group
# Begin Group "dso"
@ -207,6 +160,11 @@ SOURCE=.\dso\win32\dso.c
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\encoding\apr_encode.c
# End Source File
# Begin Source File
SOURCE=.\encoding\apr_escape.c
# End Source File
@ -439,6 +397,10 @@ SOURCE=.\poll\unix\pollset.c
SOURCE=.\poll\unix\select.c
# End Source File
# Begin Source File
SOURCE=.\poll\unix\wakeup.c
# End Source File
# End Group
# Begin Group "random"
@ -473,6 +435,10 @@ SOURCE=.\strings\apr_cpystrn.c
# End Source File
# Begin Source File
SOURCE=.\strings\apr_cstr.c
# End Source File
# Begin Source File
SOURCE=.\strings\apr_fnmatch.c
# End Source File
# Begin Source File
@ -642,26 +608,6 @@ InputPath=.\include\apr.hw
# End Custom Build
!ELSEIF "$(CFG)" == "apr - Win32 Release9x"
# 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 Debug9x"
# 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
@ -708,76 +654,48 @@ SOURCE=.\include\apr_errno.h
# Begin Source File
SOURCE=.\include\apr_escape.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_escape.h
!IF "$(CFG)" == "apr - Win32 Release"
!IF "$(CFG)" == "libapr - Win32 Release"
# Begin Custom Build - Creating gen_test_char.exe and apr_escape_test_char.h
InputPath=.\include\apr_escape.h
".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
cl.exe /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /I ".\include" /Fo.\LibR\gen_test_char /Fe.\LibR\gen_test_char.exe .\tools\gen_test_char.c
.\LibR\gen_test_char.exe > .\include\apr_escape_test_char.h
cl.exe /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /I ".\include" /Fo.\Release\gen_test_char /Fe.\Release\gen_test_char.exe .\tools\gen_test_char.c
.\Release\gen_test_char.exe > .\include\apr_escape_test_char.h
# End Custom Build
!ELSEIF "$(CFG)" == "apr - Win32 Debug"
!ELSEIF "$(CFG)" == "libapr - Win32 Debug"
# Begin Custom Build - Creating gen_test_char.exe and apr_escape_test_char.h
InputPath=.\include\apr_escape.h
".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
cl.exe /nologo /W3 /EHsc /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /I ".\include" /Fo.\LibD\gen_test_char /Fe.\LibD\gen_test_char.exe .\tools\gen_test_char.c
.\LibD\gen_test_char.exe > .\include\apr_escape_test_char.h
cl.exe /nologo /W3 /EHsc /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /I ".\include" /Fo.\Debug\gen_test_char /Fe.\Debug\gen_test_char.exe .\tools\gen_test_char.c
.\Debug\gen_test_char.exe > .\include\apr_escape_test_char.h
# End Custom Build
!ELSEIF "$(CFG)" == "apr - Win32 Release9x"
!ELSEIF "$(CFG)" == "libapr - x64 Release"
# Begin Custom Build - Creating gen_test_char.exe and apr_escape_test_char.h
InputPath=.\include\apr_escape.h
".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
cl.exe /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /I ".\include" /Fo.\9x\LibR\gen_test_char /Fe.\9x\LibR\gen_test_char.exe .\tools\gen_test_char.c
.\9x\LibR\gen_test_char.exe > .\include\apr_escape_test_char.h
cl.exe /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /I ".\include" /Fo.\x64\Release\gen_test_char /Fe.\x64\Release\gen_test_char.exe .\tools\gen_test_char.c
.\x64\Release\gen_test_char.exe > .\include\apr_escape_test_char.h
# End Custom Build
!ELSEIF "$(CFG)" == "apr - Win32 Debug9x"
# Begin Custom Build - Creating gen_test_char.exe and apr_escape_test_char.h
InputPath=.\include\apr_escape.h
InputPath=.\include\apr_escape.h
".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
cl.exe /nologo /W3 /EHsc /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /I ".\include" /Fo.\9x\LibD\gen_test_char /Fe.\9x\LibD\gen_test_char.exe .\tools\gen_test_char.c
.\9x\LibD\gen_test_char.exe > .\include\apr_escape_test_char.h
# End Custom Build
!ELSEIF "$(CFG)" == "apr - x64 Release"
# Begin Custom Build - Creating gen_test_char.exe and apr_escape_test_char.h
InputPath=.\include\apr_escape.h
InputPath=.\include\apr_escape.h
".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
cl.exe /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /I ".\include" /Fo.\x64\LibR\gen_test_char /Fe.\x64\LibR\gen_test_char.exe .\tools\gen_test_char.c
.\x64\LibR\gen_test_char.exe > .\include\apr_escape_test_char.h
# End Custom Build
!ELSEIF "$(CFG)" == "apr - x64 Debug"
!ELSEIF "$(CFG)" == "libapr - x64 Debug"
# Begin Custom Build - Creating gen_test_char.exe and apr_escape_test_char.h
InputPath=.\include\apr_escape.h
".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
cl.exe /nologo /W3 /EHsc /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /I ".\include" /Fo.\x64\LibD\gen_test_char /Fe.\x64\LibD\gen_test_char.exe .\tools\gen_test_char.c
.\x64\LibD\gen_test_char.exe > .\include\apr_escape_test_char.h
cl.exe /nologo /W3 /EHsc /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /I ".\include" /Fo.\x64\Debug\gen_test_char /Fe.\x64\Debug\gen_test_char.exe .\tools\gen_test_char.c
.\x64\Debug\gen_test_char.exe > .\include\apr_escape_test_char.h
# End Custom Build

File diff suppressed because it is too large Load Diff

View File

@ -3,14 +3,14 @@
Summary: Apache Portable Runtime library
Name: apr
Version: 1.5.2
Version: 1.7.0
Release: 1
License: Apache Software License
Group: System Environment/Libraries
URL: http://apr.apache.org/
Source0: http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires: autoconf, libtool, doxygen, python
BuildRequires: autoconf, libtool, doxygen, libuuid-devel, python
%description
The mission of the Apache Portable Runtime (APR) is to provide a

View File

@ -0,0 +1,64 @@
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "apr_arch_atomic.h"
#ifdef USE_ATOMICS_BUILTINS
APR_DECLARE(apr_uint64_t) apr_atomic_read64(volatile apr_uint64_t *mem)
{
return *mem;
}
APR_DECLARE(void) apr_atomic_set64(volatile apr_uint64_t *mem, apr_uint64_t val)
{
*mem = val;
}
APR_DECLARE(apr_uint64_t) apr_atomic_add64(volatile apr_uint64_t *mem, apr_uint64_t val)
{
return __sync_fetch_and_add(mem, val);
}
APR_DECLARE(void) apr_atomic_sub64(volatile apr_uint64_t *mem, apr_uint64_t val)
{
__sync_fetch_and_sub(mem, val);
}
APR_DECLARE(apr_uint64_t) apr_atomic_inc64(volatile apr_uint64_t *mem)
{
return __sync_fetch_and_add(mem, 1);
}
APR_DECLARE(int) apr_atomic_dec64(volatile apr_uint64_t *mem)
{
return __sync_sub_and_fetch(mem, 1);
}
APR_DECLARE(apr_uint64_t) apr_atomic_cas64(volatile apr_uint64_t *mem, apr_uint64_t with,
apr_uint64_t cmp)
{
return __sync_val_compare_and_swap(mem, cmp, with);
}
APR_DECLARE(apr_uint64_t) apr_atomic_xchg64(volatile apr_uint64_t *mem, apr_uint64_t val)
{
__sync_synchronize();
return __sync_lock_test_and_set(mem, val);
}
#endif /* USE_ATOMICS_BUILTINS */

View File

@ -20,7 +20,11 @@
APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p)
{
#if defined (NEED_ATOMICS_GENERIC64)
return apr__atomic_generic64_init(p);
#else
return APR_SUCCESS;
#endif
}
APR_DECLARE(apr_uint32_t) apr_atomic_read32(volatile apr_uint32_t *mem)

View File

@ -15,6 +15,7 @@
*/
#include "apr_arch_atomic.h"
#include "apr_thread_mutex.h"
#ifdef USE_ATOMICS_GENERIC
@ -70,7 +71,7 @@ APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p)
}
}
return APR_SUCCESS;
return apr__atomic_generic64_init(p);
}
static APR_INLINE apr_thread_mutex_t *mutex_hash(volatile apr_uint32_t *mem)
@ -88,7 +89,7 @@ static APR_INLINE apr_thread_mutex_t *mutex_hash(volatile apr_uint32_t *mem)
APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p)
{
return APR_SUCCESS;
return apr__atomic_generic64_init(p);
}
#endif /* APR_HAS_THREADS */

View File

@ -0,0 +1,178 @@
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "apr_arch_atomic.h"
#include "apr_thread_mutex.h"
#if defined(USE_ATOMICS_GENERIC) || defined (NEED_ATOMICS_GENERIC64)
#include <stdlib.h>
#if APR_HAS_THREADS
# define DECLARE_MUTEX_LOCKED(name, mem) \
apr_thread_mutex_t *name = mutex_hash(mem)
# define MUTEX_UNLOCK(name) \
do { \
if (apr_thread_mutex_unlock(name) != APR_SUCCESS) \
abort(); \
} while (0)
#else
# define DECLARE_MUTEX_LOCKED(name, mem)
# define MUTEX_UNLOCK(name)
# warning Be warned: using stubs for all atomic operations
#endif
#if APR_HAS_THREADS
static apr_thread_mutex_t **hash_mutex;
#define NUM_ATOMIC_HASH 7
/* shift by 2 to get rid of alignment issues */
#define ATOMIC_HASH(x) (unsigned int)(((unsigned long)(x)>>2)%(unsigned int)NUM_ATOMIC_HASH)
static apr_status_t atomic_cleanup(void *data)
{
if (hash_mutex == data)
hash_mutex = NULL;
return APR_SUCCESS;
}
apr_status_t apr__atomic_generic64_init(apr_pool_t *p)
{
int i;
apr_status_t rv;
if (hash_mutex != NULL)
return APR_SUCCESS;
hash_mutex = apr_palloc(p, sizeof(apr_thread_mutex_t*) * NUM_ATOMIC_HASH);
apr_pool_cleanup_register(p, hash_mutex, atomic_cleanup,
apr_pool_cleanup_null);
for (i = 0; i < NUM_ATOMIC_HASH; i++) {
rv = apr_thread_mutex_create(&(hash_mutex[i]),
APR_THREAD_MUTEX_DEFAULT, p);
if (rv != APR_SUCCESS) {
return rv;
}
}
return APR_SUCCESS;
}
static APR_INLINE apr_thread_mutex_t *mutex_hash(volatile apr_uint64_t *mem)
{
apr_thread_mutex_t *mutex = hash_mutex[ATOMIC_HASH(mem)];
if (apr_thread_mutex_lock(mutex) != APR_SUCCESS) {
abort();
}
return mutex;
}
#else
apr_status_t apr__atomic_generic64_init(apr_pool_t *p)
{
return APR_SUCCESS;
}
#endif /* APR_HAS_THREADS */
APR_DECLARE(apr_uint64_t) apr_atomic_read64(volatile apr_uint64_t *mem)
{
return *mem;
}
APR_DECLARE(void) apr_atomic_set64(volatile apr_uint64_t *mem, apr_uint64_t val)
{
DECLARE_MUTEX_LOCKED(mutex, mem);
*mem = val;
MUTEX_UNLOCK(mutex);
}
APR_DECLARE(apr_uint64_t) apr_atomic_add64(volatile apr_uint64_t *mem, apr_uint64_t val)
{
apr_uint64_t old_value;
DECLARE_MUTEX_LOCKED(mutex, mem);
old_value = *mem;
*mem += val;
MUTEX_UNLOCK(mutex);
return old_value;
}
APR_DECLARE(void) apr_atomic_sub64(volatile apr_uint64_t *mem, apr_uint64_t val)
{
DECLARE_MUTEX_LOCKED(mutex, mem);
*mem -= val;
MUTEX_UNLOCK(mutex);
}
APR_DECLARE(apr_uint64_t) apr_atomic_inc64(volatile apr_uint64_t *mem)
{
return apr_atomic_add64(mem, 1);
}
APR_DECLARE(int) apr_atomic_dec64(volatile apr_uint64_t *mem)
{
apr_uint64_t new;
DECLARE_MUTEX_LOCKED(mutex, mem);
(*mem)--;
new = *mem;
MUTEX_UNLOCK(mutex);
return new;
}
APR_DECLARE(apr_uint64_t) apr_atomic_cas64(volatile apr_uint64_t *mem, apr_uint64_t with,
apr_uint64_t cmp)
{
apr_uint64_t prev;
DECLARE_MUTEX_LOCKED(mutex, mem);
prev = *mem;
if (prev == cmp) {
*mem = with;
}
MUTEX_UNLOCK(mutex);
return prev;
}
APR_DECLARE(apr_uint64_t) apr_atomic_xchg64(volatile apr_uint64_t *mem, apr_uint64_t val)
{
apr_uint64_t prev;
DECLARE_MUTEX_LOCKED(mutex, mem);
prev = *mem;
*mem = val;
MUTEX_UNLOCK(mutex);
return prev;
}
#endif /* USE_ATOMICS_GENERIC64 */

View File

@ -26,7 +26,11 @@
APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p)
{
#if defined (NEED_ATOMICS_GENERIC64)
return apr__atomic_generic64_init(p);
#else
return APR_SUCCESS;
#endif
}
APR_DECLARE(apr_uint32_t) apr_atomic_read32(volatile apr_uint32_t *mem)

View File

@ -20,7 +20,11 @@
APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p)
{
#if defined (NEED_ATOMICS_GENERIC64)
return apr__atomic_generic64_init(p);
#else
return APR_SUCCESS;
#endif
}
APR_DECLARE(apr_uint32_t) apr_atomic_read32(volatile apr_uint32_t *mem)

View File

@ -22,7 +22,11 @@
APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p)
{
#if defined (NEED_ATOMICS_GENERIC64)
return apr__atomic_generic64_init(p);
#else
return APR_SUCCESS;
#endif
}
APR_DECLARE(apr_uint32_t) apr_atomic_read32(volatile apr_uint32_t *mem)

View File

@ -1,149 +1,154 @@
# DO NOT EDIT. AUTOMATICALLY GENERATED.
encoding/apr_escape.lo: encoding/apr_escape.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_escape.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h
passwd/apr_getpass.lo: passwd/apr_getpass.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h
strings/apr_cpystrn.lo: strings/apr_cpystrn.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h
encoding/apr_encode.lo: encoding/apr_encode.c .make.dirs include/apr_allocator.h include/apr_encode.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
encoding/apr_escape.lo: encoding/apr_escape.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_escape.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
passwd/apr_getpass.lo: passwd/apr_getpass.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
strings/apr_cpystrn.lo: strings/apr_cpystrn.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
strings/apr_cstr.lo: strings/apr_cstr.c .make.dirs include/apr_allocator.h include/apr_cstr.h include/apr_errno.h include/apr_fnmatch.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
strings/apr_fnmatch.lo: strings/apr_fnmatch.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_fnmatch.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
strings/apr_snprintf.lo: strings/apr_snprintf.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
strings/apr_strings.lo: strings/apr_strings.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h
strings/apr_strnatcmp.lo: strings/apr_strnatcmp.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h
strings/apr_strtok.lo: strings/apr_strtok.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h
strings/apr_snprintf.lo: strings/apr_snprintf.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
strings/apr_strings.lo: strings/apr_strings.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
strings/apr_strnatcmp.lo: strings/apr_strnatcmp.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
strings/apr_strtok.lo: strings/apr_strtok.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
tables/apr_hash.lo: tables/apr_hash.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_hash.h include/apr_pools.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
tables/apr_skiplist.lo: tables/apr_skiplist.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_skiplist.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
tables/apr_tables.lo: tables/apr_tables.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_want.h
tables/apr_skiplist.lo: tables/apr_skiplist.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_skiplist.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
tables/apr_tables.lo: tables/apr_tables.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
OBJECTS_all = encoding/apr_escape.lo passwd/apr_getpass.lo strings/apr_cpystrn.lo strings/apr_fnmatch.lo strings/apr_snprintf.lo strings/apr_strings.lo strings/apr_strnatcmp.lo strings/apr_strtok.lo tables/apr_hash.lo tables/apr_skiplist.lo tables/apr_tables.lo
OBJECTS_all = encoding/apr_encode.lo encoding/apr_escape.lo passwd/apr_getpass.lo strings/apr_cpystrn.lo strings/apr_cstr.lo strings/apr_fnmatch.lo strings/apr_snprintf.lo strings/apr_strings.lo strings/apr_strnatcmp.lo strings/apr_strtok.lo tables/apr_hash.lo tables/apr_skiplist.lo tables/apr_tables.lo
dso/unix/dso.lo: dso/unix/dso.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
dso/unix/dso.lo: dso/unix/dso.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_dso_unix = dso/unix/dso.lo
file_io/unix/buffer.lo: file_io/unix/buffer.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_want.h
file_io/unix/buffer.lo: file_io/unix/buffer.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
file_io/unix/copy.lo: file_io/unix/copy.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/unix/dir.lo: file_io/unix/dir.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/unix/fileacc.lo: file_io/unix/fileacc.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h
file_io/unix/filedup.lo: file_io/unix/filedup.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/unix/dir.lo: file_io/unix/dir.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/unix/fileacc.lo: file_io/unix/fileacc.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
file_io/unix/filedup.lo: file_io/unix/filedup.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/unix/filepath.lo: file_io/unix/filepath.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/unix/filepath_util.lo: file_io/unix/filepath_util.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_want.h
file_io/unix/filepath_util.lo: file_io/unix/filepath_util.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
file_io/unix/filestat.lo: file_io/unix/filestat.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/unix/flock.lo: file_io/unix/flock.c .make.dirs
file_io/unix/fullrw.lo: file_io/unix/fullrw.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/unix/mktemp.lo: file_io/unix/mktemp.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/unix/open.lo: file_io/unix/open.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_hash.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/unix/pipe.lo: file_io/unix/pipe.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/unix/readwrite.lo: file_io/unix/readwrite.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_strings.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/unix/mktemp.lo: file_io/unix/mktemp.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/unix/open.lo: file_io/unix/open.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_hash.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/unix/pipe.lo: file_io/unix/pipe.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/unix/readwrite.lo: file_io/unix/readwrite.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_strings.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/unix/seek.lo: file_io/unix/seek.c .make.dirs
file_io/unix/tempdir.lo: file_io/unix/tempdir.c .make.dirs include/apr_allocator.h include/apr_env.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_file_io_unix = file_io/unix/buffer.lo file_io/unix/copy.lo file_io/unix/dir.lo file_io/unix/fileacc.lo file_io/unix/filedup.lo file_io/unix/filepath.lo file_io/unix/filepath_util.lo file_io/unix/filestat.lo file_io/unix/flock.lo file_io/unix/fullrw.lo file_io/unix/mktemp.lo file_io/unix/open.lo file_io/unix/pipe.lo file_io/unix/readwrite.lo file_io/unix/seek.lo file_io/unix/tempdir.lo
locks/unix/global_mutex.lo: locks/unix/global_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
locks/unix/proc_mutex.lo: locks/unix/proc_mutex.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_hash.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h
locks/unix/global_mutex.lo: locks/unix/global_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
locks/unix/proc_mutex.lo: locks/unix/proc_mutex.c .make.dirs include/apr_allocator.h include/apr_atomic.h include/apr_errno.h include/apr_general.h include/apr_hash.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
locks/unix/thread_cond.lo: locks/unix/thread_cond.c .make.dirs
locks/unix/thread_mutex.lo: locks/unix/thread_mutex.c .make.dirs include/apr_want.h
locks/unix/thread_rwlock.lo: locks/unix/thread_rwlock.c .make.dirs
OBJECTS_locks_unix = locks/unix/global_mutex.lo locks/unix/proc_mutex.lo locks/unix/thread_cond.lo locks/unix/thread_mutex.lo locks/unix/thread_rwlock.lo
memory/unix/apr_pools.lo: memory/unix/apr_pools.c .make.dirs include/apr_allocator.h include/apr_atomic.h include/apr_dso.h include/apr_env.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_hash.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
memory/unix/apr_pools.lo: memory/unix/apr_pools.c .make.dirs include/apr_allocator.h include/apr_atomic.h include/apr_dso.h include/apr_env.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_hash.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_memory_unix = memory/unix/apr_pools.lo
misc/unix/charset.lo: misc/unix/charset.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
misc/unix/env.lo: misc/unix/env.c .make.dirs include/apr_allocator.h include/apr_env.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h
misc/unix/errorcodes.lo: misc/unix/errorcodes.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h
misc/unix/getopt.lo: misc/unix/getopt.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h
misc/unix/charset.lo: misc/unix/charset.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
misc/unix/env.lo: misc/unix/env.c .make.dirs include/apr_allocator.h include/apr_env.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
misc/unix/errorcodes.lo: misc/unix/errorcodes.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
misc/unix/getopt.lo: misc/unix/getopt.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
misc/unix/otherchild.lo: misc/unix/otherchild.c .make.dirs
misc/unix/rand.lo: misc/unix/rand.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_want.h
misc/unix/start.lo: misc/unix/start.c .make.dirs include/apr_allocator.h include/apr_atomic.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_signal.h include/apr_thread_mutex.h include/apr_want.h
misc/unix/version.lo: misc/unix/version.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_version.h include/apr_want.h
misc/unix/rand.lo: misc/unix/rand.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
misc/unix/start.lo: misc/unix/start.c .make.dirs include/apr_allocator.h include/apr_atomic.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_signal.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
misc/unix/version.lo: misc/unix/version.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_time.h include/apr_version.h include/apr_want.h
OBJECTS_misc_unix = misc/unix/charset.lo misc/unix/env.lo misc/unix/errorcodes.lo misc/unix/getopt.lo misc/unix/otherchild.lo misc/unix/rand.lo misc/unix/start.lo misc/unix/version.lo
mmap/unix/common.lo: mmap/unix/common.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_mmap.h include/apr_pools.h include/apr_ring.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
mmap/unix/mmap.lo: mmap/unix/mmap.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_mmap.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_ring.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
mmap/unix/mmap.lo: mmap/unix/mmap.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_mmap.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_ring.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_mmap_unix = mmap/unix/common.lo mmap/unix/mmap.lo
network_io/unix/inet_ntop.lo: network_io/unix/inet_ntop.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h
network_io/unix/inet_ntop.lo: network_io/unix/inet_ntop.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
network_io/unix/inet_pton.lo: network_io/unix/inet_pton.c .make.dirs
network_io/unix/multicast.lo: network_io/unix/multicast.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
network_io/unix/sendrecv.lo: network_io/unix/sendrecv.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
network_io/unix/sockaddr.lo: network_io/unix/sockaddr.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h
network_io/unix/socket_util.lo: network_io/unix/socket_util.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_poll.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
network_io/unix/sockets.lo: network_io/unix/sockets.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
network_io/unix/sockopt.lo: network_io/unix/sockopt.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h
network_io/unix/multicast.lo: network_io/unix/multicast.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
network_io/unix/sendrecv.lo: network_io/unix/sendrecv.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
network_io/unix/sockaddr.lo: network_io/unix/sockaddr.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
network_io/unix/socket_util.lo: network_io/unix/socket_util.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_poll.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
network_io/unix/sockets.lo: network_io/unix/sockets.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
network_io/unix/sockopt.lo: network_io/unix/sockopt.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
OBJECTS_network_io_unix = network_io/unix/inet_ntop.lo network_io/unix/inet_pton.lo network_io/unix/multicast.lo network_io/unix/sendrecv.lo network_io/unix/sockaddr.lo network_io/unix/socket_util.lo network_io/unix/sockets.lo network_io/unix/sockopt.lo
poll/unix/epoll.lo: poll/unix/epoll.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
poll/unix/kqueue.lo: poll/unix/kqueue.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
poll/unix/poll.lo: poll/unix/poll.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
poll/unix/pollcb.lo: poll/unix/pollcb.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
poll/unix/pollset.lo: poll/unix/pollset.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
poll/unix/port.lo: poll/unix/port.c .make.dirs include/apr_allocator.h include/apr_atomic.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
poll/unix/select.lo: poll/unix/select.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
poll/unix/z_asio.lo: poll/unix/z_asio.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_hash.h include/apr_inherit.h include/apr_network_io.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
poll/unix/epoll.lo: poll/unix/epoll.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
poll/unix/kqueue.lo: poll/unix/kqueue.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
poll/unix/poll.lo: poll/unix/poll.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
poll/unix/pollcb.lo: poll/unix/pollcb.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
poll/unix/pollset.lo: poll/unix/pollset.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
poll/unix/port.lo: poll/unix/port.c .make.dirs include/apr_allocator.h include/apr_atomic.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
poll/unix/select.lo: poll/unix/select.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
poll/unix/wakeup.lo: poll/unix/wakeup.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
poll/unix/z_asio.lo: poll/unix/z_asio.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_hash.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_poll_unix = poll/unix/epoll.lo poll/unix/kqueue.lo poll/unix/poll.lo poll/unix/pollcb.lo poll/unix/pollset.lo poll/unix/port.lo poll/unix/select.lo poll/unix/z_asio.lo
OBJECTS_poll_unix = poll/unix/epoll.lo poll/unix/kqueue.lo poll/unix/poll.lo poll/unix/pollcb.lo poll/unix/pollset.lo poll/unix/port.lo poll/unix/select.lo poll/unix/wakeup.lo poll/unix/z_asio.lo
random/unix/apr_random.lo: random/unix/apr_random.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_random.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
random/unix/apr_random.lo: random/unix/apr_random.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_perms_set.h include/apr_pools.h include/apr_random.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
random/unix/sha2.lo: random/unix/sha2.c .make.dirs
random/unix/sha2_glue.lo: random/unix/sha2_glue.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_random.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
random/unix/sha2_glue.lo: random/unix/sha2_glue.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_perms_set.h include/apr_pools.h include/apr_random.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_random_unix = random/unix/apr_random.lo random/unix/sha2.lo random/unix/sha2_glue.lo
shmem/unix/shm.lo: shmem/unix/shm.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_hash.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_user.h include/apr_want.h
shmem/unix/shm.lo: shmem/unix/shm.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_hash.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_shmem_unix = shmem/unix/shm.lo
support/unix/waitio.lo: support/unix/waitio.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_poll.h include/apr_pools.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
support/unix/waitio.lo: support/unix/waitio.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_poll.h include/apr_pools.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_support_unix = support/unix/waitio.lo
threadproc/unix/proc.lo: threadproc/unix/proc.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_random.h include/apr_shm.h include/apr_signal.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
threadproc/unix/proc.lo: threadproc/unix/proc.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_random.h include/apr_shm.h include/apr_signal.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
threadproc/unix/procsup.lo: threadproc/unix/procsup.c .make.dirs
threadproc/unix/signals.lo: threadproc/unix/signals.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_signal.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h
threadproc/unix/thread.lo: threadproc/unix/thread.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
threadproc/unix/threadpriv.lo: threadproc/unix/threadpriv.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
threadproc/unix/signals.lo: threadproc/unix/signals.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_signal.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
threadproc/unix/thread.lo: threadproc/unix/thread.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
threadproc/unix/threadpriv.lo: threadproc/unix/threadpriv.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_threadproc_unix = threadproc/unix/proc.lo threadproc/unix/procsup.lo threadproc/unix/signals.lo threadproc/unix/thread.lo threadproc/unix/threadpriv.lo
time/unix/time.lo: time/unix/time.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
time/unix/timestr.lo: time/unix/timestr.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
time/unix/time.lo: time/unix/time.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
time/unix/timestr.lo: time/unix/timestr.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_time_unix = time/unix/time.lo time/unix/timestr.lo
user/unix/groupinfo.lo: user/unix/groupinfo.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
user/unix/userinfo.lo: user/unix/userinfo.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
user/unix/groupinfo.lo: user/unix/groupinfo.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
user/unix/userinfo.lo: user/unix/userinfo.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_user_unix = user/unix/groupinfo.lo user/unix/userinfo.lo
atomic/unix/builtins.lo: atomic/unix/builtins.c .make.dirs
atomic/unix/builtins64.lo: atomic/unix/builtins64.c .make.dirs
atomic/unix/ia32.lo: atomic/unix/ia32.c .make.dirs
atomic/unix/mutex.lo: atomic/unix/mutex.c .make.dirs
atomic/unix/mutex.lo: atomic/unix/mutex.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
atomic/unix/mutex64.lo: atomic/unix/mutex64.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
atomic/unix/ppc.lo: atomic/unix/ppc.c .make.dirs
atomic/unix/s390.lo: atomic/unix/s390.c .make.dirs
atomic/unix/solaris.lo: atomic/unix/solaris.c .make.dirs
OBJECTS_atomic_unix = atomic/unix/builtins.lo atomic/unix/ia32.lo atomic/unix/mutex.lo atomic/unix/ppc.lo atomic/unix/s390.lo atomic/unix/solaris.lo
OBJECTS_atomic_unix = atomic/unix/builtins.lo atomic/unix/builtins64.lo atomic/unix/ia32.lo atomic/unix/mutex.lo atomic/unix/mutex64.lo atomic/unix/ppc.lo atomic/unix/s390.lo atomic/unix/solaris.lo
OBJECTS_unix = $(OBJECTS_all) $(OBJECTS_atomic_unix) $(OBJECTS_dso_unix) $(OBJECTS_file_io_unix) $(OBJECTS_locks_unix) $(OBJECTS_memory_unix) $(OBJECTS_misc_unix) $(OBJECTS_mmap_unix) $(OBJECTS_network_io_unix) $(OBJECTS_poll_unix) $(OBJECTS_random_unix) $(OBJECTS_shmem_unix) $(OBJECTS_support_unix) $(OBJECTS_threadproc_unix) $(OBJECTS_time_unix) $(OBJECTS_user_unix)
dso/aix/dso.lo: dso/aix/dso.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
dso/aix/dso.lo: dso/aix/dso.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_dso_aix = dso/aix/dso.lo
OBJECTS_aix = $(OBJECTS_all) $(OBJECTS_atomic_unix) $(OBJECTS_dso_aix) $(OBJECTS_file_io_unix) $(OBJECTS_locks_unix) $(OBJECTS_memory_unix) $(OBJECTS_misc_unix) $(OBJECTS_mmap_unix) $(OBJECTS_network_io_unix) $(OBJECTS_poll_unix) $(OBJECTS_random_unix) $(OBJECTS_shmem_unix) $(OBJECTS_support_unix) $(OBJECTS_threadproc_unix) $(OBJECTS_time_unix) $(OBJECTS_user_unix)
dso/beos/dso.lo: dso/beos/dso.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
dso/beos/dso.lo: dso/beos/dso.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_dso_beos = dso/beos/dso.lo
locks/beos/proc_mutex.lo: locks/beos/proc_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
locks/beos/thread_cond.lo: locks/beos/thread_cond.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
locks/beos/thread_mutex.lo: locks/beos/thread_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
locks/beos/thread_rwlock.lo: locks/beos/thread_rwlock.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
locks/beos/proc_mutex.lo: locks/beos/proc_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
locks/beos/thread_cond.lo: locks/beos/thread_cond.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
locks/beos/thread_mutex.lo: locks/beos/thread_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
locks/beos/thread_rwlock.lo: locks/beos/thread_rwlock.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_locks_beos = locks/beos/proc_mutex.lo locks/beos/thread_cond.lo locks/beos/thread_mutex.lo locks/beos/thread_rwlock.lo
@ -152,13 +157,13 @@ network_io/beos/socketcommon.lo: network_io/beos/socketcommon.c .make.dirs
OBJECTS_network_io_beos = network_io/beos/sendrecv.lo network_io/beos/socketcommon.lo
shmem/beos/shm.lo: shmem/beos/shm.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
shmem/beos/shm.lo: shmem/beos/shm.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_shmem_beos = shmem/beos/shm.lo
threadproc/beos/apr_proc_stub.lo: threadproc/beos/apr_proc_stub.c .make.dirs
threadproc/beos/proc.lo: threadproc/beos/proc.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h
threadproc/beos/thread.lo: threadproc/beos/thread.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
threadproc/beos/proc.lo: threadproc/beos/proc.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
threadproc/beos/thread.lo: threadproc/beos/thread.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
threadproc/beos/threadpriv.lo: threadproc/beos/threadpriv.c .make.dirs
threadproc/beos/threadproc_common.lo: threadproc/beos/threadproc_common.c .make.dirs
@ -166,154 +171,155 @@ OBJECTS_threadproc_beos = threadproc/beos/apr_proc_stub.lo threadproc/beos/proc.
OBJECTS_beos = $(OBJECTS_all) $(OBJECTS_atomic_unix) $(OBJECTS_dso_beos) $(OBJECTS_file_io_unix) $(OBJECTS_locks_beos) $(OBJECTS_memory_unix) $(OBJECTS_misc_unix) $(OBJECTS_mmap_unix) $(OBJECTS_network_io_beos) $(OBJECTS_poll_unix) $(OBJECTS_random_unix) $(OBJECTS_shmem_beos) $(OBJECTS_support_unix) $(OBJECTS_threadproc_beos) $(OBJECTS_time_unix) $(OBJECTS_user_unix)
dso/os2/dso.lo: dso/os2/dso.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
dso/os2/dso.lo: dso/os2/dso.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_dso_os2 = dso/os2/dso.lo
file_io/os2/buffer.lo: file_io/os2/buffer.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_want.h
file_io/os2/buffer.lo: file_io/os2/buffer.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
file_io/os2/copy.lo: file_io/os2/copy.c .make.dirs
file_io/os2/dir.lo: file_io/os2/dir.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/os2/dir.lo: file_io/os2/dir.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/os2/dir_make_recurse.lo: file_io/os2/dir_make_recurse.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/os2/fileacc.lo: file_io/os2/fileacc.c .make.dirs
file_io/os2/filedup.lo: file_io/os2/filedup.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/os2/filepath.lo: file_io/os2/filepath.c .make.dirs
file_io/os2/filepath_util.lo: file_io/os2/filepath_util.c .make.dirs
file_io/os2/filestat.lo: file_io/os2/filestat.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/os2/filesys.lo: file_io/os2/filesys.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h
file_io/os2/filesys.lo: file_io/os2/filesys.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
file_io/os2/flock.lo: file_io/os2/flock.c .make.dirs
file_io/os2/fullrw.lo: file_io/os2/fullrw.c .make.dirs
file_io/os2/maperrorcode.lo: file_io/os2/maperrorcode.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/os2/mktemp.lo: file_io/os2/mktemp.c .make.dirs
file_io/os2/open.lo: file_io/os2/open.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/os2/pipe.lo: file_io/os2/pipe.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/os2/open.lo: file_io/os2/open.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/os2/pipe.lo: file_io/os2/pipe.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/os2/readwrite.lo: file_io/os2/readwrite.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/os2/seek.lo: file_io/os2/seek.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/os2/tempdir.lo: file_io/os2/tempdir.c .make.dirs
OBJECTS_file_io_os2 = file_io/os2/buffer.lo file_io/os2/copy.lo file_io/os2/dir.lo file_io/os2/dir_make_recurse.lo file_io/os2/fileacc.lo file_io/os2/filedup.lo file_io/os2/filepath.lo file_io/os2/filepath_util.lo file_io/os2/filestat.lo file_io/os2/filesys.lo file_io/os2/flock.lo file_io/os2/fullrw.lo file_io/os2/maperrorcode.lo file_io/os2/mktemp.lo file_io/os2/open.lo file_io/os2/pipe.lo file_io/os2/readwrite.lo file_io/os2/seek.lo file_io/os2/tempdir.lo
locks/os2/proc_mutex.lo: locks/os2/proc_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
locks/os2/thread_cond.lo: locks/os2/thread_cond.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
locks/os2/thread_mutex.lo: locks/os2/thread_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
locks/os2/thread_rwlock.lo: locks/os2/thread_rwlock.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
locks/os2/proc_mutex.lo: locks/os2/proc_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
locks/os2/thread_cond.lo: locks/os2/thread_cond.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
locks/os2/thread_mutex.lo: locks/os2/thread_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
locks/os2/thread_rwlock.lo: locks/os2/thread_rwlock.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_locks_os2 = locks/os2/proc_mutex.lo locks/os2/thread_cond.lo locks/os2/thread_mutex.lo locks/os2/thread_rwlock.lo
network_io/os2/inet_ntop.lo: network_io/os2/inet_ntop.c .make.dirs
network_io/os2/inet_pton.lo: network_io/os2/inet_pton.c .make.dirs
network_io/os2/os2calls.lo: network_io/os2/os2calls.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
network_io/os2/sendrecv.lo: network_io/os2/sendrecv.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
network_io/os2/sendrecv_udp.lo: network_io/os2/sendrecv_udp.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
network_io/os2/os2calls.lo: network_io/os2/os2calls.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
network_io/os2/sendrecv.lo: network_io/os2/sendrecv.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
network_io/os2/sendrecv_udp.lo: network_io/os2/sendrecv_udp.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
network_io/os2/sockaddr.lo: network_io/os2/sockaddr.c .make.dirs
network_io/os2/socket_util.lo: network_io/os2/socket_util.c .make.dirs
network_io/os2/sockets.lo: network_io/os2/sockets.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
network_io/os2/sockopt.lo: network_io/os2/sockopt.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
network_io/os2/sockets.lo: network_io/os2/sockets.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
network_io/os2/sockopt.lo: network_io/os2/sockopt.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_network_io_os2 = network_io/os2/inet_ntop.lo network_io/os2/inet_pton.lo network_io/os2/os2calls.lo network_io/os2/sendrecv.lo network_io/os2/sendrecv_udp.lo network_io/os2/sockaddr.lo network_io/os2/socket_util.lo network_io/os2/sockets.lo network_io/os2/sockopt.lo
poll/os2/poll.lo: poll/os2/poll.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_poll.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
poll/os2/pollset.lo: poll/os2/pollset.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_poll.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
poll/os2/poll.lo: poll/os2/poll.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_poll.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
poll/os2/pollset.lo: poll/os2/pollset.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_poll.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_poll_os2 = poll/os2/poll.lo poll/os2/pollset.lo
shmem/os2/shm.lo: shmem/os2/shm.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
shmem/os2/shm.lo: shmem/os2/shm.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_shmem_os2 = shmem/os2/shm.lo
threadproc/os2/proc.lo: threadproc/os2/proc.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_signal.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
threadproc/os2/proc.lo: threadproc/os2/proc.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_signal.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
threadproc/os2/signals.lo: threadproc/os2/signals.c .make.dirs
threadproc/os2/thread.lo: threadproc/os2/thread.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
threadproc/os2/threadpriv.lo: threadproc/os2/threadpriv.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
threadproc/os2/thread.lo: threadproc/os2/thread.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
threadproc/os2/threadpriv.lo: threadproc/os2/threadpriv.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_threadproc_os2 = threadproc/os2/proc.lo threadproc/os2/signals.lo threadproc/os2/thread.lo threadproc/os2/threadpriv.lo
OBJECTS_os2 = $(OBJECTS_all) $(OBJECTS_atomic_unix) $(OBJECTS_dso_os2) $(OBJECTS_file_io_os2) $(OBJECTS_locks_os2) $(OBJECTS_memory_unix) $(OBJECTS_misc_unix) $(OBJECTS_mmap_unix) $(OBJECTS_network_io_os2) $(OBJECTS_poll_os2) $(OBJECTS_random_unix) $(OBJECTS_shmem_os2) $(OBJECTS_support_unix) $(OBJECTS_threadproc_os2) $(OBJECTS_time_unix) $(OBJECTS_user_unix)
dso/os390/dso.lo: dso/os390/dso.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
dso/os390/dso.lo: dso/os390/dso.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_dso_os390 = dso/os390/dso.lo
atomic/os390/atomic.lo: atomic/os390/atomic.c .make.dirs include/apr_allocator.h include/apr_atomic.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_want.h
atomic/os390/atomic.lo: atomic/os390/atomic.c .make.dirs
OBJECTS_atomic_os390 = atomic/os390/atomic.lo
OBJECTS_os390 = $(OBJECTS_all) $(OBJECTS_atomic_os390) $(OBJECTS_dso_os390) $(OBJECTS_file_io_unix) $(OBJECTS_locks_unix) $(OBJECTS_memory_unix) $(OBJECTS_misc_unix) $(OBJECTS_mmap_unix) $(OBJECTS_network_io_unix) $(OBJECTS_poll_unix) $(OBJECTS_random_unix) $(OBJECTS_shmem_unix) $(OBJECTS_support_unix) $(OBJECTS_threadproc_unix) $(OBJECTS_time_unix) $(OBJECTS_user_unix)
dso/win32/dso.lo: dso/win32/dso.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h
dso/win32/dso.lo: dso/win32/dso.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
OBJECTS_dso_win32 = dso/win32/dso.lo
file_io/win32/buffer.lo: file_io/win32/buffer.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_want.h
file_io/win32/dir.lo: file_io/win32/dir.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/win32/buffer.lo: file_io/win32/buffer.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
file_io/win32/dir.lo: file_io/win32/dir.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/win32/filedup.lo: file_io/win32/filedup.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/win32/filepath.lo: file_io/win32/filepath.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h
file_io/win32/filepath.lo: file_io/win32/filepath.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
file_io/win32/filestat.lo: file_io/win32/filestat.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/win32/filesys.lo: file_io/win32/filesys.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h
file_io/win32/filesys.lo: file_io/win32/filesys.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
file_io/win32/flock.lo: file_io/win32/flock.c .make.dirs
file_io/win32/open.lo: file_io/win32/open.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/win32/open.lo: file_io/win32/open.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/win32/pipe.lo: file_io/win32/pipe.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_escape.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/win32/readwrite.lo: file_io/win32/readwrite.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
file_io/win32/seek.lo: file_io/win32/seek.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_file_io_win32 = file_io/unix/copy.lo file_io/unix/fileacc.lo file_io/unix/filepath_util.lo file_io/unix/fullrw.lo file_io/unix/mktemp.lo file_io/unix/tempdir.lo file_io/win32/buffer.lo file_io/win32/dir.lo file_io/win32/filedup.lo file_io/win32/filepath.lo file_io/win32/filestat.lo file_io/win32/filesys.lo file_io/win32/flock.lo file_io/win32/open.lo file_io/win32/pipe.lo file_io/win32/readwrite.lo file_io/win32/seek.lo
locks/win32/proc_mutex.lo: locks/win32/proc_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
locks/win32/thread_cond.lo: locks/win32/thread_cond.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
locks/win32/thread_mutex.lo: locks/win32/thread_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
locks/win32/thread_rwlock.lo: locks/win32/thread_rwlock.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
locks/win32/proc_mutex.lo: locks/win32/proc_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
locks/win32/thread_cond.lo: locks/win32/thread_cond.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
locks/win32/thread_mutex.lo: locks/win32/thread_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
locks/win32/thread_rwlock.lo: locks/win32/thread_rwlock.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_locks_win32 = locks/win32/proc_mutex.lo locks/win32/thread_cond.lo locks/win32/thread_mutex.lo locks/win32/thread_rwlock.lo
misc/win32/charset.lo: misc/win32/charset.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
misc/win32/env.lo: misc/win32/env.c .make.dirs include/apr_allocator.h include/apr_env.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h
misc/win32/charset.lo: misc/win32/charset.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
misc/win32/env.lo: misc/win32/env.c .make.dirs include/apr_allocator.h include/apr_env.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
misc/win32/internal.lo: misc/win32/internal.c .make.dirs
misc/win32/misc.lo: misc/win32/misc.c .make.dirs include/apr_errno.h include/apr_lib.h
misc/win32/rand.lo: misc/win32/rand.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
misc/win32/start.lo: misc/win32/start.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_signal.h include/apr_thread_mutex.h include/apr_want.h
misc/win32/rand.lo: misc/win32/rand.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
misc/win32/start.lo: misc/win32/start.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_signal.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
misc/win32/utf8.lo: misc/win32/utf8.c .make.dirs include/apr_errno.h
OBJECTS_misc_win32 = misc/unix/errorcodes.lo misc/unix/getopt.lo misc/unix/otherchild.lo misc/unix/version.lo misc/win32/charset.lo misc/win32/env.lo misc/win32/internal.lo misc/win32/misc.lo misc/win32/rand.lo misc/win32/start.lo misc/win32/utf8.lo
mmap/win32/mmap.lo: mmap/win32/mmap.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_mmap.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_ring.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
mmap/win32/mmap.lo: mmap/win32/mmap.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_mmap.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_ring.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_mmap_win32 = mmap/unix/common.lo mmap/win32/mmap.lo
network_io/win32/sendrecv.lo: network_io/win32/sendrecv.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
network_io/win32/sockets.lo: network_io/win32/sockets.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
network_io/win32/sockopt.lo: network_io/win32/sockopt.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
network_io/win32/sendrecv.lo: network_io/win32/sendrecv.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
network_io/win32/sockets.lo: network_io/win32/sockets.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
network_io/win32/sockopt.lo: network_io/win32/sockopt.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_network_io_win32 = network_io/unix/inet_ntop.lo network_io/unix/inet_pton.lo network_io/unix/multicast.lo network_io/unix/sockaddr.lo network_io/unix/socket_util.lo network_io/win32/sendrecv.lo network_io/win32/sockets.lo network_io/win32/sockopt.lo
shmem/win32/shm.lo: shmem/win32/shm.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
shmem/win32/shm.lo: shmem/win32/shm.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_perms_set.h include/apr_pools.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_shmem_win32 = shmem/win32/shm.lo
threadproc/win32/proc.lo: threadproc/win32/proc.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
threadproc/win32/signals.lo: threadproc/win32/signals.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_signal.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
threadproc/win32/thread.lo: threadproc/win32/thread.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
threadproc/win32/threadpriv.lo: threadproc/win32/threadpriv.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
threadproc/win32/proc.lo: threadproc/win32/proc.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
threadproc/win32/signals.lo: threadproc/win32/signals.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_perms_set.h include/apr_pools.h include/apr_signal.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
threadproc/win32/thread.lo: threadproc/win32/thread.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
threadproc/win32/threadpriv.lo: threadproc/win32/threadpriv.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_threadproc_win32 = threadproc/win32/proc.lo threadproc/win32/signals.lo threadproc/win32/thread.lo threadproc/win32/threadpriv.lo
time/win32/time.lo: time/win32/time.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
time/win32/timestr.lo: time/win32/timestr.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
time/win32/time.lo: time/win32/time.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
time/win32/timestr.lo: time/win32/timestr.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_time_win32 = time/win32/time.lo time/win32/timestr.lo
user/win32/groupinfo.lo: user/win32/groupinfo.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
user/win32/userinfo.lo: user/win32/userinfo.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
user/win32/groupinfo.lo: user/win32/groupinfo.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
user/win32/userinfo.lo: user/win32/userinfo.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h
OBJECTS_user_win32 = user/win32/groupinfo.lo user/win32/userinfo.lo
atomic/win32/apr_atomic.lo: atomic/win32/apr_atomic.c .make.dirs include/apr_allocator.h include/apr_atomic.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_want.h
atomic/win32/apr_atomic.lo: atomic/win32/apr_atomic.c .make.dirs
atomic/win32/apr_atomic64.lo: atomic/win32/apr_atomic64.c .make.dirs include/apr_allocator.h include/apr_atomic.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h
OBJECTS_atomic_win32 = atomic/win32/apr_atomic.lo
OBJECTS_atomic_win32 = atomic/win32/apr_atomic.lo atomic/win32/apr_atomic64.lo
OBJECTS_win32 = $(OBJECTS_all) $(OBJECTS_atomic_win32) $(OBJECTS_dso_win32) $(OBJECTS_file_io_win32) $(OBJECTS_locks_win32) $(OBJECTS_memory_unix) $(OBJECTS_misc_win32) $(OBJECTS_mmap_win32) $(OBJECTS_network_io_win32) $(OBJECTS_poll_unix) $(OBJECTS_random_unix) $(OBJECTS_shmem_win32) $(OBJECTS_support_unix) $(OBJECTS_threadproc_win32) $(OBJECTS_time_win32) $(OBJECTS_user_win32)
HEADERS = $(top_srcdir)/include/apr_allocator.h $(top_srcdir)/include/apr_atomic.h $(top_srcdir)/include/apr_dso.h $(top_srcdir)/include/apr_env.h $(top_srcdir)/include/apr_errno.h $(top_srcdir)/include/apr_escape.h $(top_srcdir)/include/apr_file_info.h $(top_srcdir)/include/apr_file_io.h $(top_srcdir)/include/apr_fnmatch.h $(top_srcdir)/include/apr_general.h $(top_srcdir)/include/apr_getopt.h $(top_srcdir)/include/apr_global_mutex.h $(top_srcdir)/include/apr_hash.h $(top_srcdir)/include/apr_inherit.h $(top_srcdir)/include/apr_lib.h $(top_srcdir)/include/apr_mmap.h $(top_srcdir)/include/apr_network_io.h $(top_srcdir)/include/apr_poll.h $(top_srcdir)/include/apr_pools.h $(top_srcdir)/include/apr_portable.h $(top_srcdir)/include/apr_proc_mutex.h $(top_srcdir)/include/apr_random.h $(top_srcdir)/include/apr_ring.h $(top_srcdir)/include/apr_shm.h $(top_srcdir)/include/apr_signal.h $(top_srcdir)/include/apr_skiplist.h $(top_srcdir)/include/apr_strings.h $(top_srcdir)/include/apr_support.h $(top_srcdir)/include/apr_tables.h $(top_srcdir)/include/apr_thread_cond.h $(top_srcdir)/include/apr_thread_mutex.h $(top_srcdir)/include/apr_thread_proc.h $(top_srcdir)/include/apr_thread_rwlock.h $(top_srcdir)/include/apr_time.h $(top_srcdir)/include/apr_user.h $(top_srcdir)/include/apr_version.h $(top_srcdir)/include/apr_want.h
HEADERS = $(top_srcdir)/include/apr_allocator.h $(top_srcdir)/include/apr_atomic.h $(top_srcdir)/include/apr_cstr.h $(top_srcdir)/include/apr_dso.h $(top_srcdir)/include/apr_encode.h $(top_srcdir)/include/apr_env.h $(top_srcdir)/include/apr_errno.h $(top_srcdir)/include/apr_escape.h $(top_srcdir)/include/apr_file_info.h $(top_srcdir)/include/apr_file_io.h $(top_srcdir)/include/apr_fnmatch.h $(top_srcdir)/include/apr_general.h $(top_srcdir)/include/apr_getopt.h $(top_srcdir)/include/apr_global_mutex.h $(top_srcdir)/include/apr_hash.h $(top_srcdir)/include/apr_inherit.h $(top_srcdir)/include/apr_lib.h $(top_srcdir)/include/apr_mmap.h $(top_srcdir)/include/apr_network_io.h $(top_srcdir)/include/apr_perms_set.h $(top_srcdir)/include/apr_poll.h $(top_srcdir)/include/apr_pools.h $(top_srcdir)/include/apr_portable.h $(top_srcdir)/include/apr_proc_mutex.h $(top_srcdir)/include/apr_random.h $(top_srcdir)/include/apr_ring.h $(top_srcdir)/include/apr_shm.h $(top_srcdir)/include/apr_signal.h $(top_srcdir)/include/apr_skiplist.h $(top_srcdir)/include/apr_strings.h $(top_srcdir)/include/apr_support.h $(top_srcdir)/include/apr_tables.h $(top_srcdir)/include/apr_thread_cond.h $(top_srcdir)/include/apr_thread_mutex.h $(top_srcdir)/include/apr_thread_proc.h $(top_srcdir)/include/apr_thread_rwlock.h $(top_srcdir)/include/apr_time.h $(top_srcdir)/include/apr_user.h $(top_srcdir)/include/apr_version.h $(top_srcdir)/include/apr_want.h
SOURCE_DIRS = random/unix misc/win32 encoding dso/os2 time/unix network_io/win32 dso/win32 locks/unix user/unix time/win32 locks/beos tables support/unix file_io/unix mmap/unix atomic/unix threadproc/win32 poll/os2 atomic/win32 dso/os390 atomic/os390 dso/beos poll/unix passwd network_io/beos threadproc/os2 network_io/os2 shmem/win32 threadproc/beos shmem/unix network_io/unix file_io/os2 mmap/win32 dso/aix file_io/win32 threadproc/unix misc/unix locks/win32 shmem/beos dso/unix locks/os2 user/win32 shmem/os2 memory/unix strings $(EXTRA_SOURCE_DIRS)
SOURCE_DIRS = encoding passwd strings tables dso/unix file_io/unix locks/unix memory/unix misc/unix mmap/unix network_io/unix poll/unix random/unix shmem/unix support/unix threadproc/unix time/unix user/unix atomic/unix dso/aix dso/beos locks/beos network_io/beos shmem/beos threadproc/beos dso/os2 file_io/os2 locks/os2 network_io/os2 poll/os2 shmem/os2 threadproc/os2 dso/os390 atomic/os390 dso/win32 file_io/win32 locks/win32 misc/win32 mmap/win32 network_io/win32 shmem/win32 threadproc/win32 time/win32 user/win32 atomic/win32 $(EXTRA_SOURCE_DIRS)
BUILD_DIRS = atomic atomic/os390 atomic/unix atomic/win32 dso dso/aix dso/beos dso/os2 dso/os390 dso/unix dso/win32 encoding file_io file_io/os2 file_io/unix file_io/win32 locks locks/beos locks/os2 locks/unix locks/win32 memory memory/unix misc misc/unix misc/win32 mmap mmap/unix mmap/win32 network_io network_io/beos network_io/os2 network_io/unix network_io/win32 passwd poll poll/os2 poll/unix random random/unix shmem shmem/beos shmem/os2 shmem/unix shmem/win32 strings support support/unix tables threadproc threadproc/beos threadproc/os2 threadproc/unix threadproc/win32 time time/unix time/win32 user user/unix user/win32

View File

@ -112,8 +112,10 @@ ${AUTOCONF:-autoconf} $verbose
# Remove autoconf 2.5x's cache directory
rm -rf autom4te*.cache
PYTHON=${PYTHON-`build/PrintPath python3 python2 python`}
echo "buildconf: generating 'make' outputs ..."
build/gen-build.py $verbose make
${PYTHON} build/gen-build.py $verbose make
# Create RPM Spec file
if [ -f `which cut` ]; then

View File

@ -223,6 +223,7 @@
libexecdir: ${exec_prefix}/lib/apr/modules
mandir: ${exec_prefix}/share/man
datadir: ${exec_prefix}/share/apr
installbuilddir: ${datadir}/build-${APR_MAJOR_VERSION}
includedir: ${exec_prefix}/include/apr-${APR_MAJOR_VERSION}
localstatedir: ${prefix}/var/run
runtimedir: ${prefix}/var/run

3795
contrib/apr/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -264,16 +264,19 @@ case $host in
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL
# get libtool's setting of shlibpath_var
eval `grep "^shlibpath_var=[[A-Z_]]*$" $apr_builddir/libtool`
if test "x$shlibpath_var" = "x"; then
eval `grep "^shlibpath_var=[[A-Z_]]*$" $apr_builddir/libtool`
fi
if test "x$shlibpath_var" = "x"; then
AC_MSG_NOTICE([SHLIBPATH variable could not be determined])
shlibpath_var=REPLACE_WITH_YOUR_SHLIBPATH_VAR
fi
fi
;;
esac
AC_ARG_WITH(installbuilddir, [ --with-installbuilddir=DIR location to store APR build files (defaults to '${datadir}/build')],
[ installbuilddir=$withval ], [ installbuilddir="${datadir}/build-${APR_MAJOR_VERSION}" ] )
AC_ARG_WITH(installbuilddir, [ --with-installbuilddir=DIR location to store APR build files],
[ installbuilddir=$withval ] )
AC_SUBST(installbuilddir)
AC_ARG_WITH(libtool, [ --without-libtool avoid using libtool to link the library],
@ -346,6 +349,11 @@ AC_ARG_ENABLE(maintainer-mode,[ --enable-maintainer-mode Turn on debugging and
[APR_ADDTO(CFLAGS,-g)
if test "$GCC" = "yes"; then
APR_ADDTO(CFLAGS,[-Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations])
case `($CC --version) 2>/dev/null` in
*clang-900* | *"clang version 5.0.0"*)
APR_ADDTO(CFLAGS,[-Wno-error=strict-prototypes])
;;
esac
elif test "$AIX_XLC" = "yes"; then
APR_ADDTO(CFLAGS,-qfullpath -qinitauto=FE -qcheck=all -qinfo=pro)
fi
@ -546,6 +554,11 @@ case $host in
;;
esac
;;
*apple-darwin*)
ac_cv_func_fdatasync="no" # Mac OS X wrongly reports it has fdatasync()
OSDIR="unix"
eolstr="\\n"
;;
*os390)
OSDIR="os390"
OBJECTS_PLATFORM='$(OBJECTS_os390)'
@ -573,6 +586,11 @@ case $host in
OSDIR="unix"
eolstr="\\n"
;;
*darwin* )
ac_cv_func_fdatasync="no" # Mac OS X wrongly reports it has fdatasync()
OSDIR="unix"
eolstr="\\n"
;;
*)
OSDIR="unix"
eolstr="\\n"
@ -792,15 +810,13 @@ else
fi
fi
ac_cv_define_READDIR_IS_THREAD_SAFE=no
ac_cv_define_READDIR_IS_THREAD_SAFE=yes
ac_cv_define_GETHOSTBYNAME_IS_THREAD_SAFE=no
ac_cv_define_GETHOSTBYADDR_IS_THREAD_SAFE=no
ac_cv_define_GETSERVBYNAME_IS_THREAD_SAFE=no
if test "$threads" = "1"; then
echo "APR will use threads"
AC_CHECK_LIB(c_r, readdir,
AC_DEFINE(READDIR_IS_THREAD_SAFE, 1,
[Define if readdir is thread safe]))
AC_DEFINE(READDIR_IS_THREAD_SAFE, 1, [Modern readdir is thread safe])
if test "x$apr_gethostbyname_is_thread_safe" = "x"; then
AC_CHECK_LIB(c_r, gethostbyname, apr_gethostbyname_is_thread_safe=yes)
fi
@ -846,6 +862,22 @@ AC_ARG_WITH(efence,
[ AC_MSG_ERROR(Electric Fence requested but not detected) ])
])
AC_ARG_WITH(valgrind,
[ --with-valgrind[[=DIR]] Enable code to teach valgrind about apr pools
(optionally: set path to valgrind headers) ],
[ if test "$withval" != no; then
if test "$withval" = yes; then
withval=/usr/include/valgrind
fi
APR_ADDTO(CPPFLAGS, -I$withval)
AC_CHECK_HEADERS(valgrind.h memcheck.h)
APR_IFALLYES(header:valgrind.h header:memcheck.h,
[AC_DEFINE(HAVE_VALGRIND, 1, [Compile in valgrind support]) ],
[AC_MSG_ERROR(valgrind headers not found) ]
)
fi ]
)
AC_CHECK_FUNCS(sigsuspend, [ have_sigsuspend="1" ], [ have_sigsuspend="0" ])
AC_CHECK_FUNCS(sigwait, [ have_sigwait="1" ], [ have_sigwait="0" ])
dnl AC_CHECK_FUNCS doesn't work for this on Tru64 since the function
@ -1131,9 +1163,17 @@ case $host in
#endif";;
esac
AC_CHECK_HEADERS([sys/types.h sys/mman.h sys/ipc.h sys/mutex.h sys/shm.h sys/file.h kernel/OS.h os2.h windows.h])
AC_CHECK_HEADERS([sys/types.h sys/mman.h sys/ipc.h sys/mutex.h \
sys/shm.h sys/file.h sys/socket.h kernel/OS.h os2.h windows.h])
AC_CHECK_HEADERS([net/if.h],[],[],
[
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include <net/if.h>
])
AC_CHECK_FUNCS([mmap munmap shm_open shm_unlink shmget shmat shmdt shmctl \
create_area])
create_area mprotect])
APR_CHECK_DEFINE(MAP_ANON, sys/mman.h)
AC_CHECK_FILE(/dev/zero)
@ -1451,6 +1491,7 @@ APR_FLAG_HEADERS(
errno.h \
fcntl.h \
grp.h \
inttypes.h \
io.h \
limits.h \
mach-o/dyld.h \
@ -1530,6 +1571,7 @@ AC_SUBST(crypth)
AC_SUBST(errnoh)
AC_SUBST(direnth)
AC_SUBST(fcntlh)
AC_SUBST(inttypesh)
AC_SUBST(ioh)
AC_SUBST(limitsh)
AC_SUBST(netdbh)
@ -1581,6 +1623,27 @@ AC_ARG_ENABLE(allocator-uses-mmap,
fi ]
)
AC_ARG_ENABLE(allocator-guard-pages,
[ --enable-allocator-guard-pages Use guard pages in apr_allocator
(implies --enable-allocator-uses-mmap) ] ,
[ if test "$enableval" = "yes"; then
APR_IFALLYES(header:sys/mman.h func:mmap func:munmap func:mprotect define:MAP_ANON,
[AC_DEFINE(APR_ALLOCATOR_GUARD_PAGES, 1,
[Define if apr_allocator should use guard pages]) ],
[AC_MSG_ERROR([mmap()/MAP_ANON/mprotect() not supported]) ]
)
fi ]
)
AC_ARG_ENABLE(pool-concurrency-check,
[ --enable-pool-concurrency-check Check for concurrent usage of memory pools],
[ if test "$enableval" = "yes"; then
AC_DEFINE(APR_POOL_CONCURRENCY_CHECK, 1,
[Define if pool functions should abort if concurrent usage is detected])
fi ]
)
dnl ----------------------------- Checks for standard typedefs
AC_TYPE_OFF_T
AC_TYPE_PID_T
@ -1604,9 +1667,9 @@ fi
dnl Checks for integer size
AC_CHECK_SIZEOF(char, 1)
AC_CHECK_SIZEOF(short, 2)
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(long, 4)
AC_CHECK_SIZEOF(short, 2)
AC_CHECK_SIZEOF(long long, 8)
if test "$ac_cv_sizeof_short" = "2"; then
@ -1615,16 +1678,37 @@ fi
if test "$ac_cv_sizeof_int" = "4"; then
int_value=int
fi
# Now we need to find what apr_int64_t (sizeof == 8) will be.
# The first match is our preference.
if test "$ac_cv_sizeof_int" = "8"; then
# The first match is our preference (use inttypes if available).
APR_IFALLYES(header:stdint.h header:inttypes.h, hasinttypes="1", hasinttypes="0")
if test "$hasinttypes" = "1"; then
int64_literal='#define APR_INT64_C(val) INT64_C(val)'
uint64_literal='#define APR_UINT64_C(val) UINT64_C(val)'
int64_t_fmt='#define APR_INT64_T_FMT PRId64'
uint64_t_fmt='#define APR_UINT64_T_FMT PRIu64'
uint64_t_hex_fmt='#define APR_UINT64_T_HEX_FMT PRIx64'
int64_value="int64_t"
uint64_value="uint64_t"
APR_CHECK_TYPES_FMT_COMPATIBLE(int64_t, int, d, [
int64_strfn="strtoi"
], [
APR_CHECK_TYPES_FMT_COMPATIBLE(int64_t, long, ld, [
int64_strfn="strtol"
], [
APR_CHECK_TYPES_FMT_COMPATIBLE(int64_t, long long, lld, [
int64_strfn="strtoll"
], [
AC_ERROR([could not determine the string function for int64_t])
])])])
elif test "$ac_cv_sizeof_int" = "8"; then
int64_literal='#define APR_INT64_C(val) (val)'
uint64_literal='#define APR_UINT64_C(val) (val##U)'
int64_t_fmt='#define APR_INT64_T_FMT "d"'
uint64_t_fmt='#define APR_UINT64_T_FMT "u"'
uint64_t_hex_fmt='#define APR_UINT64_T_HEX_FMT "x"'
int64_value="int"
long_value=int
uint64_value="unsigned int"
int64_strfn="strtoi"
elif test "$ac_cv_sizeof_long" = "8"; then
int64_literal='#define APR_INT64_C(val) (val##L)'
@ -1633,7 +1717,7 @@ elif test "$ac_cv_sizeof_long" = "8"; then
uint64_t_fmt='#define APR_UINT64_T_FMT "lu"'
uint64_t_hex_fmt='#define APR_UINT64_T_HEX_FMT "lx"'
int64_value="long"
long_value=long
uint64_value="unsigned long"
int64_strfn="strtol"
elif test "$ac_cv_sizeof_long_long" = "8"; then
int64_literal='#define APR_INT64_C(val) (val##LL)'
@ -1646,7 +1730,7 @@ elif test "$ac_cv_sizeof_long_long" = "8"; then
uint64_t_fmt='#define APR_UINT64_T_FMT "llu"'
uint64_t_hex_fmt='#define APR_UINT64_T_HEX_FMT "llx"'
int64_value="long long"
long_value="long long"
uint64_value="unsigned long long"
int64_strfn="strtoll"
elif test "$ac_cv_sizeof_longlong" = "8"; then
int64_literal='#define APR_INT64_C(val) (val##LL)'
@ -1655,7 +1739,7 @@ elif test "$ac_cv_sizeof_longlong" = "8"; then
uint64_t_fmt='#define APR_UINT64_T_FMT "qu"'
uint64_t_hex_fmt='#define APR_UINT64_T_HEX_FMT "qx"'
int64_value="__int64"
long_value="__int64"
uint64_value="unsigned __int64"
int64_strfn="strtoll"
else
# int64_literal may be overriden if your compiler thinks you have
@ -1773,18 +1857,22 @@ case $host in
uint64_t_fmt='#define APR_UINT64_T_FMT "I64u"'
uint64_t_hex_fmt='#define APR_UINT64_T_HEX_FMT "I64x"'
int64_value="__int64"
long_value="__int64"
uint64_value="unsigned __int64"
int64_strfn="_strtoi64"
;;
esac
APR_CHECK_TYPES_COMPATIBLE(ssize_t, int, [ssize_t_fmt="d"])
APR_CHECK_TYPES_COMPATIBLE(ssize_t, long, [ssize_t_fmt="ld"])
APR_CHECK_TYPES_COMPATIBLE(size_t, unsigned int, [size_t_fmt="u"])
APR_CHECK_TYPES_COMPATIBLE(size_t, unsigned long, [size_t_fmt="lu"])
dnl I would expect much of the above to go away with new compile test
APR_CHECK_TYPES_FMT_COMPATIBLE(ssize_t, long, ld, [ssize_t_fmt="ld"], [
APR_CHECK_TYPES_FMT_COMPATIBLE(ssize_t, int, d, [ssize_t_fmt="d"])
])
APR_CHECK_TYPES_FMT_COMPATIBLE(size_t, unsigned long, lu, [size_t_fmt="lu"], [
APR_CHECK_TYPES_FMT_COMPATIBLE(size_t, unsigned int, u, [size_t_fmt="u"])
])
APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], ssize_t, 8)
dnl the else cases below should no longer occur;
AC_MSG_CHECKING([which format to use for apr_ssize_t])
if test -n "$ssize_t_fmt"; then
AC_MSG_RESULT(%$ssize_t_fmt)
@ -1802,6 +1890,7 @@ ssize_t_fmt="#define APR_SSIZE_T_FMT \"$ssize_t_fmt\""
APR_CHECK_SIZEOF_EXTENDED([#include <stddef.h>], size_t, 8)
# else cases below should no longer occur;
AC_MSG_CHECKING([which format to use for apr_size_t])
if test -n "$size_t_fmt"; then
AC_MSG_RESULT(%$size_t_fmt)
@ -1854,21 +1943,24 @@ elif test "${ac_cv_sizeof_off_t}x${ac_cv_sizeof_long}" = "4x4"; then
off_t_fmt='#define APR_OFF_T_FMT "ld"'
off_t_strfn='strtol'
elif test "$ac_cv_type_off_t" = "yes"; then
off_t_value=off_t
# off_t is more commonly a long than an int; prefer that case
# where int and long are the same size.
if test "$ac_cv_sizeof_off_t" = "$ac_cv_sizeof_long"; then
off_t_fmt='#define APR_OFF_T_FMT "ld"'
# where int and long are the same size and interchangable.
off_t_value=off_t
APR_CHECK_TYPES_FMT_COMPATIBLE(off_t, long, ld, [
off_t_fmt="#define APR_OFF_T_FMT \"ld\""
off_t_strfn='strtol'
elif test "$ac_cv_sizeof_off_t" = "$ac_cv_sizeof_int"; then
off_t_fmt='#define APR_OFF_T_FMT "d"'
], [
APR_CHECK_TYPES_FMT_COMPATIBLE(off_t, int, d, [
off_t_fmt="#define APR_OFF_T_FMT \"d\""
off_t_strfn='strtoi'
elif test "$ac_cv_sizeof_off_t" = "$ac_cv_sizeof_long_long"; then
off_t_fmt='#define APR_OFF_T_FMT APR_INT64_T_FMT'
off_t_strfn='apr_strtoi64'
else
AC_ERROR([could not determine the size of off_t])
fi
], [
APR_CHECK_TYPES_FMT_COMPATIBLE(off_t, long long, lld, [
off_t_fmt="#define APR_OFF_T_FMT \"lld\""
off_t_strfn='strtoll'
], [
APR_CHECK_TYPES_FMT_COMPATIBLE(off_t, $int64_value, I64d, [
off_t_fmt="#define APR_OFF_T_FMT APR_INT64_T_FMT"
off_t_strfn='apr_strtoi64'], [
# Per OS tuning...
case $host in
*-mingw*)
@ -1876,7 +1968,11 @@ elif test "$ac_cv_type_off_t" = "yes"; then
off_t_fmt='#define APR_OFF_T_FMT "I64d"'
off_t_strfn='_strtoi64'
;;
*)
AC_ERROR([could not determine the size of off_t])
;;
esac
])])])])
else
# Fallback on int
off_t_value=apr_int32_t
@ -1935,8 +2031,8 @@ fi
AC_SUBST(voidp_size)
AC_SUBST(short_value)
AC_SUBST(int_value)
AC_SUBST(long_value)
AC_SUBST(int64_value)
AC_SUBST(uint64_value)
AC_SUBST(off_t_value)
AC_SUBST(size_t_value)
AC_SUBST(ssize_t_value)
@ -2129,10 +2225,17 @@ AC_SUBST(struct_rlimit)
dnl ----------------------------- Checking for Locking Characteristics
echo "${nl}Checking for Locking..."
AC_CHECK_FUNCS(semget semctl flock)
AC_CHECK_HEADERS(semaphore.h OS.h)
AC_CHECK_FUNCS(semget semctl semop semtimedop flock)
APR_IFALLYES(func:semtimedop, have_semtimedop="1", have_semtimedop="0")
AC_CHECK_HEADERS(semaphore.h)
AC_SEARCH_LIBS(sem_open, rt)
AC_CHECK_FUNCS(sem_close sem_unlink sem_post sem_wait create_sem)
AC_CHECK_FUNCS(sem_close sem_unlink sem_post sem_wait sem_timedwait)
APR_IFALLYES(func:sem_timedwait, have_sem_timedwait="1", have_sem_timedwait="0")
AC_CHECK_HEADERS(OS.h)
AC_CHECK_FUNCS(create_sem acquire_sem acquire_sem_etc)
APR_IFALLYES(header:OS.h func:acquire_sem_etc, have_acquire_sem_etc="1", have_acquire_sem_etc="0")
# Some systems return ENOSYS from sem_open.
AC_CACHE_CHECK(for working sem_open,ac_cv_func_sem_open,[
@ -2191,7 +2294,10 @@ APR_CHECK_DEFINE_FILES(POLLIN, poll.h sys/poll.h)
if test "$threads" = "1"; then
APR_CHECK_DEFINE(PTHREAD_PROCESS_SHARED, pthread.h)
AC_CHECK_FUNCS(pthread_mutexattr_setpshared)
AC_CHECK_FUNCS(pthread_mutex_timedlock pthread_mutexattr_setpshared)
APR_IFALLYES(header:pthread.h func:pthread_mutex_timedlock,
have_pthread_mutex_timedlock="1", have_pthread_mutex_timedlock="0")
AC_SUBST(have_pthread_mutex_timedlock)
# Some systems have setpshared and define PROCESS_SHARED, but don't
# really support PROCESS_SHARED locks. So, we must validate that we
# can go through the steps without receiving some sort of system error.
@ -2229,8 +2335,8 @@ fi
APR_IFALLYES(header:semaphore.h func:sem_open func:sem_close dnl
func:sem_unlink func:sem_post func:sem_wait,
hasposixser="1", hasposixser="0")
APR_IFALLYES(func:semget func:semctl define:SEM_UNDO, hassysvser="1",
hassysvser="0")
APR_IFALLYES(func:semget func:semctl func:semop define:SEM_UNDO,
hassysvser="1", hassysvser="0")
APR_IFALLYES(func:flock define:LOCK_EX, hasflockser="1", hasflockser="0")
APR_IFALLYES(header:fcntl.h define:F_SETLK, hasfcntlser="1", hasfcntlser="0")
# note: the current APR use of shared mutex requires /dev/zero
@ -2240,6 +2346,11 @@ APR_IFALLYES(header:pthread.h define:PTHREAD_PROCESS_SHARED dnl
hasprocpthreadser="1", hasprocpthreadser="0")
APR_IFALLYES(header:OS.h func:create_sem, hasbeossem="1", hasbeossem="0")
AC_CHECK_FUNCS(pthread_condattr_setpshared)
APR_IFALLYES(header:pthread.h func:pthread_condattr_setpshared,
have_pthread_condattr_setpshared="1", have_pthread_condattr_setpshared="0")
AC_SUBST(have_pthread_condattr_setpshared)
# See which lock mechanism we'll select by default on this system.
# The last APR_DECIDE to execute sets the default.
# At this stage, we match the ordering in Apache 1.3
@ -2255,10 +2366,18 @@ APR_IFALLYES(func:flock define:LOCK_EX,
APR_DECIDE(USE_FLOCK_SERIALIZE, [4.2BSD-style flock()]))
APR_IFALLYES(header:fcntl.h define:F_SETLK,
APR_DECIDE(USE_FCNTL_SERIALIZE, [SVR4-style fcntl()]))
APR_IFALLYES(func:semget func:semctl define:SEM_UNDO,
APR_IFALLYES(func:semget func:semctl func:semop define:SEM_UNDO,
APR_DECIDE(USE_SYSVSEM_SERIALIZE, [SysV IPC semget()]))
APR_IFALLYES(header:OS.h func:create_sem,
APR_IFALLYES(header:OS.h func:create_sem func:acquire_sem func:acquire_sem_etc,
APR_DECIDE(USE_BEOSSEM, [BeOS Semaphores]))
# pthread mutex both pshared and robust[_np] is the best default
case "$apr_cv_mutex_robust_shared" in
"yes"|"np")
APR_DECIDE(USE_PROC_PTHREAD_SERIALIZE, [pthread pshared mutex])
;;
*)
;;
esac
if test "x$apr_lock_method" != "x"; then
APR_DECISION_FORCE($apr_lock_method)
fi
@ -2418,6 +2537,15 @@ else
fi
dnl ----------------------------- Checking for /dev/random
AC_CHECK_HEADERS(sys/random.h)
AC_CHECK_FUNCS(getrandom)
AC_CHECK_HEADERS(sys/syscall.h)
AC_CHECK_HEADERS(linux/random.h)
AC_CHECK_DECLS([SYS_getrandom], [], [], [#include <sys/syscall.h>])
AC_CHECK_FUNCS(arc4random_buf)
AC_MSG_CHECKING(for entropy source)
why_no_rand=""
@ -2435,10 +2563,27 @@ AC_ARG_WITH(egd,
rand="1"
])
if test "$rand" != "1"; then
if test "$ac_cv_func_getrandom" = yes; then
rand="getrandom"
elif test "$ac_cv_have_decl_SYS_getrandom" = yes; then
rand="SYS_getrandom"
elif test "$ac_cv_func_arc4random_buf" = yes; then
rand="arc4random"
fi
fi
if test "$rand" != "1"; then
AC_ARG_WITH(devrandom,
[ --with-devrandom[[=DEV]] use /dev/random or compatible [[searches by default]]],
[ apr_devrandom="$withval" ], [ apr_devrandom="yes" ])
[ apr_devrandom="$withval" ], [ apr_devrandom="no" ])
if test "$apr_devrandom" = "no"; then
if test -z "$rand"; then
apr_devrandom="yes"
else
apr_devrandom="no"
fi
fi
if test "$apr_devrandom" = "yes"; then
# /dev/random on OpenBSD doesn't provide random data, so
@ -2446,7 +2591,7 @@ if test "$rand" != "1"; then
for f in /dev/arandom /dev/urandom /dev/random; do
if test -r $f; then
apr_devrandom=$f
rand=1
rand="1"
break
fi
done
@ -2472,6 +2617,10 @@ if test "$rand" != "1"; then
if test "$rand" = "1"; then
AC_DEFINE_UNQUOTED(DEV_RANDOM, ["$apr_devrandom"], [Define to path of random device])
AC_MSG_RESULT([$apr_devrandom])
elif test -n "$rand"; then
AC_DEFINE_UNQUOTED(SYS_RANDOM, ["$rand"], [Define system call of random])
AC_MSG_RESULT([$rand])
rand="1"
fi
fi
@ -2689,12 +2838,13 @@ esac
AC_SEARCH_LIBS(getaddrinfo, socket inet6)
AC_SEARCH_LIBS(gai_strerror, socket inet6)
AC_SEARCH_LIBS(getnameinfo, socket inet6)
AC_CHECK_FUNCS(gai_strerror)
AC_CHECK_FUNCS(gai_strerror if_nametoindex if_indextoname)
APR_CHECK_WORKING_GETADDRINFO
APR_CHECK_NEGATIVE_EAI
APR_CHECK_WORKING_GETNAMEINFO
APR_CHECK_SOCKADDR_IN6
APR_CHECK_SOCKADDR_STORAGE
APR_CHECK_SOCKADDR_UN
have_ipv6="0"
if test "$user_disabled_ipv6" = 1; then
@ -2726,6 +2876,12 @@ AC_MSG_RESULT($ipv6_result)
AC_SUBST(have_ipv6)
AC_ARG_ENABLE(timedlocks,
[ --disable-timedlocks Disable timed locks ],
[apr_has_timedlocks="0"], [apr_has_timedlocks="1"]
)
AC_SUBST(apr_has_timedlocks)
# hstrerror is only needed if IPv6 is not enabled,
# so getaddrinfo/gai_strerror are not used.
if test $have_ipv6 = 0; then

View File

@ -152,7 +152,7 @@ required APR header files for external use.</p>
<p>The current design of APR requires that most APR types be incomplete.
It is not possible to write flexible portable code if programs can access
the internals of APR types. This is because different platforms are
likely to define different native types. There are only two execptions to
likely to define different native types. There are only two exceptions to
this rule:</p>
<ul>
@ -227,7 +227,7 @@ file.</p>
<p>For an actual example, look at any file in the include directory. The
reason the docs are in the header files is to ensure that the docs always
reflect the current code. If you change paramters or return values for a
reflect the current code. If you change parameters or return values for a
function, please be sure to update the documentation.</p>
<h2>APR Error reporting</h2>
@ -246,7 +246,7 @@ Unless you are sure, return an ap_status_t.</p>
<p>All platforms return errno values unchanged. Each platform can also have
one system error type, which can be returned after an offset is added.
There are five types of error values in APR, each with it's own offset.</p>
There are five types of error values in APR, each with its own offset.</p>
<!-- This should be turned into a table, but I am lazy today -->
<pre>
@ -277,7 +277,7 @@ There are five types of error values in APR, each with it's own offset.</p>
<strong>The difference in naming between APR_OS_START_ERROR and
APR_OS_START_STATUS mentioned above allows programmers to easily determine if
the error code indicates an error condition or a status codition.</strong>
the error code indicates an error condition or a status condition.</strong>
<p>If your function has multiple return codes that all indicate success, but
with different results, or if your function can only return PASS/FAIL, you
@ -345,7 +345,7 @@ codes to a common code, and most of the time programs want to just output
an error string. If we convert all errors to a common subset, we have four
steps to output an error string:</p>
<p>The seocnd problem with option 1, is that it is a lossy conversion. For
<p>The second problem with option 1, is that it is a lossy conversion. For
example, Windows and OS/2 have a couple hundred error codes, but POSIX errno
only defines about 50 errno values. This means that if we convert to a
canonical error value immediately, there is no way for the programmer to

View File

@ -8,10 +8,10 @@
<p>APR porters need to address the underlying discrepancies between
file systems. To achieve a reasonable degree of security, the
program depending upon APR needs to know that two paths may be
compared, and that a mismatch is guarenteed to reflect that the
compared, and that a mismatch is guaranteed to reflect that the
two paths do not return the same resource</p>.
<p>The first discrepancy is in volume roots. Unix and pure deriviates
<p>The first discrepancy is in volume roots. Unix and pure derivatives
have only one root path, "/". Win32 and OS2 share root paths of
the form "D:/", D: is the volume designation. However, this can
be specified as "//./D:/" as well, indicating D: volume of the
@ -21,7 +21,7 @@ specified network server. Finally, NetWare root paths are of the
form "server/volume:/", or the simpler "volume:/" syntax for 'this'
machine. All these non-Unix file systems accept volume:path,
without a slash following the colon, as a path relative to the
current working directory, which APR will treat as ambigious, that
current working directory, which APR will treat as ambiguous, that
is, neither an absolute nor a relative path per se.</p>
<p>The second discrepancy is in the meaning of the 'this' directory.
@ -39,35 +39,35 @@ It's also critical to simply truncate leading "/../" paths to "/",
since the parent of the root is root. This gets tricky on the
Win32 and OS2 platforms, since the ".." element is invalid before
the "//server/share/" is complete, and the "//server/share/../"
seqence is the complete UNC root "//server/share/". In relative
sequence is the complete UNC root "//server/share/". In relative
paths, leading ".." elements are significant, until they are merged
with an absolute path. The relative form must only retain the ".."
segments as leading segments, to be resolved once merged to another
relative or an absolute path.</p>
<p>The fourth discrepancy occurs with acceptance of alternate character
codes for the same element. Path seperators are not retained within
codes for the same element. Path separators are not retained within
the APR canonical forms. The OS filesystem and APR (slashed) forms
can both be returned as strings, to be used in the proper context.
Unix, Win32 and Netware all accept slashes and backslashes as the
same path seperator symbol, although unix strictly accepts slashes.
same path separator symbol, although unix strictly accepts slashes.
While the APR form of the name strictly uses slashes, always consider
that there could be a platform that actually accepts slashes as a
character within a segment name.</p>
<p>The fifth and worst discrepancy plauges Win32, OS2, Netware, and some
<p>The fifth and worst discrepancy plagues Win32, OS2, Netware, and some
filesystems mounted in Unix. Case insensitivity can permit the same
file to slip through in both it's proper case and alternate cases.
Simply changing the case is insufficient for any character set beyond
ASCII, since various dilectic forms of characters suffer from one to
ASCII, since various dialectic forms of characters suffer from one to
many or many to one translations. An example would be u-umlaut, which
might be accepted as a single character u-umlaut, a two character
sequence u and the zero-width umlaut, the upper case form of the same,
or perhaps even a captial U alone. This can be handled in different
or perhaps even a capital U alone. This can be handled in different
ways depending on the purposes of the APR based program, but the one
requirement is that the path must be absolute in order to resolve these
ambiguities. Methods employed include comparison of device and inode
file uniqifiers, which is a fairly fast operation, or quering the OS
file uniqifiers, which is a fairly fast operation, or querying the OS
for the true form of the name, which can be much slower. Only the
acknowledgement of the file names by the OS can validate the equality
of two different cases of the same filename.</p>
@ -76,7 +76,7 @@ of two different cases of the same filename.</p>
significant in non-unix file systems. Trailing periods are accepted
but never stored, therefore trailing periods must be ignored for any
form of comparison. And all OS's have certain expectations of what
characters are illegal (or undesireable due to confusion.)</p>
characters are illegal (or undesirable due to confusion.)</p>
<p>A final warning, canonical functions don't transform or resolve case
or character ambiguity issues until they are resolved into an absolute
@ -111,10 +111,10 @@ system to return the proper form of the name.</p>
<p>In any case, returning the char* path, with a flag to request the proper
case, forces the OS calls to resolve the true names of each segment. Where
there is a penality for this operation and the stat device and inode test
there is a penalty for this operation and the stat device and inode test
is faster, case correction is postponed until the char* result is requested.
On platforms that identify the inode, device, or proper name interchangably
with no penalities, this may occur when the name is initially processed.</p>
with no penalties, this may occur when the name is initially processed.</p>
<hr>

View File

@ -38,7 +38,7 @@ typedef struct ap_file_t {
#endif
} ap_file_t;
This captures the essense of what is currently being defined for ap_file_t
This captures the essence of what is currently being defined for ap_file_t
using incomplete types. However, using this structure leads developers to
believe that they are safe accessing any of the fields in this structure.
This is not true. On some platforms, such as Windows, about half of the
@ -53,7 +53,7 @@ macros, for example:
#define filetype int
#endif
And then in the defintion for ap_file_t, we could say:
And then in the definition for ap_file_t, we could say:
filetype filedes;
This gets rid of some of the complexity, by moving it off to the side, but
@ -73,7 +73,7 @@ Having said all of that, sometimes incomplete types just don't make sense.
For example, the first implementation of time functions used incomplete types,
which added a layer of complexity that turned out to be unnecessary. If
a platform cannot provide a simple number that represents the number of seconds
elapsed since a specifed date and time, then APR doesn't really want to
elapsed since a specified date and time, then APR doesn't really want to
provide support for that platform.
APR is trying hard to provide a balance of incomplete and complete types,

View File

@ -3,10 +3,6 @@
<title>Using APR Pools</title>
</head>
<body>
<div align="right">
Last modified at [$Date: 2004-11-24 17:51:51 -0500 (Wed, 24 Nov 2004) $]
</div>
<h1>Using APR Pools</h1>
<p>

File diff suppressed because it is too large Load Diff

View File

@ -27,50 +27,10 @@
#include "apr_escape.h"
#include "apr_escape_test_char.h"
#include "apr_encode_private.h"
#include "apr_lib.h"
#include "apr_strings.h"
#if APR_CHARSET_EBCDIC
static int convert_a2e[256] = {
0x00, 0x01, 0x02, 0x03, 0x37, 0x2D, 0x2E, 0x2F, 0x16, 0x05, 0x15, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
0x10, 0x11, 0x12, 0x13, 0x3C, 0x3D, 0x32, 0x26, 0x18, 0x19, 0x3F, 0x27, 0x1C, 0x1D, 0x1E, 0x1F,
0x40, 0x5A, 0x7F, 0x7B, 0x5B, 0x6C, 0x50, 0x7D, 0x4D, 0x5D, 0x5C, 0x4E, 0x6B, 0x60, 0x4B, 0x61,
0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0x7A, 0x5E, 0x4C, 0x7E, 0x6E, 0x6F,
0x7C, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6,
0xD7, 0xD8, 0xD9, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xAD, 0xE0, 0xBD, 0x5F, 0x6D,
0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96,
0x97, 0x98, 0x99, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xC0, 0x4F, 0xD0, 0xA1, 0x07,
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x06, 0x17, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x09, 0x0A, 0x1B,
0x30, 0x31, 0x1A, 0x33, 0x34, 0x35, 0x36, 0x08, 0x38, 0x39, 0x3A, 0x3B, 0x04, 0x14, 0x3E, 0xFF,
0x41, 0xAA, 0x4A, 0xB1, 0x9F, 0xB2, 0x6A, 0xB5, 0xBB, 0xB4, 0x9A, 0x8A, 0xB0, 0xCA, 0xAF, 0xBC,
0x90, 0x8F, 0xEA, 0xFA, 0xBE, 0xA0, 0xB6, 0xB3, 0x9D, 0xDA, 0x9B, 0x8B, 0xB7, 0xB8, 0xB9, 0xAB,
0x64, 0x65, 0x62, 0x66, 0x63, 0x67, 0x9E, 0x68, 0x74, 0x71, 0x72, 0x73, 0x78, 0x75, 0x76, 0x77,
0xAC, 0x69, 0xED, 0xEE, 0xEB, 0xEF, 0xEC, 0xBF, 0x80, 0xFD, 0xFE, 0xFB, 0xFC, 0xBA, 0xAE, 0x59,
0x44, 0x45, 0x42, 0x46, 0x43, 0x47, 0x9C, 0x48, 0x54, 0x51, 0x52, 0x53, 0x58, 0x55, 0x56, 0x57,
0x8C, 0x49, 0xCD, 0xCE, 0xCB, 0xCF, 0xCC, 0xE1, 0x70, 0xDD, 0xDE, 0xDB, 0xDC, 0x8D, 0x8E, 0xDF };
static int convert_e2a[256] = {
0x00, 0x01, 0x02, 0x03, 0x9C, 0x09, 0x86, 0x7F, 0x97, 0x8D, 0x8E, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
0x10, 0x11, 0x12, 0x13, 0x9D, 0x0A, 0x08, 0x87, 0x18, 0x19, 0x92, 0x8F, 0x1C, 0x1D, 0x1E, 0x1F,
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x17, 0x1B, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x05, 0x06, 0x07,
0x90, 0x91, 0x16, 0x93, 0x94, 0x95, 0x96, 0x04, 0x98, 0x99, 0x9A, 0x9B, 0x14, 0x15, 0x9E, 0x1A,
0x20, 0xA0, 0xE2, 0xE4, 0xE0, 0xE1, 0xE3, 0xE5, 0xE7, 0xF1, 0xA2, 0x2E, 0x3C, 0x28, 0x2B, 0x7C,
0x26, 0xE9, 0xEA, 0xEB, 0xE8, 0xED, 0xEE, 0xEF, 0xEC, 0xDF, 0x21, 0x24, 0x2A, 0x29, 0x3B, 0x5E,
0x2D, 0x2F, 0xC2, 0xC4, 0xC0, 0xC1, 0xC3, 0xC5, 0xC7, 0xD1, 0xA6, 0x2C, 0x25, 0x5F, 0x3E, 0x3F,
0xF8, 0xC9, 0xCA, 0xCB, 0xC8, 0xCD, 0xCE, 0xCF, 0xCC, 0x60, 0x3A, 0x23, 0x40, 0x27, 0x3D, 0x22,
0xD8, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0xAB, 0xBB, 0xF0, 0xFD, 0xFE, 0xB1,
0xB0, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0xAA, 0xBA, 0xE6, 0xB8, 0xC6, 0xA4,
0xB5, 0x7E, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0xA1, 0xBF, 0xD0, 0x5B, 0xDE, 0xAE,
0xAC, 0xA3, 0xA5, 0xB7, 0xA9, 0xA7, 0xB6, 0xBC, 0xBD, 0xBE, 0xDD, 0xA8, 0xAF, 0x5D, 0xB4, 0xD7,
0x7B, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0xAD, 0xF4, 0xF6, 0xF2, 0xF3, 0xF5,
0x7D, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0xB9, 0xFB, 0xFC, 0xF9, 0xFA, 0xFF,
0x5C, 0xF7, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0xB2, 0xD4, 0xD6, 0xD2, 0xD3, 0xD5,
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0xB3, 0xDB, 0xDC, 0xD9, 0xDA, 0x9F };
#define RAW_ASCII_CHAR(ch) convert_e2a[(unsigned char)ch]
#else /* APR_CHARSET_EBCDIC */
#define RAW_ASCII_CHAR(ch) (ch)
#endif /* !APR_CHARSET_EBCDIC */
/* we assume the folks using this ensure 0 <= c < 256... which means
* you need a cast to (unsigned char) first, you can't just plug a
* char in here and get it to work, because if char is signed then it
@ -171,7 +131,7 @@ static char x2c(const char *what)
xstr[2]=what[0];
xstr[3]=what[1];
xstr[4]='\0';
digit = convert_a2e[0xFF & strtol(xstr, NULL, 16)];
digit = ENCODE_TO_NATIVE[0xFF & strtol(xstr, NULL, 16)];
#endif /*APR_CHARSET_EBCDIC*/
return (digit);
}
@ -756,7 +716,7 @@ APR_DECLARE(apr_status_t) apr_unescape_entity(char *unescaped, const char *str,
size--;
}
else {
*d = RAW_ASCII_CHAR(val);
*d = ENCODE_TO_ASCII(val);
found = 1;
}
}
@ -777,7 +737,7 @@ APR_DECLARE(apr_status_t) apr_unescape_entity(char *unescaped, const char *str,
*d = '&'; /* unknown */
}
else {
*d = RAW_ASCII_CHAR(((const unsigned char *) ents)[j]);
*d = ENCODE_TO_ASCII(((const unsigned char *) ents)[j]);
s += i;
slen -= i;
found = 1;
@ -1181,3 +1141,74 @@ APR_DECLARE(const void *) apr_punescape_hex(apr_pool_t *p, const char *str,
return NULL;
}
APR_DECLARE(apr_status_t) apr_escape_ldap(char *escaped, const void *str,
apr_ssize_t slen, int flags, apr_size_t *len)
{
apr_size_t size = 1;
int found = 0;
const unsigned char *s = (const unsigned char *) str;
unsigned char *d = (unsigned char *) escaped;
unsigned c;
if (s) {
if (d) {
while (((c = *s) && slen) || (slen > 0)) {
if (((flags & APR_ESCAPE_LDAP_DN) && TEST_CHAR(c, T_ESCAPE_LDAP_DN))
|| ((flags & APR_ESCAPE_LDAP_FILTER) && TEST_CHAR(c, T_ESCAPE_LDAP_FILTER))) {
d = c2x(c, '\\', d);
size += 2;
found = 1;
}
else {
*d++ = c;
}
++s;
size++;
slen--;
}
*d = '\0';
}
else {
while (((c = *s) && slen) || (slen > 0)) {
if (((flags & APR_ESCAPE_LDAP_DN) && TEST_CHAR(c, T_ESCAPE_LDAP_DN))
|| ((flags & APR_ESCAPE_LDAP_FILTER) && TEST_CHAR(c, T_ESCAPE_LDAP_FILTER))) {
size += 2;
found = 1;
}
++s;
size++;
slen--;
}
}
}
if (len) {
*len = size;
}
if (!found) {
return APR_NOTFOUND;
}
return APR_SUCCESS;
}
APR_DECLARE(const char *) apr_pescape_ldap(apr_pool_t *p, const void *src,
apr_ssize_t srclen, int flags)
{
apr_size_t len;
switch (apr_escape_ldap(NULL, src, srclen, flags, &len)) {
case APR_SUCCESS: {
char *encoded = apr_palloc(p, len);
apr_escape_ldap(encoded, src, srclen, flags, NULL);
return encoded;
}
case APR_NOTFOUND: {
break;
}
}
return src;
}

View File

@ -41,6 +41,7 @@ static apr_status_t apr_file_transfer_contents(const char *from_path,
return status;
}
perms = finfo.protection;
apr_file_perms_set(to_path, perms); /* ignore any failure */
}
else
perms = to_perms;

View File

@ -24,6 +24,10 @@
#include <limits.h>
#endif
#ifndef NAME_MAX
#define NAME_MAX 255
#endif
static apr_status_t dir_cleanup(void *thedir)
{
apr_dir_t *dir = thedir;
@ -71,14 +75,6 @@ static char *path_remove_last_component (const char *path, apr_pool_t *pool)
apr_status_t apr_dir_open(apr_dir_t **new, const char *dirname,
apr_pool_t *pool)
{
/* On some platforms (e.g., Linux+GNU libc), d_name[] in struct
* dirent is declared with enough storage for the name. On other
* platforms (e.g., Solaris 8 for Intel), d_name is declared as a
* one-byte array. Note: gcc evaluates this at compile time.
*/
apr_size_t dirent_size =
sizeof(*(*new)->entry) +
(sizeof((*new)->entry->d_name) > 1 ? 0 : 255);
DIR *dir = opendir(dirname);
if (!dir) {
@ -90,7 +86,20 @@ apr_status_t apr_dir_open(apr_dir_t **new, const char *dirname,
(*new)->pool = pool;
(*new)->dirname = apr_pstrdup(pool, dirname);
(*new)->dirstruct = dir;
(*new)->entry = apr_pcalloc(pool, dirent_size);
#if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS) \
&& !defined(READDIR_IS_THREAD_SAFE)
/* On some platforms (e.g., Linux+GNU libc), d_name[] in struct
* dirent is declared with enough storage for the name. On other
* platforms (e.g., Solaris 8 for Intel), d_name is declared as a
* one-byte array. Note: gcc evaluates this at compile time.
*/
(*new)->entry = apr_pcalloc(pool, sizeof(*(*new)->entry) +
(sizeof((*new)->entry->d_name) > 1
? 0 : NAME_MAX));
#else
(*new)->entry = NULL;
#endif
apr_pool_cleanup_register((*new)->pool, *new, dir_cleanup,
apr_pool_cleanup_null);

View File

@ -32,8 +32,8 @@ APR_DECLARE(apr_status_t) apr_file_lock(apr_file_t *thefile, int type)
struct flock l = { 0 };
int fc;
l.l_whence = SEEK_SET; /* lock from current point */
l.l_start = 0; /* begin lock at this offset */
l.l_whence = SEEK_SET; /* count l_start from start of file */
l.l_start = 0; /* lock from start of file */
l.l_len = 0; /* lock to end of file */
if ((type & APR_FLOCK_TYPEMASK) == APR_FLOCK_SHARED)
l.l_type = F_RDLCK;
@ -90,8 +90,8 @@ APR_DECLARE(apr_status_t) apr_file_unlock(apr_file_t *thefile)
{
struct flock l = { 0 };
l.l_whence = SEEK_SET; /* lock from current point */
l.l_start = 0; /* begin lock at this offset */
l.l_whence = SEEK_SET; /* count l_start from start of file */
l.l_start = 0; /* lock from start of file */
l.l_len = 0; /* lock to end of file */
l.l_type = F_UNLCK;

View File

@ -176,7 +176,8 @@ APR_DECLARE(apr_status_t) apr_os_pipe_put(apr_file_t **file,
return apr_os_pipe_put_ex(file, thefile, 0, pool);
}
APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in, apr_file_t **out, apr_pool_t *pool)
static apr_status_t file_pipe_create(apr_file_t **in, apr_file_t **out,
apr_pool_t *pool_in, apr_pool_t *pool_out)
{
int filedes[2];
@ -184,8 +185,8 @@ APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in, apr_file_t **out
return errno;
}
(*in) = (apr_file_t *)apr_pcalloc(pool, sizeof(apr_file_t));
(*in)->pool = pool;
(*in) = (apr_file_t *)apr_pcalloc(pool_in, sizeof(apr_file_t));
(*in)->pool = pool_in;
(*in)->filedes = filedes[0];
(*in)->is_pipe = 1;
(*in)->fname = NULL;
@ -200,8 +201,8 @@ APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in, apr_file_t **out
#ifndef WAITIO_USES_POLL
(*in)->pollset = NULL;
#endif
(*out) = (apr_file_t *)apr_pcalloc(pool, sizeof(apr_file_t));
(*out)->pool = pool;
(*out) = (apr_file_t *)apr_pcalloc(pool_out, sizeof(apr_file_t));
(*out)->pool = pool_out;
(*out)->filedes = filedes[1];
(*out)->is_pipe = 1;
(*out)->fname = NULL;
@ -222,6 +223,30 @@ APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in, apr_file_t **out
return APR_SUCCESS;
}
static void file_pipe_block(apr_file_t **in, apr_file_t **out, apr_int32_t blocking)
{
switch (blocking) {
case APR_FULL_BLOCK:
break;
case APR_READ_BLOCK:
apr_file_pipe_timeout_set(*out, 0);
break;
case APR_WRITE_BLOCK:
apr_file_pipe_timeout_set(*in, 0);
break;
default:
apr_file_pipe_timeout_set(*out, 0);
apr_file_pipe_timeout_set(*in, 0);
break;
}
}
APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in,
apr_file_t **out, apr_pool_t *pool)
{
return file_pipe_create(in, out, pool, pool);
}
APR_DECLARE(apr_status_t) apr_file_pipe_create_ex(apr_file_t **in,
apr_file_t **out,
apr_int32_t blocking,
@ -229,23 +254,26 @@ APR_DECLARE(apr_status_t) apr_file_pipe_create_ex(apr_file_t **in,
{
apr_status_t status;
if ((status = apr_file_pipe_create(in, out, pool)) != APR_SUCCESS)
if ((status = file_pipe_create(in, out, pool, pool)) != APR_SUCCESS) {
return status;
switch (blocking) {
case APR_FULL_BLOCK:
break;
case APR_READ_BLOCK:
apr_file_pipe_timeout_set(*out, 0);
break;
case APR_WRITE_BLOCK:
apr_file_pipe_timeout_set(*in, 0);
break;
default:
apr_file_pipe_timeout_set(*out, 0);
apr_file_pipe_timeout_set(*in, 0);
}
file_pipe_block(in, out, blocking);
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_pipe_create_pools(apr_file_t **in,
apr_file_t **out, apr_int32_t blocking, apr_pool_t *pool_in, apr_pool_t *pool_out)
{
apr_status_t status;
if ((status = file_pipe_create(in, out, pool_in, pool_out)) != APR_SUCCESS) {
return status;
}
file_pipe_block(in, out, blocking);
return APR_SUCCESS;
}

View File

@ -387,6 +387,8 @@ APR_DECLARE(apr_status_t) apr_file_datasync(apr_file_t *thefile)
#ifdef HAVE_FDATASYNC
if (fdatasync(thefile->filedes)) {
#elif defined(F_FULLFSYNC)
if (fcntl(thefile->filedes, F_FULLFSYNC)) {
#else
if (fsync(thefile->filedes)) {
#endif

View File

@ -117,6 +117,13 @@ apr_status_t apr_file_trunc(apr_file_t *fp, apr_off_t offset)
/* Reset buffer positions for write mode */
fp->bufpos = fp->direction = fp->dataRead = 0;
}
else if (fp->direction == 0) {
/* Discard the read buffer, as we are about to reposition
* ourselves to the end of file.
*/
fp->bufpos = 0;
fp->dataRead = 0;
}
file_unlock(fp);
if (rc) {
return rc;

View File

@ -93,6 +93,7 @@
#define APR_HAVE_STDLIB_H @stdlibh@
#define APR_HAVE_STRING_H @stringh@
#define APR_HAVE_STRINGS_H @stringsh@
#define APR_HAVE_INTTYPES_H @inttypesh@
#define APR_HAVE_SYS_IOCTL_H @sys_ioctlh@
#define APR_HAVE_SYS_SENDFILE_H @sys_sendfileh@
#define APR_HAVE_SYS_SIGNAL_H @sys_signalh@
@ -168,16 +169,25 @@
#include <sys/socket.h>
#endif
#if defined(__cplusplus) && !defined(__STDC_CONSTANT_MACROS)
#if APR_HAVE_STDINT_H
#ifdef __cplusplus
/* C99 7.18.4 requires that stdint.h only exposes INT64_C
* and UINT64_C for C++ implementations if this is defined: */
#ifndef __STDC_CONSTANT_MACROS
#define __STDC_CONSTANT_MACROS
#endif
#if APR_HAVE_STDINT_H
/* C++ needs this too for PRI*NN formats: */
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif
#endif /* __cplusplus */
#include <stdint.h>
#endif
#if APR_HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#if APR_HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
@ -197,6 +207,13 @@
#endif
#endif
/* __APPLE__ is now the official pre-defined macro for macOS */
#ifdef __APPLE__
#undef DARWIN
#undef DARWIN_10
#define DARWIN
#define DARWIN_10
#endif /* __APPLE__ */
#ifdef __cplusplus
extern "C" {
@ -245,6 +262,7 @@ extern "C" {
#define APR_HAVE_INET_ADDR @have_inet_addr@
#define APR_HAVE_INET_NETWORK @have_inet_network@
#define APR_HAVE_IPV6 @have_ipv6@
#define APR_HAVE_SOCKADDR_UN @have_sockaddr_un@
#define APR_HAVE_MEMMOVE @have_memmove@
#define APR_HAVE_SETRLIMIT @have_setrlimit@
#define APR_HAVE_SIGACTION @have_sigaction@
@ -279,6 +297,7 @@ extern "C" {
#define APR_HAS_LARGE_FILES @aprlfs@
#define APR_HAS_XTHREAD_FILES @apr_has_xthread_files@
#define APR_HAS_OS_UUID @osuuid@
#define APR_HAS_TIMEDLOCKS @apr_has_timedlocks@
#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD @apr_procattr_user_set_requires_password@
@ -333,24 +352,28 @@ typedef unsigned @int_value@ apr_uint32_t;
*/
#ifdef DARWIN_10
#undef APR_SIZEOF_VOIDP
#undef INT64_C
#undef UINT64_C
#undef APR_INT64_C
#undef APR_UINT64_C
#ifdef __LP64__
typedef long apr_int64_t;
typedef unsigned long apr_uint64_t;
#define APR_SIZEOF_VOIDP 8
#define INT64_C(v) (v ## L)
#define UINT64_C(v) (v ## UL)
#define APR_INT64_C(v) (v ## L)
#define APR_UINT64_C(v) (v ## UL)
#else
typedef long long apr_int64_t;
typedef unsigned long long apr_uint64_t;
#define APR_SIZEOF_VOIDP 4
#define INT64_C(v) (v ## LL)
#define UINT64_C(v) (v ## ULL)
#define APR_INT64_C(v) (v ## LL)
#define APR_UINT64_C(v) (v ## ULL)
#endif
#else
typedef @long_value@ apr_int64_t;
typedef unsigned @long_value@ apr_uint64_t;
typedef @int64_value@ apr_int64_t;
typedef @uint64_value@ apr_uint64_t;
/* Mechanisms to properly type numeric literals */
@int64_literal@
@uint64_literal@
#endif
typedef @size_t_value@ apr_size_t;
@ -368,10 +391,6 @@ typedef apr_uint32_t apr_uintptr_t;
/* Are we big endian? */
#define APR_IS_BIGENDIAN @bigendian@
/* Mechanisms to properly type numeric literals */
@int64_literal@
@uint64_literal@
#ifdef INT16_MIN
#define APR_INT16_MIN INT16_MIN
#else

View File

@ -180,6 +180,7 @@ extern "C" {
#else
#define APR_HAVE_IPV6 0
#endif
#define APR_HAVE_SOCKADDR_UN 0
#define APR_HAVE_MEMCHR 1
#define APR_HAVE_MEMMOVE 1
#define APR_HAVE_SETRLIMIT 0
@ -213,6 +214,7 @@ extern "C" {
#define APR_HAS_LARGE_FILES 1
#define APR_HAS_XTHREAD_FILES 0
#define APR_HAS_OS_UUID 0
#define APR_HAS_TIMEDLOCKS 1
#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0

View File

@ -25,7 +25,7 @@
* And please, make an effort to stub apr.hnw and apr.h.in in the process.
*
* This is the Win32 specific version of apr.h. It is copied from
* apr.hw by the apr.dsp and libapr.dsp projects.
* apr.hw by the apr.dsp and libapr.dsp projects.
*/
/**
@ -60,7 +60,9 @@
* C4244: int to char/short - precision loss
* C4514: unreferenced inline function removed
*/
#if defined(_MSC_VER)
#pragma warning(disable: 4100 4127 4163 4201 4514; once: 4057 4075 4244)
#endif
/* Ignore Microsoft's interpretation of secure development
* and the POSIX string handling API
@ -212,25 +214,42 @@
/** @} */
/** @} */
/* We don't include our conditional headers within the doxyblocks
* or the extern "C" namespace
/* We don't include our conditional headers within the doxyblocks
* or the extern "C" namespace
*/
#if APR_HAVE_STDLIB_H
#include <stdlib.h>
#endif
#if APR_HAVE_STDIO_H
#include <stdio.h>
#endif
#if APR_HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#if APR_HAVE_STDDEF_H
#include <stddef.h>
#endif
#if APR_HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#if APR_HAVE_STDINT_H
#include <stdint.h>
#endif
#if APR_HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#if APR_HAVE_TIME_H
#include <time.h>
#endif
#if APR_HAVE_PROCESS_H
#include <process.h>
#endif
@ -261,12 +280,12 @@ extern "C" {
#define APR_USE_SHMEM_MMAP_ANON 0
#define APR_USE_SHMEM_BEOS 0
#define APR_USE_FLOCK_SERIALIZE 0
#define APR_USE_FLOCK_SERIALIZE 0
#define APR_USE_POSIXSEM_SERIALIZE 0
#define APR_USE_SYSVSEM_SERIALIZE 0
#define APR_USE_FCNTL_SERIALIZE 0
#define APR_USE_PROC_PTHREAD_SERIALIZE 0
#define APR_USE_PTHREAD_SERIALIZE 0
#define APR_USE_PROC_PTHREAD_SERIALIZE 0
#define APR_USE_PTHREAD_SERIALIZE 0
#define APR_HAS_FLOCK_SERIALIZE 0
#define APR_HAS_SYSVSEM_SERIALIZE 0
@ -282,7 +301,8 @@ extern "C" {
#define APR_HAVE_IN_ADDR 1
#define APR_HAVE_INET_ADDR 1
#define APR_HAVE_INET_NETWORK 0
#define APR_HAVE_IPV6 0
#define APR_HAVE_IPV6 1
#define APR_HAVE_SOCKADDR_UN 0
#define APR_HAVE_MEMMOVE 1
#define APR_HAVE_SETRLIMIT 0
#define APR_HAVE_SIGACTION 0
@ -319,6 +339,7 @@ extern "C" {
#define APR_HAS_UNICODE_FS 1
#define APR_HAS_PROC_INVOKED 1
#define APR_HAS_OS_UUID 1
#define APR_HAS_TIMEDLOCKS 1
#ifndef _WIN32_WCE
#define APR_HAS_SENDFILE 1
@ -354,7 +375,7 @@ extern "C" {
/* Is the O_NONBLOCK flag inherited from listening sockets?
*/
#define APR_O_NONBLOCK_INHERITED 1
#define APR_O_NONBLOCK_INHERITED 1
/* Typedefs that APR needs. */
@ -626,18 +647,20 @@ typedef int gid_t;
&& (*(const apr_uint32_t *)(const void *)(&(a)->s6_addr[8]) == ntohl(0x0000ffff)))
#endif
#endif /* APR_HAS_IPV6 */
#endif /* APR_HAVE_IPV6 */
#ifdef __cplusplus
}
#endif
/* Done with badly written headers
/* Done with badly written headers, leave 'deprecated CRT' undeprecated
*/
#if defined(_MSC_VER) && _MSC_VER >= 1200
#pragma warning(pop)
#if _MSC_VER >= 1400
#pragma warning(disable: 4996)
#endif
#endif
#endif /* WIN32 */

View File

@ -25,7 +25,7 @@
* And please, make an effort to stub apr.hnw and apr.h.in in the process.
*
* This is the Win32 specific version of apr.h. It is copied from
* apr.hw by the apr.dsp and libapr.dsp projects.
* apr.hw by the apr.dsp and libapr.dsp projects.
*/
/**
@ -60,7 +60,9 @@
* C4244: int to char/short - precision loss
* C4514: unreferenced inline function removed
*/
#if defined(_MSC_VER)
#pragma warning(disable: 4100 4127 4163 4201 4514; once: 4057 4075 4244)
#endif
/* Ignore Microsoft's interpretation of secure development
* and the POSIX string handling API
@ -209,25 +211,42 @@
/** @} */
/** @} */
/* We don't include our conditional headers within the doxyblocks
* or the extern "C" namespace
/* We don't include our conditional headers within the doxyblocks
* or the extern "C" namespace
*/
#if APR_HAVE_STDLIB_H
#include <stdlib.h>
#endif
#if APR_HAVE_STDIO_H
#include <stdio.h>
#endif
#if APR_HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#if APR_HAVE_STDDEF_H
#include <stddef.h>
#endif
#if APR_HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#if APR_HAVE_STDINT_H
#include <stdint.h>
#endif
#if APR_HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#if APR_HAVE_TIME_H
#include <time.h>
#endif
#if APR_HAVE_PROCESS_H
#include <process.h>
#endif
@ -258,12 +277,12 @@ extern "C" {
#define APR_USE_SHMEM_MMAP_ANON 0
#define APR_USE_SHMEM_BEOS 0
#define APR_USE_FLOCK_SERIALIZE 0
#define APR_USE_FLOCK_SERIALIZE 0
#define APR_USE_POSIXSEM_SERIALIZE 0
#define APR_USE_SYSVSEM_SERIALIZE 0
#define APR_USE_FCNTL_SERIALIZE 0
#define APR_USE_PROC_PTHREAD_SERIALIZE 0
#define APR_USE_PTHREAD_SERIALIZE 0
#define APR_USE_PROC_PTHREAD_SERIALIZE 0
#define APR_USE_PTHREAD_SERIALIZE 0
#define APR_HAS_FLOCK_SERIALIZE 0
#define APR_HAS_SYSVSEM_SERIALIZE 0
@ -280,6 +299,7 @@ extern "C" {
#define APR_HAVE_INET_ADDR 1
#define APR_HAVE_INET_NETWORK 0
#define APR_HAVE_IPV6 @apr_have_ipv6_10@
#define APR_HAVE_SOCKADDR_UN 0
#define APR_HAVE_MEMMOVE 1
#define APR_HAVE_SETRLIMIT 0
#define APR_HAVE_SIGACTION 0
@ -316,6 +336,7 @@ extern "C" {
#define APR_HAS_UNICODE_FS 1
#define APR_HAS_PROC_INVOKED 1
#define APR_HAS_OS_UUID 1
#define APR_HAS_TIMEDLOCKS 1
#ifndef _WIN32_WCE
#define APR_HAS_SENDFILE 1
@ -351,7 +372,7 @@ extern "C" {
/* Is the O_NONBLOCK flag inherited from listening sockets?
*/
#define APR_O_NONBLOCK_INHERITED 1
#define APR_O_NONBLOCK_INHERITED 1
/* Typedefs that APR needs. */
@ -623,18 +644,20 @@ typedef int gid_t;
&& (*(const apr_uint32_t *)(const void *)(&(a)->s6_addr[8]) == ntohl(0x0000ffff)))
#endif
#endif /* APR_HAS_IPV6 */
#endif /* APR_HAVE_IPV6 */
#ifdef __cplusplus
}
#endif
/* Done with badly written headers
/* Done with badly written headers, leave 'deprecated CRT' undeprecated
*/
#if defined(_MSC_VER) && _MSC_VER >= 1200
#pragma warning(pop)
#if _MSC_VER >= 1400
#pragma warning(disable: 4996)
#endif
#endif
#endif /* WIN32 */

View File

@ -103,6 +103,16 @@ APR_DECLARE(apr_memnode_t *) apr_allocator_alloc(apr_allocator_t *allocator,
APR_DECLARE(void) apr_allocator_free(apr_allocator_t *allocator,
apr_memnode_t *memnode)
__attribute__((nonnull(1,2)));
/**
* Get the true size that would be allocated for the given size (including
* the header and alignment).
* @param allocator The allocator from which to the memory would be allocated
* @param size The size to align
* @return The aligned size (or zero on apr_size_t overflow)
*/
APR_DECLARE(apr_size_t) apr_allocator_align(apr_allocator_t *allocator,
apr_size_t size);
#include "apr_pools.h"

View File

@ -41,7 +41,7 @@ extern "C" {
* @param p pool
* @return APR_SUCCESS on successful completion
* @remark Programs do NOT need to call this directly. APR will call this
* automatically from apr_initialize.
* automatically from apr_initialize().
* @internal
*/
APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p);
@ -113,6 +113,73 @@ APR_DECLARE(apr_uint32_t) apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint3
*/
APR_DECLARE(apr_uint32_t) apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val);
/*
* Atomic operations on 64-bit values
* Note: Each of these functions internally implements a memory barrier
* on platforms that require it
*/
/**
* atomically read an apr_uint64_t from memory
* @param mem the pointer
*/
APR_DECLARE(apr_uint64_t) apr_atomic_read64(volatile apr_uint64_t *mem);
/**
* atomically set an apr_uint64_t in memory
* @param mem pointer to the object
* @param val value that the object will assume
*/
APR_DECLARE(void) apr_atomic_set64(volatile apr_uint64_t *mem, apr_uint64_t val);
/**
* atomically add 'val' to an apr_uint64_t
* @param mem pointer to the object
* @param val amount to add
* @return old value pointed to by mem
*/
APR_DECLARE(apr_uint64_t) apr_atomic_add64(volatile apr_uint64_t *mem, apr_uint64_t val);
/**
* atomically subtract 'val' from an apr_uint64_t
* @param mem pointer to the object
* @param val amount to subtract
*/
APR_DECLARE(void) apr_atomic_sub64(volatile apr_uint64_t *mem, apr_uint64_t val);
/**
* atomically increment an apr_uint64_t by 1
* @param mem pointer to the object
* @return old value pointed to by mem
*/
APR_DECLARE(apr_uint64_t) apr_atomic_inc64(volatile apr_uint64_t *mem);
/**
* atomically decrement an apr_uint64_t by 1
* @param mem pointer to the atomic value
* @return zero if the value becomes zero on decrement, otherwise non-zero
*/
APR_DECLARE(int) apr_atomic_dec64(volatile apr_uint64_t *mem);
/**
* compare an apr_uint64_t's value with 'cmp'.
* If they are the same swap the value with 'with'
* @param mem pointer to the value
* @param with what to swap it with
* @param cmp the value to compare it to
* @return the old value of *mem
*/
APR_DECLARE(apr_uint64_t) apr_atomic_cas64(volatile apr_uint64_t *mem, apr_uint64_t with,
apr_uint64_t cmp);
/**
* exchange an apr_uint64_t's value with 'val'.
* @param mem pointer to the value
* @param val what to swap it with
* @return the old value of *mem
*/
APR_DECLARE(apr_uint64_t) apr_atomic_xchg64(volatile apr_uint64_t *mem, apr_uint64_t val);
/**
* compare the pointer's value with cmp.
* If they are the same swap the value with 'with'

View File

@ -0,0 +1,292 @@
/* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*/
/**
* @file apr_cstr.h
* @brief C string goodies.
*/
#ifndef APR_CSTR_H
#define APR_CSTR_H
#include <apr.h> /* for apr_size_t */
#include <apr_pools.h> /* for apr_pool_t */
#include <apr_tables.h> /* for apr_array_header_t */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/**
* @defgroup apr_cstr C (POSIX) locale string functions
* @ingroup apr_strings
*
* The apr_cstr_* functions provide traditional C char * string text handling,
* and notabilty they treat all text in the C (a.k.a. POSIX) locale using the
* minimal POSIX character set, represented in either ASCII or a corresponding
* EBCDIC subset.
*
* Character values outside of that set are treated as opaque bytes, and all
* multi-byte character sequences are handled as individual distinct octets.
*
* Multi-byte characters sequences whose octets fall in the ASCII range cause
* unexpected results, such as in the ISO-2022-JP code page where ASCII octets
* occur within both shift-state and multibyte sequences.
*
* In the case of the UTF-8 encoding, all multibyte characters all fall outside
* of the C/POSIX range of characters, so these functions are generally safe
* to use on UTF-8 strings. The programmer must be aware that each octet may
* not represent a distinct printable character in such encodings.
*
* The standard C99/POSIX string functions, rather than apr_cstr, should be
* used in all cases where the current locale and encoding of the text is
* significant.
* @{
*/
/** Divide @a input into substrings, interpreting any char from @a sep
* as a token separator.
*
* Return an array of copies of those substrings (plain const char*),
* allocating both the array and the copies in @a pool.
*
* None of the elements added to the array contain any of the
* characters in @a sep_chars, and none of the new elements are empty
* (thus, it is possible that the returned array will have length
* zero).
*
* If @a chop_whitespace is TRUE, then remove leading and trailing
* whitespace from the returned strings.
*
* @since New in 1.6
*/
APR_DECLARE(apr_array_header_t *) apr_cstr_split(const char *input,
const char *sep_chars,
int chop_whitespace,
apr_pool_t *pool);
/** Like apr_cstr_split(), but append to existing @a array instead of
* creating a new one. Allocate the copied substrings in @a pool
* (i.e., caller decides whether or not to pass @a array->pool as @a pool).
*
* @since New in 1.6
*/
APR_DECLARE(void) apr_cstr_split_append(apr_array_header_t *array,
const char *input,
const char *sep_chars,
int chop_whitespace,
apr_pool_t *pool);
/** Return @c TRUE iff @a str matches any of the elements of @a list, a list
* of zero or more glob patterns.
*
* @since New in 1.6
*/
APR_DECLARE(int) apr_cstr_match_glob_list(const char *str,
const apr_array_header_t *list);
/** Return @c TRUE iff @a str exactly matches any of the elements of @a list.
*
* @since New in 1.6
*/
APR_DECLARE(int) apr_cstr_match_list(const char *str,
const apr_array_header_t *list);
/**
* Get the next token from @a *str interpreting any char from @a sep as a
* token separator. Separators at the beginning of @a str will be skipped.
* Returns a pointer to the beginning of the first token in @a *str or NULL
* if no token is left. Modifies @a str such that the next call will return
* the next token.
*
* @note The content of @a *str may be modified by this function.
*
* @since New in 1.6.
*/
APR_DECLARE(char *) apr_cstr_tokenize(const char *sep, char **str);
/**
* Return the number of line breaks in @a msg, allowing any kind of newline
* termination (CR, LF, CRLF, or LFCR), even inconsistent.
*
* @since New in 1.6.
*/
APR_DECLARE(int) apr_cstr_count_newlines(const char *msg);
#if 0 /* XXX: stringbuf logic is not present in APR */
/**
* Return a cstring which is the concatenation of @a strings (an array
* of char *) each followed by @a separator (that is, @a separator
* will also end the resulting string). Allocate the result in @a pool.
* If @a strings is empty, then return the empty string.
*
* @since New in 1.6.
*/
APR_DECLARE(char *) apr_cstr_join(const apr_array_header_t *strings,
const char *separator,
apr_pool_t *pool);
#endif
/**
* Perform a case-insensitive comparison of two strings @a atr1 and @a atr2,
* treating upper and lower case values of the 26 standard C/POSIX alphabetic
* characters as equivalent. Extended latin characters outside of this set
* are treated as unique octets, irrespective of the current locale.
*
* Returns in integer greater than, equal to, or less than 0,
* according to whether @a str1 is considered greater than, equal to,
* or less than @a str2.
*
* @since New in 1.6.
*/
APR_DECLARE(int) apr_cstr_casecmp(const char *str1, const char *str2);
/**
* Perform a case-insensitive comparison of two strings @a atr1 and @a atr2,
* treating upper and lower case values of the 26 standard C/POSIX alphabetic
* characters as equivalent. Extended latin characters outside of this set
* are treated as unique octets, irrespective of the current locale.
*
* Returns in integer greater than, equal to, or less than 0,
* according to whether @a str1 is considered greater than, equal to,
* or less than @a str2.
*
* @since New in 1.6.
*/
APR_DECLARE(int) apr_cstr_casecmpn(const char *str1,
const char *str2,
apr_size_t n);
/**
* Parse the C string @a str into a 64 bit number, and return it in @a *n.
* Assume that the number is represented in base @a base.
* Raise an error if conversion fails (e.g. due to overflow), or if the
* converted number is smaller than @a minval or larger than @a maxval.
*
* Leading whitespace in @a str is skipped in a locale-dependent way.
* After that, the string may contain an optional '+' (positive, default)
* or '-' (negative) character, followed by an optional '0x' prefix if
* @a base is 0 or 16, followed by numeric digits appropriate for the base.
* If there are any more characters after the numeric digits, an error is
* returned.
*
* If @a base is zero, then a leading '0x' or '0X' prefix means hexadecimal,
* else a leading '0' means octal (implemented, though not documented, in
* apr_strtoi64() in APR 0.9.0 through 1.5.0), else use base ten.
*
* @since New in 1.6.
*/
APR_DECLARE(apr_status_t) apr_cstr_strtoi64(apr_int64_t *n, const char *str,
apr_int64_t minval,
apr_int64_t maxval,
int base);
/**
* Parse the C string @a str into a 64 bit number, and return it in @a *n.
* Assume that the number is represented in base 10.
* Raise an error if conversion fails (e.g. due to overflow).
*
* The behaviour otherwise is as described for apr_cstr_strtoi64().
*
* @since New in 1.6.
*/
APR_DECLARE(apr_status_t) apr_cstr_atoi64(apr_int64_t *n, const char *str);
/**
* Parse the C string @a str into a 32 bit number, and return it in @a *n.
* Assume that the number is represented in base 10.
* Raise an error if conversion fails (e.g. due to overflow).
*
* The behaviour otherwise is as described for apr_cstr_strtoi64().
*
* @since New in 1.6.
*/
APR_DECLARE(apr_status_t) apr_cstr_atoi(int *n, const char *str);
/**
* Parse the C string @a str into an unsigned 64 bit number, and return
* it in @a *n. Assume that the number is represented in base @a base.
* Raise an error if conversion fails (e.g. due to overflow), or if the
* converted number is smaller than @a minval or larger than @a maxval.
*
* Leading whitespace in @a str is skipped in a locale-dependent way.
* After that, the string may contain an optional '+' (positive, default)
* or '-' (negative) character, followed by an optional '0x' prefix if
* @a base is 0 or 16, followed by numeric digits appropriate for the base.
* If there are any more characters after the numeric digits, an error is
* returned.
*
* If @a base is zero, then a leading '0x' or '0X' prefix means hexadecimal,
* else a leading '0' means octal (as implemented, though not documented, in
* apr_strtoi64(), else use base ten.
*
* @warning The implementation returns APR_ERANGE if the parsed number
* is greater than APR_INT64_MAX, even if it is not greater than @a maxval.
*
* @since New in 1.6.
*/
APR_DECLARE(apr_status_t) apr_cstr_strtoui64(apr_uint64_t *n, const char *str,
apr_uint64_t minval,
apr_uint64_t maxval,
int base);
/**
* Parse the C string @a str into an unsigned 64 bit number, and return
* it in @a *n. Assume that the number is represented in base 10.
* Raise an error if conversion fails (e.g. due to overflow).
*
* The behaviour otherwise is as described for apr_cstr_strtoui64(),
* including the upper limit of APR_INT64_MAX.
*
* @since New in 1.6.
*/
APR_DECLARE(apr_status_t) apr_cstr_atoui64(apr_uint64_t *n, const char *str);
/**
* Parse the C string @a str into an unsigned 32 bit number, and return
* it in @a *n. Assume that the number is represented in base 10.
* Raise an error if conversion fails (e.g. due to overflow).
*
* The behaviour otherwise is as described for apr_cstr_strtoui64(),
* including the upper limit of APR_INT64_MAX.
*
* @since New in 1.6.
*/
APR_DECLARE(apr_status_t) apr_cstr_atoui(unsigned int *n, const char *str);
/**
* Skip the common prefix @a prefix from the C string @a str, and return
* a pointer to the next character after the prefix.
* Return @c NULL if @a str does not start with @a prefix.
*
* @since New in 1.6.
*/
APR_DECLARE(const char *) apr_cstr_skip_prefix(const char *str,
const char *prefix);
/** @} */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* SVN_STRING_H */

View File

@ -0,0 +1,569 @@
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file apr_encode.h
* @brief APR-UTIL Encoding
*/
#ifndef APR_ENCODE_H
#define APR_ENCODE_H
#include "apr.h"
#include "apr_general.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @defgroup APR_Util_Encode Base64/Base64Url/Base32/Base32Hex/Base16 Encoding
* @ingroup APR_Util
* @{
*/
/**
* RFC4648 and RFC7515 compliant BASE64, BASE64URL, BASE32, BASE32HEX
* and BASE16 encode/decode functions.
*
* The following encodings are supported:
*
* - Base 64 Encoding
*
* o Use flag APR_ENCODE_NONE
* o https://tools.ietf.org/html/rfc4648#section-4
*
* - Base 64 Encoding with URL and Filename Safe Alphabet
*
* o Use flag APR_ENCODE_URL
* o https://tools.ietf.org/html/rfc4648#section-5
*
* - Base 64 URL Encoding without Padding
*
* o Use flag APR_ENCODE_BASE64URL
* o https://tools.ietf.org/html/rfc7515#appendix-C
*
* - Base 32 Encoding
*
* o Use flag APR_ENCODE_NONE
* o https://tools.ietf.org/html/rfc4648#section-6
*
* - Base 32 Encoding with Extended Hex Alphabet
*
* o Use flag APR_ENCODE_BASE32HEX
* o https://tools.ietf.org/html/rfc4648#section-7
*
* - Base 16 Encoding
*
* o Use flags APR_ENCODE_NONE/APR_ENCODE_COLON
* o https://tools.ietf.org/html/rfc4648#section-8
*
* If a non valid character of any kind including whitespace is passed to any
* of the decoder functions, APR_BADCH will be returned. In this case decoding
* will still take place, but the results can not be trusted.
*
* If APR_ENCODE_RELAXED is passed to the decoder functions, decoding will be
* attempted up until the first non valid character. If this results in an
* invalid state in the decoder, such as but not limited to an odd number of
* base16 characters, APR_BADCH will still be returned.
*
* If APR_ENCODE_RELAXED is not passed to a decoder function, the decoding will
* be done in constant time regardless of whether the result returns APR_SUCCESS
* or APR_BADCH.
*
* If the dest parameter is NULL, the maximum theoretical buffer size is
* returned in the len field, including space for a terminating zero character
* if the destination is a string. This value can be used to allocate buffers
* of a suitable safe size.
*
* If the dest parameter is provided, the encoding or decoding will take place,
* and the actual number of characters written is returned in the len field,
* ignoring any terminating zero.
*
* Plain strings are not assumed '\0' terminated unless APR_ENCODE_STRING is
* provided.
*
*/
/**
* When passing a string to one of the encode functions, this value can be
* passed to indicate a string-valued key, and have the length computed
* automatically.
*/
#define APR_ENCODE_STRING (-1)
/**
* Generate RFC4648 base16/base32/base64.
*/
#define APR_ENCODE_NONE 0
/**
* If relaxed, decode up until the first non base16/base32/base64 character.
*/
#define APR_ENCODE_RELAXED 1
/**
* Omit the padding character (=) while encoding.
*/
#define APR_ENCODE_NOPADDING 2
/**
* Generate RFC4648 Base 64 Encoding with URL and Filename Safe Alphabet
*/
#define APR_ENCODE_URL 4
/**
* Generate RFC7515 BASE64URL
*/
#define APR_ENCODE_BASE64URL (APR_ENCODE_NOPADDING | APR_ENCODE_URL)
/**
* Generate base32hex encoding instead of base32 encoding
*/
#define APR_ENCODE_BASE32HEX 8
/**
* Generate base16 with colons between each token.
*/
#define APR_ENCODE_COLON 16
/**
* Generate base16 with lower case characters.
*/
#define APR_ENCODE_LOWER 32
/**
* Convert text data to base64.
* @param dest The destination string, can be NULL.
* @param src The original string.
* @param slen The length of the original string, or APR_ENCODE_STRING if
* NUL terminated.
* @param flags If APR_ENCODE_NONE, emit RFC4648 Base 64 Encoding. If
* APR_ENCODE_NOPADDING, omit the = padding character. If APR_ENCODE_URL,
* use RFC4648 Base 64 Encoding with URL and Filename Safe Alphabet.
* If APR_ENCODE_BASE64URL, use RFC7515 base64url Encoding.
* @param len If present and src is NULL, returns the maximum possible length
* of the destination string, including a zero pad. If present and src is
* not NULL, returns the number of characters actually written.
* @return APR_SUCCESS, or APR_NOTFOUND if the string was NULL.
*/
APR_DECLARE(apr_status_t) apr_encode_base64(char *dest, const char *src,
apr_ssize_t slen, int flags, apr_size_t * len);
/**
* Convert binary data to base64.
* @param dest The destination string, can be NULL.
* @param src The original buffer.
* @param slen The length of the original buffer.
* @param flags If APR_ENCODE_NONE, emit RFC4648 Base 64 Encoding. If
* APR_ENCODE_NOPADDING, omit the = padding character. If APR_ENCODE_URL,
* use RFC4648 Base 64 Encoding with URL and Filename Safe Alphabet.
* If APR_ENCODE_BASE64URL, use RFC7515 base64url Encoding.
* @param len If present and src is NULL, returns the maximum possible length
* of the destination string, including a zero pad. If present and src is
* not NULL, returns the number of characters actually written.
* @return APR_SUCCESS, or APR_NOTFOUND if the string was NULL.
*/
APR_DECLARE(apr_status_t) apr_encode_base64_binary(char *dest, const unsigned char *src,
apr_ssize_t slen, int flags, apr_size_t * len);
/**
* Convert text data to base64, and return the results from a pool.
* @param p Pool to allocate from.
* @param src The original string.
* @param slen The length of the original string, or APR_ENCODE_STRING if
* NUL terminated.
* @param flags If APR_ENCODE_NONE, emit RFC4648 Base 64 Encoding. If
* APR_ENCODE_NOPADDING, omit the = padding character. If APR_ENCODE_URL,
* use RFC4648 Base 64 Encoding with URL and Filename Safe Alphabet.
* If APR_ENCODE_BASE64URL, use RFC7515 base64url Encoding.
* @param len If present, returns the number of characters written excluding
* the zero pad.
* @return A zero padded string allocated from the pool on success, or
* NULL if src was NULL.
*/
APR_DECLARE(const char *)apr_pencode_base64(apr_pool_t * p, const char *src,
apr_ssize_t slen, int flags, apr_size_t * len)__attribute__((nonnull(1)));
/**
* Convert binary data to base64, and return the results from a pool.
* @param p Pool to allocate from.
* @param src The original buffer.
* @param slen The length of the original buffer.
* @param flags If APR_ENCODE_NONE, emit RFC4648 Base 64 Encoding. If
* APR_ENCODE_NOPADDING, omit the = padding character. If APR_ENCODE_URL,
* use RFC4648 Base 64 Encoding with URL and Filename Safe Alphabet.
* If APR_ENCODE_BASE64URL, use RFC7515 base64url Encoding.
* @param len If present, returns the number of characters written excluding
* the zero pad.
* @return A zero padded string allocated from the pool on success, or
* NULL if src was NULL.
*/
APR_DECLARE(const char *)apr_pencode_base64_binary(apr_pool_t * p, const unsigned char *src,
apr_ssize_t slen, int flags, apr_size_t * len)__attribute__((nonnull(1)));
/**
* Convert base64 or base64url with or without padding to text data.
* @param dest The destination string, can be NULL.
* @param src The original string.
* @param slen The length of the original string, or APR_ENCODE_STRING if
* NUL terminated.
* @param flags If APR_ENCODE_NONE, attempt to decode the full original buffer,
* and return NULL if any bad character is detected. If APR_ENCODE_RELAXED,
* decode until the first non base64/base64url character.
* @param len If present and src is NULL, returns the maximum possible length
* of the destination string, including a zero pad. If present and src is
* not NULL, returns the number of characters actually written.
* @return APR_SUCCESS, or APR_NOTFOUND if the string was NULL, or APR_BADCH
* if a non hex character is present.
*/
APR_DECLARE(apr_status_t) apr_decode_base64(char *dest, const char *src,
apr_ssize_t slen, int flags, apr_size_t * len);
/**
* Convert base64 or base64url with or without padding to binary data.
* @param dest The destination buffer, can be NULL.
* @param src The original string.
* @param slen The length of the original string, or APR_ENCODE_STRING if
* NUL terminated.
* @param flags If APR_ENCODE_NONE, attempt to decode the full original buffer,
* and return NULL if any bad character is detected. If APR_ENCODE_RELAXED,
* decode until the first non base64/base64url character.
* @param len If present and src is NULL, returns the maximum possible length
* of the destination buffer, including a zero pad. If present and src is
* not NULL, returns the number of characters actually written.
* @return APR_SUCCESS, or APR_NOTFOUND if the src was NULL, or APR_BADCH
* if a non base64 character is present.
*/
APR_DECLARE(apr_status_t) apr_decode_base64_binary(unsigned char *dest,
const char *src, apr_ssize_t slen, int flags, apr_size_t * len);
/**
* Convert base64 or base64url with or without padding to text data, and
* return the results from a pool.
* @param p Pool to allocate from.
* @param src The base64 string to decode.
* @param slen The length of the base64 string, or APR_ENCODE_STRING if
* NUL terminated.
* @param flags If APR_ENCODE_NONE, attempt to decode the full original buffer,
* and return NULL if any bad character is detected. If APR_ENCODE_RELAXED,
* decode until the first non base64/base64url character.
* @param len If present, returns the number of characters written, excluding
* the zero padding.
* @return A string allocated from the pool containing the result with a zero
* pad. If src was NULL, or an error occurred, NULL is returned.
*/
APR_DECLARE(const char *)apr_pdecode_base64(apr_pool_t * p, const char *src,
apr_ssize_t slen, int flags, apr_size_t * len)
__attribute__((nonnull(1)));
/**
* Convert base64 or base64url with or without padding to binary data, and
* return the results from a pool.
* @param p Pool to allocate from.
* @param src The original string.
* @param slen The length of the original string, or APR_ENCODE_STRING if
* NUL terminated.
* @param flags If APR_ENCODE_NONE, attempt to decode the full original buffer,
* and return NULL if any bad character is detected. If APR_ENCODE_RELAXED,
* decode until the first non base64/base64url character.
* @param len If present, returns the number of characters written, excluding
* the zero padding.
* @return A buffer allocated from the pool containing the result with a zero
* pad. If src was NULL, or an error occurred, NULL is returned.
*/
APR_DECLARE(const unsigned char *)apr_pdecode_base64_binary(apr_pool_t * p,
const char *src, apr_ssize_t slen, int flags, apr_size_t * len)
__attribute__((nonnull(1)));
/**
* Convert text data to base32.
* @param dest The destination string, can be NULL.
* @param src The original string.
* @param slen The length of the original string, or APR_ENCODE_STRING if
* NUL terminated.
* @param flags If APR_ENCODE_NONE, emit RFC4648 Base 32 Encoding. If
* APR_ENCODE_NOPADDING, omit the = padding character. If APR_ENCODE_BASE32HEX,
* use RFC4648 base32hex Encoding.
* @param len If present and src is NULL, returns the maximum possible length
* of the destination string, including a zero pad. If present and src is
* not NULL, returns the number of characters actually written.
* @return APR_SUCCESS, or APR_NOTFOUND if the string was NULL.
*/
APR_DECLARE(apr_status_t) apr_encode_base32(char *dest, const char *src,
apr_ssize_t slen, int flags, apr_size_t * len);
/**
* Convert binary data to base32.
* @param dest The destination string, can be NULL.
* @param src The original buffer.
* @param slen The length of the original buffer.
* @param flags If APR_ENCODE_NONE, emit RFC4648 Base 32 Encoding. If
* APR_ENCODE_NOPADDING, omit the = padding character. If APR_ENCODE_BASE32HEX,
* use RFC4648 base32hex Encoding.
* @param len If present and src is NULL, returns the maximum possible length
* of the destination string, including a zero pad. If present and src is
* not NULL, returns the number of characters actually written.
* @return APR_SUCCESS, or APR_NOTFOUND if the string was NULL.
*/
APR_DECLARE(apr_status_t) apr_encode_base32_binary(char *dest, const unsigned char *src,
apr_ssize_t slen, int flags, apr_size_t * len);
/**
* Convert text data to base32, and return the results from a pool.
* @param p Pool to allocate from.
* @param src The original string.
* @param slen The length of the original string, or APR_ENCODE_STRING if
* NUL terminated.
* @param flags If APR_ENCODE_NONE, emit RFC4648 Base 32 Encoding. If
* APR_ENCODE_NOPADDING, omit the = padding character. If APR_ENCODE_BASE32HEX,
* use RFC4648 base32hex Encoding.
* @param len If present, returns the number of characters written excluding
* the zero pad.
* @return A zero padded string allocated from the pool on success, or
* NULL if src was NULL.
*/
APR_DECLARE(const char *)apr_pencode_base32(apr_pool_t * p, const char *src,
apr_ssize_t slen, int flags, apr_size_t * len)
__attribute__((nonnull(1)));
/**
* Convert binary data to base32, and return the results from a pool.
* @param p Pool to allocate from.
* @param src The original buffer.
* @param slen The length of the original buffer.
* @param flags If APR_ENCODE_NONE, emit RFC4648 Base 32 Encoding. If
* APR_ENCODE_NOPADDING, omit the = padding character. If APR_ENCODE_BASE32HEX,
* use RFC7515 base32hex Encoding.
* @param len If present, returns the number of characters written excluding
* the zero pad.
* @return A zero padded string allocated from the pool on success, or
* NULL if src was NULL.
*/
APR_DECLARE(const char *)apr_pencode_base32_binary(apr_pool_t * p, const unsigned char *src,
apr_ssize_t slen, int flags, apr_size_t * len)
__attribute__((nonnull(1)));
/**
* Convert base32 or base32hex with or without padding to text data.
* @param dest The destination string, can be NULL.
* @param src The original string.
* @param slen The length of the original string, or APR_ENCODE_STRING if
* NUL terminated.
* @param flags If APR_ENCODE_NONE, parse RFC4648 Base 32 Encoding. If
* APR_ENCODE_BASE32HEX, use RFC4648 base32hex Encoding.
* @param len If present and src is NULL, returns the maximum possible length
* of the destination buffer, including a zero pad. If present and src is
* not NULL, returns the number of characters actually written.
* @return APR_SUCCESS, or APR_NOTFOUND if the string was NULL, or APR_BADCH
* if a non base32 character is present.
*/
APR_DECLARE(apr_status_t) apr_decode_base32(char *dest, const char *src,
apr_ssize_t slen, int flags, apr_size_t * len);
/**
* Convert base32 or base32hex with or without padding to binary data.
* @param dest The destination buffer, can be NULL.
* @param src The original string.
* @param slen The length of the original string, or APR_ENCODE_STRING if
* NUL terminated.
* @param flags If APR_ENCODE_NONE, parse RFC4648 Base 32 Encoding. If
* APR_ENCODE_BASE32HEX, use RFC4648 base32hex Encoding.
* @param len If present and src is NULL, returns the maximum possible length
* of the destination buffer, including a zero pad. If present and src is
* not NULL, returns the number of characters actually written.
* @return APR_SUCCESS, or APR_NOTFOUND if the src was NULL, or APR_BADCH
* if a non base32 character is present.
*/
APR_DECLARE(apr_status_t) apr_decode_base32_binary(unsigned char *dest,
const char *src, apr_ssize_t slen, int flags, apr_size_t * len);
/**
* Convert base32 or base32hex with or without padding to text data, and
* return the results from a pool.
* @param p Pool to allocate from.
* @param src The base32 string to decode.
* @param slen The length of the base32 string, or APR_ENCODE_STRING if
* NUL terminated.
* @param flags If APR_ENCODE_NONE, parse RFC4648 Base 32 Encoding. If
* APR_ENCODE_BASE32HEX, use RFC4648 base32hex Encoding.
* @param len If present, returns the number of characters written, excluding
* the zero padding.
* @return A string allocated from the pool containing the result with a zero
* pad. If src was NULL, or an error occurred, NULL is returned.
*/
APR_DECLARE(const char *)apr_pdecode_base32(apr_pool_t * p, const char *src,
apr_ssize_t slen, int flags, apr_size_t * len)
__attribute__((nonnull(1)));
/**
* Convert base32 or base32hex with or without padding to binary data, and
* return the results from a pool.
* @param p Pool to allocate from.
* @param src The original string.
* @param slen The length of the original string, or APR_ENCODE_STRING if
* NUL terminated.
* @param flags If APR_ENCODE_NONE, parse RFC4648 Base 32 Encoding. If
* APR_ENCODE_BASE32HEX, use RFC4648 base32hex Encoding.
* @param len If present, returns the number of characters written, excluding
* the zero padding.
* @return A buffer allocated from the pool containing the result with a zero
* pad. If src was NULL, or an error occurred, NULL is returned.
*/
APR_DECLARE(const unsigned char *)apr_pdecode_base32_binary(apr_pool_t * p,
const char *src, apr_ssize_t slen, int flags, apr_size_t * len)
__attribute__((nonnull(1)));
/**
* Convert text data to base16 (hex).
* @param dest The destination string, can be NULL.
* @param src The original string.
* @param slen The length of the original string, or APR_ENCODE_STRING if
* NUL terminated.
* @param flags If APR_ENCODE_NONE, emit RFC4648 Base 16 Encoding. If
* APR_ENCODE_COLON, separate each token with a colon.
* @param len If present and src is NULL, returns the maximum possible length
* of the destination buffer, including a zero pad. If present and src is
* not NULL, returns the number of characters actually written.
* @return APR_SUCCESS, or APR_NOTFOUND if the string was NULL.
*/
APR_DECLARE(apr_status_t) apr_encode_base16(char *dest, const char *src,
apr_ssize_t slen, int flags, apr_size_t * len);
/**
* Convert binary data to base16 (hex).
* @param dest The destination string, can be NULL.
* @param src The original buffer.
* @param slen The length of the original buffer.
* @param flags If APR_ENCODE_NONE, emit RFC4648 Base 16 Encoding. If
* APR_ENCODE_COLON, separate each token with a colon.
* @param len If present and src is NULL, returns the maximum possible length
* of the destination buffer, including a zero pad. If present and src is
* not NULL, returns the number of characters actually written.
* @return APR_SUCCESS, or APR_NOTFOUND if the string was NULL.
*/
APR_DECLARE(apr_status_t) apr_encode_base16_binary(char *dest,
const unsigned char *src, apr_ssize_t slen, int flags,
apr_size_t * len);
/**
* Convert text data to base16 (hex), and return the results from a
* pool.
* @param p Pool to allocate from.
* @param src The original string.
* @param slen The length of the original string, or APR_ENCODE_STRING if
* NUL terminated.
* @param flags If APR_ENCODE_NONE, emit RFC4648 Base 16 Encoding. If
* APR_ENCODE_COLON, separate each token with a colon.
* @param len If present, returns the number of characters written, excluding
* the zero padding.
* @return A string allocated from the pool containing the result with a zero
* pad. If src was NULL, or an error occurred, NULL is returned.
*/
APR_DECLARE(const char *)apr_pencode_base16(apr_pool_t * p, const char *src,
apr_ssize_t slen, int flags, apr_size_t * len)
__attribute__((nonnull(1)));
/**
* Convert binary data to base16 (hex), and return the results from a
* pool.
* @param p Pool to allocate from.
* @param src The original buffer.
* @param slen The length of the original buffer.
* @param flags If APR_ENCODE_NONE, emit RFC4648 Base 16 Encoding. If
* APR_ENCODE_COLON, separate each token with a colon.
* @param len If present, returns the number of characters written, excluding
* the zero padding.
* @return A string allocated from the pool containing the result with a zero
* pad. If src was NULL, or an error occurred, NULL is returned.
*/
APR_DECLARE(const char *)apr_pencode_base16_binary(apr_pool_t * p,
const unsigned char *src, apr_ssize_t slen,
int flags, apr_size_t * len)__attribute__((nonnull(1)));
/**
* Convert base16 (hex) to text data.
* @param dest The destination string, can be NULL.
* @param src The original string.
* @param slen The length of the original string, or APR_ENCODE_STRING if
* NUL terminated.
* @param flags If APR_ENCODE_NONE, parse RFC4648 Base 16 Encoding. If
* APR_ENCODE_COLON, allow tokens to be separated with a colon.
* @param len If present and src is NULL, returns the maximum possible length
* of the destination buffer, including a zero pad. If present and src is
* not NULL, returns the number of characters actually written.
* @return APR_SUCCESS, or APR_NOTFOUND if the string was NULL, or APR_BADCH
* if a non hex character is present. A zero pad is appended to the buffer.
*/
APR_DECLARE(apr_status_t) apr_decode_base16(char *dest, const char *src,
apr_ssize_t slen, int flags, apr_size_t * len);
/**
* Convert base16 (hex) to binary data.
* @param dest The destination buffer, can be NULL.
* @param src The original string.
* @param slen The length of the original string, or APR_ENCODE_STRING if
* NUL terminated.
* @param flags If APR_ENCODE_NONE, parse RFC4648 Base 16 Encoding. If
* APR_ENCODE_COLON, allow tokens to be separated with a colon.
* @param len If present and src is NULL, returns the maximum possible length
* of the destination buffer, including a zero pad. If present and src is
* not NULL, returns the number of characters actually written.
* @return APR_SUCCESS, or APR_NOTFOUND if the string was NULL, or APR_BADCH
* if a non hex character is present. No zero pad is written to the buffer.
*/
APR_DECLARE(apr_status_t) apr_decode_base16_binary(unsigned char *dest,
const char *src, apr_ssize_t slen, int flags, apr_size_t * len);
/**
* Convert base16 (hex) and return the results from a pool.
* @param p Pool to allocate from.
* @param src The original string.
* @param slen The length of the original string, or APR_ENCODE_STRING if
* NUL terminated.
* @param flags If APR_ENCODE_NONE, parse RFC4648 Base 16 Encoding. If
* APR_ENCODE_COLON, allow tokens to be separated with a colon.
* @param len If present, returns the number of characters written, excluding
* the zero padding.
* @return A buffer allocated from the pool containing the result with a zero
* pad. If src was NULL, or an error occurred, NULL is returned.
*/
APR_DECLARE(const char *)apr_pdecode_base16(apr_pool_t * p, const char *src,
apr_ssize_t slen, int flags, apr_size_t * len)
__attribute__((nonnull(1)));
/**
* Convert base16 (hex) to binary data, and return the results from a pool.
* @param p Pool to allocate from.
* @param src The original string.
* @param slen The length of the original string, or APR_ENCODE_STRING if
* NUL terminated.
* @param flags If APR_ENCODE_NONE, parse RFC4648 Base 16 Encoding. If
* APR_ENCODE_COLON, allow tokens to be separated with a colon.
* @param len If present, returns the number of characters written, excluding
* the zero padding.
* @return A buffer allocated from the pool containing the result with a zero
* pad. If src was NULL, or an error occurred, NULL is returned.
*/
APR_DECLARE(const unsigned char *)apr_pdecode_base16_binary(apr_pool_t * p,
const char *src, apr_ssize_t slen, int flags, apr_size_t * len)
__attribute__((nonnull(1)));
/** @} */
#ifdef __cplusplus
}
#endif
#endif /* !APR_ENCODE_H */

View File

@ -833,6 +833,20 @@ APR_DECLARE(char *) apr_strerror(apr_status_t statcode, char *buf,
#define APR_EAFNOSUPPORT (APR_OS_START_CANONERR + 27)
#endif
/** @see APR_STATUS_IS_EOPNOTSUPP */
#ifdef EOPNOTSUPP
#define APR_EOPNOTSUPP EOPNOTSUPP
#else
#define APR_EOPNOTSUPP (APR_OS_START_CANONERR + 28)
#endif
/** @see APR_STATUS_IS_ERANGE */
#ifdef ERANGE
#define APR_ERANGE ERANGE
#else
#define APR_ERANGE (APR_OS_START_CANONERR + 29)
#endif
/** @} */
#if defined(OS2) && !defined(DOXYGEN)
@ -977,6 +991,9 @@ APR_DECLARE(char *) apr_strerror(apr_status_t statcode, char *buf,
|| (s) == APR_OS_START_SYSERR + ERROR_ACCESS_DENIED)
#define APR_STATUS_IS_EAFNOSUPPORT(s) ((s) == APR_AFNOSUPPORT \
|| (s) == APR_OS_START_SYSERR + SOCEAFNOSUPPORT)
#define APR_STATUS_IS_EOPNOTSUPP(s) ((s) == APR_EOPNOTSUPP \
|| (s) == APR_OS_START_SYSERR + SOCEOPNOTSUPP)
#define APR_STATUS_IS_ERANGE(s) ((s) == APR_ERANGE)
/*
Sorry, too tired to wrap this up for OS2... feel free to
@ -990,7 +1007,6 @@ APR_DECLARE(char *) apr_strerror(apr_status_t statcode, char *buf,
{ SOCENOPROTOOPT, ENOPROTOOPT },
{ SOCEPROTONOSUPPORT, EPROTONOSUPPORT },
{ SOCESOCKTNOSUPPORT, ESOCKTNOSUPPORT },
{ SOCEOPNOTSUPP, EOPNOTSUPP },
{ SOCEPFNOSUPPORT, EPFNOSUPPORT },
{ SOCEADDRINUSE, EADDRINUSE },
{ SOCEADDRNOTAVAIL, EADDRNOTAVAIL },
@ -1122,6 +1138,9 @@ APR_DECLARE(char *) apr_strerror(apr_status_t statcode, char *buf,
|| (s) == APR_OS_START_SYSERR + ERROR_DIR_NOT_EMPTY)
#define APR_STATUS_IS_EAFNOSUPPORT(s) ((s) == APR_EAFNOSUPPORT \
|| (s) == APR_OS_START_SYSERR + WSAEAFNOSUPPORT)
#define APR_STATUS_IS_EOPNOTSUPP(s) ((s) == APR_EOPNOTSUPP \
|| (s) == APR_OS_START_SYSERR + WSAEOPNOTSUPP)
#define APR_STATUS_IS_ERANGE(s) ((s) == APR_ERANGE)
#elif defined(NETWARE) && defined(USE_WINSOCK) && !defined(DOXYGEN) /* !defined(OS2) && !defined(WIN32) */
@ -1183,6 +1202,9 @@ APR_DECLARE(char *) apr_strerror(apr_status_t statcode, char *buf,
#define APR_STATUS_IS_ENOTEMPTY(s) ((s) == APR_ENOTEMPTY)
#define APR_STATUS_IS_EAFNOSUPPORT(s) ((s) == APR_EAFNOSUPPORT \
|| (s) == APR_OS_START_SYSERR + WSAEAFNOSUPPORT)
#define APR_STATUS_IS_EOPNOTSUPP(s) ((s) == APR_EOPNOTSUPP \
|| (s) == APR_OS_START_SYSERR + WSAEOPNOTSUPP)
#define APR_STATUS_IS_ERANGE(s) ((s) == APR_ERANGE)
#else /* !defined(NETWARE) && !defined(OS2) && !defined(WIN32) */
@ -1291,7 +1313,7 @@ APR_DECLARE(char *) apr_strerror(apr_status_t statcode, char *buf,
#define APR_STATUS_IS_EHOSTUNREACH(s) ((s) == APR_EHOSTUNREACH)
/** network is unreachable */
#define APR_STATUS_IS_ENETUNREACH(s) ((s) == APR_ENETUNREACH)
/** inappropiate file type or format */
/** inappropriate file type or format */
#define APR_STATUS_IS_EFTYPE(s) ((s) == APR_EFTYPE)
/** broken pipe */
#define APR_STATUS_IS_EPIPE(s) ((s) == APR_EPIPE)
@ -1302,6 +1324,11 @@ APR_DECLARE(char *) apr_strerror(apr_status_t statcode, char *buf,
(s) == APR_EEXIST)
/** Address Family not supported */
#define APR_STATUS_IS_EAFNOSUPPORT(s) ((s) == APR_EAFNOSUPPORT)
/** Socket operation not supported */
#define APR_STATUS_IS_EOPNOTSUPP(s) ((s) == APR_EOPNOTSUPP)
/** Numeric value not representable */
#define APR_STATUS_IS_ERANGE(s) ((s) == APR_ERANGE)
/** @} */
#endif /* !defined(NETWARE) && !defined(OS2) && !defined(WIN32) */

View File

@ -32,6 +32,19 @@ extern "C" {
*/
/* Simple escape/unescape functions.
*
* The design goal of these functions are:
*
* - Avoid unnecessary work.
*
* In most cases the strings passed in do not need to be escaped at all. In
* these cases the original string will be returned.
*
* - Lowest possible memory footprint.
*
* The amount of memory allocated for a given encoding is calculated based
* on the exact amount of memory needed, and not the theoretical worst case
* scenario.
*
*/
@ -40,7 +53,22 @@ extern "C" {
* passed to indicate a string-valued key, and have the length computed
* automatically.
*/
#define APR_ESCAPE_STRING (-1)
#define APR_ESCAPE_STRING (-1)
/**
* Apply LDAP distinguished name escaping as per RFC4514.
*/
#define APR_ESCAPE_LDAP_DN (0x01)
/**
* Apply LDAP filter escaping as per RFC4515.
*/
#define APR_ESCAPE_LDAP_FILTER (0x02)
/**
* Apply both RFC4514 and RFC4515 LDAP escaping.
*/
#define APR_ESCAPE_LDAP_ALL (0x03)
/**
* Perform shell escaping on the provided string.
@ -208,8 +236,8 @@ APR_DECLARE(const char *) apr_pescape_urlencoded(apr_pool_t *p,
/**
* Apply entity encoding to a string. Characters are replaced as follows:
* '<' becomes '&lt;', '>' becomes '&gt;', '&' becomes '&amp;', the
* double quote becomes '&quot;" and the single quote becomes '&apos;'.
* '<' becomes '\&lt;', '>' becomes '\&gt;', '&' becomes '\&amp;', the
* double quote becomes '\&quot;" and the single quote becomes '\&apos;'.
*
* If toasc is not zero, any non ascii character will be encoded as
* '%\#ddd;', where ddd is the decimal code of the character.
@ -227,9 +255,9 @@ APR_DECLARE(apr_status_t) apr_escape_entity(char *escaped, const char *str,
/**
* Apply entity encoding to a string, returning the result from a pool.
* Characters are replaced as follows: '<' becomes '&lt;', '>' becomes
* '&gt;', '&' becomes '&amp;', the double quote becomes '&quot;" and the
* single quote becomes '&apos;'.
* Characters are replaced as follows: '<' becomes '\&lt;', '>' becomes
* '\&gt;', '&' becomes '\&amp;', the double quote becomes '\&quot;" and the
* single quote becomes '\&apos;'.
* @param p Pool to allocate from
* @param str The original string
* @param toasc If non zero, encode non ascii characters
@ -366,6 +394,35 @@ APR_DECLARE(apr_status_t) apr_unescape_hex(void *dest, const char *str,
APR_DECLARE(const void *) apr_punescape_hex(apr_pool_t *p, const char *str,
int colon, apr_size_t *len);
/**
* Apply LDAP escaping to binary data. Characters from RFC4514 and RFC4515
* are escaped with their hex equivalents.
* @param dest The destination buffer, can be NULL
* @param src The original buffer
* @param srclen The length of the original buffer
* @param flags APR_ESCAPE_LDAP_DN for RFC4514, APR_ESCAPE_LDAP_FILTER for
* RFC4515, APR_ESCAPE_LDAP_ALL for both
* @param len If present, returns the length of the string
* @return APR_SUCCESS, or APR_NOTFOUND if the string was NULL
*/
APR_DECLARE(apr_status_t) apr_escape_ldap(char *dest, const void *src,
apr_ssize_t srclen, int flags, apr_size_t *len);
/**
* Apply LDAP escaping to binary data, and return the results from a
* pool. Characters from RFC4514 and RFC4515 are escaped with their hex
* equivalents.
* @param p Pool to allocate from
* @param src The original buffer
* @param slen The length of the original buffer
* @param flags APR_ESCAPE_LDAP_DN for RFC4514, APR_ESCAPE_LDAP_FILTER for
* RFC4515, APR_ESCAPE_LDAP_ALL for both
* @return A zero padded buffer allocated from the pool on success, or
* NULL if src was NULL.
*/
APR_DECLARE(const char *) apr_pescape_ldap(apr_pool_t *p, const void *src,
apr_ssize_t slen, int flags) __attribute__((nonnull(1)));
/** @} */
#ifdef __cplusplus
}

View File

@ -50,7 +50,7 @@ extern "C" {
/** apr_filetype_e values for the filetype member of the
* apr_file_info_t structure
* @warning: Not all of the filetypes below can be determined.
* @warning Not all of the filetypes below can be determined.
* For example, a given platform might not correctly report
* a socket descriptor as APR_SOCK if that type isn't
* well-identified on that platform. In such cases where
@ -413,7 +413,7 @@ APR_DECLARE(apr_status_t) apr_filepath_set(const char *path, apr_pool_t *p);
* Determine the encoding used internally by the FilePath functions
* @param style points to a variable which receives the encoding style flag
* @param p the pool to allocate any working storage
* @remark Use @c apr_os_locale_encoding and/or @c apr_os_default_encoding
* @remark Use apr_os_locale_encoding() and/or apr_os_default_encoding()
* to get the name of the path encoding if it's not UTF-8.
*/
APR_DECLARE(apr_status_t) apr_filepath_encoding(int *style, apr_pool_t *p);

View File

@ -315,6 +315,10 @@ APR_DECLARE(apr_status_t) apr_file_copy(const char *from_path,
* file's permissions are copied.
* @param pool The pool to use.
* @remark The new file does not need to exist, it will be created if required.
* @remark Note that advanced filesystem permissions such as ACLs are not
* duplicated by this API. The target permissions (including duplicating the
* source file permissions) are assigned only when the target file does not yet
* exist.
*/
APR_DECLARE(apr_status_t) apr_file_append(const char *from_path,
const char *to_path,
@ -695,7 +699,7 @@ APR_DECLARE(apr_status_t) apr_file_seek(apr_file_t *thefile,
* @bug Some platforms cannot toggle between blocking and nonblocking,
* and when passing a pipe as a standard handle to an application which
* does not expect it, a non-blocking stream will fluxor the client app.
* @deprecated @see apr_file_pipe_create_ex()
* @deprecated @see apr_file_pipe_create_pools()
*/
APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in,
apr_file_t **out,
@ -719,12 +723,40 @@ APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in,
* does not expect it, a non-blocking stream will fluxor the client app.
* Use this function rather than apr_file_pipe_create() to create pipes
* where one or both ends require non-blocking semantics.
* @deprecated @see apr_file_pipe_create_pools()
*/
APR_DECLARE(apr_status_t) apr_file_pipe_create_ex(apr_file_t **in,
apr_file_t **out,
apr_int32_t blocking,
apr_pool_t *pool);
/**
* Create an anonymous pipe which portably supports async timeout options,
* placing each side of the pipe in a different pool.
* @param in The newly created pipe's file for reading.
* @param out The newly created pipe's file for writing.
* @param blocking one of these values defined in apr_thread_proc.h;
* @li #APR_FULL_BLOCK
* @li #APR_READ_BLOCK
* @li #APR_WRITE_BLOCK
* @li #APR_FULL_NONBLOCK
* @param pool_in The pool for the reading pipe.
* @param pool_out The pool for the writing pipe.
* @remark By default, the returned file descriptors will be inherited
* by child processes created using apr_proc_create(). This can be
* changed using apr_file_inherit_unset().
* @remark Some platforms cannot toggle between blocking and nonblocking,
* and when passing a pipe as a standard handle to an application which
* does not expect it, a non-blocking stream will fluxor the client app.
* Use this function rather than apr_file_pipe_create() to create pipes
* where one or both ends require non-blocking semantics.
*/
APR_DECLARE(apr_status_t) apr_file_pipe_create_pools(apr_file_t **in,
apr_file_t **out,
apr_int32_t blocking,
apr_pool_t *pool_in,
apr_pool_t *pool_out);
/**
* Create a named pipe.
* @param filename The filename of the named pipe

View File

@ -170,8 +170,8 @@ void *memchr(const void *s, int c, size_t n);
/**
* Setup any APR internal data structures. This MUST be the first function
* called for any APR library. It is safe to call apr_initialize several
* times as long as apr_terminate is called the same number of times.
* @remark See apr_app_initialize if this is an application, rather than
* times as long as apr_terminate() is called the same number of times.
* @remark See apr_app_initialize() if this is an application, rather than
* a library consumer of apr.
*/
APR_DECLARE(apr_status_t) apr_initialize(void);
@ -184,9 +184,9 @@ APR_DECLARE(apr_status_t) apr_initialize(void);
* @param argc Pointer to the argc that may be corrected
* @param argv Pointer to the argv that may be corrected
* @param env Pointer to the env that may be corrected, may be NULL
* @remark See apr_initialize if this is a library consumer of apr.
* Otherwise, this call is identical to apr_initialize, and must be closed
* with a call to apr_terminate at the end of program execution.
* @remark See apr_initialize() if this is a library consumer of apr.
* Otherwise, this call is identical to apr_initialize(), and must be closed
* with a call to apr_terminate() at the end of program execution.
*/
APR_DECLARE(apr_status_t) apr_app_initialize(int *argc,
char const * const * *argv,
@ -198,20 +198,21 @@ APR_DECLARE(apr_status_t) apr_app_initialize(int *argc,
* apr_initialize() or apr_app_initialize().
* @remark An APR program must call this function at termination once it
* has stopped using APR services. The APR developers suggest using
* atexit to ensure this is called. When using APR from a language
* other than C that has problems with the calling convention, use
* apr_terminate2() instead.
* @c atexit(apr_terminate) to ensure this is called. When using APR
* from a language other than C that has problems with the calling
* convention, use apr_terminate2() instead.
* @see apr_terminate2
*/
APR_DECLARE_NONSTD(void) apr_terminate(void);
/**
* Tear down any APR internal data structures which aren't torn down
* automatically, same as apr_terminate
* @remark An APR program must call either the apr_terminate or apr_terminate2
* automatically, same as apr_terminate()
* @remark An APR program must call either the apr_terminate() or apr_terminate2
* function once it it has finished using APR services. The APR
* developers suggest using atexit(apr_terminate) to ensure this is done.
* developers suggest using @c atexit(apr_terminate) to ensure this is done.
* apr_terminate2 exists to allow non-c language apps to tear down apr,
* while apr_terminate is recommended from c language applications.
* while apr_terminate() is recommended from c language applications.
*/
APR_DECLARE(void) apr_terminate2(void);

View File

@ -29,6 +29,7 @@
#if APR_PROC_MUTEX_IS_GLOBAL
#include "apr_proc_mutex.h"
#endif
#include "apr_time.h"
#ifdef __cplusplus
extern "C" {
@ -66,6 +67,7 @@ typedef struct apr_global_mutex_t apr_global_mutex_t;
* APR_LOCK_POSIXSEM
* APR_LOCK_PROC_PTHREAD
* APR_LOCK_DEFAULT pick the default mechanism for the platform
* APR_LOCK_DEFAULT_TIMED pick the default timed mechanism
* </PRE>
* @param pool the pool from which to allocate the mutex.
* @warning Check APR_HAS_foo_SERIALIZE defines to see if the platform supports
@ -108,6 +110,17 @@ APR_DECLARE(apr_status_t) apr_global_mutex_lock(apr_global_mutex_t *mutex);
*/
APR_DECLARE(apr_status_t) apr_global_mutex_trylock(apr_global_mutex_t *mutex);
/**
* Attempt to acquire the lock for the given mutex until timeout expires.
* If the acquisition time outs, the call returns with APR_TIMEUP.
* @param mutex the mutex on which to attempt the lock acquiring.
* @param timeout the relative timeout (microseconds).
* @note A negative or nul timeout means immediate attempt, returning
* APR_TIMEUP without blocking if it the lock is already acquired.
*/
APR_DECLARE(apr_status_t) apr_global_mutex_timedlock(apr_global_mutex_t *mutex,
apr_interval_time_t timeout);
/**
* Release the lock for the given mutex.
* @param mutex the mutex from which to release the lock.
@ -127,13 +140,24 @@ APR_DECLARE(apr_status_t) apr_global_mutex_destroy(apr_global_mutex_t *mutex);
APR_DECLARE(const char *) apr_global_mutex_lockfile(apr_global_mutex_t *mutex);
/**
* Display the name of the mutex, as it relates to the actual method used
* for the underlying apr_proc_mutex_t, if any. NULL is returned if
* there is no underlying apr_proc_mutex_t.
* @param mutex the name of the mutex
* Get the mechanism of the mutex, as it relates to the actual method
* used for the underlying apr_proc_mutex_t.
* @param mutex the mutex to get the mechanism from.
*/
APR_DECLARE(apr_lockmech_e) apr_global_mutex_mech(apr_global_mutex_t *mutex);
/**
* Get the mechanism's name of the mutex, as it relates to the actual method
* used for the underlying apr_proc_mutex_t.
* @param mutex the mutex to get the mechanism's name from.
*/
APR_DECLARE(const char *) apr_global_mutex_name(apr_global_mutex_t *mutex);
/**
* Set mutex permissions.
*/
APR_PERMS_SET_IMPLEMENT(global_mutex);
/**
* Get the pool used by this global_mutex.
* @return apr_pool_t the pool
@ -155,7 +179,9 @@ APR_POOL_DECLARE_ACCESSOR(global_mutex);
#define apr_global_mutex_unlock apr_proc_mutex_unlock
#define apr_global_mutex_destroy apr_proc_mutex_destroy
#define apr_global_mutex_lockfile apr_proc_mutex_lockfile
#define apr_global_mutex_mech apr_proc_mutex_mech
#define apr_global_mutex_name apr_proc_mutex_name
#define apr_global_mutex_perms_set apr_proc_mutex_perms_set
#define apr_global_mutex_pool_get apr_proc_mutex_pool_get
#endif

View File

@ -102,7 +102,8 @@ APR_DECLARE(apr_hash_t *) apr_hash_copy(apr_pool_t *pool,
* @param key Pointer to the key
* @param klen Length of the key. Can be APR_HASH_KEY_STRING to use the string length.
* @param val Value to associate with the key
* @remark If the value is NULL the hash entry is deleted.
* @remark If the value is NULL the hash entry is deleted. The key is stored as is,
* and so must have a lifetime at least as long as the hash table's pool.
*/
APR_DECLARE(void) apr_hash_set(apr_hash_t *ht, const void *key,
apr_ssize_t klen, const void *val);

View File

@ -26,10 +26,14 @@
#include "apr_file_io.h"
#include "apr_errno.h"
#include "apr_inherit.h"
#include "apr_perms_set.h"
#if APR_HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#if APR_HAVE_SYS_UN_H
#include <sys/un.h>
#endif
#ifdef __cplusplus
extern "C" {
@ -101,6 +105,9 @@ extern "C" {
*/
#define APR_SO_BROADCAST 65536 /**< Allow broadcast
*/
#define APR_SO_FREEBIND 131072 /**< Allow binding to addresses not owned
* by any interface
*/
/** @} */
@ -156,6 +163,25 @@ struct in_addr {
#define APR_INET6 AF_INET6
#endif
#if APR_HAVE_SOCKADDR_UN
#if defined (AF_UNIX)
#define APR_UNIX AF_UNIX
#elif defined(AF_LOCAL)
#define APR_UNIX AF_LOCAL
#else
#error "Neither AF_UNIX nor AF_LOCAL is defined"
#endif
#else /* !APR_HAVE_SOCKADDR_UN */
#if defined (AF_UNIX)
#define APR_UNIX AF_UNIX
#elif defined(AF_LOCAL)
#define APR_UNIX AF_LOCAL
#else
/* TODO: Use a smarter way to detect unique APR_UNIX value */
#define APR_UNIX 1234
#endif
#endif
/**
* @defgroup IP_Proto IP Protocol Definitions for use when creating sockets
* @{
@ -246,6 +272,10 @@ struct apr_sockaddr_t {
/** Placeholder to ensure that the size of this union is not
* dependent on whether APR_HAVE_IPV6 is defined. */
struct sockaddr_storage sas;
#endif
#if APR_HAVE_SOCKADDR_UN
/** Unix domain socket sockaddr structure */
struct sockaddr_un unx;
#endif
} sa;
};
@ -375,6 +405,7 @@ APR_DECLARE(apr_status_t) apr_socket_atreadeof(apr_socket_t *sock,
* @param sa The new apr_sockaddr_t.
* @param hostname The hostname or numeric address string to resolve/parse, or
* NULL to build an address that corresponds to 0.0.0.0 or ::
* or in case of APR_UNIX family it is absolute socket filename.
* @param family The address family to use, or APR_UNSPEC if the system should
* decide.
* @param port The port number.
@ -400,6 +431,41 @@ APR_DECLARE(apr_status_t) apr_sockaddr_info_get(apr_sockaddr_t **sa,
apr_int32_t flags,
apr_pool_t *p);
/**
* Copy apr_sockaddr_t src to dst on pool p.
* @param dst The destination apr_sockaddr_t.
* @param src The source apr_sockaddr_t.
* @param p The pool for the apr_sockaddr_t and associated storage.
*/
APR_DECLARE(apr_status_t) apr_sockaddr_info_copy(apr_sockaddr_t **dst,
const apr_sockaddr_t *src,
apr_pool_t *p);
/* Set the zone of an IPv6 link-local address object.
* @param sa Socket address object
* @param zone_id Zone ID (textual "eth0" or numeric "3").
* @return Returns APR_EBADIP for non-IPv6 socket or an IPv6 address
* which isn't link-local.
*/
APR_DECLARE(apr_status_t) apr_sockaddr_zone_set(apr_sockaddr_t *sa,
const char *zone_id);
/* Retrieve the zone of an IPv6 link-local address object.
* @param sa Socket address object
* @param name If non-NULL, set to the textual representation of the zone id
* @param id If non-NULL, set to the integer zone id
* @param p Pool from which *name is allocated if used.
* @return Returns APR_EBADIP for non-IPv6 socket or socket without any zone id
* set, or other error if the interface could not be mapped to a name.
* @remark Both name and id may be NULL, neither are modified if
* non-NULL in error cases.
*/
APR_DECLARE(apr_status_t) apr_sockaddr_zone_get(const apr_sockaddr_t *sa,
const char **name,
apr_uint32_t *id,
apr_pool_t *p);
/**
* Look up the host name from an apr_sockaddr_t.
* @param hostname The hostname.
@ -620,6 +686,7 @@ APR_DECLARE(apr_status_t) apr_socket_recv(apr_socket_t *sock,
* of local addresses.
* APR_SO_SNDBUF -- Set the SendBufferSize
* APR_SO_RCVBUF -- Set the ReceiveBufferSize
* APR_SO_FREEBIND -- Allow binding to non-local IP address.
* </PRE>
* @param on Value for the option.
*/
@ -806,6 +873,11 @@ APR_DECLARE_INHERIT_SET(socket);
*/
APR_DECLARE_INHERIT_UNSET(socket);
/**
* Set socket permissions.
*/
APR_PERMS_SET_IMPLEMENT(socket);
/**
* @defgroup apr_mcast IP Multicast
* @{

View File

@ -0,0 +1,65 @@
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef APR_PERMS_SET_H
#define APR_PERMS_SET_H
/**
* @file apr_perms_set.h
* @brief APR Process Locking Routines
*/
#include "apr.h"
#include "apr_pools.h"
#include "apr_errno.h"
#include "apr_user.h"
#include "apr_file_info.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/**
* @defgroup apr_perms_set Object permission set functions
* @ingroup APR
* @{
*/
/** Permission set callback function. */
typedef apr_status_t (apr_perms_setfn_t)(void *object, apr_fileperms_t perms,
apr_uid_t uid, apr_gid_t gid);
#define APR_PERMS_SET_IMPLEMENT(type) \
APR_DECLARE(apr_status_t) apr_##type##_perms_set \
(void *the##type, apr_fileperms_t perms, \
apr_uid_t uid, apr_gid_t gid)
#define APR_PERMS_SET_ENOTIMPL(type) \
APR_DECLARE(apr_status_t) apr_##type##_perms_set \
(void *the##type, apr_fileperms_t perms, \
apr_uid_t uid, apr_gid_t gid) \
{ return APR_ENOTIMPL ; }
#define APR_PERMS_SET_FN(type) apr_##type##_perms_set
/** @} */
#ifdef __cplusplus
}
#endif
#endif /* ! APR_PERMS_SET */

View File

@ -66,7 +66,7 @@ extern "C" {
* are not copied
*/
#define APR_POLLSET_WAKEABLE 0x004 /**< Poll operations are interruptable by
* apr_pollset_wakeup()
* apr_pollset_wakeup() or apr_pollcb_wakeup()
*/
#define APR_POLLSET_NODEFAULT 0x010 /**< Do not try to use the default method if
* the specified non-default method cannot be
@ -323,8 +323,12 @@ typedef struct apr_pollcb_t apr_pollcb_t;
* @param p The pool from which to allocate the pollcb
* @param flags Optional flags to modify the operation of the pollcb.
*
* @remark If flags contains APR_POLLSET_WAKEABLE, then a pollcb is
* created with an additional internal pipe object used for the
* apr_pollcb_wakeup() call. The actual size of pollcb is
* in that case @a size + 1.
* @remark Pollcb is only supported on some platforms; the apr_pollcb_create()
* call will fail with APR_ENOTIMPL on platforms where it is not supported.
* call will fail with APR_ENOTIMPL on platforms where it is not supported.
*/
APR_DECLARE(apr_status_t) apr_pollcb_create(apr_pollcb_t **pollcb,
apr_uint32_t size,
@ -341,8 +345,12 @@ APR_DECLARE(apr_status_t) apr_pollcb_create(apr_pollcb_t **pollcb,
* method cannot be used, the default method will be used unless the
* APR_POLLSET_NODEFAULT flag has been specified.
*
* @remark If flags contains APR_POLLSET_WAKEABLE, then a pollcb is
* created with an additional internal pipe object used for the
* apr_pollcb_wakeup() call. The actual size of pollcb is
* in that case @a size + 1.
* @remark Pollcb is only supported on some platforms; the apr_pollcb_create_ex()
* call will fail with APR_ENOTIMPL on platforms where it is not supported.
* call will fail with APR_ENOTIMPL on platforms where it is not supported.
*/
APR_DECLARE(apr_status_t) apr_pollcb_create_ex(apr_pollcb_t **pollcb,
apr_uint32_t size,
@ -373,6 +381,7 @@ APR_DECLARE(apr_status_t) apr_pollcb_add(apr_pollcb_t *pollcb,
* Remove a descriptor from a pollcb
* @param pollcb The pollcb from which to remove the descriptor
* @param descriptor The descriptor to remove
* @remark If the descriptor is not found, APR_NOTFOUND is returned.
* @remark apr_pollcb_remove() cannot be used to remove a subset of requested
* events for a descriptor. The reqevents field in the apr_pollfd_t
* parameter must contain the same value when removing as when adding.
@ -380,11 +389,14 @@ APR_DECLARE(apr_status_t) apr_pollcb_add(apr_pollcb_t *pollcb,
APR_DECLARE(apr_status_t) apr_pollcb_remove(apr_pollcb_t *pollcb,
apr_pollfd_t *descriptor);
/** Function prototype for pollcb handlers
/**
* Function prototype for pollcb handlers
* @param baton Opaque baton passed into apr_pollcb_poll()
* @param descriptor Contains the notification for an active descriptor,
* the rtnevents member contains what events were triggered
* @param descriptor Contains the notification for an active descriptor.
* The @a rtnevents member describes which events were triggered
* for this descriptor.
* @remark If the pollcb handler does not return APR_SUCCESS, the apr_pollcb_poll()
* call returns with the handler's return value.
*/
typedef apr_status_t (*apr_pollcb_cb_t)(void *baton, apr_pollfd_t *descriptor);
@ -395,17 +407,34 @@ typedef apr_status_t (*apr_pollcb_cb_t)(void *baton, apr_pollfd_t *descriptor);
* maximum, not a minimum. If a descriptor is signalled, the
* function will return before this time. If timeout is
* negative, the function will block until a descriptor is
* signalled.
* signalled or until apr_pollcb_wakeup() has been called.
* @param func Callback function to call for each active descriptor.
* @param baton Opaque baton passed to the callback function.
* @remark Multiple signalled conditions for the same descriptor may be reported
* in one or more calls to the callback function, depending on the
* implementation.
* @remark APR_EINTR will be returned if the pollset has been created with
* APR_POLLSET_WAKEABLE and apr_pollcb_wakeup() has been called while
* waiting for activity.
*/
APR_DECLARE(apr_status_t) apr_pollcb_poll(apr_pollcb_t *pollcb,
apr_interval_time_t timeout,
apr_pollcb_cb_t func,
void *baton);
void *baton);
/**
* Interrupt the blocked apr_pollcb_poll() call.
* @param pollcb The pollcb to use
* @remark If the pollcb was not created with APR_POLLSET_WAKEABLE the
* return value is APR_EINIT.
*/
APR_DECLARE(apr_status_t) apr_pollcb_wakeup(apr_pollcb_t *pollcb);
/**
* Return a printable representation of the pollcb method.
* @param pollcb The pollcb to use
*/
APR_DECLARE(const char *) apr_pollcb_method_name(apr_pollcb_t *pollcb);
/** @} */

View File

@ -46,6 +46,9 @@
#if APR_HAVE_PTHREAD_H
#include <pthread.h>
#endif
#if APR_HAVE_SEMAPHORE_H
#include <semaphore.h>
#endif
#ifdef __cplusplus
extern "C" {
@ -140,6 +143,10 @@ struct apr_os_proc_mutex_t {
pthread_mutex_t *intraproc;
#endif
#endif
#if APR_HAS_POSIXSEM_SERIALIZE
/** Value used for POSIX semaphores serialization */
sem_t *psem_interproc;
#endif
};
typedef int apr_os_file_t; /**< native file */
@ -241,13 +248,26 @@ APR_DECLARE(apr_status_t) apr_os_sock_get(apr_os_sock_t *thesock,
apr_socket_t *sock);
/**
* Convert the proc mutex from os specific type to apr type
* Convert the proc mutex from apr type to os specific type
* @param ospmutex The os specific proc mutex we are converting to.
* @param pmutex The apr proc mutex to convert.
*/
APR_DECLARE(apr_status_t) apr_os_proc_mutex_get(apr_os_proc_mutex_t *ospmutex,
apr_proc_mutex_t *pmutex);
/**
* Convert the proc mutex from apr type to os specific type, also
* providing the mechanism used by the apr mutex.
* @param ospmutex The os specific proc mutex we are converting to.
* @param pmutex The apr proc mutex to convert.
* @param mech The mechanism used by the apr proc mutex (if not NULL).
* @remark Allows for disambiguation for platforms with multiple mechanisms
* available.
*/
APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex,
apr_proc_mutex_t *pmutex,
apr_lockmech_e *mech);
/**
* Get the exploded time in the platforms native format.
* @param ostime the native time format
@ -380,7 +400,10 @@ APR_DECLARE(apr_status_t) apr_os_dir_put(apr_dir_t **dir,
apr_pool_t *cont);
/**
* Convert a socket from the os specific type to the apr type
* Convert a socket from the os specific type to the APR type. If
* sock points to NULL, a socket will be created from the pool
* provided. If **sock does not point to NULL, the structure pointed
* to by sock will be reused and updated with the given socket.
* @param sock The pool to use.
* @param thesock The socket to convert to.
* @param cont The socket we are converting to an apr type.
@ -415,6 +438,24 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_put(apr_proc_mutex_t **pmutex,
apr_os_proc_mutex_t *ospmutex,
apr_pool_t *cont);
/**
* Convert the proc mutex from os specific type to apr type, using the
* specified mechanism.
* @param pmutex The apr proc mutex we are converting to.
* @param ospmutex The os specific proc mutex to convert.
* @param mech The apr mutex locking mechanism
* @param register_cleanup Whether to destroy the os mutex with the apr
* one (either on explicit destroy or pool cleanup).
* @param cont The pool to use if it is needed.
* @remark Allows for disambiguation for platforms with multiple mechanisms
* available.
*/
APR_DECLARE(apr_status_t) apr_os_proc_mutex_put_ex(apr_proc_mutex_t **pmutex,
apr_os_proc_mutex_t *ospmutex,
apr_lockmech_e mech,
int register_cleanup,
apr_pool_t *cont);
/**
* Put the imploded time in the APR format.
* @param aprtime the APR time format
@ -494,7 +535,7 @@ APR_DECLARE(const char*) apr_os_default_encoding(apr_pool_t *pool);
/**
* Get the name of the current locale character set.
* @param pool the pool to allocate the name from, if needed
* @remark Defers to apr_os_default_encoding if the current locale's
* @remark Defers to apr_os_default_encoding() if the current locale's
* data can't be retrieved on this system.
*/
APR_DECLARE(const char*) apr_os_locale_encoding(apr_pool_t *pool);

View File

@ -25,6 +25,8 @@
#include "apr.h"
#include "apr_pools.h"
#include "apr_errno.h"
#include "apr_perms_set.h"
#include "apr_time.h"
#ifdef __cplusplus
extern "C" {
@ -47,7 +49,8 @@ typedef enum {
APR_LOCK_SYSVSEM, /**< System V Semaphores */
APR_LOCK_PROC_PTHREAD, /**< POSIX pthread process-based locking */
APR_LOCK_POSIXSEM, /**< POSIX semaphore process-based locking */
APR_LOCK_DEFAULT /**< Use the default process lock */
APR_LOCK_DEFAULT, /**< Use the default process lock */
APR_LOCK_DEFAULT_TIMED /**< Use the default process timed lock */
} apr_lockmech_e;
/** Opaque structure representing a process mutex. */
@ -112,6 +115,17 @@ APR_DECLARE(apr_status_t) apr_proc_mutex_lock(apr_proc_mutex_t *mutex);
*/
APR_DECLARE(apr_status_t) apr_proc_mutex_trylock(apr_proc_mutex_t *mutex);
/**
* Attempt to acquire the lock for the given mutex until timeout expires.
* If the acquisition time outs, the call returns with APR_TIMEUP.
* @param mutex the mutex on which to attempt the lock acquiring.
* @param timeout the relative timeout (microseconds).
* @note A negative or nul timeout means immediate attempt, returning
* APR_TIMEUP without blocking if it the lock is already acquired.
*/
APR_DECLARE(apr_status_t) apr_proc_mutex_timedlock(apr_proc_mutex_t *mutex,
apr_interval_time_t timeout);
/**
* Release the lock for the given mutex.
* @param mutex the mutex from which to release the lock.
@ -140,9 +154,16 @@ APR_DECLARE(apr_status_t) apr_proc_mutex_cleanup(void *mutex);
APR_DECLARE(const char *) apr_proc_mutex_lockfile(apr_proc_mutex_t *mutex);
/**
* Display the name of the mutex, as it relates to the actual method used.
* This matches the valid options for Apache's AcceptMutex directive
* @param mutex the name of the mutex
* Get the mechanism of the mutex, as it relates to the actual method
* used for the underlying apr_proc_mutex_t.
* @param mutex the mutex to get the mechanism from.
*/
APR_DECLARE(apr_lockmech_e) apr_proc_mutex_mech(apr_proc_mutex_t *mutex);
/**
* Get the mechanism's name of the mutex, as it relates to the actual method
* used for the underlying apr_proc_mutex_t.
* @param mutex the mutex to get the mechanism's name from.
*/
APR_DECLARE(const char *) apr_proc_mutex_name(apr_proc_mutex_t *mutex);
@ -151,6 +172,11 @@ APR_DECLARE(const char *) apr_proc_mutex_name(apr_proc_mutex_t *mutex);
*/
APR_DECLARE(const char *) apr_proc_mutex_defname(void);
/**
* Set mutex permissions.
*/
APR_PERMS_SET_IMPLEMENT(proc_mutex);
/**
* Get the pool used by this proc_mutex.
* @return apr_pool_t the pool

View File

@ -25,6 +25,7 @@
#include "apr.h"
#include "apr_pools.h"
#include "apr_errno.h"
#include "apr_perms_set.h"
#ifdef __cplusplus
extern "C" {
@ -135,6 +136,21 @@ APR_DECLARE(apr_status_t) apr_shm_create_ex(apr_shm_t **m,
APR_DECLARE(apr_status_t) apr_shm_remove(const char *filename,
apr_pool_t *pool);
/**
* Delete named resource associated with a shared memory segment,
* preventing attachments to the resource.
* @param m The shared memory segment structure to delete.
* @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. 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 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_delete(apr_shm_t *m);
/**
* Destroy a shared memory segment and associated memory.
* @param m The shared memory segment structure to destroy.
@ -194,6 +210,11 @@ APR_DECLARE(void *) apr_shm_baseaddr_get(const apr_shm_t *m);
*/
APR_DECLARE(apr_size_t) apr_shm_size_get(const apr_shm_t *m);
/**
* Set shared memory permissions.
*/
APR_PERMS_SET_IMPLEMENT(shm);
/**
* Get the pool used by this shared memory segment.
*/

View File

@ -40,9 +40,7 @@ extern "C" {
/**
* apr_skiplist_compare is the function type that must be implemented
* per object type that is used in a skip list for comparisons to maintain
* order. A value <0 indicates placement after this node; a value of 0
* indicates collision with this exact node; a value >0 indicates placement
* before this node.
* order
* */
typedef int (*apr_skiplist_compare) (void *, void *);
@ -154,6 +152,30 @@ APR_DECLARE(void *) apr_skiplist_find_compare(apr_skiplist *sl,
*/
APR_DECLARE(void *) apr_skiplist_find(apr_skiplist *sl, void *data, apr_skiplistnode **iter);
/**
* Return the last matching element in the skip list using the specified
* comparison function.
* @param sl The skip list
* @param data The value to search for
* @param iter A pointer to the returned skip list node representing the element
* found
* @param comp The comparison function to use
*/
APR_DECLARE(void *) apr_skiplist_last_compare(apr_skiplist *sl, void *data,
apr_skiplistnode **iter,
apr_skiplist_compare comp);
/**
* Return the last matching element in the skip list using the current comparison
* function.
* @param sl The skip list
* @param data The value to search for
* @param iter A pointer to the returned skip list node representing the element
* found
*/
APR_DECLARE(void *) apr_skiplist_last(apr_skiplist *sl, void *data,
apr_skiplistnode **iter);
/**
* Return the next element in the skip list.
* @param sl The skip list
@ -172,6 +194,12 @@ APR_DECLARE(void *) apr_skiplist_next(apr_skiplist *sl, apr_skiplistnode **iter)
*/
APR_DECLARE(void *) apr_skiplist_previous(apr_skiplist *sl, apr_skiplistnode **iter);
/**
* Return the element of the skip list node
* @param iter The skip list node
*/
APR_DECLARE(void *) apr_skiplist_element(apr_skiplistnode *iter);
/**
* Insert an element into the skip list using the specified comparison function
* if it does not already exist.
@ -184,7 +212,7 @@ APR_DECLARE(apr_skiplistnode *) apr_skiplist_insert_compare(apr_skiplist *sl,
/**
* Insert an element into the skip list using the existing comparison function
* if it does not already exist (as determined by the comparison function)
* if it does not already exist.
* @param sl The skip list
* @param data The element to insert
* @remark If no comparison function has been set for the skip list, the element
@ -192,6 +220,62 @@ APR_DECLARE(apr_skiplistnode *) apr_skiplist_insert_compare(apr_skiplist *sl,
*/
APR_DECLARE(apr_skiplistnode *) apr_skiplist_insert(apr_skiplist* sl, void *data);
/**
* Add an element into the skip list using the specified comparison function
* allowing for duplicates.
* @param sl The skip list
* @param data The element to add
* @param comp The comparison function to use for placement into the skip list
*/
APR_DECLARE(apr_skiplistnode *) apr_skiplist_add_compare(apr_skiplist *sl,
void *data, apr_skiplist_compare comp);
/**
* Add an element into the skip list using the existing comparison function
* allowing for duplicates.
* @param sl The skip list
* @param data The element to insert
* @remark If no comparison function has been set for the skip list, the element
* will not be inserted and NULL will be returned.
*/
APR_DECLARE(apr_skiplistnode *) apr_skiplist_add(apr_skiplist* sl, void *data);
/**
* Add an element into the skip list using the specified comparison function
* removing the existing duplicates.
* @param sl The skip list
* @param data The element to insert
* @param comp The comparison function to use for placement into the skip list
* @param myfree A function to be called for each removed duplicate
* @remark If no comparison function has been set for the skip list, the element
* will not be inserted, none will be replaced, and NULL will be returned.
*/
APR_DECLARE(apr_skiplistnode *) apr_skiplist_replace_compare(apr_skiplist *sl,
void *data, apr_skiplist_freefunc myfree,
apr_skiplist_compare comp);
/**
* Add an element into the skip list using the existing comparison function
* removing the existing duplicates.
* @param sl The skip list
* @param data The element to insert
* @param myfree A function to be called for each removed duplicate
* @remark If no comparison function has been set for the skip list, the element
* will not be inserted, none will be replaced, and NULL will be returned.
*/
APR_DECLARE(apr_skiplistnode *) apr_skiplist_replace(apr_skiplist *sl,
void *data, apr_skiplist_freefunc myfree);
/**
* Remove a node from the skip list.
* @param sl The skip list
* @param iter The skip list node to remove
* @param myfree A function to be called for the removed element
*/
APR_DECLARE(int) apr_skiplist_remove_node(apr_skiplist *sl,
apr_skiplistnode *iter,
apr_skiplist_freefunc myfree);
/**
* Remove an element from the skip list using the specified comparison function for
* locating the element. In the case of duplicates, the 1st entry will be removed.
@ -247,6 +331,40 @@ APR_DECLARE(void *) apr_skiplist_pop(apr_skiplist *sl, apr_skiplist_freefunc myf
*/
APR_DECLARE(void *) apr_skiplist_peek(apr_skiplist *sl);
/**
* Return the size of the list (number of elements), in O(1).
* @param sl The skip list
*/
APR_DECLARE(size_t) apr_skiplist_size(const apr_skiplist *sl);
/**
* Return the height of the list (number of skip paths), in O(1).
* @param sl The skip list
*/
APR_DECLARE(int) apr_skiplist_height(const apr_skiplist *sl);
/**
* Return the predefined maximum height of the skip list.
* @param sl The skip list
*/
APR_DECLARE(int) apr_skiplist_preheight(const apr_skiplist *sl);
/**
* Set a predefined maximum height for the skip list.
* @param sl The skip list
* @param to The preheight to set, or a nul/negative value to disable.
* @remark When a preheight is used, the height of each inserted element is
* computed randomly up to this preheight instead of the current skip list's
* height plus one used by the default implementation. Using a preheight can
* probably ensure more fairness with long living elements (since with an
* adaptative height, former elements may have been created with a low height,
* hence a longest path to reach them while the skip list grows). On the other
* hand, the default behaviour (preheight <= 0) with a growing and decreasing
* maximum height is more adaptative/suitable for short living values.
* @note Should be called before any insertion/add.
*/
APR_DECLARE(void) apr_skiplist_set_preheight(apr_skiplist *sl, int to);
/**
* Merge two skip lists. XXX SEMANTICS
* @param sl1 One of two skip lists to be merged

View File

@ -101,10 +101,10 @@ APR_DECLARE(char *) apr_pstrdup(apr_pool_t *p, const char *s);
* @param s The block of characters to duplicate
* @param n The number of characters to duplicate
* @return The new string or NULL if s == NULL
* @remark This is a faster alternative to apr_pstrndup, for use
* @remark This is a faster alternative to apr_pstrndup(), for use
* when you know that the string being duplicated really
* has 'n' or more characters. If the string might contain
* fewer characters, use apr_pstrndup.
* fewer characters, use apr_pstrndup().
*/
APR_DECLARE(char *) apr_pstrmemdup(apr_pool_t *p, const char *s, apr_size_t n)
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))

View File

@ -179,7 +179,7 @@ APR_DECLARE(void) apr_array_cat(apr_array_header_t *dst,
* @param p The pool to allocate the copy of the array out of
* @param arr The array to copy
* @return An exact copy of the array passed in
* @remark The alternate apr_array_copy_hdr copies only the header, and arranges
* @remark The alternate apr_array_copy_hdr() copies only the header, and arranges
* for the elements to be copied if (and only if) the code subsequently
* does a push or arraycat.
*/
@ -191,7 +191,7 @@ APR_DECLARE(apr_array_header_t *) apr_array_copy(apr_pool_t *p,
* @param p The pool to allocate the copy of the array out of
* @param arr The array to copy
* @return An exact copy of the array passed in
* @remark The alternate apr_array_copy copies the *entire* array.
* @remark The alternate apr_array_copy() copies the *entire* array.
*/
APR_DECLARE(apr_array_header_t *) apr_array_copy_hdr(apr_pool_t *p,
const apr_array_header_t *arr);
@ -318,7 +318,7 @@ APR_DECLARE(void) apr_table_unset(apr_table_t *t, const char *key);
* @param t The table to search for the data
* @param key The key to merge data for (case does not matter)
* @param val The data to add
* @remark If the key is not found, then this function acts like apr_table_add
* @remark If the key is not found, then this function acts like apr_table_add()
*/
APR_DECLARE(void) apr_table_merge(apr_table_t *t, const char *key,
const char *val);
@ -330,7 +330,7 @@ APR_DECLARE(void) apr_table_merge(apr_table_t *t, const char *key,
* @param t The table to search for the data
* @param key The key to merge data for (case does not matter)
* @param val The data to add
* @remark If the key is not found, then this function acts like apr_table_addn
* @remark If the key is not found, then this function acts like apr_table_addn()
*/
APR_DECLARE(void) apr_table_mergen(apr_table_t *t, const char *key,
const char *val);
@ -380,6 +380,7 @@ APR_DECLARE(apr_table_t *) apr_table_overlay(apr_pool_t *p,
* @remark Iteration continues while this callback function returns non-zero.
* To export the callback function for apr_table_[v]do() it must be declared
* in the _NONSTD convention.
* @see apr_table_do @see apr_table_vdo
*/
typedef int (apr_table_do_callback_fn_t)(void *rec, const char *key,
const char *value);
@ -392,7 +393,7 @@ typedef int (apr_table_do_callback_fn_t)(void *rec, const char *key,
* in the table. Otherwise, the function is invoked only for those
* elements matching the keys specified.
*
* If an invocation of the @param comp function returns zero,
* If an invocation of the comp function returns zero,
* iteration will continue using the next specified key, if any.
*
* @param comp The function to run
@ -401,7 +402,7 @@ typedef int (apr_table_do_callback_fn_t)(void *rec, const char *key,
* @param ... A varargs array of zero or more (char *) keys followed by NULL
* @return FALSE if one of the comp() iterations returned zero; TRUE if all
* iterations returned non-zero
* @see apr_table_do_callback_fn_t
* @see apr_table_do_callback_fn_t @see apr_table_vdo
*/
APR_DECLARE_NONSTD(int) apr_table_do(apr_table_do_callback_fn_t *comp,
void *rec, const apr_table_t *t, ...)
@ -412,13 +413,13 @@ APR_DECLARE_NONSTD(int) apr_table_do(apr_table_do_callback_fn_t *comp,
/**
* Iterate over a table running the provided function once for every
* element in the table. The @param vp varargs parameter must be a
* element in the table. The vp varargs parameter must be a
* list of zero or more (char *) keys followed by a NULL pointer. If
* zero keys are given, the @param comp function will be invoked for
* every element in the table. Otherwise, the function is invoked
* only for those elements matching the keys specified.
*
* If an invocation of the @param comp function returns zero,
* If an invocation of the comp function returns zero,
* iteration will continue using the next specified key, if any.
*
* @param comp The function to run
@ -427,7 +428,7 @@ APR_DECLARE_NONSTD(int) apr_table_do(apr_table_do_callback_fn_t *comp,
* @param vp List of zero or more (char *) keys followed by NULL
* @return FALSE if one of the comp() iterations returned zero; TRUE if all
* iterations returned non-zero
* @see apr_table_do_callback_fn_t
* @see apr_table_do_callback_fn_t @see apr_table_do
*/
APR_DECLARE(int) apr_table_vdo(apr_table_do_callback_fn_t *comp,
void *rec, const apr_table_t *t, va_list vp);
@ -436,6 +437,8 @@ APR_DECLARE(int) apr_table_vdo(apr_table_do_callback_fn_t *comp,
#define APR_OVERLAP_TABLES_SET (0)
/** flag for overlap to use apr_table_mergen */
#define APR_OVERLAP_TABLES_MERGE (1)
/** flag for overlap to use apr_table_addn */
#define APR_OVERLAP_TABLES_ADD (2)
/**
* For each element in table b, either use setn or mergen to add the data
* to table a. Which method is used is determined by the flags passed in.
@ -444,6 +447,7 @@ APR_DECLARE(int) apr_table_vdo(apr_table_do_callback_fn_t *comp,
* @param flags How to add the table to table a. One of:
* APR_OVERLAP_TABLES_SET Use apr_table_setn
* APR_OVERLAP_TABLES_MERGE Use apr_table_mergen
* APR_OVERLAP_TABLES_ADD Use apr_table_addn
* @remark When merging duplicates, the two values are concatenated,
* separated by the string ", ".
* @remark This function is highly optimized, and uses less memory and CPU cycles
@ -461,6 +465,9 @@ APR_DECLARE(int) apr_table_vdo(apr_table_do_callback_fn_t *comp,
* if (flags & APR_OVERLAP_TABLES_MERGE) {
* apr_table_mergen(a, belt[i].key, belt[i].val);
* }
* else if (flags & APR_OVERLAP_TABLES_ADD) {
* apr_table_addn(a, belt[i].key, belt[i].val);
* }
* else {
* apr_table_setn(a, belt[i].key, belt[i].val);
* }
@ -484,7 +491,8 @@ APR_DECLARE(void) apr_table_overlap(apr_table_t *a, const apr_table_t *b,
*
* @param t Table.
* @param flags APR_OVERLAP_TABLES_MERGE to merge, or
* APR_OVERLAP_TABLES_SET to overwrite
* APR_OVERLAP_TABLES_SET to overwrite, or
* APR_OVERLAP_TABLES_ADD to add
* @remark When merging duplicates, the two values are concatenated,
* separated by the string ", ".
*/

View File

@ -43,9 +43,11 @@ typedef struct apr_thread_mutex_t apr_thread_mutex_t;
#define APR_THREAD_MUTEX_DEFAULT 0x0 /**< platform-optimal lock behavior */
#define APR_THREAD_MUTEX_NESTED 0x1 /**< enable nested (recursive) locks */
#define APR_THREAD_MUTEX_UNNESTED 0x2 /**< disable nested locks */
#define APR_THREAD_MUTEX_TIMED 0x4 /**< enable timed locks */
/* Delayed the include to avoid a circular reference */
#include "apr_pools.h"
#include "apr_time.h"
/**
* Create and initialize a mutex that can be used to synchronize threads.
@ -81,6 +83,17 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_lock(apr_thread_mutex_t *mutex);
*/
APR_DECLARE(apr_status_t) apr_thread_mutex_trylock(apr_thread_mutex_t *mutex);
/**
* Attempt to acquire the lock for the given mutex until timeout expires.
* If the acquisition time outs, the call returns with APR_TIMEUP.
* @param mutex the mutex on which to attempt the lock acquiring.
* @param timeout the relative timeout (microseconds).
* @note A timeout negative or nul means immediate attempt, returning
* APR_TIMEUP without blocking if it the lock is already acquired.
*/
APR_DECLARE(apr_status_t) apr_thread_mutex_timedlock(apr_thread_mutex_t *mutex,
apr_interval_time_t timeout);
/**
* Release the lock for the given mutex.
* @param mutex the mutex from which to release the lock.

View File

@ -26,6 +26,7 @@
#include "apr_file_io.h"
#include "apr_pools.h"
#include "apr_errno.h"
#include "apr_perms_set.h"
#if APR_HAVE_STRUCT_RLIMIT
#include <sys/time.h>
@ -579,6 +580,18 @@ APR_DECLARE(apr_status_t) apr_procattr_group_set(apr_procattr_t *attr,
const char *groupname);
/**
* Register permission set function
* @param attr The procattr we care about.
* @param perms_set_fn Permission set callback
* @param data Data to pass to permission callback function
* @param perms Permissions to set
*/
APR_DECLARE(apr_status_t) apr_procattr_perms_set_register(apr_procattr_t *attr,
apr_perms_setfn_t *perms_set_fn,
void *data,
apr_fileperms_t perms);
#if APR_HAS_FORK
/**
* This is currently the only non-portable call in APR. This executes
@ -803,6 +816,13 @@ APR_DECLARE(apr_status_t) apr_setup_signal_thread(void);
* functions should return 1 if the signal has been handled, 0 otherwise.
* @param signal_handler The function to call when a signal is received
* apr_status_t apr_signal_thread((int)(*signal_handler)(int signum))
* @note Synchronous signals like SIGABRT/SIGSEGV/SIGBUS/... are ignored by
* apr_signal_thread() and thus can't be waited by this function (they remain
* handled by the operating system or its native signals interface).
* @remark In APR version 1.6 and ealier, SIGUSR2 was part of these ignored
* signals and thus was never passed in to the signal_handler. From APR 1.7
* this is no more the case so SIGUSR2 can be handled in signal_handler and
* acted upon like the other asynchronous signals.
*/
APR_DECLARE(apr_status_t) apr_signal_thread(int(*signal_handler)(int signum));

View File

@ -23,7 +23,6 @@
*/
#include "apr.h"
#include "apr_pools.h"
#include "apr_errno.h"
#ifdef __cplusplus
@ -120,6 +119,9 @@ struct apr_time_exp_t {
apr_int32_t tm_gmtoff;
};
/* Delayed the include to avoid a circular reference */
#include "apr_pools.h"
/**
* Convert an ansi time_t to an apr_time_t
* @param result the resulting apr_time_t

View File

@ -38,7 +38,7 @@
*/
#define APR_COPYRIGHT "Copyright (c) 2000-2015 The Apache Software " \
#define APR_COPYRIGHT "Copyright (c) 2000-2019 The Apache Software " \
"Foundation or its licensors, as applicable."
/* The numeric compile-time version constants. These constants are the
@ -56,20 +56,20 @@
* Minor API changes that do not cause binary compatibility problems.
* Reset to 0 when upgrading APR_MAJOR_VERSION
*/
#define APR_MINOR_VERSION 5
#define APR_MINOR_VERSION 7
/** patch level
* The Patch Level never includes API changes, simply bug fixes.
* Reset to 0 when upgrading APR_MINOR_VERSION
*/
#define APR_PATCH_VERSION 2
#define APR_PATCH_VERSION 0
/**
* The symbol APR_IS_DEV_VERSION is only defined for internal,
* "development" copies of APR. It is undefined for released versions
* of APR.
*/
/* #define APR_IS_DEV_VERSION */
/* #undef APR_IS_DEV_VERSION */
/**
* Check at compile time if the APR version is at least a certain

View File

@ -18,28 +18,36 @@
#define ATOMIC_H
#include "apr.h"
#include "apr_pools.h"
#include "apr_private.h"
#include "apr_atomic.h"
#include "apr_thread_mutex.h"
#if defined(USE_ATOMICS_GENERIC)
/* noop */
#elif defined(__GNUC__) && defined(__STRICT_ANSI__)
/* force use of generic atomics if building e.g. with -std=c89, which
* doesn't allow inline asm */
# define USE_ATOMICS_GENERIC
#elif HAVE_ATOMIC_BUILTINS
# define USE_ATOMICS_BUILTINS
#elif defined(SOLARIS2) && SOLARIS2 >= 10
# define USE_ATOMICS_SOLARIS
# define NEED_ATOMICS_GENERIC64
#elif defined(__GNUC__) && defined(__STRICT_ANSI__)
/* force use of generic atomics if building e.g. with -std=c89, which
* doesn't allow inline asm */
# define USE_ATOMICS_GENERIC
#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
# define USE_ATOMICS_IA32
# define NEED_ATOMICS_GENERIC64
#elif defined(__GNUC__) && (defined(__PPC__) || defined(__ppc__))
# define USE_ATOMICS_PPC
# define NEED_ATOMICS_GENERIC64
#elif defined(__GNUC__) && (defined(__s390__) || defined(__s390x__))
# define USE_ATOMICS_S390
# define NEED_ATOMICS_GENERIC64
#else
# define USE_ATOMICS_GENERIC
#endif
#if defined(USE_ATOMICS_GENERIC) || defined (NEED_ATOMICS_GENERIC64)
apr_status_t apr__atomic_generic64_init(apr_pool_t *p);
#endif
#endif /* ATOMIC_H */

View File

@ -110,6 +110,9 @@ struct apr_socket_t {
apr_interval_time_t timeout;
#ifndef HAVE_POLL
int connected;
#endif
#if APR_HAVE_SOCKADDR_UN
int bound;
#endif
int local_port_unknown;
int local_interface_unknown;

View File

@ -126,7 +126,7 @@ struct apr_pollset_t
apr_file_t *wakeup_pipe[2];
apr_pollfd_t wakeup_pfd;
apr_pollset_private_t *p;
apr_pollset_provider_t *provider;
const apr_pollset_provider_t *provider;
};
typedef union {
@ -149,10 +149,14 @@ struct apr_pollcb_t {
apr_pool_t *pool;
apr_uint32_t nelts;
apr_uint32_t nalloc;
apr_uint32_t flags;
/* Pipe descriptors used for wakeup */
apr_file_t *wakeup_pipe[2];
apr_pollfd_t wakeup_pfd;
int fd;
apr_pollcb_pset pollset;
apr_pollfd_t **copyset;
apr_pollcb_provider_t *provider;
const apr_pollcb_provider_t *provider;
};
struct apr_pollset_provider_t {
@ -169,10 +173,17 @@ struct apr_pollcb_provider_t {
apr_status_t (*add)(apr_pollcb_t *, apr_pollfd_t *);
apr_status_t (*remove)(apr_pollcb_t *, apr_pollfd_t *);
apr_status_t (*poll)(apr_pollcb_t *, apr_interval_time_t, apr_pollcb_cb_t, void *);
apr_status_t (*cleanup)(apr_pollcb_t *);
const char *name;
};
/* Private functions */
void apr_pollset_drain_wakeup_pipe(apr_pollset_t *pollset);
/*
* Private functions used for the implementation of both apr_pollcb_* and
* apr_pollset_*
*/
apr_status_t apr_poll_create_wakeup_pipe(apr_pool_t *pool, apr_pollfd_t *pfd,
apr_file_t **wakeup_pipe);
apr_status_t apr_poll_close_wakeup_pipe(apr_file_t **wakeup_pipe);
void apr_poll_drain_wakeup_pipe(apr_file_t **wakeup_pipe);
#endif /* APR_ARCH_POLL_PRIVATE_H */

View File

@ -26,6 +26,7 @@
#include "apr_portable.h"
#include "apr_file_io.h"
#include "apr_arch_file_io.h"
#include "apr_time.h"
/* System headers required by Locks library */
#if APR_HAVE_SYS_TYPES_H
@ -62,9 +63,6 @@
#if APR_HAVE_PTHREAD_H
#include <pthread.h>
#endif
#if APR_HAVE_SEMAPHORE_H
#include <semaphore.h>
#endif
/* End System Headers */
struct apr_proc_mutex_unix_lock_methods_t {
@ -72,9 +70,12 @@ struct apr_proc_mutex_unix_lock_methods_t {
apr_status_t (*create)(apr_proc_mutex_t *, const char *);
apr_status_t (*acquire)(apr_proc_mutex_t *);
apr_status_t (*tryacquire)(apr_proc_mutex_t *);
apr_status_t (*timedacquire)(apr_proc_mutex_t *, apr_interval_time_t);
apr_status_t (*release)(apr_proc_mutex_t *);
apr_status_t (*cleanup)(void *);
apr_status_t (*child_init)(apr_proc_mutex_t **, apr_pool_t *, const char *);
apr_status_t (*perms_set)(apr_proc_mutex_t *, apr_fileperms_t, apr_uid_t, apr_gid_t);
apr_lockmech_e mech;
const char *name;
};
typedef struct apr_proc_mutex_unix_lock_methods_t apr_proc_mutex_unix_lock_methods_t;
@ -93,17 +94,24 @@ union semun {
struct apr_proc_mutex_t {
apr_pool_t *pool;
const apr_proc_mutex_unix_lock_methods_t *meth;
const apr_proc_mutex_unix_lock_methods_t *inter_meth;
int curr_locked;
char *fname;
#if APR_HAS_SYSVSEM_SERIALIZE || APR_HAS_FCNTL_SERIALIZE || APR_HAS_FLOCK_SERIALIZE
apr_file_t *interproc;
#endif
#if APR_HAS_POSIXSEM_SERIALIZE
sem_t *psem_interproc;
apr_os_proc_mutex_t os; /* Native mutex holder. */
#if APR_HAS_FCNTL_SERIALIZE || APR_HAS_FLOCK_SERIALIZE
apr_file_t *interproc; /* For apr_file_ calls on native fd. */
int interproc_closing; /* whether the native fd is opened/closed with
* 'interproc' or apr_os_file_put()ed (hence
* needing an an explicit close for consistency
* with other methods).
*/
#endif
#if APR_HAS_PROC_PTHREAD_SERIALIZE
pthread_mutex_t *pthread_interproc;
int pthread_refcounting; /* Whether the native mutex is refcounted or
* apr_os_proc_mutex_put()ed, which makes
* refcounting impossible/undesirable.
*/
#endif
};

View File

@ -67,6 +67,7 @@ struct apr_shm_t {
const char *filename; /* NULL if anonymous */
#if APR_USE_SHMEM_SHMGET || APR_USE_SHMEM_SHMGET_ANON
int shmid; /* shmem ID returned from shmget() */
key_t shmkey; /* shmem key IPC_ANON or returned from ftok() */
#endif
};

View File

@ -21,6 +21,7 @@
#include "apr_private.h"
#include "apr_general.h"
#include "apr_thread_mutex.h"
#include "apr_thread_cond.h"
#include "apr_portable.h"
#include "apr_atomic.h"
@ -32,6 +33,8 @@
struct apr_thread_mutex_t {
apr_pool_t *pool;
pthread_mutex_t mutex;
apr_thread_cond_t *cond;
int locked, num_waiters;
};
#endif

View File

@ -19,6 +19,7 @@
#include "apr_thread_proc.h"
#include "apr_file_io.h"
#include "apr_arch_file_io.h"
#include "apr_perms_set.h"
/* System headers required for thread/process library */
#if APR_HAVE_PTHREAD_H
@ -76,6 +77,14 @@ struct apr_thread_once_t {
#endif
typedef struct apr_procattr_pscb_t apr_procattr_pscb_t;
struct apr_procattr_pscb_t {
struct apr_procattr_pscb_t *next;
apr_perms_setfn_t *perms_set_fn;
apr_fileperms_t perms;
const void *data;
};
struct apr_procattr_t {
apr_pool_t *pool;
apr_file_t *parent_in;
@ -103,6 +112,7 @@ struct apr_procattr_t {
apr_int32_t errchk;
apr_uid_t uid;
apr_gid_t gid;
apr_procattr_pscb_t *perms_set_callbacks;
};
#endif /* ! THREAD_PROC_H */

View File

@ -8,6 +8,9 @@
/* Define if building universal (internal helper macro) */
#undef AC_APPLE_UNIVERSAL_BUILD
/* Define if apr_allocator should use guard pages */
#undef APR_ALLOCATOR_GUARD_PAGES
/* Define if apr_allocator should use mmap */
#undef APR_ALLOCATOR_USES_MMAP
@ -18,6 +21,9 @@
/* Define as function used for conversion of strings to apr_off_t */
#undef APR_OFF_T_STRFN
/* Define if pool functions should abort if concurrent usage is detected */
#undef APR_POOL_CONCURRENCY_CHECK
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
@ -83,6 +89,12 @@
/* Define if accept4 function is supported */
#undef HAVE_ACCEPT4
/* Define to 1 if you have the `acquire_sem' function. */
#undef HAVE_ACQUIRE_SEM
/* Define to 1 if you have the `acquire_sem_etc' function. */
#undef HAVE_ACQUIRE_SEM_ETC
/* Define if async i/o supports message q's */
#undef HAVE_AIO_MSGQ
@ -93,6 +105,9 @@
*/
#undef HAVE_ALLOCA_H
/* Define to 1 if you have the `arc4random_buf' function. */
#undef HAVE_ARC4RANDOM_BUF
/* Define to 1 if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H
@ -123,6 +138,10 @@
/* Define to 1 if you have the <ctype.h> header file. */
#undef HAVE_CTYPE_H
/* Define to 1 if you have the declaration of `SYS_getrandom', and to 0 if you
don't. */
#undef HAVE_DECL_SYS_GETRANDOM
/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you
don't. */
#undef HAVE_DECL_SYS_SIGLIST
@ -211,6 +230,9 @@
/* Define to 1 if you have the `getpwuid_r' function. */
#undef HAVE_GETPWUID_R
/* Define to 1 if you have the `getrandom' function. */
#undef HAVE_GETRANDOM
/* Define to 1 if you have the `getrlimit' function. */
#undef HAVE_GETRLIMIT
@ -226,6 +248,12 @@
/* Define if hstrerror is present */
#undef HAVE_HSTRERROR
/* Define to 1 if you have the `if_indextoname' function. */
#undef HAVE_IF_INDEXTONAME
/* Define to 1 if you have the `if_nametoindex' function. */
#undef HAVE_IF_NAMETOINDEX
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
@ -259,6 +287,9 @@
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define to 1 if you have the <linux/random.h> header file. */
#undef HAVE_LINUX_RANDOM_H
/* Define to 1 if you have the `localtime_r' function. */
#undef HAVE_LOCALTIME_R
@ -274,6 +305,9 @@
/* Define if MAP_ANON is defined in sys/mman.h */
#undef HAVE_MAP_ANON
/* Define to 1 if you have the <memcheck.h> header file. */
#undef HAVE_MEMCHECK_H
/* Define to 1 if you have the `memchr' function. */
#undef HAVE_MEMCHR
@ -295,6 +329,9 @@
/* Define to 1 if you have the `mmap64' function. */
#undef HAVE_MMAP64
/* Define to 1 if you have the `mprotect' function. */
#undef HAVE_MPROTECT
/* Define to 1 if you have the `munmap' function. */
#undef HAVE_MUNMAP
@ -316,6 +353,9 @@
/* Define to 1 if you have the <net/errno.h> header file. */
#undef HAVE_NET_ERRNO_H
/* Define to 1 if you have the <net/if.h> header file. */
#undef HAVE_NET_IF_H
/* Define to 1 if you have the `nl_langinfo' function. */
#undef HAVE_NL_LANGINFO
@ -346,6 +386,9 @@
/* Define to 1 if you have the `pthread_attr_setguardsize' function. */
#undef HAVE_PTHREAD_ATTR_SETGUARDSIZE
/* Define to 1 if you have the `pthread_condattr_setpshared' function. */
#undef HAVE_PTHREAD_CONDATTR_SETPSHARED
/* Define to 1 if you have the <pthread.h> header file. */
#undef HAVE_PTHREAD_H
@ -361,6 +404,12 @@
/* Define if cross-process robust mutexes are available */
#undef HAVE_PTHREAD_MUTEX_ROBUST
/* Define if non-posix/portable cross-process robust mutexes are available */
#undef HAVE_PTHREAD_MUTEX_ROBUST_NP
/* Define to 1 if you have the `pthread_mutex_timedlock' function. */
#undef HAVE_PTHREAD_MUTEX_TIMEDLOCK
/* Define if PTHREAD_PROCESS_SHARED is defined in pthread.h */
#undef HAVE_PTHREAD_PROCESS_SHARED
@ -397,12 +446,21 @@
/* Define to 1 if you have the `semget' function. */
#undef HAVE_SEMGET
/* Define to 1 if you have the `semop' function. */
#undef HAVE_SEMOP
/* Define to 1 if you have the `semtimedop' function. */
#undef HAVE_SEMTIMEDOP
/* Define to 1 if you have the `sem_close' function. */
#undef HAVE_SEM_CLOSE
/* Define to 1 if you have the `sem_post' function. */
#undef HAVE_SEM_POST
/* Define to 1 if you have the `sem_timedwait' function. */
#undef HAVE_SEM_TIMEDWAIT
/* Define if SEM_UNDO is defined in sys/sem.h */
#undef HAVE_SEM_UNDO
@ -586,6 +644,9 @@
/* Define to 1 if you have the <sys/poll.h> header file. */
#undef HAVE_SYS_POLL_H
/* Define to 1 if you have the <sys/random.h> header file. */
#undef HAVE_SYS_RANDOM_H
/* Define to 1 if you have the <sys/resource.h> header file. */
#undef HAVE_SYS_RESOURCE_H
@ -613,6 +674,9 @@
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/syscall.h> header file. */
#undef HAVE_SYS_SYSCALL_H
/* Define to 1 if you have the <sys/sysctl.h> header file. */
#undef HAVE_SYS_SYSCTL_H
@ -688,6 +752,12 @@
/* Define to 1 if you have the <uuid/uuid.h> header file. */
#undef HAVE_UUID_UUID_H
/* Compile in valgrind support */
#undef HAVE_VALGRIND
/* Define to 1 if you have the <valgrind.h> header file. */
#undef HAVE_VALGRIND_H
/* Define if C compiler supports VLA */
#undef HAVE_VLA
@ -706,8 +776,7 @@
/* Define for z/OS pthread API nuances */
#undef HAVE_ZOS_PTHREADS
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#undef LT_OBJDIR
/* Define if EAI_ error codes from getaddrinfo are negative */
@ -743,7 +812,7 @@
/* Define if pthread_getspecific() has two args */
#undef PTHREAD_GETSPECIFIC_TAKES_TWO_ARGS
/* Define if readdir is thread safe */
/* Modern readdir is thread safe */
#undef READDIR_IS_THREAD_SAFE
/* Define to 1 if the `setpgrp' function takes no argument. */
@ -805,6 +874,9 @@
/* Define if SysV semaphores affect threads within the process */
#undef SYSVSEM_IS_GLOBAL
/* Define system call of random */
#undef SYS_RANDOM
/* Define if use of generic atomics is requested */
#undef USE_ATOMICS_GENERIC
@ -817,6 +889,9 @@
/* Define if 4.2BSD-style flock() will be used */
#undef USE_FLOCK_SERIALIZE
/* Define if pthread pshared mutex will be used */
#undef USE_PROC_PTHREAD_SERIALIZE
/* Define if BeOS areas will be used */
#undef USE_SHMEM_BEOS

View File

@ -0,0 +1,84 @@
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file apr_encode_private.h
* @brief APR-UTIL Encoding Private
*/
#ifndef APR_ENCODE_PRIVATE_H
#define APR_ENCODE_PRIVATE_H
#include "apr.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @defgroup APR_Util_Encode_Private
* @ingroup APR_Util
* @{
*/
#if APR_CHARSET_EBCDIC
static int convert_a2e[256] = {
0x00, 0x01, 0x02, 0x03, 0x37, 0x2D, 0x2E, 0x2F, 0x16, 0x05, 0x15, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
0x10, 0x11, 0x12, 0x13, 0x3C, 0x3D, 0x32, 0x26, 0x18, 0x19, 0x3F, 0x27, 0x1C, 0x1D, 0x1E, 0x1F,
0x40, 0x5A, 0x7F, 0x7B, 0x5B, 0x6C, 0x50, 0x7D, 0x4D, 0x5D, 0x5C, 0x4E, 0x6B, 0x60, 0x4B, 0x61,
0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0x7A, 0x5E, 0x4C, 0x7E, 0x6E, 0x6F,
0x7C, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6,
0xD7, 0xD8, 0xD9, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xAD, 0xE0, 0xBD, 0x5F, 0x6D,
0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96,
0x97, 0x98, 0x99, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xC0, 0x4F, 0xD0, 0xA1, 0x07,
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x06, 0x17, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x09, 0x0A, 0x1B,
0x30, 0x31, 0x1A, 0x33, 0x34, 0x35, 0x36, 0x08, 0x38, 0x39, 0x3A, 0x3B, 0x04, 0x14, 0x3E, 0xFF,
0x41, 0xAA, 0x4A, 0xB1, 0x9F, 0xB2, 0x6A, 0xB5, 0xBB, 0xB4, 0x9A, 0x8A, 0xB0, 0xCA, 0xAF, 0xBC,
0x90, 0x8F, 0xEA, 0xFA, 0xBE, 0xA0, 0xB6, 0xB3, 0x9D, 0xDA, 0x9B, 0x8B, 0xB7, 0xB8, 0xB9, 0xAB,
0x64, 0x65, 0x62, 0x66, 0x63, 0x67, 0x9E, 0x68, 0x74, 0x71, 0x72, 0x73, 0x78, 0x75, 0x76, 0x77,
0xAC, 0x69, 0xED, 0xEE, 0xEB, 0xEF, 0xEC, 0xBF, 0x80, 0xFD, 0xFE, 0xFB, 0xFC, 0xBA, 0xAE, 0x59,
0x44, 0x45, 0x42, 0x46, 0x43, 0x47, 0x9C, 0x48, 0x54, 0x51, 0x52, 0x53, 0x58, 0x55, 0x56, 0x57,
0x8C, 0x49, 0xCD, 0xCE, 0xCB, 0xCF, 0xCC, 0xE1, 0x70, 0xDD, 0xDE, 0xDB, 0xDC, 0x8D, 0x8E, 0xDF};
static int convert_e2a[256] = {
0x00, 0x01, 0x02, 0x03, 0x9C, 0x09, 0x86, 0x7F, 0x97, 0x8D, 0x8E, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
0x10, 0x11, 0x12, 0x13, 0x9D, 0x0A, 0x08, 0x87, 0x18, 0x19, 0x92, 0x8F, 0x1C, 0x1D, 0x1E, 0x1F,
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x17, 0x1B, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x05, 0x06, 0x07,
0x90, 0x91, 0x16, 0x93, 0x94, 0x95, 0x96, 0x04, 0x98, 0x99, 0x9A, 0x9B, 0x14, 0x15, 0x9E, 0x1A,
0x20, 0xA0, 0xE2, 0xE4, 0xE0, 0xE1, 0xE3, 0xE5, 0xE7, 0xF1, 0xA2, 0x2E, 0x3C, 0x28, 0x2B, 0x7C,
0x26, 0xE9, 0xEA, 0xEB, 0xE8, 0xED, 0xEE, 0xEF, 0xEC, 0xDF, 0x21, 0x24, 0x2A, 0x29, 0x3B, 0x5E,
0x2D, 0x2F, 0xC2, 0xC4, 0xC0, 0xC1, 0xC3, 0xC5, 0xC7, 0xD1, 0xA6, 0x2C, 0x25, 0x5F, 0x3E, 0x3F,
0xF8, 0xC9, 0xCA, 0xCB, 0xC8, 0xCD, 0xCE, 0xCF, 0xCC, 0x60, 0x3A, 0x23, 0x40, 0x27, 0x3D, 0x22,
0xD8, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0xAB, 0xBB, 0xF0, 0xFD, 0xFE, 0xB1,
0xB0, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0xAA, 0xBA, 0xE6, 0xB8, 0xC6, 0xA4,
0xB5, 0x7E, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0xA1, 0xBF, 0xD0, 0x5B, 0xDE, 0xAE,
0xAC, 0xA3, 0xA5, 0xB7, 0xA9, 0xA7, 0xB6, 0xBC, 0xBD, 0xBE, 0xDD, 0xA8, 0xAF, 0x5D, 0xB4, 0xD7,
0x7B, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0xAD, 0xF4, 0xF6, 0xF2, 0xF3, 0xF5,
0x7D, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0xB9, 0xFB, 0xFC, 0xF9, 0xFA, 0xFF,
0x5C, 0xF7, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0xB2, 0xD4, 0xD6, 0xD2, 0xD3, 0xD5,
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0xB3, 0xDB, 0xDC, 0xD9, 0xDA, 0x9F};
#define decode ENCODE_TO_ASCII(ch) convert_e2a[(unsigned char)ch]
#define decode ENCODE_TO_NATIVE(ch) convert_a2e[(unsigned char)ch]
#else /* APR_CHARSET_EBCDIC */
#define ENCODE_TO_ASCII(ch) (ch)
#define ENCODE_TO_NATIVE(ch) (ch)
#endif /* !APR_CHARSET_EBCDIC */
/** @} */
#ifdef __cplusplus
}
#endif
#endif /* !APR_ENCODE_PRIVATE_H */

View File

@ -19,8 +19,6 @@ CFG=libapr - Win32 Release
!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 Release9x" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "libapr - Win32 Debug9x" (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
@ -47,7 +45,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
# ADD CPP /nologo /MD /W3 /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 "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\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" /I "./include/private" /D "NDEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "WINNT" /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"
@ -79,7 +77,7 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
# 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 "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\libapr_src" /FD /EHsc /c
# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /I "./include/private" /D "_DEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "WINNT" /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"
@ -97,70 +95,6 @@ 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 Release9x"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "9x\Release"
# PROP BASE Intermediate_Dir "9x\Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "9x\Release"
# PROP Intermediate_Dir "9x\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 "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:"9x\Release\libapr-1.dll" /pdb:"9x\Release\libapr-1.pdb" /implib:"9x\Release\libapr-1.lib" /MACHINE:X86 /opt:ref
# Begin Special Build Tool
TargetPath=9x\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 Debug9x"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "9x\Debug"
# PROP BASE Intermediate_Dir "9x\Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "9x\Debug"
# PROP Intermediate_Dir "9x\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 "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:"9x\Debug\libapr-1.dll" /pdb:"9x\Debug\libapr-1.pdb" /implib:"9x\Debug\libapr-1.lib" /MACHINE:X86
# Begin Special Build Tool
TargetPath=9x\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
@ -175,7 +109,7 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
# 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 "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\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" /I "./include/private" /D "NDEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "WINNT" /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"
@ -207,7 +141,7 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
# 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 "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\libapr_src" /FD /EHsc /c
# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /I "./include/private" /D "_DEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "WINNT" /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"
@ -231,8 +165,6 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
# Name "libapr - Win32 Release"
# Name "libapr - Win32 Debug"
# Name "libapr - Win32 Release9x"
# Name "libapr - Win32 Debug9x"
# Name "libapr - x64 Release"
# Name "libapr - x64 Debug"
# Begin Group "Source Files"
@ -245,6 +177,10 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
SOURCE=.\atomic\win32\apr_atomic.c
# End Source File
# Begin Source File
SOURCE=.\atomic\win32\apr_atomic64.c
# End Source File
# End Group
# Begin Group "dso"
@ -259,6 +195,10 @@ SOURCE=.\dso\win32\dso.c
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\encoding\apr_encode.c
# End Source File
# Begin Source File
SOURCE=.\encoding\apr_escape.c
# End Source File
# End Group
@ -490,6 +430,10 @@ SOURCE=.\poll\unix\pollset.c
SOURCE=.\poll\unix\select.c
# End Source File
# Begin Source File
SOURCE=.\poll\unix\wakeup.c
# End Source File
# End Group
# Begin Group "random"
@ -524,6 +468,10 @@ SOURCE=.\strings\apr_cpystrn.c
# End Source File
# Begin Source File
SOURCE=.\strings\apr_cstr.c
# End Source File
# Begin Source File
SOURCE=.\strings\apr_fnmatch.c
# End Source File
# Begin Source File
@ -693,26 +641,6 @@ InputPath=.\include\apr.hw
# End Custom Build
!ELSEIF "$(CFG)" == "libapr - Win32 Release9x"
# 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 Debug9x"
# 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
@ -782,28 +710,6 @@ InputPath=.\include\apr_escape.h
# End Custom Build
!ELSEIF "$(CFG)" == "libapr - Win32 Release9x"
# Begin Custom Build - Creating gen_test_char.exe and apr_escape_test_char.h
InputPath=.\include\apr_escape.h
".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
cl.exe /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /I ".\include" /Fo.\9x\Release\gen_test_char /Fe.\9x\Release\gen_test_char.exe .\tools\gen_test_char.c
.\9x\Release\gen_test_char.exe > .\include\apr_escape_test_char.h
# End Custom Build
!ELSEIF "$(CFG)" == "libapr - Win32 Debug9x"
# Begin Custom Build - Creating gen_test_char.exe and apr_escape_test_char.h
InputPath=.\include\apr_escape.h
".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
cl.exe /nologo /W3 /EHsc /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /I ".\include" /Fo.\9x\Debug\gen_test_char /Fe.\9x\Debug\gen_test_char.exe .\tools\gen_test_char.c
.\9x\Debug\gen_test_char.exe > .\include\apr_escape_test_char.h
# End Custom Build
!ELSEIF "$(CFG)" == "libapr - x64 Release"
# Begin Custom Build - Creating gen_test_char.exe and apr_escape_test_char.h

View File

@ -15,8 +15,6 @@ CFG=libapr - Win32 Release
!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 Release9x" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "libapr - Win32 Debug9x" (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
@ -38,12 +36,15 @@ DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
OutDir=.\Release
# End Custom Macros
ALL : ".\Release\gen_test_char.exe" "$(OUTDIR)\libapr-1.dll" "$(DS_POSTBUILD_DEP)"
ALL : ".\include\apr.hw" ".\include\apr_escape.h" "$(OUTDIR)\libapr-1.dll" "$(DS_POSTBUILD_DEP)"
CLEAN :
-@erase "$(INTDIR)\apr_atomic.obj"
-@erase "$(INTDIR)\apr_atomic64.obj"
-@erase "$(INTDIR)\apr_cpystrn.obj"
-@erase "$(INTDIR)\apr_cpstr.obj"
-@erase "$(INTDIR)\apr_encode.obj"
-@erase "$(INTDIR)\apr_escape.obj"
-@erase "$(INTDIR)\apr_fnmatch.obj"
-@erase "$(INTDIR)\apr_getpass.obj"
@ -117,6 +118,7 @@ CLEAN :
-@erase "$(INTDIR)\userinfo.obj"
-@erase "$(INTDIR)\utf8.obj"
-@erase "$(INTDIR)\version.obj"
-@erase "$(INTDIR)\wakeup.obj"
-@erase "$(OUTDIR)\libapr-1.dll"
-@erase "$(OUTDIR)\libapr-1.exp"
-@erase "$(OUTDIR)\libapr-1.lib"
@ -130,7 +132,7 @@ CLEAN :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/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 "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libapr_src" /FD /c
CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /I "./include/private" /D "NDEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libapr_src" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
@ -171,10 +173,12 @@ BSC32_FLAGS=/nologo /o"$(OUTDIR)\libapr.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libapr-1.pdb" /debug /out:"$(OUTDIR)\libapr-1.dll" /implib:"$(OUTDIR)\libapr-1.lib" /MACHINE:X86 /opt:ref
LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libapr-1.pdb" /debug /out:"$(OUTDIR)\libapr-1.dll" /implib:"$(OUTDIR)\libapr-1.lib" /opt:ref
LINK32_OBJS= \
"$(INTDIR)\apr_atomic.obj" \
"$(INTDIR)\apr_atomic64.obj" \
"$(INTDIR)\dso.obj" \
"$(INTDIR)\apr_encode.obj" \
"$(INTDIR)\apr_escape.obj" \
"$(INTDIR)\buffer.obj" \
"$(INTDIR)\copy.obj" \
@ -229,6 +233,7 @@ LINK32_OBJS= \
"$(INTDIR)\sha2_glue.obj" \
"$(INTDIR)\shm.obj" \
"$(INTDIR)\apr_cpystrn.obj" \
"$(INTDIR)\apr_cstr.obj" \
"$(INTDIR)\apr_fnmatch.obj" \
"$(INTDIR)\apr_snprintf.obj" \
"$(INTDIR)\apr_strings.obj" \
@ -245,6 +250,7 @@ LINK32_OBJS= \
"$(INTDIR)\timestr.obj" \
"$(INTDIR)\groupinfo.obj" \
"$(INTDIR)\userinfo.obj" \
"$(INTDIR)\wakeup.obj" \
"$(INTDIR)\libapr.res"
"$(OUTDIR)\libapr-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
@ -274,12 +280,15 @@ DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
OutDir=.\Debug
# End Custom Macros
ALL : ".\include\apr_escape_test_char.h" ".\Debug\gen_test_char.exe" "$(OUTDIR)\libapr-1.dll" "$(DS_POSTBUILD_DEP)"
ALL : ".\include\apr.hw" ".\include\apr_escape.h" "$(OUTDIR)\libapr-1.dll" "$(DS_POSTBUILD_DEP)"
CLEAN :
-@erase "$(INTDIR)\apr_atomic.obj"
-@erase "$(INTDIR)\apr_atomic64.obj"
-@erase "$(INTDIR)\apr_cpystrn.obj"
-@erase "$(INTDIR)\apr_cpstr.obj"
-@erase "$(INTDIR)\apr_encode.obj"
-@erase "$(INTDIR)\apr_escape.obj"
-@erase "$(INTDIR)\apr_fnmatch.obj"
-@erase "$(INTDIR)\apr_getpass.obj"
@ -353,6 +362,7 @@ CLEAN :
-@erase "$(INTDIR)\userinfo.obj"
-@erase "$(INTDIR)\utf8.obj"
-@erase "$(INTDIR)\version.obj"
-@erase "$(INTDIR)\wakeup.obj"
-@erase "$(OUTDIR)\libapr-1.dll"
-@erase "$(OUTDIR)\libapr-1.exp"
-@erase "$(OUTDIR)\libapr-1.lib"
@ -366,7 +376,7 @@ CLEAN :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/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 "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libapr_src" /FD /EHsc /c
CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /I "./include/private" /D "_DEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libapr_src" /FD /EHsc /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
@ -407,10 +417,12 @@ BSC32_FLAGS=/nologo /o"$(OUTDIR)\libapr.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libapr-1.pdb" /debug /out:"$(OUTDIR)\libapr-1.dll" /implib:"$(OUTDIR)\libapr-1.lib" /MACHINE:X86
LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libapr-1.pdb" /debug /out:"$(OUTDIR)\libapr-1.dll" /implib:"$(OUTDIR)\libapr-1.lib"
LINK32_OBJS= \
"$(INTDIR)\apr_atomic.obj" \
"$(INTDIR)\apr_atomic64.obj" \
"$(INTDIR)\dso.obj" \
"$(INTDIR)\apr_encode.obj" \
"$(INTDIR)\apr_escape.obj" \
"$(INTDIR)\buffer.obj" \
"$(INTDIR)\copy.obj" \
@ -465,6 +477,7 @@ LINK32_OBJS= \
"$(INTDIR)\sha2_glue.obj" \
"$(INTDIR)\shm.obj" \
"$(INTDIR)\apr_cpystrn.obj" \
"$(INTDIR)\apr_cstr.obj" \
"$(INTDIR)\apr_fnmatch.obj" \
"$(INTDIR)\apr_snprintf.obj" \
"$(INTDIR)\apr_strings.obj" \
@ -481,6 +494,7 @@ LINK32_OBJS= \
"$(INTDIR)\timestr.obj" \
"$(INTDIR)\groupinfo.obj" \
"$(INTDIR)\userinfo.obj" \
"$(INTDIR)\wakeup.obj" \
"$(INTDIR)\libapr.res"
"$(OUTDIR)\libapr-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
@ -501,478 +515,6 @@ OutDir=.\Debug
if exist .\Debug\libapr-1.dll.manifest mt.exe -manifest .\Debug\libapr-1.dll.manifest -outputresource:.\Debug\libapr-1.dll;2
echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
!ELSEIF "$(CFG)" == "libapr - Win32 Release9x"
OUTDIR=.\9x\Release
INTDIR=.\9x\Release
DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
# Begin Custom Macros
OutDir=.\9x\Release
# End Custom Macros
ALL : ".\include\apr_escape_test_char.h" ".\9x\Release\gen_test_char.exe" "$(OUTDIR)\libapr-1.dll" "$(DS_POSTBUILD_DEP)"
CLEAN :
-@erase "$(INTDIR)\apr_atomic.obj"
-@erase "$(INTDIR)\apr_cpystrn.obj"
-@erase "$(INTDIR)\apr_escape.obj"
-@erase "$(INTDIR)\apr_fnmatch.obj"
-@erase "$(INTDIR)\apr_getpass.obj"
-@erase "$(INTDIR)\apr_hash.obj"
-@erase "$(INTDIR)\apr_pools.obj"
-@erase "$(INTDIR)\apr_random.obj"
-@erase "$(INTDIR)\apr_skiplist.obj"
-@erase "$(INTDIR)\apr_snprintf.obj"
-@erase "$(INTDIR)\apr_strings.obj"
-@erase "$(INTDIR)\apr_strnatcmp.obj"
-@erase "$(INTDIR)\apr_strtok.obj"
-@erase "$(INTDIR)\apr_tables.obj"
-@erase "$(INTDIR)\buffer.obj"
-@erase "$(INTDIR)\charset.obj"
-@erase "$(INTDIR)\common.obj"
-@erase "$(INTDIR)\copy.obj"
-@erase "$(INTDIR)\dir.obj"
-@erase "$(INTDIR)\dso.obj"
-@erase "$(INTDIR)\env.obj"
-@erase "$(INTDIR)\errorcodes.obj"
-@erase "$(INTDIR)\fileacc.obj"
-@erase "$(INTDIR)\filedup.obj"
-@erase "$(INTDIR)\filepath.obj"
-@erase "$(INTDIR)\filepath_util.obj"
-@erase "$(INTDIR)\filestat.obj"
-@erase "$(INTDIR)\filesys.obj"
-@erase "$(INTDIR)\flock.obj"
-@erase "$(INTDIR)\fullrw.obj"
-@erase "$(INTDIR)\getopt.obj"
-@erase "$(INTDIR)\groupinfo.obj"
-@erase "$(INTDIR)\inet_ntop.obj"
-@erase "$(INTDIR)\inet_pton.obj"
-@erase "$(INTDIR)\internal.obj"
-@erase "$(INTDIR)\libapr.res"
-@erase "$(INTDIR)\libapr_src.idb"
-@erase "$(INTDIR)\libapr_src.pdb"
-@erase "$(INTDIR)\misc.obj"
-@erase "$(INTDIR)\mktemp.obj"
-@erase "$(INTDIR)\mmap.obj"
-@erase "$(INTDIR)\multicast.obj"
-@erase "$(INTDIR)\open.obj"
-@erase "$(INTDIR)\otherchild.obj"
-@erase "$(INTDIR)\pipe.obj"
-@erase "$(INTDIR)\poll.obj"
-@erase "$(INTDIR)\pollcb.obj"
-@erase "$(INTDIR)\pollset.obj"
-@erase "$(INTDIR)\proc.obj"
-@erase "$(INTDIR)\proc_mutex.obj"
-@erase "$(INTDIR)\rand.obj"
-@erase "$(INTDIR)\readwrite.obj"
-@erase "$(INTDIR)\seek.obj"
-@erase "$(INTDIR)\select.obj"
-@erase "$(INTDIR)\sendrecv.obj"
-@erase "$(INTDIR)\sha2.obj"
-@erase "$(INTDIR)\sha2_glue.obj"
-@erase "$(INTDIR)\shm.obj"
-@erase "$(INTDIR)\signals.obj"
-@erase "$(INTDIR)\sockaddr.obj"
-@erase "$(INTDIR)\socket_util.obj"
-@erase "$(INTDIR)\sockets.obj"
-@erase "$(INTDIR)\sockopt.obj"
-@erase "$(INTDIR)\start.obj"
-@erase "$(INTDIR)\tempdir.obj"
-@erase "$(INTDIR)\thread.obj"
-@erase "$(INTDIR)\thread_cond.obj"
-@erase "$(INTDIR)\thread_mutex.obj"
-@erase "$(INTDIR)\thread_rwlock.obj"
-@erase "$(INTDIR)\threadpriv.obj"
-@erase "$(INTDIR)\time.obj"
-@erase "$(INTDIR)\timestr.obj"
-@erase "$(INTDIR)\userinfo.obj"
-@erase "$(INTDIR)\utf8.obj"
-@erase "$(INTDIR)\version.obj"
-@erase "$(OUTDIR)\libapr-1.dll"
-@erase "$(OUTDIR)\libapr-1.exp"
-@erase "$(OUTDIR)\libapr-1.lib"
-@erase "$(OUTDIR)\libapr-1.pdb"
-@erase ".\include\apr.h"
-@erase ".\include\apr_gen_test_char.h"
-@erase "$(OUTDIR)\gen_test_char.exe"
-@erase "$(OUTDIR)\gen_test_char.obj"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/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
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
MTL=midl.exe
MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
RSC=rc.exe
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\libapr.res" /i "./include" /d "NDEBUG" /d "APR_VERSION_ONLY"
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\libapr.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libapr-1.pdb" /debug /out:"$(OUTDIR)\libapr-1.dll" /implib:"$(OUTDIR)\libapr-1.lib" /MACHINE:X86 /opt:ref
LINK32_OBJS= \
"$(INTDIR)\apr_atomic.obj" \
"$(INTDIR)\dso.obj" \
"$(INTDIR)\apr_escape.obj" \
"$(INTDIR)\buffer.obj" \
"$(INTDIR)\copy.obj" \
"$(INTDIR)\dir.obj" \
"$(INTDIR)\fileacc.obj" \
"$(INTDIR)\filedup.obj" \
"$(INTDIR)\filepath.obj" \
"$(INTDIR)\filepath_util.obj" \
"$(INTDIR)\filestat.obj" \
"$(INTDIR)\filesys.obj" \
"$(INTDIR)\flock.obj" \
"$(INTDIR)\fullrw.obj" \
"$(INTDIR)\mktemp.obj" \
"$(INTDIR)\open.obj" \
"$(INTDIR)\pipe.obj" \
"$(INTDIR)\readwrite.obj" \
"$(INTDIR)\seek.obj" \
"$(INTDIR)\tempdir.obj" \
"$(INTDIR)\proc_mutex.obj" \
"$(INTDIR)\thread_cond.obj" \
"$(INTDIR)\thread_mutex.obj" \
"$(INTDIR)\thread_rwlock.obj" \
"$(INTDIR)\apr_pools.obj" \
"$(INTDIR)\charset.obj" \
"$(INTDIR)\env.obj" \
"$(INTDIR)\errorcodes.obj" \
"$(INTDIR)\getopt.obj" \
"$(INTDIR)\internal.obj" \
"$(INTDIR)\misc.obj" \
"$(INTDIR)\otherchild.obj" \
"$(INTDIR)\rand.obj" \
"$(INTDIR)\start.obj" \
"$(INTDIR)\utf8.obj" \
"$(INTDIR)\version.obj" \
"$(INTDIR)\common.obj" \
"$(INTDIR)\mmap.obj" \
"$(INTDIR)\inet_ntop.obj" \
"$(INTDIR)\inet_pton.obj" \
"$(INTDIR)\multicast.obj" \
"$(INTDIR)\sendrecv.obj" \
"$(INTDIR)\sockaddr.obj" \
"$(INTDIR)\sockets.obj" \
"$(INTDIR)\socket_util.obj" \
"$(INTDIR)\sockopt.obj" \
"$(INTDIR)\apr_getpass.obj" \
"$(INTDIR)\poll.obj" \
"$(INTDIR)\pollcb.obj" \
"$(INTDIR)\pollset.obj" \
"$(INTDIR)\select.obj" \
"$(INTDIR)\apr_random.obj" \
"$(INTDIR)\sha2.obj" \
"$(INTDIR)\sha2_glue.obj" \
"$(INTDIR)\shm.obj" \
"$(INTDIR)\apr_cpystrn.obj" \
"$(INTDIR)\apr_fnmatch.obj" \
"$(INTDIR)\apr_snprintf.obj" \
"$(INTDIR)\apr_strings.obj" \
"$(INTDIR)\apr_strnatcmp.obj" \
"$(INTDIR)\apr_strtok.obj" \
"$(INTDIR)\apr_hash.obj" \
"$(INTDIR)\apr_tables.obj" \
"$(INTDIR)\apr_skiplist.obj" \
"$(INTDIR)\proc.obj" \
"$(INTDIR)\signals.obj" \
"$(INTDIR)\thread.obj" \
"$(INTDIR)\threadpriv.obj" \
"$(INTDIR)\time.obj" \
"$(INTDIR)\timestr.obj" \
"$(INTDIR)\groupinfo.obj" \
"$(INTDIR)\userinfo.obj" \
"$(INTDIR)\libapr.res"
"$(OUTDIR)\libapr-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
TargetPath=.\9x\Release\libapr-1.dll
SOURCE="$(InputPath)"
PostBuild_Desc=Embed .manifest
DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
# Begin Custom Macros
OutDir=.\9x\Release
# End Custom Macros
"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\libapr-1.dll"
if exist .\9x\Release\libapr-1.dll.manifest mt.exe -manifest .\9x\Release\libapr-1.dll.manifest -outputresource:.\9x\Release\libapr-1.dll;2
echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
!ELSEIF "$(CFG)" == "libapr - Win32 Debug9x"
OUTDIR=.\9x\Debug
INTDIR=.\9x\Debug
DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
# Begin Custom Macros
OutDir=.\9x\Debug
# End Custom Macros
ALL : ".\include\apr_escape_test_char.h" ".\include\apr.h" ".\9x\Debug\gen_test_char.exe" "$(OUTDIR)\libapr-1.dll" "$(DS_POSTBUILD_DEP)"
CLEAN :
-@erase "$(INTDIR)\apr_atomic.obj"
-@erase "$(INTDIR)\apr_cpystrn.obj"
-@erase "$(INTDIR)\apr_escape.obj"
-@erase "$(INTDIR)\apr_fnmatch.obj"
-@erase "$(INTDIR)\apr_getpass.obj"
-@erase "$(INTDIR)\apr_hash.obj"
-@erase "$(INTDIR)\apr_pools.obj"
-@erase "$(INTDIR)\apr_random.obj"
-@erase "$(INTDIR)\apr_skiplist.obj"
-@erase "$(INTDIR)\apr_snprintf.obj"
-@erase "$(INTDIR)\apr_strings.obj"
-@erase "$(INTDIR)\apr_strnatcmp.obj"
-@erase "$(INTDIR)\apr_strtok.obj"
-@erase "$(INTDIR)\apr_tables.obj"
-@erase "$(INTDIR)\buffer.obj"
-@erase "$(INTDIR)\charset.obj"
-@erase "$(INTDIR)\common.obj"
-@erase "$(INTDIR)\copy.obj"
-@erase "$(INTDIR)\dir.obj"
-@erase "$(INTDIR)\dso.obj"
-@erase "$(INTDIR)\env.obj"
-@erase "$(INTDIR)\errorcodes.obj"
-@erase "$(INTDIR)\fileacc.obj"
-@erase "$(INTDIR)\filedup.obj"
-@erase "$(INTDIR)\filepath.obj"
-@erase "$(INTDIR)\filepath_util.obj"
-@erase "$(INTDIR)\filestat.obj"
-@erase "$(INTDIR)\filesys.obj"
-@erase "$(INTDIR)\flock.obj"
-@erase "$(INTDIR)\fullrw.obj"
-@erase "$(INTDIR)\getopt.obj"
-@erase "$(INTDIR)\groupinfo.obj"
-@erase "$(INTDIR)\inet_ntop.obj"
-@erase "$(INTDIR)\inet_pton.obj"
-@erase "$(INTDIR)\internal.obj"
-@erase "$(INTDIR)\libapr.res"
-@erase "$(INTDIR)\libapr_src.idb"
-@erase "$(INTDIR)\libapr_src.pdb"
-@erase "$(INTDIR)\misc.obj"
-@erase "$(INTDIR)\mktemp.obj"
-@erase "$(INTDIR)\mmap.obj"
-@erase "$(INTDIR)\multicast.obj"
-@erase "$(INTDIR)\open.obj"
-@erase "$(INTDIR)\otherchild.obj"
-@erase "$(INTDIR)\pipe.obj"
-@erase "$(INTDIR)\poll.obj"
-@erase "$(INTDIR)\pollcb.obj"
-@erase "$(INTDIR)\pollset.obj"
-@erase "$(INTDIR)\proc.obj"
-@erase "$(INTDIR)\proc_mutex.obj"
-@erase "$(INTDIR)\rand.obj"
-@erase "$(INTDIR)\readwrite.obj"
-@erase "$(INTDIR)\seek.obj"
-@erase "$(INTDIR)\select.obj"
-@erase "$(INTDIR)\sendrecv.obj"
-@erase "$(INTDIR)\sha2.obj"
-@erase "$(INTDIR)\sha2_glue.obj"
-@erase "$(INTDIR)\shm.obj"
-@erase "$(INTDIR)\signals.obj"
-@erase "$(INTDIR)\sockaddr.obj"
-@erase "$(INTDIR)\socket_util.obj"
-@erase "$(INTDIR)\sockets.obj"
-@erase "$(INTDIR)\sockopt.obj"
-@erase "$(INTDIR)\start.obj"
-@erase "$(INTDIR)\tempdir.obj"
-@erase "$(INTDIR)\thread.obj"
-@erase "$(INTDIR)\thread_cond.obj"
-@erase "$(INTDIR)\thread_mutex.obj"
-@erase "$(INTDIR)\thread_rwlock.obj"
-@erase "$(INTDIR)\threadpriv.obj"
-@erase "$(INTDIR)\time.obj"
-@erase "$(INTDIR)\timestr.obj"
-@erase "$(INTDIR)\userinfo.obj"
-@erase "$(INTDIR)\utf8.obj"
-@erase "$(INTDIR)\version.obj"
-@erase "$(OUTDIR)\libapr-1.dll"
-@erase "$(OUTDIR)\libapr-1.exp"
-@erase "$(OUTDIR)\libapr-1.lib"
-@erase "$(OUTDIR)\libapr-1.pdb"
-@erase ".\include\apr.h"
-@erase ".\include\apr_gen_test_char.h"
-@erase "$(OUTDIR)\gen_test_char.exe"
-@erase "$(OUTDIR)\gen_test_char.obj"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/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
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
MTL=midl.exe
MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
RSC=rc.exe
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\libapr.res" /i "./include" /d "_DEBUG" /d "APR_VERSION_ONLY"
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\libapr.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libapr-1.pdb" /debug /out:"$(OUTDIR)\libapr-1.dll" /implib:"$(OUTDIR)\libapr-1.lib" /MACHINE:X86
LINK32_OBJS= \
"$(INTDIR)\apr_atomic.obj" \
"$(INTDIR)\dso.obj" \
"$(INTDIR)\apr_escape.obj" \
"$(INTDIR)\buffer.obj" \
"$(INTDIR)\copy.obj" \
"$(INTDIR)\dir.obj" \
"$(INTDIR)\fileacc.obj" \
"$(INTDIR)\filedup.obj" \
"$(INTDIR)\filepath.obj" \
"$(INTDIR)\filepath_util.obj" \
"$(INTDIR)\filestat.obj" \
"$(INTDIR)\filesys.obj" \
"$(INTDIR)\flock.obj" \
"$(INTDIR)\fullrw.obj" \
"$(INTDIR)\mktemp.obj" \
"$(INTDIR)\open.obj" \
"$(INTDIR)\pipe.obj" \
"$(INTDIR)\readwrite.obj" \
"$(INTDIR)\seek.obj" \
"$(INTDIR)\tempdir.obj" \
"$(INTDIR)\proc_mutex.obj" \
"$(INTDIR)\thread_cond.obj" \
"$(INTDIR)\thread_mutex.obj" \
"$(INTDIR)\thread_rwlock.obj" \
"$(INTDIR)\apr_pools.obj" \
"$(INTDIR)\charset.obj" \
"$(INTDIR)\env.obj" \
"$(INTDIR)\errorcodes.obj" \
"$(INTDIR)\getopt.obj" \
"$(INTDIR)\internal.obj" \
"$(INTDIR)\misc.obj" \
"$(INTDIR)\otherchild.obj" \
"$(INTDIR)\rand.obj" \
"$(INTDIR)\start.obj" \
"$(INTDIR)\utf8.obj" \
"$(INTDIR)\version.obj" \
"$(INTDIR)\common.obj" \
"$(INTDIR)\mmap.obj" \
"$(INTDIR)\inet_ntop.obj" \
"$(INTDIR)\inet_pton.obj" \
"$(INTDIR)\multicast.obj" \
"$(INTDIR)\sendrecv.obj" \
"$(INTDIR)\sockaddr.obj" \
"$(INTDIR)\sockets.obj" \
"$(INTDIR)\socket_util.obj" \
"$(INTDIR)\sockopt.obj" \
"$(INTDIR)\apr_getpass.obj" \
"$(INTDIR)\poll.obj" \
"$(INTDIR)\pollcb.obj" \
"$(INTDIR)\pollset.obj" \
"$(INTDIR)\select.obj" \
"$(INTDIR)\apr_random.obj" \
"$(INTDIR)\sha2.obj" \
"$(INTDIR)\sha2_glue.obj" \
"$(INTDIR)\shm.obj" \
"$(INTDIR)\apr_cpystrn.obj" \
"$(INTDIR)\apr_fnmatch.obj" \
"$(INTDIR)\apr_snprintf.obj" \
"$(INTDIR)\apr_strings.obj" \
"$(INTDIR)\apr_strnatcmp.obj" \
"$(INTDIR)\apr_strtok.obj" \
"$(INTDIR)\apr_hash.obj" \
"$(INTDIR)\apr_tables.obj" \
"$(INTDIR)\apr_skiplist.obj" \
"$(INTDIR)\proc.obj" \
"$(INTDIR)\signals.obj" \
"$(INTDIR)\thread.obj" \
"$(INTDIR)\threadpriv.obj" \
"$(INTDIR)\time.obj" \
"$(INTDIR)\timestr.obj" \
"$(INTDIR)\groupinfo.obj" \
"$(INTDIR)\userinfo.obj" \
"$(INTDIR)\libapr.res"
"$(OUTDIR)\libapr-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
TargetPath=.\9x\Debug\libapr-1.dll
SOURCE="$(InputPath)"
PostBuild_Desc=Embed .manifest
DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
# Begin Custom Macros
OutDir=.\9x\Debug
# End Custom Macros
"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\libapr-1.dll"
if exist .\9x\Debug\libapr-1.dll.manifest mt.exe -manifest .\9x\Debug\libapr-1.dll.manifest -outputresource:.\9x\Debug\libapr-1.dll;2
echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
!ELSEIF "$(CFG)" == "libapr - x64 Release"
OUTDIR=.\x64\Release
@ -982,12 +524,15 @@ DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
OutDir=.\x64\Release
# End Custom Macros
ALL : ".\x64\Release\gen_test_char.exe" ".\include\apr_escape_test_char.h" "$(OUTDIR)\libapr-1.dll" "$(DS_POSTBUILD_DEP)"
ALL : ".\include\apr.hw" ".\include\apr_escape.h" "$(OUTDIR)\libapr-1.dll" "$(DS_POSTBUILD_DEP)"
CLEAN :
-@erase "$(INTDIR)\apr_atomic.obj"
-@erase "$(INTDIR)\apr_atomic64.obj"
-@erase "$(INTDIR)\apr_cpystrn.obj"
-@erase "$(INTDIR)\apr_cpstr.obj"
-@erase "$(INTDIR)\apr_encode.obj"
-@erase "$(INTDIR)\apr_escape.obj"
-@erase "$(INTDIR)\apr_fnmatch.obj"
-@erase "$(INTDIR)\apr_getpass.obj"
@ -1034,6 +579,7 @@ CLEAN :
-@erase "$(INTDIR)\poll.obj"
-@erase "$(INTDIR)\pollcb.obj"
-@erase "$(INTDIR)\pollset.obj"
-@erase "$(INTDIR)\wakeup.obj"
-@erase "$(INTDIR)\proc.obj"
-@erase "$(INTDIR)\proc_mutex.obj"
-@erase "$(INTDIR)\rand.obj"
@ -1074,7 +620,7 @@ CLEAN :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/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 "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libapr_src" /FD /c
CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /I "./include/private" /D "NDEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libapr_src" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
@ -1115,10 +661,12 @@ BSC32_FLAGS=/nologo /o"$(OUTDIR)\libapr.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libapr-1.pdb" /debug /out:"$(OUTDIR)\libapr-1.dll" /implib:"$(OUTDIR)\libapr-1.lib" /MACHINE:X64 /opt:ref
LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libapr-1.pdb" /debug /out:"$(OUTDIR)\libapr-1.dll" /implib:"$(OUTDIR)\libapr-1.lib" /opt:ref
LINK32_OBJS= \
"$(INTDIR)\apr_atomic.obj" \
"$(INTDIR)\apr_atomic64.obj" \
"$(INTDIR)\dso.obj" \
"$(INTDIR)\apr_encode.obj" \
"$(INTDIR)\apr_escape.obj" \
"$(INTDIR)\buffer.obj" \
"$(INTDIR)\copy.obj" \
@ -1167,12 +715,14 @@ LINK32_OBJS= \
"$(INTDIR)\poll.obj" \
"$(INTDIR)\pollcb.obj" \
"$(INTDIR)\pollset.obj" \
"$(INTDIR)\wakeup.obj" \
"$(INTDIR)\select.obj" \
"$(INTDIR)\apr_random.obj" \
"$(INTDIR)\sha2.obj" \
"$(INTDIR)\sha2_glue.obj" \
"$(INTDIR)\shm.obj" \
"$(INTDIR)\apr_cpystrn.obj" \
"$(INTDIR)\apr_cstr.obj" \
"$(INTDIR)\apr_fnmatch.obj" \
"$(INTDIR)\apr_snprintf.obj" \
"$(INTDIR)\apr_strings.obj" \
@ -1218,12 +768,15 @@ DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
OutDir=.\x64\Debug
# End Custom Macros
ALL : ".\x64\Debug\gen_test_char.exe" ".\include\apr_escape_test_char.h" "$(OUTDIR)\libapr-1.dll" "$(DS_POSTBUILD_DEP)"
ALL : ".\include\apr.hw" ".\include\apr_escape.h" "$(OUTDIR)\libapr-1.dll" "$(DS_POSTBUILD_DEP)"
CLEAN :
-@erase "$(INTDIR)\apr_atomic.obj"
-@erase "$(INTDIR)\apr_atomic64.obj"
-@erase "$(INTDIR)\apr_cpystrn.obj"
-@erase "$(INTDIR)\apr_cpstr.obj"
-@erase "$(INTDIR)\apr_encode.obj"
-@erase "$(INTDIR)\apr_escape.obj"
-@erase "$(INTDIR)\apr_fnmatch.obj"
-@erase "$(INTDIR)\apr_getpass.obj"
@ -1270,6 +823,7 @@ CLEAN :
-@erase "$(INTDIR)\poll.obj"
-@erase "$(INTDIR)\pollcb.obj"
-@erase "$(INTDIR)\pollset.obj"
-@erase "$(INTDIR)\wakeup.obj"
-@erase "$(INTDIR)\proc.obj"
-@erase "$(INTDIR)\proc_mutex.obj"
-@erase "$(INTDIR)\rand.obj"
@ -1310,7 +864,7 @@ CLEAN :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/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 "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libapr_src" /FD /EHsc /c
CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /I "./include/private" /D "_DEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libapr_src" /FD /EHsc /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
@ -1351,10 +905,12 @@ BSC32_FLAGS=/nologo /o"$(OUTDIR)\libapr.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libapr-1.pdb" /debug /out:"$(OUTDIR)\libapr-1.dll" /implib:"$(OUTDIR)\libapr-1.lib" /MACHINE:X64
LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libapr-1.pdb" /debug /out:"$(OUTDIR)\libapr-1.dll" /implib:"$(OUTDIR)\libapr-1.lib"
LINK32_OBJS= \
"$(INTDIR)\apr_atomic.obj" \
"$(INTDIR)\apr_atomic64.obj" \
"$(INTDIR)\dso.obj" \
"$(INTDIR)\apr_encode.obj" \
"$(INTDIR)\apr_escape.obj" \
"$(INTDIR)\buffer.obj" \
"$(INTDIR)\copy.obj" \
@ -1403,12 +959,14 @@ LINK32_OBJS= \
"$(INTDIR)\poll.obj" \
"$(INTDIR)\pollcb.obj" \
"$(INTDIR)\pollset.obj" \
"$(INTDIR)\wakeup.obj" \
"$(INTDIR)\select.obj" \
"$(INTDIR)\apr_random.obj" \
"$(INTDIR)\sha2.obj" \
"$(INTDIR)\sha2_glue.obj" \
"$(INTDIR)\shm.obj" \
"$(INTDIR)\apr_cpystrn.obj" \
"$(INTDIR)\apr_cstr.obj" \
"$(INTDIR)\apr_fnmatch.obj" \
"$(INTDIR)\apr_snprintf.obj" \
"$(INTDIR)\apr_strings.obj" \
@ -1457,19 +1015,31 @@ OutDir=.\x64\Debug
!ENDIF
!IF "$(CFG)" == "libapr - Win32 Release" || "$(CFG)" == "libapr - Win32 Debug" || "$(CFG)" == "libapr - Win32 Release9x" || "$(CFG)" == "libapr - Win32 Debug9x" || "$(CFG)" == "libapr - x64 Release" || "$(CFG)" == "libapr - x64 Debug"
!IF "$(CFG)" == "libapr - Win32 Release" || "$(CFG)" == "libapr - Win32 Debug" || "$(CFG)" == "libapr - x64 Release" || "$(CFG)" == "libapr - x64 Debug"
SOURCE=.\atomic\win32\apr_atomic.c
"$(INTDIR)\apr_atomic.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=.\atomic\win32\apr_atomic64.c
"$(INTDIR)\apr_atomic64.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=.\dso\win32\dso.c
"$(INTDIR)\dso.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=.\encoding\apr_encode.c
"$(INTDIR)\apr_encode.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=.\encoding\apr_escape.c
"$(INTDIR)\apr_escape.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr_escape.h" ".\include\apr_escape_test_char.h" ".\include\apr.h"
@ -1765,6 +1335,12 @@ SOURCE=.\poll\unix\select.c
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=.\poll\unix\wakeup.c
"$(INTDIR)\wakeup.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=.\random\unix\apr_random.c
"$(INTDIR)\apr_random.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h"
@ -1795,6 +1371,12 @@ SOURCE=.\strings\apr_cpystrn.c
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=.\strings\apr_cstr.c
"$(INTDIR)\apr_cstr.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr_cstr.h"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=.\strings\apr_fnmatch.c
"$(INTDIR)\apr_fnmatch.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h"
@ -1915,28 +1497,6 @@ InputPath=.\include\apr.hw
<<
!ELSEIF "$(CFG)" == "libapr - Win32 Release9x"
InputPath=.\include\apr.hw
".\include\apr.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
<<tempfile.bat
@echo off
type .\include\apr.hw > .\include\apr.h
<<
!ELSEIF "$(CFG)" == "libapr - Win32 Debug9x"
InputPath=.\include\apr.hw
".\include\apr.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
<<tempfile.bat
@echo off
type .\include\apr.hw > .\include\apr.h
<<
!ELSEIF "$(CFG)" == "libapr - x64 Release"
InputPath=.\include\apr.hw
@ -2037,75 +1597,6 @@ InputPath=.\include\apr_escape.h
!ENDIF
SOURCE=.\include\apr_want.h
!IF "$(CFG)" == "libapr - Win32 Release"
InputPath=.\include\apr_want.h
".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
<<tempfile.bat
@echo off
type .\include\apr.hw > .\include\apr.h
<<
!ELSEIF "$(CFG)" == "libapr - Win32 Debug"
InputPath=.\include\apr_want.h
".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
<<tempfile.bat
@echo off
type .\include\apr.hw > .\include\apr.h
<<
!ELSEIF "$(CFG)" == "libapr - Win32 Release9x"
InputPath=.\include\apr_want.h
".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
<<tempfile.bat
@echo off
type .\include\apr.hw > .\include\apr.h
<<
!ELSEIF "$(CFG)" == "libapr - Win32 Debug9x"
InputPath=.\include\apr_want.h
".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
<<tempfile.bat
@echo off
type .\include\apr.hw > .\include\apr.h
<<
!ELSEIF "$(CFG)" == "libapr - x64 Release"
InputPath=.\include\apr_want.h
".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
<<tempfile.bat
@echo off
type .\include\apr.hw > .\include\apr.h
<<
!ELSEIF "$(CFG)" == "libapr - x64 Debug"
InputPath=.\include\apr_want.h
".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
<<tempfile.bat
@echo off
type .\include\apr.hw > .\include\apr.h
<<
!ENDIF
SOURCE=.\libapr.rc

View File

@ -15,6 +15,7 @@
*/
#include "apr.h"
#include "apr_strings.h"
#include "apr_arch_global_mutex.h"
#include "apr_proc_mutex.h"
@ -59,7 +60,7 @@ APR_DECLARE(apr_status_t) apr_global_mutex_create(apr_global_mutex_t **mutex,
}
#if APR_HAS_THREADS
if (m->proc_mutex->inter_meth->flags & APR_PROCESS_LOCK_MECH_IS_GLOBAL) {
if (m->proc_mutex->meth->flags & APR_PROCESS_LOCK_MECH_IS_GLOBAL) {
m->thread_mutex = NULL; /* We don't need a thread lock. */
}
else {
@ -141,6 +142,47 @@ APR_DECLARE(apr_status_t) apr_global_mutex_trylock(apr_global_mutex_t *mutex)
return rv;
}
APR_DECLARE(apr_status_t) apr_global_mutex_timedlock(apr_global_mutex_t *mutex,
apr_interval_time_t timeout)
{
#if APR_HAS_TIMEDLOCKS
apr_status_t rv;
#if APR_HAS_THREADS
if (mutex->thread_mutex) {
apr_time_t expiry = 0;
if (timeout > 0) {
expiry = apr_time_now() + timeout;
}
rv = apr_thread_mutex_timedlock(mutex->thread_mutex, timeout);
if (rv != APR_SUCCESS) {
return rv;
}
if (expiry) {
timeout = expiry - apr_time_now();
if (timeout < 0) {
timeout = 0;
}
}
}
#endif /* APR_HAS_THREADS */
rv = apr_proc_mutex_timedlock(mutex->proc_mutex, timeout);
#if APR_HAS_THREADS
if (rv != APR_SUCCESS) {
if (mutex->thread_mutex) {
(void)apr_thread_mutex_unlock(mutex->thread_mutex);
}
}
#endif /* APR_HAS_THREADS */
return rv;
#else /* APR_HAS_TIMEDLOCKS */
return APR_ENOTIMPL;
#endif
}
APR_DECLARE(apr_status_t) apr_global_mutex_unlock(apr_global_mutex_t *mutex)
{
apr_status_t rv;
@ -180,9 +222,24 @@ APR_DECLARE(const char *) apr_global_mutex_lockfile(apr_global_mutex_t *mutex)
return apr_proc_mutex_lockfile(mutex->proc_mutex);
}
APR_DECLARE(apr_lockmech_e) apr_global_mutex_mech(apr_global_mutex_t *mutex)
{
return apr_proc_mutex_mech(mutex->proc_mutex);
}
APR_DECLARE(const char *) apr_global_mutex_name(apr_global_mutex_t *mutex)
{
return apr_proc_mutex_name(mutex->proc_mutex);
}
APR_PERMS_SET_IMPLEMENT(global_mutex)
{
apr_status_t rv;
apr_global_mutex_t *mutex = (apr_global_mutex_t *)theglobal_mutex;
rv = APR_PERMS_SET_FN(proc_mutex)(mutex->proc_mutex, perms, uid, gid);
return rv;
}
APR_POOL_IMPLEMENT_ACCESSOR(global_mutex)

File diff suppressed because it is too large Load Diff

View File

@ -79,21 +79,31 @@ APR_DECLARE(apr_status_t) apr_thread_cond_timedwait(apr_thread_cond_t *cond,
apr_interval_time_t timeout)
{
apr_status_t rv;
apr_time_t then;
struct timespec abstime;
then = apr_time_now() + timeout;
abstime.tv_sec = apr_time_sec(then);
abstime.tv_nsec = apr_time_usec(then) * 1000; /* nanoseconds */
rv = pthread_cond_timedwait(&cond->cond, &mutex->mutex, &abstime);
if (timeout < 0) {
rv = pthread_cond_wait(&cond->cond, &mutex->mutex);
#ifdef HAVE_ZOS_PTHREADS
if (rv) {
rv = errno;
}
if (rv) {
rv = errno;
}
#endif
if (ETIMEDOUT == rv) {
return APR_TIMEUP;
}
else {
apr_time_t then;
struct timespec abstime;
then = apr_time_now() + timeout;
abstime.tv_sec = apr_time_sec(then);
abstime.tv_nsec = apr_time_usec(then) * 1000; /* nanoseconds */
rv = pthread_cond_timedwait(&cond->cond, &mutex->mutex, &abstime);
#ifdef HAVE_ZOS_PTHREADS
if (rv) {
rv = errno;
}
#endif
if (ETIMEDOUT == rv) {
return APR_TIMEUP;
}
}
return rv;
}

View File

@ -77,6 +77,19 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_create(apr_thread_mutex_t **mutex,
return rv;
}
#ifndef HAVE_PTHREAD_MUTEX_TIMEDLOCK
if (flags & APR_THREAD_MUTEX_TIMED) {
rv = apr_thread_cond_create(&new_mutex->cond, pool);
if (rv) {
#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#endif
pthread_mutex_destroy(&new_mutex->mutex);
return rv;
}
}
#endif
apr_pool_cleanup_register(new_mutex->pool,
new_mutex, thread_mutex_cleanup,
apr_pool_cleanup_null);
@ -89,13 +102,45 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_lock(apr_thread_mutex_t *mutex)
{
apr_status_t rv;
if (mutex->cond) {
apr_status_t rv2;
rv = pthread_mutex_lock(&mutex->mutex);
if (rv) {
#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#endif
return rv;
}
if (mutex->locked) {
mutex->num_waiters++;
rv = apr_thread_cond_wait(mutex->cond, mutex);
mutex->num_waiters--;
}
else {
mutex->locked = 1;
}
rv2 = pthread_mutex_unlock(&mutex->mutex);
if (rv2 && !rv) {
#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#else
rv = rv2;
#endif
}
return rv;
}
rv = pthread_mutex_lock(&mutex->mutex);
#ifdef HAVE_ZOS_PTHREADS
if (rv) {
rv = errno;
}
#endif
return rv;
}
@ -103,6 +148,36 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_trylock(apr_thread_mutex_t *mutex)
{
apr_status_t rv;
if (mutex->cond) {
apr_status_t rv2;
rv = pthread_mutex_lock(&mutex->mutex);
if (rv) {
#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#endif
return rv;
}
if (mutex->locked) {
rv = APR_EBUSY;
}
else {
mutex->locked = 1;
}
rv2 = pthread_mutex_unlock(&mutex->mutex);
if (rv2) {
#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#else
rv = rv2;
#endif
}
return rv;
}
rv = pthread_mutex_trylock(&mutex->mutex);
if (rv) {
#ifdef HAVE_ZOS_PTHREADS
@ -114,10 +189,121 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_trylock(apr_thread_mutex_t *mutex)
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_thread_mutex_timedlock(apr_thread_mutex_t *mutex,
apr_interval_time_t timeout)
{
apr_status_t rv = APR_ENOTIMPL;
#if APR_HAS_TIMEDLOCKS
#ifdef HAVE_PTHREAD_MUTEX_TIMEDLOCK
if (timeout <= 0) {
rv = pthread_mutex_trylock(&mutex->mutex);
if (rv) {
#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#endif
if (rv == EBUSY) {
rv = APR_TIMEUP;
}
}
}
else {
struct timespec abstime;
timeout += apr_time_now();
abstime.tv_sec = apr_time_sec(timeout);
abstime.tv_nsec = apr_time_usec(timeout) * 1000; /* nanoseconds */
rv = pthread_mutex_timedlock(&mutex->mutex, &abstime);
if (rv) {
#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#endif
if (rv == ETIMEDOUT) {
rv = APR_TIMEUP;
}
}
}
#else /* HAVE_PTHREAD_MUTEX_TIMEDLOCK */
if (mutex->cond) {
rv = pthread_mutex_lock(&mutex->mutex);
if (rv) {
#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#endif
return rv;
}
if (mutex->locked) {
if (timeout <= 0) {
rv = APR_TIMEUP;
}
else {
mutex->num_waiters++;
do {
rv = apr_thread_cond_timedwait(mutex->cond, mutex,
timeout);
if (rv) {
#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#endif
break;
}
} while (mutex->locked);
mutex->num_waiters--;
}
if (rv) {
pthread_mutex_unlock(&mutex->mutex);
return rv;
}
}
mutex->locked = 1;
rv = pthread_mutex_unlock(&mutex->mutex);
if (rv) {
#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#endif
return rv;
}
}
#endif /* HAVE_PTHREAD_MUTEX_TIMEDLOCK */
#endif /* APR_HAS_TIMEDLOCKS */
return rv;
}
APR_DECLARE(apr_status_t) apr_thread_mutex_unlock(apr_thread_mutex_t *mutex)
{
apr_status_t status;
if (mutex->cond) {
status = pthread_mutex_lock(&mutex->mutex);
if (status) {
#ifdef HAVE_ZOS_PTHREADS
status = errno;
#endif
return status;
}
if (!mutex->locked) {
status = APR_EINVAL;
}
else if (mutex->num_waiters) {
status = apr_thread_cond_signal(mutex->cond);
}
if (status) {
pthread_mutex_unlock(&mutex->mutex);
return status;
}
mutex->locked = 0;
}
status = pthread_mutex_unlock(&mutex->mutex);
#ifdef HAVE_ZOS_PTHREADS
if (status) {
@ -130,7 +316,17 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_unlock(apr_thread_mutex_t *mutex)
APR_DECLARE(apr_status_t) apr_thread_mutex_destroy(apr_thread_mutex_t *mutex)
{
return apr_pool_cleanup_run(mutex->pool, mutex, thread_mutex_cleanup);
apr_status_t rv, rv2 = APR_SUCCESS;
if (mutex->cond) {
rv2 = apr_thread_cond_destroy(mutex->cond);
}
rv = apr_pool_cleanup_run(mutex->pool, mutex, thread_mutex_cleanup);
if (rv == APR_SUCCESS) {
rv = rv2;
}
return rv;
}
APR_POOL_IMPLEMENT_ACCESSOR(thread_mutex)

View File

@ -27,6 +27,7 @@
#include "apr_thread_mutex.h"
#include "apr_hash.h"
#include "apr_time.h"
#include "apr_support.h"
#define APR_WANT_MEMFUNC
#include "apr_want.h"
#include "apr_env.h"
@ -39,10 +40,39 @@
#include <unistd.h> /* for getpid and sysconf */
#endif
#if APR_ALLOCATOR_GUARD_PAGES && !APR_ALLOCATOR_USES_MMAP
#define APR_ALLOCATOR_USES_MMAP 1
#endif
#if APR_ALLOCATOR_USES_MMAP
#include <sys/mman.h>
#endif
#if HAVE_VALGRIND
#include <valgrind.h>
#include <memcheck.h>
#define REDZONE APR_ALIGN_DEFAULT(8)
int apr_running_on_valgrind = 0;
#define APR_IF_VALGRIND(x) \
do { if (apr_running_on_valgrind) { x; } } while (0)
#else
#define APR_IF_VALGRIND(x)
#endif /* HAVE_VALGRIND */
#define APR_VALGRIND_NOACCESS(addr_, size_) \
APR_IF_VALGRIND(VALGRIND_MAKE_MEM_NOACCESS(addr_, size_))
#define APR_VALGRIND_UNDEFINED(addr_, size_) \
APR_IF_VALGRIND(VALGRIND_MAKE_MEM_UNDEFINED(addr_, size_))
#if APR_POOL_CONCURRENCY_CHECK && !APR_HAS_THREADS
#error pool-concurrency-check does not make sense without threads
#endif
/*
* Magic numbers
*/
@ -65,6 +95,16 @@ static unsigned int boundary_size;
#define BOUNDARY_SIZE (1 << BOUNDARY_INDEX)
#endif
#if APR_ALLOCATOR_GUARD_PAGES
#if defined(_SC_PAGESIZE)
#define GUARDPAGE_SIZE boundary_size
#else
#error Cannot determine page size
#endif /* _SC_PAGESIZE */
#else
#define GUARDPAGE_SIZE 0
#endif /* APR_ALLOCATOR_GUARD_PAGES */
/*
* Timing constants for killing subprocesses
* There is a total 3-second delay between sending a SIGINT
@ -84,18 +124,18 @@ static unsigned int boundary_size;
struct apr_allocator_t {
/** largest used index into free[], always < MAX_INDEX */
apr_uint32_t max_index;
apr_size_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;
apr_size_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;
apr_size_t current_free_index;
#if APR_HAS_THREADS
apr_thread_mutex_t *mutex;
#endif /* APR_HAS_THREADS */
@ -139,7 +179,7 @@ APR_DECLARE(apr_status_t) apr_allocator_create(apr_allocator_t **allocator)
APR_DECLARE(void) apr_allocator_destroy(apr_allocator_t *allocator)
{
apr_uint32_t index;
apr_size_t index;
apr_memnode_t *node, **ref;
for (index = 0; index < MAX_INDEX; index++) {
@ -147,7 +187,8 @@ APR_DECLARE(void) apr_allocator_destroy(apr_allocator_t *allocator)
while ((node = *ref) != NULL) {
*ref = node->next;
#if APR_ALLOCATOR_USES_MMAP
munmap(node, (node->index+1) << BOUNDARY_INDEX);
munmap((char *)node - GUARDPAGE_SIZE,
2 * GUARDPAGE_SIZE + ((node->index+1) << BOUNDARY_INDEX));
#else
free(node);
#endif
@ -185,8 +226,8 @@ APR_DECLARE(apr_pool_t *) apr_allocator_owner_get(apr_allocator_t *allocator)
APR_DECLARE(void) apr_allocator_max_free_set(apr_allocator_t *allocator,
apr_size_t in_size)
{
apr_uint32_t max_free_index;
apr_uint32_t size = (APR_UINT32_TRUNC_CAST)in_size;
apr_size_t max_free_index;
apr_size_t size = in_size;
#if APR_HAS_THREADS
apr_thread_mutex_t *mutex;
@ -209,22 +250,46 @@ APR_DECLARE(void) apr_allocator_max_free_set(apr_allocator_t *allocator,
#endif
}
static APR_INLINE
apr_size_t allocator_align(apr_size_t in_size)
{
apr_size_t size = in_size;
/* Round up the block size to the next boundary, but always
* allocate at least a certain size (MIN_ALLOC).
*/
size = APR_ALIGN(size + APR_MEMNODE_T_SIZE, BOUNDARY_SIZE);
if (size < in_size) {
return 0;
}
if (size < MIN_ALLOC) {
size = MIN_ALLOC;
}
return size;
}
APR_DECLARE(apr_size_t) apr_allocator_align(apr_allocator_t *allocator,
apr_size_t size)
{
(void)allocator;
return allocator_align(size);
}
static APR_INLINE
apr_memnode_t *allocator_alloc(apr_allocator_t *allocator, apr_size_t in_size)
{
apr_memnode_t *node, **ref;
apr_uint32_t max_index;
apr_size_t max_index;
apr_size_t size, i, index;
/* Round up the block size to the next boundary, but always
* allocate at least a certain size (MIN_ALLOC).
*/
size = APR_ALIGN(in_size + APR_MEMNODE_T_SIZE, BOUNDARY_SIZE);
if (size < in_size) {
size = allocator_align(in_size);
if (!size) {
return NULL;
}
if (size < MIN_ALLOC)
size = MIN_ALLOC;
/* Find the index for this node size by
* dividing its size by the boundary size
@ -273,7 +338,7 @@ apr_memnode_t *allocator_alloc(apr_allocator_t *allocator, apr_size_t in_size)
ref--;
max_index--;
}
while (*ref == NULL && max_index > 0);
while (*ref == NULL && max_index);
allocator->max_index = max_index;
}
@ -287,10 +352,7 @@ apr_memnode_t *allocator_alloc(apr_allocator_t *allocator, apr_size_t in_size)
apr_thread_mutex_unlock(allocator->mutex);
#endif /* APR_HAS_THREADS */
node->next = NULL;
node->first_avail = (char *)node + APR_MEMNODE_T_SIZE;
return node;
goto have_node;
}
#if APR_HAS_THREADS
@ -327,10 +389,7 @@ apr_memnode_t *allocator_alloc(apr_allocator_t *allocator, apr_size_t in_size)
apr_thread_mutex_unlock(allocator->mutex);
#endif /* APR_HAS_THREADS */
node->next = NULL;
node->first_avail = (char *)node + APR_MEMNODE_T_SIZE;
return node;
goto have_node;
}
#if APR_HAS_THREADS
@ -342,7 +401,10 @@ apr_memnode_t *allocator_alloc(apr_allocator_t *allocator, apr_size_t in_size)
/* If we haven't got a suitable node, malloc a new one
* and initialize it.
*/
#if APR_ALLOCATOR_USES_MMAP
#if APR_ALLOCATOR_GUARD_PAGES
if ((node = mmap(NULL, size + 2 * GUARDPAGE_SIZE, PROT_NONE,
MAP_PRIVATE|MAP_ANON, -1, 0)) == MAP_FAILED)
#elif APR_ALLOCATOR_USES_MMAP
if ((node = mmap(NULL, size, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANON, -1, 0)) == MAP_FAILED)
#else
@ -350,11 +412,22 @@ apr_memnode_t *allocator_alloc(apr_allocator_t *allocator, apr_size_t in_size)
#endif
return NULL;
node->next = NULL;
node->index = (APR_UINT32_TRUNC_CAST)index;
node->first_avail = (char *)node + APR_MEMNODE_T_SIZE;
#if APR_ALLOCATOR_GUARD_PAGES
node = (apr_memnode_t *)((char *)node + GUARDPAGE_SIZE);
if (mprotect(node, size, PROT_READ|PROT_WRITE) != 0) {
munmap((char *)node - GUARDPAGE_SIZE, size + 2 * GUARDPAGE_SIZE);
return NULL;
}
#endif
node->index = index;
node->endp = (char *)node + size;
have_node:
node->next = NULL;
node->first_avail = (char *)node + APR_MEMNODE_T_SIZE;
APR_VALGRIND_UNDEFINED(node->first_avail, size - APR_MEMNODE_T_SIZE);
return node;
}
@ -362,8 +435,8 @@ static APR_INLINE
void allocator_free(apr_allocator_t *allocator, apr_memnode_t *node)
{
apr_memnode_t *next, *freelist = NULL;
apr_uint32_t index, max_index;
apr_uint32_t max_free_index, current_free_index;
apr_size_t index, max_index;
apr_size_t max_free_index, current_free_index;
#if APR_HAS_THREADS
if (allocator->mutex)
@ -381,14 +454,17 @@ void allocator_free(apr_allocator_t *allocator, apr_memnode_t *node)
next = node->next;
index = node->index;
APR_VALGRIND_NOACCESS((char *)node + APR_MEMNODE_T_SIZE,
(node->index+1) << BOUNDARY_INDEX);
if (max_free_index != APR_ALLOCATOR_MAX_FREE_UNLIMITED
&& index + 1 > current_free_index) {
node->next = freelist;
freelist = node;
}
else if (index < MAX_INDEX) {
/* Add the node to the appropiate 'size' bucket. Adjust
* the max_index when appropiate.
/* Add the node to the appropriate 'size' bucket. Adjust
* the max_index when appropriate.
*/
if ((node->next = allocator->free[index]) == NULL
&& index > max_index) {
@ -425,7 +501,8 @@ void allocator_free(apr_allocator_t *allocator, apr_memnode_t *node)
node = freelist;
freelist = node->next;
#if APR_ALLOCATOR_USES_MMAP
munmap(node, (node->index+1) << BOUNDARY_INDEX);
munmap((char *)node - GUARDPAGE_SIZE,
2 * GUARDPAGE_SIZE + ((node->index+1) << BOUNDARY_INDEX));
#else
free(node);
#endif
@ -482,7 +559,7 @@ typedef struct debug_node_t debug_node_t;
struct debug_node_t {
debug_node_t *next;
apr_uint32_t index;
apr_size_t index;
void *beginp[64];
void *endp[64];
};
@ -533,6 +610,14 @@ struct apr_pool_t {
apr_os_proc_t owner_proc;
#endif /* defined(NETWARE) */
cleanup_t *pre_cleanups;
#if APR_POOL_CONCURRENCY_CHECK
#define IDLE 0
#define IN_USE 1
#define DESTROYED 2
volatile apr_uint32_t in_use;
apr_os_thread_t in_use_by;
#endif /* APR_POOL_CONCURRENCY_CHECK */
};
#define SIZEOF_POOL_T APR_ALIGN_DEFAULT(sizeof(apr_pool_t))
@ -576,6 +661,10 @@ APR_DECLARE(apr_status_t) apr_pool_initialize(void)
if (apr_pools_initialized++)
return APR_SUCCESS;
#if HAVE_VALGRIND
apr_running_on_valgrind = RUNNING_ON_VALGRIND;
#endif
#if APR_ALLOCATOR_USES_MMAP && defined(_SC_PAGESIZE)
boundary_size = sysconf(_SC_PAGESIZE);
boundary_index = 12;
@ -661,6 +750,68 @@ APR_DECLARE(void) apr_pool_terminate(void)
/* Returns the amount of free space in the given node. */
#define node_free_space(node_) ((apr_size_t)(node_->endp - node_->first_avail))
/*
* Helpers to mark pool as in-use/free. Used for finding thread-unsafe
* concurrent accesses from different threads.
*/
#if APR_POOL_CONCURRENCY_CHECK
static const char * const in_use_string[] = { "idle", "in use", "destroyed" };
static void pool_concurrency_abort(apr_pool_t *pool, apr_uint32_t new, apr_uint32_t old)
{
fprintf(stderr, "pool concurrency check: pool %p(%s), thread cur %lx "
"in use by %lx, state %s -> %s \n",
pool, pool->tag, (unsigned long)apr_os_thread_current(),
(unsigned long)pool->in_use_by,
in_use_string[old], in_use_string[new]);
abort();
}
static APR_INLINE void pool_concurrency_set_used(apr_pool_t *pool)
{
apr_uint32_t old;
old = apr_atomic_cas32(&pool->in_use, IN_USE, IDLE);
if (old != IDLE)
pool_concurrency_abort(pool, IN_USE, old);
pool->in_use_by = apr_os_thread_current();
}
static APR_INLINE void pool_concurrency_set_idle(apr_pool_t *pool)
{
apr_uint32_t old;
old = apr_atomic_cas32(&pool->in_use, IDLE, IN_USE);
if (old != IN_USE)
pool_concurrency_abort(pool, IDLE, old);
}
static APR_INLINE void pool_concurrency_init(apr_pool_t *pool)
{
pool->in_use = IDLE;
}
static APR_INLINE void pool_concurrency_set_destroyed(apr_pool_t *pool)
{
apr_uint32_t old;
old = apr_atomic_cas32(&pool->in_use, DESTROYED, IDLE);
if (old != IDLE)
pool_concurrency_abort(pool, DESTROYED, old);
pool->in_use_by = apr_os_thread_current();
}
#else
static APR_INLINE void pool_concurrency_init(apr_pool_t *pool) { }
static APR_INLINE void pool_concurrency_set_used(apr_pool_t *pool) { }
static APR_INLINE void pool_concurrency_set_idle(apr_pool_t *pool) { }
static APR_INLINE void pool_concurrency_set_destroyed(apr_pool_t *pool) { }
#endif /* APR_POOL_CONCURRENCY_CHECK */
/*
* Memory allocation
*/
@ -671,8 +822,14 @@ APR_DECLARE(void *) apr_palloc(apr_pool_t *pool, apr_size_t in_size)
void *mem;
apr_size_t size, free_index;
pool_concurrency_set_used(pool);
size = APR_ALIGN_DEFAULT(in_size);
#if HAVE_VALGRIND
if (apr_running_on_valgrind)
size += 2 * REDZONE;
#endif
if (size < in_size) {
pool_concurrency_set_idle(pool);
if (pool->abort_fn)
pool->abort_fn(APR_ENOMEM);
@ -684,8 +841,7 @@ APR_DECLARE(void *) apr_palloc(apr_pool_t *pool, apr_size_t in_size)
if (size <= node_free_space(active)) {
mem = active->first_avail;
active->first_avail += size;
return mem;
goto have_mem;
}
node = active->next;
@ -694,6 +850,7 @@ APR_DECLARE(void *) apr_palloc(apr_pool_t *pool, apr_size_t in_size)
}
else {
if ((node = allocator_alloc(pool->allocator, size)) == NULL) {
pool_concurrency_set_idle(pool);
if (pool->abort_fn)
pool->abort_fn(APR_ENOMEM);
@ -713,10 +870,10 @@ APR_DECLARE(void *) apr_palloc(apr_pool_t *pool, apr_size_t in_size)
free_index = (APR_ALIGN(active->endp - active->first_avail + 1,
BOUNDARY_SIZE) - BOUNDARY_SIZE) >> BOUNDARY_INDEX;
active->free_index = (APR_UINT32_TRUNC_CAST)free_index;
active->free_index = free_index;
node = active->next;
if (free_index >= node->free_index)
return mem;
goto have_mem;
do {
node = node->next;
@ -726,7 +883,22 @@ APR_DECLARE(void *) apr_palloc(apr_pool_t *pool, apr_size_t in_size)
list_remove(active);
list_insert(active, node);
have_mem:
#if HAVE_VALGRIND
if (!apr_running_on_valgrind) {
pool_concurrency_set_idle(pool);
return mem;
}
else {
mem = (char *)mem + REDZONE;
VALGRIND_MEMPOOL_ALLOC(pool, mem, in_size);
pool_concurrency_set_idle(pool);
return mem;
}
#else
pool_concurrency_set_idle(pool);
return mem;
#endif
}
/* Provide an implementation of apr_pcalloc for backward compatibility
@ -760,7 +932,10 @@ APR_DECLARE(void) apr_pool_clear(apr_pool_t *pool)
/* Run pre destroy cleanups */
run_cleanups(&pool->pre_cleanups);
pool_concurrency_set_used(pool);
pool->pre_cleanups = NULL;
pool_concurrency_set_idle(pool);
/* Destroy the subpools. The subpools will detach themselves from
* this pool thus this loop is safe and easy.
@ -770,6 +945,8 @@ APR_DECLARE(void) apr_pool_clear(apr_pool_t *pool)
/* Run cleanups */
run_cleanups(&pool->cleanups);
pool_concurrency_set_used(pool);
pool->cleanups = NULL;
pool->free_cleanups = NULL;
@ -786,13 +963,19 @@ APR_DECLARE(void) apr_pool_clear(apr_pool_t *pool)
active = pool->active = pool->self;
active->first_avail = pool->self_first_avail;
if (active->next == active)
APR_IF_VALGRIND(VALGRIND_MEMPOOL_TRIM(pool, pool, 1));
if (active->next == active) {
pool_concurrency_set_idle(pool);
return;
}
*active->ref = NULL;
allocator_free(pool->allocator, active->next);
active->next = active;
active->ref = &active->next;
pool_concurrency_set_idle(pool);
}
APR_DECLARE(void) apr_pool_destroy(apr_pool_t *pool)
@ -802,7 +985,10 @@ APR_DECLARE(void) apr_pool_destroy(apr_pool_t *pool)
/* Run pre destroy cleanups */
run_cleanups(&pool->pre_cleanups);
pool_concurrency_set_used(pool);
pool->pre_cleanups = NULL;
pool_concurrency_set_idle(pool);
/* Destroy the subpools. The subpools will detach themselve from
* this pool thus this loop is safe and easy.
@ -812,6 +998,7 @@ APR_DECLARE(void) apr_pool_destroy(apr_pool_t *pool)
/* Run cleanups */
run_cleanups(&pool->cleanups);
pool_concurrency_set_destroyed(pool);
/* Free subprocesses */
free_proc_chain(pool->subprocesses);
@ -863,6 +1050,7 @@ APR_DECLARE(void) apr_pool_destroy(apr_pool_t *pool)
if (apr_allocator_owner_get(allocator) == pool) {
apr_allocator_destroy(allocator);
}
APR_IF_VALGRIND(VALGRIND_DESTROY_MEMPOOL(pool));
}
APR_DECLARE(apr_status_t) apr_pool_create_ex(apr_pool_t **newpool,
@ -899,8 +1087,23 @@ APR_DECLARE(apr_status_t) apr_pool_create_ex(apr_pool_t **newpool,
node->next = node;
node->ref = &node->next;
#if HAVE_VALGRIND
if (!apr_running_on_valgrind) {
pool = (apr_pool_t *)node->first_avail;
pool->self_first_avail = (char *)pool + SIZEOF_POOL_T;
}
else {
pool = (apr_pool_t *)(node->first_avail + REDZONE);
pool->self_first_avail = (char *)pool + SIZEOF_POOL_T + 2 * REDZONE;
VALGRIND_MAKE_MEM_NOACCESS(pool->self_first_avail,
node->endp - pool->self_first_avail);
VALGRIND_CREATE_MEMPOOL(pool, REDZONE, 0);
}
#else
pool = (apr_pool_t *)node->first_avail;
node->first_avail = pool->self_first_avail = (char *)pool + SIZEOF_POOL_T;
pool->self_first_avail = (char *)pool + SIZEOF_POOL_T;
#endif
node->first_avail = pool->self_first_avail;
pool->allocator = allocator;
pool->active = pool->self = node;
@ -941,6 +1144,8 @@ APR_DECLARE(apr_status_t) apr_pool_create_ex(apr_pool_t **newpool,
pool->ref = NULL;
}
pool_concurrency_init(pool);
*newpool = pool;
return APR_SUCCESS;
@ -1010,6 +1215,8 @@ APR_DECLARE(apr_status_t) apr_pool_create_unmanaged_ex(apr_pool_t **newpool,
#endif /* defined(NETWARE) */
if (!allocator)
pool_allocator->owner = pool;
pool_concurrency_init(pool);
*newpool = pool;
return APR_SUCCESS;
@ -1079,7 +1286,7 @@ static int psprintf_flush(apr_vformatter_buff_t *vbuff)
free_index = (APR_ALIGN(active->endp - active->first_avail + 1,
BOUNDARY_SIZE) - BOUNDARY_SIZE) >> BOUNDARY_INDEX;
active->free_index = (APR_UINT32_TRUNC_CAST)free_index;
active->free_index = free_index;
node = active->next;
if (free_index < node->free_index) {
do {
@ -1105,7 +1312,11 @@ static int psprintf_flush(apr_vformatter_buff_t *vbuff)
ps->got_a_new_node = 1;
}
APR_VALGRIND_UNDEFINED(node->first_avail,
node->endp - node->first_avail);
memcpy(node->first_avail, active->first_avail, cur_len);
APR_VALGRIND_NOACCESS(active->first_avail,
active->endp - active->first_avail);
ps->node = node;
ps->vbuff.curpos = node->first_avail + cur_len;
@ -1114,6 +1325,35 @@ static int psprintf_flush(apr_vformatter_buff_t *vbuff)
return 0;
}
#if HAVE_VALGRIND
static int add_redzone(int (*flush_func)(apr_vformatter_buff_t *b),
struct psprintf_data *ps)
{
apr_size_t len = ps->vbuff.curpos - ps->node->first_avail + REDZONE;
while (ps->vbuff.curpos - ps->node->first_avail < len) {
if (ps->vbuff.endpos - ps->node->first_avail >= len)
ps->vbuff.curpos = ps->node->first_avail + len;
else
ps->vbuff.curpos = ps->vbuff.endpos;
/*
* Prevent valgrind from complaining when psprintf_flush()
* does a memcpy(). The VALGRIND_MEMPOOL_ALLOC() will reset
* the redzone to NOACCESS.
*/
if (ps->vbuff.curpos != ps->node->first_avail)
VALGRIND_MAKE_MEM_DEFINED(ps->node->first_avail,
ps->vbuff.curpos - ps->node->first_avail);
if (ps->vbuff.curpos == ps->vbuff.endpos) {
if (psprintf_flush(&ps->vbuff) == -1)
return -1;
}
}
return 0;
}
#endif
APR_DECLARE(char *) apr_pvsprintf(apr_pool_t *pool, const char *fmt, va_list ap)
{
struct psprintf_data ps;
@ -1122,6 +1362,7 @@ APR_DECLARE(char *) apr_pvsprintf(apr_pool_t *pool, const char *fmt, va_list ap)
apr_memnode_t *active, *node;
apr_size_t free_index;
pool_concurrency_set_used(pool);
ps.node = active = pool->active;
ps.pool = pool;
ps.vbuff.curpos = ps.node->first_avail;
@ -1136,18 +1377,46 @@ APR_DECLARE(char *) apr_pvsprintf(apr_pool_t *pool, const char *fmt, va_list ap)
*/
if (ps.node->first_avail == ps.node->endp) {
if (psprintf_flush(&ps.vbuff) == -1)
goto error;
goto error;
}
#if HAVE_VALGRIND
if (apr_running_on_valgrind) {
if (add_redzone(psprintf_flush, &ps) == -1)
goto error;
if (!ps.got_a_new_node) {
/* psprintf_flush() has not been called, allow access to our node */
VALGRIND_MAKE_MEM_UNDEFINED(ps.vbuff.curpos,
ps.node->endp - ps.vbuff.curpos);
}
}
#endif /* HAVE_VALGRIND */
if (apr_vformatter(psprintf_flush, &ps.vbuff, fmt, ap) == -1)
goto error;
strp = ps.vbuff.curpos;
*strp++ = '\0';
*ps.vbuff.curpos++ = '\0';
size = strp - ps.node->first_avail;
size = APR_ALIGN_DEFAULT(size);
#if HAVE_VALGRIND
if (!apr_running_on_valgrind) {
strp = ps.node->first_avail;
}
else {
if (add_redzone(psprintf_flush, &ps) == -1)
goto error;
if (ps.node->endp != ps.vbuff.curpos)
APR_VALGRIND_NOACCESS(ps.vbuff.curpos,
ps.node->endp - ps.vbuff.curpos);
strp = ps.node->first_avail + REDZONE;
size = ps.vbuff.curpos - strp;
VALGRIND_MEMPOOL_ALLOC(pool, strp, size);
VALGRIND_MAKE_MEM_DEFINED(strp, size);
}
#else
strp = ps.node->first_avail;
#endif
size = ps.vbuff.curpos - ps.node->first_avail;
size = APR_ALIGN_DEFAULT(size);
ps.node->first_avail += size;
if (ps.free)
@ -1156,8 +1425,10 @@ APR_DECLARE(char *) apr_pvsprintf(apr_pool_t *pool, const char *fmt, va_list ap)
/*
* Link the node in if it's a new one
*/
if (!ps.got_a_new_node)
if (!ps.got_a_new_node) {
pool_concurrency_set_idle(pool);
return strp;
}
active = pool->active;
node = ps.node;
@ -1171,11 +1442,13 @@ APR_DECLARE(char *) apr_pvsprintf(apr_pool_t *pool, const char *fmt, va_list ap)
free_index = (APR_ALIGN(active->endp - active->first_avail + 1,
BOUNDARY_SIZE) - BOUNDARY_SIZE) >> BOUNDARY_INDEX;
active->free_index = (APR_UINT32_TRUNC_CAST)free_index;
active->free_index = free_index;
node = active->next;
if (free_index >= node->free_index)
if (free_index >= node->free_index) {
pool_concurrency_set_idle(pool);
return strp;
}
do {
node = node->next;
@ -1185,15 +1458,19 @@ APR_DECLARE(char *) apr_pvsprintf(apr_pool_t *pool, const char *fmt, va_list ap)
list_remove(active);
list_insert(active, node);
pool_concurrency_set_idle(pool);
return strp;
error:
pool_concurrency_set_idle(pool);
if (pool->abort_fn)
pool->abort_fn(APR_ENOMEM);
if (ps.got_a_new_node) {
ps.node->next = ps.free;
allocator_free(pool->allocator, ps.node);
}
APR_VALGRIND_NOACCESS(pool->active->first_avail,
pool->active->endp - pool->active->first_avail);
return NULL;
}
@ -1336,7 +1613,7 @@ static void apr_pool_check_integrity(apr_pool_t *pool)
if (!apr_pool_is_child_of(pool, global_pool)) {
#if (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE_ALL)
apr_pool_log_event(pool, "LIFE",
__FILE__ ":apr_pool_integrity check", 0);
__FILE__ ":apr_pool_integrity check [lifetime]", 0);
#endif /* (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE_ALL) */
abort();
}
@ -1347,7 +1624,7 @@ static void apr_pool_check_integrity(apr_pool_t *pool)
if (!apr_os_thread_equal(pool->owner, apr_os_thread_current())) {
#if (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE_ALL)
apr_pool_log_event(pool, "THREAD",
__FILE__ ":apr_pool_integrity check", 0);
__FILE__ ":apr_pool_integrity check [owner]", 0);
#endif /* (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE_ALL) */
abort();
}
@ -1537,7 +1814,7 @@ APR_DECLARE(void *) apr_pcalloc_debug(apr_pool_t *pool, apr_size_t size,
static void pool_clear_debug(apr_pool_t *pool, const char *file_line)
{
debug_node_t *node;
apr_uint32_t index;
apr_size_t index;
/* Run pre destroy cleanups */
run_cleanups(&pool->pre_cleanups);
@ -1854,7 +2131,7 @@ APR_DECLARE(apr_status_t) apr_pool_create_unmanaged_ex_debug(apr_pool_t **newpoo
*newpool = pool;
#if (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE)
apr_pool_log_event(pool, "CREATE", file_line, 1);
apr_pool_log_event(pool, "CREATEU", file_line, 1);
#endif /* (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE) */
return APR_SUCCESS;
@ -1953,7 +2230,7 @@ static int pool_find(apr_pool_t *pool, void *data)
{
void **pmem = (void **)data;
debug_node_t *node;
apr_uint32_t index;
apr_size_t index;
node = pool->nodes;
@ -1986,7 +2263,7 @@ static int pool_num_bytes(apr_pool_t *pool, void *data)
{
apr_size_t *psize = (apr_size_t *)data;
debug_node_t *node;
apr_uint32_t index;
apr_size_t index;
node = pool->nodes;

View File

@ -369,7 +369,7 @@ static char *native_strerror(apr_status_t statcode, char *buf,
/* glibc style */
/* BeOS has the function available, but it doesn't provide
* the prototype publically (doh!), so to avoid a build warning
* the prototype publicly (doh!), so to avoid a build warning
* we add a suitable prototype here.
*/
#if defined(BEOS)

View File

@ -43,6 +43,31 @@
#include <sys/uuid.h>
#endif
#if defined(SYS_RANDOM)
#if defined(HAVE_SYS_RANDOM_H) && \
defined(HAVE_GETRANDOM)
#include <sys/random.h>
#define USE_GETRANDOM
#elif defined(HAVE_SYS_SYSCALL_H) && \
defined(HAVE_LINUX_RANDOM_H) && \
defined(HAVE_DECL_SYS_GETRANDOM) && \
HAVE_DECL_SYS_GETRANDOM
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <unistd.h>
#include <sys/syscall.h>
#include <linux/random.h>
#define getrandom(buf, buflen, flags) \
syscall(SYS_getrandom, (buf), (buflen), (flags))
#define USE_GETRANDOM
#endif /* HAVE_SYS_RANDOM_H */
#endif /* SYS_RANDOM */
#ifndef SHUT_RDWR
#define SHUT_RDWR 2
#endif
@ -87,48 +112,7 @@ APR_DECLARE(apr_status_t) apr_os_uuid_get(unsigned char *uuid_data)
APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char *buf,
apr_size_t length)
{
#ifdef DEV_RANDOM
int fd = -1;
/* On BSD/OS 4.1, /dev/random gives out 8 bytes at a time, then
* gives EOF, so reading 'length' bytes may require opening the
* device several times. */
do {
apr_ssize_t rc;
if (fd == -1)
if ((fd = open(DEV_RANDOM, O_RDONLY)) == -1)
return errno;
do {
rc = read(fd, buf, length);
} while (rc == -1 && errno == EINTR);
if (rc < 0) {
int errnum = errno;
close(fd);
return errnum;
}
else if (rc == 0) {
close(fd);
fd = -1; /* force open() again */
}
else {
buf += rc;
length -= rc;
}
} while (length > 0);
close(fd);
#elif defined(OS2)
static UCHAR randbyte();
unsigned int idx;
for (idx=0; idx<length; idx++)
buf[idx] = randbyte();
#elif defined(HAVE_EGD)
#if defined(HAVE_EGD)
/* use EGD-compatible socket daemon (such as EGD or PRNGd).
* message format:
* 0x00 (get entropy level)
@ -224,6 +208,70 @@ APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char *buf,
return bad_errno;
}
#elif defined(SYS_RANDOM) && defined(USE_GETRANDOM)
do {
int rc;
rc = getrandom(buf, length, 0);
if (rc == -1) {
if (errno == EINTR) {
continue;
}
return errno;
}
buf += rc;
length -= rc;
} while (length > 0);
#elif defined(SYS_RANDOM) && defined(HAVE_ARC4RANDOM_BUF)
arc4random_buf(buf, length);
#elif defined(DEV_RANDOM)
int fd = -1;
/* On BSD/OS 4.1, /dev/random gives out 8 bytes at a time, then
* gives EOF, so reading 'length' bytes may require opening the
* device several times. */
do {
apr_ssize_t rc;
if (fd == -1)
if ((fd = open(DEV_RANDOM, O_RDONLY)) == -1)
return errno;
do {
rc = read(fd, buf, length);
} while (rc == -1 && errno == EINTR);
if (rc < 0) {
int errnum = errno;
close(fd);
return errnum;
}
else if (rc == 0) {
close(fd);
fd = -1; /* force open() again */
}
else {
buf += rc;
length -= rc;
}
} while (length > 0);
close(fd);
#elif defined(OS2)
static UCHAR randbyte();
unsigned int idx;
for (idx=0; idx<length; idx++)
buf[idx] = randbyte();
#elif defined(HAVE_TRUERAND) /* use truerand */
extern int randbyte(void); /* from the truerand library */
@ -235,6 +283,10 @@ APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char *buf,
for (idx=0; idx<length; idx++)
buf[idx] = (unsigned char) randbyte();
#else
#error APR_HAS_RANDOM defined with no implementation
#endif /* DEV_RANDOM */
return APR_SUCCESS;

View File

@ -62,7 +62,7 @@ static unsigned int find_if_index(const apr_sockaddr_t *iface)
for (ifp = ifs; ifp; ifp = ifp->ifa_next) {
if (ifp->ifa_addr != NULL && ifp->ifa_addr->sa_family == AF_INET6) {
if (memcmp(&iface->sa.sin6.sin6_addr,
&ifp->ifa_addr->sa_data[0],
&((struct sockaddr_in6*)ifp->ifa_addr)->sin6_addr,
sizeof(iface->sa.sin6.sin6_addr)) == 0) {
index = if_nametoindex(ifp->ifa_name);
break;

View File

@ -25,6 +25,14 @@
#include <stdlib.h>
#endif
#ifdef HAVE_NET_IF_H
#include <net/if.h>
#endif
#if defined(HAVE_IF_INDEXTONAME) && defined(_MSC_VER)
#include "arch/win32/apr_arch_misc.h"
#endif
#define APR_WANT_STRFUNC
#include "apr_want.h"
@ -125,9 +133,31 @@ APR_DECLARE(apr_status_t) apr_sockaddr_ip_getbuf(char *buf, apr_size_t buflen,
memmove(buf, buf + strlen("::ffff:"),
strlen(buf + strlen("::ffff:"))+1);
}
#endif
/* ensure NUL termination if the buffer is too short */
buf[buflen-1] = '\0';
#ifdef HAVE_IF_INDEXTONAME
/* Append scope name for link-local addresses. */
if (sockaddr->family == AF_INET6
&& IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)sockaddr->ipaddr_ptr)) {
char scbuf[IF_NAMESIZE], *p = buf + strlen(buf);
if (if_indextoname(sockaddr->sa.sin6.sin6_scope_id, scbuf) == scbuf) {
/* Space check, need room for buf + '%' + scope + '\0'.
* Assert: buflen >= strlen(buf) + strlen(scbuf) + 2
* Equiv: buflen >= (p-buf) + strlen(buf) + 2
* Thus, fail in inverse condition: */
if (buflen < strlen(scbuf) + (p - buf) + 2) {
return APR_ENOSPC;
}
*p++ = '%';
memcpy(p, scbuf, strlen(scbuf) + 1);
}
}
#endif /* HAVE_IF_INDEXTONAME */
#endif /* APR_HAVE_IPV6 */
return APR_SUCCESS;
}
@ -167,6 +197,14 @@ void apr_sockaddr_vars_set(apr_sockaddr_t *addr, int family, apr_port_t port)
addr->ipaddr_len = sizeof(struct in6_addr);
}
#endif
#if APR_HAVE_SOCKADDR_UN
else if (family == APR_UNIX) {
addr->salen = sizeof(struct sockaddr_un);
addr->addr_str_len = sizeof(addr->sa.unx.sun_path);;
addr->ipaddr_ptr = &(addr->sa.unx.sun_path);
addr->ipaddr_len = addr->addr_str_len;
}
#endif
}
APR_DECLARE(apr_status_t) apr_socket_addr_get(apr_sockaddr_t **sa,
@ -269,19 +307,13 @@ APR_DECLARE(apr_status_t) apr_parse_addr_port(char **addr,
return APR_EINVAL;
}
addrlen = scope_delim - str - 1;
*scope_id = apr_palloc(p, end_bracket - scope_delim);
memcpy(*scope_id, scope_delim + 1, end_bracket - scope_delim - 1);
(*scope_id)[end_bracket - scope_delim - 1] = '\0';
*scope_id = apr_pstrmemdup(p, scope_delim + 1, end_bracket - scope_delim - 1);
}
else {
addrlen = addrlen - 2; /* minus 2 for '[' and ']' */
}
*addr = apr_palloc(p, addrlen + 1);
memcpy(*addr,
str + 1,
addrlen);
(*addr)[addrlen] = '\0';
*addr = apr_pstrmemdup(p, str + 1, addrlen);
if (apr_inet_pton(AF_INET6, *addr, &ipaddr) != 1) {
*addr = NULL;
*scope_id = NULL;
@ -295,9 +327,7 @@ APR_DECLARE(apr_status_t) apr_parse_addr_port(char **addr,
/* XXX If '%' is not a valid char in a DNS name, we *could* check
* for bogus scope ids first.
*/
*addr = apr_palloc(p, addrlen + 1);
memcpy(*addr, str, addrlen);
(*addr)[addrlen] = '\0';
*addr = apr_pstrmemdup(p, str, addrlen);
}
return APR_SUCCESS;
}
@ -622,6 +652,33 @@ APR_DECLARE(apr_status_t) apr_sockaddr_info_get(apr_sockaddr_t **sa,
}
#endif
}
if (family == APR_UNSPEC && hostname && *hostname == '/') {
family = APR_UNIX;
}
if (family == APR_UNIX) {
#if APR_HAVE_SOCKADDR_UN
if (hostname && *hostname == '/') {
*sa = apr_pcalloc(p, sizeof(apr_sockaddr_t));
(*sa)->pool = p;
apr_cpystrn((*sa)->sa.unx.sun_path, hostname,
sizeof((*sa)->sa.unx.sun_path));
(*sa)->hostname = apr_pstrdup(p, hostname);
(*sa)->family = APR_UNIX;
(*sa)->sa.unx.sun_family = APR_UNIX;
(*sa)->salen = sizeof(struct sockaddr_un);
(*sa)->addr_str_len = sizeof((*sa)->sa.unx.sun_path);
(*sa)->ipaddr_ptr = &((*sa)->sa.unx.sun_path);
(*sa)->ipaddr_len = (*sa)->addr_str_len;
return APR_SUCCESS;
}
else
#endif
{
*sa = NULL;
return APR_ENOTIMPL;
}
}
#if !APR_HAVE_IPV6
/* What may happen is that APR is not IPv6-enabled, but we're still
* going to call getaddrinfo(), so we have to tell the OS we only
@ -636,6 +693,42 @@ APR_DECLARE(apr_status_t) apr_sockaddr_info_get(apr_sockaddr_t **sa,
return find_addresses(sa, hostname, family, port, flags, p);
}
APR_DECLARE(apr_status_t) apr_sockaddr_info_copy(apr_sockaddr_t **dst,
const apr_sockaddr_t *src,
apr_pool_t *p)
{
apr_sockaddr_t *d;
const apr_sockaddr_t *s;
for (*dst = d = NULL, s = src; s; s = s->next) {
if (!d) {
*dst = d = apr_pmemdup(p, s, sizeof *s);
}
else {
d = d->next = apr_pmemdup(p, s, sizeof *s);
}
if (s->hostname) {
if (s == src || s->hostname != src->hostname) {
d->hostname = apr_pstrdup(p, s->hostname);
}
else {
d->hostname = (*dst)->hostname;
}
}
if (s->servname) {
if (s == src || s->servname != src->servname) {
d->servname = apr_pstrdup(p, s->servname);
}
else {
d->servname = (*dst)->servname;
}
}
d->pool = p;
apr_sockaddr_vars_set(d, s->family, s->port);
}
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_getnameinfo(char **hostname,
apr_sockaddr_t *sockaddr,
apr_int32_t flags)
@ -674,6 +767,12 @@ APR_DECLARE(apr_status_t) apr_getnameinfo(char **hostname,
tmphostname, sizeof(tmphostname), NULL, 0,
flags != 0 ? flags : NI_NAMEREQD);
}
#if APR_HAVE_SOCKADDR_UN
else if (sockaddr->family == APR_UNIX) {
*hostname = sockaddr->hostname;
return APR_SUCCESS;
}
#endif
else
#endif
rc = getnameinfo((const struct sockaddr *)&sockaddr->sa, sockaddr->salen,
@ -831,11 +930,19 @@ APR_DECLARE(apr_status_t) apr_getservbyname(apr_sockaddr_t *sockaddr,
&((struct in6_addr *)(b)->ipaddr_ptr)->s6_addr[12], \
(a)->ipaddr_len))
#if APR_HAVE_IPV6
#define SCOPE_OR_ZERO(sa_) ((sa_)->family != AF_INET6 ? 0 : \
((sa_)->sa.sin6.sin6_scope_id))
#else
#define SCOPE_OR_ZERO(sa_) (0)
#endif
APR_DECLARE(int) apr_sockaddr_equal(const apr_sockaddr_t *addr1,
const apr_sockaddr_t *addr2)
{
if (addr1->ipaddr_len == addr2->ipaddr_len &&
!memcmp(addr1->ipaddr_ptr, addr2->ipaddr_ptr, addr1->ipaddr_len)) {
if (addr1->ipaddr_len == addr2->ipaddr_len
&& !memcmp(addr1->ipaddr_ptr, addr2->ipaddr_ptr, addr1->ipaddr_len)
&& SCOPE_OR_ZERO(addr1) == SCOPE_OR_ZERO(addr2)) {
return 1;
}
#if APR_HAVE_IPV6
@ -985,6 +1092,10 @@ static apr_status_t parse_ip(apr_ipsubnet_t *ipsub, const char *ipstr, int netwo
static int looks_like_ip(const char *ipstr)
{
if (strlen(ipstr) == 0) {
return 0;
}
if (strchr(ipstr, ':')) {
/* definitely not a hostname; assume it is intended to be an IPv6 address */
return 1;
@ -1110,3 +1221,64 @@ APR_DECLARE(int) apr_ipsubnet_test(apr_ipsubnet_t *ipsub, apr_sockaddr_t *sa)
#endif /* APR_HAVE_IPV6 */
return 0; /* no match */
}
APR_DECLARE(apr_status_t) apr_sockaddr_zone_set(apr_sockaddr_t *sa,
const char *zone_id)
{
#if !APR_HAVE_IPV6 || !defined(HAVE_IF_NAMETOINDEX)
return APR_ENOTIMPL;
#else
unsigned int idx;
if (sa->family != APR_INET6
|| !IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)sa->ipaddr_ptr)) {
return APR_EBADIP;
}
idx = if_nametoindex(zone_id);
if (idx) {
sa->sa.sin6.sin6_scope_id = idx;
return APR_SUCCESS;
}
if (errno != ENODEV) {
return errno;
}
else {
char *endptr;
apr_int64_t i = apr_strtoi64(zone_id, &endptr, 10);
if (*endptr != '\0' || errno || i < 1 || i > APR_INT16_MAX) {
return APR_EGENERAL;
}
sa->sa.sin6.sin6_scope_id = (unsigned int) i;
return APR_SUCCESS;
}
#endif
}
APR_DECLARE(apr_status_t) apr_sockaddr_zone_get(const apr_sockaddr_t *sa,
const char **name,
apr_uint32_t *id,
apr_pool_t *p)
{
#if !APR_HAVE_IPV6 || !defined(HAVE_IF_INDEXTONAME)
return APR_ENOTIMPL;
#else
if (sa->family != APR_INET6 || !sa->sa.sin6.sin6_scope_id) {
return APR_EBADIP;
}
if (name) {
char *buf = apr_palloc(p, IF_NAMESIZE);
if (if_indextoname(sa->sa.sin6.sin6_scope_id, buf) == NULL)
return errno;
*name = buf;
}
if (id) *id = sa->sa.sin6.sin6_scope_id;
return APR_SUCCESS;
#endif
}

View File

@ -26,13 +26,26 @@
#define close closesocket
#endif /* BEOS_R5 */
static char generic_inaddr_any[16] = {0}; /* big enough for IPv4 or IPv6 */
#if APR_HAVE_SOCKADDR_UN
#define GENERIC_INADDR_ANY_LEN sizeof(struct sockaddr_un)
#else
#define GENERIC_INADDR_ANY_LEN 16
#endif
/* big enough for IPv4, IPv6 and optionaly sun_path */
static char generic_inaddr_any[GENERIC_INADDR_ANY_LEN] = {0};
static apr_status_t socket_cleanup(void *sock)
{
apr_socket_t *thesocket = sock;
int sd = thesocket->socketdes;
#if APR_HAVE_SOCKADDR_UN
if (thesocket->bound && thesocket->local_addr->family == APR_UNIX) {
/* XXX: Check for return values ? */
unlink(thesocket->local_addr->hostname);
}
#endif
/* Set socket descriptor to -1 before close(), so that there is no
* chance of returning an already closed FD from apr_os_sock_get().
*/
@ -49,6 +62,18 @@ static apr_status_t socket_cleanup(void *sock)
}
}
static apr_status_t socket_child_cleanup(void *sock)
{
apr_socket_t *thesocket = sock;
if (close(thesocket->socketdes) == 0) {
thesocket->socketdes = -1;
return APR_SUCCESS;
}
else {
return errno;
}
}
static void set_socket_vars(apr_socket_t *sock, int family, int type, int protocol)
{
sock->type = type;
@ -92,6 +117,7 @@ apr_status_t apr_socket_create(apr_socket_t **new, int ofamily, int type,
int protocol, apr_pool_t *cont)
{
int family = ofamily, flags = 0;
int oprotocol = protocol;
#ifdef HAVE_SOCK_CLOEXEC
flags |= SOCK_CLOEXEC;
@ -104,7 +130,11 @@ apr_status_t apr_socket_create(apr_socket_t **new, int ofamily, int type,
family = APR_INET;
#endif
}
#if APR_HAVE_SOCKADDR_UN
if (family == APR_UNIX) {
protocol = 0;
}
#endif
alloc_socket(new, cont);
#ifndef BEOS_R5
@ -140,7 +170,7 @@ apr_status_t apr_socket_create(apr_socket_t **new, int ofamily, int type,
if ((*new)->socketdes < 0) {
return errno;
}
set_socket_vars(*new, family, type, protocol);
set_socket_vars(*new, family, type, oprotocol);
#ifndef HAVE_SOCK_CLOEXEC
{
@ -167,7 +197,7 @@ apr_status_t apr_socket_create(apr_socket_t **new, int ofamily, int type,
(*new)->timeout = -1;
(*new)->inherit = 0;
apr_pool_cleanup_register((*new)->pool, (void *)(*new), socket_cleanup,
socket_cleanup);
socket_child_cleanup);
return APR_SUCCESS;
}
@ -192,6 +222,13 @@ apr_status_t apr_socket_bind(apr_socket_t *sock, apr_sockaddr_t *sa)
else {
sock->local_addr = sa;
/* XXX IPv6 - this assumes sin_port and sin6_port at same offset */
#if APR_HAVE_SOCKADDR_UN
if (sock->local_addr->family == APR_UNIX) {
sock->bound = 1;
sock->local_port_unknown = 1;
}
else
#endif
if (sock->local_addr->sa.sin.sin_port == 0) { /* no need for ntohs() when comparing w/ 0 */
sock->local_port_unknown = 1; /* kernel got us an ephemeral port */
}
@ -281,6 +318,14 @@ apr_status_t apr_socket_accept(apr_socket_t **new, apr_socket_t *sock,
else if (sock->local_addr->sa.sin.sin_family == AF_INET6) {
(*new)->local_addr->ipaddr_ptr = &(*new)->local_addr->sa.sin6.sin6_addr;
}
#endif
#if APR_HAVE_SOCKADDR_UN
else if (sock->local_addr->sa.sin.sin_family == AF_UNIX) {
*(*new)->remote_addr = *sock->local_addr;
(*new)->local_addr->ipaddr_ptr = &((*new)->local_addr->sa.unx.sun_path);
(*new)->remote_addr->ipaddr_ptr = &((*new)->remote_addr->sa.unx.sun_path);
}
if (sock->local_addr->sa.sin.sin_family != AF_UNIX)
#endif
(*new)->remote_addr->port = ntohs((*new)->remote_addr->sa.sin.sin_port);
if (sock->local_port_unknown) {
@ -375,7 +420,6 @@ apr_status_t apr_socket_connect(apr_socket_t *sock, apr_sockaddr_t *sa)
#endif /* SO_ERROR */
}
if (memcmp(sa->ipaddr_ptr, generic_inaddr_any, sa->ipaddr_len)) {
/* A real remote address was passed in. If the unspecified
* address was used, the actual remote addr will have to be
@ -393,6 +437,13 @@ apr_status_t apr_socket_connect(apr_socket_t *sock, apr_sockaddr_t *sa)
/* connect() got us an ephemeral port */
sock->local_port_unknown = 1;
}
#if APR_HAVE_SOCKADDR_UN
if (sock->local_addr->sa.sin.sin_family == AF_UNIX) {
/* Assign connect address as local. */
sock->local_addr = sa;
}
else
#endif
if (!memcmp(sock->local_addr->ipaddr_ptr,
generic_inaddr_any,
sock->local_addr->ipaddr_len)) {

View File

@ -328,6 +328,20 @@ apr_status_t apr_socket_opt_set(apr_socket_t *sock,
apr_set_option(sock, APR_IPV6_V6ONLY, on);
#else
return APR_ENOTIMPL;
#endif
break;
case APR_SO_FREEBIND:
#if defined(IP_FREEBIND)
if (setsockopt(sock->socketdes, SOL_IP, IP_FREEBIND,
(void *)&one, sizeof(int)) == -1) {
return errno;
}
apr_set_option(sock, APR_SO_FREEBIND, on);
#elif 0 /* defined(IP_BINDANY) ... */
/* TODO: insert FreeBSD support here, note family specific
* options, IP_BINDANY vs IPV6_BINDANY */
#else
return APR_ENOTIMPL;
#endif
break;
default:
@ -428,3 +442,24 @@ apr_status_t apr_socket_accept_filter(apr_socket_t *sock, char *nonconst_name,
return APR_SUCCESS;
}
#endif
APR_PERMS_SET_IMPLEMENT(socket)
{
#if APR_HAVE_SOCKADDR_UN
apr_status_t rv = APR_SUCCESS;
apr_socket_t *socket = (apr_socket_t *)thesocket;
if (socket->local_addr->family == APR_UNIX) {
if (!(perms & APR_FPROT_GSETID))
gid = -1;
if (fchown(socket->socketdes, uid, gid) < 0) {
rv = errno;
}
}
else
rv = APR_EINVAL;
return rv;
#else
return APR_ENOTIMPL;
#endif
}

View File

@ -157,7 +157,7 @@ static apr_status_t impl_pollset_add(apr_pollset_t *pollset,
const apr_pollfd_t *descriptor)
{
struct epoll_event ev = {0};
int ret = -1;
int ret;
pfd_elem_t *elem = NULL;
apr_status_t rv = APR_SUCCESS;
@ -214,7 +214,7 @@ static apr_status_t impl_pollset_remove(apr_pollset_t *pollset,
struct epoll_event ev = {0}; /* ignored, but must be passed with
* kernel < 2.6.9
*/
int ret = -1;
int ret;
if (descriptor->desc_type == APR_POLL_SOCKET) {
ret = epoll_ctl(pollset->p->epoll_fd, EPOLL_CTL_DEL,
@ -255,9 +255,10 @@ static apr_status_t impl_pollset_poll(apr_pollset_t *pollset,
apr_int32_t *num,
const apr_pollfd_t **descriptors)
{
int ret, i, j;
int ret;
apr_status_t rv = APR_SUCCESS;
apr_pollfd_t *fdptr;
*num = 0;
if (timeout > 0) {
timeout /= 1000;
@ -265,8 +266,6 @@ static apr_status_t impl_pollset_poll(apr_pollset_t *pollset,
ret = epoll_wait(pollset->p->epoll_fd, pollset->p->pollset, pollset->nalloc,
timeout);
(*num) = ret;
if (ret < 0) {
rv = apr_get_netos_error();
}
@ -274,6 +273,9 @@ static apr_status_t impl_pollset_poll(apr_pollset_t *pollset,
rv = APR_TIMEUP;
}
else {
int i, j;
const apr_pollfd_t *fdptr;
for (i = 0, j = 0; i < ret; i++) {
if (pollset->flags & APR_POLLSET_NOCOPY) {
fdptr = (apr_pollfd_t *)(pollset->p->pollset[i].data.ptr);
@ -287,7 +289,7 @@ static apr_status_t impl_pollset_poll(apr_pollset_t *pollset,
if ((pollset->flags & APR_POLLSET_WAKEABLE) &&
fdptr->desc_type == APR_POLL_FILE &&
fdptr->desc.f == pollset->wakeup_pipe[0]) {
apr_pollset_drain_wakeup_pipe(pollset);
apr_poll_drain_wakeup_pipe(pollset->wakeup_pipe);
rv = APR_EINTR;
}
else {
@ -318,7 +320,7 @@ static apr_status_t impl_pollset_poll(apr_pollset_t *pollset,
return rv;
}
static apr_pollset_provider_t impl = {
static const apr_pollset_provider_t impl = {
impl_pollset_create,
impl_pollset_add,
impl_pollset_remove,
@ -327,11 +329,10 @@ static apr_pollset_provider_t impl = {
"epoll"
};
apr_pollset_provider_t *apr_pollset_provider_epoll = &impl;
const apr_pollset_provider_t *const apr_pollset_provider_epoll = &impl;
static apr_status_t cb_cleanup(void *p_)
static apr_status_t impl_pollcb_cleanup(apr_pollcb_t *pollcb)
{
apr_pollcb_t *pollcb = (apr_pollcb_t *) p_;
close(pollcb->fd);
return APR_SUCCESS;
}
@ -377,7 +378,6 @@ static apr_status_t impl_pollcb_create(apr_pollcb_t *pollcb,
pollcb->fd = fd;
pollcb->pollset.epoll = apr_palloc(p, size * sizeof(struct epoll_event));
apr_pool_cleanup_register(p, pollcb, cb_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
@ -385,11 +385,11 @@ static apr_status_t impl_pollcb_create(apr_pollcb_t *pollcb,
static apr_status_t impl_pollcb_add(apr_pollcb_t *pollcb,
apr_pollfd_t *descriptor)
{
struct epoll_event ev;
struct epoll_event ev = { 0 };
int ret;
ev.events = get_epoll_event(descriptor->reqevents);
ev.data.ptr = (void *)descriptor;
ev.data.ptr = (void *) descriptor;
if (descriptor->desc_type == APR_POLL_SOCKET) {
ret = epoll_ctl(pollcb->fd, EPOLL_CTL_ADD,
@ -414,7 +414,7 @@ static apr_status_t impl_pollcb_remove(apr_pollcb_t *pollcb,
struct epoll_event ev = {0}; /* ignored, but must be passed with
* kernel < 2.6.9
*/
int ret = -1;
int ret;
if (descriptor->desc_type == APR_POLL_SOCKET) {
ret = epoll_ctl(pollcb->fd, EPOLL_CTL_DEL,
@ -456,6 +456,14 @@ static apr_status_t impl_pollcb_poll(apr_pollcb_t *pollcb,
else {
for (i = 0; i < ret; i++) {
apr_pollfd_t *pollfd = (apr_pollfd_t *)(pollcb->pollset.epoll[i].data.ptr);
if ((pollcb->flags & APR_POLLSET_WAKEABLE) &&
pollfd->desc_type == APR_POLL_FILE &&
pollfd->desc.f == pollcb->wakeup_pipe[0]) {
apr_poll_drain_wakeup_pipe(pollcb->wakeup_pipe);
return APR_EINTR;
}
pollfd->rtnevents = get_epoll_revent(pollcb->pollset.epoll[i].events);
rv = func(baton, pollfd);
@ -468,14 +476,15 @@ static apr_status_t impl_pollcb_poll(apr_pollcb_t *pollcb,
return rv;
}
static apr_pollcb_provider_t impl_cb = {
static const apr_pollcb_provider_t impl_cb = {
impl_pollcb_create,
impl_pollcb_add,
impl_pollcb_remove,
impl_pollcb_poll,
impl_pollcb_cleanup,
"epoll"
};
apr_pollcb_provider_t *apr_pollcb_provider_epoll = &impl_cb;
const apr_pollcb_provider_t *const apr_pollcb_provider_epoll = &impl_cb;
#endif /* HAVE_EPOLL */

View File

@ -254,10 +254,11 @@ static apr_status_t impl_pollset_poll(apr_pollset_t *pollset,
apr_int32_t *num,
const apr_pollfd_t **descriptors)
{
int ret, i, j;
int ret;
struct timespec tv, *tvptr;
apr_status_t rv = APR_SUCCESS;
apr_pollfd_t fd;
*num = 0;
if (timeout < 0) {
tvptr = NULL;
@ -270,7 +271,6 @@ static apr_status_t impl_pollset_poll(apr_pollset_t *pollset,
ret = kevent(pollset->p->kqueue_fd, NULL, 0, pollset->p->ke_set,
pollset->p->setsize, tvptr);
(*num) = ret;
if (ret < 0) {
rv = apr_get_netos_error();
}
@ -278,16 +278,19 @@ static apr_status_t impl_pollset_poll(apr_pollset_t *pollset,
rv = APR_TIMEUP;
}
else {
int i, j;
const apr_pollfd_t *fd;
for (i = 0, j = 0; i < ret; i++) {
fd = (((pfd_elem_t*)(pollset->p->ke_set[i].udata))->pfd);
fd = &((pfd_elem_t *)pollset->p->ke_set[i].udata)->pfd;
if ((pollset->flags & APR_POLLSET_WAKEABLE) &&
fd.desc_type == APR_POLL_FILE &&
fd.desc.f == pollset->wakeup_pipe[0]) {
apr_pollset_drain_wakeup_pipe(pollset);
fd->desc_type == APR_POLL_FILE &&
fd->desc.f == pollset->wakeup_pipe[0]) {
apr_poll_drain_wakeup_pipe(pollset->wakeup_pipe);
rv = APR_EINTR;
}
else {
pollset->p->result_set[j] = fd;
pollset->p->result_set[j] = *fd;
pollset->p->result_set[j].rtnevents =
get_kqueue_revent(pollset->p->ke_set[i].filter,
pollset->p->ke_set[i].flags);
@ -302,7 +305,6 @@ static apr_status_t impl_pollset_poll(apr_pollset_t *pollset,
}
}
pollset_lock_rings();
/* Shift all PFDs in the Dead Ring to the Free Ring */
@ -314,7 +316,7 @@ static apr_status_t impl_pollset_poll(apr_pollset_t *pollset,
return rv;
}
static apr_pollset_provider_t impl = {
static const apr_pollset_provider_t impl = {
impl_pollset_create,
impl_pollset_add,
impl_pollset_remove,
@ -323,11 +325,10 @@ static apr_pollset_provider_t impl = {
"kqueue"
};
apr_pollset_provider_t *apr_pollset_provider_kqueue = &impl;
const apr_pollset_provider_t *apr_pollset_provider_kqueue = &impl;
static apr_status_t cb_cleanup(void *b_)
static apr_status_t impl_pollcb_cleanup(apr_pollcb_t *pollcb)
{
apr_pollcb_t *pollcb = (apr_pollcb_t *) b_;
close(pollcb->fd);
return APR_SUCCESS;
}
@ -365,8 +366,7 @@ static apr_status_t impl_pollcb_create(apr_pollcb_t *pollcb,
}
pollcb->fd = fd;
pollcb->pollset.ke = (struct kevent *)apr_pcalloc(p, 2 * size * sizeof(struct kevent));
apr_pool_cleanup_register(p, pollcb, cb_cleanup, apr_pool_cleanup_null);
pollcb->pollset.ke = (struct kevent *) apr_pcalloc(p, 2 * size * sizeof(struct kevent));
return APR_SUCCESS;
}
@ -469,7 +469,14 @@ static apr_status_t impl_pollcb_poll(apr_pollcb_t *pollcb,
else {
for (i = 0; i < ret; i++) {
apr_pollfd_t *pollfd = (apr_pollfd_t *)(pollcb->pollset.ke[i].udata);
if ((pollcb->flags & APR_POLLSET_WAKEABLE) &&
pollfd->desc_type == APR_POLL_FILE &&
pollfd->desc.f == pollcb->wakeup_pipe[0]) {
apr_poll_drain_wakeup_pipe(pollcb->wakeup_pipe);
return APR_EINTR;
}
pollfd->rtnevents = get_kqueue_revent(pollcb->pollset.ke[i].filter,
pollcb->pollset.ke[i].flags);
@ -484,14 +491,15 @@ static apr_status_t impl_pollcb_poll(apr_pollcb_t *pollcb,
return rv;
}
static apr_pollcb_provider_t impl_cb = {
static const apr_pollcb_provider_t impl_cb = {
impl_pollcb_create,
impl_pollcb_add,
impl_pollcb_remove,
impl_pollcb_poll,
impl_pollcb_cleanup,
"kqueue"
};
apr_pollcb_provider_t *apr_pollcb_provider_kqueue = &impl_cb;
const apr_pollcb_provider_t *apr_pollcb_provider_kqueue = &impl_cb;
#endif /* HAVE_KQUEUE */

View File

@ -241,10 +241,11 @@ static apr_status_t impl_pollset_poll(apr_pollset_t *pollset,
int ret;
apr_status_t rv = APR_SUCCESS;
*num = 0;
#ifdef WIN32
/* WSAPoll() requires at least one socket. */
if (pollset->nelts == 0) {
*num = 0;
if (timeout > 0) {
apr_sleep(timeout);
return APR_TIMEUP;
@ -261,7 +262,6 @@ static apr_status_t impl_pollset_poll(apr_pollset_t *pollset,
}
ret = poll(pollset->p->pollset, pollset->nelts, timeout);
#endif
(*num) = ret;
if (ret < 0) {
return apr_get_netos_error();
}
@ -279,8 +279,8 @@ static apr_status_t impl_pollset_poll(apr_pollset_t *pollset,
if ((pollset->flags & APR_POLLSET_WAKEABLE) &&
pollset->p->query_set[i].desc_type == APR_POLL_FILE &&
pollset->p->query_set[i].desc.f == pollset->wakeup_pipe[0]) {
apr_pollset_drain_wakeup_pipe(pollset);
rv = APR_EINTR;
apr_poll_drain_wakeup_pipe(pollset->wakeup_pipe);
rv = APR_EINTR;
}
else {
pollset->p->result_set[j] = pollset->p->query_set[i];
@ -290,15 +290,16 @@ static apr_status_t impl_pollset_poll(apr_pollset_t *pollset,
}
}
}
if (((*num) = j) > 0)
if ((*num = j)) { /* any event besides wakeup pipe? */
rv = APR_SUCCESS;
}
}
if (descriptors && (*num))
*descriptors = pollset->p->result_set;
return rv;
}
static apr_pollset_provider_t impl = {
static const apr_pollset_provider_t impl = {
impl_pollset_create,
impl_pollset_add,
impl_pollset_remove,
@ -307,7 +308,7 @@ static apr_pollset_provider_t impl = {
"poll"
};
apr_pollset_provider_t *apr_pollset_provider_poll = &impl;
const apr_pollset_provider_t *apr_pollset_provider_poll = &impl;
/* Poll method pollcb.
* This is probably usable only for WIN32 having WSAPoll
@ -426,6 +427,14 @@ static apr_status_t impl_pollcb_poll(apr_pollcb_t *pollcb,
for (i = 0; i < pollcb->nelts; i++) {
if (pollcb->pollset.ps[i].revents != 0) {
apr_pollfd_t *pollfd = pollcb->copyset[i];
if ((pollcb->flags & APR_POLLSET_WAKEABLE) &&
pollfd->desc_type == APR_POLL_FILE &&
pollfd->desc.f == pollcb->wakeup_pipe[0]) {
apr_poll_drain_wakeup_pipe(pollcb->wakeup_pipe);
return APR_EINTR;
}
pollfd->rtnevents = get_revent(pollcb->pollset.ps[i].revents);
rv = func(baton, pollfd);
if (rv) {
@ -437,14 +446,15 @@ static apr_status_t impl_pollcb_poll(apr_pollcb_t *pollcb,
return rv;
}
static apr_pollcb_provider_t impl_cb = {
static const apr_pollcb_provider_t impl_cb = {
impl_pollcb_create,
impl_pollcb_add,
impl_pollcb_remove,
impl_pollcb_poll,
NULL,
"poll"
};
apr_pollcb_provider_t *apr_pollcb_provider_poll = &impl_cb;
const apr_pollcb_provider_t *apr_pollcb_provider_poll = &impl_cb;
#endif /* HAVE_POLL */

View File

@ -29,21 +29,21 @@
static apr_pollset_method_e pollset_default_method = POLLSET_DEFAULT_METHOD;
#if defined(HAVE_KQUEUE)
extern apr_pollcb_provider_t *apr_pollcb_provider_kqueue;
extern const apr_pollcb_provider_t *apr_pollcb_provider_kqueue;
#endif
#if defined(HAVE_PORT_CREATE)
extern apr_pollcb_provider_t *apr_pollcb_provider_port;
extern const apr_pollcb_provider_t *apr_pollcb_provider_port;
#endif
#if defined(HAVE_EPOLL)
extern apr_pollcb_provider_t *apr_pollcb_provider_epoll;
extern const apr_pollcb_provider_t *apr_pollcb_provider_epoll;
#endif
#if defined(HAVE_POLL)
extern apr_pollcb_provider_t *apr_pollcb_provider_poll;
extern const apr_pollcb_provider_t *apr_pollcb_provider_poll;
#endif
static apr_pollcb_provider_t *pollcb_provider(apr_pollset_method_e method)
static const apr_pollcb_provider_t *pollcb_provider(apr_pollset_method_e method)
{
apr_pollcb_provider_t *provider = NULL;
const apr_pollcb_provider_t *provider = NULL;
switch (method) {
case APR_POLLSET_KQUEUE:
#if defined(HAVE_KQUEUE)
@ -73,6 +73,20 @@ static apr_pollcb_provider_t *pollcb_provider(apr_pollset_method_e method)
return provider;
}
static apr_status_t pollcb_cleanup(void *p)
{
apr_pollcb_t *pollcb = (apr_pollcb_t *) p;
if (pollcb->provider->cleanup) {
(*pollcb->provider->cleanup)(pollcb);
}
if (pollcb->flags & APR_POLLSET_WAKEABLE) {
apr_poll_close_wakeup_pipe(pollcb->wakeup_pipe);
}
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_pollcb_create_ex(apr_pollcb_t **ret_pollcb,
apr_uint32_t size,
apr_pool_t *p,
@ -81,7 +95,7 @@ APR_DECLARE(apr_status_t) apr_pollcb_create_ex(apr_pollcb_t **ret_pollcb,
{
apr_status_t rv;
apr_pollcb_t *pollcb;
apr_pollcb_provider_t *provider = NULL;
const apr_pollcb_provider_t *provider = NULL;
*ret_pollcb = NULL;
@ -109,9 +123,15 @@ APR_DECLARE(apr_status_t) apr_pollcb_create_ex(apr_pollcb_t **ret_pollcb,
}
}
if (flags & APR_POLLSET_WAKEABLE) {
/* Add room for wakeup descriptor */
size++;
}
pollcb = apr_palloc(p, sizeof(*pollcb));
pollcb->nelts = 0;
pollcb->nalloc = size;
pollcb->flags = flags;
pollcb->pool = p;
pollcb->provider = provider;
@ -140,6 +160,22 @@ APR_DECLARE(apr_status_t) apr_pollcb_create_ex(apr_pollcb_t **ret_pollcb,
return rv;
}
if (flags & APR_POLLSET_WAKEABLE) {
/* Create wakeup pipe */
if ((rv = apr_poll_create_wakeup_pipe(pollcb->pool, &pollcb->wakeup_pfd,
pollcb->wakeup_pipe))
!= APR_SUCCESS) {
return rv;
}
if ((rv = apr_pollcb_add(pollcb, &pollcb->wakeup_pfd)) != APR_SUCCESS) {
return rv;
}
}
if ((flags & APR_POLLSET_WAKEABLE) || provider->cleanup)
apr_pool_cleanup_register(p, pollcb, pollcb_cleanup,
apr_pool_cleanup_null);
*ret_pollcb = pollcb;
return APR_SUCCESS;
}
@ -173,3 +209,16 @@ APR_DECLARE(apr_status_t) apr_pollcb_poll(apr_pollcb_t *pollcb,
{
return (*pollcb->provider->poll)(pollcb, timeout, func, baton);
}
APR_DECLARE(apr_status_t) apr_pollcb_wakeup(apr_pollcb_t *pollcb)
{
if (pollcb->flags & APR_POLLSET_WAKEABLE)
return apr_file_putc(1, pollcb->wakeup_pipe[1]);
else
return APR_EINIT;
}
APR_DECLARE(const char *) apr_pollcb_method_name(apr_pollcb_t *pollcb)
{
return pollcb->provider->name;
}

View File

@ -30,101 +30,6 @@
static apr_pollset_method_e pollset_default_method = POLLSET_DEFAULT_METHOD;
#if !APR_FILES_AS_SOCKETS
#if defined (WIN32)
/* Create a dummy wakeup socket pipe for interrupting the poller
*/
static apr_status_t create_wakeup_pipe(apr_pollset_t *pollset)
{
apr_status_t rv;
if ((rv = apr_file_socket_pipe_create(&pollset->wakeup_pipe[0],
&pollset->wakeup_pipe[1],
pollset->pool)) != APR_SUCCESS)
return rv;
pollset->wakeup_pfd.p = pollset->pool;
pollset->wakeup_pfd.reqevents = APR_POLLIN;
pollset->wakeup_pfd.desc_type = APR_POLL_FILE;
pollset->wakeup_pfd.desc.f = pollset->wakeup_pipe[0];
return apr_pollset_add(pollset, &pollset->wakeup_pfd);
}
#else /* !WIN32 */
static apr_status_t create_wakeup_pipe(apr_pollset_t *pollset)
{
return APR_ENOTIMPL;
}
static apr_status_t apr_file_socket_pipe_close(apr_file_t *file)
{
return APR_ENOTIMPL;
}
#endif /* WIN32 */
#else /* APR_FILES_AS_SOCKETS */
/* Create a dummy wakeup pipe for interrupting the poller
*/
static apr_status_t create_wakeup_pipe(apr_pollset_t *pollset)
{
apr_status_t rv;
if ((rv = apr_file_pipe_create(&pollset->wakeup_pipe[0],
&pollset->wakeup_pipe[1],
pollset->pool)) != APR_SUCCESS)
return rv;
pollset->wakeup_pfd.p = pollset->pool;
pollset->wakeup_pfd.reqevents = APR_POLLIN;
pollset->wakeup_pfd.desc_type = APR_POLL_FILE;
pollset->wakeup_pfd.desc.f = pollset->wakeup_pipe[0];
{
int flags;
if ((flags = fcntl(pollset->wakeup_pipe[0]->filedes, F_GETFD)) == -1)
return errno;
flags |= FD_CLOEXEC;
if (fcntl(pollset->wakeup_pipe[0]->filedes, F_SETFD, flags) == -1)
return errno;
}
{
int flags;
if ((flags = fcntl(pollset->wakeup_pipe[1]->filedes, F_GETFD)) == -1)
return errno;
flags |= FD_CLOEXEC;
if (fcntl(pollset->wakeup_pipe[1]->filedes, F_SETFD, flags) == -1)
return errno;
}
return apr_pollset_add(pollset, &pollset->wakeup_pfd);
}
#endif /* !APR_FILES_AS_SOCKETS */
/* Read and discard what's ever in the wakeup pipe.
*/
void apr_pollset_drain_wakeup_pipe(apr_pollset_t *pollset)
{
char rb[512];
apr_size_t nr = sizeof(rb);
while (apr_file_read(pollset->wakeup_pipe[0], rb, &nr) == APR_SUCCESS) {
/* Although we write just one byte to the other end of the pipe
* during wakeup, multiple threads could call the wakeup.
* So simply drain out from the input side of the pipe all
* the data.
*/
if (nr != sizeof(rb))
break;
}
}
static apr_status_t pollset_cleanup(void *p)
{
apr_pollset_t *pollset = (apr_pollset_t *) p;
@ -132,48 +37,32 @@ static apr_status_t pollset_cleanup(void *p)
(*pollset->provider->cleanup)(pollset);
}
if (pollset->flags & APR_POLLSET_WAKEABLE) {
/* Close both sides of the wakeup pipe */
if (pollset->wakeup_pipe[0]) {
#if APR_FILES_AS_SOCKETS
apr_file_close(pollset->wakeup_pipe[0]);
#else
apr_file_socket_pipe_close(pollset->wakeup_pipe[0]);
#endif
pollset->wakeup_pipe[0] = NULL;
}
if (pollset->wakeup_pipe[1]) {
#if APR_FILES_AS_SOCKETS
apr_file_close(pollset->wakeup_pipe[1]);
#else
apr_file_socket_pipe_close(pollset->wakeup_pipe[1]);
#endif
pollset->wakeup_pipe[1] = NULL;
}
apr_poll_close_wakeup_pipe(pollset->wakeup_pipe);
}
return APR_SUCCESS;
}
#if defined(HAVE_KQUEUE)
extern apr_pollset_provider_t *apr_pollset_provider_kqueue;
extern const apr_pollset_provider_t *apr_pollset_provider_kqueue;
#endif
#if defined(HAVE_PORT_CREATE)
extern apr_pollset_provider_t *apr_pollset_provider_port;
extern const apr_pollset_provider_t *apr_pollset_provider_port;
#endif
#if defined(HAVE_EPOLL)
extern apr_pollset_provider_t *apr_pollset_provider_epoll;
extern const apr_pollset_provider_t *apr_pollset_provider_epoll;
#endif
#if defined(HAVE_AIO_MSGQ)
extern apr_pollset_provider_t *apr_pollset_provider_aio_msgq;
extern const apr_pollset_provider_t *apr_pollset_provider_aio_msgq;
#endif
#if defined(HAVE_POLL)
extern apr_pollset_provider_t *apr_pollset_provider_poll;
extern const apr_pollset_provider_t *apr_pollset_provider_poll;
#endif
extern apr_pollset_provider_t *apr_pollset_provider_select;
extern const apr_pollset_provider_t *apr_pollset_provider_select;
static apr_pollset_provider_t *pollset_provider(apr_pollset_method_e method)
static const apr_pollset_provider_t *pollset_provider(apr_pollset_method_e method)
{
apr_pollset_provider_t *provider = NULL;
const apr_pollset_provider_t *provider = NULL;
switch (method) {
case APR_POLLSET_KQUEUE:
#if defined(HAVE_KQUEUE)
@ -217,7 +106,7 @@ APR_DECLARE(apr_status_t) apr_pollset_create_ex(apr_pollset_t **ret_pollset,
{
apr_status_t rv;
apr_pollset_t *pollset;
apr_pollset_provider_t *provider = NULL;
const apr_pollset_provider_t *provider = NULL;
*ret_pollset = NULL;
@ -276,7 +165,13 @@ APR_DECLARE(apr_status_t) apr_pollset_create_ex(apr_pollset_t **ret_pollset,
}
if (flags & APR_POLLSET_WAKEABLE) {
/* Create wakeup pipe */
if ((rv = create_wakeup_pipe(pollset)) != APR_SUCCESS) {
if ((rv = apr_poll_create_wakeup_pipe(pollset->pool, &pollset->wakeup_pfd,
pollset->wakeup_pipe))
!= APR_SUCCESS) {
return rv;
}
if ((rv = apr_pollset_add(pollset, &pollset->wakeup_pfd)) != APR_SUCCESS) {
return rv;
}
}
@ -295,7 +190,7 @@ APR_DECLARE(const char *) apr_pollset_method_name(apr_pollset_t *pollset)
APR_DECLARE(const char *) apr_poll_method_defname()
{
apr_pollset_provider_t *provider = NULL;
const apr_pollset_provider_t *provider = NULL;
provider = pollset_provider(pollset_default_method);
if (provider)

View File

@ -354,12 +354,13 @@ static apr_status_t impl_pollset_poll(apr_pollset_t *pollset,
const apr_pollfd_t **descriptors)
{
apr_os_sock_t fd;
int ret, i, j;
unsigned int nget;
int ret;
unsigned int nget, i;
apr_int32_t j;
pfd_elem_t *ep;
apr_status_t rv = APR_SUCCESS;
apr_pollfd_t fp;
*num = 0;
nget = 1;
pollset_lock_rings();
@ -403,49 +404,40 @@ static apr_status_t impl_pollset_poll(apr_pollset_t *pollset,
port_associate within apr_pollset_add() */
apr_atomic_dec32(&pollset->p->waiting);
(*num) = nget;
if (nget) {
pollset_lock_rings();
pollset_lock_rings();
for (i = 0, j = 0; i < nget; i++) {
fp = (((pfd_elem_t*)(pollset->p->port_set[i].portev_user))->pfd);
if ((pollset->flags & APR_POLLSET_WAKEABLE) &&
fp.desc_type == APR_POLL_FILE &&
fp.desc.f == pollset->wakeup_pipe[0]) {
apr_pollset_drain_wakeup_pipe(pollset);
rv = APR_EINTR;
}
else {
pollset->p->result_set[j] = fp;
pollset->p->result_set[j].rtnevents =
get_revent(pollset->p->port_set[i].portev_events);
/* If the ring element is still on the query ring, move it
* to the add ring for re-association with the event port
* later. (It may have already been moved to the dead ring
* by a call to pollset_remove on another thread.)
*/
ep = (pfd_elem_t *)pollset->p->port_set[i].portev_user;
if (ep->on_query_ring) {
APR_RING_REMOVE(ep, link);
ep->on_query_ring = 0;
APR_RING_INSERT_TAIL(&(pollset->p->add_ring), ep,
pfd_elem_t, link);
}
j++;
}
for (i = 0, j = 0; i < nget; i++) {
ep = (pfd_elem_t *)pollset->p->port_set[i].portev_user;
if ((pollset->flags & APR_POLLSET_WAKEABLE) &&
ep->pfd.desc_type == APR_POLL_FILE &&
ep->pfd.desc.f == pollset->wakeup_pipe[0]) {
apr_poll_drain_wakeup_pipe(pollset->wakeup_pipe);
rv = APR_EINTR;
}
pollset_unlock_rings();
if ((*num = j)) { /* any event besides wakeup pipe? */
rv = APR_SUCCESS;
if (descriptors) {
*descriptors = pollset->p->result_set;
}
else {
pollset->p->result_set[j] = ep->pfd;
pollset->p->result_set[j].rtnevents =
get_revent(pollset->p->port_set[i].portev_events);
j++;
}
/* If the ring element is still on the query ring, move it
* to the add ring for re-association with the event port
* later. (It may have already been moved to the dead ring
* by a call to pollset_remove on another thread.)
*/
if (ep->on_query_ring) {
APR_RING_REMOVE(ep, link);
ep->on_query_ring = 0;
APR_RING_INSERT_TAIL(&(pollset->p->add_ring), ep,
pfd_elem_t, link);
}
}
if ((*num = j)) { /* any event besides wakeup pipe? */
rv = APR_SUCCESS;
if (descriptors) {
*descriptors = pollset->p->result_set;
}
}
pollset_lock_rings();
/* Shift all PFDs in the Dead Ring to the Free Ring */
APR_RING_CONCAT(&(pollset->p->free_ring), &(pollset->p->dead_ring), pfd_elem_t, link);
@ -455,7 +447,7 @@ static apr_status_t impl_pollset_poll(apr_pollset_t *pollset,
return rv;
}
static apr_pollset_provider_t impl = {
static const apr_pollset_provider_t impl = {
impl_pollset_create,
impl_pollset_add,
impl_pollset_remove,
@ -464,11 +456,10 @@ static apr_pollset_provider_t impl = {
"port"
};
apr_pollset_provider_t *apr_pollset_provider_port = &impl;
const apr_pollset_provider_t *apr_pollset_provider_port = &impl;
static apr_status_t cb_cleanup(void *p_)
static apr_status_t impl_pollcb_cleanup(apr_pollcb_t *pollcb)
{
apr_pollcb_t *pollcb = (apr_pollcb_t *) p_;
close(pollcb->fd);
return APR_SUCCESS;
}
@ -505,7 +496,6 @@ static apr_status_t impl_pollcb_create(apr_pollcb_t *pollcb,
}
pollcb->pollset.port = apr_palloc(p, size * sizeof(port_event_t));
apr_pool_cleanup_register(p, pollcb, cb_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
@ -558,16 +548,25 @@ static apr_status_t impl_pollcb_poll(apr_pollcb_t *pollcb,
apr_pollcb_cb_t func,
void *baton)
{
apr_pollfd_t *pollfd;
apr_status_t rv;
unsigned int i, nget = 1;
unsigned int nget = 1;
rv = call_port_getn(pollcb->fd, pollcb->pollset.port, pollcb->nalloc,
&nget, timeout);
if (nget) {
unsigned int i;
for (i = 0; i < nget; i++) {
pollfd = (apr_pollfd_t *)(pollcb->pollset.port[i].portev_user);
apr_pollfd_t *pollfd = (apr_pollfd_t *)(pollcb->pollset.port[i].portev_user);
if ((pollcb->flags & APR_POLLSET_WAKEABLE) &&
pollfd->desc_type == APR_POLL_FILE &&
pollfd->desc.f == pollcb->wakeup_pipe[0]) {
apr_poll_drain_wakeup_pipe(pollcb->wakeup_pipe);
return APR_EINTR;
}
pollfd->rtnevents = get_revent(pollcb->pollset.port[i].portev_events);
rv = func(baton, pollfd);
@ -581,14 +580,15 @@ static apr_status_t impl_pollcb_poll(apr_pollcb_t *pollcb,
return rv;
}
static apr_pollcb_provider_t impl_cb = {
static const apr_pollcb_provider_t impl_cb = {
impl_pollcb_create,
impl_pollcb_add,
impl_pollcb_remove,
impl_pollcb_poll,
impl_pollcb_cleanup,
"port"
};
apr_pollcb_provider_t *apr_pollcb_provider_port = &impl_cb;
const apr_pollcb_provider_t *apr_pollcb_provider_port = &impl_cb;
#endif /* HAVE_PORT_CREATE */

View File

@ -347,13 +347,14 @@ static apr_status_t impl_pollset_poll(apr_pollset_t *pollset,
fd_set readset, writeset, exceptset;
apr_status_t rv = APR_SUCCESS;
*num = 0;
#ifdef WIN32
/* On Win32, select() must be presented with at least one socket to
* poll on, or select() will return WSAEINVAL. So, we'll just
* short-circuit and bail now.
*/
if (pollset->nelts == 0) {
(*num) = 0;
if (timeout > 0) {
apr_sleep(timeout);
return APR_TIMEUP;
@ -385,7 +386,6 @@ static apr_status_t impl_pollset_poll(apr_pollset_t *pollset,
rs = select(pollset->p->maxfd + 1, &readset, &writeset, &exceptset,
tvptr);
(*num) = rs;
if (rs < 0) {
return apr_get_netos_error();
}
@ -401,7 +401,7 @@ static apr_status_t impl_pollset_poll(apr_pollset_t *pollset,
else {
if ((pollset->flags & APR_POLLSET_WAKEABLE) &&
pollset->p->query_set[i].desc.f == pollset->wakeup_pipe[0]) {
apr_pollset_drain_wakeup_pipe(pollset);
apr_poll_drain_wakeup_pipe(pollset->wakeup_pipe);
rv = APR_EINTR;
continue;
}
@ -437,7 +437,7 @@ static apr_status_t impl_pollset_poll(apr_pollset_t *pollset,
return rv;
}
static apr_pollset_provider_t impl = {
static const apr_pollset_provider_t impl = {
impl_pollset_create,
impl_pollset_add,
impl_pollset_remove,
@ -446,4 +446,4 @@ static apr_pollset_provider_t impl = {
"select"
};
apr_pollset_provider_t *apr_pollset_provider_select = &impl;
const apr_pollset_provider_t *apr_pollset_provider_select = &impl;

View File

@ -0,0 +1,151 @@
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "apr.h"
#include "apr_poll.h"
#include "apr_time.h"
#include "apr_portable.h"
#include "apr_arch_file_io.h"
#include "apr_arch_networkio.h"
#include "apr_arch_poll_private.h"
#include "apr_arch_inherit.h"
#if !APR_FILES_AS_SOCKETS
#ifdef WIN32
apr_status_t apr_poll_create_wakeup_pipe(apr_pool_t *pool, apr_pollfd_t *pfd,
apr_file_t **wakeup_pipe)
{
apr_status_t rv;
if ((rv = apr_file_socket_pipe_create(&wakeup_pipe[0], &wakeup_pipe[1],
pool)) != APR_SUCCESS)
return rv;
pfd->reqevents = APR_POLLIN;
pfd->desc_type = APR_POLL_FILE;
pfd->desc.f = wakeup_pipe[0];
return APR_SUCCESS;
}
apr_status_t apr_poll_close_wakeup_pipe(apr_file_t **wakeup_pipe)
{
apr_status_t rv0 = APR_SUCCESS;
apr_status_t rv1 = APR_SUCCESS;
/* Close both sides of the wakeup pipe */
if (wakeup_pipe[0]) {
rv0 = apr_file_socket_pipe_close(wakeup_pipe[0]);
wakeup_pipe[0] = NULL;
}
if (wakeup_pipe[1]) {
rv1 = apr_file_socket_pipe_close(wakeup_pipe[1]);
wakeup_pipe[1] = NULL;
}
return rv0 ? rv0 : rv1;
}
#else /* !WIN32 */
apr_status_t apr_poll_create_wakeup_pipe(apr_pollfd_t *pfd, apr_file_t **wakeup_pipe)
{
return APR_ENOTIMPL;
}
apr_status_t apr_poll_close_wakeup_pipe(apr_file_t **wakeup_pipe)
{
return APR_ENOTIMPL;
}
#endif /* !WIN32 */
#else /* APR_FILES_AS_SOCKETS */
apr_status_t apr_poll_create_wakeup_pipe(apr_pool_t *pool, apr_pollfd_t *pfd,
apr_file_t **wakeup_pipe)
{
apr_status_t rv;
if ((rv = apr_file_pipe_create(&wakeup_pipe[0], &wakeup_pipe[1],
pool)) != APR_SUCCESS)
return rv;
pfd->p = pool;
pfd->reqevents = APR_POLLIN;
pfd->desc_type = APR_POLL_FILE;
pfd->desc.f = wakeup_pipe[0];
{
int flags;
if ((flags = fcntl(wakeup_pipe[0]->filedes, F_GETFD)) == -1)
return errno;
flags |= FD_CLOEXEC;
if (fcntl(wakeup_pipe[0]->filedes, F_SETFD, flags) == -1)
return errno;
}
{
int flags;
if ((flags = fcntl(wakeup_pipe[1]->filedes, F_GETFD)) == -1)
return errno;
flags |= FD_CLOEXEC;
if (fcntl(wakeup_pipe[1]->filedes, F_SETFD, flags) == -1)
return errno;
}
return APR_SUCCESS;
}
apr_status_t apr_poll_close_wakeup_pipe(apr_file_t **wakeup_pipe)
{
apr_status_t rv0 = APR_SUCCESS;
apr_status_t rv1 = APR_SUCCESS;
/* Close both sides of the wakeup pipe */
if (wakeup_pipe[0]) {
rv0 = apr_file_close(wakeup_pipe[0]);
wakeup_pipe[0] = NULL;
}
if (wakeup_pipe[1]) {
rv1 = apr_file_close(wakeup_pipe[1]);
wakeup_pipe[1] = NULL;
}
return rv0 ? rv0 : rv1;
}
#endif /* APR_FILES_AS_SOCKETS */
/* Read and discard whatever is in the wakeup pipe.
*/
void apr_poll_drain_wakeup_pipe(apr_file_t **wakeup_pipe)
{
char rb[512];
apr_size_t nr = sizeof(rb);
while (apr_file_read(wakeup_pipe[0], rb, &nr) == APR_SUCCESS) {
/* Although we write just one byte to the other end of the pipe
* during wakeup, multiple threads could call the wakeup.
* So simply drain out from the input side of the pipe all
* the data.
*/
if (nr != sizeof(rb))
break;
}
}

View File

@ -247,9 +247,11 @@ static apr_status_t asio_pollset_cleanup(apr_pollset_t *pollset)
int rv;
DBG(4, "entered\n");
rv = msgctl(pollset->p->msg_q, IPC_RMID, NULL);
if (pollset->flags & APR_POLLSET_THREADSAFE) {
rv = msgctl(pollset->p->msg_q, IPC_RMID, NULL);
DBG1(4, "asio_pollset_cleanup: msgctl(IPC_RMID) returned %d\n", rv);
}
DBG1(4, "exiting, msgctl(IPC_RMID) returned %d\n", rv);
return rv;
}
@ -264,13 +266,13 @@ static apr_status_t asio_pollset_create(apr_pollset_t *pollset,
DBG1(2, "entered, flags: %x\n", flags);
priv = pollset->p = apr_palloc(p, sizeof(*priv));
priv = pollset->p = apr_pcalloc(p, sizeof(*priv));
if (flags & APR_POLLSET_THREADSAFE) {
#if APR_HAS_THREADS
if (rv = apr_thread_mutex_create(&(priv->ring_lock),
if ((rv = apr_thread_mutex_create(&(priv->ring_lock),
APR_THREAD_MUTEX_DEFAULT,
p) != APR_SUCCESS) {
p)) != APR_SUCCESS) {
DBG1(1, "apr_thread_mutex_create returned %d\n", rv);
pollset->p = NULL;
return rv;
@ -481,7 +483,8 @@ static apr_status_t asio_pollset_remove(apr_pollset_t *pollset,
asio_elem_t *elem;
apr_status_t rv = APR_SUCCESS;
apr_pollset_private_t *priv = pollset->p;
struct aiocb cancel_a; /* AIO_CANCEL is synchronous, so autodata works fine */
/* AIO_CANCEL is synchronous, so autodata works fine. */
struct aiocb cancel_a = {0};
int fd;
@ -765,7 +768,7 @@ static apr_status_t asio_pollset_poll(apr_pollset_t *pollset,
return rv;
} /* end of asio_pollset_poll */
static apr_pollset_provider_t impl = {
static const apr_pollset_provider_t impl = {
asio_pollset_create,
asio_pollset_add,
asio_pollset_remove,
@ -774,6 +777,6 @@ static apr_pollset_provider_t impl = {
"asio"
};
apr_pollset_provider_t *apr_pollset_provider_aio_msgq = &impl;
const apr_pollset_provider_t *apr_pollset_provider_aio_msgq = &impl;
#endif /* HAVE_AIO_MSGQ */

View File

@ -15,6 +15,7 @@
*/
#include "apr_arch_shm.h"
#include "apr_arch_file_io.h"
#include "apr_general.h"
#include "apr_errno.h"
@ -158,7 +159,6 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
#endif
#if APR_USE_SHMEM_SHMGET
apr_size_t nbytes;
key_t shmkey;
#endif
#if APR_USE_SHMEM_MMAP_ZERO || APR_USE_SHMEM_SHMGET || \
APR_USE_SHMEM_MMAP_TMP || APR_USE_SHMEM_MMAP_SHM
@ -231,8 +231,8 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
new_m->reqsize = reqsize;
new_m->realsize = reqsize;
new_m->filename = NULL;
if ((new_m->shmid = shmget(IPC_PRIVATE, new_m->realsize,
new_m->shmkey = IPC_PRIVATE;
if ((new_m->shmid = shmget(new_m->shmkey, new_m->realsize,
SHM_R | SHM_W | IPC_CREAT)) < 0) {
return errno;
}
@ -371,13 +371,13 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
/* ftok() (on solaris at least) requires that the file actually
* exist before calling ftok(). */
shmkey = our_ftok(filename);
if (shmkey == (key_t)-1) {
new_m->shmkey = our_ftok(filename);
if (new_m->shmkey == (key_t)-1) {
apr_file_close(file);
return errno;
}
if ((new_m->shmid = shmget(shmkey, new_m->realsize,
if ((new_m->shmid = shmget(new_m->shmkey, new_m->realsize,
SHM_R | SHM_W | IPC_CREAT | IPC_EXCL)) < 0) {
apr_file_close(file);
return errno;
@ -492,6 +492,16 @@ APR_DECLARE(apr_status_t) apr_shm_remove(const char *filename,
#endif
}
APR_DECLARE(apr_status_t) apr_shm_delete(apr_shm_t *m)
{
if (m->filename) {
return apr_shm_remove(m->filename, m->pool);
}
else {
return APR_ENOTIMPL;
}
}
APR_DECLARE(apr_status_t) apr_shm_destroy(apr_shm_t *m)
{
return apr_pool_cleanup_run(m->pool, m, shm_cleanup_owner);
@ -611,7 +621,6 @@ APR_DECLARE(apr_status_t) apr_shm_attach(apr_shm_t **m,
apr_status_t status;
apr_file_t *file; /* file where metadata is stored */
apr_size_t nbytes;
key_t shmkey;
new_m = apr_palloc(pool, sizeof(apr_shm_t));
@ -634,11 +643,11 @@ APR_DECLARE(apr_status_t) apr_shm_attach(apr_shm_t **m,
new_m->filename = apr_pstrdup(pool, filename);
new_m->pool = pool;
shmkey = our_ftok(filename);
if (shmkey == (key_t)-1) {
new_m->shmkey = our_ftok(filename);
if (new_m->shmkey == (key_t)-1) {
return errno;
}
if ((new_m->shmid = shmget(shmkey, 0, SHM_R | SHM_W)) == -1) {
if ((new_m->shmid = shmget(new_m->shmkey, 0, SHM_R | SHM_W)) == -1) {
return errno;
}
if ((new_m->base = shmat(new_m->shmid, NULL, 0)) == (void *)-1) {
@ -683,6 +692,28 @@ APR_DECLARE(apr_size_t) apr_shm_size_get(const apr_shm_t *m)
return m->reqsize;
}
APR_PERMS_SET_IMPLEMENT(shm)
{
#if APR_USE_SHMEM_SHMGET || APR_USE_SHMEM_SHMGET_ANON
struct shmid_ds shmbuf;
int shmid;
apr_shm_t *m = (apr_shm_t *)theshm;
if ((shmid = shmget(m->shmkey, 0, SHM_R | SHM_W)) == -1) {
return errno;
}
shmbuf.shm_perm.uid = uid;
shmbuf.shm_perm.gid = gid;
shmbuf.shm_perm.mode = apr_unix_perms2mode(perms);
if (shmctl(shmid, IPC_SET, &shmbuf) == -1) {
return errno;
}
return APR_SUCCESS;
#else
return APR_ENOTIMPL;
#endif
}
APR_POOL_IMPLEMENT_ACCESSOR(shm)
APR_DECLARE(apr_status_t) apr_os_shm_get(apr_os_shm_t *osshm,

View File

@ -235,6 +235,8 @@ char *strdup(const char *str)
size_t len = strlen(str) + 1;
sdup = (char *) malloc(len);
if (sdup == NULL)
return NULL;
memcpy(sdup, str, len);
return sdup;

View File

@ -0,0 +1,403 @@
/* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#include "apr.h"
#include "apr_lib.h"
#include "apr_strings.h"
#include "apr_fnmatch.h"
#if 0
#define APR_WANT_STDIO
#define APR_WANT_STRFUNC
#endif
#include "apr_want.h"
#include "apr_cstr.h"
APR_DECLARE(void) apr_cstr_split_append(apr_array_header_t *array,
const char *input,
const char *sep_chars,
int chop_whitespace,
apr_pool_t *pool)
{
char *pats;
char *p;
pats = apr_pstrdup(pool, input); /* strtok wants non-const data */
p = apr_cstr_tokenize(sep_chars, &pats);
while (p)
{
if (chop_whitespace)
{
while (apr_isspace(*p))
p++;
{
char *e = p + (strlen(p) - 1);
while ((e >= p) && (apr_isspace(*e)))
e--;
*(++e) = '\0';
}
}
if (p[0] != '\0')
APR_ARRAY_PUSH(array, const char *) = p;
p = apr_cstr_tokenize(sep_chars, &pats);
}
return;
}
APR_DECLARE(apr_array_header_t *) apr_cstr_split(const char *input,
const char *sep_chars,
int chop_whitespace,
apr_pool_t *pool)
{
apr_array_header_t *a = apr_array_make(pool, 5, sizeof(input));
apr_cstr_split_append(a, input, sep_chars, chop_whitespace, pool);
return a;
}
APR_DECLARE(int) apr_cstr_match_glob_list(const char *str,
const apr_array_header_t *list)
{
int i;
for (i = 0; i < list->nelts; i++)
{
const char *this_pattern = APR_ARRAY_IDX(list, i, char *);
if (apr_fnmatch(this_pattern, str, 0) == APR_SUCCESS)
return TRUE;
}
return FALSE;
}
APR_DECLARE(int) apr_cstr_match_list(const char *str,
const apr_array_header_t *list)
{
int i;
for (i = 0; i < list->nelts; i++)
{
const char *this_str = APR_ARRAY_IDX(list, i, char *);
if (strcmp(this_str, str) == 0)
return TRUE;
}
return FALSE;
}
APR_DECLARE(char *) apr_cstr_tokenize(const char *sep, char **str)
{
char *token;
char *next;
char csep;
/* check parameters */
if ((sep == NULL) || (str == NULL) || (*str == NULL))
return NULL;
/* let APR handle edge cases and multiple separators */
csep = *sep;
if (csep == '\0' || sep[1] != '\0')
return apr_strtok(NULL, sep, str);
/* skip characters in sep (will terminate at '\0') */
token = *str;
while (*token == csep)
++token;
if (!*token) /* no more tokens */
return NULL;
/* skip valid token characters to terminate token and
* prepare for the next call (will terminate at '\0)
*/
next = strchr(token, csep);
if (next == NULL)
{
*str = token + strlen(token);
}
else
{
*next = '\0';
*str = next + 1;
}
return token;
}
APR_DECLARE(int) apr_cstr_count_newlines(const char *msg)
{
int count = 0;
const char *p;
for (p = msg; *p; p++)
{
if (*p == '\n')
{
count++;
if (*(p + 1) == '\r')
p++;
}
else if (*p == '\r')
{
count++;
if (*(p + 1) == '\n')
p++;
}
}
return count;
}
#if 0 /* XXX: stringbuf logic is not present in APR */
APR_DECLARE(char *) apr_cstr_join(const apr_array_header_t *strings,
const char *separator,
apr_pool_t *pool)
{
svn_stringbuf_t *new_str = svn_stringbuf_create_empty(pool);
size_t sep_len = strlen(separator);
int i;
for (i = 0; i < strings->nelts; i++)
{
const char *string = APR_ARRAY_IDX(strings, i, const char *);
svn_stringbuf_appendbytes(new_str, string, strlen(string));
svn_stringbuf_appendbytes(new_str, separator, sep_len);
}
return new_str->data;
}
#endif
#if !APR_CHARSET_EBCDIC
/*
* Our own known-fast translation table for casecmp by character.
* Only ASCII alpha characters 41-5A are folded to 61-7A, other
* octets (such as extended latin alphabetics) are never case-folded.
* NOTE: Other than Alpha A-Z/a-z, each code point is unique!
*/
static const short ucharmap[] = {
0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7,
0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
0x40, 'a', 'b', 'c', 'd', 'e', 'f', 'g',
'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
'x', 'y', 'z', 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
0x60, 'a', 'b', 'c', 'd', 'e', 'f', 'g',
'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
'x', 'y', 'z', 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
};
#else /* APR_CHARSET_EBCDIC */
/*
* Derived from apr-iconv/ccs/cp037.c for EBCDIC case comparison,
* provides unique identity of every char value (strict ISO-646
* conformance, arbitrary election of an ISO-8859-1 ordering, and
* very arbitrary control code assignments into C1 to achieve
* identity and a reversible mapping of code points),
* then folding the equivalences of ASCII 41-5A into 61-7A,
* presenting comparison results in a somewhat ISO/IEC 10646
* (ASCII-like) order, depending on the EBCDIC code page in use.
*
* NOTE: Other than Alpha A-Z/a-z, each code point is unique!
*/
static const short ucharmap[] = {
0x00, 0x01, 0x02, 0x03, 0x9C, 0x09, 0x86, 0x7F,
0x97, 0x8D, 0x8E, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
0x10, 0x11, 0x12, 0x13, 0x9D, 0x85, 0x08, 0x87,
0x18, 0x19, 0x92, 0x8F, 0x1C, 0x1D, 0x1E, 0x1F,
0x80, 0x81, 0x82, 0x83, 0x84, 0x0A, 0x17, 0x1B,
0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x05, 0x06, 0x07,
0x90, 0x91, 0x16, 0x93, 0x94, 0x95, 0x96, 0x04,
0x98, 0x99, 0x9A, 0x9B, 0x14, 0x15, 0x9E, 0x1A,
0x20, 0xA0, 0xE2, 0xE4, 0xE0, 0xE1, 0xE3, 0xE5,
0xE7, 0xF1, 0xA2, 0x2E, 0x3C, 0x28, 0x2B, 0x7C,
0x26, 0xE9, 0xEA, 0xEB, 0xE8, 0xED, 0xEE, 0xEF,
0xEC, 0xDF, 0x21, 0x24, 0x2A, 0x29, 0x3B, 0xAC,
0x2D, 0x2F, 0xC2, 0xC4, 0xC0, 0xC1, 0xC3, 0xC5,
0xC7, 0xD1, 0xA6, 0x2C, 0x25, 0x5F, 0x3E, 0x3F,
0xF8, 0xC9, 0xCA, 0xCB, 0xC8, 0xCD, 0xCE, 0xCF,
0xCC, 0x60, 0x3A, 0x23, 0x40, 0x27, 0x3D, 0x22,
0xD8, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
0x68, 0x69, 0xAB, 0xBB, 0xF0, 0xFD, 0xFE, 0xB1,
0xB0, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70,
0x71, 0x72, 0xAA, 0xBA, 0xE6, 0xB8, 0xC6, 0xA4,
0xB5, 0x7E, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
0x79, 0x7A, 0xA1, 0xBF, 0xD0, 0xDD, 0xDE, 0xAE,
0x5E, 0xA3, 0xA5, 0xB7, 0xA9, 0xA7, 0xB6, 0xBC,
0xBD, 0xBE, 0x5B, 0x5D, 0xAF, 0xA8, 0xB4, 0xD7,
0x7B, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
0x68, 0x69, 0xAD, 0xF4, 0xF6, 0xF2, 0xF3, 0xF5,
0x7D, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70,
0x71, 0x72, 0xB9, 0xFB, 0xFC, 0xF9, 0xFA, 0xFF,
0x5C, 0xF7, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
0x79, 0x7A, 0xB2, 0xD4, 0xD6, 0xD2, 0xD3, 0xD5,
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
0x38, 0x39, 0xB3, 0xDB, 0xDC, 0xD9, 0xDA, 0x9F
};
#endif
APR_DECLARE(int) apr_cstr_casecmp(const char *s1, const char *s2)
{
const unsigned char *str1 = (const unsigned char *)s1;
const unsigned char *str2 = (const unsigned char *)s2;
for (;;)
{
const int c1 = (int)(*str1);
const int c2 = (int)(*str2);
const int cmp = ucharmap[c1] - ucharmap[c2];
/* Not necessary to test for !c2, this is caught by cmp */
if (cmp || !c1)
return cmp;
str1++;
str2++;
}
}
APR_DECLARE(int) apr_cstr_casecmpn(const char *s1, const char *s2, apr_size_t n)
{
const unsigned char *str1 = (const unsigned char *)s1;
const unsigned char *str2 = (const unsigned char *)s2;
while (n--)
{
const int c1 = (int)(*str1);
const int c2 = (int)(*str2);
const int cmp = ucharmap[c1] - ucharmap[c2];
/* Not necessary to test for !c2, this is caught by cmp */
if (cmp || !c1)
return cmp;
str1++;
str2++;
}
return 0;
}
APR_DECLARE(apr_status_t) apr_cstr_strtoui64(apr_uint64_t *n, const char *str,
apr_uint64_t minval, apr_uint64_t maxval,
int base)
{
apr_int64_t val;
char *endptr;
/* We assume errno is thread-safe. */
errno = 0; /* APR-0.9 doesn't always set errno */
/* ### We're throwing away half the number range here.
* ### APR needs a apr_strtoui64() function. */
val = apr_strtoi64(str, &endptr, base);
if (errno == EINVAL || endptr == str || str[0] == '\0' || *endptr != '\0')
return APR_EINVAL;
if ((errno == ERANGE && (val == APR_INT64_MIN || val == APR_INT64_MAX)) ||
val < 0 || (apr_uint64_t)val < minval || (apr_uint64_t)val > maxval)
return APR_ERANGE;
*n = val;
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_cstr_atoui64(apr_uint64_t *n, const char *str)
{
return apr_cstr_strtoui64(n, str, 0, APR_UINT64_MAX, 10);
}
APR_DECLARE(apr_status_t) apr_cstr_atoui(unsigned int *n, const char *str)
{
apr_uint64_t val;
apr_status_t rv = apr_cstr_strtoui64(&val, str, 0, APR_UINT32_MAX, 10);
if (rv == APR_SUCCESS)
*n = (unsigned int)val;
return rv;
}
APR_DECLARE(apr_status_t) apr_cstr_strtoi64(apr_int64_t *n, const char *str,
apr_int64_t minval, apr_int64_t maxval,
int base)
{
apr_int64_t val;
char *endptr;
/* We assume errno is thread-safe. */
errno = 0; /* APR-0.9 doesn't always set errno */
val = apr_strtoi64(str, &endptr, base);
if (errno == EINVAL || endptr == str || str[0] == '\0' || *endptr != '\0')
return APR_EINVAL;
if ((errno == ERANGE && (val == APR_INT64_MIN || val == APR_INT64_MAX)) ||
val < minval || val > maxval)
return APR_ERANGE;
*n = val;
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_cstr_atoi64(apr_int64_t *n, const char *str)
{
return apr_cstr_strtoi64(n, str, APR_INT64_MIN, APR_INT64_MAX, 10);
}
APR_DECLARE(apr_status_t) apr_cstr_atoi(int *n, const char *str)
{
apr_int64_t val;
apr_status_t rv;
rv = apr_cstr_strtoi64(&val, str, APR_INT32_MIN, APR_INT32_MAX, 10);
if (rv == APR_SUCCESS)
*n = (int)val;
return rv;
}
APR_DECLARE(const char *) apr_cstr_skip_prefix(const char *str,
const char *prefix)
{
apr_size_t len = strlen(prefix);
if (strncmp(str, prefix, len) == 0)
{
return str + len;
}
else
{
return NULL;
}
}

View File

@ -462,7 +462,7 @@ APR_DECLARE(apr_status_t) apr_match_glob(const char *pattern,
path = ".";
}
else {
path = apr_pstrndup(p, pattern, idx - pattern);
path = apr_pstrmemdup(p, pattern, idx - pattern);
pattern = idx + 1;
}

View File

@ -100,7 +100,6 @@ static char *apr_cvt(double arg, int ndigits, int *decpt, int *sign,
arg = -arg;
}
arg = modf(arg, &fi);
p1 = &buf[NDIG];
/*
* Do integer part
*/
@ -1328,7 +1327,7 @@ APR_DECLARE(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *),
*/
if (print_something == YES) {
for (i = s_len; i != 0; i--) {
INS_CHAR(*s, sp, bep, cc);
INS_CHAR(*s, sp, bep, cc);
s++;
}
}

View File

@ -200,7 +200,7 @@ static apr_skiplistnode *skiplist_new_node(apr_skiplist *sl)
return m;
}
static apr_status_t skiplist_free_node(apr_skiplist *sl, apr_skiplistnode *m)
static apr_status_t skiplist_put_node(apr_skiplist *sl, apr_skiplistnode *m)
{
return skiplist_qpush(&sl->nodes_q, m);
}
@ -298,39 +298,45 @@ APR_DECLARE(void) apr_skiplist_add_index(apr_skiplist *sl,
}
static int skiplisti_find_compare(apr_skiplist *sl, void *data,
apr_skiplistnode **ret,
apr_skiplist_compare comp)
apr_skiplistnode **ret,
apr_skiplist_compare comp,
int last)
{
int count = 0;
apr_skiplistnode *m;
m = sl->top;
while (m) {
apr_skiplistnode *m, *found = NULL;
for (m = sl->top; m; count++) {
if (m->next) {
int compared = comp(data, m->next->data);
if (compared == 0) {
m = m->next;
while (m->down) {
m = m->down;
found = m = m->next;
if (!last) {
break;
}
*ret = m;
return count;
continue;
}
if (compared > 0) {
m = m->next;
count++;
continue;
}
}
m = m->down;
count++;
}
*ret = NULL;
if (found) {
while (found->down) {
found = found->down;
}
*ret = found;
}
else {
*ret = NULL;
}
return count;
}
APR_DECLARE(void *) apr_skiplist_find_compare(apr_skiplist *sli, void *data,
apr_skiplistnode **iter,
apr_skiplist_compare comp)
static void *find_compare(apr_skiplist *sli, void *data,
apr_skiplistnode **iter,
apr_skiplist_compare comp,
int last)
{
apr_skiplistnode *m;
apr_skiplist *sl;
@ -353,16 +359,36 @@ APR_DECLARE(void *) apr_skiplist_find_compare(apr_skiplist *sli, void *data,
}
sl = (apr_skiplist *) m->data;
}
skiplisti_find_compare(sl, data, &m, sl->comparek);
skiplisti_find_compare(sl, data, &m, sl->comparek, last);
if (iter) {
*iter = m;
}
return (m) ? m->data : NULL;
}
APR_DECLARE(void *) apr_skiplist_find_compare(apr_skiplist *sl, void *data,
apr_skiplistnode **iter,
apr_skiplist_compare comp)
{
return find_compare(sl, data, iter, comp, 0);
}
APR_DECLARE(void *) apr_skiplist_find(apr_skiplist *sl, void *data, apr_skiplistnode **iter)
{
return apr_skiplist_find_compare(sl, data, iter, sl->compare);
return find_compare(sl, data, iter, sl->compare, 0);
}
APR_DECLARE(void *) apr_skiplist_last_compare(apr_skiplist *sl, void *data,
apr_skiplistnode **iter,
apr_skiplist_compare comp)
{
return find_compare(sl, data, iter, comp, 1);
}
APR_DECLARE(void *) apr_skiplist_last(apr_skiplist *sl, void *data,
apr_skiplistnode **iter)
{
return find_compare(sl, data, iter, sl->compare, 1);
}
@ -392,6 +418,15 @@ APR_DECLARE(void *) apr_skiplist_previous(apr_skiplist *sl, apr_skiplistnode **i
return (*iter) ? ((*iter)->data) : NULL;
}
APR_DECLARE(void *) apr_skiplist_element(apr_skiplistnode *iter)
{
return (iter) ? iter->data : NULL;
}
/* forward declared */
static int skiplisti_remove(apr_skiplist *sl, apr_skiplistnode *m,
apr_skiplist_freefunc myfree);
static APR_INLINE int skiplist_height(const apr_skiplist *sl)
{
/* Skiplists (even empty) always have a top node, although this
@ -401,15 +436,12 @@ static APR_INLINE int skiplist_height(const apr_skiplist *sl)
return sl->height ? sl->height : 1;
}
APR_DECLARE(apr_skiplistnode *) apr_skiplist_insert_compare(apr_skiplist *sl, void *data,
apr_skiplist_compare comp)
static apr_skiplistnode *insert_compare(apr_skiplist *sl, void *data,
apr_skiplist_compare comp, int add,
apr_skiplist_freefunc myfree)
{
apr_skiplistnode *m, *p, *tmp, *ret = NULL;
int ch, nh = 1;
if (!comp) {
return NULL;
}
int ch, top_nh, nh = 1;
ch = skiplist_height(sl);
if (sl->preheight) {
@ -422,6 +454,7 @@ APR_DECLARE(apr_skiplistnode *) apr_skiplist_insert_compare(apr_skiplist *sl, vo
nh++;
}
}
top_nh = nh;
/* Now we have in nh the height at which we wish to insert our new node,
* and in ch the current height: don't create skip paths to the inserted
@ -432,14 +465,34 @@ APR_DECLARE(apr_skiplistnode *) apr_skiplist_insert_compare(apr_skiplist *sl, vo
*/
m = sl->top;
while (m) {
/*
* To maintain stability, dups (compared == 0) must be added
* AFTER each other.
*/
if (m->next) {
int compared = comp(data, m->next->data);
if (compared == 0) {
/* Keep the existing element(s) */
skiplist_qclear(&sl->stack_q);
return NULL;
if (!add) {
/* Keep the existing element(s) */
skiplist_qclear(&sl->stack_q);
return NULL;
}
if (add < 0) {
/* Remove this element and continue with the next node
* or the new top if the current one is also removed.
*/
apr_skiplistnode *top = sl->top;
skiplisti_remove(sl, m->next, myfree);
if (top != sl->top) {
m = sl->top;
skiplist_qclear(&sl->stack_q);
ch = skiplist_height(sl);
nh = top_nh;
}
continue;
}
}
if (compared > 0) {
if (compared >= 0) {
m = m->next;
continue;
}
@ -514,7 +567,7 @@ APR_DECLARE(apr_skiplistnode *) apr_skiplist_insert_compare(apr_skiplist *sl, vo
li = ret;
for (p = apr_skiplist_getlist(sl->index); p; apr_skiplist_next(sl->index, &p)) {
apr_skiplist *sli = (apr_skiplist *)p->data;
ni = apr_skiplist_insert_compare(sli, ret->data, sli->compare);
ni = insert_compare(sli, ret->data, sli->compare, 1, NULL);
li->nextindex = ni;
ni->previndex = li;
li = ni;
@ -524,11 +577,50 @@ APR_DECLARE(apr_skiplistnode *) apr_skiplist_insert_compare(apr_skiplist *sl, vo
return ret;
}
APR_DECLARE(apr_skiplistnode *) apr_skiplist_insert_compare(apr_skiplist *sl, void *data,
apr_skiplist_compare comp)
{
if (!comp) {
return NULL;
}
return insert_compare(sl, data, comp, 0, NULL);
}
APR_DECLARE(apr_skiplistnode *) apr_skiplist_insert(apr_skiplist *sl, void *data)
{
return apr_skiplist_insert_compare(sl, data, sl->compare);
}
APR_DECLARE(apr_skiplistnode *) apr_skiplist_add_compare(apr_skiplist *sl, void *data,
apr_skiplist_compare comp)
{
if (!comp) {
return NULL;
}
return insert_compare(sl, data, comp, 1, NULL);
}
APR_DECLARE(apr_skiplistnode *) apr_skiplist_add(apr_skiplist *sl, void *data)
{
return apr_skiplist_add_compare(sl, data, sl->compare);
}
APR_DECLARE(apr_skiplistnode *) apr_skiplist_replace_compare(apr_skiplist *sl,
void *data, apr_skiplist_freefunc myfree,
apr_skiplist_compare comp)
{
if (!comp) {
return NULL;
}
return insert_compare(sl, data, comp, -1, myfree);
}
APR_DECLARE(apr_skiplistnode *) apr_skiplist_replace(apr_skiplist *sl,
void *data, apr_skiplist_freefunc myfree)
{
return apr_skiplist_replace_compare(sl, data, myfree, sl->compare);
}
#if 0
void skiplist_print_struct(apr_skiplist * sl, char *prefix)
{
@ -548,7 +640,8 @@ void skiplist_print_struct(apr_skiplist * sl, char *prefix)
}
#endif
static int skiplisti_remove(apr_skiplist *sl, apr_skiplistnode *m, apr_skiplist_freefunc myfree)
static int skiplisti_remove(apr_skiplist *sl, apr_skiplistnode *m,
apr_skiplist_freefunc myfree)
{
apr_skiplistnode *p;
if (!m) {
@ -560,19 +653,20 @@ static int skiplisti_remove(apr_skiplist *sl, apr_skiplistnode *m, apr_skiplist_
while (m->up) {
m = m->up;
}
while (m) {
do {
p = m;
p->prev->next = p->next;/* take me out of the list */
/* take me out of the list */
p->prev->next = p->next;
if (p->next) {
p->next->prev = p->prev; /* take me out of the list */
p->next->prev = p->prev;
}
m = m->down;
/* This only frees the actual data in the bottom one */
if (!m && myfree && p->data) {
myfree(p->data);
}
skiplist_free_node(sl, p);
}
skiplist_put_node(sl, p);
} while (m);
sl->size--;
while (sl->top && sl->top->next == NULL) {
/* While the row is empty and we are not on the bottom row */
@ -581,7 +675,7 @@ static int skiplisti_remove(apr_skiplist *sl, apr_skiplistnode *m, apr_skiplist_
if (sl->top) {
sl->top->up = NULL; /* Make it think its the top */
}
skiplist_free_node(sl, p);
skiplist_put_node(sl, p);
sl->height--;
}
if (!sl->top) {
@ -591,6 +685,23 @@ static int skiplisti_remove(apr_skiplist *sl, apr_skiplistnode *m, apr_skiplist_
return skiplist_height(sl);
}
APR_DECLARE(int) apr_skiplist_remove_node(apr_skiplist *sl,
apr_skiplistnode *iter,
apr_skiplist_freefunc myfree)
{
apr_skiplistnode *m = iter;
if (!m) {
return 0;
}
while (m->down) {
m = m->down;
}
while (m->previndex) {
m = m->previndex;
}
return skiplisti_remove(sl, m, myfree);
}
APR_DECLARE(int) apr_skiplist_remove_compare(apr_skiplist *sli,
void *data,
apr_skiplist_freefunc myfree, apr_skiplist_compare comp)
@ -610,7 +721,7 @@ APR_DECLARE(int) apr_skiplist_remove_compare(apr_skiplist *sli,
}
sl = (apr_skiplist *) m->data;
}
skiplisti_find_compare(sl, data, &m, comp);
skiplisti_find_compare(sl, data, &m, comp, 0);
if (!m) {
return 0;
}
@ -641,7 +752,7 @@ APR_DECLARE(void) apr_skiplist_remove_all(apr_skiplist *sl, apr_skiplist_freefun
}
do {
u = m->up;
skiplist_free_node(sl, m);
skiplist_put_node(sl, m);
m = u;
} while (m);
m = p;
@ -674,6 +785,26 @@ APR_DECLARE(void *) apr_skiplist_peek(apr_skiplist *a)
return NULL;
}
APR_DECLARE(size_t) apr_skiplist_size(const apr_skiplist *sl)
{
return sl->size;
}
APR_DECLARE(int) apr_skiplist_height(const apr_skiplist *sl)
{
return skiplist_height(sl);
}
APR_DECLARE(int) apr_skiplist_preheight(const apr_skiplist *sl)
{
return sl->preheight;
}
APR_DECLARE(void) apr_skiplist_set_preheight(apr_skiplist *sl, int to)
{
sl->preheight = (to > 0) ? to : 0;
}
static void skiplisti_destroy(void *vsl)
{
apr_skiplist_destroy(vsl, NULL);

View File

@ -1103,6 +1103,10 @@ APR_DECLARE(void) apr_table_compress(apr_table_t *t, unsigned flags)
int i;
int dups_found;
if (flags == APR_OVERLAP_TABLES_ADD) {
return;
}
if (t->a.nelts <= 1) {
return;
}

View File

@ -461,7 +461,19 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
_exit(-1); /* We have big problems, the child should exit. */
}
}
if (!geteuid()) {
apr_procattr_pscb_t *c = attr->perms_set_callbacks;
while (c) {
apr_status_t r;
r = (*c->perms_set_fn)((void *)c->data, c->perms,
attr->uid, attr->gid);
if (r != APR_SUCCESS && r != APR_ENOTIMPL) {
_exit(-1);
}
c = c->next;
}
}
/* Only try to switch if we are running as root */
if (attr->gid != -1 && !geteuid()) {
if (setgid(attr->gid)) {
@ -709,3 +721,19 @@ APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr,
}
#endif /* APR_HAVE_STRUCT_RLIMIT */
APR_DECLARE(apr_status_t) apr_procattr_perms_set_register(apr_procattr_t *attr,
apr_perms_setfn_t *perms_set_fn,
void *data,
apr_fileperms_t perms)
{
apr_procattr_pscb_t *c;
c = apr_palloc(attr->pool, sizeof(apr_procattr_pscb_t));
c->data = data;
c->perms = perms;
c->perms_set_fn = perms_set_fn;
c->next = attr->perms_set_callbacks;
attr->perms_set_callbacks = c;
return APR_SUCCESS;
}

Some files were not shown because too many files have changed in this diff Show More