From owner-svn-src-head@freebsd.org Sun Aug 9 05:14:33 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 191D299DF81; Sun, 9 Aug 2015 05:14:33 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 073949FF; Sun, 9 Aug 2015 05:14:33 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t795EWC8068464; Sun, 9 Aug 2015 05:14:33 GMT (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t795EQHq068437; Sun, 9 Aug 2015 05:14:26 GMT (envelope-from peter@FreeBSD.org) Message-Id: <201508090514.t795EQHq068437@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: peter set sender to peter@FreeBSD.org using -f From: Peter Wemm Date: Sun, 9 Aug 2015 05:14:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r286503 - in head: contrib/apr contrib/apr/encoding contrib/apr/include contrib/apr/locks/unix contrib/apr/memory/unix contrib/apr/misc/unix contrib/apr/network_io/unix contrib/apr/poll... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Aug 2015 05:14:33 -0000 Author: peter Date: Sun Aug 9 05:14:25 2015 New Revision: 286503 URL: https://svnweb.freebsd.org/changeset/base/286503 Log: Update apr-1.5.1 to 1.5.2 Modified: head/contrib/apr/CHANGES head/contrib/apr/CMakeLists.txt head/contrib/apr/Makefile.in head/contrib/apr/NOTICE head/contrib/apr/NWGNUmakefile head/contrib/apr/apr.dsp head/contrib/apr/apr.spec head/contrib/apr/build-outputs.mk head/contrib/apr/configure head/contrib/apr/configure.in head/contrib/apr/encoding/apr_escape.c head/contrib/apr/include/apr_skiplist.h head/contrib/apr/include/apr_version.h head/contrib/apr/libapr.dsp head/contrib/apr/locks/unix/proc_mutex.c head/contrib/apr/memory/unix/apr_pools.c head/contrib/apr/misc/unix/errorcodes.c head/contrib/apr/network_io/unix/sockaddr.c head/contrib/apr/network_io/unix/sockets.c head/contrib/apr/poll/unix/epoll.c head/contrib/apr/poll/unix/kqueue.c head/contrib/apr/poll/unix/poll.c head/contrib/apr/poll/unix/pollcb.c head/contrib/apr/poll/unix/port.c head/contrib/apr/poll/unix/z_asio.c head/contrib/apr/tables/apr_skiplist.c head/usr.bin/svn/lib/libapr/apr.h head/usr.bin/svn/lib/libapr/apr_private.h Directory Properties: head/contrib/apr/ (props changed) Modified: head/contrib/apr/CHANGES ============================================================================== --- head/contrib/apr/CHANGES Sun Aug 9 04:38:21 2015 (r286502) +++ head/contrib/apr/CHANGES Sun Aug 9 05:14:25 2015 (r286503) @@ -1,4 +1,63 @@ -*- coding: utf-8 -*- +Changes for APR 1.5.2 + + *) SECURITY: CVE-2015-1829 (cve.mitre.org) + APR applications using APR named pipe support on Windows can be + vulnerable to a pipe squatting attack from a local process; the extent + of the vulnerability, when present, depends on the application. + Initial analysis and report was provided by John Hernandez of Casaba + Security via HP SSRT Security Alert. [Yann Ylavic] + + *) apr_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. [] 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)] + + *) apr_skiplist: Optimize the number of allocations by reusing pooled or + malloc()ed nodes for the lifetime of the skiplist. [Yann Ylavic] + + *) apr_skiplist: Fix possible multiple-free() on the same value in + apr_skiplist_remove_all(). [Yann Ylavic] + + *) apr_pollset: On z/OS, threadsafe apr_pollset_poll() may return + "EDC8102I Operation would block" under load. + [Pat Odonnell ] + + *) On z/OS, apr_sockaddr_info_get() with family == APR_UNSPEC was not + returning IPv4 addresses if any IPv6 addresses were returned. + [Eric Covener] + + *) Windows cmake build: Fix an incompatibility with cmake 2.8.12 and + later. [Jeff Trawick] + + *) apr_global_mutex/apr_proc_mutex: Resolve failures with the + POSIX sem implementation in environments which receive signals. + [Jeff Trawick] + + *) apr_skiplist: Fix potential corruption of skiplists leading to + results or crashes. [Takashi Sato , Eric Covener] + PR 56654. + + *) Improve platform detection by updating config.guess and config.sub. + [Rainer Jung] + Changes for APR 1.5.1 *) apr_os_proc_mutex_get() on Unix: Avoid segfault for cross- @@ -37,8 +96,8 @@ Changes for APR 1.5.1 *) Correct a regression in 1.5.0 which affected out-of-tree builds on Unix. [Rainer Jung] - *) Improve platform detection for bundled expat by updating - config.guess and config.sub. [Rainer Jung] + *) Improve platform detection by updating config.guess and config.sub. + [Rainer Jung] Changes for APR 1.5.0 Modified: head/contrib/apr/CMakeLists.txt ============================================================================== --- head/contrib/apr/CMakeLists.txt Sun Aug 9 04:38:21 2015 (r286502) +++ head/contrib/apr/CMakeLists.txt Sun Aug 9 05:14:25 2015 (r286503) @@ -234,6 +234,7 @@ SET(APR_TEST_SOURCES test/testprocmutex.c test/testrand.c test/testshm.c + test/testskiplist.c test/testsleep.c test/testsock.c test/testsockets.c @@ -252,7 +253,6 @@ SET(APR_TEST_SOURCES SET(install_targets) SET(install_bin_pdb) -SET(install_lib_pdb) # libapr-1 is shared, apr-1 is static ADD_LIBRARY(libapr-1 SHARED ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED} libapr.rc) @@ -264,7 +264,6 @@ ADD_DEPENDENCIES(libapr-1 test_char_head ADD_LIBRARY(apr-1 STATIC ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED}) SET(install_targets ${install_targets} apr-1) -SET(install_lib_pdb ${install_lib_pdb} ${PROJECT_BINARY_DIR}/apr-1.pdb) TARGET_LINK_LIBRARIES(apr-1 ${APR_SYSTEM_LIBS}) SET_TARGET_PROPERTIES(apr-1 PROPERTIES COMPILE_DEFINITIONS "APR_DECLARE_STATIC;WINNT") ADD_DEPENDENCIES(apr-1 test_char_header) @@ -272,12 +271,10 @@ ADD_DEPENDENCIES(apr-1 test_char_header) # libaprapp-1 and aprapp-1 are static ADD_LIBRARY(libaprapp-1 STATIC misc/win32/apr_app.c misc/win32/internal.c ${APR_PUBLIC_HEADERS_GENERATED}) SET(install_targets ${install_targets} libaprapp-1) -SET(install_lib_pdb ${install_lib_pdb} ${PROJECT_BINARY_DIR}/libaprapp-1.pdb) SET_TARGET_PROPERTIES(libaprapp-1 PROPERTIES COMPILE_DEFINITIONS "APR_APP;WINNT") ADD_LIBRARY(aprapp-1 STATIC misc/win32/apr_app.c misc/win32/internal.c ${APR_PUBLIC_HEADERS_GENERATED}) SET(install_targets ${install_targets} aprapp-1) -SET(install_lib_pdb ${install_lib_pdb} ${PROJECT_BINARY_DIR}/aprapp-1.pdb) SET_TARGET_PROPERTIES(aprapp-1 PROPERTIES COMPILE_DEFINITIONS "APR_DECLARE_STATIC;APR_APP;WINNT") IF(APR_BUILD_TESTAPR) @@ -394,10 +391,6 @@ IF(INSTALL_PDB) INSTALL(FILES ${install_bin_pdb} DESTINATION bin CONFIGURATIONS RelWithDebInfo Debug) - - INSTALL(FILES ${install_lib_pdb} - DESTINATION lib - CONFIGURATIONS RelWithDebInfo Debug) ENDIF() INSTALL(FILES ${APR_PUBLIC_HEADERS_STATIC} ${APR_PUBLIC_HEADERS_GENERATED} DESTINATION include) Modified: head/contrib/apr/Makefile.in ============================================================================== --- head/contrib/apr/Makefile.in Sun Aug 9 04:38:21 2015 (r286502) +++ head/contrib/apr/Makefile.in Sun Aug 9 05:14:25 2015 (r286503) @@ -129,11 +129,11 @@ check: $(TARGET_LIB) etags: etags `find . -name '*.[ch]'` -make_tools_dir: +OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS) +tools/gen_test_char.lo: tools/gen_test_char.c $(APR_MKDIR) tools + $(LT_COMPILE) -OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS) -tools/gen_test_char.lo: make_tools_dir tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char) $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS) Modified: head/contrib/apr/NOTICE ============================================================================== --- head/contrib/apr/NOTICE Sun Aug 9 04:38:21 2015 (r286502) +++ head/contrib/apr/NOTICE Sun Aug 9 05:14:25 2015 (r286503) @@ -1,5 +1,5 @@ Apache Portable Runtime -Copyright (c) 2000-2014 The Apache Software Foundation. +Copyright (c) 2000-2015 The Apache Software Foundation. This product includes software developed at The Apache Software Foundation (http://www.apache.org/). Modified: head/contrib/apr/NWGNUmakefile ============================================================================== --- head/contrib/apr/NWGNUmakefile Sun Aug 9 04:38:21 2015 (r286502) +++ head/contrib/apr/NWGNUmakefile Sun Aug 9 05:14:25 2015 (r286503) @@ -50,6 +50,7 @@ include $(APR_WORK)/build/NWGNUhead.inc # XINCDIRS += \ $(APR)/include \ + $(APR)/include/private \ $(APR)/include/arch/NetWare \ $(APR)/include/arch/unix \ $(APR)/memory/unix \ @@ -293,11 +294,13 @@ FILES_nlm_exports = \ FILES_lib_objs = \ $(OBJDIR)/apr_atomic.o \ $(OBJDIR)/apr_cpystrn.o \ + $(OBJDIR)/apr_escape.o \ $(OBJDIR)/apr_fnmatch.o \ $(OBJDIR)/apr_getpass.o \ $(OBJDIR)/apr_hash.o \ $(OBJDIR)/apr_pools.o \ $(OBJDIR)/apr_random.o \ + $(OBJDIR)/apr_skiplist.o \ $(OBJDIR)/apr_snprintf.o \ $(OBJDIR)/apr_strings.o \ $(OBJDIR)/apr_strnatcmp.o \ @@ -407,7 +410,7 @@ endif vpath %.c atomic/netware:strings:tables:passwd:lib:time/unix vpath %.c file_io/unix:locks/netware:misc/netware:misc/unix:threadproc/netware vpath %.c poll/unix:shmem/unix:support/unix:random/unix -vpath %.c dso/netware:memory/unix:mmap/unix:user/netware +vpath %.c dso/netware:memory/unix:mmap/unix:user/netware:encoding # Use the win32 network_io if Winsock is being used ifndef USE_STDSOCKETS Modified: head/contrib/apr/apr.dsp ============================================================================== --- head/contrib/apr/apr.dsp Sun Aug 9 04:38:21 2015 (r286502) +++ head/contrib/apr/apr.dsp Sun Aug 9 05:14:25 2015 (r286503) @@ -907,69 +907,6 @@ SOURCE=.\include\apr_version.h # Begin Source File SOURCE=.\include\apr_want.h - -!IF "$(CFG)" == "apr - Win32 Release" - -# Begin Custom Build -InputPath=.\include\apr_want.h - -".\LibR\gen_test_char.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - type .\include\apr.hw > .\include\apr.h - -# End Custom Build - -!ELSEIF "$(CFG)" == "apr - Win32 Debug" - -# Begin Custom Build -InputPath=.\include\apr_want.h - -".\LibD\gen_test_char.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - type .\include\apr.hw > .\include\apr.h - -# End Custom Build - -!ELSEIF "$(CFG)" == "apr - Win32 Release9x" - -# Begin Custom Build -InputPath=.\include\apr_want.h - -".\9x\LibR\gen_test_char.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - type .\include\apr.hw > .\include\apr.h - -# End Custom Build - -!ELSEIF "$(CFG)" == "apr - Win32 Debug9x" - -# Begin Custom Build -InputPath=.\include\apr_want.h - -".\9x\LibD\gen_test_char.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - type .\include\apr.hw > .\include\apr.h - -# End Custom Build - -!ELSEIF "$(CFG)" == "apr - x64 Release" - -# Begin Custom Build -InputPath=.\include\apr_want.h - -".\x64\LibR\gen_test_char.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - type .\include\apr.hw > .\include\apr.h - -# End Custom Build - -!ELSEIF "$(CFG)" == "apr - x64 Debug" - -# Begin Custom Build -InputPath=.\include\apr_want.h - -".\x64\LibD\gen_test_char.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - type .\include\apr.hw > .\include\apr.h - -# End Custom Build - -!ENDIF - # End Source File # End Group # End Target Modified: head/contrib/apr/apr.spec ============================================================================== --- head/contrib/apr/apr.spec Sun Aug 9 04:38:21 2015 (r286502) +++ head/contrib/apr/apr.spec Sun Aug 9 05:14:25 2015 (r286503) @@ -3,7 +3,7 @@ Summary: Apache Portable Runtime library Name: apr -Version: 1.5.1 +Version: 1.5.2 Release: 1 License: Apache Software License Group: System Environment/Libraries @@ -76,7 +76,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %doc docs/APRDesign.html docs/canonical_filenames.html %doc docs/incomplete_types docs/non_apr_programs -%doc --parents html +%doc html %{_bindir}/apr*config %{_libdir}/libapr-%{aprver}.*a %{_libdir}/libapr-%{aprver}.so Modified: head/contrib/apr/build-outputs.mk ============================================================================== --- head/contrib/apr/build-outputs.mk Sun Aug 9 04:38:21 2015 (r286502) +++ head/contrib/apr/build-outputs.mk Sun Aug 9 05:14:25 2015 (r286503) @@ -251,7 +251,7 @@ file_io/win32/filestat.lo: file_io/win32 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/pipe.lo: file_io/win32/pipe.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/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 Modified: head/contrib/apr/configure ============================================================================== --- head/contrib/apr/configure Sun Aug 9 04:38:21 2015 (r286502) +++ head/contrib/apr/configure Sun Aug 9 05:14:25 2015 (r286503) @@ -6802,10 +6802,10 @@ if test "x$apr_preload_done" != "xyes" ; *-apple-darwin*) if test "x$CPPFLAGS" = "x"; then - test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp\"" - CPPFLAGS="-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp" + test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK\"" + CPPFLAGS="-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK" else - apr_addto_bugger="-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp" + apr_addto_bugger="-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK" for i in $apr_addto_bugger; do apr_addto_duplicate="0" for j in $CPPFLAGS; do @@ -18794,7 +18794,34 @@ if test "${enable_nonportable_atomics+se else case $host_cpu in i[456]86) force_generic_atomics=yes ;; - *) force_generic_atomics=no ;; + *) force_generic_atomics=no + case $host in + *solaris2.10*) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +void *ptr = NULL; atomic_cas_ptr(&ptr, NULL, NULL); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + force_generic_atomics=yes + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $force_generic_atomics = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: nonportable atomic support disabled, system needs Patch-ID 118884 or 118885" >&5 +$as_echo "$as_me: nonportable atomic support disabled, system needs Patch-ID 118884 or 118885" >&6;} + fi + ;; + esac + ;; esac fi @@ -22292,7 +22319,7 @@ else fi done -for ac_func in getpass getpassphrase gmtime_r localtime_r mkstemp +for ac_func in getpass getpassphrase gmtime_r localtime_r 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" @@ -22304,6 +22331,23 @@ _ACEOF fi done +case $host in + *-hp-hpux*) + ;; + *) + for ac_func in mkstemp +do : + ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp" +if test "x$ac_cv_func_mkstemp" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MKSTEMP 1 +_ACEOF + +fi +done + + ;; +esac @@ -23902,7 +23946,7 @@ _ACEOF if test "${ac_cv_sizeof_off_t}${apr_cv_use_lfs64}" = "4yes"; then # Enable LFS aprlfs=1 - for ac_func in mmap64 sendfile64 sendfilev64 mkstemp64 readdir64_r + for ac_func in mmap64 sendfile64 sendfilev64 readdir64_r 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" @@ -23914,6 +23958,23 @@ _ACEOF fi done + case $host in + *-hp-hpux*) + ;; + *) + for ac_func in mkstemp64 +do : + ac_fn_c_check_func "$LINENO" "mkstemp64" "ac_cv_func_mkstemp64" +if test "x$ac_cv_func_mkstemp64" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MKSTEMP64 1 +_ACEOF + +fi +done + + ;; + esac elif test "${ac_cv_sizeof_off_t}" != "${ac_cv_sizeof_size_t}"; then # unsure of using -gt above is as portable, can can't forsee where # off_t can legitimately be smaller than size_t Modified: head/contrib/apr/configure.in ============================================================================== --- head/contrib/apr/configure.in Sun Aug 9 04:38:21 2015 (r286502) +++ head/contrib/apr/configure.in Sun Aug 9 05:14:25 2015 (r286503) @@ -640,7 +640,20 @@ AC_ARG_ENABLE(nonportable-atomics, ], [case $host_cpu in i[[456]]86) force_generic_atomics=yes ;; - *) force_generic_atomics=no ;; + *) force_generic_atomics=no + case $host in + *solaris2.10*) + AC_TRY_COMPILE( + [#include ], + [void *ptr = NULL; atomic_cas_ptr(&ptr, NULL, NULL);],, + [force_generic_atomics=yes] + ) + if test $force_generic_atomics = yes; then + AC_MSG_NOTICE([nonportable atomic support disabled, system needs Patch-ID 118884 or 118885]) + fi + ;; + esac + ;; esac ]) @@ -1400,7 +1413,15 @@ if test "$native_mmap_emul" = "1"; then mmap="1" fi AC_CHECK_FUNCS(memmove, [ have_memmove="1" ], [have_memmove="0" ]) -AC_CHECK_FUNCS([getpass getpassphrase gmtime_r localtime_r mkstemp]) +AC_CHECK_FUNCS([getpass getpassphrase gmtime_r localtime_r]) +case $host in + *-hp-hpux*) + dnl mkstemp is limited to 26 temporary files (a-z); use APR replacement + ;; + *) + AC_CHECK_FUNCS(mkstemp) + ;; +esac AC_SUBST(fork) AC_SUBST(have_inet_addr) @@ -1801,7 +1822,15 @@ APR_CHECK_SIZEOF_EXTENDED([#include 0 indicates placement + * before this node. * */ typedef int (*apr_skiplist_compare) (void *, void *); @@ -171,7 +173,8 @@ APR_DECLARE(void *) apr_skiplist_next(ap APR_DECLARE(void *) apr_skiplist_previous(apr_skiplist *sl, apr_skiplistnode **iter); /** - * Insert an element into the skip list using the specified comparison function. + * Insert an element into the skip list using the specified comparison function + * if it does not already exist. * @param sl The skip list * @param data The element to insert * @param comp The comparison function to use for placement into the skip list @@ -180,7 +183,8 @@ APR_DECLARE(apr_skiplistnode *) apr_skip void *data, apr_skiplist_compare comp); /** - * Insert an element into the skip list using the existing comparison function. + * Insert an element into the skip list using the existing comparison function + * if it does not already exist (as determined by the comparison function) * @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 @@ -190,7 +194,7 @@ APR_DECLARE(apr_skiplistnode *) apr_skip /** * Remove an element from the skip list using the specified comparison function for - * locating the element. + * locating the element. In the case of duplicates, the 1st entry will be removed. * @param sl The skip list * @param data The element to remove * @param myfree A function to be called for each removed element @@ -203,7 +207,7 @@ APR_DECLARE(int) apr_skiplist_remove_com /** * Remove an element from the skip list using the existing comparison function for - * locating the element. + * locating the element. In the case of duplicates, the 1st entry will be removed. * @param sl The skip list * @param data The element to remove * @param myfree A function to be called for each removed element @@ -229,7 +233,7 @@ APR_DECLARE(void) apr_skiplist_remove_al APR_DECLARE(void) apr_skiplist_destroy(apr_skiplist *sl, apr_skiplist_freefunc myfree); /** - * Return the first element in the skip list, leaving the element in the skip list. + * Return the first element in the skip list, removing the element from the skip list. * @param sl The skip list * @param myfree A function to be called for the removed element * @remark NULL will be returned if there are no elements Modified: head/contrib/apr/include/apr_version.h ============================================================================== --- head/contrib/apr/include/apr_version.h Sun Aug 9 04:38:21 2015 (r286502) +++ head/contrib/apr/include/apr_version.h Sun Aug 9 05:14:25 2015 (r286503) @@ -38,7 +38,7 @@ */ -#define APR_COPYRIGHT "Copyright (c) 2000-2014 The Apache Software " \ +#define APR_COPYRIGHT "Copyright (c) 2000-2015 The Apache Software " \ "Foundation or its licensors, as applicable." /* The numeric compile-time version constants. These constants are the @@ -62,7 +62,7 @@ * The Patch Level never includes API changes, simply bug fixes. * Reset to 0 when upgrading APR_MINOR_VERSION */ -#define APR_PATCH_VERSION 1 +#define APR_PATCH_VERSION 2 /** * The symbol APR_IS_DEV_VERSION is only defined for internal, Modified: head/contrib/apr/libapr.dsp ============================================================================== --- head/contrib/apr/libapr.dsp Sun Aug 9 04:38:21 2015 (r286502) +++ head/contrib/apr/libapr.dsp Sun Aug 9 05:14:25 2015 (r286503) @@ -765,7 +765,7 @@ SOURCE=.\include\apr_escape.h # Begin Custom Build - Creating gen_test_char.exe and apr_escape_test_char.h InputPath=.\include\apr_escape.h -".\Release\gen_test_char.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" +".\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.\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 @@ -776,7 +776,7 @@ InputPath=.\include\apr_escape.h # Begin Custom Build - Creating gen_test_char.exe and apr_escape_test_char.h InputPath=.\include\apr_escape.h -".\Debug\gen_test_char.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" +".\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.\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 @@ -787,7 +787,7 @@ InputPath=.\include\apr_escape.h # Begin Custom Build - Creating gen_test_char.exe and apr_escape_test_char.h InputPath=.\include\apr_escape.h -".\9x\Release\gen_test_char.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" +".\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 @@ -798,7 +798,7 @@ InputPath=.\include\apr_escape.h # Begin Custom Build - Creating gen_test_char.exe and apr_escape_test_char.h InputPath=.\include\apr_escape.h -".\9x\Debug\gen_test_char.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" +".\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 @@ -809,7 +809,7 @@ InputPath=.\include\apr_escape.h # Begin Custom Build - Creating gen_test_char.exe and apr_escape_test_char.h InputPath=.\include\apr_escape.h -".\x64\Release\gen_test_char.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" +".\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\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 @@ -820,7 +820,7 @@ InputPath=.\include\apr_escape.h # Begin Custom Build - Creating gen_test_char.exe and apr_escape_test_char.h InputPath=.\include\apr_escape.h -".\x64\Debug\gen_test_char.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" +".\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\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 @@ -952,69 +952,6 @@ SOURCE=.\include\apr_version.h # Begin Source File SOURCE=.\include\apr_want.h - -!IF "$(CFG)" == "libapr - Win32 Release" - -# Begin Custom Build -InputPath=.\include\apr_want.h - -".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - type .\include\apr.hw > .\include\apr.h - -# End Custom Build - -!ELSEIF "$(CFG)" == "libapr - Win32 Debug" - -# Begin Custom Build -InputPath=.\include\apr_want.h - -".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - type .\include\apr.hw > .\include\apr.h - -# End Custom Build - -!ELSEIF "$(CFG)" == "libapr - Win32 Release9x" - -# Begin Custom Build -InputPath=.\include\apr_want.h - -".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - type .\include\apr.hw > .\include\apr.h - -# End Custom Build - -!ELSEIF "$(CFG)" == "libapr - Win32 Debug9x" - -# Begin Custom Build -InputPath=.\include\apr_want.h - -".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - type .\include\apr.hw > .\include\apr.h - -# End Custom Build - -!ELSEIF "$(CFG)" == "libapr - x64 Release" - -# Begin Custom Build -InputPath=.\include\apr_want.h - -".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - type .\include\apr.hw > .\include\apr.h - -# End Custom Build - -!ELSEIF "$(CFG)" == "libapr - x64 Debug" - -# Begin Custom Build -InputPath=.\include\apr_want.h - -".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - type .\include\apr.hw > .\include\apr.h - -# End Custom Build - -!ENDIF - # End Source File # End Group # Begin Source File Modified: head/contrib/apr/locks/unix/proc_mutex.c ============================================================================== --- head/contrib/apr/locks/unix/proc_mutex.c Sun Aug 9 04:38:21 2015 (r286502) +++ head/contrib/apr/locks/unix/proc_mutex.c Sun Aug 9 05:14:25 2015 (r286503) @@ -114,7 +114,9 @@ static apr_status_t proc_mutex_posix_cre usec = apr_time_usec(now); apr_snprintf(semname, sizeof(semname), "/ApR.%lxZ%lx", sec, usec); } - psem = sem_open(semname, O_CREAT | O_EXCL, 0644, 1); + do { + psem = sem_open(semname, O_CREAT | O_EXCL, 0644, 1); + } while (psem == (sem_t *)SEM_FAILED && errno == EINTR); if (psem == (sem_t *)SEM_FAILED) { if (errno == ENAMETOOLONG) { /* Oh well, good try */ @@ -122,7 +124,9 @@ static apr_status_t proc_mutex_posix_cre } else { return errno; } - psem = sem_open(semname, O_CREAT | O_EXCL, 0644, 1); + do { + psem = sem_open(semname, O_CREAT | O_EXCL, 0644, 1); + } while (psem == (sem_t *)SEM_FAILED && errno == EINTR); } if (psem == (sem_t *)SEM_FAILED) { @@ -140,7 +144,12 @@ static apr_status_t proc_mutex_posix_cre static apr_status_t proc_mutex_posix_acquire(apr_proc_mutex_t *mutex) { - if (sem_wait(mutex->psem_interproc) < 0) { + int rc; + + do { + rc = sem_wait(mutex->psem_interproc); + } while (rc < 0 && errno == EINTR); + if (rc < 0) { return errno; } mutex->curr_locked = 1; @@ -149,7 +158,12 @@ static apr_status_t proc_mutex_posix_acq static apr_status_t proc_mutex_posix_tryacquire(apr_proc_mutex_t *mutex) { - if (sem_trywait(mutex->psem_interproc) < 0) { + int rc; + + do { + rc = sem_trywait(mutex->psem_interproc); + } while (rc < 0 && errno == EINTR); + if (rc < 0) { if (errno == EAGAIN) { return APR_EBUSY; } Modified: head/contrib/apr/memory/unix/apr_pools.c ============================================================================== --- head/contrib/apr/memory/unix/apr_pools.c Sun Aug 9 04:38:21 2015 (r286502) +++ head/contrib/apr/memory/unix/apr_pools.c Sun Aug 9 05:14:25 2015 (r286503) @@ -1135,21 +1135,12 @@ APR_DECLARE(char *) apr_pvsprintf(apr_po * room to hold the NUL terminator. */ if (ps.node->first_avail == ps.node->endp) { - if (psprintf_flush(&ps.vbuff) == -1) { - if (pool->abort_fn) { - pool->abort_fn(APR_ENOMEM); - } - - return NULL; - } + if (psprintf_flush(&ps.vbuff) == -1) + goto error; } - if (apr_vformatter(psprintf_flush, &ps.vbuff, fmt, ap) == -1) { - if (pool->abort_fn) - pool->abort_fn(APR_ENOMEM); - - return NULL; - } + if (apr_vformatter(psprintf_flush, &ps.vbuff, fmt, ap) == -1) + goto error; strp = ps.vbuff.curpos; *strp++ = '\0'; @@ -1195,6 +1186,15 @@ APR_DECLARE(char *) apr_pvsprintf(apr_po list_insert(active, node); return strp; + +error: + 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); + } + return NULL; } Modified: head/contrib/apr/misc/unix/errorcodes.c ============================================================================== --- head/contrib/apr/misc/unix/errorcodes.c Sun Aug 9 04:38:21 2015 (r286502) +++ head/contrib/apr/misc/unix/errorcodes.c Sun Aug 9 05:14:25 2015 (r286503) @@ -39,6 +39,8 @@ static char *stuffbuffer(char *buf, apr_ static char *apr_error_string(apr_status_t statcode) { switch (statcode) { + case APR_ENOSTAT: + return "Could not perform a stat on the file."; case APR_ENOPOOL: return "A new pool could not be created."; case APR_EBADDATE: @@ -73,7 +75,10 @@ static char *apr_error_string(apr_status return "The specified IP address is invalid."; case APR_EBADMASK: return "The specified network mask is invalid."; - + case APR_ESYMNOTFOUND: + return "Could not find the requested symbol."; + case APR_ENOTENOUGHENTROPY: + return "Not enough entropy to continue."; case APR_INCHILD: return "Your code just forked, and you are currently executing in the " @@ -128,10 +133,12 @@ static char *apr_error_string(apr_status return "The given path is misformatted or contained invalid characters"; case APR_EPATHWILD: return "The given path contained wildcard characters"; + case APR_EBUSY: + return "The given lock was busy."; case APR_EPROC_UNKNOWN: return "The process is not recognized."; case APR_EGENERAL: - return "Internal error"; + return "Internal error (specific information not available)"; default: return "Error string not specified yet"; } Modified: head/contrib/apr/network_io/unix/sockaddr.c ============================================================================== --- head/contrib/apr/network_io/unix/sockaddr.c Sun Aug 9 04:38:21 2015 (r286502) +++ head/contrib/apr/network_io/unix/sockaddr.c Sun Aug 9 05:14:25 2015 (r286503) @@ -325,6 +325,16 @@ static apr_status_t call_resolver(apr_so hints.ai_flags = AI_ADDRCONFIG; } #endif + +#ifdef __MVS__ + /* z/OS will not return IPv4 address under AF_UNSPEC if any IPv6 results + * are returned, w/o AI_ALL. + */ + if (family == APR_UNSPEC) { + hints.ai_flags |= AI_ALL; + } +#endif + if(hostname == NULL) { #ifdef AI_PASSIVE /* If hostname is NULL, assume we are trying to bind to all Modified: head/contrib/apr/network_io/unix/sockets.c ============================================================================== --- head/contrib/apr/network_io/unix/sockets.c Sun Aug 9 04:38:21 2015 (r286502) +++ head/contrib/apr/network_io/unix/sockets.c Sun Aug 9 05:14:25 2015 (r286503) @@ -145,13 +145,22 @@ apr_status_t apr_socket_create(apr_socke #ifndef HAVE_SOCK_CLOEXEC { int flags; + apr_status_t rv; - if ((flags = fcntl((*new)->socketdes, F_GETFD)) == -1) - return errno; + if ((flags = fcntl((*new)->socketdes, F_GETFD)) == -1) { + rv = errno; + close((*new)->socketdes); + (*new)->socketdes = -1; + return rv; + } flags |= FD_CLOEXEC; - if (fcntl((*new)->socketdes, F_SETFD, flags) == -1) - return errno; + if (fcntl((*new)->socketdes, F_SETFD, flags) == -1) { + rv = errno; + close((*new)->socketdes); + (*new)->socketdes = -1; + return rv; + } } #endif @@ -306,13 +315,22 @@ apr_status_t apr_socket_accept(apr_socke #ifndef HAVE_ACCEPT4 { int flags; + apr_status_t rv; - if ((flags = fcntl((*new)->socketdes, F_GETFD)) == -1) - return errno; + if ((flags = fcntl((*new)->socketdes, F_GETFD)) == -1) { + rv = errno; + close((*new)->socketdes); + (*new)->socketdes = -1; + return rv; + } flags |= FD_CLOEXEC; - if (fcntl((*new)->socketdes, F_SETFD, flags) == -1) - return errno; + if (fcntl((*new)->socketdes, F_SETFD, flags) == -1) { + rv = errno; + close((*new)->socketdes); + (*new)->socketdes = -1; + return rv; + } } #endif Modified: head/contrib/apr/poll/unix/epoll.c ============================================================================== --- head/contrib/apr/poll/unix/epoll.c Sun Aug 9 04:38:21 2015 (r286502) +++ head/contrib/apr/poll/unix/epoll.c Sun Aug 9 05:14:25 2015 (r286503) @@ -104,14 +104,22 @@ static apr_status_t impl_pollset_create( #ifndef HAVE_EPOLL_CREATE1 { - int flags; + int fd_flags; - if ((flags = fcntl(fd, F_GETFD)) == -1) - return errno; + if ((fd_flags = fcntl(fd, F_GETFD)) == -1) { + rv = errno; + close(fd); + pollset->p = NULL; + return rv; + } - flags |= FD_CLOEXEC; - if (fcntl(fd, F_SETFD, flags) == -1) - return errno; + fd_flags |= FD_CLOEXEC; + if (fcntl(fd, F_SETFD, fd_flags) == -1) { + rv = errno; + close(fd); + pollset->p = NULL; + return rv; + } } #endif @@ -122,11 +130,13 @@ static apr_status_t impl_pollset_create( ((rv = apr_thread_mutex_create(&pollset->p->ring_lock, APR_THREAD_MUTEX_DEFAULT, p)) != APR_SUCCESS)) { + close(fd); pollset->p = NULL; return rv; } #else if (flags & APR_POLLSET_THREADSAFE) { + close(fd); pollset->p = NULL; return APR_ENOTIMPL; } @@ -345,14 +355,23 @@ static apr_status_t impl_pollcb_create(a #ifndef HAVE_EPOLL_CREATE1 { - int flags; + int fd_flags; + apr_status_t rv; - if ((flags = fcntl(fd, F_GETFD)) == -1) - return errno; + if ((fd_flags = fcntl(fd, F_GETFD)) == -1) { + rv = errno; + close(fd); + pollcb->fd = -1; + return rv; + } - flags |= FD_CLOEXEC; - if (fcntl(fd, F_SETFD, flags) == -1) - return errno; + fd_flags |= FD_CLOEXEC; + if (fcntl(fd, F_SETFD, fd_flags) == -1) { + rv = errno; + close(fd); + pollcb->fd = -1; + return rv; + } } #endif Modified: head/contrib/apr/poll/unix/kqueue.c ============================================================================== --- head/contrib/apr/poll/unix/kqueue.c Sun Aug 9 04:38:21 2015 (r286502) +++ head/contrib/apr/poll/unix/kqueue.c Sun Aug 9 05:14:25 2015 (r286503) @@ -115,12 +115,20 @@ static apr_status_t impl_pollset_create( { int flags; - if ((flags = fcntl(pollset->p->kqueue_fd, F_GETFD)) == -1) - return errno; + if ((flags = fcntl(pollset->p->kqueue_fd, F_GETFD)) == -1) { + rv = errno; + close(pollset->p->kqueue_fd); + pollset->p = NULL; + return rv; + } flags |= FD_CLOEXEC; - if (fcntl(pollset->p->kqueue_fd, F_SETFD, flags) == -1) - return errno; + if (fcntl(pollset->p->kqueue_fd, F_SETFD, flags) == -1) { + rv = errno; + close(pollset->p->kqueue_fd); + pollset->p = NULL; + return rv; + } } pollset->p->result_set = apr_palloc(p, pollset->p->setsize * sizeof(apr_pollfd_t)); @@ -338,13 +346,22 @@ static apr_status_t impl_pollcb_create(a { int flags; + apr_status_t rv; - if ((flags = fcntl(fd, F_GETFD)) == -1) - return errno; *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***