summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2018-10-08 08:24:14 +0000
committerPeter Wemm <peter@FreeBSD.org>2018-10-08 08:24:14 +0000
commitf7eb533f85d0941dbf6edb3081f065e4c010b8cc (patch)
treea9a3ba945deee0800d3818a48c45323608935019
parentdf84d2567179e9d8867957c089683d753016bd75 (diff)
downloadsrc-test2-vendor/apr/apr-1.6.5.tar.gz
src-test2-vendor/apr/apr-1.6.5.zip
Vendor import apr-1.6.5vendor/apr/apr-1.6.5
-rw-r--r--CHANGES229
-rw-r--r--CMakeLists.txt4
-rw-r--r--Makefile.in3
-rw-r--r--Makefile.win10
-rw-r--r--NOTICE2
-rw-r--r--NWGNUmakefile1
-rw-r--r--apr.dsp127
-rw-r--r--apr.mak528
-rw-r--r--apr.spec4
-rw-r--r--build-outputs.mk178
-rw-r--r--config.layout1
-rwxr-xr-xconfigure2508
-rw-r--r--configure.in69
-rw-r--r--docs/APRDesign.html10
-rw-r--r--docs/canonical_filenames.html26
-rw-r--r--docs/incomplete_types6
-rw-r--r--docs/pool-design.html4
-rw-r--r--encoding/apr_escape.c71
-rw-r--r--file_io/unix/copy.c1
-rw-r--r--file_io/unix/flock.c8
-rw-r--r--file_io/unix/pipe.c64
-rw-r--r--file_io/unix/readwrite.c2
-rw-r--r--file_io/unix/seek.c7
-rw-r--r--include/apr.h.in1
-rw-r--r--include/apr.hnw1
-rw-r--r--include/apr.hw42
-rw-r--r--include/apr.hwc40
-rw-r--r--include/apr_allocator.h10
-rw-r--r--include/apr_atomic.h2
-rw-r--r--include/apr_cstr.h292
-rw-r--r--include/apr_errno.h31
-rw-r--r--include/apr_escape.h56
-rw-r--r--include/apr_file_info.h4
-rw-r--r--include/apr_file_io.h34
-rw-r--r--include/apr_general.h25
-rw-r--r--include/apr_global_mutex.h21
-rw-r--r--include/apr_hash.h3
-rw-r--r--include/apr_network_io.h47
-rw-r--r--include/apr_perms_set.h65
-rw-r--r--include/apr_poll.h45
-rw-r--r--include/apr_portable.h47
-rw-r--r--include/apr_proc_mutex.h19
-rw-r--r--include/apr_shm.h21
-rw-r--r--include/apr_skiplist.h126
-rw-r--r--include/apr_strings.h4
-rw-r--r--include/apr_tables.h28
-rw-r--r--include/apr_thread_proc.h13
-rw-r--r--include/apr_version.h8
-rw-r--r--include/arch/unix/apr_arch_networkio.h3
-rw-r--r--include/arch/unix/apr_arch_poll_private.h19
-rw-r--r--include/arch/unix/apr_arch_proc_mutex.h26
-rw-r--r--include/arch/unix/apr_arch_shm.h1
-rw-r--r--include/arch/unix/apr_arch_threadproc.h10
-rw-r--r--include/arch/unix/apr_private.h.in24
-rw-r--r--libapr.dsp118
-rw-r--r--libapr.mak526
-rw-r--r--locks/unix/global_mutex.c18
-rw-r--r--locks/unix/proc_mutex.c488
-rw-r--r--memory/unix/apr_pools.c379
-rw-r--r--misc/unix/errorcodes.c2
-rw-r--r--network_io/unix/multicast.c2
-rw-r--r--network_io/unix/sockaddr.c95
-rw-r--r--network_io/unix/sockets.c61
-rw-r--r--network_io/unix/sockopt.c35
-rw-r--r--poll/unix/epoll.c43
-rw-r--r--poll/unix/kqueue.c44
-rw-r--r--poll/unix/poll.c28
-rw-r--r--poll/unix/pollcb.c63
-rw-r--r--poll/unix/pollset.c141
-rw-r--r--poll/unix/port.c105
-rw-r--r--poll/unix/select.c10
-rw-r--r--poll/unix/wakeup.c151
-rw-r--r--poll/unix/z_asio.c19
-rw-r--r--shmem/unix/shm.c51
-rw-r--r--strings/apr_cpystrn.c2
-rw-r--r--strings/apr_cstr.c403
-rw-r--r--strings/apr_fnmatch.c2
-rw-r--r--strings/apr_snprintf.c2
-rw-r--r--tables/apr_skiplist.c211
-rw-r--r--tables/apr_tables.c4
-rw-r--r--threadproc/unix/proc.c30
-rw-r--r--time/unix/time.c3
-rw-r--r--tools/gen_test_char.c18
83 files changed, 5000 insertions, 2985 deletions
diff --git a/CHANGES b/CHANGES
index f300ec0f87d3..e7d31369b009 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,179 +1,136 @@
-*- coding: utf-8 -*-
-Changes for APR 1.5.2
+Changes for APR 1.6.5
- *) 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]
+ *) Fix Win32 build breakage in apr_os_exp_time_put() in 1.6.4. [Rainer Jung]
+
+Changes for APR 1.6.4 (not released)
- *) 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]
-
- *) Switch to generic atomics for early/unpatched Solaris 10 not exporting
- some atomic functions. PR 55418. [Yann Ylavic]
-
- *) apr_file_mktemp() on HP-UX: Remove limitation of 26 temporary files
- per process. PR 57677. [Jeff Trawick]
-
- *) 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.
-
- *) pollcb on Windows: Handle calls with no file/socket descriptors.
- Follow up to PR 49882. [Jeff Trawick, Yann Ylavic]
-
- *) apr_poll(cb): fix error paths returned values and leaks. [Yann Ylavic]
-
- *) apr_thread_cond_*wait() on BeOS: Fix broken logic. PR 45800.
- [Jochen Voss (no e-mail)]
+ *) configure: Fix detection of <net/if.h> on OpenBSD.
+ PR 61976. [David Carlier <devnexen gmail.com>, Yann Ylavic]
- *) apr_skiplist: Optimize the number of allocations by reusing pooled or
- malloc()ed nodes for the lifetime of the skiplist. [Yann Ylavic]
+ *) Fix apr_parse_addr_port() regression in scope_id parsing introduced
+ in 1.6.3. [Rainer Jung]
- *) apr_skiplist: Fix possible multiple-free() on the same value in
- apr_skiplist_remove_all(). [Yann Ylavic]
+ *) Fix Win32 file buffer locking behavior for single threaded file streams.
+ [Evgeny Kotkov, Mladen Turk, Jean-Frederic Clere]
- *) apr_pollset: On z/OS, threadsafe apr_pollset_poll() may return
- "EDC8102I Operation would block" under load.
- [Pat Odonnell <patod us.ibm.com>]
+ *) Numerous corrections to APR poll behavior. [Yann Ylavic]
- *) On z/OS, apr_sockaddr_info_get() with family == APR_UNSPEC was not
- returning IPv4 addresses if any IPv6 addresses were returned.
- [Eric Covener]
+Changes for APR 1.6.3
- *) Windows cmake build: Fix an incompatibility with cmake 2.8.12 and
- later. [Jeff Trawick]
+ *) apr_file_trunc: Truncating a buffered file could add unexpected
+ data after the truncate position. PR 51017.
+ [Evgeny Kotkov <evgeny.kotkov visualsvn.com>]
- *) apr_global_mutex/apr_proc_mutex: Resolve failures with the
- POSIX sem implementation in environments which receive signals.
- [Jeff Trawick]
+ *) apr_file_trunc: Fix an issue where reading from a buffered file
+ after truncate could return stale data from the buffer.
+ [Evgeny Kotkov <evgeny.kotkov visualsvn.com>]
- *) apr_skiplist: Fix potential corruption of skiplists leading to
- results or crashes. [Takashi Sato <takashi tks st>, Eric Covener]
- PR 56654.
+ *) apr_ipsubnet_create() now fails for an empty input string.
+ [Joe Orton]
- *) Improve platform detection by updating config.guess and config.sub.
- [Rainer Jung]
+Changes for APR 1.6.2
-Changes for APR 1.5.1
+ *) Corrected non-Unix builds for APR_LOCK_DEFAULT.
- *) apr_os_proc_mutex_get() on Unix: Avoid segfault for cross-
- process pthread mutexes. [Yann Ylavic <ylavic.dev gmail.com>]
+Changes for APR 1.6.1
- *) 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]
+ *) Defer timed locks API for later 1.7 release [Nick Kew, William Rowe]
- *) apr_socket_atreadeof(): Fix breakage on OS X. [Jim Jagielski]
+ *) Export build files find_apr.m4 and apr_common.m4 [Jacob Champion]
- *) 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]
+Changes for APR 1.6.0
- *) Fix race condition when calling apr_dir_make_recursive from
- multiple threads on Windows.
- [Bert Huijben]
+ *) apr_allocator: Provide apr_allocator_align() to get the true size that
+ would be allocated for the given size (including the header and
+ alignment). [Yann Ylavic]
- *) Fix apr_escape.c compilation errors on EBCDIC platforms.
- [Eric Covener]
+ *) apr_os_proc_mutex_put_ex: Allow to specify whether the OS native
+ mutex should or not be cleaned up (destroyed) with the constructed
+ APR mutex (given pool), and default to not for the simple _put()
+ function. [Yann Ylavic]
- *) FreeBSD 10: Correct a regression in 1.5.0 which affected non-
- blocking sockets in some applications, including httpd. [Jeff
- Trawick]
+ *) apr_proc/global_mutex: Fix API regarding the native OS mutexes
+ accessors from/to available APR mechanisms, adding the new functions
+ apr_os_proc_mutex_get_ex() and apr_os_proc_mutex_set_ex() which give
+ control to the user over the selected mechanisms, including the missing
+ POSIX semaphores (sem_t) on platforms supporting them.
+ [Yann Ylavic]
- *) 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_proc_mutex-pthread: Refcount shared mutexes usage to avoid
+ destruction while still is use by some process(es). PR 49504.
+ [Yann Ylavic]
- *) apr_skiplist: Add compatibility with C++ applications.
- [Jeff Trawick]
+ *) apr_file_io: Add apr_file_pipe_create_pools() allowing a pair of
+ pipes to be created, each in a different pool. [Graham Leggett]
- *) Correct a regression in 1.5.0 which affected out-of-tree
- builds on Unix. [Rainer Jung]
+ *) Add apr_pollcb_wakeup(), with similar behavior to
+ apr_pollset_wakeup(). Add apr_pollcb_method_name(), with similar
+ behavior to apr_pollset_method_name().
+ [Neil Conway <nrc cs berkeley edu>, Jeff Trawick]
- *) Improve platform detection by updating config.guess and config.sub.
- [Rainer Jung]
+ *) apr_table_overlap: Add APR_OVERLAP_TABLES_ADD to merge and set when
+ overlapping tables. [Graham Leggett]
-Changes for APR 1.5.0
+ *) locks: Introduce apr_{thread,proc,global}_mutex_timedlock().
+ [Yann Ylavic]
- *) 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>]
+ *) Introduce the apr_cstr_fn() family of functions, derived from
+ the svn_cstring_ functions of the Subversion project.
- *) 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]
+ *) Add APR_SO_FREEBIND option for apr_socket_opt_set. PR 58725.
+ [Ashley GC, Jan Kaluza, Joe Orton]
- *) apr_file_dup2() on Windows: Fix debug RTL assertion when
- attempting to _commit(stdout) or _commit(stderr). [Mike Rumph
- <mike.rumph oracle.com>]
+ *) apr_filepath_merge: Fix truename length calculation on Windows
+ in cases where the "short" name variant is actually longer than
+ the "long" or "true" name. See: testnames.c:merge_shortname().
+ [Bert Huijben <rhuijben a.o>]
- *) 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_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_socket_timeout_set() on Windows: If the socket was in a non-
- blocking state before, disable that setting so that timeouts work.
- [Jeff Trawick]
+ *) apr_skiplist: Add apr_skiplist_addne*() family to preserve existing
+ values (no duplicate), add apr_skiplist_size(), apr_skiplist_height()
+ and apr_skiplist_preheight() to get the corresponding current values,
+ and apr_skiplist_set_preheight() to modify it. [ Yann Ylavic ]
- *) File info APIs: Fix calculation of atime and mtime on AIX. PR 51146.
- [Ruediger Pluem]
+ *) Add new --enable-allocator-guard-pages which is like allocator-uses-mmap,
+ but will also add inaccessible guard pages before and after each memnode.
+ This will result in higher ressource usage but allow to find/protect
+ against certain buffer overflow/overread bugs. Under Linux, it may be
+ necessary to increase /proc/sys/vm/max_map_count . [Stefan Fritsch]
- *) Add the apr_escape interface. [Graham Leggett]
+ *) apr_skiplist: Add apr_skiplist_add() to support multiple values.
- *) Cygwin build fixes. PRs 51016 and 55586. [Carlo Bramini
- <carlo.bramix libero.it>]
+ *) Add new --enable-pool-concurrency-check configure option to detect
+ thread-unsafe concurrent accesses to pools. Runtime costs should be
+ relatively low. [Stefan Fritsch]
- *) Add apr_skiplist family. [Jim Jagielski]
+ *) Add support code to teach valgrind about APR pools and allocators.
+ [Stefan Fritsch]
- *) Add experimental cmake-based build system for Windows. Refer to
- README.cmake for more information. [Jeff Trawick, Tom Donovan]
+ *) Add apr_sockaddr_info_copy(), for making a deep copy of an
+ apr_sockaddr_t into a specified pool. [Yann Ylavic
+ <ylavic.dev gmail.com>]
- *) Add the apr_table_getm() call, which transparently handles the
- merging of keys with multiple values. [Graham Leggett]
+ *) Added Unix domain socket support.
+ [Mladen Turk]
- *) 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>]
+ *) Add apr_shm_delete() to compliment apr_shm_remove().
+ [Jim Jagielski]
- *) MinGW/MSYS: Support shared builds of APR, other general improvements
- to support of this toolchain. PR 46175. [Carlo Bramini
- <carlo.bramix libero.it>]
+ *) Intruduce APR_PERMS_SET macros for setting the owner/group on
+ objects. Currently only implemented for shm, proc and global
+ mutexes on posix platforms.
+ [Mladen Turk]
- *) Improve platform detection by updating config.guess and config.sub.
- [Rainer Jung]
+ *) Add apr_escape_ldap() and apr_pescape_ldap(), escaping characters
+ as described by RFC4514 and RFC4515 respectively. [Graham Leggett]
- *) apr_socket_opt_set: Add support for APR_SO_BROADCAST. PR 46389.
- [Armin Müller <mueller itestra com>]
+Changes for APR 1.5.x and later:
- *) 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:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 75f35c7cd559..b4632c3c0013 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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
diff --git a/Makefile.in b/Makefile.in
index a2a5194375d6..cc54e9cef556 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -63,6 +63,7 @@ exec_prefix=@exec_prefix@
bindir=@bindir@
libdir=@libdir@
includedir=@includedir@
+datadir=@datadir@
installbuilddir=@installbuilddir@
# Create apr-config script suitable for the install tree
@@ -91,6 +92,8 @@ install: $(TARGETS)
$(INSTALL_DATA) $(top_srcdir)/build/$${f} $(DESTDIR)$(installbuilddir); \
done
$(INSTALL_DATA) build/apr_rules.out $(DESTDIR)$(installbuilddir)/apr_rules.mk
+ $(INSTALL_DATA) $(top_srcdir)/build/apr_common.m4 $(DESTDIR)$(installbuilddir)
+ $(INSTALL_DATA) $(top_srcdir)/build/find_apr.m4 $(DESTDIR)$(installbuilddir)
$(INSTALL) -m 755 apr-config.out $(DESTDIR)$(bindir)/$(APR_CONFIG)
@if [ $(INSTALL_SUBDIRS) != "none" ]; then \
for i in $(INSTALL_SUBDIRS); do \
diff --git a/Makefile.win b/Makefile.win
index a3573eae602e..b48f9e9467ca 100644
--- a/Makefile.win
+++ b/Makefile.win
@@ -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
diff --git a/NOTICE b/NOTICE
index cd3576db205f..e8117bf13a5a 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
Apache Portable Runtime
-Copyright (c) 2000-2015 The Apache Software Foundation.
+Copyright (c) 2000-2018 The Apache Software Foundation.
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
diff --git a/NWGNUmakefile b/NWGNUmakefile
index db15c0d91eab..5a3ee0fe4d02 100644
--- a/NWGNUmakefile
+++ b/NWGNUmakefile
@@ -362,6 +362,7 @@ FILES_lib_objs = \
$(OBJDIR)/userinfo.o \
$(OBJDIR)/version.o \
$(OBJDIR)/waitio.o \
+ $(OBJDIR)/wakeup.o \
$(EOLIST)
diff --git a/apr.dsp b/apr.dsp
index 6e254378c298..1afa5715a6a3 100644
--- a/apr.dsp
+++ b/apr.dsp
@@ -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
@@ -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
@@ -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"
@@ -439,6 +388,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"
@@ -642,26 +595,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 +641,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"
-# 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
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "apr - 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
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "apr - Win32 Release9x"
+!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.\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.\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 Debug9x"
+!ELSEIF "$(CFG)" == "libapr - Win32 Debug"
# 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
+ 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 - x64 Release"
+!ELSEIF "$(CFG)" == "libapr - 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
+ 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 - 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
diff --git a/apr.mak b/apr.mak
index 8248fa13c6d5..5bfe665ec003 100644
--- a/apr.mak
+++ b/apr.mak
@@ -4,7 +4,7 @@ CFG=apr - Win32 Release
!MESSAGE No configuration specified. Defaulting to apr - Win32 Release.
!ENDIF
-!IF "$(CFG)" != "apr - Win32 Release" && "$(CFG)" != "apr - Win32 Debug" && "$(CFG)" != "apr - Win32 Release9x" && "$(CFG)" != "apr - Win32 Debug9x" && "$(CFG)" != "apr - x64 Release" && "$(CFG)" != "apr - x64 Debug"
+!IF "$(CFG)" != "apr - Win32 Release" && "$(CFG)" != "apr - Win32 Debug" && "$(CFG)" != "apr - x64 Release" && "$(CFG)" != "apr - x64 Debug"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
@@ -15,8 +15,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,6 +43,7 @@ CLEAN :
-@erase "$(INTDIR)\apr-1.pdb"
-@erase "$(INTDIR)\apr_atomic.obj"
-@erase "$(INTDIR)\apr_cpystrn.obj"
+ -@erase "$(INTDIR)\apr_cstr.obj"
-@erase "$(INTDIR)\apr_escape.obj"
-@erase "$(INTDIR)\apr_fnmatch.obj"
-@erase "$(INTDIR)\apr_getpass.obj"
@@ -115,6 +114,7 @@ CLEAN :
-@erase "$(INTDIR)\userinfo.obj"
-@erase "$(INTDIR)\utf8.obj"
-@erase "$(INTDIR)\version.obj"
+ -@erase "$(INTDIR)\wakeup.obj"
-@erase "$(OUTDIR)\apr-1.lib"
-@erase ".\include\apr.h"
-@erase ".\include\apr_gen_test_char.h"
@@ -215,12 +215,14 @@ LIB32_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" \
@@ -259,6 +261,7 @@ CLEAN :
-@erase "$(INTDIR)\apr-1.pdb"
-@erase "$(INTDIR)\apr_atomic.obj"
-@erase "$(INTDIR)\apr_cpystrn.obj"
+ -@erase "$(INTDIR)\apr_cstr.obj"
-@erase "$(INTDIR)\apr_escape.obj"
-@erase "$(INTDIR)\apr_fnmatch.obj"
-@erase "$(INTDIR)\apr_getpass.obj"
@@ -329,6 +332,7 @@ CLEAN :
-@erase "$(INTDIR)\userinfo.obj"
-@erase "$(INTDIR)\utf8.obj"
-@erase "$(INTDIR)\version.obj"
+ -@erase "$(INTDIR)\wakeup.obj"
-@erase "$(OUTDIR)\apr-1.lib"
-@erase ".\include\apr.h"
-@erase ".\include\apr_gen_test_char.h"
@@ -430,439 +434,13 @@ LIB32_OBJS= \
"$(INTDIR)\pollcb.obj" \
"$(INTDIR)\pollset.obj" \
"$(INTDIR)\select.obj" \
+ "$(INTDIR)\wakeup.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_skiplist.obj" \
- "$(INTDIR)\apr_tables.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"
-
-"$(OUTDIR)\apr-1.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
- $(LIB32) @<<
- $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "apr - Win32 Release9x"
-
-OUTDIR=.\9x\LibR
-INTDIR=.\9x\LibR
-# Begin Custom Macros
-OutDir=.\9x\LibR
-# End Custom Macros
-
-ALL : ".\include\apr_escape_test_char.h" ".\include\apr.h" ".\9x\LibR\gen_test_char.exe" "$(OUTDIR)\apr-1.lib"
-
-
-CLEAN :
- -@erase "$(INTDIR)\apr-1.idb"
- -@erase "$(INTDIR)\apr-1.pdb"
- -@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)\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)\apr-1.lib"
- -@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_STATIC" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(OUTDIR)\apr-1" /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) $<
-<<
-
-RSC=rc.exe
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr.bsc"
-BSC32_SBRS= \
-
-LIB32=link.exe -lib
-LIB32_FLAGS=/nologo /out:"$(OUTDIR)\apr-1.lib"
-LIB32_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_skiplist.obj" \
- "$(INTDIR)\apr_tables.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"
-
-"$(OUTDIR)\apr-1.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
- $(LIB32) @<<
- $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "apr - Win32 Debug9x"
-
-OUTDIR=.\9x\LibD
-INTDIR=.\9x\LibD
-# Begin Custom Macros
-OutDir=.\9x\LibD
-# End Custom Macros
-
-ALL : ".\include\apr_escape_test_char.h" ".\include\apr.h" ".\9x\LibD\gen_test_char.exe" "$(OUTDIR)\apr-1.lib"
-
-
-CLEAN :
- -@erase "$(INTDIR)\apr-1.idb"
- -@erase "$(INTDIR)\apr-1.pdb"
- -@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)\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)\apr-1.lib"
- -@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_STATIC" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(OUTDIR)\apr-1" /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) $<
-<<
-
-RSC=rc.exe
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr.bsc"
-BSC32_SBRS= \
-
-LIB32=link.exe -lib
-LIB32_FLAGS=/nologo /out:"$(OUTDIR)\apr-1.lib"
-LIB32_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_cstr.obj" \
"$(INTDIR)\apr_fnmatch.obj" \
"$(INTDIR)\apr_snprintf.obj" \
"$(INTDIR)\apr_strings.obj" \
@@ -901,6 +479,7 @@ CLEAN :
-@erase "$(INTDIR)\apr-1.pdb"
-@erase "$(INTDIR)\apr_atomic.obj"
-@erase "$(INTDIR)\apr_cpystrn.obj"
+ -@erase "$(INTDIR)\apr_cstr.obj"
-@erase "$(INTDIR)\apr_escape.obj"
-@erase "$(INTDIR)\apr_fnmatch.obj"
-@erase "$(INTDIR)\apr_getpass.obj"
@@ -971,6 +550,7 @@ CLEAN :
-@erase "$(INTDIR)\userinfo.obj"
-@erase "$(INTDIR)\utf8.obj"
-@erase "$(INTDIR)\version.obj"
+ -@erase "$(INTDIR)\wakeup.obj"
-@erase "$(OUTDIR)\apr-1.lib"
-@erase ".\include\apr.h"
-@erase ".\include\apr_gen_test_char.h"
@@ -1072,11 +652,13 @@ LIB32_OBJS= \
"$(INTDIR)\pollcb.obj" \
"$(INTDIR)\pollset.obj" \
"$(INTDIR)\select.obj" \
+ "$(INTDIR)\wakeup.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" \
@@ -1115,6 +697,7 @@ CLEAN :
-@erase "$(INTDIR)\apr-1.pdb"
-@erase "$(INTDIR)\apr_atomic.obj"
-@erase "$(INTDIR)\apr_cpystrn.obj"
+ -@erase "$(INTDIR)\apr_cstr.obj"
-@erase "$(INTDIR)\apr_escape.obj"
-@erase "$(INTDIR)\apr_fnmatch.obj"
-@erase "$(INTDIR)\apr_getpass.obj"
@@ -1185,6 +768,7 @@ CLEAN :
-@erase "$(INTDIR)\userinfo.obj"
-@erase "$(INTDIR)\utf8.obj"
-@erase "$(INTDIR)\version.obj"
+ -@erase "$(INTDIR)\wakeup.obj"
-@erase "$(OUTDIR)\apr-1.lib"
-@erase ".\include\apr.h"
-@erase ".\include\apr_gen_test_char.h"
@@ -1286,11 +870,13 @@ LIB32_OBJS= \
"$(INTDIR)\pollcb.obj" \
"$(INTDIR)\pollset.obj" \
"$(INTDIR)\select.obj" \
+ "$(INTDIR)\wakeup.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" \
@@ -1325,7 +911,7 @@ LIB32_OBJS= \
!ENDIF
-!IF "$(CFG)" == "apr - Win32 Release" || "$(CFG)" == "apr - Win32 Debug" || "$(CFG)" == "apr - Win32 Release9x" || "$(CFG)" == "apr - Win32 Debug9x" || "$(CFG)" == "apr - x64 Release" || "$(CFG)" == "apr - x64 Debug"
+!IF "$(CFG)" == "apr - Win32 Release" || "$(CFG)" == "apr - Win32 Debug" || "$(CFG)" == "apr - x64 Release" || "$(CFG)" == "apr - x64 Debug"
SOURCE=.\atomic\win32\apr_atomic.c
"$(INTDIR)\apr_atomic.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h"
@@ -1633,6 +1219,11 @@ 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"
@@ -1662,6 +1253,11 @@ SOURCE=.\strings\apr_cpystrn.c
"$(INTDIR)\apr_cpystrn.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h"
$(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
@@ -1783,28 +1379,6 @@ InputPath=.\include\apr.hw
<<
-!ELSEIF "$(CFG)" == "apr - 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)" == "apr - 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)" == "apr - x64 Release"
InputPath=.\include\apr.hw
@@ -1855,30 +1429,6 @@ InputPath=.\include\apr_escape.h
<<
-!ELSEIF "$(CFG)" == "apr - Win32 Release9x"
-
-InputPath=.\include\apr_escape.h
-
-".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- <<tempfile.bat
- @echo off
- 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
-<<
-
-
-!ELSEIF "$(CFG)" == "apr - Win32 Debug9x"
-
-InputPath=.\include\apr_escape.h
-
-".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- <<tempfile.bat
- @echo off
- 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
-<<
-
-
!ELSEIF "$(CFG)" == "apr - x64 Release"
InputPath=.\include\apr_escape.h
@@ -1929,28 +1479,6 @@ InputPath=.\include\apr_want.h
<<
-!ELSEIF "$(CFG)" == "apr - Win32 Release9x"
-
-InputPath=.\include\apr_want.h
-
-"$(INTDIR)\gen_test_char.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- <<tempfile.bat
- @echo off
- type .\include\apr.hw > .\include\apr.h
-<<
-
-
-!ELSEIF "$(CFG)" == "apr - Win32 Debug9x"
-
-InputPath=.\include\apr_want.h
-
-"$(INTDIR)\gen_test_char.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- <<tempfile.bat
- @echo off
- type .\include\apr.hw > .\include\apr.h
-<<
-
-
!ELSEIF "$(CFG)" == "apr - x64 Release"
InputPath=.\include\apr_want.h
diff --git a/apr.spec b/apr.spec
index 9761158d5ea1..919d473863bd 100644
--- a/apr.spec
+++ b/apr.spec
@@ -3,14 +3,14 @@
Summary: Apache Portable Runtime library
Name: apr
-Version: 1.5.2
+Version: 1.6.5
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
diff --git a/build-outputs.mk b/build-outputs.mk
index 275e3ecff55f..30b4b3fb53a7 100644
--- a/build-outputs.mk
+++ b/build-outputs.mk
@@ -3,53 +3,54 @@
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
+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_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_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_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
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_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_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_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/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/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_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/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/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_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/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_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
@@ -61,35 +62,36 @@ misc/unix/version.lo: misc/unix/version.c .make.dirs include/apr_allocator.h inc
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_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/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_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/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_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
@@ -97,25 +99,25 @@ shmem/unix/shm.lo: shmem/unix/shm.c .make.dirs include/apr_allocator.h include/a
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/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
@@ -130,20 +132,20 @@ OBJECTS_atomic_unix = atomic/unix/builtins.lo atomic/unix/ia32.lo atomic/unix/mu
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 +154,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/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,13 +168,13 @@ 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/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
@@ -184,52 +186,52 @@ 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
@@ -244,64 +246,64 @@ dso/win32/dso.lo: dso/win32/dso.c .make.dirs include/apr_allocator.h include/apr
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/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/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/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/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_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/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_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
@@ -311,7 +313,7 @@ OBJECTS_atomic_win32 = atomic/win32/apr_atomic.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_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)
diff --git a/config.layout b/config.layout
index 0f42e84e273c..fb087a855af1 100644
--- a/config.layout
+++ b/config.layout
@@ -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
diff --git a/configure b/configure
index 449c8842e1f0..ade76d97a0ae 100755
--- a/configure
+++ b/configure
@@ -656,6 +656,7 @@ apr_procattr_user_set_requires_password
apr_has_xthread_files
have_unicode_fs
have_ipv6
+have_sockaddr_un
have_sa_storage
have_sctp
acceptfilter
@@ -800,6 +801,7 @@ so_ext
link
lt_compile
installbuilddir
+LT_SYS_LIBRARY_PATH
OTOOL64
OTOOL
LIPO
@@ -906,6 +908,7 @@ enable_shared
enable_static
with_pic
enable_fast_install
+with_aix_soname
with_gnu_ld
with_sysroot
enable_libtool_lock
@@ -920,9 +923,12 @@ enable_lfs
enable_nonportable_atomics
enable_threads
with_efence
+with_valgrind
enable_posix_shm
with_sendfile
enable_allocator_uses_mmap
+enable_allocator_guard_pages
+enable_pool_concurrency_check
enable_dso
enable_other_child
with_egd
@@ -937,7 +943,8 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP'
+CPP
+LT_SYS_LIBRARY_PATH'
# Initialize some variables set by options.
@@ -1567,6 +1574,9 @@ Optional Features:
--enable-threads Enable threading support in APR.
--enable-posix-shm Use POSIX shared memory (shm_open) if available
--enable-allocator-uses-mmap Use mmap in apr_allocator instead of malloc
+ --enable-allocator-guard-pages Use guard pages in apr_allocator
+ (implies --enable-allocator-uses-mmap)
+ --enable-pool-concurrency-check Check for concurrent usage of memory pools
--disable-dso Disable DSO support
--enable-other-child Enable reliable child processes
--disable-ipv6 Disable IPv6 support in APR.
@@ -1576,12 +1586,17 @@ Optional Packages:
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
both]
+ --with-aix-soname=aix|svr4|both
+ shared library versioning (aka "SONAME") variant to
+ provide on AIX, [default=aix].
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
- --with-sysroot=DIR Search for dependent libraries within DIR
- (or the compiler's sysroot if not specified).
- --with-installbuilddir=DIR location to store APR build files (defaults to '${datadir}/build')
+ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the
+ compiler's sysroot if not specified).
+ --with-installbuilddir=DIR location to store APR build files
--without-libtool avoid using libtool to link the library
--with-efence[=DIR] path to Electric Fence installation
+ --with-valgrind[=DIR] Enable code to teach valgrind about apr pools
+ (optionally: set path to valgrind headers)
--with-sendfile Override decision to use sendfile
--with-egd[=DIR] use EGD-compatible socket
--with-devrandom[=DEV] use /dev/random or compatible [searches by default]
@@ -1595,6 +1610,8 @@ Some influential environment variables:
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
+ LT_SYS_LIBRARY_PATH
+ User-defined run-time library search path.
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -2901,11 +2918,11 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
# Written by Gordon Matzigkeit, 1996
#
# This file is free software; the Free Software Foundation gives
@@ -2914,7 +2931,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-# serial 57 LT_INIT
+# serial 58 LT_INIT
# LT_PREREQ(VERSION)
@@ -2974,16 +2991,23 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+# _LT_PREPARE_CC_BASENAME
+# -----------------------
+# _LT_PREPARE_CC_BASENAME
+
+
# _LT_CC_BASENAME(CC)
# -------------------
-# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
+# but that macro is also expanded into generated libtool script, which
+# arranges for $SED and $ECHO to be set by different means.
# _LT_FILEUTILS_DEFAULTS
# ----------------------
# It is okay to use these file commands and assume they have been set
-# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
# _LT_FILEUTILS_DEFAULTS
@@ -2999,9 +3023,9 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# _LT_PROG_LTMAIN
# ---------------
-# Note that this code is called both from `configure', and `config.status'
+# Note that this code is called both from 'configure', and 'config.status'
# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
-# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# 'config.status' has no value for ac_aux_dir unless we are using Automake,
# so we pass a copy along to make sure it has a sensible value anyway.
# _LT_PROG_LTMAIN
@@ -3012,7 +3036,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# So that we can recreate a full libtool script including additional
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
-# in macros and then make a single call at the end using the `libtool'
+# in macros and then make a single call at the end using the 'libtool'
# label.
@@ -3100,8 +3124,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
# ------------------------------------
-# Quote a variable value, and forward it to `config.status' so that its
-# declaration there will have the same value as in `configure'. VARNAME
+# Quote a variable value, and forward it to 'config.status' so that its
+# declaration there will have the same value as in 'configure'. VARNAME
# must have a single quote delimited value for this to work.
@@ -3136,7 +3160,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# _LT_LIBTOOL_CONFIG_VARS
# -----------------------
# Produce commented declarations of non-tagged libtool config variables
-# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
# section) are produced by _LT_LIBTOOL_TAG_VARS.
@@ -3157,8 +3181,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
# variables for single and double quote escaping we saved from calls
# to _LT_DECL, we can put quote escaped variables declarations
-# into `config.status', and then the shell code to quote escape them in
-# for loops in `config.status'. Finally, any additional code accumulated
+# into 'config.status', and then the shell code to quote escape them in
+# for loops in 'config.status'. Finally, any additional code accumulated
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
#_LT_CONFIG_COMMANDS
@@ -3171,7 +3195,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# Generate a child script FILE with all initialization necessary to
# reuse the environment learned by the parent script, and make the
# file executable. If COMMENT is supplied, it is inserted after the
-# `#!' sequence but before initialization text begins. After this
+# '#!' sequence but before initialization text begins. After this
# macro, additional text can be appended to FILE to form the body of
# the child script. The macro ends with non-zero status if the
# file could not be fully written (such as if the disk is full).
@@ -3374,8 +3398,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# -----------------------
# Find how we can fake an echo command that does not interpret backslash.
# In particular, with Autoconf 2.60 or later we add some code to the start
-# of the generated configure script which will find a shell with a builtin
-# printf (which we can use as an echo command).
+# of the generated configure script that will find a shell with a builtin
+# printf (that we can use as an echo command).
# _LT_PROG_ECHO_BACKSLASH
@@ -3546,6 +3570,12 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# _LT_CMD_STRIPLIB
+# _LT_PREPARE_MUNGE_PATH_LIST
+# ---------------------------
+# Make sure func_munge_path_list() is defined correctly.
+# _LT_PREPARE_PATH_LIST
+
+
# _LT_SYS_DYNAMIC_LINKER([TAG])
# -----------------------------
# PORTME Fill in your ld.so characteristics
@@ -3554,7 +3584,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# _LT_PATH_TOOL_PREFIX(TOOL)
# --------------------------
-# find a file program which can recognize shared library
+# find a file program that can recognize shared library
# _LT_PATH_TOOL_PREFIX
# Old name:
@@ -3581,7 +3611,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# _LT_PATH_MAGIC
# --------------
-# find a file program which can recognize a shared library
+# find a file program that can recognize a shared library
# _LT_PATH_MAGIC
@@ -3643,6 +3673,18 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# _LT_CMD_RELOAD
+# _LT_PATH_DD
+# -----------
+# find a working dd
+# _LT_PATH_DD
+
+
+# _LT_CMD_TRUNCATE
+# ----------------
+# find command to truncate a binary pipe
+# _LT_CMD_TRUNCATE
+
+
# _LT_CHECK_MAGIC_METHOD
# ----------------------
# how to check for library dependencies
@@ -3709,6 +3751,13 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# _LT_PATH_MANIFEST_TOOL
+# _LT_DLL_DEF_P([FILE])
+# ---------------------
+# True iff FILE is a Windows DLL '.def' file.
+# Keep in sync with func_dll_def_p in the libtool script
+# _LT_DLL_DEF_P
+
+
# LT_LIB_M
# --------
# check for math library
@@ -3761,7 +3810,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# ------------------------
# Ensure that the configuration variables for a C compiler are suitably
# defined. These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
+# the compiler configuration to 'libtool'.
# _LT_LANG_C_CONFIG
@@ -3769,7 +3818,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# --------------------------
# Ensure that the configuration variables for a C++ compiler are suitably
# defined. These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
+# the compiler configuration to 'libtool'.
# _LT_LANG_CXX_CONFIG
@@ -3786,6 +3835,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# rather than the libtool script.
# _LT_FUNC_STRIPNAME_CNF
+
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
# ---------------------------------
# Figure out "hidden" library dependencies from verbose
@@ -3799,7 +3849,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# --------------------------
# Ensure that the configuration variables for a Fortran 77 compiler are
# suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
# _LT_LANG_F77_CONFIG
@@ -3807,7 +3857,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# -------------------------
# Ensure that the configuration variables for a Fortran compiler are
# suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
# _LT_LANG_FC_CONFIG
@@ -3815,7 +3865,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# --------------------------
# Ensure that the configuration variables for the GNU Java Compiler compiler
# are suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
# _LT_LANG_GCJ_CONFIG
@@ -3823,7 +3873,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# --------------------------
# Ensure that the configuration variables for the GNU Go compiler
# are suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
# _LT_LANG_GO_CONFIG
@@ -3831,7 +3881,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# -------------------------
# Ensure that the configuration variables for the Windows resource compiler
# are suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
# _LT_LANG_RC_CONFIG
@@ -3947,29 +3997,17 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# _LT_CHECK_SHELL_FEATURES
-# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
-# ------------------------------------------------------
-# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
-# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
-
-
-
-# _LT_PROG_REPLACE_SHELLFNS
-# -------------------------
-# Replace existing portable implementations of several shell functions with
-# equivalent extended shell implementations where those features are available..
-
-
# _LT_PATH_CONVERSION_FUNCTIONS
# -----------------------------
-# Determine which file name conversion functions should be used by
+# Determine what file name conversion functions should be used by
# func_to_host_file (and, implicitly, by func_to_host_path). These are needed
# for certain cross-compile configurations and native mingw.
# _LT_PATH_CONVERSION_FUNCTIONS
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
-# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
+# Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
@@ -3997,7 +4035,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# ------------
# Manipulate m4 lists.
# These macros are necessary as long as will still need to support
-# Autoconf-2.59 which quotes differently.
+# Autoconf-2.59, which quotes differently.
@@ -4005,7 +4043,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
# ------------------------------------------
-# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
+# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
# Note that neither SEPARATOR nor STRING are expanded; they are appended
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
@@ -4060,15 +4098,15 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# Helper functions for option handling. -*- Autoconf -*-
#
-# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
+# Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
-# serial 7 ltoptions.m4
+# serial 8 ltoptions.m4
# This is to help aclocal find these macros, as it can't see m4_define.
@@ -4178,9 +4216,9 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# _LT_ENABLE_SHARED([DEFAULT])
# ----------------------------
-# implement the --enable-shared flag, and supports the `shared' and
-# `disable-shared' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+# implement the --enable-shared flag, and supports the 'shared' and
+# 'disable-shared' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
# _LT_ENABLE_SHARED
@@ -4235,9 +4273,9 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# _LT_ENABLE_STATIC([DEFAULT])
# ----------------------------
-# implement the --enable-static flag, and support the `static' and
-# `disable-static' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+# implement the --enable-static flag, and support the 'static' and
+# 'disable-static' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
# _LT_ENABLE_STATIC
@@ -4292,9 +4330,9 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
# ----------------------------------
-# implement the --enable-fast-install flag, and support the `fast-install'
-# and `disable-fast-install' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+# implement the --enable-fast-install flag, and support the 'fast-install'
+# and 'disable-fast-install' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
# _LT_ENABLE_FAST_INSTALL
@@ -4343,11 +4381,23 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+# _LT_WITH_AIX_SONAME([DEFAULT])
+# ----------------------------------
+# implement the --with-aix-soname flag, and support the `aix-soname=aix'
+# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
+# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
+# _LT_WITH_AIX_SONAME
+
+
+
+
+
+
# _LT_WITH_PIC([MODE])
# --------------------
-# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
# LT_INIT options.
-# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
+# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
# _LT_WITH_PIC
@@ -4390,7 +4440,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# ltversion.m4 -- version numbers -*- Autoconf -*-
#
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
# Written by Scott James Remnant, 2004
#
# This file is free software; the Free Software Foundation gives
@@ -4399,7 +4449,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# @configure_input@
-# serial 3337 ltversion.m4
+# serial 4179 ltversion.m4
# This file is part of GNU Libtool
@@ -4409,7 +4459,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
#
-# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
+# Foundation, Inc.
# Written by Scott James Remnant, 2004.
#
# This file is free software; the Free Software Foundation gives
@@ -4420,7 +4471,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# These exist entirely to fool aclocal when bootstrapping libtool.
#
-# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
# which have later been changed to m4_define as they aren't part of the
# exported API, or moved to Autoconf or Automake where they belong.
#
@@ -10657,8 +10708,8 @@ esac
-macro_version='2.4.2'
-macro_revision='1.3337'
+macro_version='2.4.6'
+macro_revision='2.4.6'
@@ -10672,7 +10723,7 @@ macro_revision='1.3337'
-ltmain="$ac_aux_dir/ltmain.sh"
+ltmain=$ac_aux_dir/ltmain.sh
# Backslashify metacharacters that are still active within
# double-quoted strings.
@@ -10721,7 +10772,7 @@ func_echo_all ()
$ECHO ""
}
-case "$ECHO" in
+case $ECHO in
printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
$as_echo "printf" >&6; } ;;
print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
@@ -10914,19 +10965,19 @@ test -z "$GREP" && GREP=grep
# Check whether --with-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then :
- withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+ withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
else
with_gnu_ld=no
fi
ac_prog=ld
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
# Check if gcc -print-prog-name=ld gives a path.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
$as_echo_n "checking for ld used by $CC... " >&6; }
case $host in
*-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
+ # gcc leaves a trailing carriage return, which upsets mingw
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
*)
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
@@ -10940,7 +10991,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
done
- test -z "$LD" && LD="$ac_prog"
+ test -z "$LD" && LD=$ac_prog
;;
"")
# If it fails, then pretend we aren't using GCC.
@@ -10951,7 +11002,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
with_gnu_ld=unknown
;;
esac
-elif test "$with_gnu_ld" = yes; then
+elif test yes = "$with_gnu_ld"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
$as_echo_n "checking for GNU ld... " >&6; }
else
@@ -10962,32 +11013,32 @@ if ${lt_cv_path_LD+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
+ lt_cv_path_LD=$ac_dir/$ac_prog
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some variants of GNU ld only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break
+ test no != "$with_gnu_ld" && break
;;
*)
- test "$with_gnu_ld" != yes && break
+ test yes != "$with_gnu_ld" && break
;;
esac
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
+ lt_cv_path_LD=$LD # Let the user override the test with a path.
fi
fi
-LD="$lt_cv_path_LD"
+LD=$lt_cv_path_LD
if test -n "$LD"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
$as_echo "$LD" >&6; }
@@ -11030,33 +11081,38 @@ if ${lt_cv_path_NM+:} false; then :
else
if test -n "$NM"; then
# Let the user override the test.
- lt_cv_path_NM="$NM"
+ lt_cv_path_NM=$NM
else
- lt_nm_to_check="${ac_tool_prefix}nm"
+ lt_nm_to_check=${ac_tool_prefix}nm
if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
lt_nm_to_check="$lt_nm_to_check nm"
fi
for lt_tmp_nm in $lt_nm_to_check; do
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
test -z "$ac_dir" && ac_dir=.
- tmp_nm="$ac_dir/$lt_tmp_nm"
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ tmp_nm=$ac_dir/$lt_tmp_nm
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
# Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
# Tru64's nm complains that /dev/null is an invalid object file
- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
- */dev/null* | *'Invalid file or object type'*)
+ # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
+ case $build_os in
+ mingw*) lt_bad_file=conftest.nm/nofile ;;
+ *) lt_bad_file=/dev/null ;;
+ esac
+ case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+ *$lt_bad_file* | *'Invalid file or object type'*)
lt_cv_path_NM="$tmp_nm -B"
- break
+ break 2
;;
*)
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
*/dev/null*)
lt_cv_path_NM="$tmp_nm -p"
- break
+ break 2
;;
*)
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
@@ -11067,15 +11123,15 @@ else
esac
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
done
: ${lt_cv_path_NM=no}
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
$as_echo "$lt_cv_path_NM" >&6; }
-if test "$lt_cv_path_NM" != "no"; then
- NM="$lt_cv_path_NM"
+if test no != "$lt_cv_path_NM"; then
+ NM=$lt_cv_path_NM
else
# Didn't find any BSD compatible name lister, look for dumpbin.
if test -n "$DUMPBIN"; then :
@@ -11181,9 +11237,9 @@ esac
fi
fi
- case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+ case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
*COFF*)
- DUMPBIN="$DUMPBIN -symbols"
+ DUMPBIN="$DUMPBIN -symbols -headers"
;;
*)
DUMPBIN=:
@@ -11191,8 +11247,8 @@ fi
esac
fi
- if test "$DUMPBIN" != ":"; then
- NM="$DUMPBIN"
+ if test : != "$DUMPBIN"; then
+ NM=$DUMPBIN
fi
fi
test -z "$NM" && NM=nm
@@ -11232,7 +11288,7 @@ if ${lt_cv_sys_max_cmd_len+:} false; then :
$as_echo_n "(cached) " >&6
else
i=0
- teststring="ABCD"
+ teststring=ABCD
case $build_os in
msdosdjgpp*)
@@ -11272,7 +11328,7 @@ else
lt_cv_sys_max_cmd_len=8192;
;;
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
# This has been around since 386BSD, at least. Likely further.
if test -x /sbin/sysctl; then
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -11322,22 +11378,23 @@ else
;;
*)
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
- if test -n "$lt_cv_sys_max_cmd_len"; then
+ if test -n "$lt_cv_sys_max_cmd_len" && \
+ test undefined != "$lt_cv_sys_max_cmd_len"; then
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
else
# Make teststring a little bigger before we do anything with it.
# a 1K string should be a reasonable start.
- for i in 1 2 3 4 5 6 7 8 ; do
+ for i in 1 2 3 4 5 6 7 8; do
teststring=$teststring$teststring
done
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
# If test is not a shell built-in, we'll probably end up computing a
# maximum length that is only half of the actual maximum length, but
# we can't tell.
- while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
+ while { test X`env echo "$teststring$teststring" 2>/dev/null` \
= "X$teststring$teststring"; } >/dev/null 2>&1 &&
- test $i != 17 # 1/2 MB should be enough
+ test 17 != "$i" # 1/2 MB should be enough
do
i=`expr $i + 1`
teststring=$teststring$teststring
@@ -11355,7 +11412,7 @@ else
fi
-if test -n $lt_cv_sys_max_cmd_len ; then
+if test -n "$lt_cv_sys_max_cmd_len"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
else
@@ -11373,30 +11430,6 @@ max_cmd_len=$lt_cv_sys_max_cmd_len
: ${MV="mv -f"}
: ${RM="rm -f"}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
-$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
- test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
- = c,a/b,b/c, \
- && eval 'test $(( 1 + 1 )) -eq 2 \
- && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
- && xsi_shell=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
-$as_echo "$xsi_shell" >&6; }
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
-$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
- >/dev/null 2>&1 \
- && lt_shell_append=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
-$as_echo "$lt_shell_append" >&6; }
-
-
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
lt_unset=unset
else
@@ -11519,13 +11552,13 @@ esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
cygwin* | mingw* | pw32* | cegcc*)
- if test "$GCC" != yes; then
+ if test yes != "$GCC"; then
reload_cmds=false
fi
;;
darwin*)
- if test "$GCC" = yes; then
- reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ if test yes = "$GCC"; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
else
reload_cmds='$LD$reload_flag -o $output$reload_objs'
fi
@@ -11650,13 +11683,13 @@ lt_cv_deplibs_check_method='unknown'
# Need to set the preceding variable on all platforms that support
# interlibrary dependencies.
# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
+# 'unknown' -- same as none, but documents that we really don't know.
# 'pass_all' -- all dependencies passed with no checks.
# 'test_compile' -- check by making test program.
# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
+# that responds to the $file_magic_cmd with a given extended regex.
+# If you have 'file' or equivalent on your system and you're not sure
+# whether 'pass_all' will *always* work, you probably want this one.
case $host_os in
aix[4-9]*)
@@ -11683,8 +11716,7 @@ mingw* | pw32*)
# Base MSYS/MinGW do not provide the 'file' command needed by
# func_win32_libid shell function, so use a weaker test based on 'objdump',
# unless we find 'file', for example because we are cross-compiling.
- # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
- if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
+ if ( file / ) >/dev/null 2>&1; then
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
else
@@ -11720,10 +11752,6 @@ freebsd* | dragonfly*)
fi
;;
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
haiku*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -11762,7 +11790,7 @@ irix5* | irix6* | nonstopux*)
;;
# This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -11784,8 +11812,8 @@ newos6*)
lt_cv_deplibs_check_method=pass_all
;;
-openbsd*)
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+openbsd* | bitrig*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
else
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
@@ -11838,6 +11866,9 @@ sysv4 | sysv4.3*)
tpf*)
lt_cv_deplibs_check_method=pass_all
;;
+os2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
esac
fi
@@ -11992,8 +12023,8 @@ else
case $host_os in
cygwin* | mingw* | pw32* | cegcc*)
- # two different shell functions defined in ltmain.sh
- # decide which to use based on capabilities of $DLLTOOL
+ # two different shell functions defined in ltmain.sh;
+ # decide which one to use based on capabilities of $DLLTOOL
case `$DLLTOOL --help 2>&1` in
*--identify-strict*)
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
@@ -12005,7 +12036,7 @@ cygwin* | mingw* | pw32* | cegcc*)
;;
*)
# fallback: assume linklib IS sharedlib
- lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+ lt_cv_sharedlib_from_linklib_cmd=$ECHO
;;
esac
@@ -12159,7 +12190,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
- if test "$ac_status" -eq 0; then
+ if test 0 -eq "$ac_status"; then
# Ensure the archiver fails upon bogus file names.
rm -f conftest.$ac_objext libconftest.a
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
@@ -12167,7 +12198,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
- if test "$ac_status" -ne 0; then
+ if test 0 -ne "$ac_status"; then
lt_cv_ar_at_file=@
fi
fi
@@ -12180,7 +12211,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
$as_echo "$lt_cv_ar_at_file" >&6; }
-if test "x$lt_cv_ar_at_file" = xno; then
+if test no = "$lt_cv_ar_at_file"; then
archiver_list_spec=
else
archiver_list_spec=$lt_cv_ar_at_file
@@ -12397,7 +12428,7 @@ old_postuninstall_cmds=
if test -n "$RANLIB"; then
case $host_os in
- openbsd*)
+ bitrig* | openbsd*)
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
;;
*)
@@ -12487,7 +12518,7 @@ cygwin* | mingw* | pw32* | cegcc*)
symcode='[ABCDGISTW]'
;;
hpux*)
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
symcode='[ABCDEGRST]'
fi
;;
@@ -12520,14 +12551,44 @@ case `$NM -V 2>&1` in
symcode='[ABCDGIRSTW]' ;;
esac
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Gets list of data symbols to import.
+ lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+ # Adjust the below global symbol transforms to fixup imported variables.
+ lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
+ lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
+ lt_c_name_lib_hook="\
+ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
+ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
+else
+ # Disable hooks by default.
+ lt_cv_sys_global_symbol_to_import=
+ lt_cdecl_hook=
+ lt_c_name_hook=
+ lt_c_name_lib_hook=
+fi
+
# Transform an extracted symbol line into a proper C declaration.
# Some systems (esp. on ia64) link data and code symbols differently,
# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+$lt_cdecl_hook\
+" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+$lt_c_name_hook\
+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
+
+# Transform an extracted symbol line into symbol name with lib prefix and
+# symbol address.
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+$lt_c_name_lib_hook\
+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
# Handle CRLF in mingw tool chain
opt_cr=
@@ -12545,21 +12606,24 @@ for ac_symprfx in "" "_"; do
# Write the raw and C identifiers.
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- # Fake it for dumpbin and say T for any non-static function
- # and D for any global variable.
+ # Fake it for dumpbin and say T for any non-static function,
+ # D for any global variable and I for any imported variable.
# Also find C++ and __fastcall symbols from MSVC++,
# which start with @ or ?.
lt_cv_sys_global_symbol_pipe="$AWK '"\
" {last_section=section; section=\$ 3};"\
" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
+" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
+" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
" \$ 0!~/External *\|/{next};"\
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
" {if(hide[section]) next};"\
-" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-" s[1]~/^[@?]/{print s[1], s[1]; next};"\
-" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
+" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
+" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
" ' prfx=^$ac_symprfx"
else
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
@@ -12607,11 +12671,11 @@ _LT_EOF
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cat <<_LT_EOF > conftest.$ac_ext
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
-/* DATA imports from DLLs on WIN32 con't be const, because runtime
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
relocations are performed -- see ld's documentation on pseudo-relocs. */
# define LT_DLSYM_CONST
-#elif defined(__osf__)
+#elif defined __osf__
/* This system does not cope well with relocations in const data. */
# define LT_DLSYM_CONST
#else
@@ -12637,7 +12701,7 @@ lt__PROGRAM__LTX_preloaded_symbols[] =
{
{ "@PROGRAM@", (void *) 0 },
_LT_EOF
- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
cat <<\_LT_EOF >> conftest.$ac_ext
{0, (void *) 0}
};
@@ -12657,13 +12721,13 @@ _LT_EOF
mv conftest.$ac_objext conftstm.$ac_objext
lt_globsym_save_LIBS=$LIBS
lt_globsym_save_CFLAGS=$CFLAGS
- LIBS="conftstm.$ac_objext"
+ LIBS=conftstm.$ac_objext
CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
(eval $ac_link) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest${ac_exeext}; then
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
pipe_works=yes
fi
LIBS=$lt_globsym_save_LIBS
@@ -12684,7 +12748,7 @@ _LT_EOF
rm -rf conftest* conftst*
# Do not use the global_symbol_pipe unless it works.
- if test "$pipe_works" = yes; then
+ if test yes = "$pipe_works"; then
break
else
lt_cv_sys_global_symbol_pipe=
@@ -12737,6 +12801,16 @@ fi
+
+
+
+
+
+
+
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
$as_echo_n "checking for sysroot... " >&6; }
@@ -12749,9 +12823,9 @@ fi
lt_sysroot=
-case ${with_sysroot} in #(
+case $with_sysroot in #(
yes)
- if test "$GCC" = yes; then
+ if test yes = "$GCC"; then
lt_sysroot=`$CC --print-sysroot 2>/dev/null`
fi
;; #(
@@ -12761,8 +12835,8 @@ case ${with_sysroot} in #(
no|'')
;; #(
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
-$as_echo "${with_sysroot}" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
+$as_echo "$with_sysroot" >&6; }
as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
;;
esac
@@ -12774,18 +12848,99 @@ $as_echo "${lt_sysroot:-no}" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
+$as_echo_n "checking for a working dd... " >&6; }
+if ${ac_cv_path_lt_DD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+: ${lt_DD:=$DD}
+if test -z "$lt_DD"; then
+ ac_path_lt_DD_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in dd; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_lt_DD" || continue
+if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+ cmp -s conftest.i conftest.out \
+ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
+fi
+ $ac_path_lt_DD_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_lt_DD"; then
+ :
+ fi
+else
+ ac_cv_path_lt_DD=$lt_DD
+fi
+
+rm -f conftest.i conftest2.i conftest.out
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
+$as_echo "$ac_cv_path_lt_DD" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
+$as_echo_n "checking how to truncate binary pipes... " >&6; }
+if ${lt_cv_truncate_bin+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+lt_cv_truncate_bin=
+if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+ cmp -s conftest.i conftest.out \
+ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
+fi
+rm -f conftest.i conftest2.i conftest.out
+test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
+$as_echo "$lt_cv_truncate_bin" >&6; }
+
+
+
+
+
+
+
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+ for cc_temp in $*""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+ done
+ func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+
# Check whether --enable-libtool-lock was given.
if test "${enable_libtool_lock+set}" = set; then :
enableval=$enable_libtool_lock;
fi
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+test no = "$enable_libtool_lock" || enable_libtool_lock=yes
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
case $host in
ia64-*-hpux*)
- # Find out which ABI we are using.
+ # Find out what ABI is being produced by ac_compile, and set mode
+ # options accordingly.
echo 'int i;' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
@@ -12794,24 +12949,25 @@ ia64-*-hpux*)
test $ac_status = 0; }; then
case `/usr/bin/file conftest.$ac_objext` in
*ELF-32*)
- HPUX_IA64_MODE="32"
+ HPUX_IA64_MODE=32
;;
*ELF-64*)
- HPUX_IA64_MODE="64"
+ HPUX_IA64_MODE=64
;;
esac
fi
rm -rf conftest*
;;
*-*-irix6*)
- # Find out which ABI we are using.
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
echo '#line '$LINENO' "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- if test "$lt_cv_prog_gnu_ld" = yes; then
+ if test yes = "$lt_cv_prog_gnu_ld"; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -melf32bsmip"
@@ -12840,9 +12996,50 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+mips64*-*linux*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo '#line '$LINENO' "configure"' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ emul=elf
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ emul="${emul}32"
+ ;;
+ *64-bit*)
+ emul="${emul}64"
+ ;;
+ esac
+ case `/usr/bin/file conftest.$ac_objext` in
+ *MSB*)
+ emul="${emul}btsmip"
+ ;;
+ *LSB*)
+ emul="${emul}ltsmip"
+ ;;
+ esac
+ case `/usr/bin/file conftest.$ac_objext` in
+ *N32*)
+ emul="${emul}n32"
+ ;;
+ esac
+ LD="${LD-ld} -m $emul"
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
- # Find out which ABI we are using.
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly. Note that the listed cases only cover the
+ # situations where additional linker options are needed (such as when
+ # doing 32-bit compilation for a host where ld defaults to 64-bit, or
+ # vice versa); the common cases where no linker options are needed do
+ # not appear in the list.
echo 'int i;' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
@@ -12856,9 +13053,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
LD="${LD-ld} -m elf_i386_fbsd"
;;
x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
+ case `/usr/bin/file conftest.o` in
+ *x86-64*)
+ LD="${LD-ld} -m elf32_x86_64"
+ ;;
+ *)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ esac
+ ;;
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
;;
- ppc64-*linux*|powerpc64-*linux*)
+ powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -12877,7 +13084,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- ppc*-*linux*|powerpc*-*linux*)
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -12895,7 +13105,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
+ SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -belf"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
@@ -12935,13 +13145,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
$as_echo "$lt_cv_cc_needs_belf" >&6; }
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ if test yes != "$lt_cv_cc_needs_belf"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
+ CFLAGS=$SAVE_CFLAGS
fi
;;
*-*solaris*)
- # Find out which ABI we are using.
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
echo 'int i;' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
@@ -12953,7 +13164,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
case $lt_cv_prog_gnu_ld in
yes*)
case $host in
- i?86-*-solaris*)
+ i?86-*-solaris*|x86_64-*-solaris*)
LD="${LD-ld} -m elf_x86_64"
;;
sparc*-*-solaris*)
@@ -12962,7 +13173,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
esac
# GNU ld 2.21 introduced _sol2 emulations. Use them if available.
if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
- LD="${LD-ld}_sol2"
+ LD=${LD-ld}_sol2
fi
;;
*)
@@ -12978,7 +13189,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
;;
esac
-need_locks="$enable_libtool_lock"
+need_locks=$enable_libtool_lock
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
@@ -13089,7 +13300,7 @@ else
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
$as_echo "$lt_cv_path_mainfest_tool" >&6; }
-if test "x$lt_cv_path_mainfest_tool" != xyes; then
+if test yes != "$lt_cv_path_mainfest_tool"; then
MANIFEST_TOOL=:
fi
@@ -13592,7 +13803,7 @@ if ${lt_cv_apple_cc_single_mod+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_apple_cc_single_mod=no
- if test -z "${LT_MULTI_MODULE}"; then
+ if test -z "$LT_MULTI_MODULE"; then
# By default we will add the -single_module flag. You can override
# by either setting the environment variable LT_MULTI_MODULE
# non-empty at configure time, or by adding -multi_module to the
@@ -13610,7 +13821,7 @@ else
cat conftest.err >&5
# Otherwise, if the output was created with a 0 exit code from
# the compiler, it worked.
- elif test -f libconftest.dylib && test $_lt_result -eq 0; then
+ elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
lt_cv_apple_cc_single_mod=yes
else
cat conftest.err >&5
@@ -13649,7 +13860,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- LDFLAGS="$save_LDFLAGS"
+ LDFLAGS=$save_LDFLAGS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
@@ -13678,7 +13889,7 @@ _LT_EOF
_lt_result=$?
if test -s conftest.err && $GREP force_load conftest.err; then
cat conftest.err >&5
- elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
+ elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
lt_cv_ld_force_load=yes
else
cat conftest.err >&5
@@ -13691,32 +13902,32 @@ fi
$as_echo "$lt_cv_ld_force_load" >&6; }
case $host_os in
rhapsody* | darwin1.[012])
- _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
darwin1.*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
darwin*) # darwin 5.x on
# if running on 10.5 or later, the deployment target defaults
# to the OS version, if on x86, and 10.4, the deployment
# target defaults to 10.4. Don't you love it?
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[91]*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[012]*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ 10.[012][,.]*)
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10.*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
esac
;;
esac
- if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ if test yes = "$lt_cv_apple_cc_single_mod"; then
_lt_dar_single_mod='$single_module'
fi
- if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
- _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ if test yes = "$lt_cv_ld_exported_symbols_list"; then
+ _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
else
- _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
fi
- if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+ if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
_lt_dsymutil='~$DSYMUTIL $lib || :'
else
_lt_dsymutil=
@@ -13724,6 +13935,41 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
;;
esac
+# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+# string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+# string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+# "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+# VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+ case x$2 in
+ x)
+ ;;
+ *:)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
+ ;;
+ x:*)
+ eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ *::*)
+ eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+ eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
+ ;;
+ *)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ esac
+}
+
for ac_header in dlfcn.h
do :
ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
@@ -13758,14 +14004,14 @@ if test "${enable_shared+set}" = set; then :
*)
enable_shared=no
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_shared=yes
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
;;
esac
else
@@ -13789,14 +14035,14 @@ if test "${enable_static+set}" = set; then :
*)
enable_static=no
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_static=yes
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
;;
esac
else
@@ -13820,14 +14066,14 @@ if test "${with_pic+set}" = set; then :
*)
pic_mode=default
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for lt_pkg in $withval; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
if test "X$lt_pkg" = "X$lt_p"; then
pic_mode=yes
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
;;
esac
else
@@ -13835,8 +14081,6 @@ else
fi
-test -z "$pic_mode" && pic_mode=default
-
@@ -13852,14 +14096,14 @@ if test "${enable_fast_install+set}" = set; then :
*)
enable_fast_install=no
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_fast_install=yes
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
;;
esac
else
@@ -13873,11 +14117,63 @@ fi
+ shared_archive_member_spec=
+case $host,$enable_shared in
+power*-*-aix[5-9]*,yes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
+$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
+
+# Check whether --with-aix-soname was given.
+if test "${with_aix_soname+set}" = set; then :
+ withval=$with_aix_soname; case $withval in
+ aix|svr4|both)
+ ;;
+ *)
+ as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
+ ;;
+ esac
+ lt_cv_with_aix_soname=$with_aix_soname
+else
+ if ${lt_cv_with_aix_soname+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_with_aix_soname=aix
+fi
+
+ with_aix_soname=$lt_cv_with_aix_soname
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
+$as_echo "$with_aix_soname" >&6; }
+ if test aix != "$with_aix_soname"; then
+ # For the AIX way of multilib, we name the shared archive member
+ # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
+ # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
+ # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
+ # the AIX toolchain works better with OBJECT_MODE set (default 32).
+ if test 64 = "${OBJECT_MODE-32}"; then
+ shared_archive_member_spec=shr_64
+ else
+ shared_archive_member_spec=shr
+ fi
+ fi
+ ;;
+*)
+ with_aix_soname=aix
+ ;;
+esac
+
+
+
+
+
+
+
# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
+LIBTOOL_DEPS=$ltmain
# Always use our own libtool.
LIBTOOL='$(SHELL) $(apr_builddir)/libtool'
@@ -13926,7 +14222,7 @@ test -z "$LN_S" && LN_S="ln -s"
-if test -n "${ZSH_VERSION+set}" ; then
+if test -n "${ZSH_VERSION+set}"; then
setopt NO_GLOB_SUBST
fi
@@ -13965,7 +14261,7 @@ aix3*)
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
- if test "X${COLLECT_NAMES+set}" != Xset; then
+ if test set != "${COLLECT_NAMES+set}"; then
COLLECT_NAMES=
export COLLECT_NAMES
fi
@@ -13976,14 +14272,14 @@ esac
ofile=libtool
can_build_shared=yes
-# All known linkers require a `.a' archive for static linking (except MSVC,
+# All known linkers require a '.a' archive for static linking (except MSVC,
# which needs '.lib').
libext=a
-with_gnu_ld="$lt_cv_prog_gnu_ld"
+with_gnu_ld=$lt_cv_prog_gnu_ld
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
+old_CC=$CC
+old_CFLAGS=$CFLAGS
# Set sane defaults for various variables
test -z "$CC" && CC=cc
@@ -13992,15 +14288,8 @@ test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
test -z "$LD" && LD=ld
test -z "$ac_objext" && ac_objext=o
-for cc_temp in $compiler""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+func_cc_basename $compiler
+cc_basename=$func_cc_basename_result
# Only perform the check for file, if the check method requires it
@@ -14015,22 +14304,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then :
else
case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
;;
*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ lt_save_MAGIC_CMD=$MAGIC_CMD
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/${ac_tool_prefix}file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+ if test -f "$ac_dir/${ac_tool_prefix}file"; then
+ lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
if test -n "$file_magic_test_file"; then
case $deplibs_check_method in
"file_magic "*)
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ MAGIC_CMD=$lt_cv_path_MAGIC_CMD
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
$EGREP "$file_magic_regex" > /dev/null; then
:
@@ -14053,13 +14342,13 @@ _LT_EOF
break
fi
done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
+ IFS=$lt_save_ifs
+ MAGIC_CMD=$lt_save_MAGIC_CMD
;;
esac
fi
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
if test -n "$MAGIC_CMD"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
$as_echo "$MAGIC_CMD" >&6; }
@@ -14081,22 +14370,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then :
else
case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
;;
*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ lt_save_MAGIC_CMD=$MAGIC_CMD
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/file"
+ if test -f "$ac_dir/file"; then
+ lt_cv_path_MAGIC_CMD=$ac_dir/"file"
if test -n "$file_magic_test_file"; then
case $deplibs_check_method in
"file_magic "*)
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ MAGIC_CMD=$lt_cv_path_MAGIC_CMD
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
$EGREP "$file_magic_regex" > /dev/null; then
:
@@ -14119,13 +14408,13 @@ _LT_EOF
break
fi
done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
+ IFS=$lt_save_ifs
+ MAGIC_CMD=$lt_save_MAGIC_CMD
;;
esac
fi
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
if test -n "$MAGIC_CMD"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
$as_echo "$MAGIC_CMD" >&6; }
@@ -14146,7 +14435,7 @@ esac
# Use C for the default configuration in the libtool script
-lt_save_CC="$CC"
+lt_save_CC=$CC
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -14208,7 +14497,7 @@ if test -n "$compiler"; then
lt_prog_compiler_no_builtin_flag=
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
case $cc_basename in
nvcc*)
lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
@@ -14224,7 +14513,7 @@ else
lt_cv_prog_compiler_rtti_exceptions=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="-fno-rtti -fno-exceptions"
+ lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
# Note that $ac_compile itself does not contain backslashes and begins
@@ -14254,7 +14543,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
else
:
@@ -14272,17 +14561,18 @@ lt_prog_compiler_pic=
lt_prog_compiler_static=
- if test "$GCC" = yes; then
+ if test yes = "$GCC"; then
lt_prog_compiler_wl='-Wl,'
lt_prog_compiler_static='-static'
case $host_os in
aix*)
# All AIX code is PIC.
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# AIX 5 now supports IA64 processor
lt_prog_compiler_static='-Bstatic'
fi
+ lt_prog_compiler_pic='-fPIC'
;;
amigaos*)
@@ -14293,8 +14583,8 @@ lt_prog_compiler_static=
;;
m68k)
# FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
+ # adding the '-m68020' flag to GCC prevents building anything better,
+ # like '-m68040'.
lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
;;
esac
@@ -14310,6 +14600,11 @@ lt_prog_compiler_static=
# Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
lt_prog_compiler_pic='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static='$wl-static'
+ ;;
+ esac
;;
darwin* | rhapsody*)
@@ -14380,7 +14675,7 @@ lt_prog_compiler_static=
case $host_os in
aix*)
lt_prog_compiler_wl='-Wl,'
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# AIX 5 now supports IA64 processor
lt_prog_compiler_static='-Bstatic'
else
@@ -14388,10 +14683,29 @@ lt_prog_compiler_static=
fi
;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ case $cc_basename in
+ nagfor*)
+ # NAG Fortran compiler
+ lt_prog_compiler_wl='-Wl,-Wl,,'
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ esac
+ ;;
+
mingw* | cygwin* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
lt_prog_compiler_pic='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static='$wl-static'
+ ;;
+ esac
;;
hpux9* | hpux10* | hpux11*)
@@ -14407,7 +14721,7 @@ lt_prog_compiler_static=
;;
esac
# Is there a better lt_prog_compiler_static that works with the bundled CC?
- lt_prog_compiler_static='${wl}-a ${wl}archive'
+ lt_prog_compiler_static='$wl-a ${wl}archive'
;;
irix5* | irix6* | nonstopux*)
@@ -14416,9 +14730,9 @@ lt_prog_compiler_static=
lt_prog_compiler_static='-non_shared'
;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
case $cc_basename in
- # old Intel for x86_64 which still supported -KPIC.
+ # old Intel for x86_64, which still supported -KPIC.
ecc*)
lt_prog_compiler_wl='-Wl,'
lt_prog_compiler_pic='-KPIC'
@@ -14443,6 +14757,12 @@ lt_prog_compiler_static=
lt_prog_compiler_pic='-PIC'
lt_prog_compiler_static='-Bstatic'
;;
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
@@ -14540,7 +14860,7 @@ lt_prog_compiler_static=
;;
sysv4*MP*)
- if test -d /usr/nec ;then
+ if test -d /usr/nec; then
lt_prog_compiler_pic='-Kconform_pic'
lt_prog_compiler_static='-Bstatic'
fi
@@ -14569,7 +14889,7 @@ lt_prog_compiler_static=
fi
case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
+ # For platforms that do not support PIC, -DPIC is meaningless:
*djgpp*)
lt_prog_compiler_pic=
;;
@@ -14601,7 +14921,7 @@ else
lt_cv_prog_compiler_pic_works=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
# Note that $ac_compile itself does not contain backslashes and begins
@@ -14631,7 +14951,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
-if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+if test yes = "$lt_cv_prog_compiler_pic_works"; then
case $lt_prog_compiler_pic in
"" | " "*) ;;
*) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
@@ -14663,7 +14983,7 @@ if ${lt_cv_prog_compiler_static_works+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_static_works=no
- save_LDFLAGS="$LDFLAGS"
+ save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -14682,13 +15002,13 @@ else
fi
fi
$RM -r conftest*
- LDFLAGS="$save_LDFLAGS"
+ LDFLAGS=$save_LDFLAGS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
-if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+if test yes = "$lt_cv_prog_compiler_static_works"; then
:
else
lt_prog_compiler_static=
@@ -14808,8 +15128,8 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+hard_links=nottested
+if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
# do not overwrite the value of need_locks provided by the user
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
$as_echo_n "checking if we can lock with hard links... " >&6; }
@@ -14821,9 +15141,9 @@ $as_echo_n "checking if we can lock with hard links... " >&6; }
ln conftest.a conftest.b 2>/dev/null && hard_links=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
$as_echo "$hard_links" >&6; }
- if test "$hard_links" = no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ if test no = "$hard_links"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
need_locks=warn
fi
else
@@ -14866,9 +15186,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
# included in the symbol list
include_expsyms=
# exclude_expsyms can be an extended regexp of symbols to exclude
- # it will be wrapped by ` (' and `)$', so one must not match beginning or
- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
- # as well as any symbol that contains `d'.
+ # it will be wrapped by ' (' and ')$', so one must not match beginning or
+ # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
+ # as well as any symbol that contains 'd'.
exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
# platforms (ab)use it in PIC code, but their linkers get confused if
@@ -14883,7 +15203,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
- if test "$GCC" != yes; then
+ if test yes != "$GCC"; then
with_gnu_ld=no
fi
;;
@@ -14891,7 +15211,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
# we just hope/assume this is gcc and not c89 (= MSVC++)
with_gnu_ld=yes
;;
- openbsd*)
+ openbsd* | bitrig*)
with_gnu_ld=no
;;
esac
@@ -14901,7 +15221,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
# On some targets, GNU ld is compatible enough with the native linker
# that we're better off using the native interface for both.
lt_use_gnu_ld_interface=no
- if test "$with_gnu_ld" = yes; then
+ if test yes = "$with_gnu_ld"; then
case $host_os in
aix*)
# The AIX port of GNU ld has always aspired to compatibility
@@ -14923,24 +15243,24 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
esac
fi
- if test "$lt_use_gnu_ld_interface" = yes; then
+ if test yes = "$lt_use_gnu_ld_interface"; then
# If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
+ wlarc='$wl'
# Set some defaults for GNU ld with shared library support. These
# are reset later if shared libraries are not supported. Putting them
# here allows them to be overridden if necessary.
runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- export_dynamic_flag_spec='${wl}--export-dynamic'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ export_dynamic_flag_spec='$wl--export-dynamic'
# ancient GNU ld didn't support --whole-archive et. al.
if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
else
whole_archive_flag_spec=
fi
supports_anon_versioning=no
- case `$LD -v 2>&1` in
+ case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
*GNU\ gold*) supports_anon_versioning=yes ;;
*\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
@@ -14953,7 +15273,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
case $host_os in
aix[3-9]*)
# On AIX/PPC, the GNU linker is very broken
- if test "$host_cpu" != ia64; then
+ if test ia64 != "$host_cpu"; then
ld_shlibs=no
cat <<_LT_EOF 1>&2
@@ -14972,7 +15292,7 @@ _LT_EOF
case $host_cpu in
powerpc)
# see comment about AmigaOS4 .so support
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
archive_expsym_cmds=''
;;
m68k)
@@ -14988,7 +15308,7 @@ _LT_EOF
allow_undefined_flag=unsupported
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
# support --undefined. This deserves some investigation. FIXME
- archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
else
ld_shlibs=no
fi
@@ -14998,7 +15318,7 @@ _LT_EOF
# _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
# as there is no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
- export_dynamic_flag_spec='${wl}--export-all-symbols'
+ export_dynamic_flag_spec='$wl--export-all-symbols'
allow_undefined_flag=unsupported
always_export_symbols=no
enable_shared_with_static_runtimes=yes
@@ -15006,61 +15326,89 @@ _LT_EOF
exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file, use it as
+ # is; otherwise, prepend EXPORTS...
+ archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
else
ld_shlibs=no
fi
;;
haiku*)
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
link_all_deplibs=yes
;;
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ shrext_cmds=.dll
+ archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ enable_shared_with_static_runtimes=yes
+ ;;
+
interix[3-9]*)
hardcode_direct=no
hardcode_shlibpath_var=no
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- export_dynamic_flag_spec='${wl}-E'
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+ export_dynamic_flag_spec='$wl-E'
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
# Instead, shared libraries are loaded at an image base (0x10000000 by
# default) and relocated if they conflict, which is a slow very memory
# consuming and fragmenting process. To avoid this, we pick a random,
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
tmp_diet=no
- if test "$host_os" = linux-dietlibc; then
+ if test linux-dietlibc = "$host_os"; then
case $cc_basename in
diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
esac
fi
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- && test "$tmp_diet" = no
+ && test no = "$tmp_diet"
then
tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
tmp_addflag=' $pic_flag'
;;
pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group f77 and f90 compilers
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
tmp_addflag=' $pic_flag -Mnomain' ;;
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
tmp_addflag=' -i_dynamic' ;;
@@ -15071,42 +15419,47 @@ _LT_EOF
lf95*) # Lahey Fortran 8.1
whole_archive_flag_spec=
tmp_sharedflag='--shared' ;;
+ nagfor*) # NAGFOR 5.3
+ tmp_sharedflag='-Wl,-shared' ;;
xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
tmp_sharedflag='-qmkshrobj'
tmp_addflag= ;;
nvcc*) # Cuda Compiler Driver 2.2
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
compiler_needs_object=yes
;;
esac
case `$CC -V 2>&1 | sed 5q` in
*Sun\ C*) # Sun C 5.9
- whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
compiler_needs_object=yes
tmp_sharedflag='-G' ;;
*Sun\ F*) # Sun Fortran 8.3
tmp_sharedflag='-G' ;;
esac
- archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
+ if test yes = "$supports_anon_versioning"; then
archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
fi
case $cc_basename in
+ tcc*)
+ export_dynamic_flag_spec='-rdynamic'
+ ;;
xlf* | bgf* | bgxlf* | mpixlf*)
# IBM XL Fortran 10.1 on PPC cannot create shared libs itself
whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
+ if test yes = "$supports_anon_versioning"; then
archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
fi
;;
esac
@@ -15120,8 +15473,8 @@ _LT_EOF
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
fi
;;
@@ -15139,8 +15492,8 @@ _LT_EOF
_LT_EOF
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
@@ -15152,7 +15505,7 @@ _LT_EOF
ld_shlibs=no
cat <<_LT_EOF 1>&2
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
*** reliably create shared libraries on SCO systems. Therefore, libtool
*** is disabling shared libraries support. We urge you to upgrade GNU
*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
@@ -15167,9 +15520,9 @@ _LT_EOF
# DT_RUNPATH tag from executables and libraries. But doing so
# requires that you compile everything twice, which is a pain.
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
@@ -15186,15 +15539,15 @@ _LT_EOF
*)
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
;;
esac
- if test "$ld_shlibs" = no; then
+ if test no = "$ld_shlibs"; then
runpath_var=
hardcode_libdir_flag_spec=
export_dynamic_flag_spec=
@@ -15210,7 +15563,7 @@ _LT_EOF
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L=yes
- if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
# Neither direct hardcoding nor static linking is supported with a
# broken collect2.
hardcode_direct=unsupported
@@ -15218,34 +15571,57 @@ _LT_EOF
;;
aix[4-9]*)
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
exp_sym_flag='-Bexport'
- no_entry_flag=""
+ no_entry_flag=
else
# If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- # Also, AIX nm treats weak defined symbols like other global
- # defined symbols, whereas GNU nm marks them as "W".
+ # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+ # Without the "-l" option, or with the "-B" option, AIX nm treats
+ # weak defined symbols like other global defined symbols, whereas
+ # GNU nm marks them as "W".
+ # While the 'weak' keyword is ignored in the Export File, we need
+ # it in the Import File for the 'aix-soname' feature, so we have
+ # to replace the "-B" option with "-P" for AIX nm.
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
+ # have runtime linking enabled, and use it for executables.
+ # For shared libraries, we enable/disable runtime linking
+ # depending on the kind of the shared library created -
+ # when "with_aix_soname,aix_use_runtimelinking" is:
+ # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
+ # "aix,yes" lib.so shared, rtl:yes, for executables
+ # lib.a static archive
+ # "both,no" lib.so.V(shr.o) shared, rtl:yes
+ # lib.a(lib.so.V) shared, rtl:no, for executables
+ # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a(lib.so.V) shared, rtl:no
+ # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a static archive
case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
for ld_flag in $LDFLAGS; do
- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
aix_use_runtimelinking=yes
break
fi
done
+ if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # With aix-soname=svr4, we create the lib.so.V shared archives only,
+ # so we don't have lib.a shared libs to link our executables.
+ # We have to force runtime linking in this case.
+ aix_use_runtimelinking=yes
+ LDFLAGS="$LDFLAGS -Wl,-brtl"
+ fi
;;
esac
@@ -15264,13 +15640,21 @@ _LT_EOF
hardcode_direct_absolute=yes
hardcode_libdir_separator=':'
link_all_deplibs=yes
- file_list_spec='${wl}-f,'
+ file_list_spec='$wl-f,'
+ case $with_aix_soname,$aix_use_runtimelinking in
+ aix,*) ;; # traditional, no import file
+ svr4,* | *,yes) # use import file
+ # The Import File defines what to hardcode.
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ ;;
+ esac
- if test "$GCC" = yes; then
+ if test yes = "$GCC"; then
case $host_os in aix4.[012]|aix4.[012].*)
# We only want to do this on AIX 4.2 and lower, the check
# below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
+ collect2name=`$CC -print-prog-name=collect2`
if test -f "$collect2name" &&
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
then
@@ -15289,35 +15673,42 @@ _LT_EOF
;;
esac
shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag="$shared_flag "'$wl-G'
fi
+ # Need to ensure runtime linking is disabled for the traditional
+ # shared library, or the linker may eventually find shared libraries
+ # /with/ Import File - we do not want to mix them.
+ shared_flag_aix='-shared'
+ shared_flag_svr4='-shared $wl-G'
else
# not using gcc
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
# chokes on -Wl,-G. The following line is correct:
shared_flag='-G'
else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag='$wl-G'
else
- shared_flag='${wl}-bM:SRE'
+ shared_flag='$wl-bM:SRE'
fi
+ shared_flag_aix='$wl-bM:SRE'
+ shared_flag_svr4='$wl-G'
fi
fi
- export_dynamic_flag_spec='${wl}-bexpall'
+ export_dynamic_flag_spec='$wl-bexpall'
# It seems that -bexpall does not export symbols beginning with
# underscore (_), so it is better to generate a list of symbols to export.
always_export_symbols=yes
- if test "$aix_use_runtimelinking" = yes; then
+ if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
# Warning - without using the other runtime loading flags (-brtl),
# -berok will link without error, but may produce a broken library.
allow_undefined_flag='-berok'
# Determine the default libpath from the value encoded in an
# empty executable.
- if test "${lt_cv_aix_libpath+set}" = set; then
+ if test set = "${lt_cv_aix_libpath+set}"; then
aix_libpath=$lt_cv_aix_libpath
else
if ${lt_cv_aix_libpath_+:} false; then :
@@ -15352,7 +15743,7 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test -z "$lt_cv_aix_libpath_"; then
- lt_cv_aix_libpath_="/usr/lib:/lib"
+ lt_cv_aix_libpath_=/usr/lib:/lib
fi
fi
@@ -15360,17 +15751,17 @@ fi
aix_libpath=$lt_cv_aix_libpath_
fi
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
- archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
else
- if test "$host_cpu" = ia64; then
- hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ if test ia64 = "$host_cpu"; then
+ hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
allow_undefined_flag="-z nodefs"
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
else
# Determine the default libpath from the value encoded in an
# empty executable.
- if test "${lt_cv_aix_libpath+set}" = set; then
+ if test set = "${lt_cv_aix_libpath+set}"; then
aix_libpath=$lt_cv_aix_libpath
else
if ${lt_cv_aix_libpath_+:} false; then :
@@ -15405,7 +15796,7 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test -z "$lt_cv_aix_libpath_"; then
- lt_cv_aix_libpath_="/usr/lib:/lib"
+ lt_cv_aix_libpath_=/usr/lib:/lib
fi
fi
@@ -15413,21 +15804,33 @@ fi
aix_libpath=$lt_cv_aix_libpath_
fi
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
# -berok will link without error, but may produce a broken library.
- no_undefined_flag=' ${wl}-bernotok'
- allow_undefined_flag=' ${wl}-berok'
- if test "$with_gnu_ld" = yes; then
+ no_undefined_flag=' $wl-bernotok'
+ allow_undefined_flag=' $wl-berok'
+ if test yes = "$with_gnu_ld"; then
# We only use this code for GNU lds that support --whole-archive.
- whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
else
# Exported symbols can be pulled into shared objects from archives
whole_archive_flag_spec='$convenience'
fi
archive_cmds_need_lc=yes
- # This is similar to how AIX traditionally builds its shared libraries.
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+ # -brtl affects multiple linker settings, -berok does not and is overridden later
+ compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
+ if test svr4 != "$with_aix_soname"; then
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+ fi
+ if test aix != "$with_aix_soname"; then
+ archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
+ else
+ # used by -dlpreopen to get the symbols
+ archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
+ fi
+ archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
fi
fi
;;
@@ -15436,7 +15839,7 @@ fi
case $host_cpu in
powerpc)
# see comment about AmigaOS4 .so support
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
archive_expsym_cmds=''
;;
m68k)
@@ -15466,16 +15869,17 @@ fi
# Tell ltmain to make .lib files, not .a files.
libext=lib
# Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
+ shrext_cmds=.dll
# FIXME: Setting linknames here is a bad hack.
- archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
- archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
- else
- sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
- fi~
- $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
- linknames='
+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
+ cp "$export_symbols" "$output_objdir/$soname.def";
+ echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+ else
+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
# The linker will not automatically build a static lib if we build a DLL.
# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
enable_shared_with_static_runtimes=yes
@@ -15484,18 +15888,18 @@ fi
# Don't use ranlib
old_postinstall_cmds='chmod 644 $oldlib'
postlink_cmds='lt_outputfile="@OUTPUT@"~
- lt_tool_outputfile="@TOOL_OUTPUT@"~
- case $lt_outputfile in
- *.exe|*.EXE) ;;
- *)
- lt_outputfile="$lt_outputfile.exe"
- lt_tool_outputfile="$lt_tool_outputfile.exe"
- ;;
- esac~
- if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
- $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
- $RM "$lt_outputfile.manifest";
- fi'
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile=$lt_outputfile.exe
+ lt_tool_outputfile=$lt_tool_outputfile.exe
+ ;;
+ esac~
+ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
;;
*)
# Assume MSVC wrapper
@@ -15504,7 +15908,7 @@ fi
# Tell ltmain to make .lib files, not .a files.
libext=lib
# Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
+ shrext_cmds=.dll
# FIXME: Setting linknames here is a bad hack.
archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
# The linker will automatically build a .lib file if we build a DLL.
@@ -15523,24 +15927,24 @@ fi
hardcode_direct=no
hardcode_automatic=yes
hardcode_shlibpath_var=unsupported
- if test "$lt_cv_ld_force_load" = "yes"; then
- whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+ if test yes = "$lt_cv_ld_force_load"; then
+ whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
else
whole_archive_flag_spec=''
fi
link_all_deplibs=yes
- allow_undefined_flag="$_lt_dar_allow_undefined"
+ allow_undefined_flag=$_lt_dar_allow_undefined
case $cc_basename in
- ifort*) _lt_dar_can_shared=yes ;;
+ ifort*|nagfor*) _lt_dar_can_shared=yes ;;
*) _lt_dar_can_shared=$GCC ;;
esac
- if test "$_lt_dar_can_shared" = "yes"; then
+ if test yes = "$_lt_dar_can_shared"; then
output_verbose_link_cmd=func_echo_all
- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
- module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
- module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+ archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+ module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
else
ld_shlibs=no
@@ -15582,33 +15986,33 @@ fi
;;
hpux9*)
- if test "$GCC" = yes; then
- archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ if test yes = "$GCC"; then
+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
else
- archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
fi
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
- export_dynamic_flag_spec='${wl}-E'
+ export_dynamic_flag_spec='$wl-E'
;;
hpux10*)
- if test "$GCC" = yes && test "$with_gnu_ld" = no; then
- archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ if test yes,no = "$GCC,$with_gnu_ld"; then
+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ if test no = "$with_gnu_ld"; then
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
hardcode_direct_absolute=yes
- export_dynamic_flag_spec='${wl}-E'
+ export_dynamic_flag_spec='$wl-E'
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
@@ -15616,25 +16020,25 @@ fi
;;
hpux11*)
- if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+ if test yes,no = "$GCC,$with_gnu_ld"; then
case $host_cpu in
hppa*64*)
- archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
- archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
- archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
else
case $host_cpu in
hppa*64*)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
@@ -15646,7 +16050,7 @@ if ${lt_cv_prog_compiler__b+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler__b=no
- save_LDFLAGS="$LDFLAGS"
+ save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -b"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -15665,14 +16069,14 @@ else
fi
fi
$RM -r conftest*
- LDFLAGS="$save_LDFLAGS"
+ LDFLAGS=$save_LDFLAGS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
$as_echo "$lt_cv_prog_compiler__b" >&6; }
-if test x"$lt_cv_prog_compiler__b" = xyes; then
- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+if test yes = "$lt_cv_prog_compiler__b"; then
+ archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
@@ -15680,8 +16084,8 @@ fi
;;
esac
fi
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ if test no = "$with_gnu_ld"; then
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
hardcode_libdir_separator=:
case $host_cpu in
@@ -15692,7 +16096,7 @@ fi
*)
hardcode_direct=yes
hardcode_direct_absolute=yes
- export_dynamic_flag_spec='${wl}-E'
+ export_dynamic_flag_spec='$wl-E'
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
@@ -15703,8 +16107,8 @@ fi
;;
irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ if test yes = "$GCC"; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
# Try to use the -exported_symbol ld option, if it does not
# work, assume that -exports_file does not work either and
# implicitly export all symbols.
@@ -15714,8 +16118,8 @@ $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >
if ${lt_cv_irix_exported_symbol+:} false; then :
$as_echo_n "(cached) " >&6
else
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo (void) { return 0; }
@@ -15727,24 +16131,34 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- LDFLAGS="$save_LDFLAGS"
+ LDFLAGS=$save_LDFLAGS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
$as_echo "$lt_cv_irix_exported_symbol" >&6; }
- if test "$lt_cv_irix_exported_symbol" = yes; then
- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+ if test yes = "$lt_cv_irix_exported_symbol"; then
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
fi
else
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
fi
archive_cmds_need_lc='no'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
hardcode_libdir_separator=:
inherit_rpath=yes
link_all_deplibs=yes
;;
+ linux*)
+ case $cc_basename in
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ ld_shlibs=yes
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
netbsd*)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
@@ -15759,7 +16173,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
newsos6)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_direct=yes
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
hardcode_libdir_separator=:
hardcode_shlibpath_var=no
;;
@@ -15767,27 +16181,19 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
*nto* | *qnx*)
;;
- openbsd*)
+ openbsd* | bitrig*)
if test -f /usr/libexec/ld.so; then
hardcode_direct=yes
hardcode_shlibpath_var=no
hardcode_direct_absolute=yes
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- export_dynamic_flag_spec='${wl}-E'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+ export_dynamic_flag_spec='$wl-E'
else
- case $host_os in
- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- ;;
- *)
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- ;;
- esac
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
fi
else
ld_shlibs=no
@@ -15798,33 +16204,53 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
allow_undefined_flag=unsupported
- archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
- old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ shrext_cmds=.dll
+ archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ enable_shared_with_static_runtimes=yes
;;
osf3*)
- if test "$GCC" = yes; then
- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ if test yes = "$GCC"; then
+ allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
else
allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
fi
archive_cmds_need_lc='no'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
hardcode_libdir_separator=:
;;
osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test "$GCC" = yes; then
- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ if test yes = "$GCC"; then
+ allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+ archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
else
allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
- $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
# Both c and cxx compiler support -rpath directly
hardcode_libdir_flag_spec='-rpath $libdir'
@@ -15835,24 +16261,24 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
solaris*)
no_undefined_flag=' -z defs'
- if test "$GCC" = yes; then
- wlarc='${wl}'
- archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ if test yes = "$GCC"; then
+ wlarc='$wl'
+ archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
else
case `$CC -V 2>&1` in
*"Compilers 5.0"*)
wlarc=''
- archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
;;
*)
- wlarc='${wl}'
- archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ wlarc='$wl'
+ archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
;;
esac
fi
@@ -15862,11 +16288,11 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
# The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but understands '-z linker_flag'. GCC discards it without '$wl',
# but is careful enough not to reorder.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- if test "$GCC" = yes; then
- whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ if test yes = "$GCC"; then
+ whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
else
whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
fi
@@ -15876,10 +16302,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
;;
sunos4*)
- if test "x$host_vendor" = xsequent; then
+ if test sequent = "$host_vendor"; then
# Use $CC to link under sequent, because it throws in some extra .o
# files that make .init and .fini sections work.
- archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
else
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
fi
@@ -15928,43 +16354,43 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
;;
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
- no_undefined_flag='${wl}-z,text'
+ no_undefined_flag='$wl-z,text'
archive_cmds_need_lc=no
hardcode_shlibpath_var=no
runpath_var='LD_RUN_PATH'
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ if test yes = "$GCC"; then
+ archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
else
- archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
fi
;;
sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
+ # Note: We CANNOT use -z defs as we might desire, because we do not
# link with -lc, and that would cause any symbols used from libc to
# always be unresolved, which means just about no library would
# ever link correctly. If we're not using GNU ld we use -z text
# though, which does catch some bad symbols but isn't as heavy-handed
# as -z defs.
- no_undefined_flag='${wl}-z,text'
- allow_undefined_flag='${wl}-z,nodefs'
+ no_undefined_flag='$wl-z,text'
+ allow_undefined_flag='$wl-z,nodefs'
archive_cmds_need_lc=no
hardcode_shlibpath_var=no
- hardcode_libdir_flag_spec='${wl}-R,$libdir'
+ hardcode_libdir_flag_spec='$wl-R,$libdir'
hardcode_libdir_separator=':'
link_all_deplibs=yes
- export_dynamic_flag_spec='${wl}-Bexport'
+ export_dynamic_flag_spec='$wl-Bexport'
runpath_var='LD_RUN_PATH'
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ if test yes = "$GCC"; then
+ archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
else
- archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
fi
;;
@@ -15979,10 +16405,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
;;
esac
- if test x$host_vendor = xsni; then
+ if test sni = "$host_vendor"; then
case $host in
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- export_dynamic_flag_spec='${wl}-Blargedynsym'
+ export_dynamic_flag_spec='$wl-Blargedynsym'
;;
esac
fi
@@ -15990,7 +16416,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
$as_echo "$ld_shlibs" >&6; }
-test "$ld_shlibs" = no && can_build_shared=no
+test no = "$ld_shlibs" && can_build_shared=no
with_gnu_ld=$with_gnu_ld
@@ -16016,7 +16442,7 @@ x|xyes)
# Assume -lc should be added
archive_cmds_need_lc=yes
- if test "$enable_shared" = yes && test "$GCC" = yes; then
+ if test yes,yes = "$GCC,$enable_shared"; then
case $archive_cmds in
*'~'*)
# FIXME: we may have to deal with multi-command sequences.
@@ -16231,14 +16657,14 @@ esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
$as_echo_n "checking dynamic linker characteristics... " >&6; }
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
case $host_os in
- darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
- *) lt_awk_arg="/^libraries:/" ;;
+ darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
+ *) lt_awk_arg='/^libraries:/' ;;
esac
case $host_os in
- mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
- *) lt_sed_strip_eq="s,=/,/,g" ;;
+ mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
+ *) lt_sed_strip_eq='s|=/|/|g' ;;
esac
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
case $lt_search_path_spec in
@@ -16254,28 +16680,35 @@ if test "$GCC" = yes; then
;;
esac
# Ok, now we have the path, separated by spaces, we can step through it
- # and add multilib dir if necessary.
+ # and add multilib dir if necessary...
lt_tmp_lt_search_path_spec=
- lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ # ...but if some path component already ends with the multilib dir we assume
+ # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
+ case "$lt_multi_os_dir; $lt_search_path_spec " in
+ "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
+ lt_multi_os_dir=
+ ;;
+ esac
for lt_sys_path in $lt_search_path_spec; do
- if test -d "$lt_sys_path/$lt_multi_os_dir"; then
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
- else
+ if test -d "$lt_sys_path$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
+ elif test -n "$lt_multi_os_dir"; then
test -d "$lt_sys_path" && \
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
fi
done
lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
-BEGIN {RS=" "; FS="/|\n";} {
- lt_foo="";
- lt_count=0;
+BEGIN {RS = " "; FS = "/|\n";} {
+ lt_foo = "";
+ lt_count = 0;
for (lt_i = NF; lt_i > 0; lt_i--) {
if ($lt_i != "" && $lt_i != ".") {
if ($lt_i == "..") {
lt_count++;
} else {
if (lt_count == 0) {
- lt_foo="/" $lt_i lt_foo;
+ lt_foo = "/" $lt_i lt_foo;
} else {
lt_count--;
}
@@ -16289,7 +16722,7 @@ BEGIN {RS=" "; FS="/|\n";} {
# for these hosts.
case $host_os in
mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
- $SED 's,/\([A-Za-z]:\),\1,g'` ;;
+ $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
esac
sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
else
@@ -16298,7 +16731,7 @@ fi
library_names_spec=
libname_spec='lib$name'
soname_spec=
-shrext_cmds=".so"
+shrext_cmds=.so
postinstall_cmds=
postuninstall_cmds=
finish_cmds=
@@ -16315,14 +16748,16 @@ hardcode_into_libs=no
# flags to be left without arguments
need_version=unknown
+
+
case $host_os in
aix3*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
shlibpath_var=LIBPATH
# AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
+ soname_spec='$libname$release$shared_ext$major'
;;
aix[4-9]*)
@@ -16330,41 +16765,91 @@ aix[4-9]*)
need_lib_prefix=no
need_version=no
hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
else
# With GCC up to 2.95.x, collect2 would create an import file
# for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
+ # the line '#! .'. This would cause the generated library to
+ # depend on '.', always an invalid library. This was fixed in
# development snapshots of GCC prior to 3.0.
case $host_os in
aix4 | aix4.[01] | aix4.[01].*)
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
echo ' yes '
- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
:
else
can_build_shared=no
fi
;;
esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # Using Import Files as archive members, it is possible to support
+ # filename-based versioning of shared library archives on AIX. While
+ # this would work for both with and without runtime linking, it will
+ # prevent static linking of such archives. So we do filename-based
+ # shared library versioning with .so extension only, which is used
+ # when both runtime linking and shared linking is enabled.
+ # Unfortunately, runtime linking may impact performance, so we do
+ # not want this to be the default eventually. Also, we use the
+ # versioned .so libs for executables only if there is the -brtl
+ # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+ # To allow for filename-based versioning support, we need to create
+ # libNAME.so.V as an archive file, containing:
+ # *) an Import File, referring to the versioned filename of the
+ # archive as well as the shared archive member, telling the
+ # bitwidth (32 or 64) of that shared object, and providing the
+ # list of exported symbols of that shared object, eventually
+ # decorated with the 'weak' keyword
+ # *) the shared object with the F_LOADONLY flag set, to really avoid
+ # it being seen by the linker.
+ # At run time we better use the real file rather than another symlink,
+ # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+ case $with_aix_soname,$aix_use_runtimelinking in
+ # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
# soname into executable. Probably we can add versioning support to
# collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
+ aix,yes) # traditional libtool
+ dynamic_linker='AIX unversionable lib.so'
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
# instead of lib<name>.a to let people know that these are not
# typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ ;;
+ aix,no) # traditional AIX only
+ dynamic_linker='AIX lib.a(lib.so.V)'
# We preserve .a as extension for shared libraries through AIX4.2
# and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
- fi
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+ svr4,*) # full svr4 only
+ dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,yes) # both, prefer svr4
+ dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # unpreferred sharedlib libNAME.a needs extra handling
+ postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+ postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,no) # both, prefer aix
+ dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+ postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+ postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+ ;;
+ esac
shlibpath_var=LIBPATH
fi
;;
@@ -16374,18 +16859,18 @@ amigaos*)
powerpc)
# Since July 2007 AmigaOS4 officially supports .so libraries.
# When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
;;
m68k)
library_names_spec='$libname.ixlibrary $libname.a'
# Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
;;
esac
;;
beos*)
- library_names_spec='${libname}${shared_ext}'
+ library_names_spec='$libname$shared_ext'
dynamic_linker="$host_os ld.so"
shlibpath_var=LIBRARY_PATH
;;
@@ -16393,8 +16878,8 @@ beos*)
bsdi[45]*)
version_type=linux # correct to gnu/linux during the next big refactor
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -16406,7 +16891,7 @@ bsdi[45]*)
cygwin* | mingw* | pw32* | cegcc*)
version_type=windows
- shrext_cmds=".dll"
+ shrext_cmds=.dll
need_version=no
need_lib_prefix=no
@@ -16415,8 +16900,8 @@ cygwin* | mingw* | pw32* | cegcc*)
# gcc
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname~
@@ -16432,17 +16917,17 @@ cygwin* | mingw* | pw32* | cegcc*)
case $host_os in
cygwin*)
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
;;
mingw* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
;;
pw32*)
# pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
;;
esac
dynamic_linker='Win32 ld.exe'
@@ -16451,8 +16936,8 @@ cygwin* | mingw* | pw32* | cegcc*)
*,cl*)
# Native MSVC
libname_spec='$name'
- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- library_names_spec='${libname}.dll.lib'
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ library_names_spec='$libname.dll.lib'
case $build_os in
mingw*)
@@ -16479,7 +16964,7 @@ cygwin* | mingw* | pw32* | cegcc*)
sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
;;
*)
- sys_lib_search_path_spec="$LIB"
+ sys_lib_search_path_spec=$LIB
if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
# It is most probably a Windows format PATH.
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
@@ -16492,8 +16977,8 @@ cygwin* | mingw* | pw32* | cegcc*)
esac
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname'
@@ -16506,7 +16991,7 @@ cygwin* | mingw* | pw32* | cegcc*)
*)
# Assume MSVC wrapper
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
dynamic_linker='Win32 ld.exe'
;;
esac
@@ -16519,8 +17004,8 @@ darwin* | rhapsody*)
version_type=darwin
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
+ library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$major$shared_ext'
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
@@ -16533,8 +17018,8 @@ dgux*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -16552,12 +17037,13 @@ freebsd* | dragonfly*)
version_type=freebsd-$objformat
case $version_type in
freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
need_version=no
need_lib_prefix=no
;;
freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
need_version=yes
;;
esac
@@ -16582,26 +17068,15 @@ freebsd* | dragonfly*)
esac
;;
-gnu*)
- version_type=linux # correct to gnu/linux during the next big refactor
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
haiku*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
dynamic_linker="$host_os runtime_loader"
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LIBRARY_PATH
- shlibpath_overrides_runpath=yes
+ shlibpath_overrides_runpath=no
sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
hardcode_into_libs=yes
;;
@@ -16619,14 +17094,15 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.so"
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ if test 32 = "$HPUX_IA64_MODE"; then
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux32
else
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux64
fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
hppa*64*)
shrext_cmds='.sl'
@@ -16634,8 +17110,8 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.sl"
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
@@ -16644,8 +17120,8 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.sl"
shlibpath_var=SHLIB_PATH
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
;;
esac
# HP-UX runs *really* slowly unless shared libraries are mode 555, ...
@@ -16658,8 +17134,8 @@ interix[3-9]*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
@@ -16670,7 +17146,7 @@ irix5* | irix6* | nonstopux*)
case $host_os in
nonstopux*) version_type=nonstopux ;;
*)
- if test "$lt_cv_prog_gnu_ld" = yes; then
+ if test yes = "$lt_cv_prog_gnu_ld"; then
version_type=linux # correct to gnu/linux during the next big refactor
else
version_type=irix
@@ -16678,8 +17154,8 @@ irix5* | irix6* | nonstopux*)
esac
need_lib_prefix=no
need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
case $host_os in
irix5* | nonstopux*)
libsuff= shlibsuff=
@@ -16698,8 +17174,8 @@ irix5* | irix6* | nonstopux*)
esac
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+ sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
hardcode_into_libs=yes
;;
@@ -16708,13 +17184,33 @@ linux*oldld* | linux*aout* | linux*coff*)
dynamic_linker=no
;;
+linux*android*)
+ version_type=none # Android doesn't support versioned libraries.
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext'
+ soname_spec='$libname$release$shared_ext'
+ finish_cmds=
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ dynamic_linker='Android linker'
+ # Don't embed -rpath directories since the linker doesn't support them.
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+
# This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
@@ -16758,10 +17254,18 @@ fi
# before this can be enabled.
hardcode_into_libs=yes
- # Append ld.so.conf contents to the search path
+ # Add ABI-specific directories to the system library path.
+ sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
+ # Ideally, we could use ldconfig to report *all* directores which are
+ # searched for libraries, however this is still not possible. Aside from not
+ # being certain /sbin/ldconfig is available, command
+ # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+ # even though it is searched at run-time. Try to do the best guess by
+ # appending ld.so.conf contents (and includes) to the search path.
if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -16778,12 +17282,12 @@ netbsd*)
need_lib_prefix=no
need_version=no
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
dynamic_linker='NetBSD (a.out) ld.so'
else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
dynamic_linker='NetBSD ld.elf_so'
fi
shlibpath_var=LD_LIBRARY_PATH
@@ -16793,7 +17297,7 @@ netbsd*)
newsos6)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
;;
@@ -16802,58 +17306,68 @@ newsos6)
version_type=qnx
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
dynamic_linker='ldqnx.so'
;;
-openbsd*)
+openbsd* | bitrig*)
version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
+ sys_lib_dlsearch_path_spec=/usr/lib
need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[89] | openbsd2.[89].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ need_version=no
else
- shlibpath_overrides_runpath=yes
+ need_version=yes
fi
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
;;
os2*)
libname_spec='$name'
- shrext_cmds=".dll"
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
+ # OS/2 can only load a DLL with a base name of 8 characters or less.
+ soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+ v=$($ECHO $release$versuffix | tr -d .-);
+ n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+ $ECHO $n$v`$shared_ext'
+ library_names_spec='${libname}_dll.$libext'
dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
+ shlibpath_var=BEGINLIBPATH
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
;;
osf3* | osf4* | osf5*)
version_type=osf
need_lib_prefix=no
need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
rdos*)
@@ -16864,8 +17378,8 @@ solaris*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
@@ -16875,11 +17389,11 @@ solaris*)
sunos4*)
version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
+ if test yes = "$with_gnu_ld"; then
need_lib_prefix=no
fi
need_version=yes
@@ -16887,8 +17401,8 @@ sunos4*)
sysv4 | sysv4.3*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
case $host_vendor in
sni)
@@ -16909,24 +17423,24 @@ sysv4 | sysv4.3*)
;;
sysv4*MP*)
- if test -d /usr/nec ;then
+ if test -d /usr/nec; then
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
+ library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+ soname_spec='$libname$shared_ext.$major'
shlibpath_var=LD_LIBRARY_PATH
fi
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=freebsd-elf
+ version_type=sco
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
+ if test yes = "$with_gnu_ld"; then
sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
else
sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
@@ -16944,7 +17458,7 @@ tpf*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
@@ -16952,8 +17466,8 @@ tpf*)
uts4*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -16963,20 +17477,35 @@ uts4*)
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
$as_echo "$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
+test no = "$dynamic_linker" && can_build_shared=no
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
- sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+ sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
- sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+ sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
fi
+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
+
+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
+
+
+
+
+
+
@@ -17073,15 +17602,15 @@ $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
hardcode_action=
if test -n "$hardcode_libdir_flag_spec" ||
test -n "$runpath_var" ||
- test "X$hardcode_automatic" = "Xyes" ; then
+ test yes = "$hardcode_automatic"; then
# We can hardcode non-existent directories.
- if test "$hardcode_direct" != no &&
+ if test no != "$hardcode_direct" &&
# If the only mechanism to avoid hardcoding is shlibpath_var, we
# have to relink, otherwise we might link with an installed library
# when we should be linking with a yet-to-be-installed one
- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
- test "$hardcode_minus_L" != no; then
+ ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
+ test no != "$hardcode_minus_L"; then
# Linking always hardcodes the temporary library directory.
hardcode_action=relink
else
@@ -17096,12 +17625,12 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
$as_echo "$hardcode_action" >&6; }
-if test "$hardcode_action" = relink ||
- test "$inherit_rpath" = yes; then
+if test relink = "$hardcode_action" ||
+ test yes = "$inherit_rpath"; then
# Fast installation is not supported
enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
+elif test yes = "$shlibpath_overrides_runpath" ||
+ test no = "$enable_shared"; then
# Fast installation is not necessary
enable_fast_install=needless
fi
@@ -17111,7 +17640,7 @@ fi
- if test "x$enable_dlopen" != xyes; then
+ if test yes != "$enable_dlopen"; then
enable_dlopen=unknown
enable_dlopen_self=unknown
enable_dlopen_self_static=unknown
@@ -17121,23 +17650,23 @@ else
case $host_os in
beos*)
- lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen=load_add_on
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
;;
mingw* | pw32* | cegcc*)
- lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen=LoadLibrary
lt_cv_dlopen_libs=
;;
cygwin*)
- lt_cv_dlopen="dlopen"
+ lt_cv_dlopen=dlopen
lt_cv_dlopen_libs=
;;
darwin*)
- # if libdl is installed we need to link against it
+ # if libdl is installed we need to link against it
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
$as_echo_n "checking for dlopen in -ldl... " >&6; }
if ${ac_cv_lib_dl_dlopen+:} false; then :
@@ -17175,10 +17704,10 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
else
- lt_cv_dlopen="dyld"
+ lt_cv_dlopen=dyld
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
@@ -17186,10 +17715,18 @@ fi
;;
+ tpf*)
+ # Don't try to run any link tests for TPF. We know it's impossible
+ # because TPF is a cross-compiler, and we know how we open DSOs.
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=no
+ ;;
+
*)
ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
if test "x$ac_cv_func_shl_load" = xyes; then :
- lt_cv_dlopen="shl_load"
+ lt_cv_dlopen=shl_load
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
$as_echo_n "checking for shl_load in -ldld... " >&6; }
@@ -17228,11 +17765,11 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
- lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+ lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
else
ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
if test "x$ac_cv_func_dlopen" = xyes; then :
- lt_cv_dlopen="dlopen"
+ lt_cv_dlopen=dlopen
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
$as_echo_n "checking for dlopen in -ldl... " >&6; }
@@ -17271,7 +17808,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
$as_echo_n "checking for dlopen in -lsvld... " >&6; }
@@ -17310,7 +17847,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
$as_echo_n "checking for dld_link in -ldld... " >&6; }
@@ -17349,7 +17886,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
- lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+ lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
fi
@@ -17370,21 +17907,21 @@ fi
;;
esac
- if test "x$lt_cv_dlopen" != xno; then
- enable_dlopen=yes
- else
+ if test no = "$lt_cv_dlopen"; then
enable_dlopen=no
+ else
+ enable_dlopen=yes
fi
case $lt_cv_dlopen in
dlopen)
- save_CPPFLAGS="$CPPFLAGS"
- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+ save_CPPFLAGS=$CPPFLAGS
+ test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
- save_LDFLAGS="$LDFLAGS"
+ save_LDFLAGS=$LDFLAGS
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
- save_LIBS="$LIBS"
+ save_LIBS=$LIBS
LIBS="$lt_cv_dlopen_libs $LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
@@ -17392,7 +17929,7 @@ $as_echo_n "checking whether a program can dlopen itself... " >&6; }
if ${lt_cv_dlopen_self+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
+ if test yes = "$cross_compiling"; then :
lt_cv_dlopen_self=cross
else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
@@ -17439,9 +17976,9 @@ else
# endif
#endif
-/* When -fvisbility=hidden is used, assume the code has been annotated
+/* When -fvisibility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
-#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
int fnord () __attribute__((visibility("default")));
#endif
@@ -17471,7 +18008,7 @@ _LT_EOF
(eval $ac_link) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
case x$lt_status in
@@ -17491,14 +18028,14 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
$as_echo "$lt_cv_dlopen_self" >&6; }
- if test "x$lt_cv_dlopen_self" = xyes; then
+ if test yes = "$lt_cv_dlopen_self"; then
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
if ${lt_cv_dlopen_self_static+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
+ if test yes = "$cross_compiling"; then :
lt_cv_dlopen_self_static=cross
else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
@@ -17545,9 +18082,9 @@ else
# endif
#endif
-/* When -fvisbility=hidden is used, assume the code has been annotated
+/* When -fvisibility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
-#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
int fnord () __attribute__((visibility("default")));
#endif
@@ -17577,7 +18114,7 @@ _LT_EOF
(eval $ac_link) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
case x$lt_status in
@@ -17598,9 +18135,9 @@ fi
$as_echo "$lt_cv_dlopen_self_static" >&6; }
fi
- CPPFLAGS="$save_CPPFLAGS"
- LDFLAGS="$save_LDFLAGS"
- LIBS="$save_LIBS"
+ CPPFLAGS=$save_CPPFLAGS
+ LDFLAGS=$save_LDFLAGS
+ LIBS=$save_LIBS
;;
esac
@@ -17644,7 +18181,7 @@ else
# FIXME - insert some real tests, host_os isn't really good enough
case $host_os in
darwin*)
- if test -n "$STRIP" ; then
+ if test -n "$STRIP"; then
striplib="$STRIP -x"
old_striplib="$STRIP -S"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -17672,7 +18209,7 @@ fi
- # Report which library types will actually be built
+ # Report what library types will actually be built
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
$as_echo_n "checking if libtool supports shared libraries... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
@@ -17680,13 +18217,13 @@ $as_echo "$can_build_shared" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
$as_echo_n "checking whether to build shared libraries... " >&6; }
- test "$can_build_shared" = "no" && enable_shared=no
+ test no = "$can_build_shared" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
# are all built from PIC.
case $host_os in
aix3*)
- test "$enable_shared" = yes && enable_static=no
+ test yes = "$enable_shared" && enable_static=no
if test -n "$RANLIB"; then
archive_cmds="$archive_cmds~\$RANLIB \$lib"
postinstall_cmds='$RANLIB $lib'
@@ -17694,8 +18231,12 @@ $as_echo_n "checking whether to build shared libraries... " >&6; }
;;
aix[4-9]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
+ if test ia64 != "$host_cpu"; then
+ case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+ yes,aix,yes) ;; # shared object as lib.so file only
+ yes,svr4,*) ;; # shared object as lib.so archive member only
+ yes,*) enable_static=no ;; # shared object in lib.a archive as well
+ esac
fi
;;
esac
@@ -17705,7 +18246,7 @@ $as_echo "$enable_shared" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
$as_echo_n "checking whether to build static libraries... " >&6; }
# Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
+ test yes = "$enable_shared" || enable_static=yes
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
$as_echo "$enable_static" >&6; }
@@ -17719,7 +18260,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-CC="$lt_save_CC"
+CC=$lt_save_CC
@@ -17756,8 +18297,6 @@ esac
# Check whether --with-installbuilddir was given.
if test "${with_installbuilddir+set}" = set; then :
withval=$with_installbuilddir; installbuilddir=$withval
-else
- installbuilddir="${datadir}/build-${APR_MAJOR_VERSION}"
fi
@@ -17955,6 +18494,31 @@ if test "${enable_maintainer_mode+set}" = set; then :
done
fi
+ case `($CC --version) 2>/dev/null` in
+ *clang-900* | *"clang version 5.0.0"*)
+
+ if test "x$CFLAGS" = "x"; then
+ test "x$silent" != "xyes" && echo " setting CFLAGS to \"-Wno-error=strict-prototypes\""
+ CFLAGS="-Wno-error=strict-prototypes"
+ else
+ apr_addto_bugger="-Wno-error=strict-prototypes"
+ for i in $apr_addto_bugger; do
+ apr_addto_duplicate="0"
+ for j in $CFLAGS; do
+ if test "x$i" = "x$j"; then
+ apr_addto_duplicate="1"
+ break
+ fi
+ done
+ if test $apr_addto_duplicate = "0"; then
+ test "x$silent" != "xyes" && echo " adding \"$i\" to CFLAGS"
+ CFLAGS="$CFLAGS $i"
+ fi
+ done
+ fi
+
+ ;;
+ esac
elif test "$AIX_XLC" = "yes"; then
if test "x$CFLAGS" = "x"; then
@@ -18651,6 +19215,11 @@ $as_echo "#define HAVE_BONE_VERSION 1" >>confdefs.h
;;
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)'
@@ -18678,6 +19247,11 @@ $as_echo "#define HAVE_BONE_VERSION 1" >>confdefs.h
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"
@@ -20292,6 +20866,87 @@ fi
fi
+
+# Check whether --with-valgrind was given.
+if test "${with_valgrind+set}" = set; then :
+ withval=$with_valgrind; if test "$withval" != no; then
+ if test "$withval" = yes; then
+ withval=/usr/include/valgrind
+ fi
+
+ if test "x$CPPFLAGS" = "x"; then
+ test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-I$withval\""
+ CPPFLAGS="-I$withval"
+ else
+ apr_addto_bugger="-I$withval"
+ for i in $apr_addto_bugger; do
+ apr_addto_duplicate="0"
+ for j in $CPPFLAGS; do
+ if test "x$i" = "x$j"; then
+ apr_addto_duplicate="1"
+ break
+ fi
+ done
+ if test $apr_addto_duplicate = "0"; then
+ test "x$silent" != "xyes" && echo " adding \"$i\" to CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $i"
+ fi
+ done
+ fi
+
+ for ac_header in valgrind.h memcheck.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ ac_rc=yes
+for ac_spec in header:valgrind.h header:memcheck.h; do
+ ac_type=`echo "$ac_spec" | sed -e 's/:.*$//'`
+ ac_item=`echo "$ac_spec" | sed -e 's/^.*://'`
+ case $ac_type in
+ header )
+ ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
+ ac_var="ac_cv_header_$ac_item"
+ ;;
+ file )
+ ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
+ ac_var="ac_cv_file_$ac_item"
+ ;;
+ func ) ac_var="ac_cv_func_$ac_item" ;;
+ struct ) ac_var="ac_cv_struct_$ac_item" ;;
+ define ) ac_var="ac_cv_define_$ac_item" ;;
+ custom ) ac_var="$ac_item" ;;
+ esac
+ eval "ac_val=\$$ac_var"
+ if test ".$ac_val" != .yes; then
+ ac_rc=no
+ break
+ fi
+done
+if test ".$ac_rc" = .yes; then
+ :
+
+$as_echo "#define HAVE_VALGRIND 1" >>confdefs.h
+
+else
+ :
+ as_fn_error $? "valgrind headers not found" "$LINENO" 5
+
+fi
+
+ fi
+
+fi
+
+
for ac_func in sigsuspend
do :
ac_fn_c_check_func "$LINENO" "sigsuspend" "ac_cv_func_sigsuspend"
@@ -20921,7 +21576,8 @@ case $host in
#endif";;
esac
-for ac_header in 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
+for ac_header in 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
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -20934,8 +21590,26 @@ fi
done
+for ac_header in net/if.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#include <net/if.h>
+
+"
+if test "x$ac_cv_header_net_if_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_NET_IF_H 1
+_ACEOF
+
+fi
+
+done
+
for ac_func in mmap munmap shm_open shm_unlink shmget shmat shmdt shmctl \
- create_area
+ create_area mprotect
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -22911,6 +23585,61 @@ fi
fi
+# Check whether --enable-allocator-guard-pages was given.
+if test "${enable_allocator_guard_pages+set}" = set; then :
+ enableval=$enable_allocator_guard_pages; if test "$enableval" = "yes"; then
+ ac_rc=yes
+for ac_spec in header:sys/mman.h func:mmap func:munmap func:mprotect define:MAP_ANON; do
+ ac_type=`echo "$ac_spec" | sed -e 's/:.*$//'`
+ ac_item=`echo "$ac_spec" | sed -e 's/^.*://'`
+ case $ac_type in
+ header )
+ ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
+ ac_var="ac_cv_header_$ac_item"
+ ;;
+ file )
+ ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
+ ac_var="ac_cv_file_$ac_item"
+ ;;
+ func ) ac_var="ac_cv_func_$ac_item" ;;
+ struct ) ac_var="ac_cv_struct_$ac_item" ;;
+ define ) ac_var="ac_cv_define_$ac_item" ;;
+ custom ) ac_var="$ac_item" ;;
+ esac
+ eval "ac_val=\$$ac_var"
+ if test ".$ac_val" != .yes; then
+ ac_rc=no
+ break
+ fi
+done
+if test ".$ac_rc" = .yes; then
+ :
+
+$as_echo "#define APR_ALLOCATOR_GUARD_PAGES 1" >>confdefs.h
+
+else
+ :
+ as_fn_error $? "mmap()/MAP_ANON/mprotect() not supported" "$LINENO" 5
+
+fi
+
+ fi
+
+fi
+
+
+
+# Check whether --enable-pool-concurrency-check was given.
+if test "${enable_pool_concurrency_check+set}" = set; then :
+ enableval=$enable_pool_concurrency_check; if test "$enableval" = "yes"; then
+
+$as_echo "#define APR_POOL_CONCURRENCY_CHECK 1" >>confdefs.h
+
+ fi
+
+fi
+
+
ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
if test "x$ac_cv_type_off_t" = xyes; then :
@@ -28253,6 +28982,58 @@ fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_un" >&5
+$as_echo_n "checking for sockaddr_un... " >&6; }
+if ${ac_cv_define_sockaddr_un+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_SYS_UN_H
+#include <sys/un.h>
+#endif
+
+int
+main ()
+{
+
+struct sockaddr_un sa;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ ac_cv_define_sockaddr_un=yes
+
+else
+
+ ac_cv_define_sockaddr_un=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_define_sockaddr_un" >&5
+$as_echo "$ac_cv_define_sockaddr_un" >&6; }
+
+if test "$ac_cv_define_sockaddr_un" = "yes"; then
+ have_sockaddr_un=1
+else
+ have_sockaddr_un=0
+fi
+
+
+
have_ipv6="0"
if test "$user_disabled_ipv6" = 1; then
ipv6_result="no -- disabled by user"
@@ -29346,6 +30127,7 @@ enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
+shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
@@ -29393,10 +30175,13 @@ compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
@@ -29461,7 +30246,8 @@ finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
-sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
+configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
+configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
@@ -29513,9 +30299,12 @@ CFLAGS \
compiler \
lt_cv_sys_global_symbol_pipe \
lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_import \
lt_cv_sys_global_symbol_to_c_name_address \
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+lt_cv_nm_interface \
nm_file_list_spec \
+lt_cv_truncate_bin \
lt_prog_compiler_no_builtin_flag \
lt_prog_compiler_pic \
lt_prog_compiler_wl \
@@ -29550,7 +30339,7 @@ old_striplib \
striplib; do
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
*[\\\\\\\`\\"\\\$]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
;;
*)
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -29577,10 +30366,11 @@ postinstall_cmds \
postuninstall_cmds \
finish_cmds \
sys_lib_search_path_spec \
-sys_lib_dlsearch_path_spec; do
+configure_time_dlsearch_path \
+configure_time_lt_sys_library_path; do
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
*[\\\\\\\`\\"\\\$]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
;;
*)
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -29589,19 +30379,16 @@ sys_lib_dlsearch_path_spec; do
done
ac_aux_dir='$ac_aux_dir'
-xsi_shell='$xsi_shell'
-lt_shell_append='$lt_shell_append'
-# See if we are running on zsh, and set the options which allow our
+# See if we are running on zsh, and set the options that allow our
# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
+if test -n "\${ZSH_VERSION+set}"; then
setopt NO_GLOB_SUBST
fi
PACKAGE='$PACKAGE'
VERSION='$VERSION'
- TIMESTAMP='$TIMESTAMP'
RM='$RM'
ofile='$ofile'
@@ -30195,55 +30982,53 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
case $ac_file$ac_mode in
"libtool":C)
- # See if we are running on zsh, and set the options which allow our
+ # See if we are running on zsh, and set the options that allow our
# commands through without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
+ if test -n "${ZSH_VERSION+set}"; then
setopt NO_GLOB_SUBST
fi
- cfgfile="${ofile}T"
+ cfgfile=${ofile}T
trap "$RM \"$cfgfile\"; exit 1" 1 2 15
$RM "$cfgfile"
cat <<_LT_EOF >> "$cfgfile"
#! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Generated automatically by $as_me ($PACKAGE) $VERSION
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit, 1996
+
+# Copyright (C) 2014 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of of the License, or
+# (at your option) any later version.
#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
-# Written by Gordon Matzigkeit, 1996
-#
-# This file is part of GNU Libtool.
-#
-# GNU Libtool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program or library that is built
+# using GNU Libtool, you may include this file under the same
+# distribution terms that you use for the rest of that program.
#
-# GNU Libtool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# The names of the tagged configurations supported by this script.
-available_tags=""
+available_tags=''
+
+# Configured defaults for sys_lib_dlsearch_path munging.
+: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
# ### BEGIN LIBTOOL CONFIG
@@ -30272,6 +31057,9 @@ pic_mode=$pic_mode
# Whether or not to optimize for fast installation.
fast_install=$enable_fast_install
+# Shared archive member basename,for filename based shared library versioning on AIX.
+shared_archive_member_spec=$shared_archive_member_spec
+
# Shell to use when invoking shell scripts.
SHELL=$lt_SHELL
@@ -30383,18 +31171,27 @@ global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
# Transform the output of nm in a proper C declaration.
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+# Transform the output of nm into a list of symbols to manually relocate.
+global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
+
# Transform the output of nm in a C name address pair.
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
# Transform the output of nm in a C name address pair when lib prefix is needed.
global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+# The name lister interface.
+nm_interface=$lt_lt_cv_nm_interface
+
# Specify filename containing input files for \$NM.
nm_file_list_spec=$lt_nm_file_list_spec
-# The root where to search for dependent libraries,and in which our libraries should be installed.
+# The root where to search for dependent libraries,and where our libraries should be installed.
lt_sysroot=$lt_sysroot
+# Command to truncate a binary pipe.
+lt_truncate_bin=$lt_lt_cv_truncate_bin
+
# The name of the directory that contains temporary libtool files.
objdir=$objdir
@@ -30485,8 +31282,11 @@ hardcode_into_libs=$hardcode_into_libs
# Compile-time system search path for libraries.
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-# Run-time system search path for libraries.
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+# Detected run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
+
+# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
+configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
# Whether dlopen is supported.
dlopen_support=$enable_dlopen
@@ -30579,13 +31379,13 @@ hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
# Whether we need a single "-rpath" flag with a separated argument.
hardcode_libdir_separator=$lt_hardcode_libdir_separator
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
# DIR into the resulting binary.
hardcode_direct=$hardcode_direct
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# "absolute",i.e impossible to change by setting \$shlibpath_var if the
# library is relocated.
hardcode_direct_absolute=$hardcode_direct_absolute
@@ -30637,13 +31437,72 @@ hardcode_action=$hardcode_action
_LT_EOF
+ cat <<'_LT_EOF' >> "$cfgfile"
+
+# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
+
+# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+# string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+# string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+# "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+# VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+ case x$2 in
+ x)
+ ;;
+ *:)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
+ ;;
+ x:*)
+ eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ *::*)
+ eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+ eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
+ ;;
+ *)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ esac
+}
+
+
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+ for cc_temp in $*""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+ done
+ func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+
+
+# ### END FUNCTIONS SHARED WITH CONFIGURE
+
+_LT_EOF
+
case $host_os in
aix3*)
cat <<\_LT_EOF >> "$cfgfile"
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
+if test set != "${COLLECT_NAMES+set}"; then
COLLECT_NAMES=
export COLLECT_NAMES
fi
@@ -30652,7 +31511,7 @@ _LT_EOF
esac
-ltmain="$ac_aux_dir/ltmain.sh"
+ltmain=$ac_aux_dir/ltmain.sh
# We use sed instead of cat because bash on DJGPP gets confused if
@@ -30662,165 +31521,6 @@ ltmain="$ac_aux_dir/ltmain.sh"
sed '$q' "$ltmain" >> "$cfgfile" \
|| (rm -f "$cfgfile"; exit 1)
- if test x"$xsi_shell" = xyes; then
- sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
-func_dirname ()\
-{\
-\ case ${1} in\
-\ */*) func_dirname_result="${1%/*}${2}" ;;\
-\ * ) func_dirname_result="${3}" ;;\
-\ esac\
-} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_basename ()$/,/^} # func_basename /c\
-func_basename ()\
-{\
-\ func_basename_result="${1##*/}"\
-} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
-func_dirname_and_basename ()\
-{\
-\ case ${1} in\
-\ */*) func_dirname_result="${1%/*}${2}" ;;\
-\ * ) func_dirname_result="${3}" ;;\
-\ esac\
-\ func_basename_result="${1##*/}"\
-} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
-func_stripname ()\
-{\
-\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
-\ # positional parameters, so assign one to ordinary parameter first.\
-\ func_stripname_result=${3}\
-\ func_stripname_result=${func_stripname_result#"${1}"}\
-\ func_stripname_result=${func_stripname_result%"${2}"}\
-} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
-func_split_long_opt ()\
-{\
-\ func_split_long_opt_name=${1%%=*}\
-\ func_split_long_opt_arg=${1#*=}\
-} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
-func_split_short_opt ()\
-{\
-\ func_split_short_opt_arg=${1#??}\
-\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
-} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
-func_lo2o ()\
-{\
-\ case ${1} in\
-\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
-\ *) func_lo2o_result=${1} ;;\
-\ esac\
-} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_xform ()$/,/^} # func_xform /c\
-func_xform ()\
-{\
- func_xform_result=${1%.*}.lo\
-} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_arith ()$/,/^} # func_arith /c\
-func_arith ()\
-{\
- func_arith_result=$(( $* ))\
-} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_len ()$/,/^} # func_len /c\
-func_len ()\
-{\
- func_len_result=${#1}\
-} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-fi
-
-if test x"$lt_shell_append" = xyes; then
- sed -e '/^func_append ()$/,/^} # func_append /c\
-func_append ()\
-{\
- eval "${1}+=\\${2}"\
-} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
-func_append_quoted ()\
-{\
-\ func_quote_for_eval "${2}"\
-\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
-} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- # Save a `func_append' function call where possible by direct use of '+='
- sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
- test 0 -eq $? || _lt_function_replace_fail=:
-else
- # Save a `func_append' function call even when '+=' is not available
- sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
- test 0 -eq $? || _lt_function_replace_fail=:
-fi
-
-if test x"$_lt_function_replace_fail" = x":"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
-$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
-fi
-
-
mv -f "$cfgfile" "$ofile" ||
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
diff --git a/configure.in b/configure.in
index e01774be18a4..be6777f7b20b 100644
--- a/configure.in
+++ b/configure.in
@@ -272,8 +272,8 @@ AC_PROG_LIBTOOL
;;
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 +346,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 +551,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 +583,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"
@@ -846,6 +861,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 +1162,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)
@@ -1581,6 +1620,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
@@ -2695,6 +2755,7 @@ 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
diff --git a/docs/APRDesign.html b/docs/APRDesign.html
index 7d1caeb8d4e3..0d6d6a5682e9 100644
--- a/docs/APRDesign.html
+++ b/docs/APRDesign.html
@@ -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
diff --git a/docs/canonical_filenames.html b/docs/canonical_filenames.html
index 2bd9bdba822b..c1c03b1d5434 100644
--- a/docs/canonical_filenames.html
+++ b/docs/canonical_filenames.html
@@ -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>
diff --git a/docs/incomplete_types b/docs/incomplete_types
index cbed7774232d..08b0c0a522e3 100644
--- a/docs/incomplete_types
+++ b/docs/incomplete_types
@@ -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,
diff --git a/docs/pool-design.html b/docs/pool-design.html
index 90d845257c1a..46b63d62b2b2 100644
--- a/docs/pool-design.html
+++ b/docs/pool-design.html
@@ -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>
diff --git a/encoding/apr_escape.c b/encoding/apr_escape.c
index 702a94130089..3be9eb99ec10 100644
--- a/encoding/apr_escape.c
+++ b/encoding/apr_escape.c
@@ -1181,3 +1181,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;
+}
+
diff --git a/file_io/unix/copy.c b/file_io/unix/copy.c
index df3a49c8209e..7f74d30c16b8 100644
--- a/file_io/unix/copy.c
+++ b/file_io/unix/copy.c
@@ -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;
diff --git a/file_io/unix/flock.c b/file_io/unix/flock.c
index f400a96701db..01e8a639ba91 100644
--- a/file_io/unix/flock.c
+++ b/file_io/unix/flock.c
@@ -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;
diff --git a/file_io/unix/pipe.c b/file_io/unix/pipe.c
index 571d9bcb8e99..7be16e5d0a1b 100644
--- a/file_io/unix/pipe.c
+++ b/file_io/unix/pipe.c
@@ -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;
}
diff --git a/file_io/unix/readwrite.c b/file_io/unix/readwrite.c
index 7044300c17c1..0759495affb9 100644
--- a/file_io/unix/readwrite.c
+++ b/file_io/unix/readwrite.c
@@ -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
diff --git a/file_io/unix/seek.c b/file_io/unix/seek.c
index 3f5aa00e9567..2e973377bf84 100644
--- a/file_io/unix/seek.c
+++ b/file_io/unix/seek.c
@@ -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;
diff --git a/include/apr.h.in b/include/apr.h.in
index 0ad7a91aff3a..4d188853b259 100644
--- a/include/apr.h.in
+++ b/include/apr.h.in
@@ -245,6 +245,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@
diff --git a/include/apr.hnw b/include/apr.hnw
index d0c77e00e408..540263126092 100644
--- a/include/apr.hnw
+++ b/include/apr.hnw
@@ -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
diff --git a/include/apr.hw b/include/apr.hw
index a75bc602943d..300b2c8af0b5 100644
--- a/include/apr.hw
+++ b/include/apr.hw
@@ -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
@@ -354,7 +374,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 +646,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 */
diff --git a/include/apr.hwc b/include/apr.hwc
index 05799629508a..5f025bdd2db8 100644
--- a/include/apr.hwc
+++ b/include/apr.hwc
@@ -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
@@ -351,7 +371,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 +643,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 */
diff --git a/include/apr_allocator.h b/include/apr_allocator.h
index 70d31efa0f59..be05d0e4f382 100644
--- a/include/apr_allocator.h
+++ b/include/apr_allocator.h
@@ -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"
diff --git a/include/apr_atomic.h b/include/apr_atomic.h
index 60e4bb54d0ea..7ea257123ae2 100644
--- a/include/apr_atomic.h
+++ b/include/apr_atomic.h
@@ -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);
diff --git a/include/apr_cstr.h b/include/apr_cstr.h
new file mode 100644
index 000000000000..3f1b1a0995a6
--- /dev/null
+++ b/include/apr_cstr.h
@@ -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 */
diff --git a/include/apr_errno.h b/include/apr_errno.h
index 58eaf73cc5ae..8fa6628b98d2 100644
--- a/include/apr_errno.h
+++ b/include/apr_errno.h
@@ -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) */
diff --git a/include/apr_escape.h b/include/apr_escape.h
index 5b60ac6eee21..428a8cb6bd88 100644
--- a/include/apr_escape.h
+++ b/include/apr_escape.h
@@ -40,7 +40,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 +223,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 +242,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 +381,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
}
diff --git a/include/apr_file_info.h b/include/apr_file_info.h
index 1d19eb6a3f49..cfddc68da8b1 100644
--- a/include/apr_file_info.h
+++ b/include/apr_file_info.h
@@ -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);
diff --git a/include/apr_file_io.h b/include/apr_file_io.h
index eb683afa7456..af931939abb3 100644
--- a/include/apr_file_io.h
+++ b/include/apr_file_io.h
@@ -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,6 +723,7 @@ 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,
@@ -726,6 +731,33 @@ APR_DECLARE(apr_status_t) apr_file_pipe_create_ex(apr_file_t **in,
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
* @param perm The permissions for the newly created pipe.
diff --git a/include/apr_general.h b/include/apr_general.h
index c7389ec92969..fa073c859f54 100644
--- a/include/apr_general.h
+++ b/include/apr_general.h
@@ -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);
diff --git a/include/apr_global_mutex.h b/include/apr_global_mutex.h
index db1930134008..90d9c55b0484 100644
--- a/include/apr_global_mutex.h
+++ b/include/apr_global_mutex.h
@@ -127,14 +127,25 @@ 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 +166,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
diff --git a/include/apr_hash.h b/include/apr_hash.h
index 37d972f9dd7d..2276f84c3b07 100644
--- a/include/apr_hash.h
+++ b/include/apr_hash.h
@@ -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);
diff --git a/include/apr_network_io.h b/include/apr_network_io.h
index 0d34a8458e46..43e578aca47e 100644
--- a/include/apr_network_io.h
+++ b/include/apr_network_io.h
@@ -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
* @{
@@ -247,6 +273,10 @@ struct apr_sockaddr_t {
* 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.
@@ -401,6 +432,16 @@ APR_DECLARE(apr_status_t) apr_sockaddr_info_get(apr_sockaddr_t **sa,
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);
+
+/**
* Look up the host name from an apr_sockaddr_t.
* @param hostname The hostname.
* @param sa The apr_sockaddr_t.
@@ -620,6 +661,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.
*/
@@ -807,6 +849,11 @@ APR_DECLARE_INHERIT_SET(socket);
APR_DECLARE_INHERIT_UNSET(socket);
/**
+ * Set socket permissions.
+ */
+APR_PERMS_SET_IMPLEMENT(socket);
+
+/**
* @defgroup apr_mcast IP Multicast
* @{
*/
diff --git a/include/apr_perms_set.h b/include/apr_perms_set.h
new file mode 100644
index 000000000000..92a1362b8e57
--- /dev/null
+++ b/include/apr_perms_set.h
@@ -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 */
diff --git a/include/apr_poll.h b/include/apr_poll.h
index 1381ddd13830..482d6ee1db7e 100644
--- a/include/apr_poll.h
+++ b/include/apr_poll.h
@@ -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);
/** @} */
diff --git a/include/apr_portable.h b/include/apr_portable.h
index 45d53eb15422..f56997e4d187 100644
--- a/include/apr_portable.h
+++ b/include/apr_portable.h
@@ -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,7 +248,7 @@ 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.
*/
@@ -249,6 +256,19 @@ 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
* @param aprtime the time to convert
@@ -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.
@@ -416,6 +439,24 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_put(apr_proc_mutex_t **pmutex,
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
* @param ostime the time to convert
@@ -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);
diff --git a/include/apr_proc_mutex.h b/include/apr_proc_mutex.h
index ceb9c82a8dc9..bb5b34f0c08c 100644
--- a/include/apr_proc_mutex.h
+++ b/include/apr_proc_mutex.h
@@ -25,6 +25,7 @@
#include "apr.h"
#include "apr_pools.h"
#include "apr_errno.h"
+#include "apr_perms_set.h"
#ifdef __cplusplus
extern "C" {
@@ -140,9 +141,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);
@@ -152,6 +160,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
*/
diff --git a/include/apr_shm.h b/include/apr_shm.h
index 49543bb01946..635c654b17fe 100644
--- a/include/apr_shm.h
+++ b/include/apr_shm.h
@@ -25,6 +25,7 @@
#include "apr.h"
#include "apr_pools.h"
#include "apr_errno.h"
+#include "apr_perms_set.h"
#ifdef __cplusplus
extern "C" {
@@ -136,6 +137,21 @@ 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.
*/
@@ -195,6 +211,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.
*/
APR_POOL_DECLARE_ACCESSOR(shm);
diff --git a/include/apr_skiplist.h b/include/apr_skiplist.h
index f56ff22c36d6..eeab10bf9f44 100644
--- a/include/apr_skiplist.h
+++ b/include/apr_skiplist.h
@@ -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 *);
@@ -155,6 +153,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
* @param iter On entry, a pointer to the skip list node to start with; on return,
@@ -173,6 +195,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.
* @param sl The skip list
@@ -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
@@ -193,6 +221,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.
* @param sl The skip list
@@ -248,6 +332,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
* @param sl2 The other of two skip lists to be merged
diff --git a/include/apr_strings.h b/include/apr_strings.h
index c0642adb2113..d5f8719d2dc5 100644
--- a/include/apr_strings.h
+++ b/include/apr_strings.h
@@ -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))
diff --git a/include/apr_tables.h b/include/apr_tables.h
index 194af02f2f09..27974c0e8ca7 100644
--- a/include/apr_tables.h
+++ b/include/apr_tables.h
@@ -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 ", ".
*/
diff --git a/include/apr_thread_proc.h b/include/apr_thread_proc.h
index e721ede9e96a..6b171e9ab639 100644
--- a/include/apr_thread_proc.h
+++ b/include/apr_thread_proc.h
@@ -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
diff --git a/include/apr_version.h b/include/apr_version.h
index c7cbb8f60d5f..3dfbe0e07fdc 100644
--- a/include/apr_version.h
+++ b/include/apr_version.h
@@ -38,7 +38,7 @@
*/
-#define APR_COPYRIGHT "Copyright (c) 2000-2015 The Apache Software " \
+#define APR_COPYRIGHT "Copyright (c) 2000-2018 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 6
/** 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 5
/**
* 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
diff --git a/include/arch/unix/apr_arch_networkio.h b/include/arch/unix/apr_arch_networkio.h
index 91018f7c6bd0..5f3189d96665 100644
--- a/include/arch/unix/apr_arch_networkio.h
+++ b/include/arch/unix/apr_arch_networkio.h
@@ -111,6 +111,9 @@ struct apr_socket_t {
#ifndef HAVE_POLL
int connected;
#endif
+#if APR_HAVE_SOCKADDR_UN
+ int bound;
+#endif
int local_port_unknown;
int local_interface_unknown;
int remote_addr_unknown;
diff --git a/include/arch/unix/apr_arch_poll_private.h b/include/arch/unix/apr_arch_poll_private.h
index 2dd7b1fd6fbe..ff8131231349 100644
--- a/include/arch/unix/apr_arch_poll_private.h
+++ b/include/arch/unix/apr_arch_poll_private.h
@@ -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 */
diff --git a/include/arch/unix/apr_arch_proc_mutex.h b/include/arch/unix/apr_arch_proc_mutex.h
index ec9796bc9d47..af49c17031f4 100644
--- a/include/arch/unix/apr_arch_proc_mutex.h
+++ b/include/arch/unix/apr_arch_proc_mutex.h
@@ -62,9 +62,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 {
@@ -75,6 +72,8 @@ struct apr_proc_mutex_unix_lock_methods_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 +92,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
};
diff --git a/include/arch/unix/apr_arch_shm.h b/include/arch/unix/apr_arch_shm.h
index bbd373e36328..e9d25cadb404 100644
--- a/include/arch/unix/apr_arch_shm.h
+++ b/include/arch/unix/apr_arch_shm.h
@@ -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
};
diff --git a/include/arch/unix/apr_arch_threadproc.h b/include/arch/unix/apr_arch_threadproc.h
index a61830f6ee8c..7a3b3c0925b5 100644
--- a/include/arch/unix/apr_arch_threadproc.h
+++ b/include/arch/unix/apr_arch_threadproc.h
@@ -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 */
diff --git a/include/arch/unix/apr_private.h.in b/include/arch/unix/apr_private.h.in
index 12af027472ec..c794b1962ec3 100644
--- a/include/arch/unix/apr_private.h.in
+++ b/include/arch/unix/apr_private.h.in
@@ -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.
*/
@@ -274,6 +280,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 +304,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 +328,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
@@ -688,6 +703,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 +727,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 */
diff --git a/libapr.dsp b/libapr.dsp
index 267883227dd2..3df0ca2637cf 100644
--- a/libapr.dsp
+++ b/libapr.dsp
@@ -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
@@ -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
@@ -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"
@@ -490,6 +422,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 +460,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 +633,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 +702,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
diff --git a/libapr.mak b/libapr.mak
index 8966d18f8eeb..a643f45d31fe 100644
--- a/libapr.mak
+++ b/libapr.mak
@@ -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
@@ -44,6 +42,7 @@ ALL : ".\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_cpstr.obj"
-@erase "$(INTDIR)\apr_escape.obj"
-@erase "$(INTDIR)\apr_fnmatch.obj"
-@erase "$(INTDIR)\apr_getpass.obj"
@@ -117,6 +116,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"
@@ -229,6 +229,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 +246,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)
@@ -280,6 +282,7 @@ ALL : ".\include\apr_escape_test_char.h" ".\Debug\gen_test_char.exe" "$(OUTDIR)\
CLEAN :
-@erase "$(INTDIR)\apr_atomic.obj"
-@erase "$(INTDIR)\apr_cpystrn.obj"
+ -@erase "$(INTDIR)\apr_cpstr.obj"
-@erase "$(INTDIR)\apr_escape.obj"
-@erase "$(INTDIR)\apr_fnmatch.obj"
-@erase "$(INTDIR)\apr_getpass.obj"
@@ -353,6 +356,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"
@@ -465,6 +469,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 +486,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 +507,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
@@ -988,6 +522,7 @@ ALL : ".\x64\Release\gen_test_char.exe" ".\include\apr_escape_test_char.h" "$(OU
CLEAN :
-@erase "$(INTDIR)\apr_atomic.obj"
-@erase "$(INTDIR)\apr_cpystrn.obj"
+ -@erase "$(INTDIR)\apr_cpstr.obj"
-@erase "$(INTDIR)\apr_escape.obj"
-@erase "$(INTDIR)\apr_fnmatch.obj"
-@erase "$(INTDIR)\apr_getpass.obj"
@@ -1034,6 +569,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"
@@ -1167,12 +703,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" \
@@ -1224,6 +762,7 @@ ALL : ".\x64\Debug\gen_test_char.exe" ".\include\apr_escape_test_char.h" "$(OUTD
CLEAN :
-@erase "$(INTDIR)\apr_atomic.obj"
-@erase "$(INTDIR)\apr_cpystrn.obj"
+ -@erase "$(INTDIR)\apr_cpstr.obj"
-@erase "$(INTDIR)\apr_escape.obj"
-@erase "$(INTDIR)\apr_fnmatch.obj"
-@erase "$(INTDIR)\apr_getpass.obj"
@@ -1270,6 +809,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"
@@ -1403,12 +943,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,7 +999,7 @@ 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"
@@ -1765,6 +1307,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 +1343,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 +1469,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
diff --git a/locks/unix/global_mutex.c b/locks/unix/global_mutex.c
index 18de7e450d30..907b5583699b 100644
--- a/locks/unix/global_mutex.c
+++ b/locks/unix/global_mutex.c
@@ -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 {
@@ -180,9 +181,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)
+
diff --git a/locks/unix/proc_mutex.c b/locks/unix/proc_mutex.c
index 32012a7613cf..8fa050af2944 100644
--- a/locks/unix/proc_mutex.c
+++ b/locks/unix/proc_mutex.c
@@ -19,6 +19,7 @@
#include "apr_arch_proc_mutex.h"
#include "apr_arch_file_io.h" /* for apr_mkstemp() */
#include "apr_hash.h"
+#include "apr_atomic.h"
APR_DECLARE(apr_status_t) apr_proc_mutex_destroy(apr_proc_mutex_t *mutex)
{
@@ -26,7 +27,7 @@ APR_DECLARE(apr_status_t) apr_proc_mutex_destroy(apr_proc_mutex_t *mutex)
}
#if APR_HAS_POSIXSEM_SERIALIZE || APR_HAS_FCNTL_SERIALIZE || \
- APR_HAS_PROC_PTHREAD_SERIALIZE || APR_HAS_SYSVSEM_SERIALIZE
+ APR_HAS_SYSVSEM_SERIALIZE
static apr_status_t proc_mutex_no_child_init(apr_proc_mutex_t **mutex,
apr_pool_t *cont,
const char *fname)
@@ -35,6 +36,17 @@ static apr_status_t proc_mutex_no_child_init(apr_proc_mutex_t **mutex,
}
#endif
+#if APR_HAS_POSIXSEM_SERIALIZE || APR_HAS_PROC_PTHREAD_SERIALIZE
+static apr_status_t proc_mutex_no_perms_set(apr_proc_mutex_t *mutex,
+ apr_fileperms_t perms,
+ apr_uid_t uid,
+ apr_gid_t gid)
+{
+ return APR_ENOTIMPL;
+}
+#endif
+
+
#if APR_HAS_POSIXSEM_SERIALIZE
#ifndef SEM_FAILED
@@ -45,7 +57,7 @@ static apr_status_t proc_mutex_posix_cleanup(void *mutex_)
{
apr_proc_mutex_t *mutex = mutex_;
- if (sem_close(mutex->psem_interproc) < 0) {
+ if (sem_close(mutex->os.psem_interproc) < 0) {
return errno;
}
@@ -74,8 +86,6 @@ static apr_status_t proc_mutex_posix_create(apr_proc_mutex_t *new_mutex,
sem_t *psem;
char semname[32];
- new_mutex->interproc = apr_palloc(new_mutex->pool,
- sizeof(*new_mutex->interproc));
/*
* This bogusness is to follow what appears to be the
* lowest common denominator in Posix semaphore naming:
@@ -134,7 +144,7 @@ static apr_status_t proc_mutex_posix_create(apr_proc_mutex_t *new_mutex,
}
/* Ahhh. The joys of Posix sems. Predelete it... */
sem_unlink(semname);
- new_mutex->psem_interproc = psem;
+ new_mutex->os.psem_interproc = psem;
new_mutex->fname = apr_pstrdup(new_mutex->pool, semname);
apr_pool_cleanup_register(new_mutex->pool, (void *)new_mutex,
apr_proc_mutex_cleanup,
@@ -147,7 +157,7 @@ static apr_status_t proc_mutex_posix_acquire(apr_proc_mutex_t *mutex)
int rc;
do {
- rc = sem_wait(mutex->psem_interproc);
+ rc = sem_wait(mutex->os.psem_interproc);
} while (rc < 0 && errno == EINTR);
if (rc < 0) {
return errno;
@@ -161,7 +171,7 @@ static apr_status_t proc_mutex_posix_tryacquire(apr_proc_mutex_t *mutex)
int rc;
do {
- rc = sem_trywait(mutex->psem_interproc);
+ rc = sem_trywait(mutex->os.psem_interproc);
} while (rc < 0 && errno == EINTR);
if (rc < 0) {
if (errno == EAGAIN) {
@@ -176,7 +186,7 @@ static apr_status_t proc_mutex_posix_tryacquire(apr_proc_mutex_t *mutex)
static apr_status_t proc_mutex_posix_release(apr_proc_mutex_t *mutex)
{
mutex->curr_locked = 0;
- if (sem_post(mutex->psem_interproc) < 0) {
+ if (sem_post(mutex->os.psem_interproc) < 0) {
/* any failure is probably fatal, so no big deal to leave
* ->curr_locked at 0. */
return errno;
@@ -197,6 +207,8 @@ static const apr_proc_mutex_unix_lock_methods_t mutex_posixsem_methods =
proc_mutex_posix_release,
proc_mutex_posix_cleanup,
proc_mutex_no_child_init,
+ proc_mutex_no_perms_set,
+ APR_LOCK_POSIXSEM,
"posixsem"
};
@@ -226,9 +238,9 @@ static apr_status_t proc_mutex_sysv_cleanup(void *mutex_)
apr_proc_mutex_t *mutex=mutex_;
union semun ick;
- if (mutex->interproc->filedes != -1) {
+ if (mutex->os.crossproc != -1) {
ick.val = 0;
- semctl(mutex->interproc->filedes, 0, IPC_RMID, ick);
+ semctl(mutex->os.crossproc, 0, IPC_RMID, ick);
}
return APR_SUCCESS;
}
@@ -239,18 +251,17 @@ static apr_status_t proc_mutex_sysv_create(apr_proc_mutex_t *new_mutex,
union semun ick;
apr_status_t rv;
- new_mutex->interproc = apr_palloc(new_mutex->pool, sizeof(*new_mutex->interproc));
- new_mutex->interproc->filedes = semget(IPC_PRIVATE, 1, IPC_CREAT | 0600);
-
- if (new_mutex->interproc->filedes < 0) {
+ new_mutex->os.crossproc = semget(IPC_PRIVATE, 1, IPC_CREAT | 0600);
+ if (new_mutex->os.crossproc == -1) {
rv = errno;
proc_mutex_sysv_cleanup(new_mutex);
return rv;
}
ick.val = 1;
- if (semctl(new_mutex->interproc->filedes, 0, SETVAL, ick) < 0) {
+ if (semctl(new_mutex->os.crossproc, 0, SETVAL, ick) < 0) {
rv = errno;
proc_mutex_sysv_cleanup(new_mutex);
+ new_mutex->os.crossproc = -1;
return rv;
}
new_mutex->curr_locked = 0;
@@ -265,7 +276,7 @@ static apr_status_t proc_mutex_sysv_acquire(apr_proc_mutex_t *mutex)
int rc;
do {
- rc = semop(mutex->interproc->filedes, &proc_mutex_op_on, 1);
+ rc = semop(mutex->os.crossproc, &proc_mutex_op_on, 1);
} while (rc < 0 && errno == EINTR);
if (rc < 0) {
return errno;
@@ -279,7 +290,7 @@ static apr_status_t proc_mutex_sysv_tryacquire(apr_proc_mutex_t *mutex)
int rc;
do {
- rc = semop(mutex->interproc->filedes, &proc_mutex_op_try, 1);
+ rc = semop(mutex->os.crossproc, &proc_mutex_op_try, 1);
} while (rc < 0 && errno == EINTR);
if (rc < 0) {
if (errno == EAGAIN) {
@@ -297,7 +308,7 @@ static apr_status_t proc_mutex_sysv_release(apr_proc_mutex_t *mutex)
mutex->curr_locked = 0;
do {
- rc = semop(mutex->interproc->filedes, &proc_mutex_op_off, 1);
+ rc = semop(mutex->os.crossproc, &proc_mutex_op_off, 1);
} while (rc < 0 && errno == EINTR);
if (rc < 0) {
return errno;
@@ -305,6 +316,24 @@ static apr_status_t proc_mutex_sysv_release(apr_proc_mutex_t *mutex)
return APR_SUCCESS;
}
+static apr_status_t proc_mutex_sysv_perms_set(apr_proc_mutex_t *mutex,
+ apr_fileperms_t perms,
+ apr_uid_t uid,
+ apr_gid_t gid)
+{
+
+ union semun ick;
+ struct semid_ds buf;
+ buf.sem_perm.uid = uid;
+ buf.sem_perm.gid = gid;
+ buf.sem_perm.mode = apr_unix_perms2mode(perms);
+ ick.buf = &buf;
+ if (semctl(mutex->os.crossproc, 0, IPC_SET, ick) < 0) {
+ return errno;
+ }
+ return APR_SUCCESS;
+}
+
static const apr_proc_mutex_unix_lock_methods_t mutex_sysv_methods =
{
#if APR_PROCESS_LOCK_IS_GLOBAL || !APR_HAS_THREADS || defined(SYSVSEM_IS_GLOBAL)
@@ -318,6 +347,8 @@ static const apr_proc_mutex_unix_lock_methods_t mutex_sysv_methods =
proc_mutex_sysv_release,
proc_mutex_sysv_cleanup,
proc_mutex_no_child_init,
+ proc_mutex_sysv_perms_set,
+ APR_LOCK_SYSVSEM,
"sysvsem"
};
@@ -325,36 +356,83 @@ static const apr_proc_mutex_unix_lock_methods_t mutex_sysv_methods =
#if APR_HAS_PROC_PTHREAD_SERIALIZE
-static apr_status_t proc_mutex_proc_pthread_cleanup(void *mutex_)
+/* The mmap()ed pthread_interproc is the native pthread_mutex_t followed
+ * by a refcounter to track children using it. We want to avoid calling
+ * pthread_mutex_destroy() on the shared mutex area while it is in use by
+ * another process, because this may mark the shared pthread_mutex_t as
+ * invalid for everyone, including forked children (unlike "sysvsem" for
+ * example), causing unexpected errors or deadlocks (PR 49504). So the
+ * last process (parent or child) referencing the mutex will effectively
+ * destroy it.
+ */
+typedef struct {
+ pthread_mutex_t mutex;
+ apr_uint32_t refcount;
+} proc_pthread_mutex_t;
+
+#define proc_pthread_mutex_refcount(m) \
+ (((proc_pthread_mutex_t *)(m)->os.pthread_interproc)->refcount)
+
+static APR_INLINE int proc_pthread_mutex_inc(apr_proc_mutex_t *mutex)
+{
+ if (mutex->pthread_refcounting) {
+ apr_atomic_inc32(&proc_pthread_mutex_refcount(mutex));
+ return 1;
+ }
+ return 0;
+}
+
+static APR_INLINE int proc_pthread_mutex_dec(apr_proc_mutex_t *mutex)
+{
+ if (mutex->pthread_refcounting) {
+ return apr_atomic_dec32(&proc_pthread_mutex_refcount(mutex));
+ }
+ return 0;
+}
+
+static apr_status_t proc_pthread_mutex_unref(void *mutex_)
{
apr_proc_mutex_t *mutex=mutex_;
apr_status_t rv;
if (mutex->curr_locked == 1) {
- if ((rv = pthread_mutex_unlock(mutex->pthread_interproc))) {
+ if ((rv = pthread_mutex_unlock(mutex->os.pthread_interproc))) {
#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#endif
return rv;
}
}
- /* curr_locked is set to -1 until the mutex has been created */
- if (mutex->curr_locked != -1) {
- if ((rv = pthread_mutex_destroy(mutex->pthread_interproc))) {
+ if (!proc_pthread_mutex_dec(mutex)) {
+ if ((rv = pthread_mutex_destroy(mutex->os.pthread_interproc))) {
#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#endif
return rv;
}
}
- if (munmap((caddr_t)mutex->pthread_interproc, sizeof(pthread_mutex_t))) {
+ return APR_SUCCESS;
+}
+
+static apr_status_t proc_mutex_pthread_cleanup(void *mutex_)
+{
+ apr_proc_mutex_t *mutex=mutex_;
+ apr_status_t rv;
+
+ /* curr_locked is set to -1 until the mutex has been created */
+ if (mutex->curr_locked != -1) {
+ if ((rv = proc_pthread_mutex_unref(mutex))) {
+ return rv;
+ }
+ }
+ if (munmap(mutex->os.pthread_interproc, sizeof(proc_pthread_mutex_t))) {
return errno;
}
return APR_SUCCESS;
}
-static apr_status_t proc_mutex_proc_pthread_create(apr_proc_mutex_t *new_mutex,
- const char *fname)
+static apr_status_t proc_mutex_pthread_create(apr_proc_mutex_t *new_mutex,
+ const char *fname)
{
apr_status_t rv;
int fd;
@@ -365,31 +443,32 @@ static apr_status_t proc_mutex_proc_pthread_create(apr_proc_mutex_t *new_mutex,
return errno;
}
- new_mutex->pthread_interproc = (pthread_mutex_t *)mmap(
- (caddr_t) 0,
- sizeof(pthread_mutex_t),
- PROT_READ | PROT_WRITE, MAP_SHARED,
- fd, 0);
- if (new_mutex->pthread_interproc == (pthread_mutex_t *) (caddr_t) -1) {
+ new_mutex->os.pthread_interproc = mmap(NULL, sizeof(proc_pthread_mutex_t),
+ PROT_READ | PROT_WRITE, MAP_SHARED,
+ fd, 0);
+ if (new_mutex->os.pthread_interproc == MAP_FAILED) {
+ new_mutex->os.pthread_interproc = NULL;
+ rv = errno;
close(fd);
- return errno;
+ return rv;
}
close(fd);
+ new_mutex->pthread_refcounting = 1;
new_mutex->curr_locked = -1; /* until the mutex has been created */
if ((rv = pthread_mutexattr_init(&mattr))) {
#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#endif
- proc_mutex_proc_pthread_cleanup(new_mutex);
+ proc_mutex_pthread_cleanup(new_mutex);
return rv;
}
if ((rv = pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED))) {
#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#endif
- proc_mutex_proc_pthread_cleanup(new_mutex);
+ proc_mutex_pthread_cleanup(new_mutex);
pthread_mutexattr_destroy(&mattr);
return rv;
}
@@ -400,7 +479,7 @@ static apr_status_t proc_mutex_proc_pthread_create(apr_proc_mutex_t *new_mutex,
#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#endif
- proc_mutex_proc_pthread_cleanup(new_mutex);
+ proc_mutex_pthread_cleanup(new_mutex);
pthread_mutexattr_destroy(&mattr);
return rv;
}
@@ -408,28 +487,29 @@ static apr_status_t proc_mutex_proc_pthread_create(apr_proc_mutex_t *new_mutex,
#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#endif
- proc_mutex_proc_pthread_cleanup(new_mutex);
+ proc_mutex_pthread_cleanup(new_mutex);
pthread_mutexattr_destroy(&mattr);
return rv;
}
#endif /* HAVE_PTHREAD_MUTEX_ROBUST */
- if ((rv = pthread_mutex_init(new_mutex->pthread_interproc, &mattr))) {
+ if ((rv = pthread_mutex_init(new_mutex->os.pthread_interproc, &mattr))) {
#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#endif
- proc_mutex_proc_pthread_cleanup(new_mutex);
+ proc_mutex_pthread_cleanup(new_mutex);
pthread_mutexattr_destroy(&mattr);
return rv;
}
+ proc_pthread_mutex_refcount(new_mutex) = 1; /* first/parent reference */
new_mutex->curr_locked = 0; /* mutex created now */
if ((rv = pthread_mutexattr_destroy(&mattr))) {
#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#endif
- proc_mutex_proc_pthread_cleanup(new_mutex);
+ proc_mutex_pthread_cleanup(new_mutex);
return rv;
}
@@ -440,34 +520,45 @@ static apr_status_t proc_mutex_proc_pthread_create(apr_proc_mutex_t *new_mutex,
return APR_SUCCESS;
}
-static apr_status_t proc_mutex_proc_pthread_acquire(apr_proc_mutex_t *mutex)
+static apr_status_t proc_mutex_pthread_child_init(apr_proc_mutex_t **mutex,
+ apr_pool_t *pool,
+ const char *fname)
+{
+ (*mutex)->curr_locked = 0;
+ if (proc_pthread_mutex_inc(*mutex)) {
+ apr_pool_cleanup_register(pool, *mutex, proc_pthread_mutex_unref,
+ apr_pool_cleanup_null);
+ }
+ return APR_SUCCESS;
+}
+
+static apr_status_t proc_mutex_pthread_acquire(apr_proc_mutex_t *mutex)
{
apr_status_t rv;
- if ((rv = pthread_mutex_lock(mutex->pthread_interproc))) {
+ if ((rv = pthread_mutex_lock(mutex->os.pthread_interproc))) {
#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#endif
#ifdef HAVE_PTHREAD_MUTEX_ROBUST
/* Okay, our owner died. Let's try to make it consistent again. */
if (rv == EOWNERDEAD) {
- pthread_mutex_consistent_np(mutex->pthread_interproc);
+ proc_pthread_mutex_dec(mutex);
+ pthread_mutex_consistent_np(mutex->os.pthread_interproc);
}
else
- return rv;
-#else
- return rv;
#endif
+ return rv;
}
mutex->curr_locked = 1;
return APR_SUCCESS;
}
-static apr_status_t proc_mutex_proc_pthread_tryacquire(apr_proc_mutex_t *mutex)
+static apr_status_t proc_mutex_pthread_tryacquire(apr_proc_mutex_t *mutex)
{
apr_status_t rv;
- if ((rv = pthread_mutex_trylock(mutex->pthread_interproc))) {
+ if ((rv = pthread_mutex_trylock(mutex->os.pthread_interproc))) {
#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#endif
@@ -477,25 +568,23 @@ static apr_status_t proc_mutex_proc_pthread_tryacquire(apr_proc_mutex_t *mutex)
#ifdef HAVE_PTHREAD_MUTEX_ROBUST
/* Okay, our owner died. Let's try to make it consistent again. */
if (rv == EOWNERDEAD) {
- pthread_mutex_consistent_np(mutex->pthread_interproc);
- rv = APR_SUCCESS;
+ proc_pthread_mutex_dec(mutex);
+ pthread_mutex_consistent_np(mutex->os.pthread_interproc);
}
else
- return rv;
-#else
- return rv;
#endif
+ return rv;
}
mutex->curr_locked = 1;
- return rv;
+ return APR_SUCCESS;
}
-static apr_status_t proc_mutex_proc_pthread_release(apr_proc_mutex_t *mutex)
+static apr_status_t proc_mutex_pthread_release(apr_proc_mutex_t *mutex)
{
apr_status_t rv;
mutex->curr_locked = 0;
- if ((rv = pthread_mutex_unlock(mutex->pthread_interproc))) {
+ if ((rv = pthread_mutex_unlock(mutex->os.pthread_interproc))) {
#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#endif
@@ -507,12 +596,14 @@ static apr_status_t proc_mutex_proc_pthread_release(apr_proc_mutex_t *mutex)
static const apr_proc_mutex_unix_lock_methods_t mutex_proc_pthread_methods =
{
APR_PROCESS_LOCK_MECH_IS_GLOBAL,
- proc_mutex_proc_pthread_create,
- proc_mutex_proc_pthread_acquire,
- proc_mutex_proc_pthread_tryacquire,
- proc_mutex_proc_pthread_release,
- proc_mutex_proc_pthread_cleanup,
- proc_mutex_no_child_init,
+ proc_mutex_pthread_create,
+ proc_mutex_pthread_acquire,
+ proc_mutex_pthread_tryacquire,
+ proc_mutex_pthread_release,
+ proc_mutex_pthread_cleanup,
+ proc_mutex_pthread_child_init,
+ proc_mutex_no_perms_set,
+ APR_LOCK_PROC_PTHREAD,
"pthread"
};
@@ -541,7 +632,7 @@ static void proc_mutex_fcntl_setup(void)
static apr_status_t proc_mutex_fcntl_cleanup(void *mutex_)
{
- apr_status_t status;
+ apr_status_t status = APR_SUCCESS;
apr_proc_mutex_t *mutex=mutex_;
if (mutex->curr_locked == 1) {
@@ -550,7 +641,16 @@ static apr_status_t proc_mutex_fcntl_cleanup(void *mutex_)
return status;
}
- return apr_file_close(mutex->interproc);
+ if (mutex->interproc) {
+ status = apr_file_close(mutex->interproc);
+ }
+ if (!mutex->interproc_closing
+ && mutex->os.crossproc != -1
+ && close(mutex->os.crossproc) == -1
+ && status == APR_SUCCESS) {
+ status = errno;
+ }
+ return status;
}
static apr_status_t proc_mutex_fcntl_create(apr_proc_mutex_t *new_mutex,
@@ -576,6 +676,8 @@ static apr_status_t proc_mutex_fcntl_create(apr_proc_mutex_t *new_mutex,
return rv;
}
+ new_mutex->os.crossproc = new_mutex->interproc->filedes;
+ new_mutex->interproc_closing = 1;
new_mutex->curr_locked = 0;
unlink(new_mutex->fname);
apr_pool_cleanup_register(new_mutex->pool,
@@ -590,7 +692,7 @@ static apr_status_t proc_mutex_fcntl_acquire(apr_proc_mutex_t *mutex)
int rc;
do {
- rc = fcntl(mutex->interproc->filedes, F_SETLKW, &proc_mutex_lock_it);
+ rc = fcntl(mutex->os.crossproc, F_SETLKW, &proc_mutex_lock_it);
} while (rc < 0 && errno == EINTR);
if (rc < 0) {
return errno;
@@ -604,7 +706,7 @@ static apr_status_t proc_mutex_fcntl_tryacquire(apr_proc_mutex_t *mutex)
int rc;
do {
- rc = fcntl(mutex->interproc->filedes, F_SETLK, &proc_mutex_lock_it);
+ rc = fcntl(mutex->os.crossproc, F_SETLK, &proc_mutex_lock_it);
} while (rc < 0 && errno == EINTR);
if (rc < 0) {
#if FCNTL_TRYACQUIRE_EACCES
@@ -626,7 +728,7 @@ static apr_status_t proc_mutex_fcntl_release(apr_proc_mutex_t *mutex)
mutex->curr_locked=0;
do {
- rc = fcntl(mutex->interproc->filedes, F_SETLKW, &proc_mutex_unlock_it);
+ rc = fcntl(mutex->os.crossproc, F_SETLKW, &proc_mutex_unlock_it);
} while (rc < 0 && errno == EINTR);
if (rc < 0) {
return errno;
@@ -634,6 +736,22 @@ static apr_status_t proc_mutex_fcntl_release(apr_proc_mutex_t *mutex)
return APR_SUCCESS;
}
+static apr_status_t proc_mutex_fcntl_perms_set(apr_proc_mutex_t *mutex,
+ apr_fileperms_t perms,
+ apr_uid_t uid,
+ apr_gid_t gid)
+{
+
+ if (mutex->fname) {
+ if (!(perms & APR_FPROT_GSETID))
+ gid = -1;
+ if (fchown(mutex->os.crossproc, uid, gid) < 0) {
+ return errno;
+ }
+ }
+ return APR_SUCCESS;
+}
+
static const apr_proc_mutex_unix_lock_methods_t mutex_fcntl_methods =
{
#if APR_PROCESS_LOCK_IS_GLOBAL || !APR_HAS_THREADS || defined(FCNTL_IS_GLOBAL)
@@ -647,6 +765,8 @@ static const apr_proc_mutex_unix_lock_methods_t mutex_fcntl_methods =
proc_mutex_fcntl_release,
proc_mutex_fcntl_cleanup,
proc_mutex_no_child_init,
+ proc_mutex_fcntl_perms_set,
+ APR_LOCK_FCNTL,
"fcntl"
};
@@ -658,7 +778,7 @@ static apr_status_t proc_mutex_flock_release(apr_proc_mutex_t *);
static apr_status_t proc_mutex_flock_cleanup(void *mutex_)
{
- apr_status_t status;
+ apr_status_t status = APR_SUCCESS;
apr_proc_mutex_t *mutex=mutex_;
if (mutex->curr_locked == 1) {
@@ -667,10 +787,18 @@ static apr_status_t proc_mutex_flock_cleanup(void *mutex_)
return status;
}
if (mutex->interproc) { /* if it was opened properly */
- apr_file_close(mutex->interproc);
+ status = apr_file_close(mutex->interproc);
}
- unlink(mutex->fname);
- return APR_SUCCESS;
+ if (!mutex->interproc_closing
+ && mutex->os.crossproc != -1
+ && close(mutex->os.crossproc) == -1
+ && status == APR_SUCCESS) {
+ status = errno;
+ }
+ if (mutex->fname) {
+ unlink(mutex->fname);
+ }
+ return status;
}
static apr_status_t proc_mutex_flock_create(apr_proc_mutex_t *new_mutex,
@@ -694,8 +822,11 @@ static apr_status_t proc_mutex_flock_create(apr_proc_mutex_t *new_mutex,
if (rv != APR_SUCCESS) {
proc_mutex_flock_cleanup(new_mutex);
- return errno;
+ return rv;
}
+
+ new_mutex->os.crossproc = new_mutex->interproc->filedes;
+ new_mutex->interproc_closing = 1;
new_mutex->curr_locked = 0;
apr_pool_cleanup_register(new_mutex->pool, (void *)new_mutex,
apr_proc_mutex_cleanup,
@@ -708,7 +839,7 @@ static apr_status_t proc_mutex_flock_acquire(apr_proc_mutex_t *mutex)
int rc;
do {
- rc = flock(mutex->interproc->filedes, LOCK_EX);
+ rc = flock(mutex->os.crossproc, LOCK_EX);
} while (rc < 0 && errno == EINTR);
if (rc < 0) {
return errno;
@@ -722,7 +853,7 @@ static apr_status_t proc_mutex_flock_tryacquire(apr_proc_mutex_t *mutex)
int rc;
do {
- rc = flock(mutex->interproc->filedes, LOCK_EX | LOCK_NB);
+ rc = flock(mutex->os.crossproc, LOCK_EX | LOCK_NB);
} while (rc < 0 && errno == EINTR);
if (rc < 0) {
if (errno == EWOULDBLOCK || errno == EAGAIN) {
@@ -740,7 +871,7 @@ static apr_status_t proc_mutex_flock_release(apr_proc_mutex_t *mutex)
mutex->curr_locked = 0;
do {
- rc = flock(mutex->interproc->filedes, LOCK_UN);
+ rc = flock(mutex->os.crossproc, LOCK_UN);
} while (rc < 0 && errno == EINTR);
if (rc < 0) {
return errno;
@@ -755,23 +886,45 @@ static apr_status_t proc_mutex_flock_child_init(apr_proc_mutex_t **mutex,
apr_proc_mutex_t *new_mutex;
int rv;
- new_mutex = (apr_proc_mutex_t *)apr_palloc(pool, sizeof(apr_proc_mutex_t));
-
- memcpy(new_mutex, *mutex, sizeof *new_mutex);
- new_mutex->pool = pool;
if (!fname) {
fname = (*mutex)->fname;
+ if (!fname) {
+ return APR_SUCCESS;
+ }
}
+
+ new_mutex = (apr_proc_mutex_t *)apr_pmemdup(pool, *mutex,
+ sizeof(apr_proc_mutex_t));
+ new_mutex->pool = pool;
new_mutex->fname = apr_pstrdup(pool, fname);
rv = apr_file_open(&new_mutex->interproc, new_mutex->fname,
APR_FOPEN_WRITE, 0, new_mutex->pool);
if (rv != APR_SUCCESS) {
return rv;
}
+ new_mutex->os.crossproc = new_mutex->interproc->filedes;
+ new_mutex->interproc_closing = 1;
+
*mutex = new_mutex;
return APR_SUCCESS;
}
+static apr_status_t proc_mutex_flock_perms_set(apr_proc_mutex_t *mutex,
+ apr_fileperms_t perms,
+ apr_uid_t uid,
+ apr_gid_t gid)
+{
+
+ if (mutex->fname) {
+ if (!(perms & APR_FPROT_GSETID))
+ gid = -1;
+ if (fchown(mutex->os.crossproc, uid, gid) < 0) {
+ return errno;
+ }
+ }
+ return APR_SUCCESS;
+}
+
static const apr_proc_mutex_unix_lock_methods_t mutex_flock_methods =
{
#if APR_PROCESS_LOCK_IS_GLOBAL || !APR_HAS_THREADS || defined(FLOCK_IS_GLOBAL)
@@ -785,6 +938,8 @@ static const apr_proc_mutex_unix_lock_methods_t mutex_flock_methods =
proc_mutex_flock_release,
proc_mutex_flock_cleanup,
proc_mutex_flock_child_init,
+ proc_mutex_flock_perms_set,
+ APR_LOCK_FLOCK,
"flock"
};
@@ -801,55 +956,132 @@ void apr_proc_mutex_unix_setup_lock(void)
#endif
}
-static apr_status_t proc_mutex_choose_method(apr_proc_mutex_t *new_mutex, apr_lockmech_e mech)
+static apr_status_t proc_mutex_choose_method(apr_proc_mutex_t *new_mutex,
+ apr_lockmech_e mech,
+ apr_os_proc_mutex_t *ospmutex)
{
+#if APR_HAS_PROC_PTHREAD_SERIALIZE
+ new_mutex->os.pthread_interproc = NULL;
+#endif
+#if APR_HAS_POSIXSEM_SERIALIZE
+ new_mutex->os.psem_interproc = NULL;
+#endif
+#if APR_HAS_SYSVSEM_SERIALIZE || APR_HAS_FCNTL_SERIALIZE || APR_HAS_FLOCK_SERIALIZE
+ new_mutex->os.crossproc = -1;
+
+#if APR_HAS_FCNTL_SERIALIZE || APR_HAS_FLOCK_SERIALIZE
+ new_mutex->interproc = NULL;
+ new_mutex->interproc_closing = 0;
+#endif
+#endif
+
switch (mech) {
case APR_LOCK_FCNTL:
#if APR_HAS_FCNTL_SERIALIZE
- new_mutex->inter_meth = &mutex_fcntl_methods;
+ new_mutex->meth = &mutex_fcntl_methods;
+ if (ospmutex) {
+ if (ospmutex->crossproc == -1) {
+ return APR_EINVAL;
+ }
+ new_mutex->os.crossproc = ospmutex->crossproc;
+ }
#else
return APR_ENOTIMPL;
#endif
break;
case APR_LOCK_FLOCK:
#if APR_HAS_FLOCK_SERIALIZE
- new_mutex->inter_meth = &mutex_flock_methods;
+ new_mutex->meth = &mutex_flock_methods;
+ if (ospmutex) {
+ if (ospmutex->crossproc == -1) {
+ return APR_EINVAL;
+ }
+ new_mutex->os.crossproc = ospmutex->crossproc;
+ }
#else
return APR_ENOTIMPL;
#endif
break;
case APR_LOCK_SYSVSEM:
#if APR_HAS_SYSVSEM_SERIALIZE
- new_mutex->inter_meth = &mutex_sysv_methods;
+ new_mutex->meth = &mutex_sysv_methods;
+ if (ospmutex) {
+ if (ospmutex->crossproc == -1) {
+ return APR_EINVAL;
+ }
+ new_mutex->os.crossproc = ospmutex->crossproc;
+ }
#else
return APR_ENOTIMPL;
#endif
break;
case APR_LOCK_POSIXSEM:
#if APR_HAS_POSIXSEM_SERIALIZE
- new_mutex->inter_meth = &mutex_posixsem_methods;
+ new_mutex->meth = &mutex_posixsem_methods;
+ if (ospmutex) {
+ if (ospmutex->psem_interproc == NULL) {
+ return APR_EINVAL;
+ }
+ new_mutex->os.psem_interproc = ospmutex->psem_interproc;
+ }
#else
return APR_ENOTIMPL;
#endif
break;
case APR_LOCK_PROC_PTHREAD:
#if APR_HAS_PROC_PTHREAD_SERIALIZE
- new_mutex->inter_meth = &mutex_proc_pthread_methods;
+ new_mutex->meth = &mutex_proc_pthread_methods;
+ if (ospmutex) {
+ if (ospmutex->pthread_interproc == NULL) {
+ return APR_EINVAL;
+ }
+ new_mutex->os.pthread_interproc = ospmutex->pthread_interproc;
+ }
#else
return APR_ENOTIMPL;
#endif
break;
case APR_LOCK_DEFAULT:
#if APR_USE_FLOCK_SERIALIZE
- new_mutex->inter_meth = &mutex_flock_methods;
+ new_mutex->meth = &mutex_flock_methods;
+ if (ospmutex) {
+ if (ospmutex->crossproc == -1) {
+ return APR_EINVAL;
+ }
+ new_mutex->os.crossproc = ospmutex->crossproc;
+ }
#elif APR_USE_SYSVSEM_SERIALIZE
- new_mutex->inter_meth = &mutex_sysv_methods;
+ new_mutex->meth = &mutex_sysv_methods;
+ if (ospmutex) {
+ if (ospmutex->crossproc == -1) {
+ return APR_EINVAL;
+ }
+ new_mutex->os.crossproc = ospmutex->crossproc;
+ }
#elif APR_USE_FCNTL_SERIALIZE
- new_mutex->inter_meth = &mutex_fcntl_methods;
+ new_mutex->meth = &mutex_fcntl_methods;
+ if (ospmutex) {
+ if (ospmutex->crossproc == -1) {
+ return APR_EINVAL;
+ }
+ new_mutex->os.crossproc = ospmutex->crossproc;
+ }
#elif APR_USE_PROC_PTHREAD_SERIALIZE
- new_mutex->inter_meth = &mutex_proc_pthread_methods;
+ new_mutex->meth = &mutex_proc_pthread_methods;
+ if (ospmutex) {
+ if (ospmutex->pthread_interproc == NULL) {
+ return APR_EINVAL;
+ }
+ new_mutex->os.pthread_interproc = ospmutex->pthread_interproc;
+ }
#elif APR_USE_POSIXSEM_SERIALIZE
- new_mutex->inter_meth = &mutex_posixsem_methods;
+ new_mutex->meth = &mutex_posixsem_methods;
+ if (ospmutex) {
+ if (ospmutex->psem_interproc == NULL) {
+ return APR_EINVAL;
+ }
+ new_mutex->os.psem_interproc = ospmutex->psem_interproc;
+ }
#else
return APR_ENOTIMPL;
#endif
@@ -865,10 +1097,10 @@ APR_DECLARE(const char *) apr_proc_mutex_defname(void)
apr_status_t rv;
apr_proc_mutex_t mutex;
- if ((rv = proc_mutex_choose_method(&mutex, APR_LOCK_DEFAULT)) != APR_SUCCESS) {
+ if ((rv = proc_mutex_choose_method(&mutex, APR_LOCK_DEFAULT,
+ NULL)) != APR_SUCCESS) {
return "unknown";
}
- mutex.meth = mutex.inter_meth;
return apr_proc_mutex_name(&mutex);
}
@@ -877,12 +1109,11 @@ static apr_status_t proc_mutex_create(apr_proc_mutex_t *new_mutex, apr_lockmech_
{
apr_status_t rv;
- if ((rv = proc_mutex_choose_method(new_mutex, mech)) != APR_SUCCESS) {
+ if ((rv = proc_mutex_choose_method(new_mutex, mech,
+ NULL)) != APR_SUCCESS) {
return rv;
}
- new_mutex->meth = new_mutex->inter_meth;
-
if ((rv = new_mutex->meth->create(new_mutex, fname)) != APR_SUCCESS) {
return rv;
}
@@ -935,6 +1166,11 @@ APR_DECLARE(apr_status_t) apr_proc_mutex_cleanup(void *mutex)
return ((apr_proc_mutex_t *)mutex)->meth->cleanup(mutex);
}
+APR_DECLARE(apr_lockmech_e) apr_proc_mutex_mech(apr_proc_mutex_t *mutex)
+{
+ return mutex->meth->mech;
+}
+
APR_DECLARE(const char *) apr_proc_mutex_name(apr_proc_mutex_t *mutex)
{
return mutex->meth->name;
@@ -957,45 +1193,69 @@ APR_DECLARE(const char *) apr_proc_mutex_lockfile(apr_proc_mutex_t *mutex)
return NULL;
}
+APR_PERMS_SET_IMPLEMENT(proc_mutex)
+{
+ apr_proc_mutex_t *mutex = (apr_proc_mutex_t *)theproc_mutex;
+ return mutex->meth->perms_set(mutex, perms, uid, gid);
+}
+
APR_POOL_IMPLEMENT_ACCESSOR(proc_mutex)
/* Implement OS-specific accessors defined in apr_portable.h */
-APR_DECLARE(apr_status_t) apr_os_proc_mutex_get(apr_os_proc_mutex_t *ospmutex,
- apr_proc_mutex_t *pmutex)
+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)
{
-#if APR_HAS_SYSVSEM_SERIALIZE || APR_HAS_FCNTL_SERIALIZE || APR_HAS_FLOCK_SERIALIZE || APR_HAS_POSIXSEM_SERIALIZE
- if (pmutex->interproc) {
- ospmutex->crossproc = pmutex->interproc->filedes;
- }
- else {
- ospmutex->crossproc = -1;
+ *ospmutex = pmutex->os;
+ if (mech) {
+ *mech = pmutex->meth->mech;
}
-#endif
-#if APR_HAS_PROC_PTHREAD_SERIALIZE
- ospmutex->pthread_interproc = pmutex->pthread_interproc;
-#endif
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_os_proc_mutex_put(apr_proc_mutex_t **pmutex,
+APR_DECLARE(apr_status_t) apr_os_proc_mutex_get(apr_os_proc_mutex_t *ospmutex,
+ apr_proc_mutex_t *pmutex)
+{
+ return apr_os_proc_mutex_get_ex(ospmutex, pmutex, NULL);
+}
+
+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 *pool)
{
+ apr_status_t rv;
if (pool == NULL) {
return APR_ENOPOOL;
}
+
if ((*pmutex) == NULL) {
(*pmutex) = (apr_proc_mutex_t *)apr_pcalloc(pool,
sizeof(apr_proc_mutex_t));
(*pmutex)->pool = pool;
}
-#if APR_HAS_SYSVSEM_SERIALIZE || APR_HAS_FCNTL_SERIALIZE || APR_HAS_FLOCK_SERIALIZE || APR_HAS_POSIXSEM_SERIALIZE
- apr_os_file_put(&(*pmutex)->interproc, &ospmutex->crossproc, 0, pool);
-#endif
-#if APR_HAS_PROC_PTHREAD_SERIALIZE
- (*pmutex)->pthread_interproc = ospmutex->pthread_interproc;
+ rv = proc_mutex_choose_method(*pmutex, mech, ospmutex);
+#if APR_HAS_FCNTL_SERIALIZE || APR_HAS_FLOCK_SERIALIZE
+ if (rv == APR_SUCCESS) {
+ rv = apr_os_file_put(&(*pmutex)->interproc, &(*pmutex)->os.crossproc,
+ 0, pool);
+ }
#endif
- return APR_SUCCESS;
+
+ if (rv == APR_SUCCESS && register_cleanup) {
+ apr_pool_cleanup_register(pool, *pmutex, apr_proc_mutex_cleanup,
+ apr_pool_cleanup_null);
+ }
+ return rv;
+}
+
+APR_DECLARE(apr_status_t) apr_os_proc_mutex_put(apr_proc_mutex_t **pmutex,
+ apr_os_proc_mutex_t *ospmutex,
+ apr_pool_t *pool)
+{
+ return apr_os_proc_mutex_put_ex(pmutex, ospmutex, APR_LOCK_DEFAULT,
+ 0, pool);
}
diff --git a/memory/unix/apr_pools.c b/memory/unix/apr_pools.c
index 20e4254fbb09..524e9acb435e 100644
--- a/memory/unix/apr_pools.c
+++ b/memory/unix/apr_pools.c
@@ -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;
@@ -210,21 +251,45 @@ APR_DECLARE(void) apr_allocator_max_free_set(apr_allocator_t *allocator,
}
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,10 +412,21 @@ apr_memnode_t *allocator_alloc(apr_allocator_t *allocator, apr_size_t in_size)
#endif
return NULL;
+#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->index = (APR_UINT32_TRUNC_CAST)index;
node->first_avail = (char *)node + APR_MEMNODE_T_SIZE;
- node->endp = (char *)node + 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;
@@ -662,6 +751,68 @@ APR_DECLARE(void) apr_pool_terminate(void)
#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;
diff --git a/misc/unix/errorcodes.c b/misc/unix/errorcodes.c
index f553a37b614d..60ea2f7bd26e 100644
--- a/misc/unix/errorcodes.c
+++ b/misc/unix/errorcodes.c
@@ -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)
diff --git a/network_io/unix/multicast.c b/network_io/unix/multicast.c
index 3767bfdd15c1..a604b06006d7 100644
--- a/network_io/unix/multicast.c
+++ b/network_io/unix/multicast.c
@@ -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;
diff --git a/network_io/unix/sockaddr.c b/network_io/unix/sockaddr.c
index e6d7e0be93d8..a375f72ece3b 100644
--- a/network_io/unix/sockaddr.c
+++ b/network_io/unix/sockaddr.c
@@ -167,6 +167,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 +277,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 +297,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 +622,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 +663,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 +737,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,
@@ -985,6 +1054,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;
diff --git a/network_io/unix/sockets.c b/network_io/unix/sockets.c
index b95794f183ad..206c65447158 100644
--- a/network_io/unix/sockets.c
+++ b/network_io/unix/sockets.c
@@ -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 */
}
@@ -282,6 +319,14 @@ apr_status_t apr_socket_accept(apr_socket_t **new, apr_socket_t *sock,
(*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) {
/* not likely for a listening socket, but theoretically possible :) */
@@ -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)) {
diff --git a/network_io/unix/sockopt.c b/network_io/unix/sockopt.c
index 6ce4b911efc0..6194e9b02c11 100644
--- a/network_io/unix/sockopt.c
+++ b/network_io/unix/sockopt.c
@@ -330,6 +330,20 @@ apr_status_t apr_socket_opt_set(apr_socket_t *sock,
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:
return APR_EINVAL;
}
@@ -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
+}
diff --git a/poll/unix/epoll.c b/poll/unix/epoll.c
index fe006db013c0..4ab03f67ccc1 100644
--- a/poll/unix/epoll.c
+++ b/poll/unix/epoll.c
@@ -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 */
diff --git a/poll/unix/kqueue.c b/poll/unix/kqueue.c
index efc589869a69..548464db148a 100644
--- a/poll/unix/kqueue.c
+++ b/poll/unix/kqueue.c
@@ -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 */
diff --git a/poll/unix/poll.c b/poll/unix/poll.c
index d7a436fd9a14..f148f5e50d3d 100644
--- a/poll/unix/poll.c
+++ b/poll/unix/poll.c
@@ -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 */
diff --git a/poll/unix/pollcb.c b/poll/unix/pollcb.c
index da12f015a74f..a63ad5c9cad2 100644
--- a/poll/unix/pollcb.c
+++ b/poll/unix/pollcb.c
@@ -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;
+}
diff --git a/poll/unix/pollset.c b/poll/unix/pollset.c
index 852d74597fcc..8fa817330f65 100644
--- a/poll/unix/pollset.c
+++ b/poll/unix/pollset.c
@@ -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)
diff --git a/poll/unix/port.c b/poll/unix/port.c
index 5002dfdbe24c..94b6fa3978d5 100644
--- a/poll/unix/port.c
+++ b/poll/unix/port.c
@@ -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 nres = 0;
pfd_elem_t *ep;
apr_status_t rv = APR_SUCCESS;
- apr_pollfd_t fp;
+ *num = 0;
nget = 1;
pollset_lock_rings();
@@ -403,49 +404,41 @@ 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; 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[nres] = ep->pfd;
+ pollset->p->result_set[nres].rtnevents =
+ get_revent(pollset->p->port_set[i].portev_events);
+ ++nres;
+ }
+ /* 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 (nres > 0) { /* any event besides wakeup pipe? */
+ *num = nres;
+ 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 +448,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 +457,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 +497,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 +549,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 +581,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 */
diff --git a/poll/unix/select.c b/poll/unix/select.c
index 61a064f469bb..51be3c1cd5f9 100644
--- a/poll/unix/select.c
+++ b/poll/unix/select.c
@@ -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;
diff --git a/poll/unix/wakeup.c b/poll/unix/wakeup.c
new file mode 100644
index 000000000000..acf8afc97a27
--- /dev/null
+++ b/poll/unix/wakeup.c
@@ -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;
+ }
+}
diff --git a/poll/unix/z_asio.c b/poll/unix/z_asio.c
index 7e0fd89a549c..48b531cc8c74 100644
--- a/poll/unix/z_asio.c
+++ b/poll/unix/z_asio.c
@@ -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 */
diff --git a/shmem/unix/shm.c b/shmem/unix/shm.c
index f102b4b359be..f99afecf7b69 100644
--- a/shmem/unix/shm.c
+++ b/shmem/unix/shm.c
@@ -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 @@ shm_remove_failed:
#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,
diff --git a/strings/apr_cpystrn.c b/strings/apr_cpystrn.c
index d222d0814299..fb96025a00a2 100644
--- a/strings/apr_cpystrn.c
+++ b/strings/apr_cpystrn.c
@@ -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;
diff --git a/strings/apr_cstr.c b/strings/apr_cstr.c
new file mode 100644
index 000000000000..27229a067a8b
--- /dev/null
+++ b/strings/apr_cstr.c
@@ -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;
+ }
+}
diff --git a/strings/apr_fnmatch.c b/strings/apr_fnmatch.c
index c1c0e4af54b6..7dfa846993b1 100644
--- a/strings/apr_fnmatch.c
+++ b/strings/apr_fnmatch.c
@@ -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;
}
diff --git a/strings/apr_snprintf.c b/strings/apr_snprintf.c
index 6a689a61453f..5b1482c25b90 100644
--- a/strings/apr_snprintf.c
+++ b/strings/apr_snprintf.c
@@ -1328,7 +1328,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++;
}
}
diff --git a/tables/apr_skiplist.c b/tables/apr_skiplist.c
index b4696bd41a5c..5ea8643dbf2f 100644
--- a/tables/apr_skiplist.c
+++ b/tables/apr_skiplist.c
@@ -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);
diff --git a/tables/apr_tables.c b/tables/apr_tables.c
index 2f5b4e537451..6d9aff88168d 100644
--- a/tables/apr_tables.c
+++ b/tables/apr_tables.c
@@ -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;
}
diff --git a/threadproc/unix/proc.c b/threadproc/unix/proc.c
index 3588a86b0d4e..004772ff88e1 100644
--- a/threadproc/unix/proc.c
+++ b/threadproc/unix/proc.c
@@ -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;
+}
diff --git a/time/unix/time.c b/time/unix/time.c
index dfa45e690c62..7f0958192769 100644
--- a/time/unix/time.c
+++ b/time/unix/time.c
@@ -142,6 +142,9 @@ APR_DECLARE(apr_status_t) apr_time_exp_get(apr_time_t *t, apr_time_exp_t *xt)
static const int dayoffset[12] =
{306, 337, 0, 31, 61, 92, 122, 153, 184, 214, 245, 275};
+ if (xt->tm_mon < 0 || xt->tm_mon >= 12)
+ return APR_EBADDATE;
+
/* shift new year to 1st March in order to make leap year calc easy */
if (xt->tm_mon < 2)
diff --git a/tools/gen_test_char.c b/tools/gen_test_char.c
index 811c802f215d..c48d2cbe7439 100644
--- a/tools/gen_test_char.c
+++ b/tools/gen_test_char.c
@@ -32,6 +32,8 @@
#define T_ESCAPE_ECHO (0x08)
#define T_ESCAPE_URLENCODED (0x10)
#define T_ESCAPE_XML (0x20)
+#define T_ESCAPE_LDAP_DN (0x40)
+#define T_ESCAPE_LDAP_FILTER (0x80)
int main(int argc, char *argv[])
{
@@ -46,6 +48,8 @@ int main(int argc, char *argv[])
"#define T_ESCAPE_ECHO (%u)\n"
"#define T_ESCAPE_URLENCODED (%u)\n"
"#define T_ESCAPE_XML (%u)\n"
+ "#define T_ESCAPE_LDAP_DN (%u)\n"
+ "#define T_ESCAPE_LDAP_FILTER (%u)\n"
"\n"
"static const unsigned char test_char_table[256] = {",
T_ESCAPE_SHELL_CMD,
@@ -53,7 +57,9 @@ int main(int argc, char *argv[])
T_OS_ESCAPE_PATH,
T_ESCAPE_ECHO,
T_ESCAPE_URLENCODED,
- T_ESCAPE_XML);
+ T_ESCAPE_XML,
+ T_ESCAPE_LDAP_DN,
+ T_ESCAPE_LDAP_FILTER);
for (c = 0; c < 256; ++c) {
flags = 0;
@@ -106,6 +112,16 @@ int main(int argc, char *argv[])
flags |= T_ESCAPE_XML;
}
+ /* LDAP DN escaping (RFC4514) */
+ if (!isprint(c) || strchr("\"+,;<>\\", c)) {
+ flags |= T_ESCAPE_LDAP_DN;
+ }
+
+ /* LDAP filter escaping (RFC4515) */
+ if (!isprint(c) || strchr("*()\\", c)) {
+ flags |= T_ESCAPE_LDAP_FILTER;
+ }
+
printf("%u%c", flags, (c < 255) ? ',' : ' ');
}