Index: contrib/apr-util/CHANGES =================================================================== --- contrib/apr-util/CHANGES +++ contrib/apr-util/CHANGES @@ -1,141 +1,62 @@ -*- coding: utf-8 -*- -Changes with APR-util 1.5.4 +Changes with APR-util 1.6.1 - *) MySQL driver: Fix incorrect handling of bad parameter in the - driver support for apr_dbd_transaction_end(). PR 56330. - [Weiqiang Li ] + *) Win32: Add function exports from new apr_crypto API's missing in 1.6.0. - *) apr_crypto_get_driver(): Fix invalid storage reference on error path. - [Philip Martin ] + *) Win32: Introduce XML_PARSER build-time variable to select the expat + library name to be linked to libaprutil-1.dll. See Makefile.win - *) Fix compile failure for Android. PR 56627. [Fredrik Fornwall - , Jeff Trawick] + *) Win32: Removed lingering xml/xml.dsp project forked from the expat + Project in the 1.9x era. Use expat's maintained build schema instead, + prior to building apr-util. - *) Fix to let ODBC driver build with MSVC6, which does not have intptr_t - [Tom Donovan] + *) apr_crypto: Fix compatibility with LibreSSL. PR 61596. + [Bernard Spil , Yann Ylavic] - *) Windows cmake build: Fix incompatiblities with Visual Studio - generators with all cmake versions, and the NMake Makefile generator - with cmake 2.8.12 and later. PR 56616 and other bugs. [Jeff Trawick, - Bert Huijben] + *) sdbm: better database/page validation to fail cleanly when corrupted. + [Yann Ylavic] - *) Fix detection of Berkeley DB 6.0. PR 55277. - [Lars Wendler ] +Changes with APR-util 1.6.0 - *) Improve platform detection for bundled expat by updating - config.guess and config.sub. [Rainer Jung] + *) The expat dependency of apr-util is no longer built with apr-util. + Install expat (including development headers and libraries) first + before building apr-util. [https://libexpat.github.io/] -Changes with APR-util 1.5.3 + *) Mark apr_dbd_freetds as unsupported, and remove it from all builds + [Nick Kew] - *) Cygwin: Use correct file extension when loading APR DSOs. PR 55587. - [Carlo Bramini ] + *) Update MySQL build to stop using libmysqlclient_r. + [Petr Sumbera ] - *) Add experimental cmake-based build system for Windows. Refer to - README.cmake for more information. [Jeff Trawick, Tom Donovan] + *) apr_buckets: Add apr_bucket_file_set_buf_size() which allows to configure + the size of the buffer used to read files. [Yann Ylavic] - *) Fix warnings in odbc driver on 64bit systems. - PR 55197 [Tom Donovan] + *) apr_crypto: avoid excessive iteration in bcrypt hash. + [Hanno Böck ] - *) Add support to apr_memcache for unix domain sockets. PR 54573 [Remi - Gacogne ] + *) apr_siphash: Implement keyed hash function SipHash. [Yann Ylavic] - *) Add support for Berkeley DB 6.0. [Rainer Jung] + *) apr_crypto: Add apr_crypto_key() function which supports keys + generated from a passphrase or a raw secret provided by the caller. + Deprecate apr_crypto_passphrase(). [Graham Leggett] - *) Improve platform detection for bundled expat by updating - config.guess and config.sub. [Rainer Jung] + *) apr_crypto_nss: Ensure the SECItem returned by PK11_ParamFromIV + is properly freed. [Graham Leggett] -Changes with APR-util 1.5.2 + *) apr_crypto: Don't cache the driver if initialisation fails. This + stops the second and subsequent attempt to use the API from failing + claiming the library is not initialised. [Graham Leggett] - *) Windows: Add command line makefiles. [Gregg Smith] + *) apr_crypto: Add a native CommonCrypto implementation for iOS and OSX + where OpenSSL has been deprecated. [Graham Leggett] - *) apr_uri_parse(): Do not accept invalid characters in the scheme. - Per RFC 3986 3.3, enforce that the first segment of a relative path does - not contain a colon. PR 52479. [Stefan Fritsch] + *) apr_xml_to_text: Add style APR_XML_X2T_PARSED to maintain a + consistent namespace prefix. [Jari Urpalainen + ] - *) Fix memory leak in hook sorting function. PR 51256. - [] +Changes with APR-util 1.5.x and later: - *) Speedup md5 calculation by avoiding some copying on little endian - architectures. PR 49011. [Stefan Fritsch, Stefan Fuhrmann - ] - - *) Use heap memory for crypt in apr_password_validate(), to reduce stack - usage. PR 54572. [Stefan Fritsch] - - *) Fix password validation failure for all crypt and crypt_r based - algorithms. PR 54603. [Harvey Eneman ] - - *) Fix syntax error in crypto/apr_passwd.c on non-glibc systems. PR 54275. - [Stefan Fritsch] - - *) Fix potential data corruption in apr_brigade_write() and friends if - the last bucket of the brigade is a heap bucket that has been split, - and there are still references to the next part of the original bucket - in use. [Stefan Fritsch] - - *) Remove duplicated logic in apr_brigade_puts(). PR 53740. [Christophe - Jaillet ] - - *) apr_crypto: If --with-crypto is passed to configure but no crypto - libraries are enabled, autodetect available libraries. [Jeff Trawick] - - *) memcache: Fix dead server retry logic. [Gavin Shelley ] - -Changes with APR-util 1.5.1 - - *) testmemcache: Fix crash. PR 52705. [Peter Poeml ] - - *) MinGW: Support shared builds of apr-util when apr is shared. - PR 46175. [Carlo Bramini , Jeff Trawick] - - *) Add support for Berkeley DB 5.2 and 5.3. Simplify detection script. - PR 53684. [Rainer Jung] - - *) configure: Allow to specify library specific custom linker flags - via the LDADD_XXX variables. [Rainer Jung] - - *) apr_password_validate(): Fix intermittent errors on systems - such as FreeBSD where the crypt() function is used. - (Broken only in 1.5.0) [Jeff Trawick] - - *) Improve platform detection for bundled expat by updating - config.guess and config.sub. [Rainer Jung] - -Changes with APR-util 1.5.0 - - *) dbd_pgsql_escape: Use PQescapeStringConn. [Nick Kew] - - *) apr_password_validate, apr_bcrypt_encode: Add support for bcrypt encoded - passwords. The bcrypt implementation uses code from crypt_blowfish - written by Solar Designer . apr_bcrypt_encode creates - hashes with "$2y$" prefix, but apr_password_validate also accepts the old - prefix "$2a$". PR 49288. [Stefan Fritsch] - - *) APR dbd: Allow to use apr_dbd_get_row() with a different pool than - apr_dbd_select(). PR 53533. [] - - *) APR dbd FreeTDS support: Fix spurious API errors caused by uninitialized - fields. [TROY.LIU 劉春偉 ] - - *) apr_password_validate: Increase maximum hash string length to allow - more than 9999 rounds with sha512-crypt. PR 53410. [Stefan Fritsch] - - *) Fix segfaults in crypt() and crypt_r() failure modes. - PR 47272. [Arkadiusz Miskiewicz ] - - *) apr_crypto: Ensure that the if/else that governs the static - initialisation of each crypto driver works when the first driver - isn't in use. [Graham Leggett] - - *) apr_crypto: Ensure the *driver variable is initialised when a statically - compiled library is initialised for the first time. [Graham Leggett] - - *) apr_crypto: Ensure the *driver variable is initialised when the library - has already been loaded. Fix ported from apr_dbd. [Graham Leggett] - - *) apr_crypto: Move the static initialisation of DRIVER_LOAD from - apr_crypto_init() to apr_crypto_get_driver(), so that we don't lose - the parameters. [Graham Leggett] + *) http://svn.apache.org/viewvc/apr/apr-util/branches/1.5.x/CHANGES?view=markup Changes with APR-util 1.4.x and later: Index: contrib/apr-util/CMakeLists.txt =================================================================== --- /dev/null +++ contrib/apr-util/CMakeLists.txt @@ -0,0 +1,355 @@ +# 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. +# +# Read README.cmake before using this. + +PROJECT(APR-Util C) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +FIND_PACKAGE(OpenSSL) + +FIND_PACKAGE(expat) + +OPTION(APU_HAVE_CRYPTO "Crypto support" OFF) +OPTION(APU_HAVE_ODBC "Build ODBC DBD driver" ON) +OPTION(APR_HAS_LDAP "LDAP support" ON) +OPTION(INSTALL_PDB "Install .pdb files (if generated)" ON) +OPTION(APR_BUILD_TESTAPR "Build the test suite" OFF) +OPTION(TEST_STATIC_LIBS "Test programs use APR static libraries instead of shared libraries?" OFF) +SET(APR_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE STRING "Directory with APR include files") +SET(APR_LIBRARIES "${CMAKE_INSTALL_PREFIX}/lib/libapr-1.lib" CACHE STRING "APR library to link with") + +IF(NOT EXISTS "${APR_INCLUDE_DIR}/apr.h") + MESSAGE(FATAL_ERROR "APR include directory ${APR_INCLUDE_DIR} is not correct.") +ENDIF() +FOREACH(onelib ${APR_LIBRARIES}) + IF(NOT EXISTS ${onelib}) + MESSAGE(FATAL_ERROR "APR library ${onelib} was not found.") + ENDIF() +ENDFOREACH() + +IF(APU_HAVE_CRYPTO) +IF(NOT OPENSSL_FOUND) + MESSAGE(FATAL_ERROR "OpenSSL is the only supported crypto implementation, and it wasn't found!") +ENDIF() +ENDIF() + +# create 1-or-0 representation of feature tests for apu.h + +SET(apu_have_crypto_10 0) +SET(apu_have_apr_iconv_10 0) # not yet implemented +SET(apr_has_ldap_10 0) + +IF(APU_HAVE_CRYPTO) + SET(apu_have_crypto_10 1) +ENDIF() + +IF(APR_HAS_LDAP) + SET(apr_has_ldap_10 1) +ENDIF() + +IF(NOT EXPAT_FOUND) + MESSAGE(FATAL_ERROR "Expat is required, and it wasn't found!") +ENDIF() + +SET(XMLLIB_INCLUDE_DIR ${EXPAT_INCLUDE_DIRS}) +SET(XMLLIB_LIBRARIES ${EXPAT_LIBRARIES}) + +SET(LDAP_LIBRARIES) +IF(APR_HAS_LDAP) + SET(LDAP_LIBRARIES wldap32) +ENDIF() + +CONFIGURE_FILE(include/apu.hwc + ${PROJECT_BINARY_DIR}/apu.h) +CONFIGURE_FILE(include/apr_ldap.hwc + ${PROJECT_BINARY_DIR}/apr_ldap.h) +# "COPYONLY" just because anything else isn't implemented ;) +CONFIGURE_FILE(include/private/apu_config.hw + ${PROJECT_BINARY_DIR}/apu_config.h + COPYONLY) +CONFIGURE_FILE(include/private/apu_select_dbm.hw + ${PROJECT_BINARY_DIR}/apu_select_dbm.h + COPYONLY) +CONFIGURE_FILE(include/apu_want.hw + ${PROJECT_BINARY_DIR}/apu_want.h + COPYONLY) + +# Generated .h files are stored in PROJECT_BINARY_DIR, not the +# source tree. +# +# BROKEN: not searching PROJECT_BINARY_DIR first, so you have to +# manually delete apu.h in PROJECT_SOURCE_DIR/include if +# you've generated apu.h before using a different build + +SET(APR_INCLUDE_DIRECTORIES + ${PROJECT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${CMAKE_CURRENT_SOURCE_DIR}/include/private + ${APR_INCLUDE_DIR} +) + +INCLUDE_DIRECTORIES(${APR_INCLUDE_DIRECTORIES} ${XMLLIB_INCLUDE_DIR}) + +SET(APR_PUBLIC_HEADERS_STATIC + include/apr_anylock.h + include/apr_base64.h + include/apr_buckets.h + include/apr_crypto.h + include/apr_date.h + include/apr_dbd.h + include/apr_dbm.h + include/apr_hooks.h + include/apr_ldap_init.h + include/apr_ldap_option.h + include/apr_ldap_rebind.h + include/apr_ldap_url.h + include/apr_md4.h + include/apr_md5.h + include/apr_memcache.h + include/apr_optional.h + include/apr_optional_hooks.h + include/apr_queue.h + include/apr_redis.h + include/apr_reslist.h + include/apr_rmm.h + include/apr_sdbm.h + include/apr_sha1.h + include/apr_siphash.h + include/apr_strmatch.h + include/apr_thread_pool.h + include/apr_uri.h + include/apr_uuid.h + include/apr_xlate.h + include/apr_xml.h + include/apu_errno.h + include/apu_version.h +) + +# apu_config.h and apu_select_dbm.h are private +SET(APR_PUBLIC_HEADERS_GENERATED + ${PROJECT_BINARY_DIR}/apu.h + ${PROJECT_BINARY_DIR}/apr_ldap.h + ${PROJECT_BINARY_DIR}/apu_want.h +) + +SET(APR_SOURCES + buckets/apr_brigade.c + buckets/apr_buckets.c + buckets/apr_buckets_alloc.c + buckets/apr_buckets_eos.c + buckets/apr_buckets_file.c + buckets/apr_buckets_flush.c + buckets/apr_buckets_heap.c + buckets/apr_buckets_mmap.c + buckets/apr_buckets_pipe.c + buckets/apr_buckets_pool.c + buckets/apr_buckets_refcount.c + buckets/apr_buckets_simple.c + buckets/apr_buckets_socket.c + crypto/apr_crypto.c + crypto/apr_md4.c + crypto/apr_md5.c + crypto/apr_passwd.c + crypto/apr_sha1.c + crypto/apr_siphash.c + crypto/crypt_blowfish.c + crypto/getuuid.c + crypto/uuid.c + dbd/apr_dbd.c + dbm/apr_dbm.c + dbm/apr_dbm_sdbm.c + dbm/sdbm/sdbm.c + dbm/sdbm/sdbm_hash.c + dbm/sdbm/sdbm_lock.c + dbm/sdbm/sdbm_pair.c + encoding/apr_base64.c + hooks/apr_hooks.c + memcache/apr_memcache.c + misc/apr_date.c + misc/apr_queue.c + misc/apr_reslist.c + misc/apr_rmm.c + misc/apr_thread_pool.c + misc/apu_dso.c + misc/apu_version.c + redis/apr_redis.c + strmatch/apr_strmatch.c + uri/apr_uri.c + xlate/xlate.c + xml/apr_xml.c +) + +IF(APR_HAS_LDAP) + SET(APR_SOURCES ${APR_SOURCES} ldap/apr_ldap_stub.c ldap/apr_ldap_url.c) +ENDIF() + +SET(APR_TEST_SOURCES + test/abts.c + test/testbuckets.c + test/testcrypto.c + test/testdate.c + test/testdbd.c + test/testdbm.c + test/testldap.c + test/testmd4.c + test/testmd5.c + test/testmemcache.c + test/testpass.c + test/testqueue.c + test/testredis.c + test/testreslist.c + test/testrmm.c + test/testsiphash.c + test/teststrmatch.c + test/testuri.c + test/testutil.c + test/testuuid.c + test/testxlate.c + test/testxml.c +) + +SET(install_targets) +SET(install_bin_pdb) +SET(dbd_drivers) + +# Note: The WINNT definition on some targets is used only by libaprutil.rc. + +# libaprutil-1 is shared, aprutil-1 is static +ADD_LIBRARY(libaprutil-1 SHARED ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED} libaprutil.rc) +SET(install_targets ${install_targets} libaprutil-1) +SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/libaprutil-1.pdb) +TARGET_LINK_LIBRARIES(libaprutil-1 ${APR_LIBRARIES} ${XMLLIB_LIBRARIES}) +SET_TARGET_PROPERTIES(libaprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_EXPORT;APR_DECLARE_EXPORT;XML_STATIC;WINNT") + +ADD_LIBRARY(aprutil-1 STATIC ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED}) +SET(install_targets ${install_targets} aprutil-1) +TARGET_LINK_LIBRARIES(aprutil-1 ${APR_LIBRARIES} ${XMLLIB_LIBRARIES}) +SET_TARGET_PROPERTIES(aprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_STATIC;APR_DECLARE_STATIC;APU_DSO_MODULE_BUILD;XML_STATIC") + +IF(APU_HAVE_CRYPTO) + IF(NOT OPENSSL_FOUND) + MESSAGE(FATAL_ERROR "Only OpenSSL-based crypto is currently implemented in the cmake build") + ENDIF() + ADD_LIBRARY(apr_crypto_openssl-1 SHARED crypto/apr_crypto_openssl.c libaprutil.rc) + SET(install_targets ${install_targets} apr_crypto_openssl-1) + SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_crypto_openssl-1.pdb) + SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES INCLUDE_DIRECTORIES "${APR_INCLUDE_DIRECTORIES};${OPENSSL_INCLUDE_DIR}") + SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES COMPILE_DEFINITIONS "WINNT") + SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_EXPORT=1 -DAPU_DECLARE_EXPORT=1 -DDLL_NAME=apr_crypto_openssl") + TARGET_LINK_LIBRARIES(apr_crypto_openssl-1 libaprutil-1 ${APR_LIBRARIES} ${OPENSSL_LIBRARIES}) +ENDIF() + +IF(APU_HAVE_ODBC) + ADD_LIBRARY(apr_dbd_odbc-1 SHARED dbd/apr_dbd_odbc.c libaprutil.rc) + SET(install_targets ${install_targets} apr_dbd_odbc-1) + SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_dbd_odbc-1.pdb) + SET(dbd_drivers ${dbd_drivers} odbc) + TARGET_LINK_LIBRARIES(apr_dbd_odbc-1 libaprutil-1 ${APR_LIBRARIES} odbc32 odbccp32) + SET_PROPERTY(TARGET apr_dbd_odbc-1 APPEND PROPERTY LINK_FLAGS /export:apr_dbd_odbc_driver) + SET_TARGET_PROPERTIES(apr_dbd_odbc-1 PROPERTIES COMPILE_DEFINITIONS "APU_HAVE_ODBC;HAVE_SQL_H;APU_DECLARE_EXPORT;APR_DECLARE_EXPORT;APU_DSO_MODULE_BUILD;WINNT") + SET_TARGET_PROPERTIES(apr_dbd_odbc-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_EXPORT=1 -DAPU_DECLARE_EXPORT=1 -DDLL_NAME=apr_dbd_odbc") +ENDIF() + +IF(APR_HAS_LDAP) + ADD_LIBRARY(apr_ldap-1 SHARED ldap/apr_ldap_init.c ldap/apr_ldap_option.c + ldap/apr_ldap_rebind.c libaprutil.rc) + SET(install_targets ${install_targets} apr_ldap-1) + SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_ldap-1.pdb) + TARGET_LINK_LIBRARIES(apr_ldap-1 libaprutil-1 ${APR_LIBRARIES} ${LDAP_LIBRARIES}) + SET_TARGET_PROPERTIES(apr_ldap-1 PROPERTIES COMPILE_DEFINITIONS "WINNT") + SET_TARGET_PROPERTIES(apr_ldap-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_EXPORT=1 -DAPU_DECLARE_EXPORT=1 -DDLL_NAME=apr_ldap") + SET(apr_ldap_libraries apr_ldap-1) +ELSE() + SET(apr_ldap_libraries) +ENDIF() + +IF(APR_BUILD_TESTAPR) + ENABLE_TESTING() + # Create a "check" target that displays test program output to the console. + ADD_CUSTOM_TARGET(check COMMAND ${CMAKE_CTEST_COMMAND} --verbose) + + # copy data files to build directory so that we can run programs from there + EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E make_directory + ${PROJECT_BINARY_DIR}/data) + EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${PROJECT_SOURCE_DIR}/test/data/billion-laughs.xml + ${PROJECT_BINARY_DIR}/data/billion-laughs.xml) + + IF(TEST_STATIC_LIBS) + SET(whichapr aprutil-1) + SET(apiflag "-DAPR_DECLARE_STATIC -DAPU_DECLARE_STATIC") + ELSE() + SET(whichapr libaprutil-1) + SET(apiflag) + ENDIF() + + ADD_EXECUTABLE(testall ${APR_TEST_SOURCES}) + TARGET_LINK_LIBRARIES(testall ${whichapr} ${apr_ldap_libraries} ${XMLLIB_LIBRARIES} ${LDAP_LIBRARIES}) + IF(apiflag) + SET_TARGET_PROPERTIES(testall PROPERTIES COMPILE_FLAGS ${apiflag}) + ENDIF() + ADD_TEST(NAME testall COMMAND testall) + + ADD_EXECUTABLE(dbd test/dbd.c) + TARGET_LINK_LIBRARIES(dbd ${whichapr}) + IF(apiflag) + SET_TARGET_PROPERTIES(dbd PROPERTIES COMPILE_FLAGS ${apiflag}) + ENDIF() + + # dbd is run multiple times with different parameters. + FOREACH(somedbd ${dbd_drivers}) + ADD_TEST(NAME dbd-${somedbd} COMMAND dbd ${somedbd}) + ENDFOREACH() + +ENDIF (APR_BUILD_TESTAPR) + +# Installation + +INSTALL(TARGETS ${install_targets} + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + ) + +IF(INSTALL_PDB) + INSTALL(FILES ${install_bin_pdb} + DESTINATION bin + CONFIGURATIONS RelWithDebInfo Debug) +ENDIF() + +INSTALL(FILES ${APR_PUBLIC_HEADERS_STATIC} ${APR_PUBLIC_HEADERS_GENERATED} DESTINATION include) + +STRING(TOUPPER "${CMAKE_BUILD_TYPE}" buildtype) +MESSAGE(STATUS "") +MESSAGE(STATUS "") +MESSAGE(STATUS "APR-Util configuration summary:") +MESSAGE(STATUS "") +MESSAGE(STATUS " Build type ...................... : ${CMAKE_BUILD_TYPE}") +MESSAGE(STATUS " Install .pdb (if available)...... : ${INSTALL_PDB}") +MESSAGE(STATUS " Install prefix .................. : ${CMAKE_INSTALL_PREFIX}") +MESSAGE(STATUS " C compiler ...................... : ${CMAKE_C_COMPILER}") +MESSAGE(STATUS " APR include directory ........... : ${APR_INCLUDE_DIR}") +MESSAGE(STATUS " APR libraries ................... : ${APR_LIBRARIES}") +MESSAGE(STATUS " DBD ODBC driver ................. : ${APU_HAVE_ODBC}") +MESSAGE(STATUS " APU_HAVE_CRYPTO ................. : ${APU_HAVE_CRYPTO}") +MESSAGE(STATUS " APR_HAS_LDAP .................... : ${APR_HAS_LDAP}") +MESSAGE(STATUS " Build test suite ................ : ${APR_BUILD_TESTAPR}") +IF(TEST_STATIC_LIBS) +MESSAGE(STATUS " (testing static libraries)") +ELSE() +MESSAGE(STATUS " (testing dynamic libraries)") +ENDIF() Index: contrib/apr-util/LICENSE =================================================================== --- contrib/apr-util/LICENSE +++ contrib/apr-util/LICENSE @@ -312,6 +312,22 @@ * documentation and/or software. */ +For the crypto\crypt_blowfish.c(.h) component: + + * Written by Solar Designer in 1998-2011. + * No copyright is claimed, and the software is hereby placed in the public + * domain. In case this attempt to disclaim copyright and place the software + * in the public domain is deemed null and void, then the software is + * Copyright (c) 1998-2011 Solar Designer and it is hereby released to the + * general public under the following terms: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted. + * + * There's ABSOLUTELY NO WARRANTY, express or implied. + + See crypto/crypt_blowfish.c for more information. + For the include\apr_md4.h component: * Index: contrib/apr-util/Makefile.in =================================================================== --- contrib/apr-util/Makefile.in +++ contrib/apr-util/Makefile.in @@ -15,8 +15,8 @@ APRUTIL_LIBS = @APRUTIL_LIBS@ TARGET_LIB = lib@APRUTIL_LIBNAME@.la -INSTALL_SUBDIRS = @APR_ICONV_DIR@ @APR_XML_DIR@ -EXTRA_SOURCE_DIRS = @APR_ICONV_DIR@ @APR_XML_DIR@ +INSTALL_SUBDIRS = @APR_ICONV_DIR@ +EXTRA_SOURCE_DIRS = @APR_ICONV_DIR@ APRUTIL_PCFILE = apr-util-$(APRUTIL_MAJOR_VERSION).pc APU_CONFIG = apu-$(APRUTIL_MAJOR_VERSION)-config INSTALL = @INSTALL@ @@ -35,7 +35,6 @@ LDADD_dbd_sqlite2 = @LDADD_dbd_sqlite2@ LDADD_dbd_sqlite3 = @LDADD_dbd_sqlite3@ LDADD_dbd_mysql = @LDADD_dbd_mysql@ -LDADD_dbd_freetds = @LDADD_dbd_freetds@ LDADD_dbd_odbc = @LDADD_dbd_odbc@ LDADD_dbm_db = @LDADD_dbm_db@ LDADD_dbm_gdbm = @LDADD_dbm_gdbm@ @@ -43,6 +42,7 @@ LDADD_ldap = @LDADD_ldap@ LDADD_crypto_openssl = @LDADD_crypto_openssl@ LDADD_crypto_nss = @LDADD_crypto_nss@ +LDADD_crypto_commoncrypto = @LDADD_crypto_commoncrypto@ TARGETS = $(TARGET_LIB) aprutil.exp apu-config.out $(APU_MODULES) @@ -50,7 +50,7 @@ @INCLUDE_RULES@ @INCLUDE_OUTPUTS@ -CLEAN_SUBDIRS = test @APR_ICONV_DIR@ @APR_XML_DIR@ +CLEAN_SUBDIRS = test @APR_ICONV_DIR@ CLEAN_TARGETS = exports.c export_vars.c aprutil.exp .make.dirs apu-config.out DISTCLEAN_TARGETS = config.cache config.log config.status libtool \ Index: contrib/apr-util/Makefile.win =================================================================== --- contrib/apr-util/Makefile.win +++ contrib/apr-util/Makefile.win @@ -51,6 +51,13 @@ # # CRYPTO_LIST="nss openssl" # +# Provide the XML_PARSER argument after configuring LIB and INCLUDE with +# the expat path of the corresponding xml parser, e.g. libexpatMT to choose +# static, or libexpat (default) to choose the dynamic library for aprutil-1.dll +# (Static libaprutil-1.lib always presumes libexpatMT with XML_STATIC flag.) +# +# XML_PARSER="libexpat" +# # For example; # # nmake -f Makefile.win PREFIX=C:\APR buildall checkall installall clean @@ -73,6 +80,20 @@ PREFIX=..\apr-dist +!IF EXIST("..\openssl") +!IF EXIST("..\openssl\libcrypto.lib") +SSLOPT=_HAVE_OSSL110=1 +!ENDIF +!ENDIF + +# Legacy default (and unwise alternative) for libapr-1.dll is libexpatMT +XML_PARSER="libexpat" +!IF "$(XML_PARSER)" == "libexpat" +XMLOPT=XML_PARSER=$(XML_PARSER) +!ELSE +XMLOPT=XML_PARSER=$(XML_PARSER) XML_OPTIONS="/D XML_STATIC" +!ENDIF + !IF [$(COMSPEC) /c cl /nologo /? \ | $(SystemRoot)\System32\find.exe "x64" >NUL ] == 0 ARCH=x64 Release @@ -197,11 +218,9 @@ BUILD_MODE="$(ARCH)" BIND_MODE=shared cd .. !ENDIF - cd $(APU_PATH)\xml\expat\lib - $(MAKE) $(MAKEOPT) -f xml.mak CFG="xml - $(ARCH)" RECURSE=0 $(CTARGET) - cd ..\..\.. - $(MAKE) $(MAKEOPT) -f aprutil.mak CFG="aprutil - $(ARCH)" RECURSE=0 $(CTARGET) - $(MAKE) $(MAKEOPT) -f libaprutil.mak CFG="libaprutil - $(ARCH)" RECURSE=0 $(CTARGET) + cd $(APU_PATH) + $(MAKE) $(MAKEOPT) $(SSLOPT) $(XMLOPT) -f aprutil.mak CFG="aprutil - $(ARCH)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) $(SSLOPT) $(XMLOPT) -f libaprutil.mak CFG="libaprutil - $(ARCH)" RECURSE=0 $(CTARGET) cd ldap $(MAKE) $(MAKEOPT) -f apr_ldap.mak CFG="apr_ldap - $(ARCH)" RECURSE=0 $(CTARGET) cd .. @@ -215,7 +234,7 @@ cd .. cd crypto for %d in ($(CRYPTO_LIST) x) do if not %d == x \ - $(MAKE) $(MAKEOPT) -f apr_crypto_%d.mak CFG="apr_crypto_%d - $(ARCH)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) $(SSLOPT) -f apr_crypto_%d.mak CFG="apr_crypto_%d - $(ARCH)" RECURSE=0 $(CTARGET) cd .. !ELSEIF $(USESLN) == 1 @@ -306,7 +325,7 @@ checkapu: cd $(APU_PATH) cd test - $(MAKE) $(MAKEOPT) -f Makefile.win MODEL=static \ + $(MAKE) $(MAKEOPT) -f Makefile.win MODEL=static \ OUTDIR=$(LIBSPATH) APROUTDIR=$(LIBSOSPATH) \ APR_PATH=..\$(APR_PATH) API_PATH=..\$(API_PATH) check $(MAKE) $(MAKEOPT) -f Makefile.win MODEL=dynamic \ Index: contrib/apr-util/NOTICE =================================================================== --- contrib/apr-util/NOTICE +++ contrib/apr-util/NOTICE @@ -1,5 +1,5 @@ Apache Portable Runtime Utility Library -Copyright (c) 2000-2014 The Apache Software Foundation. +Copyright (c) 2000-2016 The Apache Software Foundation. This product includes software developed at The Apache Software Foundation (http://www.apache.org/). Index: contrib/apr-util/NWGNUmakefile =================================================================== --- contrib/apr-util/NWGNUmakefile +++ contrib/apr-util/NWGNUmakefile @@ -261,9 +261,11 @@ $(OBJDIR)/apr_memcache.o \ $(OBJDIR)/apr_passwd.o \ $(OBJDIR)/apr_queue.o \ + $(OBJDIR)/apr_redis.o \ $(OBJDIR)/apr_reslist.o \ $(OBJDIR)/apr_rmm.o \ $(OBJDIR)/apr_sha1.o \ + $(OBJDIR)/apr_siphash.o \ $(OBJDIR)/apu_version.o \ $(OBJDIR)/getuuid.o \ $(OBJDIR)/uuid.o \ @@ -296,7 +298,7 @@ # Any specialized rules here # -vpath %.c buckets:crypto:dbd:dbm:dbm/sdbm:encoding:hooks:ldap:memcache:misc:strmatch:uri:xlate:xml +vpath %.c buckets:crypto:dbd:dbm:dbm/sdbm:encoding:hooks:ldap:memcache:redis:misc:strmatch:uri:xlate:xml # # Include the 'tail' makefile that has targets that depend on variables defined Index: contrib/apr-util/README =================================================================== --- contrib/apr-util/README +++ contrib/apr-util/README @@ -34,7 +34,7 @@ String filename-style pattern matching URI Parsing Charset translation (iconv based) - XML parsing (expat based) + XML parsing (expat) For a more complete list, please refer to the following URLs: @@ -66,7 +66,7 @@ such as Oracle (--with-oracle option) must also be explicitly enabled. On windows, selection of supported drivers is via the environment values -DBD_LIST (for freetds, mysql, oracle, pgsql, sqlite2 and/or sqlite3) +DBD_LIST (for mysql, oracle, pgsql, sqlite2 and/or sqlite3) and DBM_LIST (db and/or gdbm). DBD odbc and DBM sdbm are unconditionally compiled and installed, do not include these in the list. Index: contrib/apr-util/README.FREETDS =================================================================== --- /dev/null +++ contrib/apr-util/README.FREETDS @@ -0,0 +1,11 @@ +The APR DBD Driver for FreeTDS has been removed from the build. +It is known to have problems, and we are not able to maintain it. + +The source code is still available. If you want it and are able +to manage maintenance for yourself, you can patch the build and +work through issues that affect you, but you're on your own. + +We expect that for most users, the ODBC driver will serve as +an alternative. + +Sorry. Index: contrib/apr-util/README.cmake =================================================================== --- /dev/null +++ contrib/apr-util/README.cmake @@ -0,0 +1,139 @@ +Experimental cmake-based build support for APR-Util on Microsoft Windows + +Status +------ + +This build support is currently intended only for Microsoft Windows. +Only Windows NT-based systems can be targeted. (The traditional +Windows build support for APR can target Windows 9x as well.) + +This build support is experimental. Specifically, + +* It does not support all features of APR-Util. +* Some components may not be built correctly and/or in a manner + compatible with the previous Windows build support. +* Build interfaces, such as the mechanisms which are used to enable + optional functionality or specify prerequisites, may change from + release to release as feedback is received from users and bugs and + limitations are resolved. + +Important: Refer to the "Known Bugs and Limitations" section for further + information. + + It is beyond the scope of this document to document or explain + how to utilize the various cmake features, such as different + build backends or provisions for finding support libraries. + + Please refer to the cmake documentation for additional information + that applies to building any project with cmake. + +Prerequisites +------------- + +The following tools must be in PATH: + +* cmake, version 2.8 or later + cmake version 3.1.3 or later is required to work with current OpenSSL + releases. (OpenSSL is an optional prerequisite of APR-Util.) +* If using a command-line compiler: compiler and linker and related tools + (Refer to the cmake documentation for more information.) + +The following support libraries are mandatory: + +* APR 1.4.x or APR 1.5.x, built with cmake + +Optional support libraries allow optional features of APR to be enabled: + +* OpenSSL +* many others potentially, though the build support isn't currently + implemented + +How to build +------------ + +1. cd to a clean directory for building (i.e., don't build in your + source tree) + +2. Some cmake backends may want your compile tools in PATH. (Hint: "Visual + Studio Command Prompt") + +3. set CMAKE_LIBRARY_PATH=d:\path\to\prereq1\lib;d:\path\to\prereq2\lib;... + +4. set CMAKE_INCLUDE_PATH=d:\path\to\prereq1\include;d:\path\to\prereq2\include;... + +5. cmake -G "some backend, like 'NMake Makefiles'" + -DCMAKE_INSTALL_PREFIX=d:/path/to/aprinst + -DAPR-Util-specific-flags + d:/path/to/aprutilsource + + If APR 1.x was installed to a different directory than APR-Util, + also pass these additional arguments: + + -DAPR_INCLUDE_DIR=d:/path/to/apr1inst/include + -DAPR_LIBRARIES=d:/path/to/apr1inst/lib/libapr-1.lib + + Alternately, use cmake-gui and update settings in the GUI. + + APR-Util feature flags: + + APU_HAVE_CRYPTO Build crypt support (only the OpenSSL + implementation is currently supported) + Default: OFF + APU_HAVE_ODBC Build ODBC DBD driver + Default: ON + APR_BUILD_TESTAPR Build APR-Util test suite + Default: OFF + TEST_STATIC_LIBS Build the test suite to test the APR static + library instead of the APR dynamic library. + Default: OFF + In order to build the test suite against both + static and dynamic libraries, separate builds + will be required, one with TEST_STATIC_LIBS + set to ON. + INSTALL_PDB Install .pdb files if generated. + Default: ON + + CMAKE_C_FLAGS_RELEASE, _DEBUG, _RELWITHDEBINFO, _MINSIZEREL + + CMAKE_BUILD_TYPE + + For NMake Makefiles the choices are at least DEBUG, RELEASE, + RELWITHDEBINFO, and MINSIZEREL + Other backends make have other selections. + +6. build using chosen backend (e.g., "nmake install") + +Known Bugs and Limitations +-------------------------- + +* If include/apu.h or other generated files have been created in the source + directory by another build system, they will be used unexpectedly and + cause the build to fail. +* Options should be provided for remaining features, along with finding any + necessary libraries + + DBM: + . APU_HAVE_GDBM + . APU_HAVE_NDBM + . APU_HAVE_DB + + DBD: + . APU_HAVE_PGSQL + . APU_HAVE_MYSQL + . APU_HAVE_SQLITE3 + . APU_HAVE_SQLITE2 + . APU_HAVE_ORACLE + + CRYPTO: + . APU_HAVE_NSS + + XLATE, APU_HAVE_ICONV (no way to consume an apr-iconv build yet) +* Static builds of APR modules are not supported. +* CHANGES/LICENSE/NOTICE is not installed, unlike Makefile.win. + (But unlike Makefile.win we want to call them APR-Util-CHANGES.txt + and so on.) But perhaps that is a job for a higher-level script. + +Generally: + +* Many APR-Util features have not been tested with this build. +* Developers need to examine the existing Windows build in great detail and see + what is missing from the cmake-based build, whether a feature or some build + nuance. +* Any feedback you can provide on your experiences with this build will be + helpful. Index: contrib/apr-util/apr-util.spec =================================================================== --- contrib/apr-util/apr-util.spec +++ contrib/apr-util/apr-util.spec @@ -3,7 +3,7 @@ Summary: Apache Portable Runtime Utility library Name: apr-util -Version: 1.5.4 +Version: 1.6.1 Release: 1 License: Apache Software License Group: System Environment/Libraries @@ -70,16 +70,6 @@ This package provides the SQLite driver for the apr-util DBD (database abstraction) interface. -%package freetds -Group: Development/Libraries -Summary: APR utility library FreeTDS DBD driver -BuildRequires: freetds-devel -Requires: apr-util = %{version}-%{release} - -%description freetds -This package provides the FreeTDS driver for the apr-util DBD -(database abstraction) interface. - %package odbc Group: Development/Libraries Summary: APR utility library ODBC DBD driver @@ -124,7 +114,7 @@ %configure --with-apr=%{_prefix} \ --includedir=%{_includedir}/apr-%{apuver} \ --with-ldap --without-gdbm \ - --with-sqlite3 --with-pgsql --with-mysql --with-freetds --with-odbc \ + --with-sqlite3 --with-pgsql --with-mysql --with-odbc \ --with-berkeley-db \ --with-crypto --with-openssl --with-nss \ --without-sqlite2 @@ -176,10 +166,6 @@ %defattr(-,root,root,-) %{_libdir}/apr-util-%{apuver}/apr_dbd_sqlite* -%files freetds -%defattr(-,root,root,-) -%{_libdir}/apr-util-%{apuver}/apr_dbd_freetds* - %files odbc %defattr(-,root,root,-) %{_libdir}/apr-util-%{apuver}/apr_dbd_odbc* @@ -203,7 +189,7 @@ %{_libdir}/libaprutil-%{apuver}.so %{_libdir}/pkgconfig/apr-util-%{apuver}.pc %{_includedir}/apr-%{apuver}/*.h -%doc --parents html +%doc html %changelog * Tue Jun 22 2004 Graham Leggett 1.0.0-1 Index: contrib/apr-util/aprutil.dep =================================================================== --- /dev/null +++ contrib/apr-util/aprutil.dep @@ -0,0 +1,431 @@ +# Microsoft Developer Studio Generated Dependency File, included by aprutil.mak + +.\buckets\apr_brigade.c : \ + ".\include\apr_buckets.h"\ + ".\include\apu.h"\ + + +.\buckets\apr_buckets.c : \ + ".\include\apr_buckets.h"\ + ".\include\apu.h"\ + + +.\buckets\apr_buckets_alloc.c : \ + ".\include\apr_buckets.h"\ + ".\include\apu.h"\ + + +.\buckets\apr_buckets_eos.c : \ + ".\include\apr_buckets.h"\ + ".\include\apu.h"\ + + +.\buckets\apr_buckets_file.c : \ + ".\include\apr_buckets.h"\ + ".\include\apu.h"\ + + +.\buckets\apr_buckets_flush.c : \ + ".\include\apr_buckets.h"\ + ".\include\apu.h"\ + + +.\buckets\apr_buckets_heap.c : \ + ".\include\apr_buckets.h"\ + ".\include\apu.h"\ + + +.\buckets\apr_buckets_mmap.c : \ + ".\include\apr_buckets.h"\ + ".\include\apu.h"\ + + +.\buckets\apr_buckets_pipe.c : \ + ".\include\apr_buckets.h"\ + ".\include\apu.h"\ + + +.\buckets\apr_buckets_pool.c : \ + ".\include\apr_buckets.h"\ + ".\include\apu.h"\ + + +.\buckets\apr_buckets_refcount.c : \ + ".\include\apr_buckets.h"\ + ".\include\apu.h"\ + + +.\buckets\apr_buckets_simple.c : \ + ".\include\apr_buckets.h"\ + ".\include\apu.h"\ + + +.\buckets\apr_buckets_socket.c : \ + ".\include\apr_buckets.h"\ + ".\include\apu.h"\ + + +.\crypto\apr_crypto.c : \ + ".\include\apr_crypto.h"\ + ".\include\apu.h"\ + ".\include\apu_errno.h"\ + ".\include\apu_version.h"\ + ".\include\private\apr_crypto_internal.h"\ + ".\include\private\apu_config.h"\ + ".\include\private\apu_internal.h"\ + + +.\crypto\apr_md4.c : \ + ".\include\apr_md4.h"\ + ".\include\apr_xlate.h"\ + ".\include\apu.h"\ + + +.\crypto\apr_md5.c : \ + ".\include\apr_md5.h"\ + ".\include\apr_xlate.h"\ + ".\include\apu.h"\ + ".\include\private\apu_config.h"\ + + +.\crypto\apr_passwd.c : \ + ".\crypto\crypt_blowfish.h"\ + ".\include\apr_md5.h"\ + ".\include\apr_sha1.h"\ + ".\include\apr_xlate.h"\ + ".\include\apu.h"\ + ".\include\private\apu_config.h"\ + + +.\crypto\apr_sha1.c : \ + ".\include\apr_base64.h"\ + ".\include\apr_sha1.h"\ + ".\include\apr_xlate.h"\ + ".\include\apu.h"\ + + +.\crypto\apr_siphash.c : \ + ".\include\apr_siphash.h"\ + + +.\crypto\crypt_blowfish.c : \ + ".\crypto\crypt_blowfish.h"\ + + +.\crypto\getuuid.c : \ + ".\include\apr_md5.h"\ + ".\include\apr_uuid.h"\ + ".\include\apr_xlate.h"\ + ".\include\apu.h"\ + + +.\crypto\uuid.c : \ + ".\include\apr_uuid.h"\ + ".\include\apu.h"\ + + +.\dbd\apr_dbd.c : \ + ".\include\apr_dbd.h"\ + ".\include\apu.h"\ + ".\include\apu_version.h"\ + ".\include\private\apr_dbd_internal.h"\ + ".\include\private\apu_config.h"\ + ".\include\private\apu_internal.h"\ + + +.\dbd\apr_dbd_mysql.c : \ + ".\include\apr_buckets.h"\ + ".\include\apr_dbd.h"\ + ".\include\apu.h"\ + ".\include\apu_version.h"\ + ".\include\private\apr_dbd_internal.h"\ + ".\include\private\apu_config.h"\ + + +.\dbd\apr_dbd_odbc.c : \ + ".\include\apr_buckets.h"\ + ".\include\apr_dbd.h"\ + ".\include\apu.h"\ + ".\include\apu_version.h"\ + ".\include\private\apr_dbd_internal.h"\ + ".\include\private\apr_dbd_odbc_v2.h"\ + ".\include\private\apu_config.h"\ + + +.\dbd\apr_dbd_oracle.c : \ + ".\include\apr_buckets.h"\ + ".\include\apr_dbd.h"\ + ".\include\apu.h"\ + ".\include\private\apr_dbd_internal.h"\ + + +.\dbd\apr_dbd_pgsql.c : \ + ".\include\apr_buckets.h"\ + ".\include\apr_dbd.h"\ + ".\include\apu.h"\ + ".\include\private\apr_dbd_internal.h"\ + ".\include\private\apu_config.h"\ + + +.\dbd\apr_dbd_sqlite2.c : \ + ".\include\apr_buckets.h"\ + ".\include\apr_dbd.h"\ + ".\include\apu.h"\ + ".\include\private\apr_dbd_internal.h"\ + + +.\dbd\apr_dbd_sqlite3.c : \ + ".\include\apr_buckets.h"\ + ".\include\apr_dbd.h"\ + ".\include\apu.h"\ + ".\include\private\apr_dbd_internal.h"\ + + +.\dbm\apr_dbm.c : \ + ".\include\apr_dbm.h"\ + ".\include\apu.h"\ + ".\include\apu_version.h"\ + ".\include\private\apr_dbm_private.h"\ + ".\include\private\apu_config.h"\ + ".\include\private\apu_internal.h"\ + ".\include\private\apu_select_dbm.h"\ + + +.\dbm\apr_dbm_berkeleydb.c : \ + ".\include\apr_dbm.h"\ + ".\include\apu.h"\ + ".\include\apu_want.h"\ + ".\include\private\apr_dbm_private.h"\ + ".\include\private\apu_config.h"\ + ".\include\private\apu_select_dbm.h"\ + + +.\dbm\apr_dbm_gdbm.c : \ + ".\include\apr_dbm.h"\ + ".\include\apu.h"\ + ".\include\private\apr_dbm_private.h"\ + ".\include\private\apu_config.h"\ + ".\include\private\apu_select_dbm.h"\ + + +.\dbm\apr_dbm_sdbm.c : \ + ".\include\apr_dbm.h"\ + ".\include\apr_sdbm.h"\ + ".\include\apu.h"\ + ".\include\private\apr_dbm_private.h"\ + ".\include\private\apu_config.h"\ + ".\include\private\apu_select_dbm.h"\ + + +.\encoding\apr_base64.c : \ + ".\include\apr_base64.h"\ + ".\include\apr_xlate.h"\ + ".\include\apu.h"\ + + +.\hooks\apr_hooks.c : \ + ".\include\apr_hooks.h"\ + ".\include\apr_optional.h"\ + ".\include\apr_optional_hooks.h"\ + ".\include\apu.h"\ + + +.\ldap\apr_ldap_init.c : \ + ".\include\apr_ldap.h"\ + ".\include\apr_ldap_init.h"\ + ".\include\apr_ldap_option.h"\ + ".\include\apr_ldap_rebind.h"\ + ".\include\apr_ldap_url.h"\ + ".\include\apu.h"\ + ".\include\private\apu_config.h"\ + ".\include\private\apu_internal.h"\ + + +.\ldap\apr_ldap_option.c : \ + ".\include\apr_ldap.h"\ + ".\include\apr_ldap_init.h"\ + ".\include\apr_ldap_option.h"\ + ".\include\apr_ldap_rebind.h"\ + ".\include\apr_ldap_url.h"\ + ".\include\apu.h"\ + ".\include\private\apu_config.h"\ + + +.\ldap\apr_ldap_rebind.c : \ + ".\include\apr_ldap.h"\ + ".\include\apr_ldap_init.h"\ + ".\include\apr_ldap_option.h"\ + ".\include\apr_ldap_rebind.h"\ + ".\include\apr_ldap_url.h"\ + ".\include\apu.h"\ + ".\include\private\apu_config.h"\ + + +.\ldap\apr_ldap_stub.c : \ + ".\include\apr_ldap.h"\ + ".\include\apr_ldap_init.h"\ + ".\include\apr_ldap_option.h"\ + ".\include\apr_ldap_rebind.h"\ + ".\include\apr_ldap_url.h"\ + ".\include\apu.h"\ + ".\include\apu_version.h"\ + ".\include\private\apu_config.h"\ + ".\include\private\apu_internal.h"\ + + +.\ldap\apr_ldap_url.c : \ + ".\include\apr_ldap.h"\ + ".\include\apr_ldap_init.h"\ + ".\include\apr_ldap_option.h"\ + ".\include\apr_ldap_rebind.h"\ + ".\include\apr_ldap_url.h"\ + ".\include\apu.h"\ + + +.\memcache\apr_memcache.c : \ + ".\include\apr_buckets.h"\ + ".\include\apr_memcache.h"\ + ".\include\apr_reslist.h"\ + ".\include\apu.h"\ + + +.\misc\apr_date.c : \ + ".\include\apr_date.h"\ + ".\include\apu.h"\ + + +.\misc\apr_queue.c : \ + ".\include\apr_queue.h"\ + ".\include\apu.h"\ + + +.\misc\apr_reslist.c : \ + ".\include\apr_reslist.h"\ + ".\include\apu.h"\ + + +.\misc\apr_rmm.c : \ + ".\include\apr_anylock.h"\ + ".\include\apr_rmm.h"\ + ".\include\apu.h"\ + + +.\misc\apr_thread_pool.c : \ + ".\include\apr_thread_pool.h"\ + ".\include\apu.h"\ + + +.\misc\apu_dso.c : \ + ".\include\apu.h"\ + ".\include\apu_version.h"\ + ".\include\private\apu_config.h"\ + ".\include\private\apu_internal.h"\ + + +.\misc\apu_version.c : \ + ".\include\apu.h"\ + ".\include\apu_version.h"\ + + +.\dbm\sdbm\sdbm.c : \ + ".\dbm\sdbm\sdbm_pair.h"\ + ".\dbm\sdbm\sdbm_private.h"\ + ".\dbm\sdbm\sdbm_tune.h"\ + ".\include\apr_sdbm.h"\ + ".\include\apu.h"\ + + +.\dbm\sdbm\sdbm_hash.c : \ + ".\dbm\sdbm\sdbm_private.h"\ + ".\include\apr_sdbm.h"\ + ".\include\apu.h"\ + + +.\dbm\sdbm\sdbm_lock.c : \ + ".\dbm\sdbm\sdbm_private.h"\ + ".\dbm\sdbm\sdbm_tune.h"\ + ".\include\apr_sdbm.h"\ + ".\include\apu.h"\ + + +.\dbm\sdbm\sdbm_pair.c : \ + ".\dbm\sdbm\sdbm_pair.h"\ + ".\dbm\sdbm\sdbm_private.h"\ + ".\dbm\sdbm\sdbm_tune.h"\ + ".\include\apr_sdbm.h"\ + ".\include\apu.h"\ + + +.\strmatch\apr_strmatch.c : \ + ".\include\apr_strmatch.h"\ + ".\include\apu.h"\ + + +.\uri\apr_uri.c : \ + ".\include\apr_uri.h"\ + ".\include\apu.h"\ + + +.\xlate\xlate.c : \ + ".\include\apr_xlate.h"\ + ".\include\apu.h"\ + ".\include\private\apu_config.h"\ + + +.\xml\apr_xml.c : \ + ".\include\apr_xlate.h"\ + ".\include\apr_xml.h"\ + ".\include\apu.h"\ + ".\include\private\apu_config.h"\ + + +!IF "$(CFG)" == "aprutil - Win32 Release" + +!ELSEIF "$(CFG)" == "aprutil - Win32 Debug" + +!ELSEIF "$(CFG)" == "aprutil - x64 Release" + +!ELSEIF "$(CFG)" == "aprutil - x64 Debug" + +!ENDIF + +!IF "$(CFG)" == "aprutil - Win32 Release" + +!ELSEIF "$(CFG)" == "aprutil - Win32 Debug" + +!ELSEIF "$(CFG)" == "aprutil - x64 Release" + +!ELSEIF "$(CFG)" == "aprutil - x64 Debug" + +!ENDIF + +!IF "$(CFG)" == "aprutil - Win32 Release" + +!ELSEIF "$(CFG)" == "aprutil - Win32 Debug" + +!ELSEIF "$(CFG)" == "aprutil - x64 Release" + +!ELSEIF "$(CFG)" == "aprutil - x64 Debug" + +!ENDIF + +!IF "$(CFG)" == "aprutil - Win32 Release" + +!ELSEIF "$(CFG)" == "aprutil - Win32 Debug" + +!ELSEIF "$(CFG)" == "aprutil - x64 Release" + +!ELSEIF "$(CFG)" == "aprutil - x64 Debug" + +!ENDIF + +!IF "$(CFG)" == "aprutil - Win32 Release" + +!ELSEIF "$(CFG)" == "aprutil - Win32 Debug" + +!ELSEIF "$(CFG)" == "aprutil - x64 Release" + +!ELSEIF "$(CFG)" == "aprutil - x64 Debug" + +!ENDIF + Index: contrib/apr-util/aprutil.dsp =================================================================== --- /dev/null +++ contrib/apr-util/aprutil.dsp @@ -0,0 +1,810 @@ +# Microsoft Developer Studio Project File - Name="aprutil" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=aprutil - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "aprutil.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "aprutil.mak" CFG="aprutil - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "aprutil - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "aprutil - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "aprutil - x64 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "aprutil - x64 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "aprutil - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "LibR" +# PROP BASE Intermediate_Dir "LibR" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "LibR" +# PROP Intermediate_Dir "LibR" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "./include" /I "../apr/include" /I "./include/private" /I "./xml/expat/lib" /I "../apr-iconv/include" /I "./dbm/sdbm" /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "API_DECLARE_STATIC" /D "APU_USE_SDBM" /D "HAVE_SQL_H" /D "XML_STATIC" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\aprutil-1" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"LibR\aprutil-1.lib" + +!ELSEIF "$(CFG)" == "aprutil - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "LibD" +# PROP BASE Intermediate_Dir "LibD" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "LibD" +# PROP Intermediate_Dir "LibD" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "./include" /I "../apr/include" /I "./include/private" /I "./xml/expat/lib" /I "../apr-iconv/include" /I "./dbm/sdbm" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "API_DECLARE_STATIC" /D "APU_USE_SDBM" /D "HAVE_SQL_H" /D "XML_STATIC" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\aprutil-1" /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"LibD\aprutil-1.lib" + +!ELSEIF "$(CFG)" == "aprutil - x64 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "x64\LibR" +# PROP BASE Intermediate_Dir "x64\LibR" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "x64\LibR" +# PROP Intermediate_Dir "x64\LibR" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "../apr/include" /I "./include/private" /I "./xml/expat/lib" /I "../apr-iconv/include" /I "./dbm/sdbm" /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "API_DECLARE_STATIC" /D "APU_USE_SDBM" /D "HAVE_SQL_H" /D "XML_STATIC" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\aprutil-1" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"x64\LibR\aprutil-1.lib" + +!ELSEIF "$(CFG)" == "aprutil - x64 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "x64\LibD" +# PROP BASE Intermediate_Dir "x64\LibD" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "x64\LibD" +# PROP Intermediate_Dir "x64\LibD" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "../apr/include" /I "./include/private" /I "./xml/expat/lib" /I "../apr-iconv/include" /I "./dbm/sdbm" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "API_DECLARE_STATIC" /D "APU_USE_SDBM" /D "HAVE_SQL_H" /D "XML_STATIC" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\aprutil-1" /FD /EHsc /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"x64\LibD\aprutil-1.lib" + +!ENDIF + +# Begin Target + +# Name "aprutil - Win32 Release" +# Name "aprutil - Win32 Debug" +# Name "aprutil - x64 Release" +# Name "aprutil - x64 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "" +# Begin Group "buckets" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\buckets\apr_brigade.c +# End Source File +# Begin Source File + +SOURCE=.\buckets\apr_buckets.c +# End Source File +# Begin Source File + +SOURCE=.\buckets\apr_buckets_alloc.c +# End Source File +# Begin Source File + +SOURCE=.\buckets\apr_buckets_eos.c +# End Source File +# Begin Source File + +SOURCE=.\buckets\apr_buckets_file.c +# End Source File +# Begin Source File + +SOURCE=.\buckets\apr_buckets_flush.c +# End Source File +# Begin Source File + +SOURCE=.\buckets\apr_buckets_heap.c +# End Source File +# Begin Source File + +SOURCE=.\buckets\apr_buckets_mmap.c +# End Source File +# Begin Source File + +SOURCE=.\buckets\apr_buckets_pipe.c +# End Source File +# Begin Source File + +SOURCE=.\buckets\apr_buckets_pool.c +# End Source File +# Begin Source File + +SOURCE=.\buckets\apr_buckets_refcount.c +# End Source File +# Begin Source File + +SOURCE=.\buckets\apr_buckets_simple.c +# End Source File +# Begin Source File + +SOURCE=.\buckets\apr_buckets_socket.c +# End Source File +# End Group +# Begin Group "crypto" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\crypto\apr_crypto.c +# End Source File +# Begin Source File + +SOURCE=.\crypto\apr_md4.c +# End Source File +# Begin Source File + +SOURCE=.\crypto\apr_md5.c +# End Source File +# Begin Source File + +SOURCE=.\crypto\apr_passwd.c +# End Source File +# Begin Source File + +SOURCE=.\crypto\apr_sha1.c +# End Source File +# Begin Source File + +SOURCE=.\crypto\apr_siphash.c +# End Source File +# Begin Source File + +SOURCE=.\crypto\crypt_blowfish.c +# End Source File +# Begin Source File + +SOURCE=.\crypto\crypt_blowfish.h +# End Source File +# Begin Source File + +SOURCE=.\crypto\getuuid.c +# End Source File +# Begin Source File + +SOURCE=.\crypto\uuid.c +# End Source File +# End Group +# Begin Group "dbd" +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\dbd\apr_dbd.c +# End Source File +# Begin Source File + +SOURCE=.\dbd\apr_dbd_mysql.c +# End Source File +# Begin Source File + +SOURCE=.\dbd\apr_dbd_odbc.c +# End Source File +# Begin Source File + +SOURCE=.\dbd\apr_dbd_oracle.c +# End Source File +# Begin Source File + +SOURCE=.\dbd\apr_dbd_pgsql.c +# End Source File +# Begin Source File + +SOURCE=.\dbd\apr_dbd_sqlite2.c +# End Source File +# Begin Source File + +SOURCE=.\dbd\apr_dbd_sqlite3.c +# End Source File +# End Group +# Begin Group "dbm" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\dbm\apr_dbm.c +# End Source File +# Begin Source File + +SOURCE=.\dbm\apr_dbm_berkeleydb.c +# End Source File +# Begin Source File + +SOURCE=.\dbm\apr_dbm_gdbm.c +# End Source File +# Begin Source File + +SOURCE=.\dbm\apr_dbm_sdbm.c +# End Source File +# End Group +# Begin Group "encoding" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\encoding\apr_base64.c +# End Source File +# End Group +# Begin Group "hooks" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\hooks\apr_hooks.c +# End Source File +# End Group +# Begin Group "ldap" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\ldap\apr_ldap_init.c +# End Source File +# Begin Source File + +SOURCE=.\ldap\apr_ldap_option.c +# End Source File +# Begin Source File + +SOURCE=.\ldap\apr_ldap_rebind.c +# End Source File +# Begin Source File + +SOURCE=.\ldap\apr_ldap_stub.c +# End Source File +# Begin Source File + +SOURCE=.\ldap\apr_ldap_url.c +# End Source File +# End Group +# Begin Group "memcache" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\memcache\apr_memcache.c +# End Source File +# End Group +# Begin Group "misc" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\misc\apr_date.c +# End Source File +# Begin Source File + +SOURCE=.\misc\apu_dso.c +# End Source File +# Begin Source File + +SOURCE=.\misc\apr_queue.c +# End Source File +# Begin Source File + +SOURCE=.\misc\apr_reslist.c +# End Source File +# Begin Source File + +SOURCE=.\misc\apr_rmm.c +# End Source File +# Begin Source File + +SOURCE=.\misc\apr_thread_pool.c +# End Source File +# Begin Source File + +SOURCE=.\misc\apu_version.c +# End Source File +# End Group +# Begin Group "sdbm" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\dbm\sdbm\sdbm.c +# End Source File +# Begin Source File + +SOURCE=.\dbm\sdbm\sdbm_hash.c +# End Source File +# Begin Source File + +SOURCE=.\dbm\sdbm\sdbm_lock.c +# End Source File +# Begin Source File + +SOURCE=.\dbm\sdbm\sdbm_pair.c +# End Source File +# Begin Source File + +SOURCE=.\dbm\sdbm\sdbm_pair.h +# End Source File +# Begin Source File + +SOURCE=.\dbm\sdbm\sdbm_private.h +# End Source File +# Begin Source File + +SOURCE=.\dbm\sdbm\sdbm_tune.h +# End Source File +# End Group +# Begin Group "strmatch" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\strmatch\apr_strmatch.c +# End Source File +# End Group +# Begin Group "uri" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\uri\apr_uri.c +# End Source File +# End Group +# Begin Group "xlate" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\xlate\xlate.c +# End Source File +# End Group +# Begin Group "xml" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\xml\apr_xml.c +# End Source File +# End Group +# End Group +# Begin Group "Generated Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\include\apr_ldap.h.in +# End Source File +# Begin Source File + +SOURCE=.\include\apr_ldap.hnw +# End Source File +# Begin Source File + +SOURCE=.\include\apr_ldap.hw + +!IF "$(CFG)" == "aprutil - Win32 Release" + +# Begin Custom Build - Creating apr_ldap.h from apr_ldap.hw +InputPath=.\include\apr_ldap.hw + +".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\apr_ldap.hw > .\include\apr_ldap.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "aprutil - Win32 Debug" + +# Begin Custom Build - Creating apr_ldap.h from apr_ldap.hw +InputPath=.\include\apr_ldap.hw + +".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\apr_ldap.hw > .\include\apr_ldap.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "aprutil - x64 Release" + +# Begin Custom Build - Creating apr_ldap.h from apr_ldap.hw +InputPath=.\include\apr_ldap.hw + +".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\apr_ldap.hw > .\include\apr_ldap.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "aprutil - x64 Debug" + +# Begin Custom Build - Creating apr_ldap.h from apr_ldap.hw +InputPath=.\include\apr_ldap.hw + +".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\apr_ldap.hw > .\include\apr_ldap.h + +# End Custom Build + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\include\apu.h.in +# End Source File +# Begin Source File + +SOURCE=.\include\apu.hnw +# End Source File +# Begin Source File + +SOURCE=.\include\apu.hw + +!IF "$(CFG)" == "aprutil - Win32 Release" + +# Begin Custom Build - Creating apu.h from apu.hw +InputPath=.\include\apu.hw + +".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\apu.hw > .\include\apu.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "aprutil - Win32 Debug" + +# Begin Custom Build - Creating apu.h from apu.hw +InputPath=.\include\apu.hw + +".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\apu.hw > .\include\apu.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "aprutil - x64 Release" + +# Begin Custom Build - Creating apu.h from apu.hw +InputPath=.\include\apu.hw + +".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\apu.hw > .\include\apu.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "aprutil - x64 Debug" + +# Begin Custom Build - Creating apu.h from apu.hw +InputPath=.\include\apu.hw + +".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\apu.hw > .\include\apu.h + +# End Custom Build + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\include\private\apu_config.h.in +# End Source File +# Begin Source File + +SOURCE=.\include\private\apu_config.hw + +!IF "$(CFG)" == "aprutil - Win32 Release" + +# Begin Custom Build - Creating apu_config.h from apu_config.hw +InputPath=.\include\private\apu_config.hw + +".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\private\apu_config.hw > .\include\private\apu_config.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "aprutil - Win32 Debug" + +# Begin Custom Build - Creating apu_config.h from apu_config.hw +InputPath=.\include\private\apu_config.hw + +".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\private\apu_config.hw > .\include\private\apu_config.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "aprutil - x64 Release" + +# Begin Custom Build - Creating apu_config.h from apu_config.hw +InputPath=.\include\private\apu_config.hw + +".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\private\apu_config.hw > .\include\private\apu_config.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "aprutil - x64 Debug" + +# Begin Custom Build - Creating apu_config.h from apu_config.hw +InputPath=.\include\private\apu_config.hw + +".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\private\apu_config.hw > .\include\private\apu_config.h + +# End Custom Build + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\include\private\apu_select_dbm.h.in +# End Source File +# Begin Source File + +SOURCE=.\include\private\apu_select_dbm.hw + +!IF "$(CFG)" == "aprutil - Win32 Release" + +# Begin Custom Build - Creating apu_select_dbm.h from apu_select_dbm.hw +InputPath=.\include\private\apu_select_dbm.hw + +".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\private\apu_select_dbm.hw > .\include\private\apu_select_dbm.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "aprutil - Win32 Debug" + +# Begin Custom Build - Creating apu_select_dbm.h from apu_select_dbm.hw +InputPath=.\include\private\apu_select_dbm.hw + +".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\private\apu_select_dbm.hw > .\include\private\apu_select_dbm.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "aprutil - x64 Release" + +# Begin Custom Build - Creating apu_select_dbm.h from apu_select_dbm.hw +InputPath=.\include\private\apu_select_dbm.hw + +".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\private\apu_select_dbm.hw > .\include\private\apu_select_dbm.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "aprutil - x64 Debug" + +# Begin Custom Build - Creating apu_select_dbm.h from apu_select_dbm.hw +InputPath=.\include\private\apu_select_dbm.hw + +".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\private\apu_select_dbm.hw > .\include\private\apu_select_dbm.h + +# End Custom Build + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\include\apu_want.h.in +# End Source File +# Begin Source File + +SOURCE=.\include\apu_want.hnw +# End Source File +# Begin Source File + +SOURCE=.\include\apu_want.hw + +!IF "$(CFG)" == "aprutil - Win32 Release" + +# Begin Custom Build - Creating apu_want.h from apu_want.hw +InputPath=.\include\apu_want.hw + +".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\apu_want.hw > .\include\apu_want.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "aprutil - Win32 Debug" + +# Begin Custom Build - Creating apu_want.h from apu_want.hw +InputPath=.\include\apu_want.hw + +".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\apu_want.hw > .\include\apu_want.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "aprutil - x64 Release" + +# Begin Custom Build - Creating apu_want.h from apu_want.hw +InputPath=.\include\apu_want.hw + +".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\apu_want.hw > .\include\apu_want.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "aprutil - x64 Debug" + +# Begin Custom Build - Creating apu_want.h from apu_want.hw +InputPath=.\include\apu_want.hw + +".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\apu_want.hw > .\include\apu_want.h + +# End Custom Build + +!ENDIF + +# End Source File +# End Group +# Begin Group "Public Header Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\include\apr_anylock.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_base64.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_buckets.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_date.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_dbm.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_hooks.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_ldap_url.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_md4.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_md5.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_memcache.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_optional.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_optional_hooks.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_queue.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_reslist.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_rmm.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_sdbm.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_sha1.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_siphash.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_strmatch.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_thread_pool.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_uri.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_uuid.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_xlate.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_xml.h +# End Source File +# Begin Source File + +SOURCE=.\include\apu_version.h +# End Source File +# End Group +# End Target +# End Project Index: contrib/apr-util/aprutil.dsw =================================================================== --- contrib/apr-util/aprutil.dsw +++ contrib/apr-util/aprutil.dsw @@ -51,24 +51,6 @@ ############################################################################### -Project: "apr_dbd_freetds"=".\dbd\apr_dbd_freetds.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name libapr - End Project Dependency - Begin Project Dependency - Project_Dep_Name libaprutil - End Project Dependency -}}} - -############################################################################### - Project: "apr_dbd_mysql"=".\dbd\apr_dbd_mysql.dsp" - Package Owner=<4> Package=<5> @@ -275,9 +257,6 @@ Begin Project Dependency Project_Dep_Name apriconv End Project Dependency - Begin Project Dependency - Project_Dep_Name xml - End Project Dependency }}} ############################################################################### @@ -383,9 +362,6 @@ Begin Project Dependency Project_Dep_Name libapriconv_ces_modules End Project Dependency - Begin Project Dependency - Project_Dep_Name xml - End Project Dependency }}} ############################################################################### @@ -453,18 +429,6 @@ ############################################################################### -Project: "xml"=".\xml\expat\lib\xml.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - Global: Package=<5> Index: contrib/apr-util/aprutil.mak =================================================================== --- /dev/null +++ contrib/apr-util/aprutil.mak @@ -0,0 +1,1466 @@ +# Microsoft Developer Studio Generated NMAKE File, Based on aprutil.dsp +!IF "$(CFG)" == "" +CFG=aprutil - Win32 Release +!MESSAGE No configuration specified. Defaulting to aprutil - Win32 Release. +!ENDIF + +!IF "$(CFG)" != "aprutil - Win32 Release" && "$(CFG)" != "aprutil - Win32 Debug" && "$(CFG)" != "aprutil - x64 Release" && "$(CFG)" != "aprutil - 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: +!MESSAGE +!MESSAGE NMAKE /f "aprutil.mak" CFG="aprutil - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "aprutil - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "aprutil - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "aprutil - x64 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "aprutil - x64 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +!IF "$(_HAVE_OSSL110)" == "1" +SSLINC=/I ../openssl/include +!ELSE +SSLINC=/I ../openssl/inc32 +!ENDIF + +!IF "$(CFG)" == "aprutil - Win32 Release" + +OUTDIR=.\LibR +INTDIR=.\LibR +# Begin Custom Macros +OutDir=.\LibR +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\aprutil-1.lib" + +!ELSE + +ALL : "apriconv - Win32 Release" "$(OUTDIR)\aprutil-1.lib" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"apriconv - Win32 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_base64.obj" + -@erase "$(INTDIR)\apr_brigade.obj" + -@erase "$(INTDIR)\apr_buckets.obj" + -@erase "$(INTDIR)\apr_buckets_alloc.obj" + -@erase "$(INTDIR)\apr_buckets_eos.obj" + -@erase "$(INTDIR)\apr_buckets_file.obj" + -@erase "$(INTDIR)\apr_buckets_flush.obj" + -@erase "$(INTDIR)\apr_buckets_heap.obj" + -@erase "$(INTDIR)\apr_buckets_mmap.obj" + -@erase "$(INTDIR)\apr_buckets_pipe.obj" + -@erase "$(INTDIR)\apr_buckets_pool.obj" + -@erase "$(INTDIR)\apr_buckets_refcount.obj" + -@erase "$(INTDIR)\apr_buckets_simple.obj" + -@erase "$(INTDIR)\apr_buckets_socket.obj" + -@erase "$(INTDIR)\apr_crypto.obj" + -@erase "$(INTDIR)\apr_date.obj" + -@erase "$(INTDIR)\apr_dbd.obj" + -@erase "$(INTDIR)\apr_dbd_mysql.obj" + -@erase "$(INTDIR)\apr_dbd_odbc.obj" + -@erase "$(INTDIR)\apr_dbd_oracle.obj" + -@erase "$(INTDIR)\apr_dbd_pgsql.obj" + -@erase "$(INTDIR)\apr_dbd_sqlite2.obj" + -@erase "$(INTDIR)\apr_dbd_sqlite3.obj" + -@erase "$(INTDIR)\apr_dbm.obj" + -@erase "$(INTDIR)\apr_dbm_berkeleydb.obj" + -@erase "$(INTDIR)\apr_dbm_gdbm.obj" + -@erase "$(INTDIR)\apr_dbm_sdbm.obj" + -@erase "$(INTDIR)\apr_hooks.obj" + -@erase "$(INTDIR)\apr_ldap_init.obj" + -@erase "$(INTDIR)\apr_ldap_option.obj" + -@erase "$(INTDIR)\apr_ldap_rebind.obj" + -@erase "$(INTDIR)\apr_ldap_stub.obj" + -@erase "$(INTDIR)\apr_ldap_url.obj" + -@erase "$(INTDIR)\apr_md4.obj" + -@erase "$(INTDIR)\apr_md5.obj" + -@erase "$(INTDIR)\apr_memcache.obj" + -@erase "$(INTDIR)\apr_passwd.obj" + -@erase "$(INTDIR)\apr_queue.obj" + -@erase "$(INTDIR)\apr_redis.obj" + -@erase "$(INTDIR)\apr_reslist.obj" + -@erase "$(INTDIR)\apr_rmm.obj" + -@erase "$(INTDIR)\apr_sha1.obj" + -@erase "$(INTDIR)\apr_siphash.obj" + -@erase "$(INTDIR)\apr_strmatch.obj" + -@erase "$(INTDIR)\apr_thread_pool.obj" + -@erase "$(INTDIR)\apr_uri.obj" + -@erase "$(INTDIR)\apr_xml.obj" + -@erase "$(INTDIR)\aprutil-1.idb" + -@erase "$(INTDIR)\aprutil-1.pdb" + -@erase "$(INTDIR)\apu_dso.obj" + -@erase "$(INTDIR)\apu_version.obj" + -@erase "$(INTDIR)\crypt_blowfish.obj" + -@erase "$(INTDIR)\getuuid.obj" + -@erase "$(INTDIR)\sdbm.obj" + -@erase "$(INTDIR)\sdbm_hash.obj" + -@erase "$(INTDIR)\sdbm_lock.obj" + -@erase "$(INTDIR)\sdbm_pair.obj" + -@erase "$(INTDIR)\uuid.obj" + -@erase "$(INTDIR)\xlate.obj" + -@erase "$(OUTDIR)\aprutil-1.lib" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "../apr/include" /I "./include/private" /I "../apr-iconv/include" /I "./dbm/sdbm" /I "./xml/expat/lib" $(SSLINC) /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "API_DECLARE_STATIC" /D "APU_USE_SDBM" /D "HAVE_SQL_H" /D "XML_STATIC" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(OUTDIR)\aprutil-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)\aprutil.bsc" +BSC32_SBRS= \ + +LIB32=link.exe -lib +LIB32_FLAGS=/nologo /out:"$(OUTDIR)\aprutil-1.lib" +LIB32_OBJS= \ + "$(INTDIR)\apr_brigade.obj" \ + "$(INTDIR)\apr_buckets.obj" \ + "$(INTDIR)\apr_buckets_alloc.obj" \ + "$(INTDIR)\apr_buckets_eos.obj" \ + "$(INTDIR)\apr_buckets_file.obj" \ + "$(INTDIR)\apr_buckets_flush.obj" \ + "$(INTDIR)\apr_buckets_heap.obj" \ + "$(INTDIR)\apr_buckets_mmap.obj" \ + "$(INTDIR)\apr_buckets_pipe.obj" \ + "$(INTDIR)\apr_buckets_pool.obj" \ + "$(INTDIR)\apr_buckets_refcount.obj" \ + "$(INTDIR)\apr_buckets_simple.obj" \ + "$(INTDIR)\apr_buckets_socket.obj" \ + "$(INTDIR)\apr_crypto.obj" \ + "$(INTDIR)\apr_md4.obj" \ + "$(INTDIR)\apr_md5.obj" \ + "$(INTDIR)\apr_passwd.obj" \ + "$(INTDIR)\apr_sha1.obj" \ + "$(INTDIR)\apr_siphash.obj" \ + "$(INTDIR)\crypt_blowfish.obj" \ + "$(INTDIR)\getuuid.obj" \ + "$(INTDIR)\uuid.obj" \ + "$(INTDIR)\apr_dbd.obj" \ + "$(INTDIR)\apr_dbd_mysql.obj" \ + "$(INTDIR)\apr_dbd_odbc.obj" \ + "$(INTDIR)\apr_dbd_oracle.obj" \ + "$(INTDIR)\apr_dbd_pgsql.obj" \ + "$(INTDIR)\apr_dbd_sqlite2.obj" \ + "$(INTDIR)\apr_dbd_sqlite3.obj" \ + "$(INTDIR)\apr_dbm.obj" \ + "$(INTDIR)\apr_dbm_berkeleydb.obj" \ + "$(INTDIR)\apr_dbm_gdbm.obj" \ + "$(INTDIR)\apr_dbm_sdbm.obj" \ + "$(INTDIR)\apr_base64.obj" \ + "$(INTDIR)\apr_hooks.obj" \ + "$(INTDIR)\apr_ldap_init.obj" \ + "$(INTDIR)\apr_ldap_option.obj" \ + "$(INTDIR)\apr_ldap_rebind.obj" \ + "$(INTDIR)\apr_ldap_stub.obj" \ + "$(INTDIR)\apr_ldap_url.obj" \ + "$(INTDIR)\apr_memcache.obj" \ + "$(INTDIR)\apr_date.obj" \ + "$(INTDIR)\apu_dso.obj" \ + "$(INTDIR)\apr_queue.obj" \ + "$(INTDIR)\apr_redis.obj" \ + "$(INTDIR)\apr_reslist.obj" \ + "$(INTDIR)\apr_rmm.obj" \ + "$(INTDIR)\apr_thread_pool.obj" \ + "$(INTDIR)\apu_version.obj" \ + "$(INTDIR)\sdbm.obj" \ + "$(INTDIR)\sdbm_hash.obj" \ + "$(INTDIR)\sdbm_lock.obj" \ + "$(INTDIR)\sdbm_pair.obj" \ + "$(INTDIR)\apr_strmatch.obj" \ + "$(INTDIR)\apr_uri.obj" \ + "$(INTDIR)\xlate.obj" \ + "$(INTDIR)\apr_xml.obj" \ + "..\apr-iconv\LibR\apriconv-1.lib" + +"$(OUTDIR)\aprutil-1.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS) + $(LIB32) @<< + $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS) +<< + +!ELSEIF "$(CFG)" == "aprutil - Win32 Debug" + +OUTDIR=.\LibD +INTDIR=.\LibD +# Begin Custom Macros +OutDir=.\LibD +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : ".\include\private\apu_select_dbm.h" ".\include\private\apu_config.h" ".\include\apu_want.h" ".\include\apu.h" ".\include\apr_ldap.h" "$(OUTDIR)\aprutil-1.lib" + +!ELSE + +ALL : "apriconv - Win32 Debug" ".\include\private\apu_select_dbm.h" ".\include\private\apu_config.h" ".\include\apu_want.h" ".\include\apu.h" ".\include\apr_ldap.h" "$(OUTDIR)\aprutil-1.lib" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"apriconv - Win32 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_base64.obj" + -@erase "$(INTDIR)\apr_brigade.obj" + -@erase "$(INTDIR)\apr_buckets.obj" + -@erase "$(INTDIR)\apr_buckets_alloc.obj" + -@erase "$(INTDIR)\apr_buckets_eos.obj" + -@erase "$(INTDIR)\apr_buckets_file.obj" + -@erase "$(INTDIR)\apr_buckets_flush.obj" + -@erase "$(INTDIR)\apr_buckets_heap.obj" + -@erase "$(INTDIR)\apr_buckets_mmap.obj" + -@erase "$(INTDIR)\apr_buckets_pipe.obj" + -@erase "$(INTDIR)\apr_buckets_pool.obj" + -@erase "$(INTDIR)\apr_buckets_refcount.obj" + -@erase "$(INTDIR)\apr_buckets_simple.obj" + -@erase "$(INTDIR)\apr_buckets_socket.obj" + -@erase "$(INTDIR)\apr_crypto.obj" + -@erase "$(INTDIR)\apr_date.obj" + -@erase "$(INTDIR)\apr_dbd.obj" + -@erase "$(INTDIR)\apr_dbd_mysql.obj" + -@erase "$(INTDIR)\apr_dbd_odbc.obj" + -@erase "$(INTDIR)\apr_dbd_oracle.obj" + -@erase "$(INTDIR)\apr_dbd_pgsql.obj" + -@erase "$(INTDIR)\apr_dbd_sqlite2.obj" + -@erase "$(INTDIR)\apr_dbd_sqlite3.obj" + -@erase "$(INTDIR)\apr_dbm.obj" + -@erase "$(INTDIR)\apr_dbm_berkeleydb.obj" + -@erase "$(INTDIR)\apr_dbm_gdbm.obj" + -@erase "$(INTDIR)\apr_dbm_sdbm.obj" + -@erase "$(INTDIR)\apr_hooks.obj" + -@erase "$(INTDIR)\apr_ldap_init.obj" + -@erase "$(INTDIR)\apr_ldap_option.obj" + -@erase "$(INTDIR)\apr_ldap_rebind.obj" + -@erase "$(INTDIR)\apr_ldap_stub.obj" + -@erase "$(INTDIR)\apr_ldap_url.obj" + -@erase "$(INTDIR)\apr_md4.obj" + -@erase "$(INTDIR)\apr_md5.obj" + -@erase "$(INTDIR)\apr_memcache.obj" + -@erase "$(INTDIR)\apr_passwd.obj" + -@erase "$(INTDIR)\apr_queue.obj" + -@erase "$(INTDIR)\apr_redis.obj" + -@erase "$(INTDIR)\apr_reslist.obj" + -@erase "$(INTDIR)\apr_rmm.obj" + -@erase "$(INTDIR)\apr_sha1.obj" + -@erase "$(INTDIR)\apr_siphash.obj" + -@erase "$(INTDIR)\apr_strmatch.obj" + -@erase "$(INTDIR)\apr_thread_pool.obj" + -@erase "$(INTDIR)\apr_uri.obj" + -@erase "$(INTDIR)\apr_xml.obj" + -@erase "$(INTDIR)\aprutil-1.idb" + -@erase "$(INTDIR)\aprutil-1.pdb" + -@erase "$(INTDIR)\apu_dso.obj" + -@erase "$(INTDIR)\apu_version.obj" + -@erase "$(INTDIR)\crypt_blowfish.obj" + -@erase "$(INTDIR)\getuuid.obj" + -@erase "$(INTDIR)\sdbm.obj" + -@erase "$(INTDIR)\sdbm_hash.obj" + -@erase "$(INTDIR)\sdbm_lock.obj" + -@erase "$(INTDIR)\sdbm_pair.obj" + -@erase "$(INTDIR)\uuid.obj" + -@erase "$(INTDIR)\xlate.obj" + -@erase "$(OUTDIR)\aprutil-1.lib" + -@erase ".\include\apr_ldap.h" + -@erase ".\include\apu.h" + -@erase ".\include\apu_want.h" + -@erase ".\include\private\apu_config.h" + -@erase ".\include\private\apu_select_dbm.h" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "./include" /I "../apr/include" /I "./include/private" /I "../apr-iconv/include" /I "./dbm/sdbm" /I "./xml/expat/lib" $(SSLINC)/D "_DEBUG" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "API_DECLARE_STATIC" /D "APU_USE_SDBM" /D "HAVE_SQL_H" /D "XML_STATIC" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(OUTDIR)\aprutil-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)\aprutil.bsc" +BSC32_SBRS= \ + +LIB32=link.exe -lib +LIB32_FLAGS=/nologo /out:"$(OUTDIR)\aprutil-1.lib" +LIB32_OBJS= \ + "$(INTDIR)\apr_brigade.obj" \ + "$(INTDIR)\apr_buckets.obj" \ + "$(INTDIR)\apr_buckets_alloc.obj" \ + "$(INTDIR)\apr_buckets_eos.obj" \ + "$(INTDIR)\apr_buckets_file.obj" \ + "$(INTDIR)\apr_buckets_flush.obj" \ + "$(INTDIR)\apr_buckets_heap.obj" \ + "$(INTDIR)\apr_buckets_mmap.obj" \ + "$(INTDIR)\apr_buckets_pipe.obj" \ + "$(INTDIR)\apr_buckets_pool.obj" \ + "$(INTDIR)\apr_buckets_refcount.obj" \ + "$(INTDIR)\apr_buckets_simple.obj" \ + "$(INTDIR)\apr_buckets_socket.obj" \ + "$(INTDIR)\apr_crypto.obj" \ + "$(INTDIR)\apr_md4.obj" \ + "$(INTDIR)\apr_md5.obj" \ + "$(INTDIR)\apr_passwd.obj" \ + "$(INTDIR)\apr_sha1.obj" \ + "$(INTDIR)\apr_siphash.obj" \ + "$(INTDIR)\crypt_blowfish.obj" \ + "$(INTDIR)\getuuid.obj" \ + "$(INTDIR)\uuid.obj" \ + "$(INTDIR)\apr_dbd.obj" \ + "$(INTDIR)\apr_dbd_mysql.obj" \ + "$(INTDIR)\apr_dbd_odbc.obj" \ + "$(INTDIR)\apr_dbd_oracle.obj" \ + "$(INTDIR)\apr_dbd_pgsql.obj" \ + "$(INTDIR)\apr_dbd_sqlite2.obj" \ + "$(INTDIR)\apr_dbd_sqlite3.obj" \ + "$(INTDIR)\apr_dbm.obj" \ + "$(INTDIR)\apr_dbm_berkeleydb.obj" \ + "$(INTDIR)\apr_dbm_gdbm.obj" \ + "$(INTDIR)\apr_dbm_sdbm.obj" \ + "$(INTDIR)\apr_base64.obj" \ + "$(INTDIR)\apr_hooks.obj" \ + "$(INTDIR)\apr_ldap_init.obj" \ + "$(INTDIR)\apr_ldap_option.obj" \ + "$(INTDIR)\apr_ldap_rebind.obj" \ + "$(INTDIR)\apr_ldap_stub.obj" \ + "$(INTDIR)\apr_ldap_url.obj" \ + "$(INTDIR)\apr_memcache.obj" \ + "$(INTDIR)\apr_date.obj" \ + "$(INTDIR)\apu_dso.obj" \ + "$(INTDIR)\apr_queue.obj" \ + "$(INTDIR)\apr_redis.obj" \ + "$(INTDIR)\apr_reslist.obj" \ + "$(INTDIR)\apr_rmm.obj" \ + "$(INTDIR)\apr_thread_pool.obj" \ + "$(INTDIR)\apu_version.obj" \ + "$(INTDIR)\sdbm.obj" \ + "$(INTDIR)\sdbm_hash.obj" \ + "$(INTDIR)\sdbm_lock.obj" \ + "$(INTDIR)\sdbm_pair.obj" \ + "$(INTDIR)\apr_strmatch.obj" \ + "$(INTDIR)\apr_uri.obj" \ + "$(INTDIR)\xlate.obj" \ + "$(INTDIR)\apr_xml.obj" \ + "..\apr-iconv\LibD\apriconv-1.lib" + +"$(OUTDIR)\aprutil-1.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS) + $(LIB32) @<< + $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS) +<< + +!ELSEIF "$(CFG)" == "aprutil - x64 Release" + +OUTDIR=.\x64\LibR +INTDIR=.\x64\LibR +# Begin Custom Macros +OutDir=.\x64\LibR +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : ".\include\private\apu_select_dbm.h" ".\include\private\apu_config.h" ".\include\apu_want.h" ".\include\apu.h" ".\include\apr_ldap.h" "$(OUTDIR)\aprutil-1.lib" + +!ELSE + +ALL : "apriconv - x64 Release" ".\include\private\apu_select_dbm.h" ".\include\private\apu_config.h" ".\include\apu_want.h" ".\include\apu.h" ".\include\apr_ldap.h" "$(OUTDIR)\aprutil-1.lib" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"apriconv - x64 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_base64.obj" + -@erase "$(INTDIR)\apr_brigade.obj" + -@erase "$(INTDIR)\apr_buckets.obj" + -@erase "$(INTDIR)\apr_buckets_alloc.obj" + -@erase "$(INTDIR)\apr_buckets_eos.obj" + -@erase "$(INTDIR)\apr_buckets_file.obj" + -@erase "$(INTDIR)\apr_buckets_flush.obj" + -@erase "$(INTDIR)\apr_buckets_heap.obj" + -@erase "$(INTDIR)\apr_buckets_mmap.obj" + -@erase "$(INTDIR)\apr_buckets_pipe.obj" + -@erase "$(INTDIR)\apr_buckets_pool.obj" + -@erase "$(INTDIR)\apr_buckets_refcount.obj" + -@erase "$(INTDIR)\apr_buckets_simple.obj" + -@erase "$(INTDIR)\apr_buckets_socket.obj" + -@erase "$(INTDIR)\apr_crypto.obj" + -@erase "$(INTDIR)\apr_date.obj" + -@erase "$(INTDIR)\apr_dbd.obj" + -@erase "$(INTDIR)\apr_dbd_mysql.obj" + -@erase "$(INTDIR)\apr_dbd_odbc.obj" + -@erase "$(INTDIR)\apr_dbd_oracle.obj" + -@erase "$(INTDIR)\apr_dbd_pgsql.obj" + -@erase "$(INTDIR)\apr_dbd_sqlite2.obj" + -@erase "$(INTDIR)\apr_dbd_sqlite3.obj" + -@erase "$(INTDIR)\apr_dbm.obj" + -@erase "$(INTDIR)\apr_dbm_berkeleydb.obj" + -@erase "$(INTDIR)\apr_dbm_gdbm.obj" + -@erase "$(INTDIR)\apr_dbm_sdbm.obj" + -@erase "$(INTDIR)\apr_hooks.obj" + -@erase "$(INTDIR)\apr_ldap_init.obj" + -@erase "$(INTDIR)\apr_ldap_option.obj" + -@erase "$(INTDIR)\apr_ldap_rebind.obj" + -@erase "$(INTDIR)\apr_ldap_stub.obj" + -@erase "$(INTDIR)\apr_ldap_url.obj" + -@erase "$(INTDIR)\apr_md4.obj" + -@erase "$(INTDIR)\apr_md5.obj" + -@erase "$(INTDIR)\apr_memcache.obj" + -@erase "$(INTDIR)\apr_passwd.obj" + -@erase "$(INTDIR)\apr_queue.obj" + -@erase "$(INTDIR)\apr_redis.obj" + -@erase "$(INTDIR)\apr_reslist.obj" + -@erase "$(INTDIR)\apr_rmm.obj" + -@erase "$(INTDIR)\apr_sha1.obj" + -@erase "$(INTDIR)\apr_siphash.obj" + -@erase "$(INTDIR)\apr_strmatch.obj" + -@erase "$(INTDIR)\apr_thread_pool.obj" + -@erase "$(INTDIR)\apr_uri.obj" + -@erase "$(INTDIR)\apr_xml.obj" + -@erase "$(INTDIR)\aprutil-1.idb" + -@erase "$(INTDIR)\aprutil-1.pdb" + -@erase "$(INTDIR)\apu_dso.obj" + -@erase "$(INTDIR)\apu_version.obj" + -@erase "$(INTDIR)\crypt_blowfish.obj" + -@erase "$(INTDIR)\getuuid.obj" + -@erase "$(INTDIR)\sdbm.obj" + -@erase "$(INTDIR)\sdbm_hash.obj" + -@erase "$(INTDIR)\sdbm_lock.obj" + -@erase "$(INTDIR)\sdbm_pair.obj" + -@erase "$(INTDIR)\uuid.obj" + -@erase "$(INTDIR)\xlate.obj" + -@erase "$(OUTDIR)\aprutil-1.lib" + -@erase ".\include\apr_ldap.h" + -@erase ".\include\apu.h" + -@erase ".\include\apu_want.h" + -@erase ".\include\private\apu_config.h" + -@erase ".\include\private\apu_select_dbm.h" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "../apr/include" /I "./include/private" /I "../apr-iconv/include" /I "./dbm/sdbm" /I "./xml/expat/lib" $(SSLINC) /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "API_DECLARE_STATIC" /D "APU_USE_SDBM" /D "HAVE_SQL_H" /D "XML_STATIC" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(OUTDIR)\aprutil-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)\aprutil.bsc" +BSC32_SBRS= \ + +LIB32=link.exe -lib +LIB32_FLAGS=/nologo /out:"$(OUTDIR)\aprutil-1.lib" +LIB32_OBJS= \ + "$(INTDIR)\apr_brigade.obj" \ + "$(INTDIR)\apr_buckets.obj" \ + "$(INTDIR)\apr_buckets_alloc.obj" \ + "$(INTDIR)\apr_buckets_eos.obj" \ + "$(INTDIR)\apr_buckets_file.obj" \ + "$(INTDIR)\apr_buckets_flush.obj" \ + "$(INTDIR)\apr_buckets_heap.obj" \ + "$(INTDIR)\apr_buckets_mmap.obj" \ + "$(INTDIR)\apr_buckets_pipe.obj" \ + "$(INTDIR)\apr_buckets_pool.obj" \ + "$(INTDIR)\apr_buckets_refcount.obj" \ + "$(INTDIR)\apr_buckets_simple.obj" \ + "$(INTDIR)\apr_buckets_socket.obj" \ + "$(INTDIR)\apr_crypto.obj" \ + "$(INTDIR)\apr_md4.obj" \ + "$(INTDIR)\apr_md5.obj" \ + "$(INTDIR)\apr_passwd.obj" \ + "$(INTDIR)\apr_sha1.obj" \ + "$(INTDIR)\apr_siphash.obj" \ + "$(INTDIR)\crypt_blowfish.obj" \ + "$(INTDIR)\getuuid.obj" \ + "$(INTDIR)\uuid.obj" \ + "$(INTDIR)\apr_dbd.obj" \ + "$(INTDIR)\apr_dbd_mysql.obj" \ + "$(INTDIR)\apr_dbd_odbc.obj" \ + "$(INTDIR)\apr_dbd_oracle.obj" \ + "$(INTDIR)\apr_dbd_pgsql.obj" \ + "$(INTDIR)\apr_dbd_sqlite2.obj" \ + "$(INTDIR)\apr_dbd_sqlite3.obj" \ + "$(INTDIR)\apr_dbm.obj" \ + "$(INTDIR)\apr_dbm_berkeleydb.obj" \ + "$(INTDIR)\apr_dbm_gdbm.obj" \ + "$(INTDIR)\apr_dbm_sdbm.obj" \ + "$(INTDIR)\apr_base64.obj" \ + "$(INTDIR)\apr_hooks.obj" \ + "$(INTDIR)\apr_ldap_init.obj" \ + "$(INTDIR)\apr_ldap_option.obj" \ + "$(INTDIR)\apr_ldap_rebind.obj" \ + "$(INTDIR)\apr_ldap_stub.obj" \ + "$(INTDIR)\apr_ldap_url.obj" \ + "$(INTDIR)\apr_memcache.obj" \ + "$(INTDIR)\apr_date.obj" \ + "$(INTDIR)\apu_dso.obj" \ + "$(INTDIR)\apr_queue.obj" \ + "$(INTDIR)\apr_redis.obj" \ + "$(INTDIR)\apr_reslist.obj" \ + "$(INTDIR)\apr_rmm.obj" \ + "$(INTDIR)\apr_thread_pool.obj" \ + "$(INTDIR)\apu_version.obj" \ + "$(INTDIR)\sdbm.obj" \ + "$(INTDIR)\sdbm_hash.obj" \ + "$(INTDIR)\sdbm_lock.obj" \ + "$(INTDIR)\sdbm_pair.obj" \ + "$(INTDIR)\apr_strmatch.obj" \ + "$(INTDIR)\apr_uri.obj" \ + "$(INTDIR)\xlate.obj" \ + "$(INTDIR)\apr_xml.obj" \ + "..\apr-iconv\x64\LibR\apriconv-1.lib" + +"$(OUTDIR)\aprutil-1.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS) + $(LIB32) @<< + $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS) +<< + +!ELSEIF "$(CFG)" == "aprutil - x64 Debug" + +OUTDIR=.\x64\LibD +INTDIR=.\x64\LibD +# Begin Custom Macros +OutDir=.\x64\LibD +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : ".\include\private\apu_select_dbm.h" ".\include\private\apu_config.h" ".\include\apu_want.h" ".\include\apu.h" ".\include\apr_ldap.h" "$(OUTDIR)\aprutil-1.lib" + +!ELSE + +ALL : "apriconv - x64 Debug" ".\include\private\apu_select_dbm.h" ".\include\private\apu_config.h" ".\include\apu_want.h" ".\include\apu.h" ".\include\apr_ldap.h" "$(OUTDIR)\aprutil-1.lib" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"apriconv - x64 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_base64.obj" + -@erase "$(INTDIR)\apr_brigade.obj" + -@erase "$(INTDIR)\apr_buckets.obj" + -@erase "$(INTDIR)\apr_buckets_alloc.obj" + -@erase "$(INTDIR)\apr_buckets_eos.obj" + -@erase "$(INTDIR)\apr_buckets_file.obj" + -@erase "$(INTDIR)\apr_buckets_flush.obj" + -@erase "$(INTDIR)\apr_buckets_heap.obj" + -@erase "$(INTDIR)\apr_buckets_mmap.obj" + -@erase "$(INTDIR)\apr_buckets_pipe.obj" + -@erase "$(INTDIR)\apr_buckets_pool.obj" + -@erase "$(INTDIR)\apr_buckets_refcount.obj" + -@erase "$(INTDIR)\apr_buckets_simple.obj" + -@erase "$(INTDIR)\apr_buckets_socket.obj" + -@erase "$(INTDIR)\apr_crypto.obj" + -@erase "$(INTDIR)\apr_date.obj" + -@erase "$(INTDIR)\apr_dbd.obj" + -@erase "$(INTDIR)\apr_dbd_mysql.obj" + -@erase "$(INTDIR)\apr_dbd_odbc.obj" + -@erase "$(INTDIR)\apr_dbd_oracle.obj" + -@erase "$(INTDIR)\apr_dbd_pgsql.obj" + -@erase "$(INTDIR)\apr_dbd_sqlite2.obj" + -@erase "$(INTDIR)\apr_dbd_sqlite3.obj" + -@erase "$(INTDIR)\apr_dbm.obj" + -@erase "$(INTDIR)\apr_dbm_berkeleydb.obj" + -@erase "$(INTDIR)\apr_dbm_gdbm.obj" + -@erase "$(INTDIR)\apr_dbm_sdbm.obj" + -@erase "$(INTDIR)\apr_hooks.obj" + -@erase "$(INTDIR)\apr_ldap_init.obj" + -@erase "$(INTDIR)\apr_ldap_option.obj" + -@erase "$(INTDIR)\apr_ldap_rebind.obj" + -@erase "$(INTDIR)\apr_ldap_stub.obj" + -@erase "$(INTDIR)\apr_ldap_url.obj" + -@erase "$(INTDIR)\apr_md4.obj" + -@erase "$(INTDIR)\apr_md5.obj" + -@erase "$(INTDIR)\apr_memcache.obj" + -@erase "$(INTDIR)\apr_passwd.obj" + -@erase "$(INTDIR)\apr_queue.obj" + -@erase "$(INTDIR)\apr_redis.obj" + -@erase "$(INTDIR)\apr_reslist.obj" + -@erase "$(INTDIR)\apr_rmm.obj" + -@erase "$(INTDIR)\apr_sha1.obj" + -@erase "$(INTDIR)\apr_siphash.obj" + -@erase "$(INTDIR)\apr_strmatch.obj" + -@erase "$(INTDIR)\apr_thread_pool.obj" + -@erase "$(INTDIR)\apr_uri.obj" + -@erase "$(INTDIR)\apr_xml.obj" + -@erase "$(INTDIR)\aprutil-1.idb" + -@erase "$(INTDIR)\aprutil-1.pdb" + -@erase "$(INTDIR)\apu_dso.obj" + -@erase "$(INTDIR)\apu_version.obj" + -@erase "$(INTDIR)\crypt_blowfish.obj" + -@erase "$(INTDIR)\getuuid.obj" + -@erase "$(INTDIR)\sdbm.obj" + -@erase "$(INTDIR)\sdbm_hash.obj" + -@erase "$(INTDIR)\sdbm_lock.obj" + -@erase "$(INTDIR)\sdbm_pair.obj" + -@erase "$(INTDIR)\uuid.obj" + -@erase "$(INTDIR)\xlate.obj" + -@erase "$(OUTDIR)\aprutil-1.lib" + -@erase ".\include\apr_ldap.h" + -@erase ".\include\apu.h" + -@erase ".\include\apu_want.h" + -@erase ".\include\private\apu_config.h" + -@erase ".\include\private\apu_select_dbm.h" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "./include" /I "../apr/include" /I "./include/private" /I "../apr-iconv/include" /I "./dbm/sdbm" /I "./xml/expat/lib" $(SSLINC) /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "API_DECLARE_STATIC" /D "APU_USE_SDBM" /D "HAVE_SQL_H" /D "XML_STATIC" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(OUTDIR)\aprutil-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)\aprutil.bsc" +BSC32_SBRS= \ + +LIB32=link.exe -lib +LIB32_FLAGS=/nologo /out:"$(OUTDIR)\aprutil-1.lib" +LIB32_OBJS= \ + "$(INTDIR)\apr_brigade.obj" \ + "$(INTDIR)\apr_buckets.obj" \ + "$(INTDIR)\apr_buckets_alloc.obj" \ + "$(INTDIR)\apr_buckets_eos.obj" \ + "$(INTDIR)\apr_buckets_file.obj" \ + "$(INTDIR)\apr_buckets_flush.obj" \ + "$(INTDIR)\apr_buckets_heap.obj" \ + "$(INTDIR)\apr_buckets_mmap.obj" \ + "$(INTDIR)\apr_buckets_pipe.obj" \ + "$(INTDIR)\apr_buckets_pool.obj" \ + "$(INTDIR)\apr_buckets_refcount.obj" \ + "$(INTDIR)\apr_buckets_simple.obj" \ + "$(INTDIR)\apr_buckets_socket.obj" \ + "$(INTDIR)\apr_crypto.obj" \ + "$(INTDIR)\apr_md4.obj" \ + "$(INTDIR)\apr_md5.obj" \ + "$(INTDIR)\apr_passwd.obj" \ + "$(INTDIR)\apr_sha1.obj" \ + "$(INTDIR)\apr_siphash.obj" \ + "$(INTDIR)\crypt_blowfish.obj" \ + "$(INTDIR)\getuuid.obj" \ + "$(INTDIR)\uuid.obj" \ + "$(INTDIR)\apr_dbd.obj" \ + "$(INTDIR)\apr_dbd_mysql.obj" \ + "$(INTDIR)\apr_dbd_odbc.obj" \ + "$(INTDIR)\apr_dbd_oracle.obj" \ + "$(INTDIR)\apr_dbd_pgsql.obj" \ + "$(INTDIR)\apr_dbd_sqlite2.obj" \ + "$(INTDIR)\apr_dbd_sqlite3.obj" \ + "$(INTDIR)\apr_dbm.obj" \ + "$(INTDIR)\apr_dbm_berkeleydb.obj" \ + "$(INTDIR)\apr_dbm_gdbm.obj" \ + "$(INTDIR)\apr_dbm_sdbm.obj" \ + "$(INTDIR)\apr_base64.obj" \ + "$(INTDIR)\apr_hooks.obj" \ + "$(INTDIR)\apr_ldap_init.obj" \ + "$(INTDIR)\apr_ldap_option.obj" \ + "$(INTDIR)\apr_ldap_rebind.obj" \ + "$(INTDIR)\apr_ldap_stub.obj" \ + "$(INTDIR)\apr_ldap_url.obj" \ + "$(INTDIR)\apr_memcache.obj" \ + "$(INTDIR)\apr_date.obj" \ + "$(INTDIR)\apu_dso.obj" \ + "$(INTDIR)\apr_queue.obj" \ + "$(INTDIR)\apr_redis.obj" \ + "$(INTDIR)\apr_reslist.obj" \ + "$(INTDIR)\apr_rmm.obj" \ + "$(INTDIR)\apr_thread_pool.obj" \ + "$(INTDIR)\apu_version.obj" \ + "$(INTDIR)\sdbm.obj" \ + "$(INTDIR)\sdbm_hash.obj" \ + "$(INTDIR)\sdbm_lock.obj" \ + "$(INTDIR)\sdbm_pair.obj" \ + "$(INTDIR)\apr_strmatch.obj" \ + "$(INTDIR)\apr_uri.obj" \ + "$(INTDIR)\xlate.obj" \ + "$(INTDIR)\apr_xml.obj" \ + "..\apr-iconv\x64\LibD\apriconv-1.lib" + +"$(OUTDIR)\aprutil-1.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS) + $(LIB32) @<< + $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS) +<< + +!ENDIF + + +!IF "$(NO_EXTERNAL_DEPS)" != "1" +!IF EXISTS("aprutil.dep") +!INCLUDE "aprutil.dep" +!ELSE +!MESSAGE Warning: cannot find "aprutil.dep" +!ENDIF +!ENDIF + + +!IF "$(CFG)" == "aprutil - Win32 Release" || "$(CFG)" == "aprutil - Win32 Debug" || "$(CFG)" == "aprutil - x64 Release" || "$(CFG)" == "aprutil - x64 Debug" +SOURCE=.\buckets\apr_brigade.c + +"$(INTDIR)\apr_brigade.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\buckets\apr_buckets.c + +"$(INTDIR)\apr_buckets.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\buckets\apr_buckets_alloc.c + +"$(INTDIR)\apr_buckets_alloc.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\buckets\apr_buckets_eos.c + +"$(INTDIR)\apr_buckets_eos.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\buckets\apr_buckets_file.c + +"$(INTDIR)\apr_buckets_file.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\buckets\apr_buckets_flush.c + +"$(INTDIR)\apr_buckets_flush.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\buckets\apr_buckets_heap.c + +"$(INTDIR)\apr_buckets_heap.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\buckets\apr_buckets_mmap.c + +"$(INTDIR)\apr_buckets_mmap.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\buckets\apr_buckets_pipe.c + +"$(INTDIR)\apr_buckets_pipe.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\buckets\apr_buckets_pool.c + +"$(INTDIR)\apr_buckets_pool.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\buckets\apr_buckets_refcount.c + +"$(INTDIR)\apr_buckets_refcount.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\buckets\apr_buckets_simple.c + +"$(INTDIR)\apr_buckets_simple.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\buckets\apr_buckets_socket.c + +"$(INTDIR)\apr_buckets_socket.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\crypto\apr_crypto.c + +"$(INTDIR)\apr_crypto.obj" : $(SOURCE) "$(INTDIR)" ".\include\private\apu_config.h" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\crypto\apr_md4.c + +"$(INTDIR)\apr_md4.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\crypto\apr_md5.c + +"$(INTDIR)\apr_md5.obj" : $(SOURCE) "$(INTDIR)" ".\include\private\apu_config.h" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\crypto\apr_passwd.c + +"$(INTDIR)\apr_passwd.obj" : $(SOURCE) "$(INTDIR)" ".\include\private\apu_config.h" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\crypto\apr_sha1.c + +"$(INTDIR)\apr_sha1.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\crypto\apr_siphash.c + +"$(INTDIR)\apr_siphash.obj" : $(SOURCE) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\crypto\crypt_blowfish.c + +"$(INTDIR)\crypt_blowfish.obj" : $(SOURCE) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\crypto\getuuid.c + +"$(INTDIR)\getuuid.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\crypto\uuid.c + +"$(INTDIR)\uuid.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\dbd\apr_dbd.c + +"$(INTDIR)\apr_dbd.obj" : $(SOURCE) "$(INTDIR)" ".\include\private\apu_config.h" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\dbd\apr_dbd_mysql.c + +"$(INTDIR)\apr_dbd_mysql.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" ".\include\private\apu_config.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\dbd\apr_dbd_odbc.c + +"$(INTDIR)\apr_dbd_odbc.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" ".\include\private\apu_config.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\dbd\apr_dbd_oracle.c + +"$(INTDIR)\apr_dbd_oracle.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\dbd\apr_dbd_pgsql.c + +"$(INTDIR)\apr_dbd_pgsql.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" ".\include\private\apu_config.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\dbd\apr_dbd_sqlite2.c + +"$(INTDIR)\apr_dbd_sqlite2.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\dbd\apr_dbd_sqlite3.c + +"$(INTDIR)\apr_dbd_sqlite3.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\dbm\apr_dbm.c + +"$(INTDIR)\apr_dbm.obj" : $(SOURCE) "$(INTDIR)" ".\include\private\apu_config.h" ".\include\apu.h" ".\include\private\apu_select_dbm.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\dbm\apr_dbm_berkeleydb.c + +"$(INTDIR)\apr_dbm_berkeleydb.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu_want.h" ".\include\private\apu_config.h" ".\include\apu.h" ".\include\private\apu_select_dbm.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\dbm\apr_dbm_gdbm.c + +"$(INTDIR)\apr_dbm_gdbm.obj" : $(SOURCE) "$(INTDIR)" ".\include\private\apu_config.h" ".\include\apu.h" ".\include\private\apu_select_dbm.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\dbm\apr_dbm_sdbm.c + +"$(INTDIR)\apr_dbm_sdbm.obj" : $(SOURCE) "$(INTDIR)" ".\include\private\apu_config.h" ".\include\apu.h" ".\include\private\apu_select_dbm.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\encoding\apr_base64.c + +"$(INTDIR)\apr_base64.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\hooks\apr_hooks.c + +"$(INTDIR)\apr_hooks.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\ldap\apr_ldap_init.c + +"$(INTDIR)\apr_ldap_init.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" ".\include\private\apu_config.h" ".\include\apr_ldap.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\ldap\apr_ldap_option.c + +"$(INTDIR)\apr_ldap_option.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" ".\include\private\apu_config.h" ".\include\apr_ldap.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\ldap\apr_ldap_rebind.c + +"$(INTDIR)\apr_ldap_rebind.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" ".\include\private\apu_config.h" ".\include\apr_ldap.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\ldap\apr_ldap_stub.c + +"$(INTDIR)\apr_ldap_stub.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" ".\include\private\apu_config.h" ".\include\apr_ldap.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\ldap\apr_ldap_url.c + +"$(INTDIR)\apr_ldap_url.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" ".\include\apr_ldap.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\memcache\apr_memcache.c + +"$(INTDIR)\apr_memcache.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\misc\apr_date.c + +"$(INTDIR)\apr_date.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\misc\apr_queue.c + +"$(INTDIR)\apr_queue.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\misc\apr_reslist.c + +"$(INTDIR)\apr_reslist.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\misc\apr_rmm.c + +"$(INTDIR)\apr_rmm.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\misc\apr_thread_pool.c + +"$(INTDIR)\apr_thread_pool.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\misc\apu_dso.c + +"$(INTDIR)\apu_dso.obj" : $(SOURCE) "$(INTDIR)" ".\include\private\apu_config.h" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\misc\apu_version.c + +"$(INTDIR)\apu_version.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\redis\apr_redis.c + +"$(INTDIR)\apr_redis.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr_redis.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\dbm\sdbm\sdbm.c + +"$(INTDIR)\sdbm.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\dbm\sdbm\sdbm_hash.c + +"$(INTDIR)\sdbm_hash.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\dbm\sdbm\sdbm_lock.c + +"$(INTDIR)\sdbm_lock.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\dbm\sdbm\sdbm_pair.c + +"$(INTDIR)\sdbm_pair.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\strmatch\apr_strmatch.c + +"$(INTDIR)\apr_strmatch.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\uri\apr_uri.c + +"$(INTDIR)\apr_uri.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\xlate\xlate.c + +"$(INTDIR)\xlate.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" ".\include\private\apu_config.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\xml\apr_xml.c + +"$(INTDIR)\apr_xml.obj" : $(SOURCE) "$(INTDIR)" ".\include\private\apu_config.h" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\include\apr_ldap.hw + +!IF "$(CFG)" == "aprutil - Win32 Release" + +InputPath=.\include\apr_ldap.hw + +".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\apr_ldap.h +<< + + +!ELSEIF "$(CFG)" == "aprutil - Win32 Debug" + +InputPath=.\include\apr_ldap.hw + +".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\apr_ldap.h +<< + + +!ELSEIF "$(CFG)" == "aprutil - x64 Release" + +InputPath=.\include\apr_ldap.hw + +".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\apr_ldap.h +<< + + +!ELSEIF "$(CFG)" == "aprutil - x64 Debug" + +InputPath=.\include\apr_ldap.hw + +".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\apr_ldap.h +<< + + +!ENDIF + +SOURCE=.\include\apu.hw + +!IF "$(CFG)" == "aprutil - Win32 Release" + +InputPath=.\include\apu.hw + +".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\apu.h +<< + + +!ELSEIF "$(CFG)" == "aprutil - Win32 Debug" + +InputPath=.\include\apu.hw + +".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\apu.h +<< + + +!ELSEIF "$(CFG)" == "aprutil - x64 Release" + +InputPath=.\include\apu.hw + +".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\apu.h +<< + + +!ELSEIF "$(CFG)" == "aprutil - x64 Debug" + +InputPath=.\include\apu.hw + +".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\apu.h +<< + + +!ENDIF + +SOURCE=.\include\private\apu_config.hw + +!IF "$(CFG)" == "aprutil - Win32 Release" + +InputPath=.\include\private\apu_config.hw + +".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\private\apu_config.h +<< + + +!ELSEIF "$(CFG)" == "aprutil - Win32 Debug" + +InputPath=.\include\private\apu_config.hw + +".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\private\apu_config.h +<< + + +!ELSEIF "$(CFG)" == "aprutil - x64 Release" + +InputPath=.\include\private\apu_config.hw + +".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\private\apu_config.h +<< + + +!ELSEIF "$(CFG)" == "aprutil - x64 Debug" + +InputPath=.\include\private\apu_config.hw + +".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\private\apu_config.h +<< + + +!ENDIF + +SOURCE=.\include\private\apu_select_dbm.hw + +!IF "$(CFG)" == "aprutil - Win32 Release" + +InputPath=.\include\private\apu_select_dbm.hw + +".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\private\apu_select_dbm.h +<< + + +!ELSEIF "$(CFG)" == "aprutil - Win32 Debug" + +InputPath=.\include\private\apu_select_dbm.hw + +".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\private\apu_select_dbm.h +<< + + +!ELSEIF "$(CFG)" == "aprutil - x64 Release" + +InputPath=.\include\private\apu_select_dbm.hw + +".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\private\apu_select_dbm.h +<< + + +!ELSEIF "$(CFG)" == "aprutil - x64 Debug" + +InputPath=.\include\private\apu_select_dbm.hw + +".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\private\apu_select_dbm.h +<< + + +!ENDIF + +SOURCE=.\include\apu_want.hw + +!IF "$(CFG)" == "aprutil - Win32 Release" + +InputPath=.\include\apu_want.hw + +".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\apu_want.h +<< + + +!ELSEIF "$(CFG)" == "aprutil - Win32 Debug" + +InputPath=.\include\apu_want.hw + +".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\apu_want.h +<< + + +!ELSEIF "$(CFG)" == "aprutil - x64 Release" + +InputPath=.\include\apu_want.hw + +".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\apu_want.h +<< + + +!ELSEIF "$(CFG)" == "aprutil - x64 Debug" + +InputPath=.\include\apu_want.hw + +".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\apu_want.h +<< + + +!ENDIF + +!IF "$(CFG)" == "aprutil - Win32 Release" + +"apriconv - Win32 Release" : + cd ".\..\apr-iconv" + $(MAKE) /$(MAKEFLAGS) /F ".\apriconv.mak" CFG="apriconv - Win32 Release" + cd "..\apr-util" + +"apriconv - Win32 ReleaseCLEAN" : + cd ".\..\apr-iconv" + $(MAKE) /$(MAKEFLAGS) /F ".\apriconv.mak" CFG="apriconv - Win32 Release" RECURSE=1 CLEAN + cd "..\apr-util" + +!ELSEIF "$(CFG)" == "aprutil - Win32 Debug" + +"apriconv - Win32 Debug" : + cd ".\..\apr-iconv" + $(MAKE) /$(MAKEFLAGS) /F ".\apriconv.mak" CFG="apriconv - Win32 Debug" + cd "..\apr-util" + +"apriconv - Win32 DebugCLEAN" : + cd ".\..\apr-iconv" + $(MAKE) /$(MAKEFLAGS) /F ".\apriconv.mak" CFG="apriconv - Win32 Debug" RECURSE=1 CLEAN + cd "..\apr-util" + +!ELSEIF "$(CFG)" == "aprutil - x64 Release" + +"apriconv - x64 Release" : + cd ".\..\apr-iconv" + $(MAKE) /$(MAKEFLAGS) /F ".\apriconv.mak" CFG="apriconv - x64 Release" + cd "..\apr-util" + +"apriconv - x64 ReleaseCLEAN" : + cd ".\..\apr-iconv" + $(MAKE) /$(MAKEFLAGS) /F ".\apriconv.mak" CFG="apriconv - x64 Release" RECURSE=1 CLEAN + cd "..\apr-util" + +!ELSEIF "$(CFG)" == "aprutil - x64 Debug" + +"apriconv - x64 Debug" : + cd ".\..\apr-iconv" + $(MAKE) /$(MAKEFLAGS) /F ".\apriconv.mak" CFG="apriconv - x64 Debug" + cd "..\apr-util" + +"apriconv - x64 DebugCLEAN" : + cd ".\..\apr-iconv" + $(MAKE) /$(MAKEFLAGS) /F ".\apriconv.mak" CFG="apriconv - x64 Debug" RECURSE=1 CLEAN + cd "..\apr-util" + +!ENDIF + + +!ENDIF + Index: contrib/apr-util/apu-config.in =================================================================== --- contrib/apr-util/apu-config.in +++ contrib/apr-util/apu-config.in @@ -85,10 +85,6 @@ if test "$location" = "installed"; then LA_FILE="$libdir/lib${APRUTIL_LIBNAME}.la" - - LIBS=`echo "$LIBS" | sed -e "s $APU_BUILD_DIR/xml/expat $prefix g" -e "s $prefix/libexpat.la -lexpat g"` - LDFLAGS=`echo "$LDFLAGS" | sed -e "s $APU_BUILD_DIR/xml/expat $prefix g"` - INCLUDES=`echo "$INCLUDES" | sed -e "s $APU_BUILD_DIR/xml/expat $prefix g" -e "s -I$prefix/lib g"` else LA_FILE="$APU_BUILD_DIR/lib${APRUTIL_LIBNAME}.la" fi Index: contrib/apr-util/buckets/apr_buckets_alloc.c =================================================================== --- contrib/apr-util/buckets/apr_buckets_alloc.c +++ contrib/apr-util/buckets/apr_buckets_alloc.c @@ -18,6 +18,7 @@ #include "apr_buckets.h" #include "apr_allocator.h" +#include "apr_version.h" #define ALLOC_AMT (8192 - APR_MEMNODE_T_SIZE) @@ -121,6 +122,37 @@ #endif } +APU_DECLARE_NONSTD(apr_size_t) apr_bucket_alloc_aligned_floor(apr_bucket_alloc_t *list, + apr_size_t size) +{ + if (size <= SMALL_NODE_SIZE) { + size = SMALL_NODE_SIZE; + } + else { +#if APR_VERSION_AT_LEAST(1,6,0) + if (size < APR_MEMNODE_T_SIZE) { + size = apr_allocator_align(list->allocator, 0); + } + else { + size = apr_allocator_align(list->allocator, + size - APR_MEMNODE_T_SIZE); + } +#else + /* Assumes the minimum (default) allocator's boundary of 4K and + * minimum (immutable before APR-1.6.x) allocation size of 8K, + * hence possibly (yet unlikely) under-estimating the floor... + */ + size = APR_ALIGN(size, 4096); + if (size < 8192) { + size = 8192; + } +#endif + size -= APR_MEMNODE_T_SIZE; + } + size -= SIZEOF_NODE_HEADER_T; + return size; +} + APU_DECLARE_NONSTD(void *) apr_bucket_alloc(apr_size_t size, apr_bucket_alloc_t *list) { Index: contrib/apr-util/buckets/apr_buckets_file.c =================================================================== --- contrib/apr-util/buckets/apr_buckets_file.c +++ contrib/apr-util/buckets/apr_buckets_file.c @@ -108,10 +108,8 @@ } #endif - *len = (filelength > APR_BUCKET_BUFF_SIZE) - ? APR_BUCKET_BUFF_SIZE - : filelength; *str = NULL; /* in case we die prematurely */ + *len = (filelength > a->read_size) ? a->read_size : filelength; buf = apr_bucket_alloc(*len, e->list); /* Handle offset ... */ @@ -165,6 +163,7 @@ #if APR_HAS_MMAP f->can_mmap = 1; #endif + f->read_size = APR_BUCKET_BUFF_SIZE; b = apr_bucket_shared_make(b, f, offset, len); b->type = &apr_bucket_type_file; @@ -197,6 +196,21 @@ #endif /* APR_HAS_MMAP */ } +APU_DECLARE(apr_status_t) apr_bucket_file_set_buf_size(apr_bucket *e, + apr_size_t size) +{ + apr_bucket_file *a = e->data; + + if (size <= APR_BUCKET_BUFF_SIZE) { + a->read_size = APR_BUCKET_BUFF_SIZE; + } + else { + apr_size_t floor = apr_bucket_alloc_aligned_floor(e->list, size); + a->read_size = (size < floor) ? size : floor; + } + + return APR_SUCCESS; +} static apr_status_t file_bucket_setaside(apr_bucket *data, apr_pool_t *reqpool) { Index: contrib/apr-util/build-outputs.mk =================================================================== --- contrib/apr-util/build-outputs.mk +++ contrib/apr-util/build-outputs.mk @@ -18,6 +18,7 @@ crypto/apr_md5.lo: crypto/apr_md5.c .make.dirs include/apr_md5.h include/apr_xlate.h crypto/apr_passwd.lo: crypto/apr_passwd.c .make.dirs include/apr_md5.h include/apr_sha1.h include/apr_xlate.h crypto/apr_sha1.lo: crypto/apr_sha1.c .make.dirs include/apr_base64.h include/apr_sha1.h include/apr_xlate.h +crypto/apr_siphash.lo: crypto/apr_siphash.c .make.dirs include/apr_siphash.h crypto/crypt_blowfish.lo: crypto/crypt_blowfish.c .make.dirs crypto/getuuid.lo: crypto/getuuid.c .make.dirs include/apr_md5.h include/apr_uuid.h include/apr_xlate.h crypto/uuid.lo: crypto/uuid.c .make.dirs include/apr_uuid.h @@ -40,12 +41,13 @@ misc/apr_thread_pool.lo: misc/apr_thread_pool.c .make.dirs include/apr_thread_pool.h misc/apu_dso.lo: misc/apu_dso.c .make.dirs include/apu_version.h include/private/apu_internal.h misc/apu_version.lo: misc/apu_version.c .make.dirs include/apu_version.h +redis/apr_redis.lo: redis/apr_redis.c .make.dirs include/apr_buckets.h include/apr_redis.h include/apr_reslist.h strmatch/apr_strmatch.lo: strmatch/apr_strmatch.c .make.dirs include/apr_strmatch.h uri/apr_uri.lo: uri/apr_uri.c .make.dirs include/apr_uri.h xlate/xlate.lo: xlate/xlate.c .make.dirs include/apr_xlate.h xml/apr_xml.lo: xml/apr_xml.c .make.dirs include/apr_xlate.h include/apr_xml.h -OBJECTS_all = buckets/apr_brigade.lo buckets/apr_buckets.lo buckets/apr_buckets_alloc.lo buckets/apr_buckets_eos.lo buckets/apr_buckets_file.lo buckets/apr_buckets_flush.lo buckets/apr_buckets_heap.lo buckets/apr_buckets_mmap.lo buckets/apr_buckets_pipe.lo buckets/apr_buckets_pool.lo buckets/apr_buckets_refcount.lo buckets/apr_buckets_simple.lo buckets/apr_buckets_socket.lo crypto/apr_crypto.lo crypto/apr_md4.lo crypto/apr_md5.lo crypto/apr_passwd.lo crypto/apr_sha1.lo crypto/crypt_blowfish.lo crypto/getuuid.lo crypto/uuid.lo dbd/apr_dbd.lo dbm/apr_dbm.lo dbm/apr_dbm_sdbm.lo dbm/sdbm/sdbm.lo dbm/sdbm/sdbm_hash.lo dbm/sdbm/sdbm_lock.lo dbm/sdbm/sdbm_pair.lo encoding/apr_base64.lo hooks/apr_hooks.lo ldap/apr_ldap_stub.lo ldap/apr_ldap_url.lo memcache/apr_memcache.lo misc/apr_date.lo misc/apr_queue.lo misc/apr_reslist.lo misc/apr_rmm.lo misc/apr_thread_pool.lo misc/apu_dso.lo misc/apu_version.lo strmatch/apr_strmatch.lo uri/apr_uri.lo xlate/xlate.lo xml/apr_xml.lo +OBJECTS_all = buckets/apr_brigade.lo buckets/apr_buckets.lo buckets/apr_buckets_alloc.lo buckets/apr_buckets_eos.lo buckets/apr_buckets_file.lo buckets/apr_buckets_flush.lo buckets/apr_buckets_heap.lo buckets/apr_buckets_mmap.lo buckets/apr_buckets_pipe.lo buckets/apr_buckets_pool.lo buckets/apr_buckets_refcount.lo buckets/apr_buckets_simple.lo buckets/apr_buckets_socket.lo crypto/apr_crypto.lo crypto/apr_md4.lo crypto/apr_md5.lo crypto/apr_passwd.lo crypto/apr_sha1.lo crypto/apr_siphash.lo crypto/crypt_blowfish.lo crypto/getuuid.lo crypto/uuid.lo dbd/apr_dbd.lo dbm/apr_dbm.lo dbm/apr_dbm_sdbm.lo dbm/sdbm/sdbm.lo dbm/sdbm/sdbm_hash.lo dbm/sdbm/sdbm_lock.lo dbm/sdbm/sdbm_pair.lo encoding/apr_base64.lo hooks/apr_hooks.lo ldap/apr_ldap_stub.lo ldap/apr_ldap_url.lo memcache/apr_memcache.lo misc/apr_date.lo misc/apr_queue.lo misc/apr_reslist.lo misc/apr_rmm.lo misc/apr_thread_pool.lo misc/apu_dso.lo misc/apu_version.lo redis/apr_redis.lo strmatch/apr_strmatch.lo uri/apr_uri.lo xlate/xlate.lo xml/apr_xml.lo OBJECTS_unix = $(OBJECTS_all) @@ -59,9 +61,9 @@ OBJECTS_win32 = $(OBJECTS_all) -HEADERS = $(top_srcdir)/include/apr_anylock.h $(top_srcdir)/include/apr_base64.h $(top_srcdir)/include/apr_buckets.h $(top_srcdir)/include/apr_crypto.h $(top_srcdir)/include/apr_date.h $(top_srcdir)/include/apr_dbd.h $(top_srcdir)/include/apr_dbm.h $(top_srcdir)/include/apr_hooks.h $(top_srcdir)/include/apr_ldap_init.h $(top_srcdir)/include/apr_ldap_option.h $(top_srcdir)/include/apr_ldap_rebind.h $(top_srcdir)/include/apr_ldap_url.h $(top_srcdir)/include/apr_md4.h $(top_srcdir)/include/apr_md5.h $(top_srcdir)/include/apr_memcache.h $(top_srcdir)/include/apr_optional.h $(top_srcdir)/include/apr_optional_hooks.h $(top_srcdir)/include/apr_queue.h $(top_srcdir)/include/apr_reslist.h $(top_srcdir)/include/apr_rmm.h $(top_srcdir)/include/apr_sdbm.h $(top_srcdir)/include/apr_sha1.h $(top_srcdir)/include/apr_strmatch.h $(top_srcdir)/include/apr_thread_pool.h $(top_srcdir)/include/apr_uri.h $(top_srcdir)/include/apr_uuid.h $(top_srcdir)/include/apr_xlate.h $(top_srcdir)/include/apr_xml.h $(top_srcdir)/include/apu_errno.h $(top_srcdir)/include/apu_version.h $(top_srcdir)/include/private/apr_crypto_internal.h $(top_srcdir)/include/private/apr_dbd_internal.h $(top_srcdir)/include/private/apr_dbd_odbc_v2.h $(top_srcdir)/include/private/apr_dbm_private.h $(top_srcdir)/include/private/apu_internal.h +HEADERS = $(top_srcdir)/include/apr_anylock.h $(top_srcdir)/include/apr_base64.h $(top_srcdir)/include/apr_buckets.h $(top_srcdir)/include/apr_crypto.h $(top_srcdir)/include/apr_date.h $(top_srcdir)/include/apr_dbd.h $(top_srcdir)/include/apr_dbm.h $(top_srcdir)/include/apr_hooks.h $(top_srcdir)/include/apr_ldap_init.h $(top_srcdir)/include/apr_ldap_option.h $(top_srcdir)/include/apr_ldap_rebind.h $(top_srcdir)/include/apr_ldap_url.h $(top_srcdir)/include/apr_md4.h $(top_srcdir)/include/apr_md5.h $(top_srcdir)/include/apr_memcache.h $(top_srcdir)/include/apr_optional.h $(top_srcdir)/include/apr_optional_hooks.h $(top_srcdir)/include/apr_queue.h $(top_srcdir)/include/apr_redis.h $(top_srcdir)/include/apr_reslist.h $(top_srcdir)/include/apr_rmm.h $(top_srcdir)/include/apr_sdbm.h $(top_srcdir)/include/apr_sha1.h $(top_srcdir)/include/apr_siphash.h $(top_srcdir)/include/apr_strmatch.h $(top_srcdir)/include/apr_thread_pool.h $(top_srcdir)/include/apr_uri.h $(top_srcdir)/include/apr_uuid.h $(top_srcdir)/include/apr_xlate.h $(top_srcdir)/include/apr_xml.h $(top_srcdir)/include/apu_errno.h $(top_srcdir)/include/apu_version.h $(top_srcdir)/include/private/apr_crypto_internal.h $(top_srcdir)/include/private/apr_dbd_internal.h $(top_srcdir)/include/private/apr_dbd_odbc_v2.h $(top_srcdir)/include/private/apr_dbm_private.h $(top_srcdir)/include/private/apu_internal.h -SOURCE_DIRS = xml dbm encoding hooks buckets uri misc crypto dbd strmatch memcache dbm/sdbm ldap xlate $(EXTRA_SOURCE_DIRS) +SOURCE_DIRS = xml redis dbm encoding hooks buckets uri misc crypto dbd strmatch memcache dbm/sdbm ldap xlate $(EXTRA_SOURCE_DIRS) ldap/apr_ldap_init.lo: ldap/apr_ldap_init.c .make.dirs include/private/apu_internal.h ldap/apr_ldap_option.lo: ldap/apr_ldap_option.c .make.dirs @@ -83,6 +85,12 @@ crypto/apr_crypto_nss.la: crypto/apr_crypto_nss.lo $(LINK_MODULE) -o $@ $(OBJECTS_crypto_nss) $(LDADD_crypto_nss) +crypto/apr_crypto_commoncrypto.lo: crypto/apr_crypto_commoncrypto.c .make.dirs include/apr_buckets.h include/apr_crypto.h include/apu_errno.h include/private/apr_crypto_internal.h +OBJECTS_crypto_commoncrypto = crypto/apr_crypto_commoncrypto.lo +MODULE_crypto_commoncrypto = crypto/apr_crypto_commoncrypto.la +crypto/apr_crypto_commoncrypto.la: crypto/apr_crypto_commoncrypto.lo + $(LINK_MODULE) -o $@ $(OBJECTS_crypto_commoncrypto) $(LDADD_crypto_commoncrypto) + dbd/apr_dbd_pgsql.lo: dbd/apr_dbd_pgsql.c .make.dirs include/apr_buckets.h include/apr_dbd.h include/private/apr_dbd_internal.h OBJECTS_dbd_pgsql = dbd/apr_dbd_pgsql.lo MODULE_dbd_pgsql = dbd/apr_dbd_pgsql.la @@ -113,12 +121,6 @@ dbd/apr_dbd_mysql.la: dbd/apr_dbd_mysql.lo $(LINK_MODULE) -o $@ $(OBJECTS_dbd_mysql) $(LDADD_dbd_mysql) -dbd/apr_dbd_freetds.lo: dbd/apr_dbd_freetds.c .make.dirs include/apr_dbd.h include/private/apr_dbd_internal.h -OBJECTS_dbd_freetds = dbd/apr_dbd_freetds.lo -MODULE_dbd_freetds = dbd/apr_dbd_freetds.la -dbd/apr_dbd_freetds.la: dbd/apr_dbd_freetds.lo - $(LINK_MODULE) -o $@ $(OBJECTS_dbd_freetds) $(LDADD_dbd_freetds) - dbd/apr_dbd_odbc.lo: dbd/apr_dbd_odbc.c .make.dirs include/apr_buckets.h include/apr_dbd.h include/apu_version.h include/private/apr_dbd_internal.h include/private/apr_dbd_odbc_v2.h OBJECTS_dbd_odbc = dbd/apr_dbd_odbc.lo MODULE_dbd_odbc = dbd/apr_dbd_odbc.la @@ -143,7 +145,7 @@ dbm/apr_dbm_ndbm.la: dbm/apr_dbm_ndbm.lo $(LINK_MODULE) -o $@ $(OBJECTS_dbm_ndbm) $(LDADD_dbm_ndbm) -BUILD_DIRS = buckets crypto dbd dbm dbm/sdbm encoding hooks ldap memcache misc strmatch uri xlate xml +BUILD_DIRS = buckets crypto dbd dbm dbm/sdbm encoding hooks ldap memcache misc redis strmatch uri xlate xml .make.dirs: $(srcdir)/build-outputs.mk @for d in $(BUILD_DIRS); do test -d $$d || mkdir $$d; done Index: contrib/apr-util/build.conf =================================================================== --- contrib/apr-util/build.conf +++ contrib/apr-util/build.conf @@ -12,6 +12,7 @@ crypto/apr_md5.c crypto/apr_passwd.c crypto/apr_sha1.c + crypto/apr_siphash.c crypto/getuuid.c crypto/uuid.c crypto/crypt_blowfish.c @@ -24,6 +25,7 @@ ldap/apr_ldap_url.c misc/*.c memcache/*.c + redis/*.c uri/apr_uri.c xml/*.c strmatch/*.c @@ -37,8 +39,8 @@ headers = include/*.h include/private/*.h modules = - ldap crypto_openssl crypto_nss dbd_pgsql - dbd_sqlite2 dbd_sqlite3 dbd_oracle dbd_mysql dbd_freetds dbd_odbc + ldap crypto_openssl crypto_nss crypto_commoncrypto dbd_pgsql + dbd_sqlite2 dbd_sqlite3 dbd_oracle dbd_mysql dbd_odbc dbm_db dbm_gdbm dbm_ndbm # gen_uri_delim.c @@ -46,6 +48,10 @@ # we have a recursive makefile for the test files (for now) # test/*.c +[crypto_commoncrypto] +paths = crypto/apr_crypto_commoncrypto.c +target = crypto/apr_crypto_commoncrypto.la + [crypto_openssl] paths = crypto/apr_crypto_openssl.c target = crypto/apr_crypto_openssl.la @@ -74,10 +80,6 @@ paths = dbd/apr_dbd_mysql.c target = dbd/apr_dbd_mysql.la -[dbd_freetds] -paths = dbd/apr_dbd_freetds.c -target = dbd/apr_dbd_freetds.la - [dbd_odbc] paths = dbd/apr_dbd_odbc.c target = dbd/apr_dbd_odbc.la Index: contrib/apr-util/buildconf =================================================================== --- contrib/apr-util/buildconf +++ contrib/apr-util/buildconf @@ -89,14 +89,6 @@ echo "Generating 'make' outputs ..." $apr_src_dir/build/gen-build.py $verbose make -# -# If Expat has been bundled, then go and configure the thing -# -if [ -f xml/expat/buildconf.sh ]; then - echo "Invoking xml/expat/buildconf.sh ..." - (cd xml/expat; ./buildconf.sh $verbose) -fi - # Remove autoconf cache again rm -rf autom4te*.cache @@ -114,3 +106,13 @@ ./build/rpm/apr-util.spec.in > apr-util.spec fi +# Verify the tree was clean, notify user if not (normal in development) +# +if [ -f "include/apu.h" -o -f "include/private/apu_config.h" -o \ + -f "include/apu_want.h" -o -f "include/private/apu_select_dbm.h" ]; then + echo "" + echo "Generated include files already exist, the tree is not clean." + echo "The resulting build-outputs.mk file is incorrect" +fi + +exit 0 Index: contrib/apr-util/configure =================================================================== --- contrib/apr-util/configure +++ contrib/apr-util/configure @@ -637,13 +637,10 @@ so_ext have_apr_iconv have_iconv -APR_XML_DIR apu_dbd_tests LDADD_dbd_odbc apu_have_odbc ODBC_CONFIG -LDADD_dbd_freetds -apu_have_freetds LDADD_dbd_oracle apu_have_oracle LDADD_dbd_sqlite2 @@ -690,6 +687,8 @@ ldap_ssl_h lber_h ldap_h +LDADD_crypto_commoncrypto +apu_have_commoncrypto LDADD_crypto_nss apu_have_nss PKG_CONFIG @@ -781,6 +780,7 @@ with_crypto with_openssl with_nss +with_commoncrypto with_lber with_ldap_include with_ldap_lib @@ -795,7 +795,6 @@ with_sqlite2 with_oracle_include with_oracle -with_freetds with_odbc with_expat with_iconv @@ -1435,6 +1434,7 @@ --with-crypto enable crypto support --with-openssl=DIR specify location of OpenSSL --with-nss=DIR specify location of NSS + --with-commoncrypto=DIR specify location of CommonCrypto --with-lber=library lber library to use --with-ldap-include=path path to ldap include files with trailing slash --with-ldap-lib=path path to ldap lib file @@ -1463,9 +1463,8 @@ --with-oracle-include=DIR path to Oracle include files --with-oracle=DIR enable Oracle DBD driver; giving ORACLE_HOME as DIR - --with-freetds=DIR specify FreeTDS location --with-odbc=DIR specify ODBC location - --with-expat=DIR specify Expat location, or 'builtin' + --with-expat=DIR specify Expat location --with-iconv=DIR path to iconv installation Some influential environment variables: @@ -2507,6 +2506,8 @@ + + @@ -4739,6 +4740,7 @@ apu_have_crypto=0 apu_have_openssl=0 apu_have_nss=0 + apu_have_commoncrypto=0 old_libs="$LIBS" old_cppflags="$CPPFLAGS" @@ -4748,7 +4750,7 @@ # Check whether --with-crypto was given. if test "${with_crypto+set}" = set; then : withval=$with_crypto; - cryptolibs="openssl nss" + cryptolibs="openssl nss commoncrypto" if test "$withval" = "yes"; then @@ -4801,9 +4803,9 @@ done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BN_init in -lcrypto" >&5 -$as_echo_n "checking for BN_init in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_BN_init+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_CIPHER_CTX_new in -lcrypto" >&5 +$as_echo_n "checking for EVP_CIPHER_CTX_new in -lcrypto... " >&6; } +if ${ac_cv_lib_crypto_EVP_CIPHER_CTX_new+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -4817,27 +4819,27 @@ #ifdef __cplusplus extern "C" #endif -char BN_init (); +char EVP_CIPHER_CTX_new (); int main () { -return BN_init (); +return EVP_CIPHER_CTX_new (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_crypto_BN_init=yes + ac_cv_lib_crypto_EVP_CIPHER_CTX_new=yes else - ac_cv_lib_crypto_BN_init=no + ac_cv_lib_crypto_EVP_CIPHER_CTX_new=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_BN_init" >&5 -$as_echo "$ac_cv_lib_crypto_BN_init" >&6; } -if test "x$ac_cv_lib_crypto_BN_init" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_CIPHER_CTX_new" >&5 +$as_echo "$ac_cv_lib_crypto_EVP_CIPHER_CTX_new" >&6; } +if test "x$ac_cv_lib_crypto_EVP_CIPHER_CTX_new" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_accept in -lssl" >&5 $as_echo_n "checking for SSL_accept in -lssl... " >&6; } if ${ac_cv_lib_ssl_SSL_accept+:} false; then : @@ -4947,9 +4949,9 @@ done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BN_init in -lcrypto" >&5 -$as_echo_n "checking for BN_init in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_BN_init+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_CIPHER_CTX_new in -lcrypto" >&5 +$as_echo_n "checking for EVP_CIPHER_CTX_new in -lcrypto... " >&6; } +if ${ac_cv_lib_crypto_EVP_CIPHER_CTX_new+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -4963,27 +4965,27 @@ #ifdef __cplusplus extern "C" #endif -char BN_init (); +char EVP_CIPHER_CTX_new (); int main () { -return BN_init (); +return EVP_CIPHER_CTX_new (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_crypto_BN_init=yes + ac_cv_lib_crypto_EVP_CIPHER_CTX_new=yes else - ac_cv_lib_crypto_BN_init=no + ac_cv_lib_crypto_EVP_CIPHER_CTX_new=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_BN_init" >&5 -$as_echo "$ac_cv_lib_crypto_BN_init" >&6; } -if test "x$ac_cv_lib_crypto_BN_init" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_CIPHER_CTX_new" >&5 +$as_echo "$ac_cv_lib_crypto_EVP_CIPHER_CTX_new" >&6; } +if test "x$ac_cv_lib_crypto_EVP_CIPHER_CTX_new" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_accept in -lssl" >&5 $as_echo_n "checking for SSL_accept in -lssl... " >&6; } if ${ac_cv_lib_ssl_SSL_accept+:} false; then : @@ -5072,145 +5074,6 @@ fi - if test "$apu_have_openssl" != "1"; then - for ac_header in openssl/x509.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "openssl/x509.h" "ac_cv_header_openssl_x509_h" "$ac_includes_default" -if test "x$ac_cv_header_openssl_x509_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_OPENSSL_X509_H 1 -_ACEOF - openssl_have_headers=1 -fi - -done - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BN_init in -lcrypto" >&5 -$as_echo_n "checking for BN_init in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_BN_init+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcrypto $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char BN_init (); -int -main () -{ -return BN_init (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_crypto_BN_init=yes -else - ac_cv_lib_crypto_BN_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_BN_init" >&5 -$as_echo "$ac_cv_lib_crypto_BN_init" >&6; } -if test "x$ac_cv_lib_crypto_BN_init" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_accept in -lssl" >&5 -$as_echo_n "checking for SSL_accept in -lssl... " >&6; } -if ${ac_cv_lib_ssl_SSL_accept+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lssl -lcrypto $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char SSL_accept (); -int -main () -{ -return SSL_accept (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ssl_SSL_accept=yes -else - ac_cv_lib_ssl_SSL_accept=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_accept" >&5 -$as_echo "$ac_cv_lib_ssl_SSL_accept" >&6; } -if test "x$ac_cv_lib_ssl_SSL_accept" = xyes; then : - openssl_have_libs=1 -fi - -fi - - if test "$openssl_have_headers" != "0" && test "$openssl_have_libs" != "0"; then - apu_have_openssl=1 - - if test "x$APRUTIL_LDFLAGS" = "x"; then - test "x$silent" != "xyes" && echo " setting APRUTIL_LDFLAGS to \"-L$withval/lib\"" - APRUTIL_LDFLAGS="-L$withval/lib" - else - apr_addto_bugger="-L$withval/lib" - for i in $apr_addto_bugger; do - apr_addto_duplicate="0" - for j in $APRUTIL_LDFLAGS; do - if test "x$i" = "x$j"; then - apr_addto_duplicate="1" - break - fi - done - if test $apr_addto_duplicate = "0"; then - test "x$silent" != "xyes" && echo " adding \"$i\" to APRUTIL_LDFLAGS" - APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i" - fi - done - fi - - - if test "x$APRUTIL_INCLUDES" = "x"; then - test "x$silent" != "xyes" && echo " setting APRUTIL_INCLUDES to \"-I$withval/include\"" - APRUTIL_INCLUDES="-I$withval/include" - else - apr_addto_bugger="-I$withval/include" - for i in $apr_addto_bugger; do - apr_addto_duplicate="0" - for j in $APRUTIL_INCLUDES; do - if test "x$i" = "x$j"; then - apr_addto_duplicate="1" - break - fi - done - if test $apr_addto_duplicate = "0"; then - test "x$silent" != "xyes" && echo " adding \"$i\" to APRUTIL_INCLUDES" - APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i" - fi - done - fi - - fi - fi - ac_fn_c_check_decl "$LINENO" "EVP_PKEY_CTX_new" "ac_cv_have_decl_EVP_PKEY_CTX_new" "#include " if test "x$ac_cv_have_decl_EVP_PKEY_CTX_new" = xyes; then : @@ -5824,92 +5687,409 @@ CPPFLAGS="$old_cppflags" LDFLAGS="$old_ldflags" - if test "$apu_have_crypto" = "0"; then - as_fn_error $? "Crypto was requested but no crypto library could be enabled; specify the location of a crypto library using --with-openssl, --with-nss, etc." "$LINENO" 5 - fi - fi - -else - - apu_have_crypto=0 - -fi - - - - + apu_have_commoncrypto=0 + commoncrypto_have_headers=0 + commoncrypto_have_libs=0 - -echo $ac_n "${nl}checking for ldap support..." - -apu_has_ldap="0"; -apu_has_ldapssl_client_init="0" -apu_has_ldapssl_client_deinit="0" -apu_has_ldapssl_add_trusted_cert="0" -apu_has_ldap_start_tls_s="0" -apu_has_ldapssl_init="0" -apu_has_ldap_sslinit="0" -apu_has_ldapssl_install_routines="0" -apu_has_ldap_openldap="0" -apu_has_ldap_solaris="0" -apu_has_ldap_novell="0" -apu_has_ldap_microsoft="0" -apu_has_ldap_netscape="0" -apu_has_ldap_mozilla="0" -apu_has_ldap_tivoli="0" -apu_has_ldap_zos="0" -apu_has_ldap_other="0" -LDADD_ldap_found="" + old_libs="$LIBS" + old_cppflags="$CPPFLAGS" + old_ldflags="$LDFLAGS" -# Check whether --with-lber was given. -if test "${with_lber+set}" = set; then : - withval=$with_lber; +# Check whether --with-commoncrypto was given. +if test "${with_commoncrypto+set}" = set; then : + withval=$with_commoncrypto; if test "$withval" = "yes"; then - apu_liblber_name="lber" - else - apu_liblber_name="$withval" - fi - -else - - apu_liblber_name="lber" - + for ac_header in CommonCrypto/CommonKeyDerivation.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "CommonCrypto/CommonKeyDerivation.h" "ac_cv_header_CommonCrypto_CommonKeyDerivation_h" "$ac_includes_default" +if test "x$ac_cv_header_CommonCrypto_CommonKeyDerivation_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_COMMONCRYPTO_COMMONKEYDERIVATION_H 1 +_ACEOF + commoncrypto_have_headers=1 fi +done + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCKeyDerivationPBKDF in -lSystem" >&5 +$as_echo_n "checking for CCKeyDerivationPBKDF in -lSystem... " >&6; } +if ${ac_cv_lib_System_CCKeyDerivationPBKDF+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lSystem $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -# Check whether --with-ldap-include was given. -if test "${with_ldap_include+set}" = set; then : - withval=$with_ldap_include; +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char CCKeyDerivationPBKDF (); +int +main () +{ +return CCKeyDerivationPBKDF (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_System_CCKeyDerivationPBKDF=yes +else + ac_cv_lib_System_CCKeyDerivationPBKDF=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_System_CCKeyDerivationPBKDF" >&5 +$as_echo "$ac_cv_lib_System_CCKeyDerivationPBKDF" >&6; } +if test "x$ac_cv_lib_System_CCKeyDerivationPBKDF" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCCryptorCreate in -lSystem" >&5 +$as_echo_n "checking for CCCryptorCreate in -lSystem... " >&6; } +if ${ac_cv_lib_System_CCCryptorCreate+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lSystem -lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char CCCryptorCreate (); +int +main () +{ +return CCCryptorCreate (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_System_CCCryptorCreate=yes +else + ac_cv_lib_System_CCCryptorCreate=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_System_CCCryptorCreate" >&5 +$as_echo "$ac_cv_lib_System_CCCryptorCreate" >&6; } +if test "x$ac_cv_lib_System_CCCryptorCreate" = xyes; then : + commoncrypto_have_libs=1 +fi -# Check whether --with-ldap-lib was given. -if test "${with_ldap_lib+set}" = set; then : - withval=$with_ldap_lib; fi + if test "$commoncrypto_have_headers" != "0" && test "$commoncrypto_have_libs" != "0"; then + apu_have_commoncrypto=1 + fi + elif test "$withval" = "no"; then + apu_have_commoncrypto=0 + else -# Check whether --with-ldap was given. -if test "${with_ldap+set}" = set; then : - withval=$with_ldap; - if test "$with_ldap" != "no"; then - save_cppflags="$CPPFLAGS" - save_ldflags="$LDFLAGS" - save_libs="$LIBS" - if test -n "$with_ldap_include"; then - CPPFLAGS="$CPPFLAGS -I$with_ldap_include" + commoncrypto_CPPFLAGS="-I$withval/include" + commoncrypto_LDFLAGS="-L$withval/lib " - if test "x$APRUTIL_INCLUDES" = "x"; then - test "x$silent" != "xyes" && echo " setting APRUTIL_INCLUDES to \"-I$with_ldap_include\"" - APRUTIL_INCLUDES="-I$with_ldap_include" + + if test "x$CPPFLAGS" = "x"; then + test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"$commoncrypto_CPPFLAGS\"" + CPPFLAGS="$commoncrypto_CPPFLAGS" else - apr_addto_bugger="-I$with_ldap_include" + apr_addto_bugger="$commoncrypto_CPPFLAGS" for i in $apr_addto_bugger; do apr_addto_duplicate="0" - for j in $APRUTIL_INCLUDES; do + for j in $CPPFLAGS; do + if test "x$i" = "x$j"; then + apr_addto_duplicate="1" + break + fi + done + if test $apr_addto_duplicate = "0"; then + test "x$silent" != "xyes" && echo " adding \"$i\" to CPPFLAGS" + CPPFLAGS="$CPPFLAGS $i" + fi + done + fi + + + if test "x$LDFLAGS" = "x"; then + test "x$silent" != "xyes" && echo " setting LDFLAGS to \"$commoncrypto_LDFLAGS\"" + LDFLAGS="$commoncrypto_LDFLAGS" + else + apr_addto_bugger="$commoncrypto_LDFLAGS" + for i in $apr_addto_bugger; do + apr_addto_duplicate="0" + for j in $LDFLAGS; do + if test "x$i" = "x$j"; then + apr_addto_duplicate="1" + break + fi + done + if test $apr_addto_duplicate = "0"; then + test "x$silent" != "xyes" && echo " adding \"$i\" to LDFLAGS" + LDFLAGS="$LDFLAGS $i" + fi + done + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for commoncrypto in $withval" >&5 +$as_echo "$as_me: checking for commoncrypto in $withval" >&6;} + for ac_header in CommonCrypto/CommonKeyDerivation.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "CommonCrypto/CommonKeyDerivation.h" "ac_cv_header_CommonCrypto_CommonKeyDerivation_h" "$ac_includes_default" +if test "x$ac_cv_header_CommonCrypto_CommonKeyDerivation_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_COMMONCRYPTO_COMMONKEYDERIVATION_H 1 +_ACEOF + commoncrypto_have_headers=1 +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCKeyDerivationPBKDF in -lSystem" >&5 +$as_echo_n "checking for CCKeyDerivationPBKDF in -lSystem... " >&6; } +if ${ac_cv_lib_System_CCKeyDerivationPBKDF+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lSystem $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char CCKeyDerivationPBKDF (); +int +main () +{ +return CCKeyDerivationPBKDF (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_System_CCKeyDerivationPBKDF=yes +else + ac_cv_lib_System_CCKeyDerivationPBKDF=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_System_CCKeyDerivationPBKDF" >&5 +$as_echo "$ac_cv_lib_System_CCKeyDerivationPBKDF" >&6; } +if test "x$ac_cv_lib_System_CCKeyDerivationPBKDF" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCCryptorCreate in -lSystem" >&5 +$as_echo_n "checking for CCCryptorCreate in -lSystem... " >&6; } +if ${ac_cv_lib_System_CCCryptorCreate+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lSystem -lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char CCCryptorCreate (); +int +main () +{ +return CCCryptorCreate (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_System_CCCryptorCreate=yes +else + ac_cv_lib_System_CCCryptorCreate=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_System_CCCryptorCreate" >&5 +$as_echo "$ac_cv_lib_System_CCCryptorCreate" >&6; } +if test "x$ac_cv_lib_System_CCCryptorCreate" = xyes; then : + commoncrypto_have_libs=1 +fi + +fi + + if test "$commoncrypto_have_headers" != "0" && test "$commoncrypto_have_libs" != "0"; then + apu_have_commoncrypto=1 + + if test "x$LDFLAGS" = "x"; then + test "x$silent" != "xyes" && echo " setting LDFLAGS to \"-L$withval/lib\"" + LDFLAGS="-L$withval/lib" + else + apr_addto_bugger="-L$withval/lib" + for i in $apr_addto_bugger; do + apr_addto_duplicate="0" + for j in $LDFLAGS; do + if test "x$i" = "x$j"; then + apr_addto_duplicate="1" + break + fi + done + if test $apr_addto_duplicate = "0"; then + test "x$silent" != "xyes" && echo " adding \"$i\" to LDFLAGS" + LDFLAGS="$LDFLAGS $i" + fi + done + fi + + + if test "x$INCLUDES" = "x"; then + test "x$silent" != "xyes" && echo " setting INCLUDES to \"-I$withval/include\"" + INCLUDES="-I$withval/include" + else + apr_addto_bugger="-I$withval/include" + for i in $apr_addto_bugger; do + apr_addto_duplicate="0" + for j in $INCLUDES; do + if test "x$i" = "x$j"; then + apr_addto_duplicate="1" + break + fi + done + if test $apr_addto_duplicate = "0"; then + test "x$silent" != "xyes" && echo " adding \"$i\" to INCLUDES" + INCLUDES="$INCLUDES $i" + fi + done + fi + + fi + + fi + +else + + apu_have_commoncrypto=0 + +fi + + + if test "$apu_have_commoncrypto" = "1"; then + apu_have_crypto=1 + fi + + + + + LIBS="$old_libs" + CPPFLAGS="$old_cppflags" + LDFLAGS="$old_ldflags" + + if test "$apu_have_crypto" = "0"; then + as_fn_error $? "Crypto was requested but no crypto library could be enabled; specify the location of a crypto library using --with-openssl, --with-nss, and/or --with-commoncrypto." "$LINENO" 5 + fi + fi + +else + + apu_have_crypto=0 + +fi + + + + + + + +echo $ac_n "${nl}checking for ldap support..." + +apu_has_ldap="0"; +apu_has_ldapssl_client_init="0" +apu_has_ldapssl_client_deinit="0" +apu_has_ldapssl_add_trusted_cert="0" +apu_has_ldap_start_tls_s="0" +apu_has_ldapssl_init="0" +apu_has_ldap_sslinit="0" +apu_has_ldapssl_install_routines="0" +apu_has_ldap_openldap="0" +apu_has_ldap_solaris="0" +apu_has_ldap_novell="0" +apu_has_ldap_microsoft="0" +apu_has_ldap_netscape="0" +apu_has_ldap_mozilla="0" +apu_has_ldap_tivoli="0" +apu_has_ldap_zos="0" +apu_has_ldap_other="0" +LDADD_ldap_found="" + + +# Check whether --with-lber was given. +if test "${with_lber+set}" = set; then : + withval=$with_lber; + if test "$withval" = "yes"; then + apu_liblber_name="lber" + else + apu_liblber_name="$withval" + fi + +else + + apu_liblber_name="lber" + +fi + + + +# Check whether --with-ldap-include was given. +if test "${with_ldap_include+set}" = set; then : + withval=$with_ldap_include; +fi + + +# Check whether --with-ldap-lib was given. +if test "${with_ldap_lib+set}" = set; then : + withval=$with_ldap_lib; +fi + + +# Check whether --with-ldap was given. +if test "${with_ldap+set}" = set; then : + withval=$with_ldap; + if test "$with_ldap" != "no"; then + save_cppflags="$CPPFLAGS" + save_ldflags="$LDFLAGS" + save_libs="$LIBS" + if test -n "$with_ldap_include"; then + CPPFLAGS="$CPPFLAGS -I$with_ldap_include" + + if test "x$APRUTIL_INCLUDES" = "x"; then + test "x$silent" != "xyes" && echo " setting APRUTIL_INCLUDES to \"-I$with_ldap_include\"" + APRUTIL_INCLUDES="-I$with_ldap_include" + else + apr_addto_bugger="-I$with_ldap_include" + for i in $apr_addto_bugger; do + apr_addto_duplicate="0" + for j in $APRUTIL_INCLUDES; do if test "x$i" = "x$j"; then apr_addto_duplicate="1" break @@ -19946,13 +20126,13 @@ cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient_r" >&5 -$as_echo_n "checking for mysql_init in -lmysqlclient_r... " >&6; } -if ${ac_cv_lib_mysqlclient_r_mysql_init+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient" >&5 +$as_echo_n "checking for mysql_init in -lmysqlclient... " >&6; } +if ${ac_cv_lib_mysqlclient_mysql_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lmysqlclient_r $LIBS" +LIBS="-lmysqlclient $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19972,17 +20152,17 @@ } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_mysqlclient_r_mysql_init=yes + ac_cv_lib_mysqlclient_mysql_init=yes else - ac_cv_lib_mysqlclient_r_mysql_init=no + ac_cv_lib_mysqlclient_mysql_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_r_mysql_init" >&5 -$as_echo "$ac_cv_lib_mysqlclient_r_mysql_init" >&6; } -if test "x$ac_cv_lib_mysqlclient_r_mysql_init" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_mysql_init" >&5 +$as_echo "$ac_cv_lib_mysqlclient_mysql_init" >&6; } +if test "x$ac_cv_lib_mysqlclient_mysql_init" = xyes; then : apu_have_mysql=1 fi @@ -20002,13 +20182,13 @@ cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient_r" >&5 -$as_echo_n "checking for mysql_init in -lmysqlclient_r... " >&6; } -if ${ac_cv_lib_mysqlclient_r_mysql_init+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient" >&5 +$as_echo_n "checking for mysql_init in -lmysqlclient... " >&6; } +if ${ac_cv_lib_mysqlclient_mysql_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lmysqlclient_r $LIBS" +LIBS="-lmysqlclient $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -20028,17 +20208,17 @@ } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_mysqlclient_r_mysql_init=yes + ac_cv_lib_mysqlclient_mysql_init=yes else - ac_cv_lib_mysqlclient_r_mysql_init=no + ac_cv_lib_mysqlclient_mysql_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_r_mysql_init" >&5 -$as_echo "$ac_cv_lib_mysqlclient_r_mysql_init" >&6; } -if test "x$ac_cv_lib_mysqlclient_r_mysql_init" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_mysql_init" >&5 +$as_echo "$ac_cv_lib_mysqlclient_mysql_init" >&6; } +if test "x$ac_cv_lib_mysqlclient_mysql_init" = xyes; then : apu_have_mysql=1 fi @@ -20199,13 +20379,13 @@ cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient_r" >&5 -$as_echo_n "checking for mysql_init in -lmysqlclient_r... " >&6; } -if ${ac_cv_lib_mysqlclient_r_mysql_init+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient" >&5 +$as_echo_n "checking for mysql_init in -lmysqlclient... " >&6; } +if ${ac_cv_lib_mysqlclient_mysql_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lmysqlclient_r $LIBS" +LIBS="-lmysqlclient $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -20225,17 +20405,17 @@ } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_mysqlclient_r_mysql_init=yes + ac_cv_lib_mysqlclient_mysql_init=yes else - ac_cv_lib_mysqlclient_r_mysql_init=no + ac_cv_lib_mysqlclient_mysql_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_r_mysql_init" >&5 -$as_echo "$ac_cv_lib_mysqlclient_r_mysql_init" >&6; } -if test "x$ac_cv_lib_mysqlclient_r_mysql_init" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_mysql_init" >&5 +$as_echo "$ac_cv_lib_mysqlclient_mysql_init" >&6; } +if test "x$ac_cv_lib_mysqlclient_mysql_init" = xyes; then : apu_have_mysql=1 fi @@ -20256,13 +20436,13 @@ cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient_r" >&5 -$as_echo_n "checking for mysql_init in -lmysqlclient_r... " >&6; } -if ${ac_cv_lib_mysqlclient_r_mysql_init+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient" >&5 +$as_echo_n "checking for mysql_init in -lmysqlclient... " >&6; } +if ${ac_cv_lib_mysqlclient_mysql_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lmysqlclient_r $LIBS" +LIBS="-lmysqlclient $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -20282,17 +20462,17 @@ } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_mysqlclient_r_mysql_init=yes + ac_cv_lib_mysqlclient_mysql_init=yes else - ac_cv_lib_mysqlclient_r_mysql_init=no + ac_cv_lib_mysqlclient_mysql_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_r_mysql_init" >&5 -$as_echo "$ac_cv_lib_mysqlclient_r_mysql_init" >&6; } -if test "x$ac_cv_lib_mysqlclient_r_mysql_init" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_mysql_init" >&5 +$as_echo "$ac_cv_lib_mysqlclient_mysql_init" >&6; } +if test "x$ac_cv_lib_mysqlclient_mysql_init" = xyes; then : apu_have_mysql=1 fi @@ -20336,10 +20516,10 @@ if test "$apu_have_mysql" = "1"; then if test "x$LDADD_dbd_mysql" = "x"; then - test "x$silent" != "xyes" && echo " setting LDADD_dbd_mysql to \"$mysql_LDFLAGS -lmysqlclient_r $mysql_LIBS\"" - LDADD_dbd_mysql="$mysql_LDFLAGS -lmysqlclient_r $mysql_LIBS" + test "x$silent" != "xyes" && echo " setting LDADD_dbd_mysql to \"$mysql_LDFLAGS -lmysqlclient $mysql_LIBS\"" + LDADD_dbd_mysql="$mysql_LDFLAGS -lmysqlclient $mysql_LIBS" else - apr_addto_bugger="$mysql_LDFLAGS -lmysqlclient_r $mysql_LIBS" + apr_addto_bugger="$mysql_LDFLAGS -lmysqlclient $mysql_LIBS" for i in $apr_addto_bugger; do apr_addto_duplicate="0" for j in $LDADD_dbd_mysql; do @@ -21549,459 +21729,22 @@ LDFLAGS="$old_ldflags" - apu_have_freetds=0 + apu_have_odbc=0 old_libs="$LIBS" old_cppflags="$CPPFLAGS" old_ldflags="$LDFLAGS" -# Check whether --with-freetds was given. -if test "${with_freetds+set}" = set; then : - withval=$with_freetds; +# Check whether --with-odbc was given. +if test "${with_odbc+set}" = set; then : + withval=$with_odbc; if test "$withval" = "yes"; then - for ac_header in sybdb.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sybdb.h" "ac_cv_header_sybdb_h" "$ac_includes_default" -if test "x$ac_cv_header_sybdb_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYBDB_H 1 -_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tdsdbopen in -lsybdb" >&5 -$as_echo_n "checking for tdsdbopen in -lsybdb... " >&6; } -if ${ac_cv_lib_sybdb_tdsdbopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsybdb $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char tdsdbopen (); -int -main () -{ -return tdsdbopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_sybdb_tdsdbopen=yes -else - ac_cv_lib_sybdb_tdsdbopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sybdb_tdsdbopen" >&5 -$as_echo "$ac_cv_lib_sybdb_tdsdbopen" >&6; } -if test "x$ac_cv_lib_sybdb_tdsdbopen" = xyes; then : - apu_have_freetds=1 -fi - -fi - -done - - if test "$apu_have_freetds" = "0"; then - for ac_header in freetds/sybdb.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "freetds/sybdb.h" "ac_cv_header_freetds_sybdb_h" "$ac_includes_default" -if test "x$ac_cv_header_freetds_sybdb_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_FREETDS_SYBDB_H 1 -_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tdsdbopen in -lsybdb" >&5 -$as_echo_n "checking for tdsdbopen in -lsybdb... " >&6; } -if ${ac_cv_lib_sybdb_tdsdbopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsybdb $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char tdsdbopen (); -int -main () -{ -return tdsdbopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_sybdb_tdsdbopen=yes -else - ac_cv_lib_sybdb_tdsdbopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sybdb_tdsdbopen" >&5 -$as_echo "$ac_cv_lib_sybdb_tdsdbopen" >&6; } -if test "x$ac_cv_lib_sybdb_tdsdbopen" = xyes; then : - apu_have_freetds=1 -fi - -fi - -done - - fi - elif test "$withval" = "no"; then - : - else - sybdb_CPPFLAGS="-I$withval/include" - sybdb_LDFLAGS="-L$withval/lib " - - - if test "x$CPPFLAGS" = "x"; then - test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"$sybdb_CPPFLAGS\"" - CPPFLAGS="$sybdb_CPPFLAGS" - else - apr_addto_bugger="$sybdb_CPPFLAGS" - for i in $apr_addto_bugger; do - apr_addto_duplicate="0" - for j in $CPPFLAGS; do - if test "x$i" = "x$j"; then - apr_addto_duplicate="1" - break - fi - done - if test $apr_addto_duplicate = "0"; then - test "x$silent" != "xyes" && echo " adding \"$i\" to CPPFLAGS" - CPPFLAGS="$CPPFLAGS $i" - fi - done - fi - - - if test "x$LDFLAGS" = "x"; then - test "x$silent" != "xyes" && echo " setting LDFLAGS to \"$sybdb_LDFLAGS\"" - LDFLAGS="$sybdb_LDFLAGS" - else - apr_addto_bugger="$sybdb_LDFLAGS" - for i in $apr_addto_bugger; do - apr_addto_duplicate="0" - for j in $LDFLAGS; do - if test "x$i" = "x$j"; then - apr_addto_duplicate="1" - break - fi - done - if test $apr_addto_duplicate = "0"; then - test "x$silent" != "xyes" && echo " adding \"$i\" to LDFLAGS" - LDFLAGS="$LDFLAGS $i" - fi - done - fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetds in $withval" >&5 -$as_echo "$as_me: checking for freetds in $withval" >&6;} - for ac_header in sybdb.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sybdb.h" "ac_cv_header_sybdb_h" "$ac_includes_default" -if test "x$ac_cv_header_sybdb_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYBDB_H 1 -_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tdsdbopen in -lsybdb" >&5 -$as_echo_n "checking for tdsdbopen in -lsybdb... " >&6; } -if ${ac_cv_lib_sybdb_tdsdbopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsybdb $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char tdsdbopen (); -int -main () -{ -return tdsdbopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_sybdb_tdsdbopen=yes -else - ac_cv_lib_sybdb_tdsdbopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sybdb_tdsdbopen" >&5 -$as_echo "$ac_cv_lib_sybdb_tdsdbopen" >&6; } -if test "x$ac_cv_lib_sybdb_tdsdbopen" = xyes; then : - apu_have_freetds=1 -fi - -fi - -done - - if test "$apu_have_freetds" = "0"; then - for ac_header in freetds/sybdb.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "freetds/sybdb.h" "ac_cv_header_freetds_sybdb_h" "$ac_includes_default" -if test "x$ac_cv_header_freetds_sybdb_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_FREETDS_SYBDB_H 1 -_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tdsdbopen in -lsybdb" >&5 -$as_echo_n "checking for tdsdbopen in -lsybdb... " >&6; } -if ${ac_cv_lib_sybdb_tdsdbopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsybdb $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char tdsdbopen (); -int -main () -{ -return tdsdbopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_sybdb_tdsdbopen=yes -else - ac_cv_lib_sybdb_tdsdbopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sybdb_tdsdbopen" >&5 -$as_echo "$ac_cv_lib_sybdb_tdsdbopen" >&6; } -if test "x$ac_cv_lib_sybdb_tdsdbopen" = xyes; then : - apu_have_freetds=1 -fi - -fi - -done - - fi - if test "$apu_have_freetds" != "0"; then - - if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then - test "x$silent" != "xyes" && echo " setting APRUTIL_PRIV_INCLUDES to \"-I$withval/include\"" - APRUTIL_PRIV_INCLUDES="-I$withval/include" - else - apr_addto_bugger="-I$withval/include" - for i in $apr_addto_bugger; do - apr_addto_duplicate="0" - for j in $APRUTIL_PRIV_INCLUDES; do - if test "x$i" = "x$j"; then - apr_addto_duplicate="1" - break - fi - done - if test $apr_addto_duplicate = "0"; then - test "x$silent" != "xyes" && echo " adding \"$i\" to APRUTIL_PRIV_INCLUDES" - APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i" - fi - done - fi - - fi - fi - -else - - for ac_header in sybdb.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sybdb.h" "ac_cv_header_sybdb_h" "$ac_includes_default" -if test "x$ac_cv_header_sybdb_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYBDB_H 1 -_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tdsdbopen in -lsybdb" >&5 -$as_echo_n "checking for tdsdbopen in -lsybdb... " >&6; } -if ${ac_cv_lib_sybdb_tdsdbopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsybdb $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char tdsdbopen (); -int -main () -{ -return tdsdbopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_sybdb_tdsdbopen=yes -else - ac_cv_lib_sybdb_tdsdbopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sybdb_tdsdbopen" >&5 -$as_echo "$ac_cv_lib_sybdb_tdsdbopen" >&6; } -if test "x$ac_cv_lib_sybdb_tdsdbopen" = xyes; then : - apu_have_freetds=1 -fi - -fi - -done - - if test "$apu_have_freetds" = "0"; then - for ac_header in freetds/sybdb.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "freetds/sybdb.h" "ac_cv_header_freetds_sybdb_h" "$ac_includes_default" -if test "x$ac_cv_header_freetds_sybdb_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_FREETDS_SYBDB_H 1 -_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tdsdbopen in -lsybdb" >&5 -$as_echo_n "checking for tdsdbopen in -lsybdb... " >&6; } -if ${ac_cv_lib_sybdb_tdsdbopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsybdb $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char tdsdbopen (); -int -main () -{ -return tdsdbopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_sybdb_tdsdbopen=yes -else - ac_cv_lib_sybdb_tdsdbopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sybdb_tdsdbopen" >&5 -$as_echo "$ac_cv_lib_sybdb_tdsdbopen" >&6; } -if test "x$ac_cv_lib_sybdb_tdsdbopen" = xyes; then : - apu_have_freetds=1 -fi - -fi - -done - - fi - -fi - - - - - if test "$apu_have_freetds" = "1"; then - - if test "x$LDADD_dbd_freetds" = "x"; then - test "x$silent" != "xyes" && echo " setting LDADD_dbd_freetds to \"$sybdb_LDFLAGS -lsybdb\"" - LDADD_dbd_freetds="$sybdb_LDFLAGS -lsybdb" - else - apr_addto_bugger="$sybdb_LDFLAGS -lsybdb" - for i in $apr_addto_bugger; do - apr_addto_duplicate="0" - for j in $LDADD_dbd_freetds; 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 LDADD_dbd_freetds" - LDADD_dbd_freetds="$LDADD_dbd_freetds $i" - fi - done - fi - - fi - - - LIBS="$old_libs" - CPPFLAGS="$old_cppflags" - LDFLAGS="$old_ldflags" - - - apu_have_odbc=0 - - old_libs="$LIBS" - old_cppflags="$CPPFLAGS" - old_ldflags="$LDFLAGS" - - -# Check whether --with-odbc was given. -if test "${with_odbc+set}" = set; then : - withval=$with_odbc; - if test "$withval" = "yes"; then - # Extract the first word of "odbc_config", so it can be a program name with args. -set dummy odbc_config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_ODBC_CONFIG+:} false; then : + # Extract the first word of "odbc_config", so it can be a program name with args. +set dummy odbc_config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ODBC_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ODBC_CONFIG in @@ -22765,7 +22508,6 @@ test $apu_have_mysql = 1 && apu_dbd_tests="$apu_dbd_tests mysql" test $apu_have_sqlite2 = 1 && apu_dbd_tests="$apu_dbd_tests sqlite2" test $apu_have_sqlite3 = 1 && apu_dbd_tests="$apu_dbd_tests sqlite3" - test $apu_have_freetds = 1 && apu_dbd_tests="$apu_dbd_tests freetds" test $apu_have_odbc = 1 && apu_dbd_tests="$apu_dbd_tests odbc" @@ -22776,9 +22518,7 @@ apu_has_expat=0 -# Default: will use either external or bundled expat. apu_try_external_expat=1 -apu_try_builtin_expat=1 # Check whether --with-expat was given. @@ -22788,8 +22528,6 @@ as_fn_error $? "a directory must be specified for --with-expat" "$LINENO" 5 elif test "$withval" = "no"; then as_fn_error $? "Expat cannot be disabled (at this time)" "$LINENO" 5 - elif test "$withval" = "builtin"; then - apu_try_external_expat=0 else # Add given path to standard search paths if appropriate: if test "$withval" != "/usr"; then @@ -22878,8 +22616,6 @@ fi fi - # ...and refuse to fall back on the builtin expat. - apu_try_builtin_expat=0 fi fi @@ -23258,196 +22994,6 @@ fi -if test "${apu_has_expat}${apu_try_builtin_expat}" = "01"; then - bundled_subdir="xml/expat" - - # save our work to this point; this allows the sub-package to use it - cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - - echo "configuring package in $bundled_subdir now" - ac_popdir=`pwd` - apr_config_subdirs="$bundled_subdir" - test -d $bundled_subdir || $mkdir_p $bundled_subdir - ac_abs_srcdir=`(cd $srcdir/$bundled_subdir && pwd)` - cd $bundled_subdir - - # A "../" for each directory in /$config_subdirs. - ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` - - # Make the cache file pathname absolute for the subdirs - # required to correctly handle subdirs that might actually - # be symlinks - case "$cache_file" in - /*) # already absolute - ac_sub_cache_file=$cache_file ;; - *) # Was relative path. - ac_sub_cache_file="$ac_popdir/$cache_file" ;; - esac - - apr_configure_args=$ac_configure_args - - test "x$silent" = "xyes" && apr_configure_args="$apr_configure_args --silent" - - apr_configure_args="--disable-option-checking $apr_configure_args" - - if eval $SHELL $ac_abs_srcdir/configure $apr_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_abs_srcdir --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir - then : - echo "$bundled_subdir configured properly" - else - echo "configure failed for $bundled_subdir" - exit 1 - fi - - cd $ac_popdir - - # grab any updates from the sub-package - if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - - - - if test "x$APRUTIL_INCLUDES" = "x"; then - test "x$silent" != "xyes" && echo " setting APRUTIL_INCLUDES to \"-I$abs_srcdir/$bundled_subdir/lib\"" - APRUTIL_INCLUDES="-I$abs_srcdir/$bundled_subdir/lib" - else - apr_addto_bugger="-I$abs_srcdir/$bundled_subdir/lib" - for i in $apr_addto_bugger; do - apr_addto_duplicate="0" - for j in $APRUTIL_INCLUDES; do - if test "x$i" = "x$j"; then - apr_addto_duplicate="1" - break - fi - done - if test $apr_addto_duplicate = "0"; then - test "x$silent" != "xyes" && echo " adding \"$i\" to APRUTIL_INCLUDES" - APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i" - fi - done - fi - - - if test "x$LDFLAGS" = "x"; then - test "x$silent" != "xyes" && echo " setting LDFLAGS to \"-L$top_builddir/$bundled_subdir/lib\"" - LDFLAGS="-L$top_builddir/$bundled_subdir/lib" - else - apr_addto_bugger="-L$top_builddir/$bundled_subdir/lib" - for i in $apr_addto_bugger; do - apr_addto_duplicate="0" - for j in $LDFLAGS; do - if test "x$i" = "x$j"; then - apr_addto_duplicate="1" - break - fi - done - if test $apr_addto_duplicate = "0"; then - test "x$silent" != "xyes" && echo " adding \"$i\" to LDFLAGS" - LDFLAGS="$LDFLAGS $i" - fi - done - fi - - apu_expat_libs="$top_builddir/$bundled_subdir/libexpat.la" -fi - if test "x$APRUTIL_EXPORT_LIBS" = "x"; then test "x$silent" != "xyes" && echo " setting APRUTIL_EXPORT_LIBS to \"$apu_expat_libs\"" @@ -23491,9 +23037,6 @@ fi -APR_XML_DIR=$bundled_subdir - - CPPFLAGS=$save_cppflags LDFLAGS=$save_ldflags @@ -24037,12 +23580,12 @@ objs= test $apu_have_openssl = 1 && objs="$objs crypto/apr_crypto_openssl.lo" test $apu_have_nss = 1 && objs="$objs crypto/apr_crypto_nss.lo" + test $apu_have_commoncrypto = 1 && objs="$objs crypto/apr_crypto_commoncrypto.lo" test $apu_have_oracle = 1 && objs="$objs dbd/apr_dbd_oracle.lo" test $apu_have_pgsql = 1 && objs="$objs dbd/apr_dbd_pgsql.lo" test $apu_have_mysql = 1 && objs="$objs dbd/apr_dbd_mysql.lo" test $apu_have_sqlite2 = 1 && objs="$objs dbd/apr_dbd_sqlite2.lo" test $apu_have_sqlite3 = 1 && objs="$objs dbd/apr_dbd_sqlite3.lo" - test $apu_have_freetds = 1 && objs="$objs dbd/apr_dbd_freetds.lo" test $apu_have_odbc = 1 && objs="$objs dbd/apr_dbd_odbc.lo" test $apu_have_db = 1 && objs="$objs dbm/apr_dbm_berkeleydb.lo" test $apu_have_gdbm = 1 && objs="$objs dbm/apr_dbm_gdbm.lo" @@ -24066,12 +23609,12 @@ done fi - APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_crypto_openssl $LDADD_crypto_nss" - APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_dbd_pgsql $LDADD_dbd_sqlite2 $LDADD_dbd_sqlite3 $LDADD_dbd_oracle $LDADD_dbd_mysql $LDADD_dbd_freetds $LDADD_dbd_odbc" + APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_crypto_openssl $LDADD_crypto_nss $LDADD_crypto_commoncrypto" + APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_dbd_pgsql $LDADD_dbd_sqlite2 $LDADD_dbd_sqlite3 $LDADD_dbd_oracle $LDADD_dbd_mysql $LDADD_dbd_odbc" APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_dbm_db $LDADD_dbm_gdbm $LDADD_dbm_ndbm" APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_ldap" - APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_crypto_openssl $LDADD_crypto_nss" - APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_dbd_pgsql $LDADD_dbd_sqlite2 $LDADD_dbd_sqlite3 $LDADD_dbd_oracle $LDADD_dbd_mysql $LDADD_dbd_freetds $LDADD_dbd_odbc" + APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_crypto_openssl $LDADD_crypto_nss $LDADD_crypto_commoncrypto" + APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_dbd_pgsql $LDADD_dbd_sqlite2 $LDADD_dbd_sqlite3 $LDADD_dbd_oracle $LDADD_dbd_mysql $LDADD_dbd_odbc" APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_dbm_db $LDADD_dbm_gdbm $LDADD_dbm_ndbm" APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_ldap" @@ -24081,12 +23624,12 @@ dsos= test $apu_have_openssl = 1 && dsos="$dsos crypto/apr_crypto_openssl.la" test $apu_have_nss = 1 && dsos="$dsos crypto/apr_crypto_nss.la" + test $apu_have_commoncrypto = 1 && dsos="$dsos crypto/apr_crypto_commoncrypto.la" test $apu_have_oracle = 1 && dsos="$dsos dbd/apr_dbd_oracle.la" test $apu_have_pgsql = 1 && dsos="$dsos dbd/apr_dbd_pgsql.la" test $apu_have_mysql = 1 && dsos="$dsos dbd/apr_dbd_mysql.la" test $apu_have_sqlite2 = 1 && dsos="$dsos dbd/apr_dbd_sqlite2.la" test $apu_have_sqlite3 = 1 && dsos="$dsos dbd/apr_dbd_sqlite3.la" - test $apu_have_freetds = 1 && dsos="$dsos dbd/apr_dbd_freetds.la" test $apu_have_odbc = 1 && dsos="$dsos dbd/apr_dbd_odbc.la" test $apu_have_db = 1 && dsos="$dsos dbm/apr_dbm_db.la" test $apu_have_gdbm = 1 && dsos="$dsos dbm/apr_dbm_gdbm.la" @@ -24247,6 +23790,131 @@ fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler handles weak symbols" >&5 +$as_echo_n "checking whether the compiler handles weak symbols... " >&6; } +if ${apu_cv_weak_symbols+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + apu_cv_weak_symbols=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +__attribute__ ((weak)) +int weak_noop(void) +{ + return 0; +} +int main() +{ + return weak_noop(); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + apu_cv_weak_symbols=yes +else + apu_cv_weak_symbols=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_cv_weak_symbols" >&5 +$as_echo "$apu_cv_weak_symbols" >&6; } + +if test "$apu_cv_weak_symbols" = "yes"; then + +$as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memset_s support" >&5 +$as_echo_n "checking for memset_s support... " >&6; } +if ${apu_cv_memset_s+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + apu_cv_memset_s=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_STRING_H +#define __STDC_WANT_LIB_EXT1__ 1 +#include +#endif + +int main(int argc, const char **argv) +{ + char buf[1] = {1}; + return memset_s(buf, sizeof buf, 0, sizeof buf) != 0 || *buf != '\0'; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + apu_cv_memset_s=yes +else + apu_cv_memset_s=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_cv_memset_s" >&5 +$as_echo "$apu_cv_memset_s" >&6; } + +if test "$apu_cv_memset_s" = "yes"; then + +$as_echo "#define HAVE_MEMSET_S 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit_bzero support" >&5 +$as_echo_n "checking for explicit_bzero support... " >&6; } +if ${apu_cv_explicit_bzero+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + apu_cv_explicit_bzero=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif + +int main(int argc, const char **argv) +{ + char buf[1] = {1}; + explicit_bzero(buf, sizeof buf); + return *buf != '\0'; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + apu_cv_explicit_bzero=yes +else + apu_cv_explicit_bzero=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_cv_explicit_bzero" >&5 +$as_echo "$apu_cv_explicit_bzero" >&6; } + +if test "$apu_cv_explicit_bzero" = "yes"; then + +$as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h + +fi + so_ext=$APR_SO_EXT lib_target=$APR_LIB_TARGET Index: contrib/apr-util/configure.in =================================================================== --- contrib/apr-util/configure.in +++ contrib/apr-util/configure.in @@ -165,7 +165,6 @@ APU_CHECK_DBD_SQLITE3 APU_CHECK_DBD_SQLITE2 APU_CHECK_DBD_ORACLE -APU_CHECK_DBD_FREETDS APU_CHECK_DBD_ODBC APU_FIND_EXPAT APU_FIND_ICONV @@ -188,6 +187,59 @@ APU_CHECK_CRYPT_R_STYLE fi +AC_CACHE_CHECK([whether the compiler handles weak symbols], [apu_cv_weak_symbols], +[AC_TRY_RUN([ +__attribute__ ((weak)) +int weak_noop(void) +{ + return 0; +} +int main() +{ + return weak_noop(); +}], [apu_cv_weak_symbols=yes], [apu_cv_weak_symbols=no], [apu_cv_weak_symbols=no])]) + +if test "$apu_cv_weak_symbols" = "yes"; then + AC_DEFINE(HAVE_WEAK_SYMBOLS, 1, [Define if compiler handles weak symbols]) +fi + +AC_CACHE_CHECK([for memset_s support], [apu_cv_memset_s], +[AC_TRY_RUN([ +#ifdef HAVE_STRING_H +#define __STDC_WANT_LIB_EXT1__ 1 +#include +#endif + +int main(int argc, const char **argv) +{ + char buf[1] = {1}; + return memset_s(buf, sizeof buf, 0, sizeof buf) != 0 || *buf != '\0'; +}], [apu_cv_memset_s=yes], [apu_cv_memset_s=no], [apu_cv_memset_s=no])]) + +if test "$apu_cv_memset_s" = "yes"; then + AC_DEFINE([HAVE_MEMSET_S], 1, [Define if memset_s function is supported]) +fi + +AC_CACHE_CHECK([for explicit_bzero support], [apu_cv_explicit_bzero], +[AC_TRY_RUN([ +#ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif + +int main(int argc, const char **argv) +{ + char buf[1] = {1}; + explicit_bzero(buf, sizeof buf); + return *buf != '\0'; +}], [apu_cv_explicit_bzero=yes], [apu_cv_explicit_bzero=no], [apu_cv_explicit_bzero=no])]) + +if test "$apu_cv_explicit_bzero" = "yes"; then + AC_DEFINE([HAVE_EXPLICIT_BZERO], 1, [Define if explicit_bzero function is supported]) +fi + so_ext=$APR_SO_EXT lib_target=$APR_LIB_TARGET AC_SUBST(so_ext) Index: contrib/apr-util/crypto/apr_crypto.c =================================================================== --- contrib/apr-util/crypto/apr_crypto.c +++ contrib/apr-util/crypto/apr_crypto.c @@ -120,7 +120,7 @@ { apr_crypto_clear_t *clear = (apr_crypto_clear_t *)ptr; - memset(clear->buffer, 0, clear->size); + apr_crypto_memzero(clear->buffer, clear->size); clear->buffer = NULL; clear->size = 0; @@ -141,6 +141,53 @@ return APR_SUCCESS; } +#if defined(HAVE_WEAK_SYMBOLS) +void apr__memzero_explicit(void *buffer, apr_size_t size); + +__attribute__ ((weak)) +void apr__memzero_explicit(void *buffer, apr_size_t size) +{ + memset(buffer, 0, size); +} +#endif + +APU_DECLARE(apr_status_t) apr_crypto_memzero(void *buffer, apr_size_t size) +{ +#if defined(WIN32) + SecureZeroMemory(buffer, size); +#elif defined(HAVE_MEMSET_S) + if (size) { + return memset_s(buffer, (rsize_t)size, 0, (rsize_t)size); + } +#elif defined(HAVE_EXPLICIT_BZERO) + explicit_bzero(buffer, size); +#elif defined(HAVE_WEAK_SYMBOLS) + apr__memzero_explicit(buffer, size); +#else + apr_size_t i; + volatile unsigned char *volatile ptr = buffer; + for (i = 0; i < size; ++i) { + ptr[i] = 0; + } +#endif + return APR_SUCCESS; +} + +APU_DECLARE(int) apr_crypto_equals(const void *buf1, const void *buf2, + apr_size_t size) +{ + const unsigned char *p1 = buf1; + const unsigned char *p2 = buf2; + unsigned char diff = 0; + apr_size_t i; + + for (i = 0; i < size; ++i) { + diff |= p1[i] ^ p2[i]; + } + + return 1 & ((diff - 1) >> 8); +} + APU_DECLARE(apr_status_t) apr_crypto_get_driver( const apr_crypto_driver_t **driver, const char *name, const char *params, const apu_err_t **result, apr_pool_t *pool) @@ -188,12 +235,15 @@ apr_snprintf(symname, sizeof(symname), "apr_crypto_%s_driver", name); rv = apu_dso_load(&dso, &symbol, modname, symname, pool); if (rv == APR_SUCCESS || rv == APR_EINIT) { /* previously loaded?!? */ - *driver = symbol; - name = apr_pstrdup(pool, name); - apr_hash_set(drivers, name, APR_HASH_KEY_STRING, *driver); + apr_crypto_driver_t *d = symbol; rv = APR_SUCCESS; - if ((*driver)->init) { - rv = (*driver)->init(pool, params, result); + if (d->init) { + rv = d->init(pool, params, result); + } + if (APR_SUCCESS == rv) { + *driver = symbol; + name = apr_pstrdup(pool, name); + apr_hash_set(drivers, name, APR_HASH_KEY_STRING, *driver); } } apu_dso_mutex_unlock(); @@ -223,6 +273,11 @@ DRIVER_LOAD("nss", apr_crypto_nss_driver, pool, params, rv, result); } #endif +#if APU_HAVE_COMMONCRYPTO + if (name[0] == 'c' && !strcmp(name, "commoncrypto")) { + DRIVER_LOAD("commoncrypto", apr_crypto_commoncrypto_driver, pool, params, rv, result); + } +#endif #if APU_HAVE_MSCAPI if (name[0] == 'm' && !strcmp(name, "mscapi")) { DRIVER_LOAD("mscapi", apr_crypto_mscapi_driver, pool, params, rv, result); @@ -287,7 +342,8 @@ /** * @brief Get a hash table of key types, keyed by the name of the type against - * an integer pointer constant. + * a pointer to apr_crypto_block_key_type_t, which in turn begins with an + * integer. * * @param types - hashtable of key types keyed to constants. * @param f - encryption context @@ -301,7 +357,8 @@ /** * @brief Get a hash table of key modes, keyed by the name of the mode against - * an integer pointer constant. + * a pointer to apr_crypto_block_key_mode_t, which in turn begins with an + * integer. * * @param modes - hashtable of key modes keyed to constants. * @param f - encryption context @@ -313,6 +370,28 @@ return f->provider->get_block_key_modes(modes, f); } +/** + * @brief Create a key from the provided secret or passphrase. The key is cleaned + * up when the context is cleaned, and may be reused with multiple encryption + * or decryption operations. + * @note If *key is NULL, a apr_crypto_key_t will be created from a pool. If + * *key is not NULL, *key must point at a previously created structure. + * @param key The key returned, see note. + * @param rec The key record, from which the key will be derived. + * @param f The context to use. + * @param p The pool to use. + * @return Returns APR_ENOKEY if the pass phrase is missing or empty, or if a backend + * error occurred while generating the key. APR_ENOCIPHER if the type or mode + * is not supported by the particular backend. APR_EKEYTYPE if the key type is + * not known. APR_EPADDING if padding was requested but is not supported. + * APR_ENOTIMPL if not implemented. + */ +APU_DECLARE(apr_status_t) apr_crypto_key(apr_crypto_key_t **key, + const apr_crypto_key_rec_t *rec, const apr_crypto_t *f, apr_pool_t *p) +{ + return f->provider->key(key, rec, f, p); +} + /** * @brief Create a key from the given passphrase. By default, the PBKDF2 * algorithm is used to generate the key from the passphrase. It is expected Index: contrib/apr-util/crypto/apr_crypto_commoncrypto.c =================================================================== --- contrib/apr-util/crypto/apr_crypto_commoncrypto.c +++ contrib/apr-util/crypto/apr_crypto_commoncrypto.c @@ -14,6 +14,7 @@ * limitations under the License. */ +#include "apr.h" #include "apr_lib.h" #include "apu.h" #include "apu_errno.h" @@ -25,59 +26,59 @@ #include "apr_strings.h" #include "apr_time.h" #include "apr_buckets.h" +#include "apr_random.h" #include "apr_crypto_internal.h" #if APU_HAVE_CRYPTO -#include -#include +#include -#define LOG_PREFIX "apr_crypto_openssl: " +#define LOG_PREFIX "apr_crypto_commoncrypto: " -struct apr_crypto_t { +struct apr_crypto_t +{ apr_pool_t *pool; const apr_crypto_driver_t *provider; apu_err_t *result; - apr_array_header_t *keys; - apr_crypto_config_t *config; apr_hash_t *types; apr_hash_t *modes; + apr_random_t *rng; }; -struct apr_crypto_config_t { - ENGINE *engine; -}; - -struct apr_crypto_key_t { +struct apr_crypto_key_t +{ apr_pool_t *pool; const apr_crypto_driver_t *provider; const apr_crypto_t *f; - const EVP_CIPHER * cipher; + CCAlgorithm algorithm; + CCOptions options; unsigned char *key; int keyLen; - int doPad; int ivSize; + apr_size_t blockSize; }; -struct apr_crypto_block_t { +struct apr_crypto_block_t +{ apr_pool_t *pool; const apr_crypto_driver_t *provider; const apr_crypto_t *f; - EVP_CIPHER_CTX cipherCtx; - int initialised; - int ivSize; - int blockSize; - int doPad; + const apr_crypto_key_t *key; + CCCryptorRef ref; }; -static int key_3des_192 = APR_KEY_3DES_192; -static int key_aes_128 = APR_KEY_AES_128; -static int key_aes_192 = APR_KEY_AES_192; -static int key_aes_256 = APR_KEY_AES_256; +static struct apr_crypto_block_key_type_t key_types[] = +{ +{ APR_KEY_3DES_192, 24, 8, 8 }, +{ APR_KEY_AES_128, 16, 16, 16 }, +{ APR_KEY_AES_192, 24, 16, 16 }, +{ APR_KEY_AES_256, 32, 16, 16 } }; -static int mode_ecb = APR_MODE_ECB; -static int mode_cbc = APR_MODE_CBC; +static struct apr_crypto_block_key_mode_t key_modes[] = +{ +{ APR_MODE_ECB }, +{ APR_MODE_CBC } }; /** * Fetch the most recent error from this driver. @@ -94,9 +95,6 @@ */ static apr_status_t crypto_shutdown(void) { - ERR_free_strings(); - EVP_cleanup(); - ENGINE_cleanup(); return APR_SUCCESS; } @@ -111,12 +109,6 @@ static apr_status_t crypto_init(apr_pool_t *pool, const char *params, const apu_err_t **result) { - CRYPTO_malloc_init(); - ERR_load_crypto_strings(); - /* SSL_load_error_strings(); */ - OpenSSL_add_all_algorithms(); - ENGINE_load_builtin_engines(); - ENGINE_register_all_complete(); apr_pool_cleanup_register(pool, pool, crypto_shutdown_helper, apr_pool_cleanup_null); @@ -133,9 +125,9 @@ static apr_status_t crypto_block_cleanup(apr_crypto_block_t *ctx) { - if (ctx->initialised) { - EVP_CIPHER_CTX_cleanup(&ctx->cipherCtx); - ctx->initialised = 0; + if (ctx->ref) { + CCCryptorRelease(ctx->ref); + ctx->ref = NULL; } return APR_SUCCESS; @@ -157,11 +149,6 @@ static apr_status_t crypto_cleanup(apr_crypto_t *f) { - if (f->config->engine) { - ENGINE_finish(f->config->engine); - ENGINE_free(f->config->engine); - f->config->engine = NULL; - } return APR_SUCCESS; } @@ -188,57 +175,8 @@ const apr_crypto_driver_t *provider, const char *params, apr_pool_t *pool) { - apr_crypto_config_t *config = NULL; apr_crypto_t *f = apr_pcalloc(pool, sizeof(apr_crypto_t)); - - const char *engine = NULL; - - struct { - const char *field; - const char *value; - int set; - } fields[] = { - { "engine", NULL, 0 }, - { NULL, NULL, 0 } - }; - const char *ptr; - size_t klen; - char **elts = NULL; - char *elt; - int i = 0, j; - apr_status_t status; - - if (params) { - if (APR_SUCCESS != (status = apr_tokenize_to_argv(params, &elts, pool))) { - return status; - } - while ((elt = elts[i])) { - ptr = strchr(elt, '='); - if (ptr) { - for (klen = ptr - elt; klen && apr_isspace(elt[klen - 1]); --klen) - ; - ptr++; - } - else { - for (klen = strlen(elt); klen && apr_isspace(elt[klen - 1]); --klen) - ; - } - elt[klen] = 0; - - for (j = 0; fields[j].field != NULL; ++j) { - if (!strcasecmp(fields[j].field, elt)) { - fields[j].set = 1; - if (ptr) { - fields[j].value = ptr; - } - break; - } - } - - i++; - } - engine = fields[0].value; - } + apr_status_t rv; if (!f) { return APR_ENOMEM; @@ -246,59 +184,53 @@ *ff = f; f->pool = pool; f->provider = provider; - config = f->config = apr_pcalloc(pool, sizeof(apr_crypto_config_t)); - if (!config) { + + /* seed the secure random number generator */ + f->rng = apr_random_standard_new(pool); + if (!f->rng) { return APR_ENOMEM; } + do { + unsigned char seed[8]; + rv = apr_generate_random_bytes(seed, sizeof(seed)); + if (rv != APR_SUCCESS) { + return rv; + } + apr_random_add_entropy(f->rng, seed, sizeof(seed)); + rv = apr_random_secure_ready(f->rng); + } while (rv == APR_ENOTENOUGHENTROPY); f->result = apr_pcalloc(pool, sizeof(apu_err_t)); if (!f->result) { return APR_ENOMEM; } - f->keys = apr_array_make(pool, 10, sizeof(apr_crypto_key_t)); - if (!f->keys) { - return APR_ENOMEM; - } - f->types = apr_hash_make(pool); if (!f->types) { return APR_ENOMEM; } - apr_hash_set(f->types, "3des192", APR_HASH_KEY_STRING, &(key_3des_192)); - apr_hash_set(f->types, "aes128", APR_HASH_KEY_STRING, &(key_aes_128)); - apr_hash_set(f->types, "aes192", APR_HASH_KEY_STRING, &(key_aes_192)); - apr_hash_set(f->types, "aes256", APR_HASH_KEY_STRING, &(key_aes_256)); + apr_hash_set(f->types, "3des192", APR_HASH_KEY_STRING, &(key_types[0])); + apr_hash_set(f->types, "aes128", APR_HASH_KEY_STRING, &(key_types[1])); + apr_hash_set(f->types, "aes192", APR_HASH_KEY_STRING, &(key_types[2])); + apr_hash_set(f->types, "aes256", APR_HASH_KEY_STRING, &(key_types[3])); f->modes = apr_hash_make(pool); if (!f->modes) { return APR_ENOMEM; } - apr_hash_set(f->modes, "ecb", APR_HASH_KEY_STRING, &(mode_ecb)); - apr_hash_set(f->modes, "cbc", APR_HASH_KEY_STRING, &(mode_cbc)); + apr_hash_set(f->modes, "ecb", APR_HASH_KEY_STRING, &(key_modes[0])); + apr_hash_set(f->modes, "cbc", APR_HASH_KEY_STRING, &(key_modes[1])); apr_pool_cleanup_register(pool, f, crypto_cleanup_helper, apr_pool_cleanup_null); - if (engine) { - config->engine = ENGINE_by_id(engine); - if (!config->engine) { - return APR_ENOENGINE; - } - if (!ENGINE_init(config->engine)) { - ENGINE_free(config->engine); - config->engine = NULL; - return APR_EINITENGINE; - } - } - return APR_SUCCESS; } /** * @brief Get a hash table of key types, keyed by the name of the type against - * an integer pointer constant. + * a pointer to apr_crypto_block_key_type_t. * * @param types - hashtable of key types keyed to constants. * @param f - encryption context @@ -313,7 +245,7 @@ /** * @brief Get a hash table of key modes, keyed by the name of the mode against - * an integer pointer constant. + * a pointer to apr_crypto_block_key_mode_t. * * @param modes - hashtable of key modes keyed to constants. * @param f - encryption context @@ -326,127 +258,244 @@ return APR_SUCCESS; } -/** - * @brief Create a key from the given passphrase. By default, the PBKDF2 - * algorithm is used to generate the key from the passphrase. It is expected - * that the same pass phrase will generate the same key, regardless of the - * backend crypto platform used. The key is cleaned up when the context - * is cleaned, and may be reused with multiple encryption or decryption - * operations. - * @note If *key is NULL, a apr_crypto_key_t will be created from a pool. If - * *key is not NULL, *key must point at a previously created structure. - * @param key The key returned, see note. - * @param ivSize The size of the initialisation vector will be returned, based - * on whether an IV is relevant for this type of crypto. - * @param pass The passphrase to use. - * @param passLen The passphrase length in bytes - * @param salt The salt to use. - * @param saltLen The salt length in bytes - * @param type 3DES_192, AES_128, AES_192, AES_256. - * @param mode Electronic Code Book / Cipher Block Chaining. - * @param doPad Pad if necessary. - * @param iterations Iteration count - * @param f The context to use. - * @param p The pool to use. - * @return Returns APR_ENOKEY if the pass phrase is missing or empty, or if a backend - * error occurred while generating the key. APR_ENOCIPHER if the type or mode - * is not supported by the particular backend. APR_EKEYTYPE if the key type is - * not known. APR_EPADDING if padding was requested but is not supported. - * APR_ENOTIMPL if not implemented. +/* + * Work out which mechanism to use. */ -static apr_status_t crypto_passphrase(apr_crypto_key_t **k, apr_size_t *ivSize, - const char *pass, apr_size_t passLen, const unsigned char * salt, - apr_size_t saltLen, const apr_crypto_block_key_type_e type, - const apr_crypto_block_key_mode_e mode, const int doPad, - const int iterations, const apr_crypto_t *f, apr_pool_t *p) +static apr_status_t crypto_cipher_mechanism(apr_crypto_key_t *key, + const apr_crypto_block_key_type_e type, + const apr_crypto_block_key_mode_e mode, const int doPad, apr_pool_t *p) { - apr_crypto_key_t *key = *k; - - if (!key) { - *k = key = apr_array_push(f->keys); - } - if (!key) { - return APR_ENOMEM; - } + /* handle padding */ + key->options = doPad ? kCCOptionPKCS7Padding : 0; - key->f = f; - key->provider = f->provider; - - /* determine the cipher to be used */ + /* determine the algorithm to be used */ switch (type) { case (APR_KEY_3DES_192): /* A 3DES key */ if (mode == APR_MODE_CBC) { - key->cipher = EVP_des_ede3_cbc(); + key->algorithm = kCCAlgorithm3DES; + key->keyLen = kCCKeySize3DES; + key->ivSize = kCCBlockSize3DES; + key->blockSize = kCCBlockSize3DES; } else { - key->cipher = EVP_des_ede3_ecb(); + key->algorithm = kCCAlgorithm3DES; + key->options += kCCOptionECBMode; + key->keyLen = kCCKeySize3DES; + key->ivSize = 0; + key->blockSize = kCCBlockSize3DES; } break; case (APR_KEY_AES_128): if (mode == APR_MODE_CBC) { - key->cipher = EVP_aes_128_cbc(); + key->algorithm = kCCAlgorithmAES128; + key->keyLen = kCCKeySizeAES128; + key->ivSize = kCCBlockSizeAES128; + key->blockSize = kCCBlockSizeAES128; } else { - key->cipher = EVP_aes_128_ecb(); + key->algorithm = kCCAlgorithmAES128; + key->options += kCCOptionECBMode; + key->keyLen = kCCKeySizeAES128; + key->ivSize = 0; + key->blockSize = kCCBlockSizeAES128; } break; case (APR_KEY_AES_192): if (mode == APR_MODE_CBC) { - key->cipher = EVP_aes_192_cbc(); + key->algorithm = kCCAlgorithmAES128; + key->keyLen = kCCKeySizeAES192; + key->ivSize = kCCBlockSizeAES128; + key->blockSize = kCCBlockSizeAES128; } else { - key->cipher = EVP_aes_192_ecb(); + key->algorithm = kCCAlgorithmAES128; + key->options += kCCOptionECBMode; + key->keyLen = kCCKeySizeAES192; + key->ivSize = 0; + key->blockSize = kCCBlockSizeAES128; } break; case (APR_KEY_AES_256): if (mode == APR_MODE_CBC) { - key->cipher = EVP_aes_256_cbc(); + key->algorithm = kCCAlgorithmAES128; + key->keyLen = kCCKeySizeAES256; + key->ivSize = kCCBlockSizeAES128; + key->blockSize = kCCBlockSizeAES128; } else { - key->cipher = EVP_aes_256_ecb(); + key->algorithm = kCCAlgorithmAES128; + key->options += kCCOptionECBMode; + key->keyLen = kCCKeySizeAES256; + key->ivSize = 0; + key->blockSize = kCCBlockSizeAES128; } break; default: + /* TODO: Support CAST, Blowfish */ + /* unknown key type, give up */ return APR_EKEYTYPE; } - /* find the length of the key we need */ - key->keyLen = EVP_CIPHER_key_length(key->cipher); - /* make space for the key */ - key->key = apr_pcalloc(p, key->keyLen); + key->key = apr_palloc(p, key->keyLen); if (!key->key) { return APR_ENOMEM; } apr_crypto_clear(p, key->key, key->keyLen); - /* generate the key */ - if (PKCS5_PBKDF2_HMAC_SHA1(pass, passLen, (unsigned char *) salt, saltLen, - iterations, key->keyLen, key->key) == 0) { + return APR_SUCCESS; +} + +/** + * @brief Create a key from the provided secret or passphrase. The key is cleaned + * up when the context is cleaned, and may be reused with multiple encryption + * or decryption operations. + * @note If *key is NULL, a apr_crypto_key_t will be created from a pool. If + * *key is not NULL, *key must point at a previously created structure. + * @param key The key returned, see note. + * @param rec The key record, from which the key will be derived. + * @param f The context to use. + * @param p The pool to use. + * @return Returns APR_ENOKEY if the pass phrase is missing or empty, or if a backend + * error occurred while generating the key. APR_ENOCIPHER if the type or mode + * is not supported by the particular backend. APR_EKEYTYPE if the key type is + * not known. APR_EPADDING if padding was requested but is not supported. + * APR_ENOTIMPL if not implemented. + */ +static apr_status_t crypto_key(apr_crypto_key_t **k, + const apr_crypto_key_rec_t *rec, const apr_crypto_t *f, apr_pool_t *p) +{ + apr_status_t rv; + apr_crypto_key_t *key = *k; + + if (!key) { + *k = key = apr_pcalloc(p, sizeof *key); + } + if (!key) { + return APR_ENOMEM; + } + + key->f = f; + key->provider = f->provider; + + /* decide on what cipher mechanism we will be using */ + rv = crypto_cipher_mechanism(key, rec->type, rec->mode, rec->pad, p); + if (APR_SUCCESS != rv) { + return rv; + } + + switch (rec->ktype) { + + case APR_CRYPTO_KTYPE_PASSPHRASE: { + + /* generate the key */ + if ((f->result->rc = CCKeyDerivationPBKDF(kCCPBKDF2, + rec->k.passphrase.pass, rec->k.passphrase.passLen, + rec->k.passphrase.salt, rec->k.passphrase.saltLen, + kCCPRFHmacAlgSHA1, rec->k.passphrase.iterations, key->key, + key->keyLen)) == kCCParamError) { + return APR_ENOKEY; + } + + break; + } + + case APR_CRYPTO_KTYPE_SECRET: { + + /* sanity check - key correct size? */ + if (rec->k.secret.secretLen != key->keyLen) { + return APR_EKEYLENGTH; + } + + /* copy the key */ + memcpy(key->key, rec->k.secret.secret, rec->k.secret.secretLen); + + break; + } + + default: { + return APR_ENOKEY; + + } + } + + return APR_SUCCESS; +} + +/** + * @brief Create a key from the given passphrase. By default, the PBKDF2 + * algorithm is used to generate the key from the passphrase. It is expected + * that the same pass phrase will generate the same key, regardless of the + * backend crypto platform used. The key is cleaned up when the context + * is cleaned, and may be reused with multiple encryption or decryption + * operations. + * @note If *key is NULL, a apr_crypto_key_t will be created from a pool. If + * *key is not NULL, *key must point at a previously created structure. + * @param key The key returned, see note. + * @param ivSize The size of the initialisation vector will be returned, based + * on whether an IV is relevant for this type of crypto. + * @param pass The passphrase to use. + * @param passLen The passphrase length in bytes + * @param salt The salt to use. + * @param saltLen The salt length in bytes + * @param type 3DES_192, AES_128, AES_192, AES_256. + * @param mode Electronic Code Book / Cipher Block Chaining. + * @param doPad Pad if necessary. + * @param iterations Iteration count + * @param f The context to use. + * @param p The pool to use. + * @return Returns APR_ENOKEY if the pass phrase is missing or empty, or if a backend + * error occurred while generating the key. APR_ENOCIPHER if the type or mode + * is not supported by the particular backend. APR_EKEYTYPE if the key type is + * not known. APR_EPADDING if padding was requested but is not supported. + * APR_ENOTIMPL if not implemented. + */ +static apr_status_t crypto_passphrase(apr_crypto_key_t **k, apr_size_t *ivSize, + const char *pass, apr_size_t passLen, const unsigned char * salt, + apr_size_t saltLen, const apr_crypto_block_key_type_e type, + const apr_crypto_block_key_mode_e mode, const int doPad, + const int iterations, const apr_crypto_t *f, apr_pool_t *p) +{ + apr_status_t rv; + apr_crypto_key_t *key = *k; + + if (!key) { + *k = key = apr_pcalloc(p, sizeof *key); + if (!key) { + return APR_ENOMEM; + } } - key->doPad = doPad; + key->f = f; + key->provider = f->provider; - /* note: openssl incorrectly returns non zero IV size values for ECB - * algorithms, so work around this by ignoring the IV size. - */ - if (APR_MODE_ECB != mode) { - key->ivSize = EVP_CIPHER_iv_length(key->cipher); + /* decide on what cipher mechanism we will be using */ + rv = crypto_cipher_mechanism(key, type, mode, doPad, p); + if (APR_SUCCESS != rv) { + return rv; } + + /* generate the key */ + if ((f->result->rc = CCKeyDerivationPBKDF(kCCPBKDF2, pass, passLen, salt, + saltLen, kCCPRFHmacAlgSHA1, iterations, key->key, key->keyLen)) + == kCCParamError) { + return APR_ENOKEY; + } + if (ivSize) { *ivSize = key->ivSize; } @@ -475,7 +524,6 @@ apr_size_t *blockSize, apr_pool_t *p) { unsigned char *usedIv; - apr_crypto_config_t *config = key->f->config; apr_crypto_block_t *block = *ctx; if (!block) { *ctx = block = apr_pcalloc(p, sizeof(apr_crypto_block_t)); @@ -486,14 +534,11 @@ block->f = key->f; block->pool = p; block->provider = key->provider; + block->key = key; apr_pool_cleanup_register(p, block, crypto_block_cleanup_helper, apr_pool_cleanup_null); - /* create a new context for encryption */ - EVP_CIPHER_CTX_init(&block->cipherCtx); - block->initialised = 1; - /* generate an IV, if necessary */ usedIv = NULL; if (key->ivSize) { @@ -501,14 +546,16 @@ return APR_ENOIV; } if (*iv == NULL) { + apr_status_t status; usedIv = apr_pcalloc(p, key->ivSize); if (!usedIv) { return APR_ENOMEM; } apr_crypto_clear(p, usedIv, key->ivSize); - if (!((RAND_status() == 1) - && (RAND_bytes(usedIv, key->ivSize) == 1))) { - return APR_ENOIV; + status = apr_random_secure_bytes(block->f->rng, usedIv, + key->ivSize); + if (APR_SUCCESS != status) { + return status; } *iv = usedIv; } @@ -517,23 +564,31 @@ } } - /* set up our encryption context */ -#if CRYPTO_OPENSSL_CONST_BUFFERS - if (!EVP_EncryptInit_ex(&block->cipherCtx, key->cipher, config->engine, - key->key, usedIv)) { -#else - if (!EVP_EncryptInit_ex(&block->cipherCtx, key->cipher, config->engine, (unsigned char *) key->key, (unsigned char *) usedIv)) { -#endif + /* create a new context for encryption */ + switch ((block->f->result->rc = CCCryptorCreate(kCCEncrypt, key->algorithm, + key->options, key->key, key->keyLen, usedIv, &block->ref))) { + case kCCSuccess: { + break; + } + case kCCParamError: { return APR_EINIT; } - - /* Clear up any read padding */ - if (!EVP_CIPHER_CTX_set_padding(&block->cipherCtx, key->doPad)) { + case kCCMemoryFailure: { + return APR_ENOMEM; + } + case kCCAlignmentError: { return APR_EPADDING; } + case kCCUnimplemented: { + return APR_ENOTIMPL; + } + default: { + return APR_EINIT; + } + } if (blockSize) { - *blockSize = EVP_CIPHER_block_size(key->cipher); + *blockSize = key->blockSize; } return APR_SUCCESS; @@ -562,33 +617,38 @@ apr_size_t *outlen, const unsigned char *in, apr_size_t inlen, apr_crypto_block_t *ctx) { - int outl = *outlen; + apr_size_t outl = *outlen; unsigned char *buffer; /* are we after the maximum size of the out buffer? */ if (!out) { - *outlen = inlen + EVP_MAX_BLOCK_LENGTH; + *outlen = CCCryptorGetOutputLength(ctx->ref, inlen, 1); return APR_SUCCESS; } /* must we allocate the output buffer from a pool? */ if (!*out) { - buffer = apr_palloc(ctx->pool, inlen + EVP_MAX_BLOCK_LENGTH); + outl = CCCryptorGetOutputLength(ctx->ref, inlen, 1); + buffer = apr_palloc(ctx->pool, outl); if (!buffer) { return APR_ENOMEM; } - apr_crypto_clear(ctx->pool, buffer, inlen + EVP_MAX_BLOCK_LENGTH); + apr_crypto_clear(ctx->pool, buffer, outl); *out = buffer; } -#if CRYPT_OPENSSL_CONST_BUFFERS - if (!EVP_EncryptUpdate(&ctx->cipherCtx, (*out), &outl, in, inlen)) { -#else - if (!EVP_EncryptUpdate(&ctx->cipherCtx, (*out), &outl, - (unsigned char *) in, inlen)) { -#endif + switch ((ctx->f->result->rc = CCCryptorUpdate(ctx->ref, in, inlen, (*out), + outl, &outl))) { + case kCCSuccess: { + break; + } + case kCCBufferTooSmall: { + return APR_ENOSPACE; + } + default: { return APR_ECRYPT; } + } *outlen = outl; return APR_SUCCESS; @@ -616,11 +676,31 @@ static apr_status_t crypto_block_encrypt_finish(unsigned char *out, apr_size_t *outlen, apr_crypto_block_t *ctx) { - int len = *outlen; + apr_size_t len = *outlen; - if (EVP_EncryptFinal_ex(&ctx->cipherCtx, out, &len) == 0) { + ctx->f->result->rc = CCCryptorFinal(ctx->ref, out, + CCCryptorGetOutputLength(ctx->ref, 0, 1), &len); + + /* always clean up */ + crypto_block_cleanup(ctx); + + switch (ctx->f->result->rc) { + case kCCSuccess: { + break; + } + case kCCBufferTooSmall: { + return APR_ENOSPACE; + } + case kCCAlignmentError: { return APR_EPADDING; } + case kCCDecodeError: { + return APR_ECRYPT; + } + default: { + return APR_ECRYPT; + } + } *outlen = len; return APR_SUCCESS; @@ -646,7 +726,6 @@ apr_size_t *blockSize, const unsigned char *iv, const apr_crypto_key_t *key, apr_pool_t *p) { - apr_crypto_config_t *config = key->f->config; apr_crypto_block_t *block = *ctx; if (!block) { *ctx = block = apr_pcalloc(p, sizeof(apr_crypto_block_t)); @@ -661,10 +740,6 @@ apr_pool_cleanup_register(p, block, crypto_block_cleanup_helper, apr_pool_cleanup_null); - /* create a new context for encryption */ - EVP_CIPHER_CTX_init(&block->cipherCtx); - block->initialised = 1; - /* generate an IV, if necessary */ if (key->ivSize) { if (iv == NULL) { @@ -672,23 +747,31 @@ } } - /* set up our encryption context */ -#if CRYPTO_OPENSSL_CONST_BUFFERS - if (!EVP_DecryptInit_ex(&block->cipherCtx, key->cipher, config->engine, - key->key, iv)) { -#else - if (!EVP_DecryptInit_ex(&block->cipherCtx, key->cipher, config->engine, (unsigned char *) key->key, (unsigned char *) iv)) { -#endif + /* create a new context for decryption */ + switch ((block->f->result->rc = CCCryptorCreate(kCCDecrypt, key->algorithm, + key->options, key->key, key->keyLen, iv, &block->ref))) { + case kCCSuccess: { + break; + } + case kCCParamError: { return APR_EINIT; } - - /* Clear up any read padding */ - if (!EVP_CIPHER_CTX_set_padding(&block->cipherCtx, key->doPad)) { + case kCCMemoryFailure: { + return APR_ENOMEM; + } + case kCCAlignmentError: { return APR_EPADDING; } + case kCCUnimplemented: { + return APR_ENOTIMPL; + } + default: { + return APR_EINIT; + } + } if (blockSize) { - *blockSize = EVP_CIPHER_block_size(key->cipher); + *blockSize = key->blockSize; } return APR_SUCCESS; @@ -717,33 +800,38 @@ apr_size_t *outlen, const unsigned char *in, apr_size_t inlen, apr_crypto_block_t *ctx) { - int outl = *outlen; + apr_size_t outl = *outlen; unsigned char *buffer; /* are we after the maximum size of the out buffer? */ if (!out) { - *outlen = inlen + EVP_MAX_BLOCK_LENGTH; + *outlen = CCCryptorGetOutputLength(ctx->ref, inlen, 1); return APR_SUCCESS; } /* must we allocate the output buffer from a pool? */ - if (!(*out)) { - buffer = apr_palloc(ctx->pool, inlen + EVP_MAX_BLOCK_LENGTH); + if (!*out) { + outl = CCCryptorGetOutputLength(ctx->ref, inlen, 1); + buffer = apr_palloc(ctx->pool, outl); if (!buffer) { return APR_ENOMEM; } - apr_crypto_clear(ctx->pool, buffer, inlen + EVP_MAX_BLOCK_LENGTH); + apr_crypto_clear(ctx->pool, buffer, outl); *out = buffer; } -#if CRYPT_OPENSSL_CONST_BUFFERS - if (!EVP_DecryptUpdate(&ctx->cipherCtx, *out, &outl, in, inlen)) { -#else - if (!EVP_DecryptUpdate(&ctx->cipherCtx, *out, &outl, (unsigned char *) in, - inlen)) { -#endif + switch ((ctx->f->result->rc = CCCryptorUpdate(ctx->ref, in, inlen, (*out), + outl, &outl))) { + case kCCSuccess: { + break; + } + case kCCBufferTooSmall: { + return APR_ENOSPACE; + } + default: { return APR_ECRYPT; } + } *outlen = outl; return APR_SUCCESS; @@ -771,12 +859,31 @@ static apr_status_t crypto_block_decrypt_finish(unsigned char *out, apr_size_t *outlen, apr_crypto_block_t *ctx) { + apr_size_t len = *outlen; - int len = *outlen; + ctx->f->result->rc = CCCryptorFinal(ctx->ref, out, + CCCryptorGetOutputLength(ctx->ref, 0, 1), &len); - if (EVP_DecryptFinal_ex(&ctx->cipherCtx, out, &len) == 0) { + /* always clean up */ + crypto_block_cleanup(ctx); + + switch (ctx->f->result->rc) { + case kCCSuccess: { + break; + } + case kCCBufferTooSmall: { + return APR_ENOSPACE; + } + case kCCAlignmentError: { return APR_EPADDING; } + case kCCDecodeError: { + return APR_ECRYPT; + } + default: { + return APR_ECRYPT; + } + } *outlen = len; return APR_SUCCESS; @@ -784,15 +891,16 @@ } /** - * OpenSSL module. + * OSX Common Crypto module. */ -APU_MODULE_DECLARE_DATA const apr_crypto_driver_t apr_crypto_openssl_driver = { - "openssl", crypto_init, crypto_make, crypto_get_block_key_types, - crypto_get_block_key_modes, crypto_passphrase, - crypto_block_encrypt_init, crypto_block_encrypt, - crypto_block_encrypt_finish, crypto_block_decrypt_init, - crypto_block_decrypt, crypto_block_decrypt_finish, - crypto_block_cleanup, crypto_cleanup, crypto_shutdown, crypto_error +APU_MODULE_DECLARE_DATA const apr_crypto_driver_t apr_crypto_commoncrypto_driver = +{ + "commoncrypto", crypto_init, crypto_make, crypto_get_block_key_types, + crypto_get_block_key_modes, crypto_passphrase, + crypto_block_encrypt_init, crypto_block_encrypt, + crypto_block_encrypt_finish, crypto_block_decrypt_init, + crypto_block_decrypt, crypto_block_decrypt_finish, crypto_block_cleanup, + crypto_cleanup, crypto_shutdown, crypto_error, crypto_key }; #endif Index: contrib/apr-util/crypto/apr_crypto_nss.c =================================================================== --- contrib/apr-util/crypto/apr_crypto_nss.c +++ contrib/apr-util/crypto/apr_crypto_nss.c @@ -50,7 +50,6 @@ apr_pool_t *pool; const apr_crypto_driver_t *provider; apu_err_t *result; - apr_array_header_t *keys; apr_crypto_config_t *config; apr_hash_t *types; apr_hash_t *modes; @@ -68,6 +67,7 @@ SECOidTag cipherOid; PK11SymKey *symKey; int ivSize; + int keyLength; }; struct apr_crypto_block_t { @@ -76,16 +76,24 @@ const apr_crypto_t *f; PK11Context *ctx; apr_crypto_key_t *key; + SECItem *secParam; int blockSize; }; -static int key_3des_192 = APR_KEY_3DES_192; -static int key_aes_128 = APR_KEY_AES_128; -static int key_aes_192 = APR_KEY_AES_192; -static int key_aes_256 = APR_KEY_AES_256; +static struct apr_crypto_block_key_type_t key_types[] = +{ +{ APR_KEY_3DES_192, 24, 8, 8 }, +{ APR_KEY_AES_128, 16, 16, 16 }, +{ APR_KEY_AES_192, 24, 16, 16 }, +{ APR_KEY_AES_256, 32, 16, 16 } }; + +static struct apr_crypto_block_key_mode_t key_modes[] = +{ +{ APR_MODE_ECB }, +{ APR_MODE_CBC } }; -static int mode_ecb = APR_MODE_ECB; -static int mode_cbc = APR_MODE_CBC; +/* sufficient space to wrap a key */ +#define BUFFER_SIZE 128 /** * Fetch the most recent error from this driver. @@ -107,6 +115,8 @@ if (NSS_IsInitialized()) { SECStatus s = NSS_Shutdown(); if (s != SECSuccess) { + fprintf(stderr, "NSS failed to shutdown, possible leak: %d: %s", + PR_GetError(), PR_ErrorToName(s)); return APR_EINIT; } } @@ -197,9 +207,6 @@ return APR_EREINIT; } - apr_pool_cleanup_register(pool, pool, crypto_shutdown_helper, - apr_pool_cleanup_null); - if (keyPrefix || certPrefix || secmod) { s = NSS_Initialize(dir, certPrefix, keyPrefix, secmod, flags); } @@ -211,15 +218,20 @@ } if (s != SECSuccess) { if (result) { + /* Note: all memory must be owned by the caller, in case we're unloaded */ apu_err_t *err = apr_pcalloc(pool, sizeof(apu_err_t)); err->rc = PR_GetError(); - err->msg = PR_ErrorToName(s); - err->reason = "Error during 'nss' initialisation"; + err->msg = apr_pstrdup(pool, PR_ErrorToName(s)); + err->reason = apr_pstrdup(pool, "Error during 'nss' initialisation"); *result = err; } + return APR_ECRYPT; } + apr_pool_cleanup_register(pool, pool, crypto_shutdown_helper, + apr_pool_cleanup_null); + return APR_SUCCESS; } @@ -233,6 +245,11 @@ static apr_status_t crypto_block_cleanup(apr_crypto_block_t *block) { + if (block->secParam) { + SECITEM_FreeItem(block->secParam, PR_TRUE); + block->secParam = NULL; + } + if (block->ctx) { PK11_DestroyContext(block->ctx, PR_TRUE); block->ctx = NULL; @@ -248,6 +265,15 @@ return crypto_block_cleanup(block); } +static apr_status_t crypto_key_cleanup(void *data) +{ + apr_crypto_key_t *key = data; + if (key->symKey) { + PK11_FreeSymKey(key->symKey); + key->symKey = NULL; + } + return APR_SUCCESS; +} /** * @brief Clean encryption / decryption context. * @note After cleanup, a context is free to be reused if necessary. @@ -256,15 +282,6 @@ */ static apr_status_t crypto_cleanup(apr_crypto_t *f) { - apr_crypto_key_t *key; - if (f->keys) { - while ((key = apr_array_pop(f->keys))) { - if (key->symKey) { - PK11_FreeSymKey(key->symKey); - key->symKey = NULL; - } - } - } return APR_SUCCESS; } @@ -308,23 +325,22 @@ if (!f->result) { return APR_ENOMEM; } - f->keys = apr_array_make(pool, 10, sizeof(apr_crypto_key_t)); f->types = apr_hash_make(pool); if (!f->types) { return APR_ENOMEM; } - apr_hash_set(f->types, "3des192", APR_HASH_KEY_STRING, &(key_3des_192)); - apr_hash_set(f->types, "aes128", APR_HASH_KEY_STRING, &(key_aes_128)); - apr_hash_set(f->types, "aes192", APR_HASH_KEY_STRING, &(key_aes_192)); - apr_hash_set(f->types, "aes256", APR_HASH_KEY_STRING, &(key_aes_256)); + apr_hash_set(f->types, "3des192", APR_HASH_KEY_STRING, &(key_types[0])); + apr_hash_set(f->types, "aes128", APR_HASH_KEY_STRING, &(key_types[1])); + apr_hash_set(f->types, "aes192", APR_HASH_KEY_STRING, &(key_types[2])); + apr_hash_set(f->types, "aes256", APR_HASH_KEY_STRING, &(key_types[3])); f->modes = apr_hash_make(pool); if (!f->modes) { return APR_ENOMEM; } - apr_hash_set(f->modes, "ecb", APR_HASH_KEY_STRING, &(mode_ecb)); - apr_hash_set(f->modes, "cbc", APR_HASH_KEY_STRING, &(mode_cbc)); + apr_hash_set(f->modes, "ecb", APR_HASH_KEY_STRING, &(key_modes[0])); + apr_hash_set(f->modes, "cbc", APR_HASH_KEY_STRING, &(key_modes[1])); apr_pool_cleanup_register(pool, f, crypto_cleanup_helper, apr_pool_cleanup_null); @@ -335,7 +351,7 @@ /** * @brief Get a hash table of key types, keyed by the name of the type against - * an integer pointer constant. + * a pointer to apr_crypto_block_key_type_t. * * @param types - hashtable of key types keyed to constants. * @param f - encryption context @@ -350,7 +366,7 @@ /** * @brief Get a hash table of key modes, keyed by the name of the mode against - * an integer pointer constant. + * a pointer to apr_crypto_block_key_mode_t. * * @param modes - hashtable of key modes keyed to constants. * @param f - encryption context @@ -363,57 +379,13 @@ return APR_SUCCESS; } -/** - * @brief Create a key from the given passphrase. By default, the PBKDF2 - * algorithm is used to generate the key from the passphrase. It is expected - * that the same pass phrase will generate the same key, regardless of the - * backend crypto platform used. The key is cleaned up when the context - * is cleaned, and may be reused with multiple encryption or decryption - * operations. - * @note If *key is NULL, a apr_crypto_key_t will be created from a pool. If - * *key is not NULL, *key must point at a previously created structure. - * @param key The key returned, see note. - * @param ivSize The size of the initialisation vector will be returned, based - * on whether an IV is relevant for this type of crypto. - * @param pass The passphrase to use. - * @param passLen The passphrase length in bytes - * @param salt The salt to use. - * @param saltLen The salt length in bytes - * @param type 3DES_192, AES_128, AES_192, AES_256. - * @param mode Electronic Code Book / Cipher Block Chaining. - * @param doPad Pad if necessary. - * @param iterations Iteration count - * @param f The context to use. - * @param p The pool to use. - * @return Returns APR_ENOKEY if the pass phrase is missing or empty, or if a backend - * error occurred while generating the key. APR_ENOCIPHER if the type or mode - * is not supported by the particular backend. APR_EKEYTYPE if the key type is - * not known. APR_EPADDING if padding was requested but is not supported. - * APR_ENOTIMPL if not implemented. +/* + * Work out which mechanism to use. */ -static apr_status_t crypto_passphrase(apr_crypto_key_t **k, apr_size_t *ivSize, - const char *pass, apr_size_t passLen, const unsigned char * salt, - apr_size_t saltLen, const apr_crypto_block_key_type_e type, - const apr_crypto_block_key_mode_e mode, const int doPad, - const int iterations, const apr_crypto_t *f, apr_pool_t *p) +static apr_status_t crypto_cipher_mechanism(apr_crypto_key_t *key, + const apr_crypto_block_key_type_e type, + const apr_crypto_block_key_mode_e mode, const int doPad) { - apr_status_t rv = APR_SUCCESS; - PK11SlotInfo * slot; - SECItem passItem; - SECItem saltItem; - SECAlgorithmID *algid; - void *wincx = NULL; /* what is wincx? */ - apr_crypto_key_t *key = *k; - - if (!key) { - *k = key = apr_array_push(f->keys); - } - if (!key) { - return APR_ENOMEM; - } - - key->f = f; - key->provider = f->provider; /* decide on what cipher mechanism we will be using */ switch (type) { @@ -426,6 +398,7 @@ return APR_ENOCIPHER; /* No OID for CKM_DES3_ECB; */ } + key->keyLength = 24; break; case (APR_KEY_AES_128): if (APR_MODE_CBC == mode) { @@ -434,6 +407,7 @@ else { key->cipherOid = SEC_OID_AES_128_ECB; } + key->keyLength = 16; break; case (APR_KEY_AES_192): if (APR_MODE_CBC == mode) { @@ -442,6 +416,7 @@ else { key->cipherOid = SEC_OID_AES_192_ECB; } + key->keyLength = 24; break; case (APR_KEY_AES_256): if (APR_MODE_CBC == mode) { @@ -450,6 +425,7 @@ else { key->cipherOid = SEC_OID_AES_256_ECB; } + key->keyLength = 32; break; default: /* unknown key type, give up */ @@ -464,13 +440,266 @@ if (doPad) { CK_MECHANISM_TYPE paddedMech; paddedMech = PK11_GetPadMechanism(key->cipherMech); - if (CKM_INVALID_MECHANISM == paddedMech || key->cipherMech - == paddedMech) { + if (CKM_INVALID_MECHANISM == paddedMech + || key->cipherMech == paddedMech) { return APR_EPADDING; } key->cipherMech = paddedMech; } + key->ivSize = PK11_GetIVLength(key->cipherMech); + + return APR_SUCCESS; +} + +/** + * @brief Create a key from the provided secret or passphrase. The key is cleaned + * up when the context is cleaned, and may be reused with multiple encryption + * or decryption operations. + * @note If *key is NULL, a apr_crypto_key_t will be created from a pool. If + * *key is not NULL, *key must point at a previously created structure. + * @param key The key returned, see note. + * @param rec The key record, from which the key will be derived. + * @param f The context to use. + * @param p The pool to use. + * @return Returns APR_ENOKEY if the pass phrase is missing or empty, or if a backend + * error occurred while generating the key. APR_ENOCIPHER if the type or mode + * is not supported by the particular backend. APR_EKEYTYPE if the key type is + * not known. APR_EPADDING if padding was requested but is not supported. + * APR_ENOTIMPL if not implemented. + */ +static apr_status_t crypto_key(apr_crypto_key_t **k, + const apr_crypto_key_rec_t *rec, const apr_crypto_t *f, apr_pool_t *p) +{ + apr_status_t rv = APR_SUCCESS; + PK11SlotInfo *slot, *tslot; + PK11SymKey *tkey; + SECItem secretItem; + SECItem wrappedItem; + SECItem *secParam; + PK11Context *ctx; + SECStatus s; + SECItem passItem; + SECItem saltItem; + SECAlgorithmID *algid; + void *wincx = NULL; /* what is wincx? */ + apr_crypto_key_t *key; + int blockSize; + int remainder; + + key = *k; + if (!key) { + *k = key = apr_pcalloc(p, sizeof *key); + if (!key) { + return APR_ENOMEM; + } + apr_pool_cleanup_register(p, key, crypto_key_cleanup, + apr_pool_cleanup_null); + } + + key->f = f; + key->provider = f->provider; + + /* decide on what cipher mechanism we will be using */ + rv = crypto_cipher_mechanism(key, rec->type, rec->mode, rec->pad); + if (APR_SUCCESS != rv) { + return rv; + } + + switch (rec->ktype) { + + case APR_CRYPTO_KTYPE_PASSPHRASE: { + + /* Turn the raw passphrase and salt into SECItems */ + passItem.data = (unsigned char*) rec->k.passphrase.pass; + passItem.len = rec->k.passphrase.passLen; + saltItem.data = (unsigned char*) rec->k.passphrase.salt; + saltItem.len = rec->k.passphrase.saltLen; + + /* generate the key */ + /* pbeAlg and cipherAlg are the same. */ + algid = PK11_CreatePBEV2AlgorithmID(key->cipherOid, key->cipherOid, + SEC_OID_HMAC_SHA1, key->keyLength, + rec->k.passphrase.iterations, &saltItem); + if (algid) { + slot = PK11_GetBestSlot(key->cipherMech, wincx); + if (slot) { + key->symKey = PK11_PBEKeyGen(slot, algid, &passItem, PR_FALSE, + wincx); + PK11_FreeSlot(slot); + } + SECOID_DestroyAlgorithmID(algid, PR_TRUE); + } + + break; + } + + case APR_CRYPTO_KTYPE_SECRET: { + + /* + * NSS is by default in FIPS mode, which disallows the use of unencrypted + * symmetrical keys. As per http://permalink.gmane.org/gmane.comp.mozilla.crypto/7947 + * we do the following: + * + * 1. Generate a (temporary) symmetric key in NSS. + * 2. Use that symmetric key to encrypt your symmetric key as data. + * 3. Unwrap your wrapped symmetric key, using the symmetric key + * you generated in Step 1 as the unwrapping key. + * + * http://permalink.gmane.org/gmane.comp.mozilla.crypto/7947 + */ + + /* generate the key */ + slot = PK11_GetBestSlot(key->cipherMech, NULL); + if (slot) { + unsigned char data[BUFFER_SIZE]; + + /* sanity check - key correct size? */ + if (rec->k.secret.secretLen != key->keyLength) { + PK11_FreeSlot(slot); + return APR_EKEYLENGTH; + } + + tslot = PK11_GetBestSlot(CKM_AES_ECB, NULL); + if (tslot) { + + /* generate a temporary wrapping key */ + tkey = PK11_KeyGen(tslot, CKM_AES_ECB, 0, PK11_GetBestKeyLength(tslot, CKM_AES_ECB), 0); + + /* prepare the key to wrap */ + secretItem.data = (unsigned char *) rec->k.secret.secret; + secretItem.len = rec->k.secret.secretLen; + + /* ensure our key matches the blocksize */ + secParam = PK11_GenerateNewParam(CKM_AES_ECB, tkey); + blockSize = PK11_GetBlockSize(CKM_AES_ECB, secParam); + remainder = rec->k.secret.secretLen % blockSize; + if (remainder) { + secretItem.data = + apr_pcalloc(p, rec->k.secret.secretLen + remainder); + apr_crypto_clear(p, secretItem.data, + rec->k.secret.secretLen); + memcpy(secretItem.data, rec->k.secret.secret, + rec->k.secret.secretLen); + secretItem.len += remainder; + } + + /* prepare a space for the wrapped key */ + wrappedItem.data = data; + + /* wrap the key */ + ctx = PK11_CreateContextBySymKey(CKM_AES_ECB, CKA_ENCRYPT, tkey, + secParam); + if (ctx) { + s = PK11_CipherOp(ctx, wrappedItem.data, + (int *) (&wrappedItem.len), BUFFER_SIZE, + secretItem.data, secretItem.len); + if (s == SECSuccess) { + + /* unwrap the key again */ + key->symKey = PK11_UnwrapSymKeyWithFlags(tkey, + CKM_AES_ECB, NULL, &wrappedItem, + key->cipherMech, CKA_ENCRYPT, + rec->k.secret.secretLen, 0); + + } + + PK11_DestroyContext(ctx, PR_TRUE); + } + + /* clean up */ + SECITEM_FreeItem(secParam, PR_TRUE); + PK11_FreeSymKey(tkey); + PK11_FreeSlot(tslot); + + } + + PK11_FreeSlot(slot); + } + + break; + } + + default: { + + return APR_ENOKEY; + + } + } + + /* sanity check? */ + if (!key->symKey) { + PRErrorCode perr = PORT_GetError(); + if (perr) { + f->result->rc = perr; + f->result->msg = PR_ErrorToName(perr); + rv = APR_ENOKEY; + } + } + + return rv; +} + +/** + * @brief Create a key from the given passphrase. By default, the PBKDF2 + * algorithm is used to generate the key from the passphrase. It is expected + * that the same pass phrase will generate the same key, regardless of the + * backend crypto platform used. The key is cleaned up when the context + * is cleaned, and may be reused with multiple encryption or decryption + * operations. + * @note If *key is NULL, a apr_crypto_key_t will be created from a pool. If + * *key is not NULL, *key must point at a previously created structure. + * @param key The key returned, see note. + * @param ivSize The size of the initialisation vector will be returned, based + * on whether an IV is relevant for this type of crypto. + * @param pass The passphrase to use. + * @param passLen The passphrase length in bytes + * @param salt The salt to use. + * @param saltLen The salt length in bytes + * @param type 3DES_192, AES_128, AES_192, AES_256. + * @param mode Electronic Code Book / Cipher Block Chaining. + * @param doPad Pad if necessary. + * @param iterations Iteration count + * @param f The context to use. + * @param p The pool to use. + * @return Returns APR_ENOKEY if the pass phrase is missing or empty, or if a backend + * error occurred while generating the key. APR_ENOCIPHER if the type or mode + * is not supported by the particular backend. APR_EKEYTYPE if the key type is + * not known. APR_EPADDING if padding was requested but is not supported. + * APR_ENOTIMPL if not implemented. + */ +static apr_status_t crypto_passphrase(apr_crypto_key_t **k, apr_size_t *ivSize, + const char *pass, apr_size_t passLen, const unsigned char * salt, + apr_size_t saltLen, const apr_crypto_block_key_type_e type, + const apr_crypto_block_key_mode_e mode, const int doPad, + const int iterations, const apr_crypto_t *f, apr_pool_t *p) +{ + apr_status_t rv = APR_SUCCESS; + PK11SlotInfo * slot; + SECItem passItem; + SECItem saltItem; + SECAlgorithmID *algid; + void *wincx = NULL; /* what is wincx? */ + apr_crypto_key_t *key = *k; + + if (!key) { + *k = key = apr_pcalloc(p, sizeof *key); + if (!key) { + return APR_ENOMEM; + } + apr_pool_cleanup_register(p, key, crypto_key_cleanup, + apr_pool_cleanup_null); + } + + key->f = f; + key->provider = f->provider; + + /* decide on what cipher mechanism we will be using */ + rv = crypto_cipher_mechanism(key, type, mode, doPad); + if (APR_SUCCESS != rv) { + return rv; + } + /* Turn the raw passphrase and salt into SECItems */ passItem.data = (unsigned char*) pass; passItem.len = passLen; @@ -478,9 +707,9 @@ saltItem.len = saltLen; /* generate the key */ - /* pbeAlg and cipherAlg are the same. NSS decides the keylength. */ + /* pbeAlg and cipherAlg are the same. */ algid = PK11_CreatePBEV2AlgorithmID(key->cipherOid, key->cipherOid, - SEC_OID_HMAC_SHA1, 0, iterations, &saltItem); + SEC_OID_HMAC_SHA1, key->keyLength, iterations, &saltItem); if (algid) { slot = PK11_GetBestSlot(key->cipherMech, wincx); if (slot) { @@ -501,7 +730,6 @@ } } - key->ivSize = PK11_GetIVLength(key->cipherMech); if (ivSize) { *ivSize = key->ivSize; } @@ -530,7 +758,6 @@ apr_size_t *blockSize, apr_pool_t *p) { PRErrorCode perr; - SECItem * secParam; SECItem ivItem; unsigned char * usedIv; apr_crypto_block_t *block = *ctx; @@ -569,14 +796,14 @@ } ivItem.data = usedIv; ivItem.len = key->ivSize; - secParam = PK11_ParamFromIV(key->cipherMech, &ivItem); + block->secParam = PK11_ParamFromIV(key->cipherMech, &ivItem); } else { - secParam = PK11_GenerateNewParam(key->cipherMech, key->symKey); + block->secParam = PK11_GenerateNewParam(key->cipherMech, key->symKey); } - block->blockSize = PK11_GetBlockSize(key->cipherMech, secParam); + block->blockSize = PK11_GetBlockSize(key->cipherMech, block->secParam); block->ctx = PK11_CreateContextBySymKey(key->cipherMech, CKA_ENCRYPT, - key->symKey, secParam); + key->symKey, block->secParam); /* did an error occur? */ perr = PORT_GetError(); @@ -587,7 +814,7 @@ } if (blockSize) { - *blockSize = PK11_GetBlockSize(key->cipherMech, secParam); + *blockSize = PK11_GetBlockSize(key->cipherMech, block->secParam); } return APR_SUCCESS; @@ -711,7 +938,6 @@ const apr_crypto_key_t *key, apr_pool_t *p) { PRErrorCode perr; - SECItem * secParam; apr_crypto_block_t *block = *ctx; if (!block) { *ctx = block = apr_pcalloc(p, sizeof(apr_crypto_block_t)); @@ -733,14 +959,14 @@ } ivItem.data = (unsigned char*) iv; ivItem.len = key->ivSize; - secParam = PK11_ParamFromIV(key->cipherMech, &ivItem); + block->secParam = PK11_ParamFromIV(key->cipherMech, &ivItem); } else { - secParam = PK11_GenerateNewParam(key->cipherMech, key->symKey); + block->secParam = PK11_GenerateNewParam(key->cipherMech, key->symKey); } - block->blockSize = PK11_GetBlockSize(key->cipherMech, secParam); + block->blockSize = PK11_GetBlockSize(key->cipherMech, block->secParam); block->ctx = PK11_CreateContextBySymKey(key->cipherMech, CKA_DECRYPT, - key->symKey, secParam); + key->symKey, block->secParam); /* did an error occur? */ perr = PORT_GetError(); @@ -751,7 +977,7 @@ } if (blockSize) { - *blockSize = PK11_GetBlockSize(key->cipherMech, secParam); + *blockSize = PK11_GetBlockSize(key->cipherMech, block->secParam); } return APR_SUCCESS; @@ -864,7 +1090,8 @@ crypto_block_encrypt_init, crypto_block_encrypt, crypto_block_encrypt_finish, crypto_block_decrypt_init, crypto_block_decrypt, crypto_block_decrypt_finish, - crypto_block_cleanup, crypto_cleanup, crypto_shutdown, crypto_error + crypto_block_cleanup, crypto_cleanup, crypto_shutdown, crypto_error, + crypto_key }; #endif Index: contrib/apr-util/crypto/apr_crypto_nss.dep =================================================================== --- /dev/null +++ contrib/apr-util/crypto/apr_crypto_nss.dep @@ -0,0 +1,15 @@ +# Microsoft Developer Studio Generated Dependency File, included by apr_crypto_nss.mak + +.\apr_crypto_nss.c : \ + "..\include\apr_buckets.h"\ + "..\include\apr_crypto.h"\ + "..\include\apu.h"\ + "..\include\apu_errno.h"\ + "..\include\private\apr_crypto_internal.h"\ + "..\include\private\apu_config.h"\ + + +..\libaprutil.rc : \ + "..\include\apu.h"\ + "..\include\apu_version.h"\ + Index: contrib/apr-util/crypto/apr_crypto_nss.dsp =================================================================== --- /dev/null +++ contrib/apr-util/crypto/apr_crypto_nss.dsp @@ -0,0 +1,203 @@ +# Microsoft Developer Studio Project File - Name="apr_crypto_nss" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=apr_crypto_nss - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "apr_crypto_nss.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "apr_crypto_nss.mak" CFG="apr_crypto_nss - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "apr_crypto_nss - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_crypto_nss - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_crypto_nss - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_crypto_nss - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "apr_crypto_nss - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /I "../../nss/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_NSS=1 /D HAVE_NSS_H=1 /D HAVE_PK11PUB_H=1 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_crypto_nss_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 /fo"Release/apr_crypto_nss-1.res" /d DLL_NAME="apr_crypto_nss" /d "NDEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib nss3.lib libnspr4.lib /nologo /libpath:..\..\nss\lib /base:"0x6F110000" /subsystem:windows /dll /incremental:no /debug /opt:ref +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib nss3.lib libnspr4.lib /nologo /libpath:..\..\nss\lib /base:"0x6F110000" /subsystem:windows /dll /incremental:no /debug /out:"Release\apr_crypto_nss-1.dll" /pdb:"Release\apr_crypto_nss-1.pdb" /implib:"Release\apr_crypto_nss-1.lib" /MACHINE:X86 /opt:ref +# Begin Special Build Tool +TargetPath=Release\apr_crypto_nss-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)" == "apr_crypto_nss - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /I "../../nss/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_NSS=1 /D HAVE_NSS_H=1 /D HAVE_PK11PUB_H=1 /D /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_crypto_nss_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 /fo"Debug/apr_crypto_nss-1.res" /d DLL_NAME="apr_crypto_nss" /d "_DEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib nss3.lib libnspr4.lib /nologo /libpath:..\..\nss\lib /base:"0x6F110000" /subsystem:windows /dll /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib nss3.lib libnspr4.lib /nologo /libpath:..\..\nss\lib /base:"0x6F110000" /subsystem:windows /dll /incremental:no /debug /out:"Debug\apr_crypto_nss-1.dll" /pdb:"Debug\apr_crypto_nss-1.pdb" /implib:"Debug\apr_crypto_nss-1.lib" /MACHINE:X86 +# Begin Special Build Tool +TargetPath=Debug\apr_crypto_nss-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)" == "apr_crypto_nss - x64 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "x64\Release" +# PROP BASE Intermediate_Dir "x64\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "x64\Release" +# PROP Intermediate_Dir "x64\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "WIN64" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /I "../../nss/include" /D "NDEBUG" /D "WIN32" /D "WIN64" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_NSS=1 /D HAVE_NSS_H=1 /D HAVE_PK11PUB_H=1 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_crypto_nss_src" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /x64 "NUL" +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /x64 "NUL" +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /fo"x64\Release/apr_crypto_nss-1.res" /d DLL_NAME="apr_crypto_nss" /d "NDEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib nss3.lib libnspr4.lib /nologo /libpath:..\..\nss\lib /base:"0x6F110000" /subsystem:windows /machine:X64 /dll /incremental:no /debug /opt:ref +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib nss3.lib libnspr4.lib /nologo /libpath:..\..\nss\lib /base:"0x6F110000" /subsystem:windows /machine:X64 /dll /incremental:no /debug /out:"x64\Release\apr_crypto_nss-1.dll" /pdb:"x64\Release\apr_crypto_nss-1.pdb" /implib:"x64\Release\apr_crypto_nss-1.lib" /opt:ref +# Begin Special Build Tool +TargetPath=x64\Release\apr_crypto_nss-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)" == "apr_crypto_nss - x64 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "x64\Debug" +# PROP BASE Intermediate_Dir "x64\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "x64\Debug" +# PROP Intermediate_Dir "x64\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "WIN64" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /I "../../nss/include" /D "_DEBUG" /D "WIN32" /D "WIN64" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_NSS=1 /D HAVE_NSS_H=1 /D HAVE_PK11PUB_H=1 /D /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_crypto_nss_src" /FD /EHsc /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /x64 "NUL" +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /x64 "NUL" +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /fo"x64\Debug/apr_crypto_nss-1.res" /d DLL_NAME="apr_crypto_nss" /d "_DEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib nss3.lib libnspr4.lib /nologo /libpath:..\..\nss\lib /base:"0x6F110000" /subsystem:windows /machine:X64 /dll /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib nss3.lib libnspr4.lib /nologo /libpath:..\..\nss\lib /base:"0x6F110000" /subsystem:windows /machine:X64 /dll /incremental:no /debug /out:"x64\Debug\apr_crypto_nss-1.dll" /pdb:"x64\Debug\apr_crypto_nss-1.pdb" /implib:"x64\Debug\apr_crypto_nss-1.lib" +# Begin Special Build Tool +TargetPath=x64\Debug\apr_crypto_nss-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 + +!ENDIF + +# Begin Target + +# Name "apr_crypto_nss - Win32 Release" +# Name "apr_crypto_nss - Win32 Debug" +# Name "apr_crypto_nss - x64 Release" +# Name "apr_crypto_nss - x64 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\apr_crypto_nss.c +# End Source File +# End Group +# Begin Group "Public Header Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\include\apr_crypto.h +# End Source File +# End Group +# Begin Group "Internal Header Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\include\private\apu_config.h +# End Source File +# Begin Source File + +SOURCE=..\include\private\apu_internal.h +# End Source File +# End Group +# Begin Source File + +SOURCE=..\libaprutil.rc +# End Source File +# End Target +# End Project Index: contrib/apr-util/crypto/apr_crypto_nss.mak =================================================================== --- /dev/null +++ contrib/apr-util/crypto/apr_crypto_nss.mak @@ -0,0 +1,594 @@ +# Microsoft Developer Studio Generated NMAKE File, Based on apr_crypto_nss.dsp +!IF "$(CFG)" == "" +CFG=apr_crypto_nss - Win32 Release +!MESSAGE No configuration specified. Defaulting to apr_crypto_nss - Win32 Release. +!ENDIF + +!IF "$(CFG)" != "apr_crypto_nss - Win32 Release" && "$(CFG)" != "apr_crypto_nss - Win32 Debug" && "$(CFG)" != "apr_crypto_nss - x64 Release" && "$(CFG)" != "apr_crypto_nss - 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: +!MESSAGE +!MESSAGE NMAKE /f "apr_crypto_nss.mak" CFG="apr_crypto_nss - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "apr_crypto_nss - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_crypto_nss - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_crypto_nss - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_crypto_nss - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +!IF "$(CFG)" == "apr_crypto_nss - Win32 Release" + +OUTDIR=.\Release +INTDIR=.\Release +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_crypto_nss-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\apr_crypto_nss-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_crypto_nss-1.res" + -@erase "$(INTDIR)\apr_crypto_nss.obj" + -@erase "$(INTDIR)\apr_crypto_nss_src.idb" + -@erase "$(INTDIR)\apr_crypto_nss_src.pdb" + -@erase "$(OUTDIR)\apr_crypto_nss-1.dll" + -@erase "$(OUTDIR)\apr_crypto_nss-1.exp" + -@erase "$(OUTDIR)\apr_crypto_nss-1.lib" + -@erase "$(OUTDIR)\apr_crypto_nss-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /I "../../nss/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_NSS=1 /D HAVE_NSS_H=1 /D HAVE_PK11PUB_H=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_crypto_nss_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)\apr_crypto_nss-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_crypto_nss" /d "NDEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_crypto_nss.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib nss3.lib libnspr4.lib /nologo /base:"0x6F110000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_crypto_nss-1.pdb" /debug /out:"$(OUTDIR)\apr_crypto_nss-1.dll" /implib:"$(OUTDIR)\apr_crypto_nss-1.lib" /libpath:"..\..\nss\lib" /opt:ref +LINK32_OBJS= \ + "$(INTDIR)\apr_crypto_nss.obj" \ + "$(INTDIR)\apr_crypto_nss-1.res" \ + "..\..\apr\Release\libapr-1.lib" \ + "..\Release\libaprutil-1.lib" + +"$(OUTDIR)\apr_crypto_nss-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Release\apr_crypto_nss-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_crypto_nss-1.dll" + if exist .\Release\apr_crypto_nss-1.dll.manifest mt.exe -manifest .\Release\apr_crypto_nss-1.dll.manifest -outputresource:.\Release\apr_crypto_nss-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_crypto_nss - Win32 Debug" + +OUTDIR=.\Debug +INTDIR=.\Debug +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_crypto_nss-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\apr_crypto_nss-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_crypto_nss-1.res" + -@erase "$(INTDIR)\apr_crypto_nss.obj" + -@erase "$(INTDIR)\apr_crypto_nss_src.idb" + -@erase "$(INTDIR)\apr_crypto_nss_src.pdb" + -@erase "$(OUTDIR)\apr_crypto_nss-1.dll" + -@erase "$(OUTDIR)\apr_crypto_nss-1.exp" + -@erase "$(OUTDIR)\apr_crypto_nss-1.lib" + -@erase "$(OUTDIR)\apr_crypto_nss-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /I "../../nss/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_NSS=1 /D HAVE_NSS_H=1 /D HAVE_PK11PUB_H=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_crypto_nss_src" /FD /D /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)\apr_crypto_nss-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_crypto_nss" /d "_DEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_crypto_nss.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib nss3.lib libnspr4.lib /nologo /base:"0x6F110000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_crypto_nss-1.pdb" /debug /out:"$(OUTDIR)\apr_crypto_nss-1.dll" /implib:"$(OUTDIR)\apr_crypto_nss-1.lib" /libpath:"..\..\nss\lib" +LINK32_OBJS= \ + "$(INTDIR)\apr_crypto_nss.obj" \ + "$(INTDIR)\apr_crypto_nss-1.res" \ + "..\..\apr\Debug\libapr-1.lib" \ + "..\Debug\libaprutil-1.lib" + +"$(OUTDIR)\apr_crypto_nss-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Debug\apr_crypto_nss-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_crypto_nss-1.dll" + if exist .\Debug\apr_crypto_nss-1.dll.manifest mt.exe -manifest .\Debug\apr_crypto_nss-1.dll.manifest -outputresource:.\Debug\apr_crypto_nss-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_crypto_nss - x64 Release" + +OUTDIR=.\x64\Release +INTDIR=.\x64\Release +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\x64\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_crypto_nss-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - x64 Release" "libapr - x64 Release" "$(OUTDIR)\apr_crypto_nss-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - x64 ReleaseCLEAN" "libaprutil - x64 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_crypto_nss-1.res" + -@erase "$(INTDIR)\apr_crypto_nss.obj" + -@erase "$(INTDIR)\apr_crypto_nss_src.idb" + -@erase "$(INTDIR)\apr_crypto_nss_src.pdb" + -@erase "$(OUTDIR)\apr_crypto_nss-1.dll" + -@erase "$(OUTDIR)\apr_crypto_nss-1.exp" + -@erase "$(OUTDIR)\apr_crypto_nss-1.lib" + -@erase "$(OUTDIR)\apr_crypto_nss-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /I "../../nss/include" /D "NDEBUG" /D "WIN32" /D "WIN64" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_NSS=1 /D HAVE_NSS_H=1 /D HAVE_PK11PUB_H=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_crypto_nss_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 /x64 "NUL" +RSC=rc.exe +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\apr_crypto_nss-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_crypto_nss" /d "NDEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_crypto_nss.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib nss3.lib libnspr4.lib /nologo /base:"0x6F110000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_crypto_nss-1.pdb" /debug /out:"$(OUTDIR)\apr_crypto_nss-1.dll" /implib:"$(OUTDIR)\apr_crypto_nss-1.lib" /libpath:"..\..\nss\lib" /machine:X64 /opt:ref +LINK32_OBJS= \ + "$(INTDIR)\apr_crypto_nss.obj" \ + "$(INTDIR)\apr_crypto_nss-1.res" \ + "..\..\apr\x64\Release\libapr-1.lib" \ + "..\x64\Release\libaprutil-1.lib" + +"$(OUTDIR)\apr_crypto_nss-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\x64\Release\apr_crypto_nss-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\x64\Release +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_crypto_nss-1.dll" + if exist .\x64\Release\apr_crypto_nss-1.dll.manifest mt.exe -manifest .\x64\Release\apr_crypto_nss-1.dll.manifest -outputresource:.\x64\Release\apr_crypto_nss-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_crypto_nss - x64 Debug" + +OUTDIR=.\x64\Debug +INTDIR=.\x64\Debug +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\x64\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_crypto_nss-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - x64 Debug" "libapr - x64 Debug" "$(OUTDIR)\apr_crypto_nss-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - x64 DebugCLEAN" "libaprutil - x64 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_crypto_nss-1.res" + -@erase "$(INTDIR)\apr_crypto_nss.obj" + -@erase "$(INTDIR)\apr_crypto_nss_src.idb" + -@erase "$(INTDIR)\apr_crypto_nss_src.pdb" + -@erase "$(OUTDIR)\apr_crypto_nss-1.dll" + -@erase "$(OUTDIR)\apr_crypto_nss-1.exp" + -@erase "$(OUTDIR)\apr_crypto_nss-1.lib" + -@erase "$(OUTDIR)\apr_crypto_nss-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /I "../../nss/include" /D "_DEBUG" /D "WIN32" /D "WIN64" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_NSS=1 /D HAVE_NSS_H=1 /D HAVE_PK11PUB_H=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_crypto_nss_src" /FD /D /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 /x64 "NUL" +RSC=rc.exe +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\apr_crypto_nss-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_crypto_nss" /d "_DEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_crypto_nss.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib nss3.lib libnspr4.lib /nologo /base:"0x6F110000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_crypto_nss-1.pdb" /debug /out:"$(OUTDIR)\apr_crypto_nss-1.dll" /implib:"$(OUTDIR)\apr_crypto_nss-1.lib" /libpath:"..\..\nss\lib" /machine:X64 +LINK32_OBJS= \ + "$(INTDIR)\apr_crypto_nss.obj" \ + "$(INTDIR)\apr_crypto_nss-1.res" \ + "..\..\apr\x64\Debug\libapr-1.lib" \ + "..\x64\Debug\libaprutil-1.lib" + +"$(OUTDIR)\apr_crypto_nss-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\x64\Debug\apr_crypto_nss-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\x64\Debug +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_crypto_nss-1.dll" + if exist .\x64\Debug\apr_crypto_nss-1.dll.manifest mt.exe -manifest .\x64\Debug\apr_crypto_nss-1.dll.manifest -outputresource:.\x64\Debug\apr_crypto_nss-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ENDIF + + +!IF "$(NO_EXTERNAL_DEPS)" != "1" +!IF EXISTS("apr_crypto_nss.dep") +!INCLUDE "apr_crypto_nss.dep" +!ELSE +!MESSAGE Warning: cannot find "apr_crypto_nss.dep" +!ENDIF +!ENDIF + + +!IF "$(CFG)" == "apr_crypto_nss - Win32 Release" || "$(CFG)" == "apr_crypto_nss - Win32 Debug" || "$(CFG)" == "apr_crypto_nss - x64 Release" || "$(CFG)" == "apr_crypto_nss - x64 Debug" +SOURCE=.\apr_crypto_nss.c + +"$(INTDIR)\apr_crypto_nss.obj" : $(SOURCE) "$(INTDIR)" + + +!IF "$(CFG)" == "apr_crypto_nss - Win32 Release" + +"libapr - Win32 Release" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" + cd "..\apr-util\crypto" + +"libapr - Win32 ReleaseCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN + cd "..\apr-util\crypto" + +!ELSEIF "$(CFG)" == "apr_crypto_nss - Win32 Debug" + +"libapr - Win32 Debug" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" + cd "..\apr-util\crypto" + +"libapr - Win32 DebugCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN + cd "..\apr-util\crypto" + +!ELSEIF "$(CFG)" == "apr_crypto_nss - x64 Release" + +"libapr - x64 Release" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Release" + cd "..\apr-util\crypto" + +"libapr - x64 ReleaseCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Release" RECURSE=1 CLEAN + cd "..\apr-util\crypto" + +!ELSEIF "$(CFG)" == "apr_crypto_nss - x64 Debug" + +"libapr - x64 Debug" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Debug" + cd "..\apr-util\crypto" + +"libapr - x64 DebugCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Debug" RECURSE=1 CLEAN + cd "..\apr-util\crypto" + +!ENDIF + +!IF "$(CFG)" == "apr_crypto_nss - Win32 Release" + +"libaprutil - Win32 Release" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" + cd ".\crypto" + +"libaprutil - Win32 ReleaseCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN + cd ".\crypto" + +!ELSEIF "$(CFG)" == "apr_crypto_nss - Win32 Debug" + +"libaprutil - Win32 Debug" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" + cd ".\crypto" + +"libaprutil - Win32 DebugCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN + cd ".\crypto" + +!ELSEIF "$(CFG)" == "apr_crypto_nss - x64 Release" + +"libaprutil - x64 Release" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Release" + cd ".\crypto" + +"libaprutil - x64 ReleaseCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Release" RECURSE=1 CLEAN + cd ".\crypto" + +!ELSEIF "$(CFG)" == "apr_crypto_nss - x64 Debug" + +"libaprutil - x64 Debug" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Debug" + cd ".\crypto" + +"libaprutil - x64 DebugCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Debug" RECURSE=1 CLEAN + cd ".\crypto" + +!ENDIF + +SOURCE=..\libaprutil.rc + +!IF "$(CFG)" == "apr_crypto_nss - Win32 Release" + + +"$(INTDIR)\apr_crypto_nss-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_crypto_nss-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_crypto_nss" /d "NDEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_crypto_nss - Win32 Debug" + + +"$(INTDIR)\apr_crypto_nss-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_crypto_nss-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_crypto_nss" /d "_DEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_crypto_nss - x64 Release" + + +"$(INTDIR)\apr_crypto_nss-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_crypto_nss-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_crypto_nss" /d "NDEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_crypto_nss - x64 Debug" + + +"$(INTDIR)\apr_crypto_nss-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_crypto_nss-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_crypto_nss" /d "_DEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ENDIF + + +!ENDIF + Index: contrib/apr-util/crypto/apr_crypto_openssl.c =================================================================== --- contrib/apr-util/crypto/apr_crypto_openssl.c +++ contrib/apr-util/crypto/apr_crypto_openssl.c @@ -31,15 +31,27 @@ #if APU_HAVE_CRYPTO #include +#include #include #define LOG_PREFIX "apr_crypto_openssl: " +#ifndef APR_USE_OPENSSL_PRE_1_1_API +#if defined(LIBRESSL_VERSION_NUMBER) +/* LibreSSL declares OPENSSL_VERSION_NUMBER == 2.0 but does not include most + * changes from OpenSSL >= 1.1 (new functions, macros, deprecations, ...), so + * we have to work around this... + */ +#define APR_USE_OPENSSL_PRE_1_1_API (1) +#else +#define APR_USE_OPENSSL_PRE_1_1_API (OPENSSL_VERSION_NUMBER < 0x10100000L) +#endif +#endif + struct apr_crypto_t { apr_pool_t *pool; const apr_crypto_driver_t *provider; apu_err_t *result; - apr_array_header_t *keys; apr_crypto_config_t *config; apr_hash_t *types; apr_hash_t *modes; @@ -64,20 +76,27 @@ apr_pool_t *pool; const apr_crypto_driver_t *provider; const apr_crypto_t *f; - EVP_CIPHER_CTX cipherCtx; + EVP_CIPHER_CTX *cipherCtx; int initialised; int ivSize; int blockSize; int doPad; }; -static int key_3des_192 = APR_KEY_3DES_192; -static int key_aes_128 = APR_KEY_AES_128; -static int key_aes_192 = APR_KEY_AES_192; -static int key_aes_256 = APR_KEY_AES_256; +static struct apr_crypto_block_key_type_t key_types[] = +{ +{ APR_KEY_3DES_192, 24, 8, 8 }, +{ APR_KEY_AES_128, 16, 16, 16 }, +{ APR_KEY_AES_192, 24, 16, 16 }, +{ APR_KEY_AES_256, 32, 16, 16 } }; + +static struct apr_crypto_block_key_mode_t key_modes[] = +{ +{ APR_MODE_ECB }, +{ APR_MODE_CBC } }; -static int mode_ecb = APR_MODE_ECB; -static int mode_cbc = APR_MODE_CBC; +/* sufficient space to wrap a key */ +#define BUFFER_SIZE 128 /** * Fetch the most recent error from this driver. @@ -111,7 +130,11 @@ static apr_status_t crypto_init(apr_pool_t *pool, const char *params, const apu_err_t **result) { - CRYPTO_malloc_init(); +#if APR_USE_OPENSSL_PRE_1_1_API + (void)CRYPTO_malloc_init(); +#else + OPENSSL_malloc_init(); +#endif ERR_load_crypto_strings(); /* SSL_load_error_strings(); */ OpenSSL_add_all_algorithms(); @@ -124,6 +147,30 @@ return APR_SUCCESS; } +#if OPENSSL_VERSION_NUMBER < 0x0090802fL + +/* Code taken from OpenSSL 0.9.8b, see + * https://github.com/openssl/openssl/commit/cf6bc84148cb15af09b292394aaf2b45f0d5af0d + */ + +EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void) +{ + EVP_CIPHER_CTX *ctx = OPENSSL_malloc(sizeof *ctx); + if (ctx) + EVP_CIPHER_CTX_init(ctx); + return ctx; +} + +void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx) +{ + if (ctx) { + EVP_CIPHER_CTX_cleanup(ctx); + OPENSSL_free(ctx); + } +} + +#endif + /** * @brief Clean encryption / decryption context. * @note After cleanup, a context is free to be reused if necessary. @@ -134,7 +181,7 @@ { if (ctx->initialised) { - EVP_CIPHER_CTX_cleanup(&ctx->cipherCtx); + EVP_CIPHER_CTX_free(ctx->cipherCtx); ctx->initialised = 0; } @@ -256,26 +303,21 @@ return APR_ENOMEM; } - f->keys = apr_array_make(pool, 10, sizeof(apr_crypto_key_t)); - if (!f->keys) { - return APR_ENOMEM; - } - f->types = apr_hash_make(pool); if (!f->types) { return APR_ENOMEM; } - apr_hash_set(f->types, "3des192", APR_HASH_KEY_STRING, &(key_3des_192)); - apr_hash_set(f->types, "aes128", APR_HASH_KEY_STRING, &(key_aes_128)); - apr_hash_set(f->types, "aes192", APR_HASH_KEY_STRING, &(key_aes_192)); - apr_hash_set(f->types, "aes256", APR_HASH_KEY_STRING, &(key_aes_256)); + apr_hash_set(f->types, "3des192", APR_HASH_KEY_STRING, &(key_types[0])); + apr_hash_set(f->types, "aes128", APR_HASH_KEY_STRING, &(key_types[1])); + apr_hash_set(f->types, "aes192", APR_HASH_KEY_STRING, &(key_types[2])); + apr_hash_set(f->types, "aes256", APR_HASH_KEY_STRING, &(key_types[3])); f->modes = apr_hash_make(pool); if (!f->modes) { return APR_ENOMEM; } - apr_hash_set(f->modes, "ecb", APR_HASH_KEY_STRING, &(mode_ecb)); - apr_hash_set(f->modes, "cbc", APR_HASH_KEY_STRING, &(mode_cbc)); + apr_hash_set(f->modes, "ecb", APR_HASH_KEY_STRING, &(key_modes[0])); + apr_hash_set(f->modes, "cbc", APR_HASH_KEY_STRING, &(key_modes[1])); apr_pool_cleanup_register(pool, f, crypto_cleanup_helper, apr_pool_cleanup_null); @@ -298,7 +340,7 @@ /** * @brief Get a hash table of key types, keyed by the name of the type against - * an integer pointer constant. + * a pointer to apr_crypto_block_key_type_t. * * @param types - hashtable of key types keyed to constants. * @param f - encryption context @@ -313,7 +355,7 @@ /** * @brief Get a hash table of key modes, keyed by the name of the mode against - * an integer pointer constant. + * a pointer to apr_crypto_block_key_mode_t. * * @param modes - hashtable of key modes keyed to constants. * @param f - encryption context @@ -326,52 +368,13 @@ return APR_SUCCESS; } -/** - * @brief Create a key from the given passphrase. By default, the PBKDF2 - * algorithm is used to generate the key from the passphrase. It is expected - * that the same pass phrase will generate the same key, regardless of the - * backend crypto platform used. The key is cleaned up when the context - * is cleaned, and may be reused with multiple encryption or decryption - * operations. - * @note If *key is NULL, a apr_crypto_key_t will be created from a pool. If - * *key is not NULL, *key must point at a previously created structure. - * @param key The key returned, see note. - * @param ivSize The size of the initialisation vector will be returned, based - * on whether an IV is relevant for this type of crypto. - * @param pass The passphrase to use. - * @param passLen The passphrase length in bytes - * @param salt The salt to use. - * @param saltLen The salt length in bytes - * @param type 3DES_192, AES_128, AES_192, AES_256. - * @param mode Electronic Code Book / Cipher Block Chaining. - * @param doPad Pad if necessary. - * @param iterations Iteration count - * @param f The context to use. - * @param p The pool to use. - * @return Returns APR_ENOKEY if the pass phrase is missing or empty, or if a backend - * error occurred while generating the key. APR_ENOCIPHER if the type or mode - * is not supported by the particular backend. APR_EKEYTYPE if the key type is - * not known. APR_EPADDING if padding was requested but is not supported. - * APR_ENOTIMPL if not implemented. +/* + * Work out which mechanism to use. */ -static apr_status_t crypto_passphrase(apr_crypto_key_t **k, apr_size_t *ivSize, - const char *pass, apr_size_t passLen, const unsigned char * salt, - apr_size_t saltLen, const apr_crypto_block_key_type_e type, - const apr_crypto_block_key_mode_e mode, const int doPad, - const int iterations, const apr_crypto_t *f, apr_pool_t *p) +static apr_status_t crypto_cipher_mechanism(apr_crypto_key_t *key, + const apr_crypto_block_key_type_e type, + const apr_crypto_block_key_mode_e mode, const int doPad, apr_pool_t *p) { - apr_crypto_key_t *key = *k; - - if (!key) { - *k = key = apr_array_push(f->keys); - } - if (!key) { - return APR_ENOMEM; - } - - key->f = f; - key->provider = f->provider; - /* determine the cipher to be used */ switch (type) { @@ -433,6 +436,148 @@ } apr_crypto_clear(p, key->key, key->keyLen); + return APR_SUCCESS; +} + +/** + * @brief Create a key from the provided secret or passphrase. The key is cleaned + * up when the context is cleaned, and may be reused with multiple encryption + * or decryption operations. + * @note If *key is NULL, a apr_crypto_key_t will be created from a pool. If + * *key is not NULL, *key must point at a previously created structure. + * @param key The key returned, see note. + * @param rec The key record, from which the key will be derived. + * @param f The context to use. + * @param p The pool to use. + * @return Returns APR_ENOKEY if the pass phrase is missing or empty, or if a backend + * error occurred while generating the key. APR_ENOCIPHER if the type or mode + * is not supported by the particular backend. APR_EKEYTYPE if the key type is + * not known. APR_EPADDING if padding was requested but is not supported. + * APR_ENOTIMPL if not implemented. + */ +static apr_status_t crypto_key(apr_crypto_key_t **k, + const apr_crypto_key_rec_t *rec, const apr_crypto_t *f, apr_pool_t *p) +{ + apr_crypto_key_t *key = *k; + apr_status_t rv; + + if (!key) { + *k = key = apr_pcalloc(p, sizeof *key); + if (!key) { + return APR_ENOMEM; + } + } + + key->f = f; + key->provider = f->provider; + + /* decide on what cipher mechanism we will be using */ + rv = crypto_cipher_mechanism(key, rec->type, rec->mode, rec->pad, p); + if (APR_SUCCESS != rv) { + return rv; + } + + switch (rec->ktype) { + + case APR_CRYPTO_KTYPE_PASSPHRASE: { + + /* generate the key */ + if (PKCS5_PBKDF2_HMAC_SHA1(rec->k.passphrase.pass, + rec->k.passphrase.passLen, + (unsigned char *) rec->k.passphrase.salt, + rec->k.passphrase.saltLen, rec->k.passphrase.iterations, + key->keyLen, key->key) == 0) { + return APR_ENOKEY; + } + + break; + } + + case APR_CRYPTO_KTYPE_SECRET: { + + /* sanity check - key correct size? */ + if (rec->k.secret.secretLen != key->keyLen) { + return APR_EKEYLENGTH; + } + + /* copy the key */ + memcpy(key->key, rec->k.secret.secret, rec->k.secret.secretLen); + + break; + } + + default: { + + return APR_ENOKEY; + + } + } + + key->doPad = rec->pad; + + /* note: openssl incorrectly returns non zero IV size values for ECB + * algorithms, so work around this by ignoring the IV size. + */ + if (APR_MODE_ECB != rec->mode) { + key->ivSize = EVP_CIPHER_iv_length(key->cipher); + } + + return APR_SUCCESS; +} + +/** + * @brief Create a key from the given passphrase. By default, the PBKDF2 + * algorithm is used to generate the key from the passphrase. It is expected + * that the same pass phrase will generate the same key, regardless of the + * backend crypto platform used. The key is cleaned up when the context + * is cleaned, and may be reused with multiple encryption or decryption + * operations. + * @note If *key is NULL, a apr_crypto_key_t will be created from a pool. If + * *key is not NULL, *key must point at a previously created structure. + * @param key The key returned, see note. + * @param ivSize The size of the initialisation vector will be returned, based + * on whether an IV is relevant for this type of crypto. + * @param pass The passphrase to use. + * @param passLen The passphrase length in bytes + * @param salt The salt to use. + * @param saltLen The salt length in bytes + * @param type 3DES_192, AES_128, AES_192, AES_256. + * @param mode Electronic Code Book / Cipher Block Chaining. + * @param doPad Pad if necessary. + * @param iterations Iteration count + * @param f The context to use. + * @param p The pool to use. + * @return Returns APR_ENOKEY if the pass phrase is missing or empty, or if a backend + * error occurred while generating the key. APR_ENOCIPHER if the type or mode + * is not supported by the particular backend. APR_EKEYTYPE if the key type is + * not known. APR_EPADDING if padding was requested but is not supported. + * APR_ENOTIMPL if not implemented. + */ +static apr_status_t crypto_passphrase(apr_crypto_key_t **k, apr_size_t *ivSize, + const char *pass, apr_size_t passLen, const unsigned char * salt, + apr_size_t saltLen, const apr_crypto_block_key_type_e type, + const apr_crypto_block_key_mode_e mode, const int doPad, + const int iterations, const apr_crypto_t *f, apr_pool_t *p) +{ + apr_crypto_key_t *key = *k; + apr_status_t rv; + + if (!key) { + *k = key = apr_pcalloc(p, sizeof *key); + if (!key) { + return APR_ENOMEM; + } + } + + key->f = f; + key->provider = f->provider; + + /* decide on what cipher mechanism we will be using */ + rv = crypto_cipher_mechanism(key, type, mode, doPad, p); + if (APR_SUCCESS != rv) { + return rv; + } + /* generate the key */ if (PKCS5_PBKDF2_HMAC_SHA1(pass, passLen, (unsigned char *) salt, saltLen, iterations, key->keyLen, key->key) == 0) { @@ -491,8 +636,10 @@ apr_pool_cleanup_null); /* create a new context for encryption */ - EVP_CIPHER_CTX_init(&block->cipherCtx); - block->initialised = 1; + if (!block->initialised) { + block->cipherCtx = EVP_CIPHER_CTX_new(); + block->initialised = 1; + } /* generate an IV, if necessary */ usedIv = NULL; @@ -519,16 +666,16 @@ /* set up our encryption context */ #if CRYPTO_OPENSSL_CONST_BUFFERS - if (!EVP_EncryptInit_ex(&block->cipherCtx, key->cipher, config->engine, + if (!EVP_EncryptInit_ex(block->cipherCtx, key->cipher, config->engine, key->key, usedIv)) { #else - if (!EVP_EncryptInit_ex(&block->cipherCtx, key->cipher, config->engine, (unsigned char *) key->key, (unsigned char *) usedIv)) { + if (!EVP_EncryptInit_ex(block->cipherCtx, key->cipher, config->engine, (unsigned char *) key->key, (unsigned char *) usedIv)) { #endif return APR_EINIT; } /* Clear up any read padding */ - if (!EVP_CIPHER_CTX_set_padding(&block->cipherCtx, key->doPad)) { + if (!EVP_CIPHER_CTX_set_padding(block->cipherCtx, key->doPad)) { return APR_EPADDING; } @@ -582,10 +729,15 @@ } #if CRYPT_OPENSSL_CONST_BUFFERS - if (!EVP_EncryptUpdate(&ctx->cipherCtx, (*out), &outl, in, inlen)) { + if (!EVP_EncryptUpdate(ctx->cipherCtx, (*out), &outl, in, inlen)) { #else - if (!EVP_EncryptUpdate(&ctx->cipherCtx, (*out), &outl, + if (!EVP_EncryptUpdate(ctx->cipherCtx, (*out), &outl, (unsigned char *) in, inlen)) { +#endif +#if APR_USE_OPENSSL_PRE_1_1_API + EVP_CIPHER_CTX_cleanup(ctx->cipherCtx); +#else + EVP_CIPHER_CTX_reset(ctx->cipherCtx); #endif return APR_ECRYPT; } @@ -616,14 +768,22 @@ static apr_status_t crypto_block_encrypt_finish(unsigned char *out, apr_size_t *outlen, apr_crypto_block_t *ctx) { + apr_status_t rc = APR_SUCCESS; int len = *outlen; - if (EVP_EncryptFinal_ex(&ctx->cipherCtx, out, &len) == 0) { - return APR_EPADDING; + if (EVP_EncryptFinal_ex(ctx->cipherCtx, out, &len) == 0) { + rc = APR_EPADDING; + } + else { + *outlen = len; } - *outlen = len; +#if APR_USE_OPENSSL_PRE_1_1_API + EVP_CIPHER_CTX_cleanup(ctx->cipherCtx); +#else + EVP_CIPHER_CTX_reset(ctx->cipherCtx); +#endif - return APR_SUCCESS; + return rc; } @@ -662,8 +822,10 @@ apr_pool_cleanup_null); /* create a new context for encryption */ - EVP_CIPHER_CTX_init(&block->cipherCtx); - block->initialised = 1; + if (!block->initialised) { + block->cipherCtx = EVP_CIPHER_CTX_new(); + block->initialised = 1; + } /* generate an IV, if necessary */ if (key->ivSize) { @@ -674,16 +836,16 @@ /* set up our encryption context */ #if CRYPTO_OPENSSL_CONST_BUFFERS - if (!EVP_DecryptInit_ex(&block->cipherCtx, key->cipher, config->engine, + if (!EVP_DecryptInit_ex(block->cipherCtx, key->cipher, config->engine, key->key, iv)) { #else - if (!EVP_DecryptInit_ex(&block->cipherCtx, key->cipher, config->engine, (unsigned char *) key->key, (unsigned char *) iv)) { + if (!EVP_DecryptInit_ex(block->cipherCtx, key->cipher, config->engine, (unsigned char *) key->key, (unsigned char *) iv)) { #endif return APR_EINIT; } /* Clear up any read padding */ - if (!EVP_CIPHER_CTX_set_padding(&block->cipherCtx, key->doPad)) { + if (!EVP_CIPHER_CTX_set_padding(block->cipherCtx, key->doPad)) { return APR_EPADDING; } @@ -737,10 +899,15 @@ } #if CRYPT_OPENSSL_CONST_BUFFERS - if (!EVP_DecryptUpdate(&ctx->cipherCtx, *out, &outl, in, inlen)) { + if (!EVP_DecryptUpdate(ctx->cipherCtx, *out, &outl, in, inlen)) { #else - if (!EVP_DecryptUpdate(&ctx->cipherCtx, *out, &outl, (unsigned char *) in, + if (!EVP_DecryptUpdate(ctx->cipherCtx, *out, &outl, (unsigned char *) in, inlen)) { +#endif +#if APR_USE_OPENSSL_PRE_1_1_API + EVP_CIPHER_CTX_cleanup(ctx->cipherCtx); +#else + EVP_CIPHER_CTX_reset(ctx->cipherCtx); #endif return APR_ECRYPT; } @@ -771,15 +938,22 @@ static apr_status_t crypto_block_decrypt_finish(unsigned char *out, apr_size_t *outlen, apr_crypto_block_t *ctx) { - + apr_status_t rc = APR_SUCCESS; int len = *outlen; - if (EVP_DecryptFinal_ex(&ctx->cipherCtx, out, &len) == 0) { - return APR_EPADDING; + if (EVP_DecryptFinal_ex(ctx->cipherCtx, out, &len) == 0) { + rc = APR_EPADDING; + } + else { + *outlen = len; } - *outlen = len; +#if APR_USE_OPENSSL_PRE_1_1_API + EVP_CIPHER_CTX_cleanup(ctx->cipherCtx); +#else + EVP_CIPHER_CTX_reset(ctx->cipherCtx); +#endif - return APR_SUCCESS; + return rc; } @@ -792,7 +966,8 @@ crypto_block_encrypt_init, crypto_block_encrypt, crypto_block_encrypt_finish, crypto_block_decrypt_init, crypto_block_decrypt, crypto_block_decrypt_finish, - crypto_block_cleanup, crypto_cleanup, crypto_shutdown, crypto_error + crypto_block_cleanup, crypto_cleanup, crypto_shutdown, crypto_error, + crypto_key }; #endif Index: contrib/apr-util/crypto/apr_crypto_openssl.dep =================================================================== --- /dev/null +++ contrib/apr-util/crypto/apr_crypto_openssl.dep @@ -0,0 +1,14 @@ +# Microsoft Developer Studio Generated Dependency File, included by apr_crypto_openssl.mak + +.\apr_crypto_openssl.c : \ + "..\include\apr_buckets.h"\ + "..\include\apr_crypto.h"\ + "..\include\apu.h"\ + "..\include\apu_errno.h"\ + "..\include\private\apr_crypto_internal.h"\ + + +..\libaprutil.rc : \ + "..\include\apu.h"\ + "..\include\apu_version.h"\ + Index: contrib/apr-util/crypto/apr_crypto_openssl.dsp =================================================================== --- /dev/null +++ contrib/apr-util/crypto/apr_crypto_openssl.dsp @@ -0,0 +1,203 @@ +# Microsoft Developer Studio Project File - Name="apr_crypto_openssl" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=apr_crypto_openssl - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "apr_crypto_openssl.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "apr_crypto_openssl.mak" CFG="apr_crypto_openssl - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "apr_crypto_openssl - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_crypto_openssl - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_crypto_openssl - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_crypto_openssl - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "apr_crypto_openssl - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /I "../../openssl/inc32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_OPENSSL=1 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_crypto_openssl_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 /fo"Release/apr_crypto_openssl-1.res" /d DLL_NAME="apr_crypto_openssl" /d "NDEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libeay32.lib ssleay32.lib /libpath:..\..\openssl\out32dll /nologo /base:"0x6F100000" /subsystem:windows /MACHINE:X86 /dll /incremental:no /debug /opt:ref +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libeay32.lib ssleay32.lib /nologo /libpath:..\..\openssl\out32dll /base:"0x6F100000" /subsystem:windows /MACHINE:X86 /dll /incremental:no /debug /out:"Release\apr_crypto_openssl-1.dll" /pdb:"Release\apr_crypto_openssl-1.pdb" /implib:"Release\apr_crypto_openssl-1.lib" /opt:ref +# Begin Special Build Tool +TargetPath=Release\apr_crypto_openssl-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)" == "apr_crypto_openssl - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /I "../../openssl/inc32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_OPENSSL=1 /D /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_crypto_openssl_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 /fo"Debug/apr_crypto_openssl-1.res" /d DLL_NAME="apr_crypto_openssl" /d "_DEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libeay32.lib ssleay32.lib /nologo /libpath:..\..\openssl\out32dll /base:"0x6F100000" /subsystem:windows /MACHINE:X86 /dll /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libeay32.lib ssleay32.lib /nologo /libpath:..\..\openssl\out32dll /base:"0x6F100000" /subsystem:windows /MACHINE:X86 /dll /incremental:no /debug /out:"Debug\apr_crypto_openssl-1.dll" /pdb:"Debug\apr_crypto_openssl-1.pdb" /implib:"Debug\apr_crypto_openssl-1.lib" +# Begin Special Build Tool +TargetPath=Debug\apr_crypto_openssl-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)" == "apr_crypto_openssl - x64 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "x64\Release" +# PROP BASE Intermediate_Dir "x64\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "x64\Release" +# PROP Intermediate_Dir "x64\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "WIN64" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /I "../../openssl/inc32" /D "NDEBUG" /D "WIN32" /D "WIN64" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_OPENSSL=1 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_crypto_openssl_src" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /x64 "NUL" +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /x64 "NUL" +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /fo"x64\Release/apr_crypto_openssl-1.res" /d DLL_NAME="apr_crypto_openssl" /d "NDEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libeay32.lib ssleay32.lib /nologo /libpath:..\..\openssl\out32dll /base:"0x6F100000" /subsystem:windows /machine:X64 /dll /incremental:no /debug /opt:ref +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libeay32.lib ssleay32.lib /nologo /libpath:..\..\openssl\out32dll /base:"0x6F100000" /subsystem:windows /machine:X64 /dll /incremental:no /debug /out:"x64\Release\apr_crypto_openssl-1.dll" /pdb:"x64\Release\apr_crypto_openssl-1.pdb" /implib:"x64\Release\apr_crypto_openssl-1.lib" /opt:ref +# Begin Special Build Tool +TargetPath=x64\Release\apr_crypto_openssl-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)" == "apr_crypto_openssl - x64 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "x64\Debug" +# PROP BASE Intermediate_Dir "x64\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "x64\Debug" +# PROP Intermediate_Dir "x64\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "WIN64" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /I "../../openssl/inc32" /D "_DEBUG" /D "WIN32" /D "WIN64" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_OPENSSL=1 /D /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_crypto_openssl_src" /FD /EHsc /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /x64 "NUL" +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /x64 "NUL" +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /fo"x64\Debug/apr_crypto_openssl-1.res" /d DLL_NAME="apr_crypto_openssl" /d "_DEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libeay32.lib ssleay32.lib /nologo /libpath:..\..\openssl\out32dll /base:"0x6F100000" /subsystem:windows /machine:X64 /dll /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libeay32.lib ssleay32.lib /nologo /libpath:..\..\openssl\out32dll /base:"0x6F100000" /subsystem:windows /machine:X64 /dll /incremental:no /debug /out:"x64\Debug\apr_crypto_openssl-1.dll" /pdb:"x64\Debug\apr_crypto_openssl-1.pdb" /implib:"x64\Debug\apr_crypto_openssl-1.lib" +# Begin Special Build Tool +TargetPath=x64\Debug\apr_crypto_openssl-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 + +!ENDIF + +# Begin Target + +# Name "apr_crypto_openssl - Win32 Release" +# Name "apr_crypto_openssl - Win32 Debug" +# Name "apr_crypto_openssl - x64 Release" +# Name "apr_crypto_openssl - x64 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\apr_crypto_openssl.c +# End Source File +# End Group +# Begin Group "Public Header Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\include\apr_crypto.h +# End Source File +# End Group +# Begin Group "Internal Header Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\include\private\apu_config.h +# End Source File +# Begin Source File + +SOURCE=..\include\private\apu_internal.h +# End Source File +# End Group +# Begin Source File + +SOURCE=..\libaprutil.rc +# End Source File +# End Target +# End Project Index: contrib/apr-util/crypto/apr_crypto_openssl.mak =================================================================== --- /dev/null +++ contrib/apr-util/crypto/apr_crypto_openssl.mak @@ -0,0 +1,606 @@ +# Microsoft Developer Studio Generated NMAKE File, Based on apr_crypto_openssl.dsp +!IF "$(CFG)" == "" +CFG=apr_crypto_openssl - Win32 Release +!MESSAGE No configuration specified. Defaulting to apr_crypto_openssl - Win32 Release. +!ENDIF + +!IF "$(CFG)" != "apr_crypto_openssl - Win32 Release" && "$(CFG)" != "apr_crypto_openssl - Win32 Debug" && "$(CFG)" != "apr_crypto_openssl - x64 Release" && "$(CFG)" != "apr_crypto_openssl - 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: +!MESSAGE +!MESSAGE NMAKE /f "apr_crypto_openssl.mak" CFG="apr_crypto_openssl - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "apr_crypto_openssl - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_crypto_openssl - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_crypto_openssl - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_crypto_openssl - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +!IF "$(_HAVE_OSSL110)" == "1" +SSLCRP=libcrypto +SSLLIB=libssl +SSLINC=/I ../../openssl/include +SSLBIN=/libpath:../../openssl +!ELSE +SSLCRP=libeay32 +SSLLIB=ssleay32 +SSLINC=/I ../../openssl/inc32 +SSLBIN=/libpath:../../openssl/out32dll +!ENDIF + +!IF "$(CFG)" == "apr_crypto_openssl - Win32 Release" + +OUTDIR=.\Release +INTDIR=.\Release +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_crypto_openssl-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\apr_crypto_openssl-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_crypto_openssl-1.res" + -@erase "$(INTDIR)\apr_crypto_openssl.obj" + -@erase "$(INTDIR)\apr_crypto_openssl_src.idb" + -@erase "$(INTDIR)\apr_crypto_openssl_src.pdb" + -@erase "$(OUTDIR)\apr_crypto_openssl-1.dll" + -@erase "$(OUTDIR)\apr_crypto_openssl-1.exp" + -@erase "$(OUTDIR)\apr_crypto_openssl-1.lib" + -@erase "$(OUTDIR)\apr_crypto_openssl-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" $(SSLINC) /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_OPENSSL=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_crypto_openssl_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)\apr_crypto_openssl-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_crypto_openssl" /d "NDEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_crypto_openssl.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib $(SSLCRP).lib $(SSLLIB).lib /nologo /base:"0x6F100000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_crypto_openssl-1.pdb" /debug /out:"$(OUTDIR)\apr_crypto_openssl-1.dll" /implib:"$(OUTDIR)\apr_crypto_openssl-1.lib" $(SSLBIN) /opt:ref +LINK32_OBJS= \ + "$(INTDIR)\apr_crypto_openssl.obj" \ + "$(INTDIR)\apr_crypto_openssl-1.res" \ + "..\..\apr\Release\libapr-1.lib" \ + "..\Release\libaprutil-1.lib" + +"$(OUTDIR)\apr_crypto_openssl-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Release\apr_crypto_openssl-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_crypto_openssl-1.dll" + if exist .\Release\apr_crypto_openssl-1.dll.manifest mt.exe -manifest .\Release\apr_crypto_openssl-1.dll.manifest -outputresource:.\Release\apr_crypto_openssl-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_crypto_openssl - Win32 Debug" + +OUTDIR=.\Debug +INTDIR=.\Debug +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_crypto_openssl-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\apr_crypto_openssl-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_crypto_openssl-1.res" + -@erase "$(INTDIR)\apr_crypto_openssl.obj" + -@erase "$(INTDIR)\apr_crypto_openssl_src.idb" + -@erase "$(INTDIR)\apr_crypto_openssl_src.pdb" + -@erase "$(OUTDIR)\apr_crypto_openssl-1.dll" + -@erase "$(OUTDIR)\apr_crypto_openssl-1.exp" + -@erase "$(OUTDIR)\apr_crypto_openssl-1.lib" + -@erase "$(OUTDIR)\apr_crypto_openssl-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" $(SSLINC) /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_OPENSSL=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_crypto_openssl_src" /FD /D /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)\apr_crypto_openssl-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_crypto_openssl" /d "_DEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_crypto_openssl.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib $(SSLCRP).lib $(SSLLIB).lib /nologo /base:"0x6F100000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_crypto_openssl-1.pdb" /debug /out:"$(OUTDIR)\apr_crypto_openssl-1.dll" /implib:"$(OUTDIR)\apr_crypto_openssl-1.lib" $(SSLBIN) +LINK32_OBJS= \ + "$(INTDIR)\apr_crypto_openssl.obj" \ + "$(INTDIR)\apr_crypto_openssl-1.res" \ + "..\..\apr\Debug\libapr-1.lib" \ + "..\Debug\libaprutil-1.lib" + +"$(OUTDIR)\apr_crypto_openssl-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Debug\apr_crypto_openssl-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_crypto_openssl-1.dll" + if exist .\Debug\apr_crypto_openssl-1.dll.manifest mt.exe -manifest .\Debug\apr_crypto_openssl-1.dll.manifest -outputresource:.\Debug\apr_crypto_openssl-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_crypto_openssl - x64 Release" + +OUTDIR=.\x64\Release +INTDIR=.\x64\Release +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\x64\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_crypto_openssl-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - x64 Release" "libapr - x64 Release" "$(OUTDIR)\apr_crypto_openssl-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - x64 ReleaseCLEAN" "libaprutil - x64 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_crypto_openssl-1.res" + -@erase "$(INTDIR)\apr_crypto_openssl.obj" + -@erase "$(INTDIR)\apr_crypto_openssl_src.idb" + -@erase "$(INTDIR)\apr_crypto_openssl_src.pdb" + -@erase "$(OUTDIR)\apr_crypto_openssl-1.dll" + -@erase "$(OUTDIR)\apr_crypto_openssl-1.exp" + -@erase "$(OUTDIR)\apr_crypto_openssl-1.lib" + -@erase "$(OUTDIR)\apr_crypto_openssl-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" $(SSLINC) /D "NDEBUG" /D "WIN32" /D "WIN64" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_OPENSSL=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_crypto_openssl_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 /x64 "NUL" +RSC=rc.exe +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\apr_crypto_openssl-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_crypto_openssl" /d "NDEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_crypto_openssl.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib $(SSLCRP).lib $(SSLLIB).lib /nologo /base:"0x6F100000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_crypto_openssl-1.pdb" /debug /out:"$(OUTDIR)\apr_crypto_openssl-1.dll" /implib:"$(OUTDIR)\apr_crypto_openssl-1.lib" $(SSLBIN) /opt:ref +LINK32_OBJS= \ + "$(INTDIR)\apr_crypto_openssl.obj" \ + "$(INTDIR)\apr_crypto_openssl-1.res" \ + "..\..\apr\x64\Release\libapr-1.lib" \ + "..\x64\Release\libaprutil-1.lib" + +"$(OUTDIR)\apr_crypto_openssl-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\x64\Release\apr_crypto_openssl-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\x64\Release +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_crypto_openssl-1.dll" + if exist .\x64\Release\apr_crypto_openssl-1.dll.manifest mt.exe -manifest .\x64\Release\apr_crypto_openssl-1.dll.manifest -outputresource:.\x64\Release\apr_crypto_openssl-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_crypto_openssl - x64 Debug" + +OUTDIR=.\x64\Debug +INTDIR=.\x64\Debug +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\x64\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_crypto_openssl-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - x64 Debug" "libapr - x64 Debug" "$(OUTDIR)\apr_crypto_openssl-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - x64 DebugCLEAN" "libaprutil - x64 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_crypto_openssl-1.res" + -@erase "$(INTDIR)\apr_crypto_openssl.obj" + -@erase "$(INTDIR)\apr_crypto_openssl_src.idb" + -@erase "$(INTDIR)\apr_crypto_openssl_src.pdb" + -@erase "$(OUTDIR)\apr_crypto_openssl-1.dll" + -@erase "$(OUTDIR)\apr_crypto_openssl-1.exp" + -@erase "$(OUTDIR)\apr_crypto_openssl-1.lib" + -@erase "$(OUTDIR)\apr_crypto_openssl-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" $(SSLINC) /D "_DEBUG" /D "WIN32" /D "WIN64" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_OPENSSL=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_crypto_openssl_src" /FD /D /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 /x64 "NUL" +RSC=rc.exe +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\apr_crypto_openssl-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_crypto_openssl" /d "_DEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_crypto_openssl.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib $(SSLCRP).lib $(SSLLIB).lib /nologo /base:"0x6F100000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_crypto_openssl-1.pdb" /debug /out:"$(OUTDIR)\apr_crypto_openssl-1.dll" /implib:"$(OUTDIR)\apr_crypto_openssl-1.lib" $(SSLBIN) +LINK32_OBJS= \ + "$(INTDIR)\apr_crypto_openssl.obj" \ + "$(INTDIR)\apr_crypto_openssl-1.res" \ + "..\..\apr\x64\Debug\libapr-1.lib" \ + "..\x64\Debug\libaprutil-1.lib" + +"$(OUTDIR)\apr_crypto_openssl-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\x64\Debug\apr_crypto_openssl-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\x64\Debug +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_crypto_openssl-1.dll" + if exist .\x64\Debug\apr_crypto_openssl-1.dll.manifest mt.exe -manifest .\x64\Debug\apr_crypto_openssl-1.dll.manifest -outputresource:.\x64\Debug\apr_crypto_openssl-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ENDIF + + +!IF "$(NO_EXTERNAL_DEPS)" != "1" +!IF EXISTS("apr_crypto_openssl.dep") +!INCLUDE "apr_crypto_openssl.dep" +!ELSE +!MESSAGE Warning: cannot find "apr_crypto_openssl.dep" +!ENDIF +!ENDIF + + +!IF "$(CFG)" == "apr_crypto_openssl - Win32 Release" || "$(CFG)" == "apr_crypto_openssl - Win32 Debug" || "$(CFG)" == "apr_crypto_openssl - x64 Release" || "$(CFG)" == "apr_crypto_openssl - x64 Debug" +SOURCE=.\apr_crypto_openssl.c + +"$(INTDIR)\apr_crypto_openssl.obj" : $(SOURCE) "$(INTDIR)" + + +!IF "$(CFG)" == "apr_crypto_openssl - Win32 Release" + +"libapr - Win32 Release" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" + cd "..\apr-util\crypto" + +"libapr - Win32 ReleaseCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN + cd "..\apr-util\crypto" + +!ELSEIF "$(CFG)" == "apr_crypto_openssl - Win32 Debug" + +"libapr - Win32 Debug" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" + cd "..\apr-util\crypto" + +"libapr - Win32 DebugCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN + cd "..\apr-util\crypto" + +!ELSEIF "$(CFG)" == "apr_crypto_openssl - x64 Release" + +"libapr - x64 Release" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Release" + cd "..\apr-util\crypto" + +"libapr - x64 ReleaseCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Release" RECURSE=1 CLEAN + cd "..\apr-util\crypto" + +!ELSEIF "$(CFG)" == "apr_crypto_openssl - x64 Debug" + +"libapr - x64 Debug" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Debug" + cd "..\apr-util\crypto" + +"libapr - x64 DebugCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Debug" RECURSE=1 CLEAN + cd "..\apr-util\crypto" + +!ENDIF + +!IF "$(CFG)" == "apr_crypto_openssl - Win32 Release" + +"libaprutil - Win32 Release" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" + cd ".\crypto" + +"libaprutil - Win32 ReleaseCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN + cd ".\crypto" + +!ELSEIF "$(CFG)" == "apr_crypto_openssl - Win32 Debug" + +"libaprutil - Win32 Debug" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" + cd ".\crypto" + +"libaprutil - Win32 DebugCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN + cd ".\crypto" + +!ELSEIF "$(CFG)" == "apr_crypto_openssl - x64 Release" + +"libaprutil - x64 Release" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Release" + cd ".\crypto" + +"libaprutil - x64 ReleaseCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Release" RECURSE=1 CLEAN + cd ".\crypto" + +!ELSEIF "$(CFG)" == "apr_crypto_openssl - x64 Debug" + +"libaprutil - x64 Debug" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Debug" + cd ".\crypto" + +"libaprutil - x64 DebugCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Debug" RECURSE=1 CLEAN + cd ".\crypto" + +!ENDIF + +SOURCE=..\libaprutil.rc + +!IF "$(CFG)" == "apr_crypto_openssl - Win32 Release" + + +"$(INTDIR)\apr_crypto_openssl-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_crypto_openssl-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_crypto_openssl" /d "NDEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_crypto_openssl - Win32 Debug" + + +"$(INTDIR)\apr_crypto_openssl-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_crypto_openssl-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_crypto_openssl" /d "_DEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_crypto_openssl - x64 Release" + + +"$(INTDIR)\apr_crypto_openssl-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_crypto_openssl-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_crypto_openssl" /d "NDEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_crypto_openssl - x64 Debug" + + +"$(INTDIR)\apr_crypto_openssl-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_crypto_openssl-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_crypto_openssl" /d "_DEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ENDIF + + +!ENDIF + Index: contrib/apr-util/crypto/apr_siphash.c =================================================================== --- /dev/null +++ contrib/apr-util/crypto/apr_siphash.c @@ -0,0 +1,196 @@ +/* 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. + */ + +/* + * SipHash (C reference implementation, APR-ized), originating from: + * https://131002.net/siphash/siphash24.c. + */ + +#include "apr_siphash.h" + +#define ROTL64(x, n) (((x) << (n)) | ((x) >> (64 - (n)))) + +#define U8TO64_LE(p) \ + (((apr_uint64_t)((p)[0]) ) | \ + ((apr_uint64_t)((p)[1]) << 8) | \ + ((apr_uint64_t)((p)[2]) << 16) | \ + ((apr_uint64_t)((p)[3]) << 24) | \ + ((apr_uint64_t)((p)[4]) << 32) | \ + ((apr_uint64_t)((p)[5]) << 40) | \ + ((apr_uint64_t)((p)[6]) << 48) | \ + ((apr_uint64_t)((p)[7]) << 56)) + +#define U64TO8_LE(p, v) \ +do { \ + (p)[0] = (unsigned char)((v) ); \ + (p)[1] = (unsigned char)((v) >> 8); \ + (p)[2] = (unsigned char)((v) >> 16); \ + (p)[3] = (unsigned char)((v) >> 24); \ + (p)[4] = (unsigned char)((v) >> 32); \ + (p)[5] = (unsigned char)((v) >> 40); \ + (p)[6] = (unsigned char)((v) >> 48); \ + (p)[7] = (unsigned char)((v) >> 56); \ +} while (0) + +#define SIPROUND() \ +do { \ + v0 += v1; v1=ROTL64(v1,13); v1 ^= v0; v0=ROTL64(v0,32); \ + v2 += v3; v3=ROTL64(v3,16); v3 ^= v2; \ + v0 += v3; v3=ROTL64(v3,21); v3 ^= v0; \ + v2 += v1; v1=ROTL64(v1,17); v1 ^= v2; v2=ROTL64(v2,32); \ +} while(0) + +#define SIPHASH(r, s, n, k) \ +do { \ + const unsigned char *ptr, *end; \ + apr_uint64_t v0, v1, v2, v3, m; \ + apr_uint64_t k0, k1; \ + unsigned int rem; \ + \ + k0 = U8TO64_LE(k + 0); \ + k1 = U8TO64_LE(k + 8); \ + v3 = k1 ^ (apr_uint64_t)0x7465646279746573ULL; \ + v2 = k0 ^ (apr_uint64_t)0x6c7967656e657261ULL; \ + v1 = k1 ^ (apr_uint64_t)0x646f72616e646f6dULL; \ + v0 = k0 ^ (apr_uint64_t)0x736f6d6570736575ULL; \ + \ + rem = (unsigned int)(n & 0x7); \ + for (ptr = s, end = ptr + n - rem; ptr < end; ptr += 8) { \ + m = U8TO64_LE(ptr); \ + v3 ^= m; \ + cROUNDS \ + v0 ^= m; \ + } \ + m = (apr_uint64_t)(n & 0xff) << 56; \ + switch (rem) { \ + case 7: m |= (apr_uint64_t)ptr[6] << 48; \ + case 6: m |= (apr_uint64_t)ptr[5] << 40; \ + case 5: m |= (apr_uint64_t)ptr[4] << 32; \ + case 4: m |= (apr_uint64_t)ptr[3] << 24; \ + case 3: m |= (apr_uint64_t)ptr[2] << 16; \ + case 2: m |= (apr_uint64_t)ptr[1] << 8; \ + case 1: m |= (apr_uint64_t)ptr[0]; \ + case 0: break; \ + } \ + v3 ^= m; \ + cROUNDS \ + v0 ^= m; \ + \ + v2 ^= 0xff; \ + dROUNDS \ + \ + r = v0 ^ v1 ^ v2 ^ v3; \ +} while (0) + +APU_DECLARE(apr_uint64_t) apr_siphash(const void *src, apr_size_t len, + const unsigned char key[APR_SIPHASH_KSIZE], + unsigned int c, unsigned int d) +{ + apr_uint64_t h; + unsigned int i; + +#undef cROUNDS +#define cROUNDS \ + for (i = 0; i < c; ++i) { \ + SIPROUND(); \ + } + +#undef dROUNDS +#define dROUNDS \ + for (i = 0; i < d; ++i) { \ + SIPROUND(); \ + } + + SIPHASH(h, src, len, key); + return h; +} + +APU_DECLARE(void) apr_siphash_auth(unsigned char out[APR_SIPHASH_DSIZE], + const void *src, apr_size_t len, + const unsigned char key[APR_SIPHASH_KSIZE], + unsigned int c, unsigned int d) +{ + apr_uint64_t h; + h = apr_siphash(src, len, key, c, d); + U64TO8_LE(out, h); +} + +APU_DECLARE(apr_uint64_t) apr_siphash24(const void *src, apr_size_t len, + const unsigned char key[APR_SIPHASH_KSIZE]) +{ + apr_uint64_t h; + +#undef cROUNDS +#define cROUNDS \ + SIPROUND(); \ + SIPROUND(); + +#undef dROUNDS +#define dROUNDS \ + SIPROUND(); \ + SIPROUND(); \ + SIPROUND(); \ + SIPROUND(); + + SIPHASH(h, src, len, key); + return h; +} + +APU_DECLARE(void) apr_siphash24_auth(unsigned char out[APR_SIPHASH_DSIZE], + const void *src, apr_size_t len, + const unsigned char key[APR_SIPHASH_KSIZE]) +{ + apr_uint64_t h; + h = apr_siphash24(src, len, key); + U64TO8_LE(out, h); +} + +APU_DECLARE(apr_uint64_t) apr_siphash48(const void *src, apr_size_t len, + const unsigned char key[APR_SIPHASH_KSIZE]) +{ + apr_uint64_t h; + +#undef cROUNDS +#define cROUNDS \ + SIPROUND(); \ + SIPROUND(); \ + SIPROUND(); \ + SIPROUND(); + +#undef dROUNDS +#define dROUNDS \ + SIPROUND(); \ + SIPROUND(); \ + SIPROUND(); \ + SIPROUND(); \ + SIPROUND(); \ + SIPROUND(); \ + SIPROUND(); \ + SIPROUND(); + + SIPHASH(h, src, len, key); + return h; +} + +APU_DECLARE(void) apr_siphash48_auth(unsigned char out[APR_SIPHASH_DSIZE], + const void *src, apr_size_t len, + const unsigned char key[APR_SIPHASH_KSIZE]) +{ + apr_uint64_t h; + h = apr_siphash48(src, len, key); + U64TO8_LE(out, h); +} + Index: contrib/apr-util/crypto/crypt_blowfish.c =================================================================== --- contrib/apr-util/crypto/crypt_blowfish.c +++ contrib/apr-util/crypto/crypt_blowfish.c @@ -675,9 +675,9 @@ setting[2] < 'a' || setting[2] > 'z' || !flags_by_subtype[(unsigned int)(unsigned char)setting[2] - 'a'] || setting[3] != '$' || - setting[4] < '0' || setting[4] > '3' || + setting[4] < '0' || setting[4] > '1' || setting[5] < '0' || setting[5] > '9' || - (setting[4] == '3' && setting[5] > '1') || + (setting[4] == '1' && setting[5] > '7') || setting[6] != '$') { __set_errno(EINVAL); return NULL; @@ -877,7 +877,7 @@ const char *input, int size, char *output, int output_size) { if (size < 16 || output_size < 7 + 22 + 1 || - (count && (count < 4 || count > 31)) || + (count && (count < 4 || count > 17)) || prefix[0] != '$' || prefix[1] != '2' || (prefix[2] != 'a' && prefix[2] != 'y')) { if (output_size > 0) output[0] = '\0'; Index: contrib/apr-util/dbd/NWGNUdbdfreetds =================================================================== --- /dev/null +++ contrib/apr-util/dbd/NWGNUdbdfreetds @@ -1,296 +0,0 @@ -# -# Declare the sub-directories to be built here -# - -SUBDIRS = \ - $(EOLIST) - -# -# Get the 'head' of the build environment. This includes default targets and -# paths to tools -# - -ifndef EnvironmentDefined -include $(APR_WORK)/build/NWGNUhead.inc -endif - -#include $(APR)\build\NWGNUcustom.inc - -# -# build this level's files - -# -# Make sure all needed macro's are defined -# - -# LINK_STATIC = 1 - -# for now defined here - should finally go into build/NWGNUenvironment.inc -FREETDS_INC = $(FREETDSSDK)/include -FREETDS_IMP = $(FREETDSSDK)/lib/libfreetds.imp -FREETDS_LIB = $(FREETDSSDK)/lib/libfreetds.lib -FREETDS_NLM = libfreetds - -# -# These directories will be at the beginning of the include list, followed by -# INCDIRS -# -XINCDIRS += \ - $(APR)/include/arch/netware \ - $(APR)/include \ - $(APU)/include \ - $(APU)/include/private \ - $(APR) \ - $(FREETDS_INC) \ - $(EOLIST) - -# -# These flags will come after CFLAGS -# -XCFLAGS += \ - $(EOLIST) - -# -# These defines will come after DEFINES -# -XDEFINES += \ - -DAPU_HAVE_FREETDS=1 \ - -DAPU_DSO_MODULE_BUILD \ - $(EOLIST) - -# -# These flags will be added to the link.opt file -# -XLFLAGS += \ - $(EOLIST) - -ifdef LINK_STATIC -XLFLAGS += \ - -l $(FREETDSSDK)/lib \ - $(EOLIST) -endif - -# -# These values will be appended to the correct variables based on the value of -# RELEASE -# -ifeq "$(RELEASE)" "debug" -XINCDIRS += \ - $(EOLIST) - -XCFLAGS += \ - $(EOLIST) - -XDEFINES += \ - $(EOLIST) - -XLFLAGS += \ - $(EOLIST) -endif - -ifeq "$(RELEASE)" "noopt" -XINCDIRS += \ - $(EOLIST) - -XCFLAGS += \ - $(EOLIST) - -XDEFINES += \ - $(EOLIST) - -XLFLAGS += \ - $(EOLIST) -endif - -ifeq "$(RELEASE)" "release" -XINCDIRS += \ - $(EOLIST) - -XCFLAGS += \ - $(EOLIST) - -XDEFINES += \ - $(EOLIST) - -XLFLAGS += \ - $(EOLIST) -endif - -# -# These are used by the link target if an NLM is being generated -# This is used by the link 'name' directive to name the nlm. If left blank -# TARGET_nlm (see below) will be used. -# -NLM_NAME = dbdfreetds - -# -# This is used by the link '-desc ' directive. -# If left blank, NLM_NAME will be used. -# -NLM_DESCRIPTION = Apache Portability Runtime Library $(VERSION_STR) DBD FreeTDS Driver Module - -# -# This is used by the '-threadname' directive. If left blank, -# NLM_NAME Thread will be used. -# -NLM_THREAD_NAME = dbdfreetds - -# -# If this is specified, it will override VERSION value in -# $(AP_WORK)\build\NWGNUenvironment.inc -# -NLM_VERSION = - -# -# If this is specified, it will override the default of 64K -# -NLM_STACK_SIZE = 8192 - - -# -# If this is specified it will be used by the link '-entry' directive -# -NLM_ENTRY_SYM = - -# -# If this is specified it will be used by the link '-exit' directive -# -NLM_EXIT_SYM = - -# -# If this is specified it will be used by the link '-check' directive -# -NLM_CHECK_SYM = - -# -# If these are specified it will be used by the link '-flags' directive -# -NLM_FLAGS = - -# -# If this is specified it will be linked in with the XDCData option in the def -# file instead of the default of $(NWOS)/apache.xdc. XDCData can be disabled -# by setting APACHE_UNIPROC in the environment -# -XDCDATA = - -# -# If there is an NLM target, put it here -# -TARGET_nlm = \ - $(OBJDIR)\$(NLM_NAME).nlm \ - $(EOLIST) - -# -# If there is an LIB target, put it here -# -TARGET_lib = \ - $(EOLIST) - -# -# These are the OBJ files needed to create the NLM target above. -# Paths must all use the '/' character -# -FILES_nlm_objs = \ - $(OBJDIR)/apr_dbd_freetds.o \ - $(EOLIST) - -# -# These are the LIB files needed to create the NLM target above. -# These will be added as a library command in the link.opt file. -# -FILES_nlm_libs = \ - $(PRELUDE) \ - $(EOLIST) - -ifeq ($(LINK_STATIC),1) -FILES_nlm_libs += \ - $(FREETDS_LIB) \ - $(EOLIST) -endif - -# -# These are the modules that the above NLM target depends on to load. -# These will be added as a module command in the link.opt file. -# -FILES_nlm_modules = \ - aprlib \ - libc \ - $(EOLIST) - -ifneq ($(LINK_STATIC),1) -FILES_nlm_modules += \ - $(FREETDS_NLM) \ - $(EOLIST) -endif - -# -# If the nlm has a msg file, put it's path here -# -FILE_nlm_msg = - -# -# If the nlm has a hlp file put it's path here -# -FILE_nlm_hlp = - -# -# If this is specified, it will override $(NWOS)\copyright.txt. -# -FILE_nlm_copyright = - -# -# Any additional imports go here -# -FILES_nlm_Ximports = \ - @$(APR)/aprlib.imp \ - @libc.imp \ - $(EOLIST) - -ifneq ($(LINK_STATIC),1) -FILES_nlm_Ximports += \ - @$(FREETDS_IMP) \ - $(EOLIST) -endif - -# -# Any symbols exported to here -# -FILES_nlm_exports = \ - apr_dbd_freetds_driver \ - $(EOLIST) - -# -# These are the OBJ files needed to create the LIB target above. -# Paths must all use the '/' character -# -FILES_lib_objs = \ - $(EOLIST) - -# -# implement targets and dependancies (leave this section alone) -# - -libs :: $(OBJDIR) $(TARGET_lib) - -nlms :: libs $(TARGET_nlm) - -# -# Updated this target to create necessary directories and copy files to the -# correct place. (See $(AP_WORK)\build\NWGNUhead.inc for examples) -# -install :: nlms FORCE - -# -# Any specialized rules here -# - -# -# Include the 'tail' makefile that has targets that depend on variables defined -# in this makefile -# - -include $(APRBUILD)/NWGNUtail.inc - - - Index: contrib/apr-util/dbd/NWGNUmakefile =================================================================== --- contrib/apr-util/dbd/NWGNUmakefile +++ contrib/apr-util/dbd/NWGNUmakefile @@ -168,9 +168,6 @@ ifeq "$(APU_HAVE_SQLITE3)" "1" TARGET_nlm += $(OBJDIR)/dbdsqli3.nlm $(OBJDIR)/dbdsqli3.nlm $(EOLIST) endif -ifeq "$(APU_HAVE_FREETDS)" "1" -TARGET_nlm += $(OBJDIR)/dbdfreetds.nlm $(OBJDIR)/dbdfreetds.nlm $(EOLIST) -endif # # If there is an LIB target, put it here Index: contrib/apr-util/dbd/apr_dbd.c =================================================================== --- contrib/apr-util/dbd/apr_dbd.c +++ contrib/apr-util/dbd/apr_dbd.c @@ -136,9 +136,6 @@ #if APU_HAVE_ORACLE DRIVER_LOAD("oracle", apr_dbd_oracle_driver, pool); #endif -#if APU_HAVE_FREETDS - DRIVER_LOAD("freetds", apr_dbd_freetds_driver, pool); -#endif #if APU_HAVE_ODBC DRIVER_LOAD("odbc", apr_dbd_odbc_driver, pool); #endif Index: contrib/apr-util/dbd/apr_dbd_mysql.dep =================================================================== --- /dev/null +++ contrib/apr-util/dbd/apr_dbd_mysql.dep @@ -0,0 +1,15 @@ +# Microsoft Developer Studio Generated Dependency File, included by apr_dbd_mysql.mak + +.\apr_dbd_mysql.c : \ + "..\include\apr_buckets.h"\ + "..\include\apr_dbd.h"\ + "..\include\apu.h"\ + "..\include\apu_version.h"\ + "..\include\private\apr_dbd_internal.h"\ + "..\include\private\apu_config.h"\ + + +..\libaprutil.rc : \ + "..\include\apu.h"\ + "..\include\apu_version.h"\ + Index: contrib/apr-util/dbd/apr_dbd_mysql.dsp =================================================================== --- /dev/null +++ contrib/apr-util/dbd/apr_dbd_mysql.dsp @@ -0,0 +1,207 @@ +# Microsoft Developer Studio Project File - Name="apr_dbd_mysql" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=apr_dbd_mysql - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "apr_dbd_mysql.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "apr_dbd_mysql.mak" CFG="apr_dbd_mysql - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "apr_dbd_mysql - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_mysql - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_mysql - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_mysql - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "apr_dbd_mysql - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /I "../../mysql/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_MYSQL=1 /D "HAVE_MYSQL_H" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_mysql_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 /fo"Release/apr_dbd_mysql-1.res" /d DLL_NAME="apr_dbd_mysql" /d "NDEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libmysql.lib /nologo /base:"0x6EF50000" /subsystem:windows /dll /incremental:no /debug /opt:ref +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libmysql.lib /nologo /base:"0x6EF50000" /subsystem:windows /dll /incremental:no /debug /libpath:"..\..\mysql\lib" /out:"Release\apr_dbd_mysql-1.dll" /pdb:"Release\apr_dbd_mysql-1.pdb" /implib:"Release\apr_dbd_mysql-1.lib" /MACHINE:X86 /opt:ref +# Begin Special Build Tool +TargetPath=Release\apr_dbd_mysql-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)" == "apr_dbd_mysql - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /I "../../mysql/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_MYSQL=1 /D "HAVE_MYSQL_H" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_mysql_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 /fo"Debug/apr_dbd_mysql-1.res" /d DLL_NAME="apr_dbd_mysql" /d "_DEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libmysqld.lib /nologo /base:"0x6EF50000" /subsystem:windows /dll /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libmysqld.lib /nologo /base:"0x6EF50000" /subsystem:windows /dll /incremental:no /debug /libpath:"..\..\mysql\lib" /out:"Debug\apr_dbd_mysql-1.dll" /pdb:"Debug\apr_dbd_mysql-1.pdb" /implib:"Debug\apr_dbd_mysql-1.lib" /MACHINE:X86 +# Begin Special Build Tool +TargetPath=Debug\apr_dbd_mysql-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)" == "apr_dbd_mysql - x64 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "x64\Release" +# PROP BASE Intermediate_Dir "x64\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "x64\Release" +# PROP Intermediate_Dir "x64\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /I "../../mysql/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_MYSQL=1 /D "HAVE_MYSQL_H" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_mysql_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 /fo"x64/Release/apr_dbd_mysql-1.res" /d DLL_NAME="apr_dbd_mysql" /d "NDEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libmysql.lib /nologo /base:"0x6EF50000" /subsystem:windows /dll /incremental:no /debug /opt:ref +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libmysql.lib /nologo /base:"0x6EF50000" /subsystem:windows /dll /incremental:no /debug /libpath:"..\..\mysql\lib" /out:"x64\Release\apr_dbd_mysql-1.dll" /pdb:"x64\Release\apr_dbd_mysql-1.pdb" /implib:"x64\Release\apr_dbd_mysql-1.lib" /MACHINE:X64 /opt:ref +# Begin Special Build Tool +TargetPath=x64\Release\apr_dbd_mysql-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)" == "apr_dbd_mysql - x64 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "x64\Debug" +# PROP BASE Intermediate_Dir "x64\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "x64\Debug" +# PROP Intermediate_Dir "x64\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /I "../../mysql/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_MYSQL=1 /D "HAVE_MYSQL_H" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_mysql_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 /fo"x64/Debug/apr_dbd_mysql-1.res" /d DLL_NAME="apr_dbd_mysql" /d "_DEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libmysqld.lib /nologo /base:"0x6EF50000" /subsystem:windows /dll /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libmysqld.lib /nologo /base:"0x6EF50000" /subsystem:windows /dll /incremental:no /debug /libpath:"..\..\mysql\lib" /out:"x64\Debug\apr_dbd_mysql-1.dll" /pdb:"x64\Debug\apr_dbd_mysql-1.pdb" /implib:"x64\Debug\apr_dbd_mysql-1.lib" /MACHINE:X64 +# Begin Special Build Tool +TargetPath=x64\Debug\apr_dbd_mysql-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 + +!ENDIF + +# Begin Target + +# Name "apr_dbd_mysql - Win32 Release" +# Name "apr_dbd_mysql - Win32 Debug" +# Name "apr_dbd_mysql - x64 Release" +# Name "apr_dbd_mysql - x64 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\apr_dbd_mysql.c +# End Source File +# End Group +# Begin Group "Public Header Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\include\apr_dbd.h +# End Source File +# End Group +# Begin Group "Internal Header Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\include\private\apu_config.h +# End Source File +# Begin Source File + +SOURCE=..\include\private\apu_dbd_internal.h +# End Source File +# Begin Source File + +SOURCE=..\include\private\apu_internal.h +# End Source File +# End Group +# Begin Source File + +SOURCE=..\libaprutil.rc +# End Source File +# End Target +# End Project Index: contrib/apr-util/dbd/apr_dbd_mysql.mak =================================================================== --- /dev/null +++ contrib/apr-util/dbd/apr_dbd_mysql.mak @@ -0,0 +1,594 @@ +# Microsoft Developer Studio Generated NMAKE File, Based on apr_dbd_mysql.dsp +!IF "$(CFG)" == "" +CFG=apr_dbd_mysql - Win32 Release +!MESSAGE No configuration specified. Defaulting to apr_dbd_mysql - Win32 Release. +!ENDIF + +!IF "$(CFG)" != "apr_dbd_mysql - Win32 Release" && "$(CFG)" != "apr_dbd_mysql - Win32 Debug" && "$(CFG)" != "apr_dbd_mysql - x64 Release" && "$(CFG)" != "apr_dbd_mysql - 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: +!MESSAGE +!MESSAGE NMAKE /f "apr_dbd_mysql.mak" CFG="apr_dbd_mysql - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "apr_dbd_mysql - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_mysql - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_mysql - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_mysql - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +!IF "$(CFG)" == "apr_dbd_mysql - Win32 Release" + +OUTDIR=.\Release +INTDIR=.\Release +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_mysql-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\apr_dbd_mysql-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_mysql-1.res" + -@erase "$(INTDIR)\apr_dbd_mysql.obj" + -@erase "$(INTDIR)\apr_dbd_mysql_src.idb" + -@erase "$(INTDIR)\apr_dbd_mysql_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_mysql-1.dll" + -@erase "$(OUTDIR)\apr_dbd_mysql-1.exp" + -@erase "$(OUTDIR)\apr_dbd_mysql-1.lib" + -@erase "$(OUTDIR)\apr_dbd_mysql-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /I "../../mysql/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_MYSQL=1 /D "HAVE_MYSQL_H" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_mysql_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)\apr_dbd_mysql-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbd_mysql" /d "NDEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_mysql.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libmysql.lib /nologo /base:"0x6EF50000" /subsystem:windows /dll /incremental:no /libpath:"..\..\mysql\lib" /pdb:"$(OUTDIR)\apr_dbd_mysql-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_mysql-1.dll" /implib:"$(OUTDIR)\apr_dbd_mysql-1.lib" /opt:ref +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_mysql.obj" \ + "$(INTDIR)\apr_dbd_mysql-1.res" \ + "..\..\apr\Release\libapr-1.lib" \ + "..\Release\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_mysql-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Release\apr_dbd_mysql-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_mysql-1.dll" + if exist .\Release\apr_dbd_mysql-1.dll.manifest mt.exe -manifest .\Release\apr_dbd_mysql-1.dll.manifest -outputresource:.\Release\apr_dbd_mysql-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbd_mysql - Win32 Debug" + +OUTDIR=.\Debug +INTDIR=.\Debug +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_mysql-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\apr_dbd_mysql-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_mysql-1.res" + -@erase "$(INTDIR)\apr_dbd_mysql.obj" + -@erase "$(INTDIR)\apr_dbd_mysql_src.idb" + -@erase "$(INTDIR)\apr_dbd_mysql_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_mysql-1.dll" + -@erase "$(OUTDIR)\apr_dbd_mysql-1.exp" + -@erase "$(OUTDIR)\apr_dbd_mysql-1.lib" + -@erase "$(OUTDIR)\apr_dbd_mysql-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /I "../../mysql/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_MYSQL=1 /D "HAVE_MYSQL_H" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_mysql_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)\apr_dbd_mysql-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbd_mysql" /d "_DEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_mysql.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libmysqld.lib /nologo /base:"0x6EF50000" /subsystem:windows /dll /incremental:no /libpath:"..\..\mysql\lib" /pdb:"$(OUTDIR)\apr_dbd_mysql-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_mysql-1.dll" /implib:"$(OUTDIR)\apr_dbd_mysql-1.lib" +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_mysql.obj" \ + "$(INTDIR)\apr_dbd_mysql-1.res" \ + "..\..\apr\Debug\libapr-1.lib" \ + "..\Debug\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_mysql-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Debug\apr_dbd_mysql-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_mysql-1.dll" + if exist .\Debug\apr_dbd_mysql-1.dll.manifest mt.exe -manifest .\Debug\apr_dbd_mysql-1.dll.manifest -outputresource:.\Debug\apr_dbd_mysql-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbd_mysql - x64 Release" + +OUTDIR=.\x64\Release +INTDIR=.\x64\Release +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\x64\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_mysql-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - x64 Release" "libapr - x64 Release" "$(OUTDIR)\apr_dbd_mysql-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - x64 ReleaseCLEAN" "libaprutil - x64 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_mysql-1.res" + -@erase "$(INTDIR)\apr_dbd_mysql.obj" + -@erase "$(INTDIR)\apr_dbd_mysql_src.idb" + -@erase "$(INTDIR)\apr_dbd_mysql_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_mysql-1.dll" + -@erase "$(OUTDIR)\apr_dbd_mysql-1.exp" + -@erase "$(OUTDIR)\apr_dbd_mysql-1.lib" + -@erase "$(OUTDIR)\apr_dbd_mysql-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /I "../../mysql/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_MYSQL=1 /D "HAVE_MYSQL_H" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_mysql_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)\apr_dbd_mysql-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbd_mysql" /d "NDEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_mysql.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libmysql.lib /nologo /base:"0x6EF50000" /subsystem:windows /dll /incremental:no /libpath:"..\..\mysql\lib" /pdb:"$(OUTDIR)\apr_dbd_mysql-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_mysql-1.dll" /implib:"$(OUTDIR)\apr_dbd_mysql-1.lib" /MACHINE:X64 /opt:ref +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_mysql.obj" \ + "$(INTDIR)\apr_dbd_mysql-1.res" \ + "..\..\apr\x64\Release\libapr-1.lib" \ + "..\x64\Release\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_mysql-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\x64\Release\apr_dbd_mysql-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\x64\Release +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_mysql-1.dll" + if exist .\x64\Release\apr_dbd_mysql-1.dll.manifest mt.exe -manifest .\x64\Release\apr_dbd_mysql-1.dll.manifest -outputresource:.\x64\Release\apr_dbd_mysql-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbd_mysql - x64 Debug" + +OUTDIR=.\x64\Debug +INTDIR=.\x64\Debug +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\x64\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_mysql-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - x64 Debug" "libapr - x64 Debug" "$(OUTDIR)\apr_dbd_mysql-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - x64 DebugCLEAN" "libaprutil - x64 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_mysql-1.res" + -@erase "$(INTDIR)\apr_dbd_mysql.obj" + -@erase "$(INTDIR)\apr_dbd_mysql_src.idb" + -@erase "$(INTDIR)\apr_dbd_mysql_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_mysql-1.dll" + -@erase "$(OUTDIR)\apr_dbd_mysql-1.exp" + -@erase "$(OUTDIR)\apr_dbd_mysql-1.lib" + -@erase "$(OUTDIR)\apr_dbd_mysql-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /I "../../mysql/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_MYSQL=1 /D "HAVE_MYSQL_H" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_mysql_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)\apr_dbd_mysql-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbd_mysql" /d "_DEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_mysql.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libmysqld.lib /nologo /base:"0x6EF50000" /subsystem:windows /dll /incremental:no /libpath:"..\..\mysql\lib" /pdb:"$(OUTDIR)\apr_dbd_mysql-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_mysql-1.dll" /implib:"$(OUTDIR)\apr_dbd_mysql-1.lib" /MACHINE:X64 +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_mysql.obj" \ + "$(INTDIR)\apr_dbd_mysql-1.res" \ + "..\..\apr\x64\Debug\libapr-1.lib" \ + "..\x64\Debug\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_mysql-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\x64\Debug\apr_dbd_mysql-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\x64\Debug +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_mysql-1.dll" + if exist .\x64\Debug\apr_dbd_mysql-1.dll.manifest mt.exe -manifest .\x64\Debug\apr_dbd_mysql-1.dll.manifest -outputresource:.\x64\Debug\apr_dbd_mysql-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ENDIF + + +!IF "$(NO_EXTERNAL_DEPS)" != "1" +!IF EXISTS("apr_dbd_mysql.dep") +!INCLUDE "apr_dbd_mysql.dep" +!ELSE +!MESSAGE Warning: cannot find "apr_dbd_mysql.dep" +!ENDIF +!ENDIF + + +!IF "$(CFG)" == "apr_dbd_mysql - Win32 Release" || "$(CFG)" == "apr_dbd_mysql - Win32 Debug" || "$(CFG)" == "apr_dbd_mysql - x64 Release" || "$(CFG)" == "apr_dbd_mysql - x64 Debug" +SOURCE=.\apr_dbd_mysql.c + +"$(INTDIR)\apr_dbd_mysql.obj" : $(SOURCE) "$(INTDIR)" + + +!IF "$(CFG)" == "apr_dbd_mysql - Win32 Release" + +"libapr - Win32 Release" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" + cd "..\apr-util\dbd" + +"libapr - Win32 ReleaseCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_mysql - Win32 Debug" + +"libapr - Win32 Debug" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" + cd "..\apr-util\dbd" + +"libapr - Win32 DebugCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_mysql - x64 Release" + +"libapr - x64 Release" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Release" + cd "..\apr-util\dbd" + +"libapr - x64 ReleaseCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Release" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_mysql - x64 Debug" + +"libapr - x64 Debug" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Debug" + cd "..\apr-util\dbd" + +"libapr - x64 DebugCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Debug" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ENDIF + +!IF "$(CFG)" == "apr_dbd_mysql - Win32 Release" + +"libaprutil - Win32 Release" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" + cd ".\dbd" + +"libaprutil - Win32 ReleaseCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN + cd ".\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_mysql - Win32 Debug" + +"libaprutil - Win32 Debug" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" + cd ".\dbd" + +"libaprutil - Win32 DebugCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN + cd ".\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_mysql - x64 Release" + +"libaprutil - x64 Release" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Release" + cd ".\dbd" + +"libaprutil - x64 ReleaseCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Release" RECURSE=1 CLEAN + cd ".\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_mysql - x64 Debug" + +"libaprutil - x64 Debug" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Debug" + cd ".\dbd" + +"libaprutil - x64 DebugCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Debug" RECURSE=1 CLEAN + cd ".\dbd" + +!ENDIF + +SOURCE=..\libaprutil.rc + +!IF "$(CFG)" == "apr_dbd_mysql - Win32 Release" + + +"$(INTDIR)\apr_dbd_mysql-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbd_mysql-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbd_mysql" /d "NDEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_dbd_mysql - Win32 Debug" + + +"$(INTDIR)\apr_dbd_mysql-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbd_mysql-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbd_mysql" /d "_DEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_dbd_mysql - x64 Release" + + +"$(INTDIR)\apr_dbd_mysql-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbd_mysql-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbd_mysql" /d "NDEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_dbd_mysql - x64 Debug" + + +"$(INTDIR)\apr_dbd_mysql-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbd_mysql-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbd_mysql" /d "_DEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ENDIF + + +!ENDIF + Index: contrib/apr-util/dbd/apr_dbd_odbc.dep =================================================================== --- /dev/null +++ contrib/apr-util/dbd/apr_dbd_odbc.dep @@ -0,0 +1,11 @@ +# Microsoft Developer Studio Generated Dependency File, included by apr_dbd_odbc.mak + +.\apr_dbd_odbc.c : \ + "..\include\apr_buckets.h"\ + "..\include\apr_dbd.h"\ + "..\include\apu.h"\ + "..\include\apu_version.h"\ + "..\include\private\apr_dbd_internal.h"\ + "..\include\private\apr_dbd_odbc_v2.h"\ + "..\include\private\apu_config.h"\ + Index: contrib/apr-util/dbd/apr_dbd_odbc.dsp =================================================================== --- /dev/null +++ contrib/apr-util/dbd/apr_dbd_odbc.dsp @@ -0,0 +1,191 @@ +# Microsoft Developer Studio Project File - Name="apr_dbd_odbc" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=apr_dbd_odbc - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "apr_dbd_odbc.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "apr_dbd_odbc.mak" CFG="apr_dbd_odbc - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "apr_dbd_odbc - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_odbc - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_odbc - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_odbc - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "apr_dbd_odbc - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "HAVE_SQL_H" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_ODBC=1 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_odbc_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 /fo"Release/apr_dbd_odbc-1.res" /d DLL_NAME="apr_dbd_odbc" /d "NDEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib odbc32.lib odbccp32.lib /nologo /base:"0x6EF00000" /subsystem:windows /dll /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib odbc32.lib odbccp32.lib /nologo /base:"0x6EF00000" /subsystem:windows /dll /incremental:no /debug /out:"Release\apr_dbd_odbc-1.dll" /implib:"Release\apr_dbd_odbc-1.lib" /MACHINE:X86 /opt:ref +# Begin Special Build Tool +TargetPath=Release\apr_dbd_odbc-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)" == "apr_dbd_odbc - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_ODBC=1 /D "HAVE_SQL_H" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_odbc_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 /fo"Debug/apr_dbd_odbc-1.res" /d DLL_NAME="apr_dbd_odbc" /d "_DEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib odbc32.lib odbccp32.lib /nologo /base:"0x6EF00000" /subsystem:windows /dll /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib odbc32.lib odbccp32.lib /nologo /base:"0x6EF00000" /subsystem:windows /dll /incremental:no /debug /out:"Debug\apr_dbd_odbc-1.dll" /implib:"Debug\apr_dbd_odbc-1.lib" /MACHINE:X86 +# Begin Special Build Tool +TargetPath=Debug\apr_dbd_odbc-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)" == "apr_dbd_odbc - x64 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "x64\Release" +# PROP BASE Intermediate_Dir "x64\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "x64\Release" +# PROP Intermediate_Dir "x64\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "HAVE_SQL_H" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_ODBC=1 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_odbc_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 /fo"x64\Release/apr_dbd_odbc-1.res" /d DLL_NAME="apr_dbd_odbc" /d "NDEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib odbc32.lib odbccp32.lib /nologo /base:"0x6EF00000" /subsystem:windows /dll /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib odbc32.lib odbccp32.lib /nologo /base:"0x6EF00000" /subsystem:windows /dll /incremental:no /debug /out:"x64\Release\apr_dbd_odbc-1.dll" /implib:"x64\Release\apr_dbd_odbc-1.lib" /MACHINE:X64 /opt:ref +# Begin Special Build Tool +TargetPath=x64\Release\apr_dbd_odbc-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)" == "apr_dbd_odbc - x64 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "x64\Debug" +# PROP BASE Intermediate_Dir "x64\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "x64\Debug" +# PROP Intermediate_Dir "x64\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_ODBC=1 /D "HAVE_SQL_H" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_odbc_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 /fo"x64/debug/apr_dbd_odbc-1.res" /d DLL_NAME="apr_dbd_odbc" /d "_DEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib odbc32.lib odbccp32.lib /nologo /base:"0x6EF00000" /subsystem:windows /dll /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib odbc32.lib odbccp32.lib /nologo /base:"0x6EF00000" /subsystem:windows /dll /incremental:no /debug /out:"x64\Debug\apr_dbd_odbc-1.dll" /implib:"x64\Debug\apr_dbd_odbc-1.lib" /MACHINE:X64 +# Begin Special Build Tool +TargetPath=x64\Debug\apr_dbd_odbc-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 + +!ENDIF + +# Begin Target + +# Name "apr_dbd_odbc - Win32 Release" +# Name "apr_dbd_odbc - Win32 Debug" +# Name "apr_dbd_odbc - x64 Release" +# Name "apr_dbd_odbc - x64 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\apr_dbd_odbc.c +# End Source File +# End Group +# Begin Group "Public Header Files" + +# PROP Default_Filter ".h" +# Begin Source File + +SOURCE=..\include\apr_dbd.h +# End Source File +# End Group +# Begin Group "Internal Header Files" + +# PROP Default_Filter ".h" +# End Group +# End Target +# End Project Index: contrib/apr-util/dbd/apr_dbd_odbc.mak =================================================================== --- /dev/null +++ contrib/apr-util/dbd/apr_dbd_odbc.mak @@ -0,0 +1,550 @@ +# Microsoft Developer Studio Generated NMAKE File, Based on apr_dbd_odbc.dsp +!IF "$(CFG)" == "" +CFG=apr_dbd_odbc - Win32 Debug +!MESSAGE No configuration specified. Defaulting to apr_dbd_odbc - Win32 Debug. +!ENDIF + +!IF "$(CFG)" != "apr_dbd_odbc - Win32 Release" && "$(CFG)" != "apr_dbd_odbc - Win32 Debug" && "$(CFG)" != "apr_dbd_odbc - x64 Release" && "$(CFG)" != "apr_dbd_odbc - 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: +!MESSAGE +!MESSAGE NMAKE /f "apr_dbd_odbc.mak" CFG="apr_dbd_odbc - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "apr_dbd_odbc - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_odbc - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_odbc - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_odbc - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +!IF "$(CFG)" == "apr_dbd_odbc - Win32 Release" + +OUTDIR=.\Release +INTDIR=.\Release +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_odbc-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\apr_dbd_odbc-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_odbc.obj" + -@erase "$(INTDIR)\apr_dbd_odbc_src.idb" + -@erase "$(INTDIR)\apr_dbd_odbc_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_odbc-1.dll" + -@erase "$(OUTDIR)\apr_dbd_odbc-1.exp" + -@erase "$(OUTDIR)\apr_dbd_odbc-1.lib" + -@erase "$(OUTDIR)\apr_dbd_odbc-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "HAVE_SQL_H" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_ODBC=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_odbc_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 +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_odbc.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib odbc32.lib odbccp32.lib /nologo /base:"0x6EF00000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_dbd_odbc-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_odbc-1.dll" /implib:"$(OUTDIR)\apr_dbd_odbc-1.lib" /opt:ref +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_odbc.obj" \ + "..\..\apr\Release\libapr-1.lib" \ + "..\Release\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_odbc-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Release\apr_dbd_odbc-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_odbc-1.dll" + if exist .\Release\apr_dbd_odbc-1.dll.manifest mt.exe -manifest .\Release\apr_dbd_odbc-1.dll.manifest -outputresource:.\Release\apr_dbd_odbc-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbd_odbc - Win32 Debug" + +OUTDIR=.\Debug +INTDIR=.\Debug +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_odbc-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\apr_dbd_odbc-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_odbc.obj" + -@erase "$(INTDIR)\apr_dbd_odbc_src.idb" + -@erase "$(INTDIR)\apr_dbd_odbc_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_odbc-1.dll" + -@erase "$(OUTDIR)\apr_dbd_odbc-1.exp" + -@erase "$(OUTDIR)\apr_dbd_odbc-1.lib" + -@erase "$(OUTDIR)\apr_dbd_odbc-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_ODBC=1 /D "HAVE_SQL_H" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_odbc_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 +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_odbc.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib odbc32.lib odbccp32.lib /nologo /base:"0x6EF00000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_dbd_odbc-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_odbc-1.dll" /implib:"$(OUTDIR)\apr_dbd_odbc-1.lib" +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_odbc.obj" \ + "..\..\apr\Debug\libapr-1.lib" \ + "..\Debug\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_odbc-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Debug\apr_dbd_odbc-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_odbc-1.dll" + if exist .\Debug\apr_dbd_odbc-1.dll.manifest mt.exe -manifest .\Debug\apr_dbd_odbc-1.dll.manifest -outputresource:.\Debug\apr_dbd_odbc-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbd_odbc - x64 Release" + +OUTDIR=.\x64\Release +INTDIR=.\x64\Release +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\x64\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_odbc-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - x64 Release" "libapr - x64 Release" "$(OUTDIR)\apr_dbd_odbc-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - x64 ReleaseCLEAN" "libaprutil - x64 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_odbc.obj" + -@erase "$(INTDIR)\apr_dbd_odbc_src.idb" + -@erase "$(INTDIR)\apr_dbd_odbc_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_odbc-1.dll" + -@erase "$(OUTDIR)\apr_dbd_odbc-1.exp" + -@erase "$(OUTDIR)\apr_dbd_odbc-1.lib" + -@erase "$(OUTDIR)\apr_dbd_odbc-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "HAVE_SQL_H" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_ODBC=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_odbc_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 +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_odbc.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib odbc32.lib odbccp32.lib /nologo /base:"0x6EF00000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_dbd_odbc-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_odbc-1.dll" /implib:"$(OUTDIR)\apr_dbd_odbc-1.lib" /MACHINE:X64 /opt:ref +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_odbc.obj" \ + "..\..\apr\x64\Release\libapr-1.lib" \ + "..\x64\Release\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_odbc-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\x64\Release\apr_dbd_odbc-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\x64\Release +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_odbc-1.dll" + if exist .\x64\Release\apr_dbd_odbc-1.dll.manifest mt.exe -manifest .\x64\Release\apr_dbd_odbc-1.dll.manifest -outputresource:.\x64\Release\apr_dbd_odbc-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbd_odbc - x64 Debug" + +OUTDIR=.\x64\Debug +INTDIR=.\x64\Debug +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\x64\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_odbc-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - x64 Debug" "libapr - x64 Debug" "$(OUTDIR)\apr_dbd_odbc-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - x64 DebugCLEAN" "libaprutil - x64 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_odbc.obj" + -@erase "$(INTDIR)\apr_dbd_odbc_src.idb" + -@erase "$(INTDIR)\apr_dbd_odbc_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_odbc-1.dll" + -@erase "$(OUTDIR)\apr_dbd_odbc-1.exp" + -@erase "$(OUTDIR)\apr_dbd_odbc-1.lib" + -@erase "$(OUTDIR)\apr_dbd_odbc-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_ODBC=1 /D "HAVE_SQL_H" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_odbc_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 +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_odbc.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib odbc32.lib odbccp32.lib /nologo /base:"0x6EF00000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_dbd_odbc-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_odbc-1.dll" /implib:"$(OUTDIR)\apr_dbd_odbc-1.lib" /MACHINE:X64 +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_odbc.obj" \ + "..\..\apr\x64\Debug\libapr-1.lib" \ + "..\x64\Debug\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_odbc-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\x64\Debug\apr_dbd_odbc-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\x64\Debug +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_odbc-1.dll" + if exist .\x64\Debug\apr_dbd_odbc-1.dll.manifest mt.exe -manifest .\x64\Debug\apr_dbd_odbc-1.dll.manifest -outputresource:.\x64\Debug\apr_dbd_odbc-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ENDIF + + +!IF "$(NO_EXTERNAL_DEPS)" != "1" +!IF EXISTS("apr_dbd_odbc.dep") +!INCLUDE "apr_dbd_odbc.dep" +!ELSE +!MESSAGE Warning: cannot find "apr_dbd_odbc.dep" +!ENDIF +!ENDIF + + +!IF "$(CFG)" == "apr_dbd_odbc - Win32 Release" || "$(CFG)" == "apr_dbd_odbc - Win32 Debug" || "$(CFG)" == "apr_dbd_odbc - x64 Release" || "$(CFG)" == "apr_dbd_odbc - x64 Debug" +SOURCE=.\apr_dbd_odbc.c + +"$(INTDIR)\apr_dbd_odbc.obj" : $(SOURCE) "$(INTDIR)" + + +!IF "$(CFG)" == "apr_dbd_odbc - Win32 Release" + +"libapr - Win32 Release" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" + cd "..\apr-util\dbd" + +"libapr - Win32 ReleaseCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_odbc - Win32 Debug" + +"libapr - Win32 Debug" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" + cd "..\apr-util\dbd" + +"libapr - Win32 DebugCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_odbc - x64 Release" + +"libapr - x64 Release" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Release" + cd "..\apr-util\dbd" + +"libapr - x64 ReleaseCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Release" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_odbc - x64 Debug" + +"libapr - x64 Debug" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Debug" + cd "..\apr-util\dbd" + +"libapr - x64 DebugCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Debug" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ENDIF + +!IF "$(CFG)" == "apr_dbd_odbc - Win32 Release" + +"libaprutil - Win32 Release" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" + cd ".\dbd" + +"libaprutil - Win32 ReleaseCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN + cd ".\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_odbc - Win32 Debug" + +"libaprutil - Win32 Debug" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" + cd ".\dbd" + +"libaprutil - Win32 DebugCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN + cd ".\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_odbc - x64 Release" + +"libaprutil - x64 Release" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Release" + cd ".\dbd" + +"libaprutil - x64 ReleaseCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Release" RECURSE=1 CLEAN + cd ".\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_odbc - x64 Debug" + +"libaprutil - x64 Debug" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Debug" + cd ".\dbd" + +"libaprutil - x64 DebugCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Debug" RECURSE=1 CLEAN + cd ".\dbd" + +!ENDIF + + +!ENDIF + Index: contrib/apr-util/dbd/apr_dbd_oracle.dep =================================================================== --- /dev/null +++ contrib/apr-util/dbd/apr_dbd_oracle.dep @@ -0,0 +1,13 @@ +# Microsoft Developer Studio Generated Dependency File, included by apr_dbd_oracle.mak + +.\apr_dbd_oracle.c : \ + "..\include\apr_buckets.h"\ + "..\include\apr_dbd.h"\ + "..\include\apu.h"\ + "..\include\private\apr_dbd_internal.h"\ + + +..\libaprutil.rc : \ + "..\include\apu.h"\ + "..\include\apu_version.h"\ + Index: contrib/apr-util/dbd/apr_dbd_oracle.dsp =================================================================== --- /dev/null +++ contrib/apr-util/dbd/apr_dbd_oracle.dsp @@ -0,0 +1,207 @@ +# Microsoft Developer Studio Project File - Name="apr_dbd_oracle" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=apr_dbd_oracle - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "apr_dbd_oracle.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "apr_dbd_oracle.mak" CFG="apr_dbd_oracle - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "apr_dbd_oracle - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_oracle - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_oracle - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_oracle - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "apr_dbd_oracle - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_ORACLE=1 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_oracle_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 /fo"Release/apr_dbd_oracle-1.res" /d DLL_NAME="apr_dbd_oracle" /d "NDEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib oci.lib /nologo /base:"0x6EF40000" /subsystem:windows /dll /incremental:no /debug /opt:ref +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib oci.lib /nologo /base:"0x6EF40000" /subsystem:windows /dll /incremental:no /debug /out:"Release\apr_dbd_oracle-1.dll" /pdb:"Release\apr_dbd_oracle-1.pdb" /implib:"Release\apr_dbd_oracle-1.lib" /MACHINE:X86 /opt:ref +# Begin Special Build Tool +TargetPath=Release\apr_dbd_oracle-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)" == "apr_dbd_oracle - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_ORACLE=1 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_oracle_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 /fo"Debug/apr_dbd_oracle-1.res" /d DLL_NAME="apr_dbd_oracle" /d "_DEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib oci.lib /nologo /base:"0x6EF40000" /subsystem:windows /dll /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib oci.lib /nologo /base:"0x6EF40000" /subsystem:windows /dll /incremental:no /debug /out:"Debug\apr_dbd_oracle-1.dll" /pdb:"Debug\apr_dbd_oracle-1.pdb" /implib:"Debug\apr_dbd_oracle-1.lib" /MACHINE:X86 +# Begin Special Build Tool +TargetPath=Debug\apr_dbd_oracle-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)" == "apr_dbd_oracle - x64 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "x64\Release" +# PROP BASE Intermediate_Dir "x64\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "x64\Release" +# PROP Intermediate_Dir "x64\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_ORACLE=1 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_oracle_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 /fo"x64/Release/apr_dbd_oracle-1.res" /d DLL_NAME="apr_dbd_oracle" /d "NDEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib oci.lib /nologo /base:"0x6EF40000" /subsystem:windows /dll /incremental:no /debug /opt:ref +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib oci.lib /nologo /base:"0x6EF40000" /subsystem:windows /dll /incremental:no /debug /out:"x64\Release\apr_dbd_oracle-1.dll" /pdb:"x64\Release\apr_dbd_oracle-1.pdb" /implib:"x64\Release\apr_dbd_oracle-1.lib" /MACHINE:X64 /opt:ref +# Begin Special Build Tool +TargetPath=x64\Release\apr_dbd_oracle-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)" == "apr_dbd_oracle - x64 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "x64\Debug" +# PROP BASE Intermediate_Dir "x64\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "x64\Debug" +# PROP Intermediate_Dir "x64\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_ORACLE=1 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_oracle_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 /fo"x64/Debug/apr_dbd_oracle-1.res" /d DLL_NAME="apr_dbd_oracle" /d "_DEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib oci.lib /nologo /base:"0x6EF40000" /subsystem:windows /dll /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib oci.lib /nologo /base:"0x6EF40000" /subsystem:windows /dll /incremental:no /debug /out:"x64\Debug\apr_dbd_oracle-1.dll" /pdb:"x64\Debug\apr_dbd_oracle-1.pdb" /implib:"x64\Debug\apr_dbd_oracle-1.lib" /MACHINE:X64 +# Begin Special Build Tool +TargetPath=x64\Debug\apr_dbd_oracle-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 + +!ENDIF + +# Begin Target + +# Name "apr_dbd_oracle - Win32 Release" +# Name "apr_dbd_oracle - Win32 Debug" +# Name "apr_dbd_oracle - x64 Release" +# Name "apr_dbd_oracle - x64 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\apr_dbd_oracle.c +# End Source File +# End Group +# Begin Group "Public Header Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\include\apr_dbd.h +# End Source File +# End Group +# Begin Group "Internal Header Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\include\private\apu_config.h +# End Source File +# Begin Source File + +SOURCE=..\include\private\apu_dbd_internal.h +# End Source File +# Begin Source File + +SOURCE=..\include\private\apu_internal.h +# End Source File +# End Group +# Begin Source File + +SOURCE=..\libaprutil.rc +# End Source File +# End Target +# End Project Index: contrib/apr-util/dbd/apr_dbd_oracle.mak =================================================================== --- /dev/null +++ contrib/apr-util/dbd/apr_dbd_oracle.mak @@ -0,0 +1,594 @@ +# Microsoft Developer Studio Generated NMAKE File, Based on apr_dbd_oracle.dsp +!IF "$(CFG)" == "" +CFG=apr_dbd_oracle - Win32 Release +!MESSAGE No configuration specified. Defaulting to apr_dbd_oracle - Win32 Release. +!ENDIF + +!IF "$(CFG)" != "apr_dbd_oracle - Win32 Release" && "$(CFG)" != "apr_dbd_oracle - Win32 Debug" && "$(CFG)" != "apr_dbd_oracle - x64 Release" && "$(CFG)" != "apr_dbd_oracle - 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: +!MESSAGE +!MESSAGE NMAKE /f "apr_dbd_oracle.mak" CFG="apr_dbd_oracle - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "apr_dbd_oracle - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_oracle - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_oracle - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_oracle - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +!IF "$(CFG)" == "apr_dbd_oracle - Win32 Release" + +OUTDIR=.\Release +INTDIR=.\Release +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_oracle-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\apr_dbd_oracle-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_oracle-1.res" + -@erase "$(INTDIR)\apr_dbd_oracle.obj" + -@erase "$(INTDIR)\apr_dbd_oracle_src.idb" + -@erase "$(INTDIR)\apr_dbd_oracle_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_oracle-1.dll" + -@erase "$(OUTDIR)\apr_dbd_oracle-1.exp" + -@erase "$(OUTDIR)\apr_dbd_oracle-1.lib" + -@erase "$(OUTDIR)\apr_dbd_oracle-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_ORACLE=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_oracle_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)\apr_dbd_oracle-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbd_oracle" /d "NDEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_oracle.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib oci.lib /nologo /base:"0x6EF40000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_dbd_oracle-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_oracle-1.dll" /implib:"$(OUTDIR)\apr_dbd_oracle-1.lib" /opt:ref +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_oracle.obj" \ + "$(INTDIR)\apr_dbd_oracle-1.res" \ + "..\..\apr\Release\libapr-1.lib" \ + "..\Release\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_oracle-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Release\apr_dbd_oracle-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_oracle-1.dll" + if exist .\Release\apr_dbd_oracle-1.dll.manifest mt.exe -manifest .\Release\apr_dbd_oracle-1.dll.manifest -outputresource:.\Release\apr_dbd_oracle-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbd_oracle - Win32 Debug" + +OUTDIR=.\Debug +INTDIR=.\Debug +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_oracle-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\apr_dbd_oracle-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_oracle-1.res" + -@erase "$(INTDIR)\apr_dbd_oracle.obj" + -@erase "$(INTDIR)\apr_dbd_oracle_src.idb" + -@erase "$(INTDIR)\apr_dbd_oracle_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_oracle-1.dll" + -@erase "$(OUTDIR)\apr_dbd_oracle-1.exp" + -@erase "$(OUTDIR)\apr_dbd_oracle-1.lib" + -@erase "$(OUTDIR)\apr_dbd_oracle-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_ORACLE=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_oracle_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)\apr_dbd_oracle-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbd_oracle" /d "_DEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_oracle.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib oci.lib /nologo /base:"0x6EF40000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_dbd_oracle-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_oracle-1.dll" /implib:"$(OUTDIR)\apr_dbd_oracle-1.lib" +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_oracle.obj" \ + "$(INTDIR)\apr_dbd_oracle-1.res" \ + "..\..\apr\Debug\libapr-1.lib" \ + "..\Debug\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_oracle-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Debug\apr_dbd_oracle-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_oracle-1.dll" + if exist .\Debug\apr_dbd_oracle-1.dll.manifest mt.exe -manifest .\Debug\apr_dbd_oracle-1.dll.manifest -outputresource:.\Debug\apr_dbd_oracle-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbd_oracle - x64 Release" + +OUTDIR=.\x64\Release +INTDIR=.\x64\Release +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\x64\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_oracle-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - x64 Release" "libapr - x64 Release" "$(OUTDIR)\apr_dbd_oracle-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - x64 ReleaseCLEAN" "libaprutil - x64 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_oracle-1.res" + -@erase "$(INTDIR)\apr_dbd_oracle.obj" + -@erase "$(INTDIR)\apr_dbd_oracle_src.idb" + -@erase "$(INTDIR)\apr_dbd_oracle_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_oracle-1.dll" + -@erase "$(OUTDIR)\apr_dbd_oracle-1.exp" + -@erase "$(OUTDIR)\apr_dbd_oracle-1.lib" + -@erase "$(OUTDIR)\apr_dbd_oracle-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_ORACLE=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_oracle_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)\apr_dbd_oracle-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbd_oracle" /d "NDEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_oracle.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib oci.lib /nologo /base:"0x6EF40000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_dbd_oracle-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_oracle-1.dll" /implib:"$(OUTDIR)\apr_dbd_oracle-1.lib" /MACHINE:X64 /opt:ref +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_oracle.obj" \ + "$(INTDIR)\apr_dbd_oracle-1.res" \ + "..\..\apr\x64\Release\libapr-1.lib" \ + "..\x64\Release\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_oracle-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\x64\Release\apr_dbd_oracle-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\x64\Release +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_oracle-1.dll" + if exist .\x64\Release\apr_dbd_oracle-1.dll.manifest mt.exe -manifest .\x64\Release\apr_dbd_oracle-1.dll.manifest -outputresource:.\x64\Release\apr_dbd_oracle-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbd_oracle - x64 Debug" + +OUTDIR=.\x64\Debug +INTDIR=.\x64\Debug +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\x64\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_oracle-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - x64 Debug" "libapr - x64 Debug" "$(OUTDIR)\apr_dbd_oracle-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - x64 DebugCLEAN" "libaprutil - x64 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_oracle-1.res" + -@erase "$(INTDIR)\apr_dbd_oracle.obj" + -@erase "$(INTDIR)\apr_dbd_oracle_src.idb" + -@erase "$(INTDIR)\apr_dbd_oracle_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_oracle-1.dll" + -@erase "$(OUTDIR)\apr_dbd_oracle-1.exp" + -@erase "$(OUTDIR)\apr_dbd_oracle-1.lib" + -@erase "$(OUTDIR)\apr_dbd_oracle-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_ORACLE=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_oracle_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)\apr_dbd_oracle-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbd_oracle" /d "_DEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_oracle.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib oci.lib /nologo /base:"0x6EF40000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_dbd_oracle-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_oracle-1.dll" /implib:"$(OUTDIR)\apr_dbd_oracle-1.lib" /MACHINE:X64 +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_oracle.obj" \ + "$(INTDIR)\apr_dbd_oracle-1.res" \ + "..\..\apr\x64\Debug\libapr-1.lib" \ + "..\x64\Debug\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_oracle-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\x64\Debug\apr_dbd_oracle-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\x64\Debug +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_oracle-1.dll" + if exist .\x64\Debug\apr_dbd_oracle-1.dll.manifest mt.exe -manifest .\x64\Debug\apr_dbd_oracle-1.dll.manifest -outputresource:.\x64\Debug\apr_dbd_oracle-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ENDIF + + +!IF "$(NO_EXTERNAL_DEPS)" != "1" +!IF EXISTS("apr_dbd_oracle.dep") +!INCLUDE "apr_dbd_oracle.dep" +!ELSE +!MESSAGE Warning: cannot find "apr_dbd_oracle.dep" +!ENDIF +!ENDIF + + +!IF "$(CFG)" == "apr_dbd_oracle - Win32 Release" || "$(CFG)" == "apr_dbd_oracle - Win32 Debug" || "$(CFG)" == "apr_dbd_oracle - x64 Release" || "$(CFG)" == "apr_dbd_oracle - x64 Debug" +SOURCE=.\apr_dbd_oracle.c + +"$(INTDIR)\apr_dbd_oracle.obj" : $(SOURCE) "$(INTDIR)" + + +!IF "$(CFG)" == "apr_dbd_oracle - Win32 Release" + +"libapr - Win32 Release" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" + cd "..\apr-util\dbd" + +"libapr - Win32 ReleaseCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_oracle - Win32 Debug" + +"libapr - Win32 Debug" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" + cd "..\apr-util\dbd" + +"libapr - Win32 DebugCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_oracle - x64 Release" + +"libapr - x64 Release" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Release" + cd "..\apr-util\dbd" + +"libapr - x64 ReleaseCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Release" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_oracle - x64 Debug" + +"libapr - x64 Debug" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Debug" + cd "..\apr-util\dbd" + +"libapr - x64 DebugCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Debug" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ENDIF + +!IF "$(CFG)" == "apr_dbd_oracle - Win32 Release" + +"libaprutil - Win32 Release" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" + cd ".\dbd" + +"libaprutil - Win32 ReleaseCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN + cd ".\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_oracle - Win32 Debug" + +"libaprutil - Win32 Debug" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" + cd ".\dbd" + +"libaprutil - Win32 DebugCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN + cd ".\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_oracle - x64 Release" + +"libaprutil - x64 Release" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Release" + cd ".\dbd" + +"libaprutil - x64 ReleaseCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Release" RECURSE=1 CLEAN + cd ".\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_oracle - x64 Debug" + +"libaprutil - x64 Debug" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Debug" + cd ".\dbd" + +"libaprutil - x64 DebugCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Debug" RECURSE=1 CLEAN + cd ".\dbd" + +!ENDIF + +SOURCE=..\libaprutil.rc + +!IF "$(CFG)" == "apr_dbd_oracle - Win32 Release" + + +"$(INTDIR)\apr_dbd_oracle-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbd_oracle-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbd_oracle" /d "NDEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_dbd_oracle - Win32 Debug" + + +"$(INTDIR)\apr_dbd_oracle-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbd_oracle-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbd_oracle" /d "_DEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_dbd_oracle - x64 Release" + + +"$(INTDIR)\apr_dbd_oracle-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbd_oracle-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbd_oracle" /d "NDEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_dbd_oracle - x64 Debug" + + +"$(INTDIR)\apr_dbd_oracle-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbd_oracle-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbd_oracle" /d "_DEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ENDIF + + +!ENDIF + Index: contrib/apr-util/dbd/apr_dbd_pgsql.dep =================================================================== --- /dev/null +++ contrib/apr-util/dbd/apr_dbd_pgsql.dep @@ -0,0 +1,14 @@ +# Microsoft Developer Studio Generated Dependency File, included by apr_dbd_pgsql.mak + +.\apr_dbd_pgsql.c : \ + "..\include\apr_buckets.h"\ + "..\include\apr_dbd.h"\ + "..\include\apu.h"\ + "..\include\private\apr_dbd_internal.h"\ + "..\include\private\apu_config.h"\ + + +..\libaprutil.rc : \ + "..\include\apu.h"\ + "..\include\apu_version.h"\ + Index: contrib/apr-util/dbd/apr_dbd_pgsql.dsp =================================================================== --- /dev/null +++ contrib/apr-util/dbd/apr_dbd_pgsql.dsp @@ -0,0 +1,207 @@ +# Microsoft Developer Studio Project File - Name="apr_dbd_pgsql" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=apr_dbd_pgsql - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "apr_dbd_pgsql.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "apr_dbd_pgsql.mak" CFG="apr_dbd_pgsql - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "apr_dbd_pgsql - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_pgsql - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_pgsql - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_pgsql - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "apr_dbd_pgsql - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_PGSQL=1 /D "HAVE_LIBPQ_FE_H" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_pgsql_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 /fo"Release/apr_dbd_pgsql-1.res" /d DLL_NAME="apr_dbd_pgsql" /d "NDEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libpq.lib /nologo /base:"0x6EF30000" /subsystem:windows /dll /incremental:no /debug /opt:ref +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libpq.lib /nologo /base:"0x6EF30000" /subsystem:windows /dll /incremental:no /debug /out:"Release\apr_dbd_pgsql-1.dll" /pdb:"Release\apr_dbd_pgsql-1.pdb" /implib:"Release\apr_dbd_pgsql-1.lib" /MACHINE:X86 /opt:ref +# Begin Special Build Tool +TargetPath=Release\apr_dbd_pgsql-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)" == "apr_dbd_pgsql - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_PGSQL=1 /D "HAVE_LIBPQ_FE_H" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_pgsql_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 /fo"Debug/apr_dbd_pgsql-1.res" /d DLL_NAME="apr_dbd_pgsql" /d "_DEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libpq.lib /nologo /base:"0x6EF30000" /subsystem:windows /dll /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libpq.lib /nologo /base:"0x6EF30000" /subsystem:windows /dll /incremental:no /debug /out:"Debug\apr_dbd_pgsql-1.dll" /pdb:"Debug\apr_dbd_pgsql-1.pdb" /implib:"Debug\apr_dbd_pgsql-1.lib" /MACHINE:X86 +# Begin Special Build Tool +TargetPath=Debug\apr_dbd_pgsql-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)" == "apr_dbd_pgsql - x64 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "x64\Release" +# PROP BASE Intermediate_Dir "x64\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "x64\Release" +# PROP Intermediate_Dir "x64\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_PGSQL=1 /D "HAVE_LIBPQ_FE_H" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_pgsql_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 /fo"x64/Release/apr_dbd_pgsql-1.res" /d DLL_NAME="apr_dbd_pgsql" /d "NDEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libpq.lib /nologo /base:"0x6EF30000" /subsystem:windows /dll /incremental:no /debug /opt:ref +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libpq.lib /nologo /base:"0x6EF30000" /subsystem:windows /dll /incremental:no /debug /out:"x64\Release\apr_dbd_pgsql-1.dll" /pdb:"x64\Release\apr_dbd_pgsql-1.pdb" /implib:"x64\Release\apr_dbd_pgsql-1.lib" /MACHINE:X64 /opt:ref +# Begin Special Build Tool +TargetPath=x64\Release\apr_dbd_pgsql-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)" == "apr_dbd_pgsql - x64 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "x64\Debug" +# PROP BASE Intermediate_Dir "x64\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "x64\Debug" +# PROP Intermediate_Dir "x64\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_PGSQL=1 /D "HAVE_LIBPQ_FE_H" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_pgsql_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 /fo"x64/Debug/apr_dbd_pgsql-1.res" /d DLL_NAME="apr_dbd_pgsql" /d "_DEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libpq.lib /nologo /base:"0x6EF30000" /subsystem:windows /dll /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libpq.lib /nologo /base:"0x6EF30000" /subsystem:windows /dll /incremental:no /debug /out:"x64\Debug\apr_dbd_pgsql-1.dll" /pdb:"x64\Debug\apr_dbd_pgsql-1.pdb" /implib:"x64\Debug\apr_dbd_pgsql-1.lib" /MACHINE:X64 +# Begin Special Build Tool +TargetPath=x64\Debug\apr_dbd_pgsql-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 + +!ENDIF + +# Begin Target + +# Name "apr_dbd_pgsql - Win32 Release" +# Name "apr_dbd_pgsql - Win32 Debug" +# Name "apr_dbd_pgsql - x64 Release" +# Name "apr_dbd_pgsql - x64 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\apr_dbd_pgsql.c +# End Source File +# End Group +# Begin Group "Public Header Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\include\apr_dbd.h +# End Source File +# End Group +# Begin Group "Internal Header Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\include\private\apu_config.h +# End Source File +# Begin Source File + +SOURCE=..\include\private\apu_dbd_internal.h +# End Source File +# Begin Source File + +SOURCE=..\include\private\apu_internal.h +# End Source File +# End Group +# Begin Source File + +SOURCE=..\libaprutil.rc +# End Source File +# End Target +# End Project Index: contrib/apr-util/dbd/apr_dbd_pgsql.mak =================================================================== --- /dev/null +++ contrib/apr-util/dbd/apr_dbd_pgsql.mak @@ -0,0 +1,594 @@ +# Microsoft Developer Studio Generated NMAKE File, Based on apr_dbd_pgsql.dsp +!IF "$(CFG)" == "" +CFG=apr_dbd_pgsql - Win32 Release +!MESSAGE No configuration specified. Defaulting to apr_dbd_pgsql - Win32 Release. +!ENDIF + +!IF "$(CFG)" != "apr_dbd_pgsql - Win32 Release" && "$(CFG)" != "apr_dbd_pgsql - Win32 Debug" && "$(CFG)" != "apr_dbd_pgsql - x64 Release" && "$(CFG)" != "apr_dbd_pgsql - 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: +!MESSAGE +!MESSAGE NMAKE /f "apr_dbd_pgsql.mak" CFG="apr_dbd_pgsql - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "apr_dbd_pgsql - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_pgsql - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_pgsql - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_pgsql - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +!IF "$(CFG)" == "apr_dbd_pgsql - Win32 Release" + +OUTDIR=.\Release +INTDIR=.\Release +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_pgsql-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\apr_dbd_pgsql-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_pgsql-1.res" + -@erase "$(INTDIR)\apr_dbd_pgsql.obj" + -@erase "$(INTDIR)\apr_dbd_pgsql_src.idb" + -@erase "$(INTDIR)\apr_dbd_pgsql_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_pgsql-1.dll" + -@erase "$(OUTDIR)\apr_dbd_pgsql-1.exp" + -@erase "$(OUTDIR)\apr_dbd_pgsql-1.lib" + -@erase "$(OUTDIR)\apr_dbd_pgsql-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_PGSQL=1 /D "HAVE_LIBPQ_FE_H" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_pgsql_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)\apr_dbd_pgsql-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbd_pgsql" /d "NDEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_pgsql.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libpq.lib /nologo /base:"0x6EF30000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_dbd_pgsql-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_pgsql-1.dll" /implib:"$(OUTDIR)\apr_dbd_pgsql-1.lib" /opt:ref +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_pgsql.obj" \ + "$(INTDIR)\apr_dbd_pgsql-1.res" \ + "..\..\apr\Release\libapr-1.lib" \ + "..\Release\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_pgsql-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Release\apr_dbd_pgsql-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_pgsql-1.dll" + if exist .\Release\apr_dbd_pgsql-1.dll.manifest mt.exe -manifest .\Release\apr_dbd_pgsql-1.dll.manifest -outputresource:.\Release\apr_dbd_pgsql-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbd_pgsql - Win32 Debug" + +OUTDIR=.\Debug +INTDIR=.\Debug +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_pgsql-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\apr_dbd_pgsql-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_pgsql-1.res" + -@erase "$(INTDIR)\apr_dbd_pgsql.obj" + -@erase "$(INTDIR)\apr_dbd_pgsql_src.idb" + -@erase "$(INTDIR)\apr_dbd_pgsql_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_pgsql-1.dll" + -@erase "$(OUTDIR)\apr_dbd_pgsql-1.exp" + -@erase "$(OUTDIR)\apr_dbd_pgsql-1.lib" + -@erase "$(OUTDIR)\apr_dbd_pgsql-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_PGSQL=1 /D "HAVE_LIBPQ_FE_H" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_pgsql_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)\apr_dbd_pgsql-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbd_pgsql" /d "_DEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_pgsql.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libpq.lib /nologo /base:"0x6EF30000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_dbd_pgsql-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_pgsql-1.dll" /implib:"$(OUTDIR)\apr_dbd_pgsql-1.lib" +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_pgsql.obj" \ + "$(INTDIR)\apr_dbd_pgsql-1.res" \ + "..\..\apr\Debug\libapr-1.lib" \ + "..\Debug\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_pgsql-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Debug\apr_dbd_pgsql-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_pgsql-1.dll" + if exist .\Debug\apr_dbd_pgsql-1.dll.manifest mt.exe -manifest .\Debug\apr_dbd_pgsql-1.dll.manifest -outputresource:.\Debug\apr_dbd_pgsql-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbd_pgsql - x64 Release" + +OUTDIR=.\x64\Release +INTDIR=.\x64\Release +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\x64\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_pgsql-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - x64 Release" "libapr - x64 Release" "$(OUTDIR)\apr_dbd_pgsql-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - x64 ReleaseCLEAN" "libaprutil - x64 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_pgsql-1.res" + -@erase "$(INTDIR)\apr_dbd_pgsql.obj" + -@erase "$(INTDIR)\apr_dbd_pgsql_src.idb" + -@erase "$(INTDIR)\apr_dbd_pgsql_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_pgsql-1.dll" + -@erase "$(OUTDIR)\apr_dbd_pgsql-1.exp" + -@erase "$(OUTDIR)\apr_dbd_pgsql-1.lib" + -@erase "$(OUTDIR)\apr_dbd_pgsql-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_PGSQL=1 /D "HAVE_LIBPQ_FE_H" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_pgsql_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)\apr_dbd_pgsql-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbd_pgsql" /d "NDEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_pgsql.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libpq.lib /nologo /base:"0x6EF30000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_dbd_pgsql-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_pgsql-1.dll" /implib:"$(OUTDIR)\apr_dbd_pgsql-1.lib" /MACHINE:X64 /opt:ref +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_pgsql.obj" \ + "$(INTDIR)\apr_dbd_pgsql-1.res" \ + "..\..\apr\x64\Release\libapr-1.lib" \ + "..\x64\Release\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_pgsql-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\x64\Release\apr_dbd_pgsql-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\x64\Release +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_pgsql-1.dll" + if exist .\x64\Release\apr_dbd_pgsql-1.dll.manifest mt.exe -manifest .\x64\Release\apr_dbd_pgsql-1.dll.manifest -outputresource:.\x64\Release\apr_dbd_pgsql-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbd_pgsql - x64 Debug" + +OUTDIR=.\x64\Debug +INTDIR=.\x64\Debug +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\x64\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_pgsql-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - x64 Debug" "libapr - x64 Debug" "$(OUTDIR)\apr_dbd_pgsql-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - x64 DebugCLEAN" "libaprutil - x64 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_pgsql-1.res" + -@erase "$(INTDIR)\apr_dbd_pgsql.obj" + -@erase "$(INTDIR)\apr_dbd_pgsql_src.idb" + -@erase "$(INTDIR)\apr_dbd_pgsql_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_pgsql-1.dll" + -@erase "$(OUTDIR)\apr_dbd_pgsql-1.exp" + -@erase "$(OUTDIR)\apr_dbd_pgsql-1.lib" + -@erase "$(OUTDIR)\apr_dbd_pgsql-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_PGSQL=1 /D "HAVE_LIBPQ_FE_H" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_pgsql_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)\apr_dbd_pgsql-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbd_pgsql" /d "_DEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_pgsql.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libpq.lib /nologo /base:"0x6EF30000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_dbd_pgsql-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_pgsql-1.dll" /implib:"$(OUTDIR)\apr_dbd_pgsql-1.lib" /MACHINE:X64 +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_pgsql.obj" \ + "$(INTDIR)\apr_dbd_pgsql-1.res" \ + "..\..\apr\x64\Debug\libapr-1.lib" \ + "..\x64\Debug\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_pgsql-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\x64\Debug\apr_dbd_pgsql-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\x64\Debug +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_pgsql-1.dll" + if exist .\x64\Debug\apr_dbd_pgsql-1.dll.manifest mt.exe -manifest .\x64\Debug\apr_dbd_pgsql-1.dll.manifest -outputresource:.\x64\Debug\apr_dbd_pgsql-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ENDIF + + +!IF "$(NO_EXTERNAL_DEPS)" != "1" +!IF EXISTS("apr_dbd_pgsql.dep") +!INCLUDE "apr_dbd_pgsql.dep" +!ELSE +!MESSAGE Warning: cannot find "apr_dbd_pgsql.dep" +!ENDIF +!ENDIF + + +!IF "$(CFG)" == "apr_dbd_pgsql - Win32 Release" || "$(CFG)" == "apr_dbd_pgsql - Win32 Debug" || "$(CFG)" == "apr_dbd_pgsql - x64 Release" || "$(CFG)" == "apr_dbd_pgsql - x64 Debug" +SOURCE=.\apr_dbd_pgsql.c + +"$(INTDIR)\apr_dbd_pgsql.obj" : $(SOURCE) "$(INTDIR)" + + +!IF "$(CFG)" == "apr_dbd_pgsql - Win32 Release" + +"libapr - Win32 Release" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" + cd "..\apr-util\dbd" + +"libapr - Win32 ReleaseCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_pgsql - Win32 Debug" + +"libapr - Win32 Debug" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" + cd "..\apr-util\dbd" + +"libapr - Win32 DebugCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_pgsql - x64 Release" + +"libapr - x64 Release" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Release" + cd "..\apr-util\dbd" + +"libapr - x64 ReleaseCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Release" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_pgsql - x64 Debug" + +"libapr - x64 Debug" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Debug" + cd "..\apr-util\dbd" + +"libapr - x64 DebugCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Debug" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ENDIF + +!IF "$(CFG)" == "apr_dbd_pgsql - Win32 Release" + +"libaprutil - Win32 Release" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" + cd ".\dbd" + +"libaprutil - Win32 ReleaseCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN + cd ".\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_pgsql - Win32 Debug" + +"libaprutil - Win32 Debug" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" + cd ".\dbd" + +"libaprutil - Win32 DebugCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN + cd ".\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_pgsql - x64 Release" + +"libaprutil - x64 Release" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Release" + cd ".\dbd" + +"libaprutil - x64 ReleaseCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Release" RECURSE=1 CLEAN + cd ".\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_pgsql - x64 Debug" + +"libaprutil - x64 Debug" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Debug" + cd ".\dbd" + +"libaprutil - x64 DebugCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Debug" RECURSE=1 CLEAN + cd ".\dbd" + +!ENDIF + +SOURCE=..\libaprutil.rc + +!IF "$(CFG)" == "apr_dbd_pgsql - Win32 Release" + + +"$(INTDIR)\apr_dbd_pgsql-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbd_pgsql-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbd_pgsql" /d "NDEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_dbd_pgsql - Win32 Debug" + + +"$(INTDIR)\apr_dbd_pgsql-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbd_pgsql-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbd_pgsql" /d "_DEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_dbd_pgsql - x64 Release" + + +"$(INTDIR)\apr_dbd_pgsql-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbd_pgsql-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbd_pgsql" /d "NDEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_dbd_pgsql - x64 Debug" + + +"$(INTDIR)\apr_dbd_pgsql-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbd_pgsql-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbd_pgsql" /d "_DEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ENDIF + + +!ENDIF + Index: contrib/apr-util/dbd/apr_dbd_sqlite2.dep =================================================================== --- /dev/null +++ contrib/apr-util/dbd/apr_dbd_sqlite2.dep @@ -0,0 +1,13 @@ +# Microsoft Developer Studio Generated Dependency File, included by apr_dbd_sqlite2.mak + +.\apr_dbd_sqlite2.c : \ + "..\include\apr_buckets.h"\ + "..\include\apr_dbd.h"\ + "..\include\apu.h"\ + "..\include\private\apr_dbd_internal.h"\ + + +..\libaprutil.rc : \ + "..\include\apu.h"\ + "..\include\apu_version.h"\ + Index: contrib/apr-util/dbd/apr_dbd_sqlite2.dsp =================================================================== --- /dev/null +++ contrib/apr-util/dbd/apr_dbd_sqlite2.dsp @@ -0,0 +1,207 @@ +# Microsoft Developer Studio Project File - Name="apr_dbd_sqlite2" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=apr_dbd_sqlite2 - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "apr_dbd_sqlite2.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "apr_dbd_sqlite2.mak" CFG="apr_dbd_sqlite2 - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "apr_dbd_sqlite2 - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_sqlite2 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_sqlite2 - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_sqlite2 - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "apr_dbd_sqlite2 - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_SQLITE2=1 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_sqlite2_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 /fo"Release/apr_dbd_sqlite2-1.res" /d DLL_NAME="apr_dbd_sqlite2" /d "NDEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib sqlite2.lib /nologo /base:"0x6EF10000" /subsystem:windows /dll /incremental:no /debug /opt:ref +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib sqlite2.lib /nologo /base:"0x6EF10000" /subsystem:windows /dll /incremental:no /debug /out:"Release\apr_dbd_sqlite2-1.dll" /pdb:"Release\apr_dbd_sqlite2-1.pdb" /implib:"Release\apr_dbd_sqlite2-1.lib" /MACHINE:X86 /opt:ref +# Begin Special Build Tool +TargetPath=Release\apr_dbd_sqlite2-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)" == "apr_dbd_sqlite2 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_SQLITE2=1 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_sqlite2_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 /fo"Debug/apr_dbd_sqlite2-1.res" /d DLL_NAME="apr_dbd_sqlite2" /d "_DEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib sqlite2.lib /nologo /base:"0x6EF10000" /subsystem:windows /dll /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib sqlite2.lib /nologo /base:"0x6EF10000" /subsystem:windows /dll /incremental:no /debug /out:"Debug\apr_dbd_sqlite2-1.dll" /pdb:"Debug\apr_dbd_sqlite2-1.pdb" /implib:"Debug\apr_dbd_sqlite2-1.lib" /MACHINE:X86 +# Begin Special Build Tool +TargetPath=Debug\apr_dbd_sqlite2-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)" == "apr_dbd_sqlite2 - x64 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "x64\Release" +# PROP BASE Intermediate_Dir "x64\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "x64\Release" +# PROP Intermediate_Dir "x64\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_SQLITE2=1 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_sqlite2_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 /fo"x64/Release/apr_dbd_sqlite2-1.res" /d DLL_NAME="apr_dbd_sqlite2" /d "NDEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib sqlite2.lib /nologo /base:"0x6EF10000" /subsystem:windows /dll /incremental:no /debug /opt:ref +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib sqlite2.lib /nologo /base:"0x6EF10000" /subsystem:windows /dll /incremental:no /debug /out:"x64\Release\apr_dbd_sqlite2-1.dll" /pdb:"x64\Release\apr_dbd_sqlite2-1.pdb" /implib:"x64\Release\apr_dbd_sqlite2-1.lib" /MACHINE:X64 /opt:ref +# Begin Special Build Tool +TargetPath=x64\Release\apr_dbd_sqlite2-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)" == "apr_dbd_sqlite2 - x64 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "x64\Debug" +# PROP BASE Intermediate_Dir "x64\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "x64\Debug" +# PROP Intermediate_Dir "x64\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_SQLITE2=1 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_sqlite2_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 /fo"x64/Debug/apr_dbd_sqlite2-1.res" /d DLL_NAME="apr_dbd_sqlite2" /d "_DEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib sqlite2.lib /nologo /base:"0x6EF10000" /subsystem:windows /dll /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib sqlite2.lib /nologo /base:"0x6EF10000" /subsystem:windows /dll /incremental:no /debug /out:"x64\Debug\apr_dbd_sqlite2-1.dll" /pdb:"x64\Debug\apr_dbd_sqlite2-1.pdb" /implib:"x64\Debug\apr_dbd_sqlite2-1.lib" /MACHINE:X64 +# Begin Special Build Tool +TargetPath=x64\Debug\apr_dbd_sqlite2-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 + +!ENDIF + +# Begin Target + +# Name "apr_dbd_sqlite2 - Win32 Release" +# Name "apr_dbd_sqlite2 - Win32 Debug" +# Name "apr_dbd_sqlite2 - x64 Release" +# Name "apr_dbd_sqlite2 - x64 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\apr_dbd_sqlite2.c +# End Source File +# End Group +# Begin Group "Public Header Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\include\apr_dbd.h +# End Source File +# End Group +# Begin Group "Internal Header Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\include\private\apu_config.h +# End Source File +# Begin Source File + +SOURCE=..\include\private\apu_dbd_internal.h +# End Source File +# Begin Source File + +SOURCE=..\include\private\apu_internal.h +# End Source File +# End Group +# Begin Source File + +SOURCE=..\libaprutil.rc +# End Source File +# End Target +# End Project Index: contrib/apr-util/dbd/apr_dbd_sqlite2.mak =================================================================== --- /dev/null +++ contrib/apr-util/dbd/apr_dbd_sqlite2.mak @@ -0,0 +1,594 @@ +# Microsoft Developer Studio Generated NMAKE File, Based on apr_dbd_sqlite2.dsp +!IF "$(CFG)" == "" +CFG=apr_dbd_sqlite2 - Win32 Release +!MESSAGE No configuration specified. Defaulting to apr_dbd_sqlite2 - Win32 Release. +!ENDIF + +!IF "$(CFG)" != "apr_dbd_sqlite2 - Win32 Release" && "$(CFG)" != "apr_dbd_sqlite2 - Win32 Debug" && "$(CFG)" != "apr_dbd_sqlite2 - x64 Release" && "$(CFG)" != "apr_dbd_sqlite2 - 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: +!MESSAGE +!MESSAGE NMAKE /f "apr_dbd_sqlite2.mak" CFG="apr_dbd_sqlite2 - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "apr_dbd_sqlite2 - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_sqlite2 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_sqlite2 - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_sqlite2 - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +!IF "$(CFG)" == "apr_dbd_sqlite2 - Win32 Release" + +OUTDIR=.\Release +INTDIR=.\Release +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_sqlite2-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\apr_dbd_sqlite2-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_sqlite2-1.res" + -@erase "$(INTDIR)\apr_dbd_sqlite2.obj" + -@erase "$(INTDIR)\apr_dbd_sqlite2_src.idb" + -@erase "$(INTDIR)\apr_dbd_sqlite2_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_sqlite2-1.dll" + -@erase "$(OUTDIR)\apr_dbd_sqlite2-1.exp" + -@erase "$(OUTDIR)\apr_dbd_sqlite2-1.lib" + -@erase "$(OUTDIR)\apr_dbd_sqlite2-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_SQLITE2=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_sqlite2_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)\apr_dbd_sqlite2-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbd_sqlite2" /d "NDEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_sqlite2.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib sqlite2.lib /nologo /base:"0x6EF10000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_dbd_sqlite2-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_sqlite2-1.dll" /implib:"$(OUTDIR)\apr_dbd_sqlite2-1.lib" /opt:ref +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_sqlite2.obj" \ + "$(INTDIR)\apr_dbd_sqlite2-1.res" \ + "..\..\apr\Release\libapr-1.lib" \ + "..\Release\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_sqlite2-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Release\apr_dbd_sqlite2-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_sqlite2-1.dll" + if exist .\Release\apr_dbd_sqlite2-1.dll.manifest mt.exe -manifest .\Release\apr_dbd_sqlite2-1.dll.manifest -outputresource:.\Release\apr_dbd_sqlite2-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbd_sqlite2 - Win32 Debug" + +OUTDIR=.\Debug +INTDIR=.\Debug +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_sqlite2-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\apr_dbd_sqlite2-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_sqlite2-1.res" + -@erase "$(INTDIR)\apr_dbd_sqlite2.obj" + -@erase "$(INTDIR)\apr_dbd_sqlite2_src.idb" + -@erase "$(INTDIR)\apr_dbd_sqlite2_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_sqlite2-1.dll" + -@erase "$(OUTDIR)\apr_dbd_sqlite2-1.exp" + -@erase "$(OUTDIR)\apr_dbd_sqlite2-1.lib" + -@erase "$(OUTDIR)\apr_dbd_sqlite2-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_SQLITE2=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_sqlite2_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)\apr_dbd_sqlite2-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbd_sqlite2" /d "_DEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_sqlite2.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib sqlite2.lib /nologo /base:"0x6EF10000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_dbd_sqlite2-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_sqlite2-1.dll" /implib:"$(OUTDIR)\apr_dbd_sqlite2-1.lib" +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_sqlite2.obj" \ + "$(INTDIR)\apr_dbd_sqlite2-1.res" \ + "..\..\apr\Debug\libapr-1.lib" \ + "..\Debug\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_sqlite2-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Debug\apr_dbd_sqlite2-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_sqlite2-1.dll" + if exist .\Debug\apr_dbd_sqlite2-1.dll.manifest mt.exe -manifest .\Debug\apr_dbd_sqlite2-1.dll.manifest -outputresource:.\Debug\apr_dbd_sqlite2-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbd_sqlite2 - x64 Release" + +OUTDIR=.\x64\Release +INTDIR=.\x64\Release +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\x64\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_sqlite2-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - x64 Release" "libapr - x64 Release" "$(OUTDIR)\apr_dbd_sqlite2-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - x64 ReleaseCLEAN" "libaprutil - x64 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_sqlite2-1.res" + -@erase "$(INTDIR)\apr_dbd_sqlite2.obj" + -@erase "$(INTDIR)\apr_dbd_sqlite2_src.idb" + -@erase "$(INTDIR)\apr_dbd_sqlite2_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_sqlite2-1.dll" + -@erase "$(OUTDIR)\apr_dbd_sqlite2-1.exp" + -@erase "$(OUTDIR)\apr_dbd_sqlite2-1.lib" + -@erase "$(OUTDIR)\apr_dbd_sqlite2-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_SQLITE2=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_sqlite2_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)\apr_dbd_sqlite2-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbd_sqlite2" /d "NDEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_sqlite2.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib sqlite2.lib /nologo /base:"0x6EF10000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_dbd_sqlite2-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_sqlite2-1.dll" /implib:"$(OUTDIR)\apr_dbd_sqlite2-1.lib" /MACHINE:X64 /opt:ref +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_sqlite2.obj" \ + "$(INTDIR)\apr_dbd_sqlite2-1.res" \ + "..\..\apr\x64\Release\libapr-1.lib" \ + "..\x64\Release\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_sqlite2-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\x64\Release\apr_dbd_sqlite2-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\x64\Release +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_sqlite2-1.dll" + if exist .\x64\Release\apr_dbd_sqlite2-1.dll.manifest mt.exe -manifest .\x64\Release\apr_dbd_sqlite2-1.dll.manifest -outputresource:.\x64\Release\apr_dbd_sqlite2-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbd_sqlite2 - x64 Debug" + +OUTDIR=.\x64\Debug +INTDIR=.\x64\Debug +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\x64\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_sqlite2-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - x64 Debug" "libapr - x64 Debug" "$(OUTDIR)\apr_dbd_sqlite2-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - x64 DebugCLEAN" "libaprutil - x64 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_sqlite2-1.res" + -@erase "$(INTDIR)\apr_dbd_sqlite2.obj" + -@erase "$(INTDIR)\apr_dbd_sqlite2_src.idb" + -@erase "$(INTDIR)\apr_dbd_sqlite2_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_sqlite2-1.dll" + -@erase "$(OUTDIR)\apr_dbd_sqlite2-1.exp" + -@erase "$(OUTDIR)\apr_dbd_sqlite2-1.lib" + -@erase "$(OUTDIR)\apr_dbd_sqlite2-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_SQLITE2=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_sqlite2_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)\apr_dbd_sqlite2-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbd_sqlite2" /d "_DEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_sqlite2.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib sqlite2.lib /nologo /base:"0x6EF10000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_dbd_sqlite2-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_sqlite2-1.dll" /implib:"$(OUTDIR)\apr_dbd_sqlite2-1.lib" /MACHINE:X64 +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_sqlite2.obj" \ + "$(INTDIR)\apr_dbd_sqlite2-1.res" \ + "..\..\apr\x64\Debug\libapr-1.lib" \ + "..\x64\Debug\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_sqlite2-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\x64\Debug\apr_dbd_sqlite2-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\x64\Debug +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_sqlite2-1.dll" + if exist .\x64\Debug\apr_dbd_sqlite2-1.dll.manifest mt.exe -manifest .\x64\Debug\apr_dbd_sqlite2-1.dll.manifest -outputresource:.\x64\Debug\apr_dbd_sqlite2-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ENDIF + + +!IF "$(NO_EXTERNAL_DEPS)" != "1" +!IF EXISTS("apr_dbd_sqlite2.dep") +!INCLUDE "apr_dbd_sqlite2.dep" +!ELSE +!MESSAGE Warning: cannot find "apr_dbd_sqlite2.dep" +!ENDIF +!ENDIF + + +!IF "$(CFG)" == "apr_dbd_sqlite2 - Win32 Release" || "$(CFG)" == "apr_dbd_sqlite2 - Win32 Debug" || "$(CFG)" == "apr_dbd_sqlite2 - x64 Release" || "$(CFG)" == "apr_dbd_sqlite2 - x64 Debug" +SOURCE=.\apr_dbd_sqlite2.c + +"$(INTDIR)\apr_dbd_sqlite2.obj" : $(SOURCE) "$(INTDIR)" + + +!IF "$(CFG)" == "apr_dbd_sqlite2 - Win32 Release" + +"libapr - Win32 Release" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" + cd "..\apr-util\dbd" + +"libapr - Win32 ReleaseCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_sqlite2 - Win32 Debug" + +"libapr - Win32 Debug" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" + cd "..\apr-util\dbd" + +"libapr - Win32 DebugCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_sqlite2 - x64 Release" + +"libapr - x64 Release" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Release" + cd "..\apr-util\dbd" + +"libapr - x64 ReleaseCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Release" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_sqlite2 - x64 Debug" + +"libapr - x64 Debug" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Debug" + cd "..\apr-util\dbd" + +"libapr - x64 DebugCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Debug" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ENDIF + +!IF "$(CFG)" == "apr_dbd_sqlite2 - Win32 Release" + +"libaprutil - Win32 Release" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" + cd ".\dbd" + +"libaprutil - Win32 ReleaseCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN + cd ".\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_sqlite2 - Win32 Debug" + +"libaprutil - Win32 Debug" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" + cd ".\dbd" + +"libaprutil - Win32 DebugCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN + cd ".\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_sqlite2 - x64 Release" + +"libaprutil - x64 Release" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Release" + cd ".\dbd" + +"libaprutil - x64 ReleaseCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Release" RECURSE=1 CLEAN + cd ".\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_sqlite2 - x64 Debug" + +"libaprutil - x64 Debug" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Debug" + cd ".\dbd" + +"libaprutil - x64 DebugCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Debug" RECURSE=1 CLEAN + cd ".\dbd" + +!ENDIF + +SOURCE=..\libaprutil.rc + +!IF "$(CFG)" == "apr_dbd_sqlite2 - Win32 Release" + + +"$(INTDIR)\apr_dbd_sqlite2-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbd_sqlite2-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbd_sqlite2" /d "NDEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_dbd_sqlite2 - Win32 Debug" + + +"$(INTDIR)\apr_dbd_sqlite2-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbd_sqlite2-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbd_sqlite2" /d "_DEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_dbd_sqlite2 - x64 Release" + + +"$(INTDIR)\apr_dbd_sqlite2-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbd_sqlite2-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbd_sqlite2" /d "NDEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_dbd_sqlite2 - x64 Debug" + + +"$(INTDIR)\apr_dbd_sqlite2-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbd_sqlite2-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbd_sqlite2" /d "_DEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ENDIF + + +!ENDIF + Index: contrib/apr-util/dbd/apr_dbd_sqlite3.dep =================================================================== --- /dev/null +++ contrib/apr-util/dbd/apr_dbd_sqlite3.dep @@ -0,0 +1,13 @@ +# Microsoft Developer Studio Generated Dependency File, included by apr_dbd_sqlite3.mak + +.\apr_dbd_sqlite3.c : \ + "..\include\apr_buckets.h"\ + "..\include\apr_dbd.h"\ + "..\include\apu.h"\ + "..\include\private\apr_dbd_internal.h"\ + + +..\libaprutil.rc : \ + "..\include\apu.h"\ + "..\include\apu_version.h"\ + Index: contrib/apr-util/dbd/apr_dbd_sqlite3.dsp =================================================================== --- /dev/null +++ contrib/apr-util/dbd/apr_dbd_sqlite3.dsp @@ -0,0 +1,207 @@ +# Microsoft Developer Studio Project File - Name="apr_dbd_sqlite3" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=apr_dbd_sqlite3 - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "apr_dbd_sqlite3.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "apr_dbd_sqlite3.mak" CFG="apr_dbd_sqlite3 - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "apr_dbd_sqlite3 - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_sqlite3 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_sqlite3 - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_sqlite3 - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "apr_dbd_sqlite3 - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /I "../../sqlite3" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_SQLITE3=1 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_sqlite3_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 /fo"Release/apr_dbd_sqlite3-1.res" /d DLL_NAME="apr_dbd_sqlite3" /d "NDEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib sqlite3.lib /nologo /base:"0x6EF20000" /subsystem:windows /dll /incremental:no /debug /opt:ref +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib sqlite3.lib /nologo /base:"0x6EF20000" /subsystem:windows /dll /incremental:no /debug /libpath:"..\..\sqlite3" /out:"Release\apr_dbd_sqlite3-1.dll" /pdb:"Release\apr_dbd_sqlite3-1.pdb" /implib:"Release\apr_dbd_sqlite3-1.lib" /MACHINE:X86 /opt:ref +# Begin Special Build Tool +TargetPath=Release\apr_dbd_sqlite3-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)" == "apr_dbd_sqlite3 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /I "../../sqlite3" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_SQLITE3=1 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_sqlite3_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 /fo"Debug/apr_dbd_sqlite3-1.res" /d DLL_NAME="apr_dbd_sqlite3" /d "_DEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib sqlite3.lib /nologo /base:"0x6EF20000" /subsystem:windows /dll /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib sqlite3.lib /nologo /base:"0x6EF20000" /subsystem:windows /dll /incremental:no /debug /libpath:"..\..\sqlite3" /out:"Debug\apr_dbd_sqlite3-1.dll" /pdb:"Debug\apr_dbd_sqlite3-1.pdb" /implib:"Debug\apr_dbd_sqlite3-1.lib" /MACHINE:X86 +# Begin Special Build Tool +TargetPath=Debug\apr_dbd_sqlite3-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)" == "apr_dbd_sqlite3 - x64 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "x64\Release" +# PROP BASE Intermediate_Dir "x64\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "x64\Release" +# PROP Intermediate_Dir "x64\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /I "../../sqlite3" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_SQLITE3=1 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_sqlite3_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 /fo"x64/Release/apr_dbd_sqlite3-1.res" /d DLL_NAME="apr_dbd_sqlite3" /d "NDEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib sqlite3.lib /nologo /base:"0x6EF20000" /subsystem:windows /dll /incremental:no /debug /opt:ref +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib sqlite3.lib /nologo /base:"0x6EF20000" /subsystem:windows /dll /incremental:no /libpath:"..\..\sqlite3" /debug /out:"x64\Release\apr_dbd_sqlite3-1.dll" /pdb:"x64\Release\apr_dbd_sqlite3-1.pdb" /implib:"x64\Release\apr_dbd_sqlite3-1.lib" /MACHINE:X64 /opt:ref +# Begin Special Build Tool +TargetPath=x64\Release\apr_dbd_sqlite3-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)" == "apr_dbd_sqlite3 - x64 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "x64\Debug" +# PROP BASE Intermediate_Dir "x64\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "x64\Debug" +# PROP Intermediate_Dir "x64\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /I "../../sqlite3" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_SQLITE3=1 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_sqlite3_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 /fo"x64/Debug/apr_dbd_sqlite3-1.res" /d DLL_NAME="apr_dbd_sqlite3" /d "_DEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib sqlite3.lib /nologo /base:"0x6EF20000" /subsystem:windows /dll /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib sqlite3.lib /nologo /base:"0x6EF20000" /subsystem:windows /dll /incremental:no /libpath:"..\..\sqlite3" /debug /out:"x64\Debug\apr_dbd_sqlite3-1.dll" /pdb:"x64\Debug\apr_dbd_sqlite3-1.pdb" /implib:"x64\Debug\apr_dbd_sqlite3-1.lib" /MACHINE:X64 +# Begin Special Build Tool +TargetPath=x64\Debug\apr_dbd_sqlite3-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 + +!ENDIF + +# Begin Target + +# Name "apr_dbd_sqlite3 - Win32 Release" +# Name "apr_dbd_sqlite3 - Win32 Debug" +# Name "apr_dbd_sqlite3 - x64 Release" +# Name "apr_dbd_sqlite3 - x64 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\apr_dbd_sqlite3.c +# End Source File +# End Group +# Begin Group "Public Header Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\include\apr_dbd.h +# End Source File +# End Group +# Begin Group "Internal Header Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\include\private\apu_config.h +# End Source File +# Begin Source File + +SOURCE=..\include\private\apu_dbd_internal.h +# End Source File +# Begin Source File + +SOURCE=..\include\private\apu_internal.h +# End Source File +# End Group +# Begin Source File + +SOURCE=..\libaprutil.rc +# End Source File +# End Target +# End Project Index: contrib/apr-util/dbd/apr_dbd_sqlite3.mak =================================================================== --- /dev/null +++ contrib/apr-util/dbd/apr_dbd_sqlite3.mak @@ -0,0 +1,594 @@ +# Microsoft Developer Studio Generated NMAKE File, Based on apr_dbd_sqlite3.dsp +!IF "$(CFG)" == "" +CFG=apr_dbd_sqlite3 - Win32 Release +!MESSAGE No configuration specified. Defaulting to apr_dbd_sqlite3 - Win32 Release. +!ENDIF + +!IF "$(CFG)" != "apr_dbd_sqlite3 - Win32 Release" && "$(CFG)" != "apr_dbd_sqlite3 - Win32 Debug" && "$(CFG)" != "apr_dbd_sqlite3 - x64 Release" && "$(CFG)" != "apr_dbd_sqlite3 - 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: +!MESSAGE +!MESSAGE NMAKE /f "apr_dbd_sqlite3.mak" CFG="apr_dbd_sqlite3 - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "apr_dbd_sqlite3 - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_sqlite3 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_sqlite3 - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_sqlite3 - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +!IF "$(CFG)" == "apr_dbd_sqlite3 - Win32 Release" + +OUTDIR=.\Release +INTDIR=.\Release +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_sqlite3-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\apr_dbd_sqlite3-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_sqlite3-1.res" + -@erase "$(INTDIR)\apr_dbd_sqlite3.obj" + -@erase "$(INTDIR)\apr_dbd_sqlite3_src.idb" + -@erase "$(INTDIR)\apr_dbd_sqlite3_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_sqlite3-1.dll" + -@erase "$(OUTDIR)\apr_dbd_sqlite3-1.exp" + -@erase "$(OUTDIR)\apr_dbd_sqlite3-1.lib" + -@erase "$(OUTDIR)\apr_dbd_sqlite3-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /I "../../sqlite3" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_SQLITE3=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_sqlite3_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)\apr_dbd_sqlite3-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbd_sqlite3" /d "NDEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_sqlite3.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib sqlite3.lib /nologo /base:"0x6EF20000" /subsystem:windows /dll /incremental:no /libpath:"..\..\sqlite3" /pdb:"$(OUTDIR)\apr_dbd_sqlite3-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_sqlite3-1.dll" /implib:"$(OUTDIR)\apr_dbd_sqlite3-1.lib" /opt:ref +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_sqlite3.obj" \ + "$(INTDIR)\apr_dbd_sqlite3-1.res" \ + "..\..\apr\Release\libapr-1.lib" \ + "..\Release\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_sqlite3-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Release\apr_dbd_sqlite3-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_sqlite3-1.dll" + if exist .\Release\apr_dbd_sqlite3-1.dll.manifest mt.exe -manifest .\Release\apr_dbd_sqlite3-1.dll.manifest -outputresource:.\Release\apr_dbd_sqlite3-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbd_sqlite3 - Win32 Debug" + +OUTDIR=.\Debug +INTDIR=.\Debug +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_sqlite3-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\apr_dbd_sqlite3-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_sqlite3-1.res" + -@erase "$(INTDIR)\apr_dbd_sqlite3.obj" + -@erase "$(INTDIR)\apr_dbd_sqlite3_src.idb" + -@erase "$(INTDIR)\apr_dbd_sqlite3_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_sqlite3-1.dll" + -@erase "$(OUTDIR)\apr_dbd_sqlite3-1.exp" + -@erase "$(OUTDIR)\apr_dbd_sqlite3-1.lib" + -@erase "$(OUTDIR)\apr_dbd_sqlite3-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /I "../../sqlite3" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_SQLITE3=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_sqlite3_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)\apr_dbd_sqlite3-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbd_sqlite3" /d "_DEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_sqlite3.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib sqlite3.lib /nologo /base:"0x6EF20000" /subsystem:windows /dll /incremental:no /libpath:"..\..\sqlite3" /pdb:"$(OUTDIR)\apr_dbd_sqlite3-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_sqlite3-1.dll" /implib:"$(OUTDIR)\apr_dbd_sqlite3-1.lib" +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_sqlite3.obj" \ + "$(INTDIR)\apr_dbd_sqlite3-1.res" \ + "..\..\apr\Debug\libapr-1.lib" \ + "..\Debug\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_sqlite3-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Debug\apr_dbd_sqlite3-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_sqlite3-1.dll" + if exist .\Debug\apr_dbd_sqlite3-1.dll.manifest mt.exe -manifest .\Debug\apr_dbd_sqlite3-1.dll.manifest -outputresource:.\Debug\apr_dbd_sqlite3-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbd_sqlite3 - x64 Release" + +OUTDIR=.\x64\Release +INTDIR=.\x64\Release +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\x64\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_sqlite3-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - x64 Release" "libapr - x64 Release" "$(OUTDIR)\apr_dbd_sqlite3-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - x64 ReleaseCLEAN" "libaprutil - x64 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_sqlite3-1.res" + -@erase "$(INTDIR)\apr_dbd_sqlite3.obj" + -@erase "$(INTDIR)\apr_dbd_sqlite3_src.idb" + -@erase "$(INTDIR)\apr_dbd_sqlite3_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_sqlite3-1.dll" + -@erase "$(OUTDIR)\apr_dbd_sqlite3-1.exp" + -@erase "$(OUTDIR)\apr_dbd_sqlite3-1.lib" + -@erase "$(OUTDIR)\apr_dbd_sqlite3-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /I "../../sqlite3" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_SQLITE3=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_sqlite3_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)\apr_dbd_sqlite3-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbd_sqlite3" /d "NDEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_sqlite3.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib sqlite3.lib /nologo /base:"0x6EF20000" /subsystem:windows /dll /incremental:no /libpath:"..\..\sqlite3" /pdb:"$(OUTDIR)\apr_dbd_sqlite3-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_sqlite3-1.dll" /implib:"$(OUTDIR)\apr_dbd_sqlite3-1.lib" /MACHINE:X64 /opt:ref +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_sqlite3.obj" \ + "$(INTDIR)\apr_dbd_sqlite3-1.res" \ + "..\..\apr\x64\Release\libapr-1.lib" \ + "..\x64\Release\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_sqlite3-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\x64\Release\apr_dbd_sqlite3-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\x64\Release +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_sqlite3-1.dll" + if exist .\x64\Release\apr_dbd_sqlite3-1.dll.manifest mt.exe -manifest .\x64\Release\apr_dbd_sqlite3-1.dll.manifest -outputresource:.\x64\Release\apr_dbd_sqlite3-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbd_sqlite3 - x64 Debug" + +OUTDIR=.\x64\Debug +INTDIR=.\x64\Debug +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\x64\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_sqlite3-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - x64 Debug" "libapr - x64 Debug" "$(OUTDIR)\apr_dbd_sqlite3-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - x64 DebugCLEAN" "libaprutil - x64 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_sqlite3-1.res" + -@erase "$(INTDIR)\apr_dbd_sqlite3.obj" + -@erase "$(INTDIR)\apr_dbd_sqlite3_src.idb" + -@erase "$(INTDIR)\apr_dbd_sqlite3_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_sqlite3-1.dll" + -@erase "$(OUTDIR)\apr_dbd_sqlite3-1.exp" + -@erase "$(OUTDIR)\apr_dbd_sqlite3-1.lib" + -@erase "$(OUTDIR)\apr_dbd_sqlite3-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /I "../../sqlite3" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_SQLITE3=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_sqlite3_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)\apr_dbd_sqlite3-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbd_sqlite3" /d "_DEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_sqlite3.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib sqlite3.lib /nologo /base:"0x6EF20000" /subsystem:windows /dll /incremental:no /libpath:"..\..\sqlite3" /pdb:"$(OUTDIR)\apr_dbd_sqlite3-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_sqlite3-1.dll" /implib:"$(OUTDIR)\apr_dbd_sqlite3-1.lib" /MACHINE:X64 +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_sqlite3.obj" \ + "$(INTDIR)\apr_dbd_sqlite3-1.res" \ + "..\..\apr\x64\Debug\libapr-1.lib" \ + "..\x64\Debug\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_sqlite3-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\x64\Debug\apr_dbd_sqlite3-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\x64\Debug +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_sqlite3-1.dll" + if exist .\x64\Debug\apr_dbd_sqlite3-1.dll.manifest mt.exe -manifest .\x64\Debug\apr_dbd_sqlite3-1.dll.manifest -outputresource:.\x64\Debug\apr_dbd_sqlite3-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ENDIF + + +!IF "$(NO_EXTERNAL_DEPS)" != "1" +!IF EXISTS("apr_dbd_sqlite3.dep") +!INCLUDE "apr_dbd_sqlite3.dep" +!ELSE +!MESSAGE Warning: cannot find "apr_dbd_sqlite3.dep" +!ENDIF +!ENDIF + + +!IF "$(CFG)" == "apr_dbd_sqlite3 - Win32 Release" || "$(CFG)" == "apr_dbd_sqlite3 - Win32 Debug" || "$(CFG)" == "apr_dbd_sqlite3 - x64 Release" || "$(CFG)" == "apr_dbd_sqlite3 - x64 Debug" +SOURCE=.\apr_dbd_sqlite3.c + +"$(INTDIR)\apr_dbd_sqlite3.obj" : $(SOURCE) "$(INTDIR)" + + +!IF "$(CFG)" == "apr_dbd_sqlite3 - Win32 Release" + +"libapr - Win32 Release" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" + cd "..\apr-util\dbd" + +"libapr - Win32 ReleaseCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_sqlite3 - Win32 Debug" + +"libapr - Win32 Debug" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" + cd "..\apr-util\dbd" + +"libapr - Win32 DebugCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_sqlite3 - x64 Release" + +"libapr - x64 Release" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Release" + cd "..\apr-util\dbd" + +"libapr - x64 ReleaseCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Release" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_sqlite3 - x64 Debug" + +"libapr - x64 Debug" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Debug" + cd "..\apr-util\dbd" + +"libapr - x64 DebugCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Debug" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ENDIF + +!IF "$(CFG)" == "apr_dbd_sqlite3 - Win32 Release" + +"libaprutil - Win32 Release" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" + cd ".\dbd" + +"libaprutil - Win32 ReleaseCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN + cd ".\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_sqlite3 - Win32 Debug" + +"libaprutil - Win32 Debug" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" + cd ".\dbd" + +"libaprutil - Win32 DebugCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN + cd ".\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_sqlite3 - x64 Release" + +"libaprutil - x64 Release" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Release" + cd ".\dbd" + +"libaprutil - x64 ReleaseCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Release" RECURSE=1 CLEAN + cd ".\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_sqlite3 - x64 Debug" + +"libaprutil - x64 Debug" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Debug" + cd ".\dbd" + +"libaprutil - x64 DebugCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Debug" RECURSE=1 CLEAN + cd ".\dbd" + +!ENDIF + +SOURCE=..\libaprutil.rc + +!IF "$(CFG)" == "apr_dbd_sqlite3 - Win32 Release" + + +"$(INTDIR)\apr_dbd_sqlite3-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbd_sqlite3-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbd_sqlite3" /d "NDEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_dbd_sqlite3 - Win32 Debug" + + +"$(INTDIR)\apr_dbd_sqlite3-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbd_sqlite3-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbd_sqlite3" /d "_DEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_dbd_sqlite3 - x64 Release" + + +"$(INTDIR)\apr_dbd_sqlite3-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbd_sqlite3-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbd_sqlite3" /d "NDEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_dbd_sqlite3 - x64 Debug" + + +"$(INTDIR)\apr_dbd_sqlite3-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbd_sqlite3-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbd_sqlite3" /d "_DEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ENDIF + + +!ENDIF + Index: contrib/apr-util/dbd/unsupported/apr_dbd_freetds.c =================================================================== --- contrib/apr-util/dbd/unsupported/apr_dbd_freetds.c +++ contrib/apr-util/dbd/unsupported/apr_dbd_freetds.c @@ -14,6 +14,8 @@ * limitations under the License. */ +#ifdef I_CAN_DEAL_WITH_THIS_PARTIAL_DRIVER_AND_UNMAINTAINED_CODE_FOR_FREETDS + #include "apu.h" #include "apu_config.h" @@ -803,3 +805,5 @@ #endif }; #endif + +#endif Index: contrib/apr-util/dbd/unsupported/apr_dbd_freetds.dep =================================================================== --- /dev/null +++ contrib/apr-util/dbd/unsupported/apr_dbd_freetds.dep @@ -0,0 +1,13 @@ +# Microsoft Developer Studio Generated Dependency File, included by apr_dbd_freetds.mak + +.\apr_dbd_freetds.c : \ + "..\include\apr_dbd.h"\ + "..\include\apu.h"\ + "..\include\private\apr_dbd_internal.h"\ + "..\include\private\apu_config.h"\ + + +..\libaprutil.rc : \ + "..\include\apu.h"\ + "..\include\apu_version.h"\ + Index: contrib/apr-util/dbd/unsupported/apr_dbd_freetds.dsp =================================================================== --- /dev/null +++ contrib/apr-util/dbd/unsupported/apr_dbd_freetds.dsp @@ -0,0 +1,207 @@ +# Microsoft Developer Studio Project File - Name="apr_dbd_freetds" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=apr_dbd_freetds - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "apr_dbd_freetds.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "apr_dbd_freetds.mak" CFG="apr_dbd_freetds - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "apr_dbd_freetds - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_freetds - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_freetds - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_freetds - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "apr_dbd_freetds - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_FREETDS=1 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_freetds_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 /fo"Release/apr_dbd_freetds-1.res" /d DLL_NAME="apr_dbd_freetds" /d "NDEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libTDS.lib /nologo /base:"0x6EF60000" /subsystem:windows /dll /incremental:no /debug /opt:ref +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libTDS.lib /nologo /base:"0x6EF60000" /subsystem:windows /dll /incremental:no /debug /out:"Release\apr_dbd_freetds-1.dll" /pdb:"Release\apr_dbd_freetds-1.pdb" /implib:"Release\apr_dbd_freetds-1.lib" /MACHINE:X86 /opt:ref +# Begin Special Build Tool +TargetPath=Release\apr_dbd_freetds-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)" == "apr_dbd_freetds - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_FREETDS=1 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_freetds_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 /fo"Debug/apr_dbd_freetds-1.res" /d DLL_NAME="apr_dbd_freetds" /d "_DEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libTDS.lib /nologo /base:"0x6EF60000" /subsystem:windows /dll /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libTDS.lib /nologo /base:"0x6EF60000" /subsystem:windows /dll /incremental:no /debug /out:"Debug\apr_dbd_freetds-1.dll" /pdb:"Debug\apr_dbd_freetds-1.pdb" /implib:"Debug\apr_dbd_freetds-1.lib" /MACHINE:X86 +# Begin Special Build Tool +TargetPath=Debug\apr_dbd_freetds-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)" == "apr_dbd_freetds - x64 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "x64\Release" +# PROP BASE Intermediate_Dir "x64\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "x64\Release" +# PROP Intermediate_Dir "x64\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_FREETDS=1 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_freetds_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 /fo"x64/Release/apr_dbd_freetds-1.res" /d DLL_NAME="apr_dbd_freetds" /d "NDEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libTDS.lib /nologo /base:"0x6EF60000" /subsystem:windows /dll /incremental:no /debug /opt:ref +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libTDS.lib /nologo /base:"0x6EF60000" /subsystem:windows /dll /incremental:no /debug /out:"x64\Release\apr_dbd_freetds-1.dll" /pdb:"x64\Release\apr_dbd_freetds-1.pdb" /implib:"x64\Release\apr_dbd_freetds-1.lib" /MACHINE:X64 /opt:ref +# Begin Special Build Tool +TargetPath=x64\Release\apr_dbd_freetds-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)" == "apr_dbd_freetds - x64 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "x64\Debug" +# PROP BASE Intermediate_Dir "x64\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "x64\Debug" +# PROP Intermediate_Dir "x64\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_FREETDS=1 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbd_freetds_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 /fo"x64/Debug/apr_dbd_freetds-1.res" /d DLL_NAME="apr_dbd_freetds" /d "_DEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libTDS.lib /nologo /base:"0x6EF60000" /subsystem:windows /dll /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libTDS.lib /nologo /base:"0x6EF60000" /subsystem:windows /dll /incremental:no /debug /out:"x64\Debug\apr_dbd_freetds-1.dll" /pdb:"x64\Debug\apr_dbd_freetds-1.pdb" /implib:"x64\Debug\apr_dbd_freetds-1.lib" /MACHINE:X64 +# Begin Special Build Tool +TargetPath=x64\Debug\apr_dbd_freetds-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 + +!ENDIF + +# Begin Target + +# Name "apr_dbd_freetds - Win32 Release" +# Name "apr_dbd_freetds - Win32 Debug" +# Name "apr_dbd_freetds - x64 Release" +# Name "apr_dbd_freetds - x64 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\apr_dbd_freetds.c +# End Source File +# End Group +# Begin Group "Public Header Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\include\apr_dbd.h +# End Source File +# End Group +# Begin Group "Internal Header Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\include\private\apu_config.h +# End Source File +# Begin Source File + +SOURCE=..\include\private\apu_dbd_internal.h +# End Source File +# Begin Source File + +SOURCE=..\include\private\apu_internal.h +# End Source File +# End Group +# Begin Source File + +SOURCE=..\libaprutil.rc +# End Source File +# End Target +# End Project Index: contrib/apr-util/dbd/unsupported/apr_dbd_freetds.mak =================================================================== --- /dev/null +++ contrib/apr-util/dbd/unsupported/apr_dbd_freetds.mak @@ -0,0 +1,594 @@ +# Microsoft Developer Studio Generated NMAKE File, Based on apr_dbd_freetds.dsp +!IF "$(CFG)" == "" +CFG=apr_dbd_freetds - Win32 Release +!MESSAGE No configuration specified. Defaulting to apr_dbd_freetds - Win32 Release. +!ENDIF + +!IF "$(CFG)" != "apr_dbd_freetds - Win32 Release" && "$(CFG)" != "apr_dbd_freetds - Win32 Debug" && "$(CFG)" != "apr_dbd_freetds - x64 Release" && "$(CFG)" != "apr_dbd_freetds - 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: +!MESSAGE +!MESSAGE NMAKE /f "apr_dbd_freetds.mak" CFG="apr_dbd_freetds - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "apr_dbd_freetds - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_freetds - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_freetds - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbd_freetds - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +!IF "$(CFG)" == "apr_dbd_freetds - Win32 Release" + +OUTDIR=.\Release +INTDIR=.\Release +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_freetds-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\apr_dbd_freetds-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_freetds-1.res" + -@erase "$(INTDIR)\apr_dbd_freetds.obj" + -@erase "$(INTDIR)\apr_dbd_freetds_src.idb" + -@erase "$(INTDIR)\apr_dbd_freetds_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_freetds-1.dll" + -@erase "$(OUTDIR)\apr_dbd_freetds-1.exp" + -@erase "$(OUTDIR)\apr_dbd_freetds-1.lib" + -@erase "$(OUTDIR)\apr_dbd_freetds-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_FREETDS=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_freetds_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)\apr_dbd_freetds-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbd_freetds" /d "NDEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_freetds.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libTDS.lib /nologo /base:"0x6EF60000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_dbd_freetds-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_freetds-1.dll" /implib:"$(OUTDIR)\apr_dbd_freetds-1.lib" /opt:ref +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_freetds.obj" \ + "$(INTDIR)\apr_dbd_freetds-1.res" \ + "..\..\apr\Release\libapr-1.lib" \ + "..\Release\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_freetds-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Release\apr_dbd_freetds-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_freetds-1.dll" + if exist .\Release\apr_dbd_freetds-1.dll.manifest mt.exe -manifest .\Release\apr_dbd_freetds-1.dll.manifest -outputresource:.\Release\apr_dbd_freetds-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbd_freetds - Win32 Debug" + +OUTDIR=.\Debug +INTDIR=.\Debug +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_freetds-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\apr_dbd_freetds-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_freetds-1.res" + -@erase "$(INTDIR)\apr_dbd_freetds.obj" + -@erase "$(INTDIR)\apr_dbd_freetds_src.idb" + -@erase "$(INTDIR)\apr_dbd_freetds_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_freetds-1.dll" + -@erase "$(OUTDIR)\apr_dbd_freetds-1.exp" + -@erase "$(OUTDIR)\apr_dbd_freetds-1.lib" + -@erase "$(OUTDIR)\apr_dbd_freetds-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_FREETDS=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_freetds_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)\apr_dbd_freetds-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbd_freetds" /d "_DEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_freetds.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libTDS.lib /nologo /base:"0x6EF60000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_dbd_freetds-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_freetds-1.dll" /implib:"$(OUTDIR)\apr_dbd_freetds-1.lib" +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_freetds.obj" \ + "$(INTDIR)\apr_dbd_freetds-1.res" \ + "..\..\apr\Debug\libapr-1.lib" \ + "..\Debug\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_freetds-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Debug\apr_dbd_freetds-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_freetds-1.dll" + if exist .\Debug\apr_dbd_freetds-1.dll.manifest mt.exe -manifest .\Debug\apr_dbd_freetds-1.dll.manifest -outputresource:.\Debug\apr_dbd_freetds-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbd_freetds - x64 Release" + +OUTDIR=.\x64\Release +INTDIR=.\x64\Release +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\x64\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_freetds-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - x64 Release" "libapr - x64 Release" "$(OUTDIR)\apr_dbd_freetds-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - x64 ReleaseCLEAN" "libaprutil - x64 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_freetds-1.res" + -@erase "$(INTDIR)\apr_dbd_freetds.obj" + -@erase "$(INTDIR)\apr_dbd_freetds_src.idb" + -@erase "$(INTDIR)\apr_dbd_freetds_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_freetds-1.dll" + -@erase "$(OUTDIR)\apr_dbd_freetds-1.exp" + -@erase "$(OUTDIR)\apr_dbd_freetds-1.lib" + -@erase "$(OUTDIR)\apr_dbd_freetds-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_FREETDS=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_freetds_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)\apr_dbd_freetds-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbd_freetds" /d "NDEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_freetds.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libTDS.lib /nologo /base:"0x6EF60000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_dbd_freetds-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_freetds-1.dll" /implib:"$(OUTDIR)\apr_dbd_freetds-1.lib" /MACHINE:X64 /opt:ref +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_freetds.obj" \ + "$(INTDIR)\apr_dbd_freetds-1.res" \ + "..\..\apr\x64\Release\libapr-1.lib" \ + "..\x64\Release\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_freetds-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\x64\Release\apr_dbd_freetds-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\x64\Release +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_freetds-1.dll" + if exist .\x64\Release\apr_dbd_freetds-1.dll.manifest mt.exe -manifest .\x64\Release\apr_dbd_freetds-1.dll.manifest -outputresource:.\x64\Release\apr_dbd_freetds-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbd_freetds - x64 Debug" + +OUTDIR=.\x64\Debug +INTDIR=.\x64\Debug +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\x64\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbd_freetds-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - x64 Debug" "libapr - x64 Debug" "$(OUTDIR)\apr_dbd_freetds-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - x64 DebugCLEAN" "libaprutil - x64 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbd_freetds-1.res" + -@erase "$(INTDIR)\apr_dbd_freetds.obj" + -@erase "$(INTDIR)\apr_dbd_freetds_src.idb" + -@erase "$(INTDIR)\apr_dbd_freetds_src.pdb" + -@erase "$(OUTDIR)\apr_dbd_freetds-1.dll" + -@erase "$(OUTDIR)\apr_dbd_freetds-1.exp" + -@erase "$(OUTDIR)\apr_dbd_freetds-1.lib" + -@erase "$(OUTDIR)\apr_dbd_freetds-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_FREETDS=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbd_freetds_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)\apr_dbd_freetds-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbd_freetds" /d "_DEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbd_freetds.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libTDS.lib /nologo /base:"0x6EF60000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_dbd_freetds-1.pdb" /debug /out:"$(OUTDIR)\apr_dbd_freetds-1.dll" /implib:"$(OUTDIR)\apr_dbd_freetds-1.lib" /MACHINE:X64 +LINK32_OBJS= \ + "$(INTDIR)\apr_dbd_freetds.obj" \ + "$(INTDIR)\apr_dbd_freetds-1.res" \ + "..\..\apr\x64\Debug\libapr-1.lib" \ + "..\x64\Debug\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbd_freetds-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\x64\Debug\apr_dbd_freetds-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\x64\Debug +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbd_freetds-1.dll" + if exist .\x64\Debug\apr_dbd_freetds-1.dll.manifest mt.exe -manifest .\x64\Debug\apr_dbd_freetds-1.dll.manifest -outputresource:.\x64\Debug\apr_dbd_freetds-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ENDIF + + +!IF "$(NO_EXTERNAL_DEPS)" != "1" +!IF EXISTS("apr_dbd_freetds.dep") +!INCLUDE "apr_dbd_freetds.dep" +!ELSE +!MESSAGE Warning: cannot find "apr_dbd_freetds.dep" +!ENDIF +!ENDIF + + +!IF "$(CFG)" == "apr_dbd_freetds - Win32 Release" || "$(CFG)" == "apr_dbd_freetds - Win32 Debug" || "$(CFG)" == "apr_dbd_freetds - x64 Release" || "$(CFG)" == "apr_dbd_freetds - x64 Debug" +SOURCE=.\apr_dbd_freetds.c + +"$(INTDIR)\apr_dbd_freetds.obj" : $(SOURCE) "$(INTDIR)" + + +!IF "$(CFG)" == "apr_dbd_freetds - Win32 Release" + +"libapr - Win32 Release" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" + cd "..\apr-util\dbd" + +"libapr - Win32 ReleaseCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_freetds - Win32 Debug" + +"libapr - Win32 Debug" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" + cd "..\apr-util\dbd" + +"libapr - Win32 DebugCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_freetds - x64 Release" + +"libapr - x64 Release" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Release" + cd "..\apr-util\dbd" + +"libapr - x64 ReleaseCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Release" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_freetds - x64 Debug" + +"libapr - x64 Debug" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Debug" + cd "..\apr-util\dbd" + +"libapr - x64 DebugCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Debug" RECURSE=1 CLEAN + cd "..\apr-util\dbd" + +!ENDIF + +!IF "$(CFG)" == "apr_dbd_freetds - Win32 Release" + +"libaprutil - Win32 Release" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" + cd ".\dbd" + +"libaprutil - Win32 ReleaseCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN + cd ".\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_freetds - Win32 Debug" + +"libaprutil - Win32 Debug" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" + cd ".\dbd" + +"libaprutil - Win32 DebugCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN + cd ".\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_freetds - x64 Release" + +"libaprutil - x64 Release" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Release" + cd ".\dbd" + +"libaprutil - x64 ReleaseCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Release" RECURSE=1 CLEAN + cd ".\dbd" + +!ELSEIF "$(CFG)" == "apr_dbd_freetds - x64 Debug" + +"libaprutil - x64 Debug" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Debug" + cd ".\dbd" + +"libaprutil - x64 DebugCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Debug" RECURSE=1 CLEAN + cd ".\dbd" + +!ENDIF + +SOURCE=..\libaprutil.rc + +!IF "$(CFG)" == "apr_dbd_freetds - Win32 Release" + + +"$(INTDIR)\apr_dbd_freetds-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbd_freetds-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbd_freetds" /d "NDEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_dbd_freetds - Win32 Debug" + + +"$(INTDIR)\apr_dbd_freetds-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbd_freetds-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbd_freetds" /d "_DEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_dbd_freetds - x64 Release" + + +"$(INTDIR)\apr_dbd_freetds-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbd_freetds-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbd_freetds" /d "NDEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_dbd_freetds - x64 Debug" + + +"$(INTDIR)\apr_dbd_freetds-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbd_freetds-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbd_freetds" /d "_DEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ENDIF + + +!ENDIF + Index: contrib/apr-util/dbm/apr_dbm_db.dep =================================================================== --- /dev/null +++ contrib/apr-util/dbm/apr_dbm_db.dep @@ -0,0 +1,15 @@ +# Microsoft Developer Studio Generated Dependency File, included by apr_dbm_db.mak + +.\apr_dbm_berkeleydb.c : \ + "..\include\apr_dbm.h"\ + "..\include\apu.h"\ + "..\include\apu_want.h"\ + "..\include\private\apr_dbm_private.h"\ + "..\include\private\apu_config.h"\ + "..\include\private\apu_select_dbm.h"\ + + +..\libaprutil.rc : \ + "..\include\apu.h"\ + "..\include\apu_version.h"\ + Index: contrib/apr-util/dbm/apr_dbm_db.dsp =================================================================== --- /dev/null +++ contrib/apr-util/dbm/apr_dbm_db.dsp @@ -0,0 +1,215 @@ +# Microsoft Developer Studio Project File - Name="apr_dbm_db" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=apr_dbm_db - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "apr_dbm_db.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "apr_dbm_db.mak" CFG="apr_dbm_db - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "apr_dbm_db - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbm_db - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbm_db - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbm_db - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "apr_dbm_db - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /I "../../db" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_DB=1 /D APU_HAVE_DB_VERSION=4 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbm_db_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 /fo"Release/apr_dbm_db-1.res" /d DLL_NAME="apr_dbm_db" /d "NDEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libdb47.lib /nologo /base:"0x6F000000" /subsystem:windows /dll /incremental:no /debug /opt:ref +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libdb47.lib /nologo /base:"0x6F000000" /subsystem:windows /dll /incremental:no /libpath:"..\..\db" /debug /out:"Release\apr_dbm_db-1.dll" /pdb:"Release\apr_dbm_db-1.pdb" /implib:"Release\apr_dbm_db-1.lib" /MACHINE:X86 /opt:ref +# Begin Special Build Tool +TargetPath=Release\apr_dbm_db-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)" == "apr_dbm_db - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /I "../../db" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_DB=1 /D APU_HAVE_DB_VERSION=4 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbm_db_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 /fo"Debug/apr_dbm_db-1.res" /d DLL_NAME="apr_dbm_db" /d "_DEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libdb47.lib /nologo /base:"0x6F000000" /subsystem:windows /dll /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libdb47.lib /nologo /base:"0x6F000000" /subsystem:windows /dll /incremental:no /libpath:"..\..\db" /debug /out:"Debug\apr_dbm_db-1.dll" /pdb:"Debug\apr_dbm_db-1.pdb" /implib:"Debug\apr_dbm_db-1.lib" /MACHINE:X86 +# Begin Special Build Tool +TargetPath=Debug\apr_dbm_db-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)" == "apr_dbm_db - x64 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "x64\Release" +# PROP BASE Intermediate_Dir "x64\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "x64\Release" +# PROP Intermediate_Dir "x64\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /I "../../db" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_DB=1 /D APU_HAVE_DB_VERSION=4 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbm_db_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 /fo"x64/Release/apr_dbm_db-1.res" /d DLL_NAME="apr_dbm_db" /d "NDEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libdb47.lib /nologo /base:"0x6F000000" /subsystem:windows /dll /incremental:no /debug /opt:ref +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libdb47.lib /nologo /base:"0x6F000000" /subsystem:windows /dll /incremental:no /libpath:"..\..\db" /debug /out:"x64\Release\apr_dbm_db-1.dll" /pdb:"x64\Release\apr_dbm_db-1.pdb" /implib:"x64\Release\apr_dbm_db-1.lib" /MACHINE:X64 /opt:ref +# Begin Special Build Tool +TargetPath=x64\Release\apr_dbm_db-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)" == "apr_dbm_db - x64 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "x64\Debug" +# PROP BASE Intermediate_Dir "x64\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "x64\Debug" +# PROP Intermediate_Dir "x64\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /I "../../db" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_DB=1 /D APU_HAVE_DB_VERSION=4 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbm_db_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 /fo"x64/Debug/apr_dbm_db-1.res" /d DLL_NAME="apr_dbm_db" /d "_DEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libdb47.lib /nologo /base:"0x6F000000" /subsystem:windows /dll /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libdb47.lib /nologo /base:"0x6F000000" /subsystem:windows /dll /incremental:no /libpath:"..\..\db" /debug /out:"x64\Debug\apr_dbm_db-1.dll" /pdb:"x64\Debug\apr_dbm_db-1.pdb" /implib:"x64\Debug\apr_dbm_db-1.lib" /MACHINE:X64 +# Begin Special Build Tool +TargetPath=x64\Debug\apr_dbm_db-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 + +!ENDIF + +# Begin Target + +# Name "apr_dbm_db - Win32 Release" +# Name "apr_dbm_db - Win32 Debug" +# Name "apr_dbm_db - x64 Release" +# Name "apr_dbm_db - x64 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\apr_dbm_berkeleydb.c +# End Source File +# End Group +# Begin Group "Public Header Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\include\apr_dbm.h +# End Source File +# End Group +# Begin Group "Internal Header Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\include\private\apu_dbm_private.h +# End Source File +# Begin Source File + +SOURCE=..\include\private\apu_config.h +# End Source File +# Begin Source File + +SOURCE=..\include\private\apu_dbd_internal.h +# End Source File +# Begin Source File + +SOURCE=..\include\private\apu_internal.h +# End Source File +# Begin Source File + +SOURCE=..\include\private\apu_select_dbm.h +# End Source File +# End Group +# Begin Source File + +SOURCE=..\libaprutil.rc +# End Source File +# End Target +# End Project Index: contrib/apr-util/dbm/apr_dbm_db.mak =================================================================== --- /dev/null +++ contrib/apr-util/dbm/apr_dbm_db.mak @@ -0,0 +1,594 @@ +# Microsoft Developer Studio Generated NMAKE File, Based on apr_dbm_db.dsp +!IF "$(CFG)" == "" +CFG=apr_dbm_db - Win32 Release +!MESSAGE No configuration specified. Defaulting to apr_dbm_db - Win32 Release. +!ENDIF + +!IF "$(CFG)" != "apr_dbm_db - Win32 Release" && "$(CFG)" != "apr_dbm_db - Win32 Debug" && "$(CFG)" != "apr_dbm_db - x64 Release" && "$(CFG)" != "apr_dbm_db - 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: +!MESSAGE +!MESSAGE NMAKE /f "apr_dbm_db.mak" CFG="apr_dbm_db - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "apr_dbm_db - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbm_db - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbm_db - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbm_db - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +!IF "$(CFG)" == "apr_dbm_db - Win32 Release" + +OUTDIR=.\Release +INTDIR=.\Release +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbm_db-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\apr_dbm_db-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbm_berkeleydb.obj" + -@erase "$(INTDIR)\apr_dbm_db-1.res" + -@erase "$(INTDIR)\apr_dbm_db_src.idb" + -@erase "$(INTDIR)\apr_dbm_db_src.pdb" + -@erase "$(OUTDIR)\apr_dbm_db-1.dll" + -@erase "$(OUTDIR)\apr_dbm_db-1.exp" + -@erase "$(OUTDIR)\apr_dbm_db-1.lib" + -@erase "$(OUTDIR)\apr_dbm_db-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /I "../../db" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_DB=1 /D APU_HAVE_DB_VERSION=4 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbm_db_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)\apr_dbm_db-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbm_db" /d "NDEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbm_db.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libdb47.lib /nologo /base:"0x6F000000" /subsystem:windows /dll /incremental:no /libpath:"..\..\db" /pdb:"$(OUTDIR)\apr_dbm_db-1.pdb" /debug /out:"$(OUTDIR)\apr_dbm_db-1.dll" /implib:"$(OUTDIR)\apr_dbm_db-1.lib" /opt:ref +LINK32_OBJS= \ + "$(INTDIR)\apr_dbm_berkeleydb.obj" \ + "$(INTDIR)\apr_dbm_db-1.res" \ + "..\..\apr\Release\libapr-1.lib" \ + "..\Release\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbm_db-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Release\apr_dbm_db-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbm_db-1.dll" + if exist .\Release\apr_dbm_db-1.dll.manifest mt.exe -manifest .\Release\apr_dbm_db-1.dll.manifest -outputresource:.\Release\apr_dbm_db-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbm_db - Win32 Debug" + +OUTDIR=.\Debug +INTDIR=.\Debug +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbm_db-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\apr_dbm_db-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbm_berkeleydb.obj" + -@erase "$(INTDIR)\apr_dbm_db-1.res" + -@erase "$(INTDIR)\apr_dbm_db_src.idb" + -@erase "$(INTDIR)\apr_dbm_db_src.pdb" + -@erase "$(OUTDIR)\apr_dbm_db-1.dll" + -@erase "$(OUTDIR)\apr_dbm_db-1.exp" + -@erase "$(OUTDIR)\apr_dbm_db-1.lib" + -@erase "$(OUTDIR)\apr_dbm_db-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /I "../../db" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_DB=1 /D APU_HAVE_DB_VERSION=4 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbm_db_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)\apr_dbm_db-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbm_db" /d "_DEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbm_db.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libdb47.lib /nologo /base:"0x6F000000" /subsystem:windows /dll /incremental:no /libpath:"..\..\db" /pdb:"$(OUTDIR)\apr_dbm_db-1.pdb" /debug /out:"$(OUTDIR)\apr_dbm_db-1.dll" /implib:"$(OUTDIR)\apr_dbm_db-1.lib" +LINK32_OBJS= \ + "$(INTDIR)\apr_dbm_berkeleydb.obj" \ + "$(INTDIR)\apr_dbm_db-1.res" \ + "..\..\apr\Debug\libapr-1.lib" \ + "..\Debug\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbm_db-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Debug\apr_dbm_db-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbm_db-1.dll" + if exist .\Debug\apr_dbm_db-1.dll.manifest mt.exe -manifest .\Debug\apr_dbm_db-1.dll.manifest -outputresource:.\Debug\apr_dbm_db-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbm_db - x64 Release" + +OUTDIR=.\x64\Release +INTDIR=.\x64\Release +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\x64\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbm_db-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - x64 Release" "libapr - x64 Release" "$(OUTDIR)\apr_dbm_db-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - x64 ReleaseCLEAN" "libaprutil - x64 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbm_berkeleydb.obj" + -@erase "$(INTDIR)\apr_dbm_db-1.res" + -@erase "$(INTDIR)\apr_dbm_db_src.idb" + -@erase "$(INTDIR)\apr_dbm_db_src.pdb" + -@erase "$(OUTDIR)\apr_dbm_db-1.dll" + -@erase "$(OUTDIR)\apr_dbm_db-1.exp" + -@erase "$(OUTDIR)\apr_dbm_db-1.lib" + -@erase "$(OUTDIR)\apr_dbm_db-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /I "../../db" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_DB=1 /D APU_HAVE_DB_VERSION=4 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbm_db_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)\apr_dbm_db-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbm_db" /d "NDEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbm_db.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libdb47.lib /nologo /base:"0x6F000000" /subsystem:windows /dll /incremental:no /libpath:"..\..\db" /pdb:"$(OUTDIR)\apr_dbm_db-1.pdb" /debug /out:"$(OUTDIR)\apr_dbm_db-1.dll" /implib:"$(OUTDIR)\apr_dbm_db-1.lib" /MACHINE:X64 /opt:ref +LINK32_OBJS= \ + "$(INTDIR)\apr_dbm_berkeleydb.obj" \ + "$(INTDIR)\apr_dbm_db-1.res" \ + "..\..\apr\x64\Release\libapr-1.lib" \ + "..\x64\Release\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbm_db-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\x64\Release\apr_dbm_db-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\x64\Release +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbm_db-1.dll" + if exist .\x64\Release\apr_dbm_db-1.dll.manifest mt.exe -manifest .\x64\Release\apr_dbm_db-1.dll.manifest -outputresource:.\x64\Release\apr_dbm_db-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbm_db - x64 Debug" + +OUTDIR=.\x64\Debug +INTDIR=.\x64\Debug +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\x64\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbm_db-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - x64 Debug" "libapr - x64 Debug" "$(OUTDIR)\apr_dbm_db-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - x64 DebugCLEAN" "libaprutil - x64 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbm_berkeleydb.obj" + -@erase "$(INTDIR)\apr_dbm_db-1.res" + -@erase "$(INTDIR)\apr_dbm_db_src.idb" + -@erase "$(INTDIR)\apr_dbm_db_src.pdb" + -@erase "$(OUTDIR)\apr_dbm_db-1.dll" + -@erase "$(OUTDIR)\apr_dbm_db-1.exp" + -@erase "$(OUTDIR)\apr_dbm_db-1.lib" + -@erase "$(OUTDIR)\apr_dbm_db-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /I "../../db" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_DB=1 /D APU_HAVE_DB_VERSION=4 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbm_db_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)\apr_dbm_db-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbm_db" /d "_DEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbm_db.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libdb47.lib /nologo /base:"0x6F000000" /subsystem:windows /dll /incremental:no /libpath:"..\..\db" /pdb:"$(OUTDIR)\apr_dbm_db-1.pdb" /debug /out:"$(OUTDIR)\apr_dbm_db-1.dll" /implib:"$(OUTDIR)\apr_dbm_db-1.lib" /MACHINE:X64 +LINK32_OBJS= \ + "$(INTDIR)\apr_dbm_berkeleydb.obj" \ + "$(INTDIR)\apr_dbm_db-1.res" \ + "..\..\apr\x64\Debug\libapr-1.lib" \ + "..\x64\Debug\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbm_db-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\x64\Debug\apr_dbm_db-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\x64\Debug +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbm_db-1.dll" + if exist .\x64\Debug\apr_dbm_db-1.dll.manifest mt.exe -manifest .\x64\Debug\apr_dbm_db-1.dll.manifest -outputresource:.\x64\Debug\apr_dbm_db-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ENDIF + + +!IF "$(NO_EXTERNAL_DEPS)" != "1" +!IF EXISTS("apr_dbm_db.dep") +!INCLUDE "apr_dbm_db.dep" +!ELSE +!MESSAGE Warning: cannot find "apr_dbm_db.dep" +!ENDIF +!ENDIF + + +!IF "$(CFG)" == "apr_dbm_db - Win32 Release" || "$(CFG)" == "apr_dbm_db - Win32 Debug" || "$(CFG)" == "apr_dbm_db - x64 Release" || "$(CFG)" == "apr_dbm_db - x64 Debug" +SOURCE=.\apr_dbm_berkeleydb.c + +"$(INTDIR)\apr_dbm_berkeleydb.obj" : $(SOURCE) "$(INTDIR)" + + +!IF "$(CFG)" == "apr_dbm_db - Win32 Release" + +"libapr - Win32 Release" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" + cd "..\apr-util\dbm" + +"libapr - Win32 ReleaseCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN + cd "..\apr-util\dbm" + +!ELSEIF "$(CFG)" == "apr_dbm_db - Win32 Debug" + +"libapr - Win32 Debug" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" + cd "..\apr-util\dbm" + +"libapr - Win32 DebugCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN + cd "..\apr-util\dbm" + +!ELSEIF "$(CFG)" == "apr_dbm_db - x64 Release" + +"libapr - x64 Release" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Release" + cd "..\apr-util\dbm" + +"libapr - x64 ReleaseCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Release" RECURSE=1 CLEAN + cd "..\apr-util\dbm" + +!ELSEIF "$(CFG)" == "apr_dbm_db - x64 Debug" + +"libapr - x64 Debug" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Debug" + cd "..\apr-util\dbm" + +"libapr - x64 DebugCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Debug" RECURSE=1 CLEAN + cd "..\apr-util\dbm" + +!ENDIF + +!IF "$(CFG)" == "apr_dbm_db - Win32 Release" + +"libaprutil - Win32 Release" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" + cd ".\dbm" + +"libaprutil - Win32 ReleaseCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN + cd ".\dbm" + +!ELSEIF "$(CFG)" == "apr_dbm_db - Win32 Debug" + +"libaprutil - Win32 Debug" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" + cd ".\dbm" + +"libaprutil - Win32 DebugCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN + cd ".\dbm" + +!ELSEIF "$(CFG)" == "apr_dbm_db - x64 Release" + +"libaprutil - x64 Release" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Release" + cd ".\dbm" + +"libaprutil - x64 ReleaseCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Release" RECURSE=1 CLEAN + cd ".\dbm" + +!ELSEIF "$(CFG)" == "apr_dbm_db - x64 Debug" + +"libaprutil - x64 Debug" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Debug" + cd ".\dbm" + +"libaprutil - x64 DebugCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Debug" RECURSE=1 CLEAN + cd ".\dbm" + +!ENDIF + +SOURCE=..\libaprutil.rc + +!IF "$(CFG)" == "apr_dbm_db - Win32 Release" + + +"$(INTDIR)\apr_dbm_db-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbm_db-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbm_db" /d "NDEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_dbm_db - Win32 Debug" + + +"$(INTDIR)\apr_dbm_db-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbm_db-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbm_db" /d "_DEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_dbm_db - x64 Release" + + +"$(INTDIR)\apr_dbm_db-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbm_db-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbm_db" /d "NDEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_dbm_db - x64 Debug" + + +"$(INTDIR)\apr_dbm_db-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbm_db-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbm_db" /d "_DEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ENDIF + + +!ENDIF + Index: contrib/apr-util/dbm/apr_dbm_gdbm.dep =================================================================== --- /dev/null +++ contrib/apr-util/dbm/apr_dbm_gdbm.dep @@ -0,0 +1,14 @@ +# Microsoft Developer Studio Generated Dependency File, included by apr_dbm_gdbm.mak + +.\apr_dbm_gdbm.c : \ + "..\include\apr_dbm.h"\ + "..\include\apu.h"\ + "..\include\private\apr_dbm_private.h"\ + "..\include\private\apu_config.h"\ + "..\include\private\apu_select_dbm.h"\ + + +..\libaprutil.rc : \ + "..\include\apu.h"\ + "..\include\apu_version.h"\ + Index: contrib/apr-util/dbm/apr_dbm_gdbm.dsp =================================================================== --- /dev/null +++ contrib/apr-util/dbm/apr_dbm_gdbm.dsp @@ -0,0 +1,215 @@ +# Microsoft Developer Studio Project File - Name="apr_dbm_gdbm" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=apr_dbm_gdbm - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "apr_dbm_gdbm.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "apr_dbm_gdbm.mak" CFG="apr_dbm_gdbm - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "apr_dbm_gdbm - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbm_gdbm - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbm_gdbm - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbm_gdbm - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "apr_dbm_gdbm - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_GDBM=1 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbm_gdbm_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 /fo"Release/apr_dbm_gdbm-1.res" /d DLL_NAME="apr_dbm_gdbm" /d "NDEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libgdbm.lib /nologo /base:"0x6F010000" /subsystem:windows /dll /incremental:no /debug /opt:ref +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libgdbm.lib /nologo /base:"0x6F010000" /subsystem:windows /dll /incremental:no /debug /out:"Release\apr_dbm_gdbm-1.dll" /pdb:"Release\apr_dbm_gdbm-1.pdb" /implib:"Release\apr_dbm_gdbm-1.lib" /MACHINE:X86 /opt:ref +# Begin Special Build Tool +TargetPath=Release\apr_dbm_gdbm-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)" == "apr_dbm_gdbm - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_GDBM=1 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbm_gdbm_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 /fo"Debug/apr_dbm_gdbm-1.res" /d DLL_NAME="apr_dbm_gdbm" /d "_DEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libgdbm.lib /nologo /base:"0x6F010000" /subsystem:windows /dll /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libgdbm.lib /nologo /base:"0x6F010000" /subsystem:windows /dll /incremental:no /debug /out:"Debug\apr_dbm_gdbm-1.dll" /pdb:"Debug\apr_dbm_gdbm-1.pdb" /implib:"Debug\apr_dbm_gdbm-1.lib" /MACHINE:X86 +# Begin Special Build Tool +TargetPath=Debug\apr_dbm_gdbm-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)" == "apr_dbm_gdbm - x64 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "x64\Release" +# PROP BASE Intermediate_Dir "x64\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "x64\Release" +# PROP Intermediate_Dir "x64\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_GDBM=1 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbm_gdbm_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 /fo"x64/Release/apr_dbm_gdbm-1.res" /d DLL_NAME="apr_dbm_gdbm" /d "NDEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libgdbm.lib /nologo /base:"0x6F010000" /subsystem:windows /dll /incremental:no /debug /opt:ref +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libgdbm.lib /nologo /base:"0x6F010000" /subsystem:windows /dll /incremental:no /debug /out:"x64\Release\apr_dbm_gdbm-1.dll" /pdb:"x64\Release\apr_dbm_gdbm-1.pdb" /implib:"x64\Release\apr_dbm_gdbm-1.lib" /MACHINE:X64 /opt:ref +# Begin Special Build Tool +TargetPath=x64\Release\apr_dbm_gdbm-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)" == "apr_dbm_gdbm - x64 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "x64\Debug" +# PROP BASE Intermediate_Dir "x64\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "x64\Debug" +# PROP Intermediate_Dir "x64\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_GDBM=1 /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_dbm_gdbm_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 /fo"x64/Debug/apr_dbm_gdbm-1.res" /d DLL_NAME="apr_dbm_gdbm" /d "_DEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libgdbm.lib /nologo /base:"0x6F010000" /subsystem:windows /dll /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libgdbm.lib /nologo /base:"0x6F010000" /subsystem:windows /dll /incremental:no /debug /out:"x64\Debug\apr_dbm_gdbm-1.dll" /pdb:"x64\Debug\apr_dbm_gdbm-1.pdb" /implib:"x64\Debug\apr_dbm_gdbm-1.lib" /MACHINE:X64 +# Begin Special Build Tool +TargetPath=x64\Debug\apr_dbm_gdbm-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 + +!ENDIF + +# Begin Target + +# Name "apr_dbm_gdbm - Win32 Release" +# Name "apr_dbm_gdbm - Win32 Debug" +# Name "apr_dbm_gdbm - x64 Release" +# Name "apr_dbm_gdbm - x64 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\apr_dbm_gdbm.c +# End Source File +# End Group +# Begin Group "Public Header Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\include\apr_dbm.h +# End Source File +# End Group +# Begin Group "Internal Header Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\include\private\apu_dbm_private.h +# End Source File +# Begin Source File + +SOURCE=..\include\private\apu_config.h +# End Source File +# Begin Source File + +SOURCE=..\include\private\apu_dbd_internal.h +# End Source File +# Begin Source File + +SOURCE=..\include\private\apu_internal.h +# End Source File +# Begin Source File + +SOURCE=..\include\private\apu_select_dbm.h +# End Source File +# End Group +# Begin Source File + +SOURCE=..\libaprutil.rc +# End Source File +# End Target +# End Project Index: contrib/apr-util/dbm/apr_dbm_gdbm.mak =================================================================== --- /dev/null +++ contrib/apr-util/dbm/apr_dbm_gdbm.mak @@ -0,0 +1,594 @@ +# Microsoft Developer Studio Generated NMAKE File, Based on apr_dbm_gdbm.dsp +!IF "$(CFG)" == "" +CFG=apr_dbm_gdbm - Win32 Release +!MESSAGE No configuration specified. Defaulting to apr_dbm_gdbm - Win32 Release. +!ENDIF + +!IF "$(CFG)" != "apr_dbm_gdbm - Win32 Release" && "$(CFG)" != "apr_dbm_gdbm - Win32 Debug" && "$(CFG)" != "apr_dbm_gdbm - x64 Release" && "$(CFG)" != "apr_dbm_gdbm - 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: +!MESSAGE +!MESSAGE NMAKE /f "apr_dbm_gdbm.mak" CFG="apr_dbm_gdbm - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "apr_dbm_gdbm - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbm_gdbm - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbm_gdbm - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_dbm_gdbm - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +!IF "$(CFG)" == "apr_dbm_gdbm - Win32 Release" + +OUTDIR=.\Release +INTDIR=.\Release +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbm_gdbm-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\apr_dbm_gdbm-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbm_gdbm-1.res" + -@erase "$(INTDIR)\apr_dbm_gdbm.obj" + -@erase "$(INTDIR)\apr_dbm_gdbm_src.idb" + -@erase "$(INTDIR)\apr_dbm_gdbm_src.pdb" + -@erase "$(OUTDIR)\apr_dbm_gdbm-1.dll" + -@erase "$(OUTDIR)\apr_dbm_gdbm-1.exp" + -@erase "$(OUTDIR)\apr_dbm_gdbm-1.lib" + -@erase "$(OUTDIR)\apr_dbm_gdbm-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_GDBM=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbm_gdbm_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)\apr_dbm_gdbm-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbm_gdbm" /d "NDEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbm_gdbm.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libgdbm.lib /nologo /base:"0x6F010000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_dbm_gdbm-1.pdb" /debug /out:"$(OUTDIR)\apr_dbm_gdbm-1.dll" /implib:"$(OUTDIR)\apr_dbm_gdbm-1.lib" /opt:ref +LINK32_OBJS= \ + "$(INTDIR)\apr_dbm_gdbm.obj" \ + "$(INTDIR)\apr_dbm_gdbm-1.res" \ + "..\..\apr\Release\libapr-1.lib" \ + "..\Release\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbm_gdbm-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Release\apr_dbm_gdbm-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbm_gdbm-1.dll" + if exist .\Release\apr_dbm_gdbm-1.dll.manifest mt.exe -manifest .\Release\apr_dbm_gdbm-1.dll.manifest -outputresource:.\Release\apr_dbm_gdbm-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbm_gdbm - Win32 Debug" + +OUTDIR=.\Debug +INTDIR=.\Debug +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbm_gdbm-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\apr_dbm_gdbm-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbm_gdbm-1.res" + -@erase "$(INTDIR)\apr_dbm_gdbm.obj" + -@erase "$(INTDIR)\apr_dbm_gdbm_src.idb" + -@erase "$(INTDIR)\apr_dbm_gdbm_src.pdb" + -@erase "$(OUTDIR)\apr_dbm_gdbm-1.dll" + -@erase "$(OUTDIR)\apr_dbm_gdbm-1.exp" + -@erase "$(OUTDIR)\apr_dbm_gdbm-1.lib" + -@erase "$(OUTDIR)\apr_dbm_gdbm-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_GDBM=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbm_gdbm_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)\apr_dbm_gdbm-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbm_gdbm" /d "_DEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbm_gdbm.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libgdbm.lib /nologo /base:"0x6F010000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_dbm_gdbm-1.pdb" /debug /out:"$(OUTDIR)\apr_dbm_gdbm-1.dll" /implib:"$(OUTDIR)\apr_dbm_gdbm-1.lib" +LINK32_OBJS= \ + "$(INTDIR)\apr_dbm_gdbm.obj" \ + "$(INTDIR)\apr_dbm_gdbm-1.res" \ + "..\..\apr\Debug\libapr-1.lib" \ + "..\Debug\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbm_gdbm-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Debug\apr_dbm_gdbm-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbm_gdbm-1.dll" + if exist .\Debug\apr_dbm_gdbm-1.dll.manifest mt.exe -manifest .\Debug\apr_dbm_gdbm-1.dll.manifest -outputresource:.\Debug\apr_dbm_gdbm-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbm_gdbm - x64 Release" + +OUTDIR=.\x64\Release +INTDIR=.\x64\Release +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\x64\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbm_gdbm-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - x64 Release" "libapr - x64 Release" "$(OUTDIR)\apr_dbm_gdbm-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - x64 ReleaseCLEAN" "libaprutil - x64 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbm_gdbm-1.res" + -@erase "$(INTDIR)\apr_dbm_gdbm.obj" + -@erase "$(INTDIR)\apr_dbm_gdbm_src.idb" + -@erase "$(INTDIR)\apr_dbm_gdbm_src.pdb" + -@erase "$(OUTDIR)\apr_dbm_gdbm-1.dll" + -@erase "$(OUTDIR)\apr_dbm_gdbm-1.exp" + -@erase "$(OUTDIR)\apr_dbm_gdbm-1.lib" + -@erase "$(OUTDIR)\apr_dbm_gdbm-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_GDBM=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbm_gdbm_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)\apr_dbm_gdbm-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbm_gdbm" /d "NDEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbm_gdbm.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libgdbm.lib /nologo /base:"0x6F010000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_dbm_gdbm-1.pdb" /debug /out:"$(OUTDIR)\apr_dbm_gdbm-1.dll" /implib:"$(OUTDIR)\apr_dbm_gdbm-1.lib" /MACHINE:X64 /opt:ref +LINK32_OBJS= \ + "$(INTDIR)\apr_dbm_gdbm.obj" \ + "$(INTDIR)\apr_dbm_gdbm-1.res" \ + "..\..\apr\x64\Release\libapr-1.lib" \ + "..\x64\Release\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbm_gdbm-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\x64\Release\apr_dbm_gdbm-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\x64\Release +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbm_gdbm-1.dll" + if exist .\x64\Release\apr_dbm_gdbm-1.dll.manifest mt.exe -manifest .\x64\Release\apr_dbm_gdbm-1.dll.manifest -outputresource:.\x64\Release\apr_dbm_gdbm-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_dbm_gdbm - x64 Debug" + +OUTDIR=.\x64\Debug +INTDIR=.\x64\Debug +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\x64\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_dbm_gdbm-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - x64 Debug" "libapr - x64 Debug" "$(OUTDIR)\apr_dbm_gdbm-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - x64 DebugCLEAN" "libaprutil - x64 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_dbm_gdbm-1.res" + -@erase "$(INTDIR)\apr_dbm_gdbm.obj" + -@erase "$(INTDIR)\apr_dbm_gdbm_src.idb" + -@erase "$(INTDIR)\apr_dbm_gdbm_src.pdb" + -@erase "$(OUTDIR)\apr_dbm_gdbm-1.dll" + -@erase "$(OUTDIR)\apr_dbm_gdbm-1.exp" + -@erase "$(OUTDIR)\apr_dbm_gdbm-1.lib" + -@erase "$(OUTDIR)\apr_dbm_gdbm-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "APU_DSO_MODULE_BUILD" /D APU_HAVE_GDBM=1 /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_dbm_gdbm_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)\apr_dbm_gdbm-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_dbm_gdbm" /d "_DEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_dbm_gdbm.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib libgdbm.lib /nologo /base:"0x6F010000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_dbm_gdbm-1.pdb" /debug /out:"$(OUTDIR)\apr_dbm_gdbm-1.dll" /implib:"$(OUTDIR)\apr_dbm_gdbm-1.lib" /MACHINE:X64 +LINK32_OBJS= \ + "$(INTDIR)\apr_dbm_gdbm.obj" \ + "$(INTDIR)\apr_dbm_gdbm-1.res" \ + "..\..\apr\x64\Debug\libapr-1.lib" \ + "..\x64\Debug\libaprutil-1.lib" + +"$(OUTDIR)\apr_dbm_gdbm-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\x64\Debug\apr_dbm_gdbm-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\x64\Debug +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_dbm_gdbm-1.dll" + if exist .\x64\Debug\apr_dbm_gdbm-1.dll.manifest mt.exe -manifest .\x64\Debug\apr_dbm_gdbm-1.dll.manifest -outputresource:.\x64\Debug\apr_dbm_gdbm-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ENDIF + + +!IF "$(NO_EXTERNAL_DEPS)" != "1" +!IF EXISTS("apr_dbm_gdbm.dep") +!INCLUDE "apr_dbm_gdbm.dep" +!ELSE +!MESSAGE Warning: cannot find "apr_dbm_gdbm.dep" +!ENDIF +!ENDIF + + +!IF "$(CFG)" == "apr_dbm_gdbm - Win32 Release" || "$(CFG)" == "apr_dbm_gdbm - Win32 Debug" || "$(CFG)" == "apr_dbm_gdbm - x64 Release" || "$(CFG)" == "apr_dbm_gdbm - x64 Debug" +SOURCE=.\apr_dbm_gdbm.c + +"$(INTDIR)\apr_dbm_gdbm.obj" : $(SOURCE) "$(INTDIR)" + + +!IF "$(CFG)" == "apr_dbm_gdbm - Win32 Release" + +"libapr - Win32 Release" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" + cd "..\apr-util\dbm" + +"libapr - Win32 ReleaseCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN + cd "..\apr-util\dbm" + +!ELSEIF "$(CFG)" == "apr_dbm_gdbm - Win32 Debug" + +"libapr - Win32 Debug" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" + cd "..\apr-util\dbm" + +"libapr - Win32 DebugCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN + cd "..\apr-util\dbm" + +!ELSEIF "$(CFG)" == "apr_dbm_gdbm - x64 Release" + +"libapr - x64 Release" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Release" + cd "..\apr-util\dbm" + +"libapr - x64 ReleaseCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Release" RECURSE=1 CLEAN + cd "..\apr-util\dbm" + +!ELSEIF "$(CFG)" == "apr_dbm_gdbm - x64 Debug" + +"libapr - x64 Debug" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Debug" + cd "..\apr-util\dbm" + +"libapr - x64 DebugCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Debug" RECURSE=1 CLEAN + cd "..\apr-util\dbm" + +!ENDIF + +!IF "$(CFG)" == "apr_dbm_gdbm - Win32 Release" + +"libaprutil - Win32 Release" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" + cd ".\dbm" + +"libaprutil - Win32 ReleaseCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN + cd ".\dbm" + +!ELSEIF "$(CFG)" == "apr_dbm_gdbm - Win32 Debug" + +"libaprutil - Win32 Debug" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" + cd ".\dbm" + +"libaprutil - Win32 DebugCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN + cd ".\dbm" + +!ELSEIF "$(CFG)" == "apr_dbm_gdbm - x64 Release" + +"libaprutil - x64 Release" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Release" + cd ".\dbm" + +"libaprutil - x64 ReleaseCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Release" RECURSE=1 CLEAN + cd ".\dbm" + +!ELSEIF "$(CFG)" == "apr_dbm_gdbm - x64 Debug" + +"libaprutil - x64 Debug" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Debug" + cd ".\dbm" + +"libaprutil - x64 DebugCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Debug" RECURSE=1 CLEAN + cd ".\dbm" + +!ENDIF + +SOURCE=..\libaprutil.rc + +!IF "$(CFG)" == "apr_dbm_gdbm - Win32 Release" + + +"$(INTDIR)\apr_dbm_gdbm-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbm_gdbm-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbm_gdbm" /d "NDEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_dbm_gdbm - Win32 Debug" + + +"$(INTDIR)\apr_dbm_gdbm-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbm_gdbm-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbm_gdbm" /d "_DEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_dbm_gdbm - x64 Release" + + +"$(INTDIR)\apr_dbm_gdbm-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbm_gdbm-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbm_gdbm" /d "NDEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_dbm_gdbm - x64 Debug" + + +"$(INTDIR)\apr_dbm_gdbm-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_dbm_gdbm-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_dbm_gdbm" /d "_DEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ENDIF + + +!ENDIF + Index: contrib/apr-util/dbm/sdbm/sdbm.c =================================================================== --- contrib/apr-util/dbm/sdbm/sdbm.c +++ contrib/apr-util/dbm/sdbm/sdbm.c @@ -40,7 +40,7 @@ */ static int getdbit (apr_sdbm_t *, long); static apr_status_t setdbit(apr_sdbm_t *, long); -static apr_status_t getpage(apr_sdbm_t *db, long); +static apr_status_t getpage(apr_sdbm_t *db, long, int, int); static apr_status_t getnext(apr_sdbm_datum_t *key, apr_sdbm_t *db); static apr_status_t makroom(apr_sdbm_t *, long, int); @@ -93,6 +93,7 @@ db = malloc(sizeof(*db)); memset(db, 0, sizeof(*db)); + db->pagbno = -1L; db->pool = p; @@ -193,7 +194,7 @@ if ((status = apr_sdbm_lock(db, APR_FLOCK_SHARED)) != APR_SUCCESS) return status; - if ((status = getpage(db, exhash(key))) == APR_SUCCESS) { + if ((status = getpage(db, exhash(key), 0, 1)) == APR_SUCCESS) { *val = getpair(db->pagbuf, key); /* ### do we want a not-found result? */ } @@ -227,7 +228,7 @@ if ((status = apr_sdbm_lock(db, APR_FLOCK_EXCLUSIVE)) != APR_SUCCESS) return status; - if ((status = getpage(db, exhash(key))) == APR_SUCCESS) { + if ((status = getpage(db, exhash(key), 0, 1)) == APR_SUCCESS) { if (!delpair(db->pagbuf, key)) /* ### should we define some APRUTIL codes? */ status = APR_EGENERAL; @@ -261,7 +262,7 @@ if ((status = apr_sdbm_lock(db, APR_FLOCK_EXCLUSIVE)) != APR_SUCCESS) return status; - if ((status = getpage(db, (hash = exhash(key)))) == APR_SUCCESS) { + if ((status = getpage(db, (hash = exhash(key)), 0, 1)) == APR_SUCCESS) { /* * if we need to replace, delete the key/data pair @@ -376,17 +377,19 @@ /* Reads 'len' bytes from file 'f' at offset 'off' into buf. * 'off' is given relative to the start of the file. - * If EOF is returned while reading, this is taken as success. + * If 'create' is asked and EOF is returned while reading, this is taken + * as success (i.e. a cleared buffer is returned). */ static apr_status_t read_from(apr_file_t *f, void *buf, - apr_off_t off, apr_size_t len) + apr_off_t off, apr_size_t len, + int create) { apr_status_t status; if ((status = apr_file_seek(f, APR_SET, &off)) != APR_SUCCESS || ((status = apr_file_read_full(f, buf, len, NULL)) != APR_SUCCESS)) { /* if EOF is reached, pretend we read all zero's */ - if (status == APR_EOF) { + if (status == APR_EOF && create) { memset(buf, 0, len); status = APR_SUCCESS; } @@ -410,9 +413,7 @@ /* * start at page 0 */ - if ((status = read_from(db->pagf, db->pagbuf, OFF_PAG(0), PBLKSIZ)) - == APR_SUCCESS) { - db->pagbno = 0; + if ((status = getpage(db, 0, 1, 1)) == APR_SUCCESS) { db->blkptr = 0; db->keyptr = 0; status = getnext(key, db); @@ -441,24 +442,28 @@ /* * all important binary tree traversal */ -static apr_status_t getpage(apr_sdbm_t *db, long hash) +static apr_status_t getpage(apr_sdbm_t *db, long hash, int by_num, int create) { - register int hbit; - register long dbit; - register long pagb; apr_status_t status; + register long pagb; - dbit = 0; - hbit = 0; - while (dbit < db->maxbno && getdbit(db, dbit)) - dbit = 2 * dbit + ((hash & (1 << hbit++)) ? 2 : 1); + if (by_num) { + pagb = hash; + } + else { + register int hbit = 0; + register long dbit = 0; - debug(("dbit: %d...", dbit)); + while (dbit < db->maxbno && getdbit(db, dbit)) + dbit = 2 * dbit + ((hash & (1 << hbit++)) ? 2 : 1); + debug(("dbit: %d...", dbit)); - db->curbit = dbit; - db->hmask = masks[hbit]; + db->curbit = dbit; + db->hmask = masks[hbit]; + + pagb = hash & db->hmask; + } - pagb = hash & db->hmask; /* * see if the block we need is already in memory. * note: this lookaside cache has about 10% hit rate. @@ -470,12 +475,14 @@ * ### joe: this assumption was surely never correct? but * ### we make it so in read_from anyway. */ - if ((status = read_from(db->pagf, db->pagbuf, OFF_PAG(pagb), PBLKSIZ)) - != APR_SUCCESS) + if ((status = read_from(db->pagf, db->pagbuf, + OFF_PAG(pagb), PBLKSIZ, + create)) != APR_SUCCESS) return status; if (!chkpage(db->pagbuf)) return APR_ENOSPC; /* ### better error? */ + db->pagbno = pagb; debug(("pag read: %d\n", pagb)); @@ -492,8 +499,9 @@ dirb = c / DBLKSIZ; if (dirb != db->dirbno) { - if (read_from(db->dirf, db->dirbuf, OFF_DIR(dirb), DBLKSIZ) - != APR_SUCCESS) + if (read_from(db->dirf, db->dirbuf, + OFF_DIR(dirb), DBLKSIZ, + 1) != APR_SUCCESS) return 0; db->dirbno = dirb; @@ -515,8 +523,9 @@ dirb = c / DBLKSIZ; if (dirb != db->dirbno) { - if ((status = read_from(db->dirf, db->dirbuf, OFF_DIR(dirb), DBLKSIZ)) - != APR_SUCCESS) + if ((status = read_from(db->dirf, db->dirbuf, + OFF_DIR(dirb), DBLKSIZ, + 1)) != APR_SUCCESS) return status; db->dirbno = dirb; @@ -553,21 +562,12 @@ * try the next one... If we lost our position on the * file, we will have to seek. */ + db->blkptr++; db->keyptr = 0; - if (db->pagbno != db->blkptr++) { - apr_off_t off = OFF_PAG(db->blkptr); - if ((status = apr_file_seek(db->pagf, APR_SET, &off)) - != APR_SUCCESS) - return status; - } - db->pagbno = db->blkptr; /* ### EOF acceptable here too? */ - if ((status = apr_file_read_full(db->pagf, db->pagbuf, PBLKSIZ, NULL)) - != APR_SUCCESS) + if ((status = getpage(db, db->blkptr, 1, 0)) != APR_SUCCESS) return status; - if (!chkpage(db->pagbuf)) - return APR_EGENERAL; /* ### need better error */ } /* NOTREACHED */ Index: contrib/apr-util/dbm/sdbm/sdbm_pair.c =================================================================== --- contrib/apr-util/dbm/sdbm/sdbm_pair.c +++ contrib/apr-util/dbm/sdbm/sdbm_pair.c @@ -308,7 +308,8 @@ if (n > 0) { off = PBLKSIZ; for (ino++; n > 0; ino += 2) { - if (ino[0] > off || ino[1] > off || + if (ino[0] < 0 || ino[0] > off || + ino[1] < 0 || ino[1] > off || ino[1] > ino[0]) return 0; off = ino[1]; Index: contrib/apr-util/include/apr_buckets.h =================================================================== --- contrib/apr-util/include/apr_buckets.h +++ contrib/apr-util/include/apr_buckets.h @@ -622,6 +622,8 @@ * a caller tries to read from it */ int can_mmap; #endif /* APR_HAS_MMAP */ + /** File read block size */ + apr_size_t read_size; }; /** @see apr_bucket_structs */ @@ -961,6 +963,18 @@ */ APU_DECLARE_NONSTD(void) apr_bucket_alloc_destroy(apr_bucket_alloc_t *list); +/** + * Get the aligned size corresponding to the requested size, but minus the + * allocator(s) overhead such that the allocation would remain in the + * same boundary. + * @param list The allocator from which to the memory would be allocated. + * @param size The requested size. + * @return The corresponding aligned/floored size. + */ +APU_DECLARE_NONSTD(apr_size_t) apr_bucket_alloc_aligned_floor(apr_bucket_alloc_t *list, + apr_size_t size) + __attribute__((nonnull(1))); + /** * Allocate memory for use by the buckets. * @param size The amount to allocate. @@ -1563,6 +1577,19 @@ APU_DECLARE(apr_status_t) apr_bucket_file_enable_mmap(apr_bucket *b, int enabled); +/** + * Set the size of the read buffer allocated by a FILE bucket (default + * is @a APR_BUCKET_BUFF_SIZE) + * memory-mapping is disabled only) + * @param b The bucket + * @param size Size of the allocated buffers + * @return APR_SUCCESS normally, or an error code if the operation fails + * @remark Relevant/used only when memory-mapping is disabled (@see + * apr_bucket_file_enable_mmap) + */ +APU_DECLARE(apr_status_t) apr_bucket_file_set_buf_size(apr_bucket *e, + apr_size_t size); + /** @} */ #ifdef __cplusplus } Index: contrib/apr-util/include/apr_crypto.h =================================================================== --- contrib/apr-util/include/apr_crypto.h +++ contrib/apr-util/include/apr_crypto.h @@ -40,6 +40,9 @@ #if APU_HAVE_CRYPTO #ifndef APU_CRYPTO_RECOMMENDED_DRIVER +#if APU_HAVE_COMMONCRYPTO +#define APU_CRYPTO_RECOMMENDED_DRIVER "commoncrypto" +#else #if APU_HAVE_OPENSSL #define APU_CRYPTO_RECOMMENDED_DRIVER "openssl" #else @@ -57,6 +60,7 @@ #endif #endif #endif +#endif /** * Symmetric Key types understood by the library. @@ -84,16 +88,16 @@ * the chosen cipher. Padded data is data that is not aligned by block * size and must be padded by the crypto library. * - * OpenSSL NSS Interop - * Align Pad Align Pad Align Pad - * 3DES_192/CBC X X X X X X - * 3DES_192/ECB X X - * AES_256/CBC X X X X X X - * AES_256/ECB X X X X - * AES_192/CBC X X X X - * AES_192/ECB X X X - * AES_128/CBC X X X X - * AES_128/ECB X X X + * OpenSSL CommonCrypto NSS Interop + * Align Pad Align Pad Align Pad Align Pad + * 3DES_192/CBC X X X X X X X X + * 3DES_192/ECB X X X X + * AES_256/CBC X X X X X X X X + * AES_256/ECB X X X X X X + * AES_192/CBC X X X X X X + * AES_192/ECB X X X X X + * AES_128/CBC X X X X X X + * AES_128/ECB X X X X X * * Conclusion: for padded data, use 3DES_192/CBC or AES_256/CBC. For * aligned data, use 3DES_192/CBC, AES_256/CBC or AES_256/ECB. @@ -123,6 +127,48 @@ typedef struct apr_crypto_key_t apr_crypto_key_t; typedef struct apr_crypto_block_t apr_crypto_block_t; +typedef struct apr_crypto_block_key_type_t { + apr_crypto_block_key_type_e type; + int keysize; + int blocksize; + int ivsize; +} apr_crypto_block_key_type_t; + +typedef struct apr_crypto_block_key_mode_t { + apr_crypto_block_key_mode_e mode; +} apr_crypto_block_key_mode_t; + +typedef struct apr_crypto_passphrase_t { + const char *pass; + apr_size_t passLen; + const unsigned char * salt; + apr_size_t saltLen; + int iterations; +} apr_crypto_passphrase_t; + +typedef struct apr_crypto_secret_t { + const unsigned char *secret; + apr_size_t secretLen; +} apr_crypto_secret_t; + +typedef enum { + /** Key is derived from a passphrase */ + APR_CRYPTO_KTYPE_PASSPHRASE = 1, + /** Key is derived from a raw key */ + APR_CRYPTO_KTYPE_SECRET = 2, +} apr_crypto_key_type; + +typedef struct apr_crypto_key_rec_t { + apr_crypto_key_type ktype; + apr_crypto_block_key_type_e type; + apr_crypto_block_key_mode_e mode; + int pad; + union { + apr_crypto_passphrase_t passphrase; + apr_crypto_secret_t secret; + } k; +} apr_crypto_key_rec_t; + /** * @brief Perform once-only initialisation. Call once only. * @@ -132,8 +178,7 @@ APU_DECLARE(apr_status_t) apr_crypto_init(apr_pool_t *pool); /** - * @brief Register a cleanup to zero out the buffer provided - * when the pool is cleaned up. + * @brief Zero out the buffer provided when the pool is cleaned up. * * @param pool - pool to register the cleanup * @param buffer - buffer to zero out @@ -142,6 +187,27 @@ APU_DECLARE(apr_status_t) apr_crypto_clear(apr_pool_t *pool, void *buffer, apr_size_t size); +/** + * @brief Always zero out the buffer provided, without being optimized out by + * the compiler. + * + * @param buffer - buffer to zero out + * @param size - size of the buffer to zero out + */ +APU_DECLARE(apr_status_t) apr_crypto_memzero(void *buffer, apr_size_t size); + +/** + * @brief Timing attacks safe buffers comparison, where the executing time does + * not depend on the bytes compared but solely on the number of bytes. + * + * @param buf1 - first buffer to compare + * @param buf2 - second buffer to compare + * @param size - size of the buffers to compare + * @return 1 if the buffers are equals, 0 otherwise. + */ +APU_DECLARE(int) apr_crypto_equals(const void *buf1, const void *buf2, + apr_size_t size); + /** * @brief Get the driver struct for a name * @@ -205,7 +271,8 @@ /** * @brief Get a hash table of key types, keyed by the name of the type against - * an integer pointer constant. + * a pointer to apr_crypto_block_key_type_t, which in turn begins with an + * integer. * * @param types - hashtable of key types keyed to constants. * @param f - encryption context @@ -216,7 +283,8 @@ /** * @brief Get a hash table of key modes, keyed by the name of the mode against - * an integer pointer constant. + * a pointer to apr_crypto_block_key_mode_t, which in turn begins with an + * integer. * * @param modes - hashtable of key modes keyed to constants. * @param f - encryption context @@ -225,6 +293,25 @@ APU_DECLARE(apr_status_t) apr_crypto_get_block_key_modes(apr_hash_t **modes, const apr_crypto_t *f); +/** + * @brief Create a key from the provided secret or passphrase. The key is cleaned + * up when the context is cleaned, and may be reused with multiple encryption + * or decryption operations. + * @note If *key is NULL, a apr_crypto_key_t will be created from a pool. If + * *key is not NULL, *key must point at a previously created structure. + * @param key The key returned, see note. + * @param rec The key record, from which the key will be derived. + * @param f The context to use. + * @param p The pool to use. + * @return Returns APR_ENOKEY if the pass phrase is missing or empty, or if a backend + * error occurred while generating the key. APR_ENOCIPHER if the type or mode + * is not supported by the particular backend. APR_EKEYTYPE if the key type is + * not known. APR_EPADDING if padding was requested but is not supported. + * APR_ENOTIMPL if not implemented. + */ +APU_DECLARE(apr_status_t) apr_crypto_key(apr_crypto_key_t **key, + const apr_crypto_key_rec_t *rec, const apr_crypto_t *f, apr_pool_t *p); + /** * @brief Create a key from the given passphrase. By default, the PBKDF2 * algorithm is used to generate the key from the passphrase. It is expected @@ -252,6 +339,7 @@ * is not supported by the particular backend. APR_EKEYTYPE if the key type is * not known. APR_EPADDING if padding was requested but is not supported. * APR_ENOTIMPL if not implemented. + * @deprecated Replaced by apr_crypto_key(). */ APU_DECLARE(apr_status_t) apr_crypto_passphrase(apr_crypto_key_t **key, apr_size_t *ivSize, const char *pass, apr_size_t passLen, Index: contrib/apr-util/include/apr_dbd.h =================================================================== --- contrib/apr-util/include/apr_dbd.h +++ contrib/apr-util/include/apr_dbd.h @@ -136,9 +136,6 @@ * "group" determines which group from configuration file to use (see * MYSQL_READ_DEFAULT_GROUP option of mysql_options() in MySQL manual). * Reconnect is set to 1 by default (i.e. true). - * @remarks FreeTDS: the params can have "username", "password", "appname", - * "dbname", "host", "charset", "lang" and "server" keys, each followed by an - * equal sign and a value. */ APU_DECLARE(apr_status_t) apr_dbd_open_ex(const apr_dbd_driver_t *driver, apr_pool_t *pool, const char *params, Index: contrib/apr-util/include/apr_ldap.hwc =================================================================== --- /dev/null +++ contrib/apr-util/include/apr_ldap.hwc @@ -0,0 +1,197 @@ +/* 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. + */ + +/* + * apr_ldap.h is generated from apr_ldap.h.in by configure -- do not edit apr_ldap.h + */ +/** + * @file apr_ldap.h + * @brief APR-UTIL LDAP + */ +#ifndef APU_LDAP_H +#define APU_LDAP_H + +/** + * @defgroup APR_Util_LDAP LDAP + * @ingroup APR_Util + * @{ + */ + +/* this will be defined if LDAP support was compiled into apr-util */ +#define APR_HAS_LDAP @apr_has_ldap_10@ + +/* identify the LDAP toolkit used */ +#define APR_HAS_NETSCAPE_LDAPSDK 0 +#define APR_HAS_SOLARIS_LDAPSDK 0 +#define APR_HAS_NOVELL_LDAPSDK 0 +#define APR_HAS_MOZILLA_LDAPSDK 0 +#define APR_HAS_OPENLDAP_LDAPSDK 0 +#define APR_HAS_MICROSOFT_LDAPSDK 1 +#define APR_HAS_TIVOLI_LDAPSDK 0 +#define APR_HAS_ZOS_LDAPSDK 0 +#define APR_HAS_OTHER_LDAPSDK 0 + + +/* + * Handle the case when LDAP is enabled + */ +#if APR_HAS_LDAP + +/* + * The following #defines are DEPRECATED and should not be used for + * anything. They remain to maintain binary compatibility. + * The original code defined the OPENLDAP SDK as present regardless + * of what really was there, which was way bogus. In addition, the + * apr_ldap_url_parse*() functions have been rewritten specifically for + * APR, so the APR_HAS_LDAP_URL_PARSE macro is forced to zero. + */ +#if APR_HAS_TIVOLI_LDAPSDK +#define APR_HAS_LDAP_SSL 0 +#else +#define APR_HAS_LDAP_SSL 1 +#endif +#define APR_HAS_LDAP_URL_PARSE 0 + +#if APR_HAS_OPENLDAP_LDAPSDK && !defined(LDAP_DEPRECATED) +/* Ensure that the "deprecated" interfaces are still exposed + * with OpenLDAP >= 2.3; these were exposed by default in earlier + * releases. */ +#define LDAP_DEPRECATED 1 +#endif + +/* + * Include the standard LDAP header files. + */ + +#include + + +/* + * Detected standard functions + */ +#define APR_HAS_LDAPSSL_CLIENT_INIT 0 +#define APR_HAS_LDAPSSL_CLIENT_DEINIT 0 +#define APR_HAS_LDAPSSL_ADD_TRUSTED_CERT 0 +#define APR_HAS_LDAP_START_TLS_S 0 +#define APR_HAS_LDAP_SSLINIT 1 +#define APR_HAS_LDAPSSL_INIT 0 +#define APR_HAS_LDAPSSL_INSTALL_ROUTINES 0 + + +/* + * Make sure the secure LDAP port is defined + */ +#ifndef LDAPS_PORT +#define LDAPS_PORT 636 /* ldaps:/// default LDAP over TLS port */ +#endif + + +/* + * For ldap function calls that input a size limit on the number of returned elements + * Some SDKs do not have the define for LDAP_DEFAULT_LIMIT (-1) or LDAP_NO_LIMIT (0) + * LDAP_DEFAULT_LIMIT is preferred as it allows inheritance from whatever the SDK + * or process is configured for. + */ +#ifdef LDAP_DEFAULT_LIMIT +#define APR_LDAP_SIZELIMIT LDAP_DEFAULT_LIMIT +#else +#ifdef LDAP_NO_LIMIT +#define APR_LDAP_SIZELIMIT LDAP_NO_LIMIT +#endif +#endif + +#ifndef APR_LDAP_SIZELIMIT +#define APR_LDAP_SIZELIMIT 0 /* equivalent to LDAP_NO_LIMIT, and what goes on the wire */ +#endif + +/* + * z/OS is missing some defines + */ +#ifndef LDAP_VERSION_MAX +#define LDAP_VERSION_MAX LDAP_VERSION +#endif +#if APR_HAS_ZOS_LDAPSDK +#define LDAP_VENDOR_NAME "IBM z/OS" +#endif + +/* Note: Macros defining const casting has been removed in APR v1.0, + * pending real support for LDAP v2.0 toolkits. + * + * In the mean time, please use an LDAP v3.0 toolkit. + */ +#if LDAP_VERSION_MAX <= 2 +#error Support for LDAP v2.0 toolkits has been removed from apr-util. Please use an LDAP v3.0 toolkit. +#endif + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/** + * This structure allows the C LDAP API error codes to be returned + * along with plain text error messages that explain to us mere mortals + * what really happened. + */ +typedef struct apr_ldap_err_t { + const char *reason; + const char *msg; + int rc; +} apr_ldap_err_t; + +#ifdef __cplusplus +} +#endif + +/* The MS SDK returns LDAP_UNAVAILABLE when the backend has closed the connection + * between LDAP calls. Protect with APR_HAS_MICROSOFT_LDAPSDK in case someone + * manually chooses another SDK on Windows + */ +#if APR_HAS_MICROSOFT_LDAPSDK +#define APR_LDAP_IS_SERVER_DOWN(s) ((s) == LDAP_SERVER_DOWN \ + || (s) == LDAP_UNAVAILABLE) +#else +#define APR_LDAP_IS_SERVER_DOWN(s) ((s) == LDAP_SERVER_DOWN) +#endif + +/* These symbols are not actually exported in a DSO build, but mapped into + * a private exported function array for apr_ldap_stub to bind dynamically. + * Rename them appropriately to protect the global namespace. + */ +#ifdef APU_DSO_LDAP_BUILD + +#define apr_ldap_info apr__ldap_info +#define apr_ldap_init apr__ldap_init +#define apr_ldap_ssl_init apr__ldap_ssl_init +#define apr_ldap_ssl_deinit apr__ldap_ssl_deinit +#define apr_ldap_get_option apr__ldap_get_option +#define apr_ldap_set_option apr__ldap_set_option +#define apr_ldap_rebind_init apr__ldap_rebind_init +#define apr_ldap_rebind_add apr__ldap_rebind_add +#define apr_ldap_rebind_remove apr__ldap_rebind_remove + +#define APU_DECLARE_LDAP(type) type +#else +#define APU_DECLARE_LDAP(type) APU_DECLARE(type) +#endif + +#include "apr_ldap_url.h" +#include "apr_ldap_init.h" +#include "apr_ldap_option.h" +#include "apr_ldap_rebind.h" + +/** @} */ +#endif /* APR_HAS_LDAP */ +#endif /* APU_LDAP_H */ Index: contrib/apr-util/include/apr_redis.h =================================================================== --- /dev/null +++ contrib/apr-util/include/apr_redis.h @@ -0,0 +1,459 @@ +/* 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_redis.h + * @brief Client interface for redis + * @remark To use this interface you must have a separate redis + * for more information. + */ + +#ifndef APR_REDIS_H +#define APR_REDIS_H + +#include "apr.h" +#include "apr_pools.h" +#include "apr_time.h" +#include "apr_strings.h" +#include "apr_network_io.h" +#include "apr_ring.h" +#include "apr_buckets.h" +#include "apr_reslist.h" +#include "apr_hash.h" + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#ifndef RC_DEFAULT_SERVER_PORT +#define RC_DEFAULT_SERVER_PORT 6379 +#endif + +#ifndef RC_DEFAULT_SERVER_MIN +#define RC_DEFAULT_SERVER_MIN 0 +#endif + +#ifndef RC_DEFAULT_SERVER_SMAX +#define RC_DEFAULT_SERVER_SMAX 1 +#endif + +#ifndef RC_DEFAULT_SERVER_TTL +#define RC_DEFAULT_SERVER_TTL 600 +#endif + +/** + * @defgroup APR_Util_RC Redis Client Routines + * @ingroup APR_Util + * @{ + */ + +/** Specifies the status of a redis server */ +typedef enum +{ + APR_RC_SERVER_LIVE, /**< Server is alive and responding to requests */ + APR_RC_SERVER_DEAD /**< Server is not responding to requests */ +} apr_redis_server_status_t; + +/** Opaque redis client connection object */ +typedef struct apr_redis_conn_t apr_redis_conn_t; + +/** Redis Server Info Object */ +typedef struct apr_redis_server_t apr_redis_server_t; +struct apr_redis_server_t +{ + const char *host; /**< Hostname of this Server */ + apr_port_t port; /**< Port of this Server */ + apr_redis_server_status_t status; /**< @see apr_redis_server_status_t */ +#if APR_HAS_THREADS || defined(DOXYGEN) + apr_reslist_t *conns; /**< Resource list of actual client connections */ +#else + apr_redis_conn_t *conn; +#endif + apr_pool_t *p; /** Pool to use for private allocations */ +#if APR_HAS_THREADS + apr_thread_mutex_t *lock; +#endif + apr_time_t btime; + apr_uint32_t rwto; + struct + { + int major; + int minor; + int patch; + char *number; + } version; +}; + +typedef struct apr_redis_t apr_redis_t; + +/* Custom hash callback function prototype, user for server selection. +* @param baton user selected baton +* @param data data to hash +* @param data_len length of data +*/ +typedef apr_uint32_t (*apr_redis_hash_func)(void *baton, + const char *data, + const apr_size_t data_len); +/* Custom Server Select callback function prototype. +* @param baton user selected baton +* @param rc redis instance, use rc->live_servers to select a node +* @param hash hash of the selected key. +*/ +typedef apr_redis_server_t* (*apr_redis_server_func)(void *baton, + apr_redis_t *rc, + const apr_uint32_t hash); + +/** Container for a set of redis servers */ +struct apr_redis_t +{ + apr_uint32_t flags; /**< Flags, Not currently used */ + apr_uint16_t nalloc; /**< Number of Servers Allocated */ + apr_uint16_t ntotal; /**< Number of Servers Added */ + apr_redis_server_t **live_servers; /**< Array of Servers */ + apr_pool_t *p; /** Pool to use for allocations */ + void *hash_baton; + apr_redis_hash_func hash_func; + void *server_baton; + apr_redis_server_func server_func; +}; + +/** + * Creates a crc32 hash used to split keys between servers + * @param rc The redis client object to use + * @param data Data to be hashed + * @param data_len Length of the data to use + * @return crc32 hash of data + * @remark The crc32 hash is not compatible with old redisd clients. + */ +APU_DECLARE(apr_uint32_t) apr_redis_hash(apr_redis_t *rc, + const char *data, + const apr_size_t data_len); + +/** + * Pure CRC32 Hash. Used by some clients. + */ +APU_DECLARE(apr_uint32_t) apr_redis_hash_crc32(void *baton, + const char *data, + const apr_size_t data_len); + +/** + * hash compatible with the standard Perl Client. + */ +APU_DECLARE(apr_uint32_t) apr_redis_hash_default(void *baton, + const char *data, + const apr_size_t data_len); + +/** + * Picks a server based on a hash + * @param rc The redis client object to use + * @param hash Hashed value of a Key + * @return server that controls specified hash + * @see apr_redis_hash + */ +APU_DECLARE(apr_redis_server_t *) apr_redis_find_server_hash(apr_redis_t *rc, + const apr_uint32_t hash); + +/** + * server selection compatible with the standard Perl Client. + */ +APU_DECLARE(apr_redis_server_t *) apr_redis_find_server_hash_default(void *baton, + apr_redis_t *rc, + const apr_uint32_t hash); + +/** + * Adds a server to a client object + * @param rc The redis client object to use + * @param server Server to add + * @remark Adding servers is not thread safe, and should be done once at startup. + * @warning Changing servers after startup may cause keys to go to + * different servers. + */ +APU_DECLARE(apr_status_t) apr_redis_add_server(apr_redis_t *rc, + apr_redis_server_t *server); + + +/** + * Finds a Server object based on a hostname/port pair + * @param rc The redis client object to use + * @param host Hostname of the server + * @param port Port of the server + * @return Server with matching Hostname and Port, or NULL if none was found. + */ +APU_DECLARE(apr_redis_server_t *) apr_redis_find_server(apr_redis_t *rc, + const char *host, + apr_port_t port); + +/** + * Enables a Server for use again + * @param rc The redis client object to use + * @param rs Server to Activate + */ +APU_DECLARE(apr_status_t) apr_redis_enable_server(apr_redis_t *rc, + apr_redis_server_t *rs); + + +/** + * Disable a Server + * @param rc The redis client object to use + * @param rs Server to Disable + */ +APU_DECLARE(apr_status_t) apr_redis_disable_server(apr_redis_t *rc, + apr_redis_server_t *rs); + +/** + * Creates a new Server Object + * @param p Pool to use + * @param host hostname of the server + * @param port port of the server + * @param min minimum number of client sockets to open + * @param smax soft maximum number of client connections to open + * @param max hard maximum number of client connections + * @param ttl time to live in microseconds of a client connection + * @param rwto r/w timeout value in seconds of a client connection + * @param ns location of the new server object + * @see apr_reslist_create + * @remark min, smax, and max are only used when APR_HAS_THREADS + */ +APU_DECLARE(apr_status_t) apr_redis_server_create(apr_pool_t *p, + const char *host, + apr_port_t port, + apr_uint32_t min, + apr_uint32_t smax, + apr_uint32_t max, + apr_uint32_t ttl, + apr_uint32_t rwto, + apr_redis_server_t **ns); +/** + * Creates a new redisd client object + * @param p Pool to use + * @param max_servers maximum number of servers + * @param flags Not currently used + * @param rc location of the new redis client object + */ +APU_DECLARE(apr_status_t) apr_redis_create(apr_pool_t *p, + apr_uint16_t max_servers, + apr_uint32_t flags, + apr_redis_t **rc); + +/** + * Gets a value from the server, allocating the value out of p + * @param rc client to use + * @param p Pool to use + * @param key null terminated string containing the key + * @param baton location of the allocated value + * @param len length of data at baton + * @param flags any flags set by the client for this key + * @return + */ +APU_DECLARE(apr_status_t) apr_redis_getp(apr_redis_t *rc, + apr_pool_t *p, + const char* key, + char **baton, + apr_size_t *len, + apr_uint16_t *flags); + +/** + * Sets a value by key on the server + * @param rc client to use + * @param key null terminated string containing the key + * @param baton data to store on the server + * @param data_size length of data at baton + * @param flags any flags set by the client for this key + */ +APU_DECLARE(apr_status_t) apr_redis_set(apr_redis_t *rc, + const char *key, + char *baton, + const apr_size_t data_size, + apr_uint16_t flags); + +/** + * Sets a value by key on the server + * @param rc client to use + * @param key null terminated string containing the key + * @param baton data to store on the server + * @param data_size length of data at baton + * @param timeout time in seconds for the data to live on the server + * @param flags any flags set by the client for this key + */ +APU_DECLARE(apr_status_t) apr_redis_setex(apr_redis_t *rc, + const char *key, + char *baton, + const apr_size_t data_size, + apr_uint32_t timeout, + apr_uint16_t flags); + +/** + * Deletes a key from a server + * @param rc client to use + * @param key null terminated string containing the key + * @param timeout time for the delete to stop other clients from adding + */ +APU_DECLARE(apr_status_t) apr_redis_delete(apr_redis_t *rc, + const char *key, + apr_uint32_t timeout); + +/** + * Query a server's version + * @param rs server to query + * @param p Pool to allocate answer from + * @param baton location to store server version string + */ +APU_DECLARE(apr_status_t) apr_redis_version(apr_redis_server_t *rs, + apr_pool_t *p, + char **baton); + +/** + * Query a server's INFO + * @param rs server to query + * @param p Pool to allocate answer from + * @param baton location to store server INFO response string + */ +APU_DECLARE(apr_status_t) apr_redis_info(apr_redis_server_t *rs, + apr_pool_t *p, + char **baton); + +/** + * Increments a value + * @param rc client to use + * @param key null terminated string containing the key + * @param inc number to increment by + * @param new_value new value after incrementing + */ +APU_DECLARE(apr_status_t) apr_redis_incr(apr_redis_t *rc, + const char *key, + apr_int32_t inc, + apr_uint32_t *new_value); +/** + * Decrements a value + * @param rc client to use + * @param key null terminated string containing the key + * @param inc number to decrement by + * @param new_value new value after decrementing + */ +APU_DECLARE(apr_status_t) apr_redis_decr(apr_redis_t *rc, + const char *key, + apr_int32_t inc, + apr_uint32_t *new_value); + + +/** + * Pings the server + * @param rs Server to ping + */ +APU_DECLARE(apr_status_t) apr_redis_ping(apr_redis_server_t *rs); + +/** + * Gets multiple values from the server, allocating the values out of p + * @param rc client to use + * @param temp_pool Pool used for temporary allocations. May be cleared inside this + * call. + * @param data_pool Pool used to allocate data for the returned values. + * @param values hash of apr_redis_value_t keyed by strings, contains the + * result of the multiget call. + * @return + */ +APU_DECLARE(apr_status_t) apr_redis_multgetp(apr_redis_t *rc, + apr_pool_t *temp_pool, + apr_pool_t *data_pool, + apr_hash_t *values); + +typedef enum +{ + APR_RS_SERVER_MASTER, /**< Server is a master */ + APR_RS_SERVER_SLAVE, /**< Server is a slave */ + APR_RS_SERVER_UNKNOWN /**< Server role is unknown */ +} apr_redis_server_role_t; + +typedef struct +{ +/* # Server */ + /** Major version number of this server */ + apr_uint32_t major; + /** Minor version number of this server */ + apr_uint32_t minor; + /** Patch version number of this server */ + apr_uint32_t patch; + /** Process id of this server process */ + apr_uint32_t process_id; + /** Number of seconds this server has been running */ + apr_uint32_t uptime_in_seconds; + /** Bitsize of the arch on the current machine */ + apr_uint32_t arch_bits; + +/* # Clients */ + /** Number of connected clients */ + apr_uint32_t connected_clients; + /** Number of blocked clients */ + apr_uint32_t blocked_clients; + +/* # Memory */ + /** Max memory of this server */ + apr_uint64_t maxmemory; + /** Amount of used memory */ + apr_uint64_t used_memory; + /** Total memory available on this server */ + apr_uint64_t total_system_memory; + +/* # Stats */ + /** Total connections received */ + apr_uint64_t total_connections_received; + /** Total commands processed */ + apr_uint64_t total_commands_processed; + /** Total commands rejected */ + apr_uint64_t rejected_connections; + /** Total net input bytes */ + apr_uint64_t total_net_input_bytes; + /** Total net output bytes */ + apr_uint64_t total_net_output_bytes; + /** Keyspace hits */ + apr_uint64_t keyspace_hits; + /** Keyspace misses */ + apr_uint64_t keyspace_misses; + +/* # Replication */ + /** Role */ + apr_redis_server_role_t role; + /** Number of connected slave */ + apr_uint32_t connected_slaves; + +/* # CPU */ + /** Accumulated CPU user time for this process */ + apr_uint32_t used_cpu_sys; + /** Accumulated CPU system time for this process */ + apr_uint32_t used_cpu_user; + +/* # Cluster */ + /** Is cluster enabled */ + apr_uint32_t cluster_enabled; +} apr_redis_stats_t; + +/** + * Query a server for statistics + * @param rs server to query + * @param p Pool to allocate answer from + * @param stats location of the new statistics structure + */ +APU_DECLARE(apr_status_t) apr_redis_stats(apr_redis_server_t *rs, + apr_pool_t *p, + apr_redis_stats_t **stats); + +/** @} */ + +#ifdef __cplusplus +} +#endif + +#endif /* APR_REDIS_H */ Index: contrib/apr-util/include/apr_siphash.h =================================================================== --- /dev/null +++ contrib/apr-util/include/apr_siphash.h @@ -0,0 +1,148 @@ +/* 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. + */ +/* + SipHash reference C implementation + Copyright (c) 2012-2014 Jean-Philippe Aumasson + + Copyright (c) 2012-2014 Daniel J. Bernstein + To the extent possible under law, the author(s) have dedicated all copyright + and related and neighboring rights to this software to the public domain + worldwide. This software is distributed without any warranty. + You should have received a copy of the CC0 Public Domain Dedication along + with this software. If not, see + . + */ + +#ifndef APR_SIPHASH_H +#define APR_SIPHASH_H + +#include "apr.h" +#include "apu.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @file apr_siphash.h + * @brief APR-UTIL siphash library + * "SipHash-c-d is a family of pseudorandom functions (a.k.a. keyed + * hash functions) optimized for speed on short messages", designed by + * Jean-Philippe Aumasson and Daniel J. Bernstein. It generates a 64bit + * hash (or MAC) from the message and a 128bit key. + * See http://cr.yp.to/siphash/siphash-20120620.pdf for the details, + * c is the number of compression rounds, d the number of finalization + * rounds; we also define fast implementations for c = 2 with d = 4 (aka + * siphash-2-4), and c = 4 with d = 8 (aka siphash-4-8), as recommended + * parameters per the authors. + */ + +/** size of the siphash digest */ +#define APR_SIPHASH_DSIZE 8 + +/** size of the siphash key */ +#define APR_SIPHASH_KSIZE 16 + + +/** + * @brief Computes SipHash-c-d, producing a 64bit (APR_SIPHASH_DSIZE) hash + * from a message and a 128bit (APR_SIPHASH_KSIZE) secret key. + * @param src The message + * @param len The length of the message + * @param key The secret key + * @param c The number of compression rounds + * @param d The number of finalization rounds + * @return The hash value as a 64bit unsigned integer + */ +APU_DECLARE(apr_uint64_t) apr_siphash(const void *src, apr_size_t len, + const unsigned char key[APR_SIPHASH_KSIZE], + unsigned int c, unsigned int d); + +/** + * @brief Computes SipHash-c-d, producing a 64bit (APR_SIPHASH_DSIZE) hash + * from a message and a 128bit (APR_SIPHASH_KSIZE) secret key, into a possibly + * unaligned buffer (using the little endian representation as defined by the + * authors for interoperabilty) usable as a MAC. + * @param out The output buffer (or MAC) + * @param src The message + * @param len The length of the message + * @param key The secret key + * @param c The number of compression rounds + * @param d The number of finalization rounds + * @return The hash value as a 64bit unsigned integer + */ +APU_DECLARE(void) apr_siphash_auth(unsigned char out[APR_SIPHASH_DSIZE], + const void *src, apr_size_t len, + const unsigned char key[APR_SIPHASH_KSIZE], + unsigned int c, unsigned int d); + +/** + * @brief Computes SipHash-2-4, producing a 64bit (APR_SIPHASH_DSIZE) hash + * from a message and a 128bit (APR_SIPHASH_KSIZE) secret key. + * @param src The message to hash + * @param len The length of the message + * @param key The secret key + * @return The hash value as a 64bit unsigned integer + */ +APU_DECLARE(apr_uint64_t) apr_siphash24(const void *src, apr_size_t len, + const unsigned char key[APR_SIPHASH_KSIZE]); + +/** + * @brief Computes SipHash-2-4, producing a 64bit (APR_SIPHASH_DSIZE) hash + * from a message and a 128bit (APR_SIPHASH_KSIZE) secret key, into a possibly + * unaligned buffer (using the little endian representation as defined by the + * authors for interoperabilty) usable as a MAC. + * @param out The output buffer (or MAC) + * @param src The message + * @param len The length of the message + * @param key The secret key + * @return The hash value as a 64bit unsigned integer + */ +APU_DECLARE(void) apr_siphash24_auth(unsigned char out[APR_SIPHASH_DSIZE], + const void *src, apr_size_t len, + const unsigned char key[APR_SIPHASH_KSIZE]); + +/** + * @brief Computes SipHash-4-8, producing a 64bit (APR_SIPHASH_DSIZE) hash + * from a message and a 128bit (APR_SIPHASH_KSIZE) secret key. + * @param src The message + * @param len The length of the message + * @param key The secret key + * @return The hash value as a 64bit unsigned integer + */ +APU_DECLARE(apr_uint64_t) apr_siphash48(const void *src, apr_size_t len, + const unsigned char key[APR_SIPHASH_KSIZE]); + +/** + * @brief Computes SipHash-4-8, producing a 64bit (APR_SIPHASH_DSIZE) hash + * from a message and a 128bit (APR_SIPHASH_KSIZE) secret key, into a possibly + * unaligned buffer (using the little endian representation as defined by the + * authors for interoperabilty) usable as a MAC. + * @param out The output buffer (or MAC) + * @param src The message + * @param len The length of the message + * @param key The secret key + * @return The hash value as a 64bit unsigned integer + */ +APU_DECLARE(void) apr_siphash48_auth(unsigned char out[APR_SIPHASH_DSIZE], + const void *src, apr_size_t len, + const unsigned char key[APR_SIPHASH_KSIZE]); + +#ifdef __cplusplus +} +#endif + +#endif /* APR_SIPHASH_H */ Index: contrib/apr-util/include/apr_xml.h =================================================================== --- contrib/apr-util/include/apr_xml.h +++ contrib/apr-util/include/apr_xml.h @@ -276,6 +276,7 @@ * APR_XML_X2T_INNER contents only * APR_XML_X2T_LANG_INNER xml:lang + inner contents * APR_XML_X2T_FULL_NS_LANG FULL + ns defns + xml:lang + * APR_XML_X2T_PARSED original prefixes * * @param namespaces The namespace of the current XML element * @param ns_map Namespace mapping @@ -292,6 +293,7 @@ #define APR_XML_X2T_INNER 1 /**< contents only */ #define APR_XML_X2T_LANG_INNER 2 /**< xml:lang + inner contents */ #define APR_XML_X2T_FULL_NS_LANG 3 /**< FULL + ns defns + xml:lang */ +#define APR_XML_X2T_PARSED 4 /**< original prefixes */ /** * empty XML element Index: contrib/apr-util/include/apu.h.in =================================================================== --- contrib/apr-util/include/apu.h.in +++ contrib/apr-util/include/apu.h.in @@ -113,12 +113,12 @@ #define APU_HAVE_SQLITE3 @apu_have_sqlite3@ #define APU_HAVE_SQLITE2 @apu_have_sqlite2@ #define APU_HAVE_ORACLE @apu_have_oracle@ -#define APU_HAVE_FREETDS @apu_have_freetds@ #define APU_HAVE_ODBC @apu_have_odbc@ #define APU_HAVE_CRYPTO @apu_have_crypto@ #define APU_HAVE_OPENSSL @apu_have_openssl@ #define APU_HAVE_NSS @apu_have_nss@ +#define APU_HAVE_COMMONCRYPTO @apu_have_commoncrypto@ #define APU_HAVE_APR_ICONV @have_apr_iconv@ #define APU_HAVE_ICONV @have_iconv@ Index: contrib/apr-util/include/apu.hnw =================================================================== --- contrib/apr-util/include/apu.hnw +++ contrib/apr-util/include/apu.hnw @@ -104,7 +104,6 @@ #define APU_HAVE_SQLITE3 0 #define APU_HAVE_SQLITE2 0 #define APU_HAVE_ORACLE 0 -#define APU_HAVE_FREETDS 0 #define APU_HAVE_ODBC 0 #endif @@ -113,6 +112,7 @@ #ifndef APU_DSO_MODULE_BUILD #define APU_HAVE_OPENSSL 0 #define APU_HAVE_NSS 0 +#define APU_HAVE_COMMONCRYPTO 0 #endif #define APU_HAVE_APR_ICONV 0 Index: contrib/apr-util/include/apu.hw =================================================================== --- contrib/apr-util/include/apu.hw +++ contrib/apr-util/include/apu.hw @@ -127,7 +127,6 @@ #define APU_HAVE_SQLITE3 0 #define APU_HAVE_SQLITE2 0 #define APU_HAVE_ORACLE 0 -#define APU_HAVE_FREETDS 0 #define APU_HAVE_ODBC 1 #endif @@ -136,6 +135,7 @@ #ifndef APU_DSO_MODULE_BUILD #define APU_HAVE_OPENSSL 0 #define APU_HAVE_NSS 0 +#define APU_HAVE_COMMONCRYPTO 0 #endif #define APU_HAVE_APR_ICONV 1 Index: contrib/apr-util/include/apu.hwc =================================================================== --- contrib/apr-util/include/apu.hwc +++ contrib/apr-util/include/apu.hwc @@ -15,7 +15,7 @@ */ /* - * apu.h is duplicated from apu.hw at build time -- do not edit apu.h + * apu.h is duplicated from apu.hwc at build time -- do not edit apu.h */ /* @file apu.h * @brief APR-Utility main file @@ -127,18 +127,17 @@ #define APU_HAVE_SQLITE3 0 #define APU_HAVE_SQLITE2 0 #define APU_HAVE_ORACLE 0 -#define APU_HAVE_FREETDS 0 #define APU_HAVE_ODBC 1 #endif -#define APU_HAVE_CRYPTO 0 +#define APU_HAVE_CRYPTO @apu_have_crypto_10@ #ifndef APU_DSO_MODULE_BUILD #define APU_HAVE_OPENSSL 0 #define APU_HAVE_NSS 0 #endif -#define APU_HAVE_APR_ICONV 1 +#define APU_HAVE_APR_ICONV @apu_have_apr_iconv_10@ #define APU_HAVE_ICONV 0 #define APR_HAS_XLATE (APU_HAVE_APR_ICONV || APU_HAVE_ICONV) Index: contrib/apr-util/include/apu_version.h =================================================================== --- contrib/apr-util/include/apu_version.h +++ contrib/apr-util/include/apu_version.h @@ -38,7 +38,7 @@ */ -#define APU_COPYRIGHT "Copyright (c) 2000-2014 The Apache Software " \ +#define APU_COPYRIGHT "Copyright (c) 2000-2016 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 APU_MAJOR_VERSION */ -#define APU_MINOR_VERSION 5 +#define APU_MINOR_VERSION 6 /** patch level * The Patch Level never includes API changes, simply bug fixes. * Reset to 0 when upgrading APR_MINOR_VERSION */ -#define APU_PATCH_VERSION 4 +#define APU_PATCH_VERSION 1 /** * The symbol APU_IS_DEV_VERSION is only defined for internal, * "development" copies of APU. It is undefined for released versions * of APU. */ -/* #define APU_IS_DEV_VERSION */ +/* #undef APU_IS_DEV_VERSION */ #if defined(APU_IS_DEV_VERSION) || defined(DOXYGEN) Index: contrib/apr-util/include/private/apr_crypto_internal.h =================================================================== --- contrib/apr-util/include/private/apr_crypto_internal.h +++ contrib/apr-util/include/private/apr_crypto_internal.h @@ -59,7 +59,7 @@ /** * @brief Get a hash table of key types, keyed by the name of the type against - * an integer pointer constant. + * a pointer to apr_crypto_block_key_type_t. * * @param types - hashtable of key types keyed to constants. * @param f - encryption context @@ -70,7 +70,7 @@ /** * @brief Get a hash table of key modes, keyed by the name of the mode against - * an integer pointer constant. + * a pointer to apr_crypto_block_key_mode_t. * * @param modes - hashtable of key modes keyed to constants. * @param f - encryption context @@ -267,6 +267,25 @@ */ apr_status_t (*error)(const apu_err_t **result, const apr_crypto_t *f); + /** + * @brief Create a key from the provided secret or passphrase. The key is cleaned + * up when the context is cleaned, and may be reused with multiple encryption + * or decryption operations. + * @note If *key is NULL, a apr_crypto_key_t will be created from a pool. If + * *key is not NULL, *key must point at a previously created structure. + * @param key The key returned, see note. + * @param rec The key record, from which the key will be derived. + * @param f The context to use. + * @param p The pool to use. + * @return Returns APR_ENOKEY if the pass phrase is missing or empty, or if a backend + * error occurred while generating the key. APR_ENOCIPHER if the type or mode + * is not supported by the particular backend. APR_EKEYTYPE if the key type is + * not known. APR_EPADDING if padding was requested but is not supported. + * APR_ENOTIMPL if not implemented. + */ + apr_status_t (*key)(apr_crypto_key_t **key, const apr_crypto_key_rec_t *rec, + const apr_crypto_t *f, apr_pool_t *p); + }; #endif Index: contrib/apr-util/include/private/apu_config.h.in =================================================================== --- contrib/apr-util/include/private/apu_config.h.in +++ contrib/apr-util/include/private/apu_config.h.in @@ -24,6 +24,10 @@ /* Define if CODESET is defined in langinfo.h */ #undef HAVE_CODESET +/* Define to 1 if you have the header + file. */ +#undef HAVE_COMMONCRYPTO_COMMONKEYDERIVATION_H + /* Define to 1 if you have the `crypt_r' function. */ #undef HAVE_CRYPT_R @@ -34,8 +38,8 @@ /* Define if expat.h is available */ #undef HAVE_EXPAT_H -/* Define to 1 if you have the header file. */ -#undef HAVE_FREETDS_SYBDB_H +/* Define if explicit_bzero function is supported */ +#undef HAVE_EXPLICIT_BZERO /* Define to 1 if you have the header file. */ #undef HAVE_ICONV_H @@ -61,6 +65,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H +/* Define if memset_s function is supported */ +#undef HAVE_MEMSET_S + /* Define to 1 if you have the header file. */ #undef HAVE_MYSQL_H @@ -130,9 +137,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYBDB_H - /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H @@ -142,6 +146,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H +/* Define if compiler handles weak symbols */ +#undef HAVE_WEAK_SYMBOLS + /* Define if xmlparse/xmlparse.h is available */ #undef HAVE_XMLPARSE_XMLPARSE_H Index: contrib/apr-util/ldap/apr_ldap.dep =================================================================== --- /dev/null +++ contrib/apr-util/ldap/apr_ldap.dep @@ -0,0 +1,37 @@ +# Microsoft Developer Studio Generated Dependency File, included by apr_ldap.mak + +.\apr_ldap_init.c : \ + "..\include\apr_ldap.h"\ + "..\include\apr_ldap_init.h"\ + "..\include\apr_ldap_option.h"\ + "..\include\apr_ldap_rebind.h"\ + "..\include\apr_ldap_url.h"\ + "..\include\apu.h"\ + "..\include\private\apu_config.h"\ + "..\include\private\apu_internal.h"\ + + +.\apr_ldap_option.c : \ + "..\include\apr_ldap.h"\ + "..\include\apr_ldap_init.h"\ + "..\include\apr_ldap_option.h"\ + "..\include\apr_ldap_rebind.h"\ + "..\include\apr_ldap_url.h"\ + "..\include\apu.h"\ + "..\include\private\apu_config.h"\ + + +.\apr_ldap_rebind.c : \ + "..\include\apr_ldap.h"\ + "..\include\apr_ldap_init.h"\ + "..\include\apr_ldap_option.h"\ + "..\include\apr_ldap_rebind.h"\ + "..\include\apr_ldap_url.h"\ + "..\include\apu.h"\ + "..\include\private\apu_config.h"\ + + +..\libaprutil.rc : \ + "..\include\apu.h"\ + "..\include\apu_version.h"\ + Index: contrib/apr-util/ldap/apr_ldap.dsp =================================================================== --- /dev/null +++ contrib/apr-util/ldap/apr_ldap.dsp @@ -0,0 +1,227 @@ +# Microsoft Developer Studio Project File - Name="apr_ldap" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=apr_ldap - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "apr_ldap.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "apr_ldap.mak" CFG="apr_ldap - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "apr_ldap - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_ldap - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_ldap - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_ldap - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "apr_ldap - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_ldap_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 /fo"Release/apr_ldap-1.res" /d DLL_NAME="apr_ldap" /d "NDEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib ole32.lib /nologo /base:"0x6EEB0000" /subsystem:windows /dll /incremental:no /debug /opt:ref +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib ole32.lib /nologo /base:"0x6EEB0000" /subsystem:windows /dll /incremental:no /debug /out:"Release\apr_ldap-1.dll" /pdb:"Release\apr_ldap-1.pdb" /implib:"Release\apr_ldap-1.lib" /MACHINE:X86 /opt:ref +# Begin Special Build Tool +TargetPath=Release\apr_ldap-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)" == "apr_ldap - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_ldap_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 /fo"Debug/apr_ldap-1.res" /d DLL_NAME="apr_ldap" /d "_DEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib ole32.lib /nologo /base:"0x6EEB0000" /subsystem:windows /dll /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib ole32.lib /nologo /base:"0x6EEB0000" /subsystem:windows /dll /incremental:no /debug /out:"Debug\apr_ldap-1.dll" /pdb:"Debug\apr_ldap-1.pdb" /implib:"Debug\apr_ldap-1.lib" /MACHINE:X86 +# Begin Special Build Tool +TargetPath=Debug\apr_ldap-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)" == "apr_ldap - x64 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "x64\Release" +# PROP BASE Intermediate_Dir "x64\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "x64\Release" +# PROP Intermediate_Dir "x64\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_ldap_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 /fo"x64/Release/apr_ldap-1.res" /d DLL_NAME="apr_ldap" /d "NDEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib ole32.lib /nologo /base:"0x6EEB0000" /subsystem:windows /dll /incremental:no /debug /opt:ref +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib ole32.lib /nologo /base:"0x6EEB0000" /subsystem:windows /dll /incremental:no /debug /out:"x64\Release\apr_ldap-1.dll" /pdb:"x64\Release\apr_ldap-1.pdb" /implib:"x64\Release\apr_ldap-1.lib" /MACHINE:X64 /opt:ref +# Begin Special Build Tool +TargetPath=x64\Release\apr_ldap-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)" == "apr_ldap - x64 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "x64\Debug" +# PROP BASE Intermediate_Dir "x64\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "x64\Debug" +# PROP Intermediate_Dir "x64\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\apr_ldap_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 /fo"x64/Debug/apr_ldap-1.res" /d DLL_NAME="apr_ldap" /d "_DEBUG" /d "APU_VERSION_ONLY" /I "../include" /I "../../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib ole32.lib /nologo /base:"0x6EEB0000" /subsystem:windows /dll /incremental:no /debug +# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib ole32.lib /nologo /base:"0x6EEB0000" /subsystem:windows /dll /incremental:no /debug /out:"x64\Debug\apr_ldap-1.dll" /pdb:"x64\Debug\apr_ldap-1.pdb" /implib:"x64\Debug\apr_ldap-1.lib" /MACHINE:X64 +# Begin Special Build Tool +TargetPath=x64\Debug\apr_ldap-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 + +!ENDIF + +# Begin Target + +# Name "apr_ldap - Win32 Release" +# Name "apr_ldap - Win32 Debug" +# Name "apr_ldap - x64 Release" +# Name "apr_ldap - x64 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\apr_ldap_init.c +# End Source File +# Begin Source File + +SOURCE=.\apr_ldap_option.c +# End Source File +# Begin Source File + +SOURCE=.\apr_ldap_rebind.c +# End Source File +# End Group +# Begin Group "Public Header Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\include\apr_ldap.h +# End Source File +# Begin Source File + +SOURCE=..\include\apr_ldap_init.h +# End Source File +# Begin Source File + +SOURCE=..\include\apr_ldap_option.h +# End Source File +# Begin Source File + +SOURCE=..\include\apr_ldap_rebind.h +# End Source File +# Begin Source File + +SOURCE=..\include\apr_ldap_url.h +# End Source File +# End Group +# Begin Group "Internal Header Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\include\private\apu_config.h +# End Source File +# Begin Source File + +SOURCE=..\include\private\apu_internal.h +# End Source File +# End Group +# Begin Source File + +SOURCE=..\libaprutil.rc +# End Source File +# End Target +# End Project Index: contrib/apr-util/ldap/apr_ldap.mak =================================================================== --- /dev/null +++ contrib/apr-util/ldap/apr_ldap.mak @@ -0,0 +1,620 @@ +# Microsoft Developer Studio Generated NMAKE File, Based on apr_ldap.dsp +!IF "$(CFG)" == "" +CFG=apr_ldap - Win32 Release +!MESSAGE No configuration specified. Defaulting to apr_ldap - Win32 Release. +!ENDIF + +!IF "$(CFG)" != "apr_ldap - Win32 Release" && "$(CFG)" != "apr_ldap - Win32 Debug" && "$(CFG)" != "apr_ldap - x64 Release" && "$(CFG)" != "apr_ldap - 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: +!MESSAGE +!MESSAGE NMAKE /f "apr_ldap.mak" CFG="apr_ldap - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "apr_ldap - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_ldap - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_ldap - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "apr_ldap - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +!IF "$(CFG)" == "apr_ldap - Win32 Release" + +OUTDIR=.\Release +INTDIR=.\Release +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_ldap-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\apr_ldap-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_ldap-1.res" + -@erase "$(INTDIR)\apr_ldap_init.obj" + -@erase "$(INTDIR)\apr_ldap_option.obj" + -@erase "$(INTDIR)\apr_ldap_rebind.obj" + -@erase "$(INTDIR)\apr_ldap_src.idb" + -@erase "$(INTDIR)\apr_ldap_src.pdb" + -@erase "$(OUTDIR)\apr_ldap-1.dll" + -@erase "$(OUTDIR)\apr_ldap-1.exp" + -@erase "$(OUTDIR)\apr_ldap-1.lib" + -@erase "$(OUTDIR)\apr_ldap-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_ldap_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)\apr_ldap-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_ldap" /d "NDEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_ldap.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib ole32.lib /nologo /base:"0x6EEB0000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_ldap-1.pdb" /debug /out:"$(OUTDIR)\apr_ldap-1.dll" /implib:"$(OUTDIR)\apr_ldap-1.lib" /opt:ref +LINK32_OBJS= \ + "$(INTDIR)\apr_ldap_init.obj" \ + "$(INTDIR)\apr_ldap_option.obj" \ + "$(INTDIR)\apr_ldap_rebind.obj" \ + "$(INTDIR)\apr_ldap-1.res" \ + "..\..\apr\Release\libapr-1.lib" \ + "..\Release\libaprutil-1.lib" + +"$(OUTDIR)\apr_ldap-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Release\apr_ldap-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_ldap-1.dll" + if exist .\Release\apr_ldap-1.dll.manifest mt.exe -manifest .\Release\apr_ldap-1.dll.manifest -outputresource:.\Release\apr_ldap-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_ldap - Win32 Debug" + +OUTDIR=.\Debug +INTDIR=.\Debug +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_ldap-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\apr_ldap-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_ldap-1.res" + -@erase "$(INTDIR)\apr_ldap_init.obj" + -@erase "$(INTDIR)\apr_ldap_option.obj" + -@erase "$(INTDIR)\apr_ldap_rebind.obj" + -@erase "$(INTDIR)\apr_ldap_src.idb" + -@erase "$(INTDIR)\apr_ldap_src.pdb" + -@erase "$(OUTDIR)\apr_ldap-1.dll" + -@erase "$(OUTDIR)\apr_ldap-1.exp" + -@erase "$(OUTDIR)\apr_ldap-1.lib" + -@erase "$(OUTDIR)\apr_ldap-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_ldap_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)\apr_ldap-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_ldap" /d "_DEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_ldap.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib ole32.lib /nologo /base:"0x6EEB0000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_ldap-1.pdb" /debug /out:"$(OUTDIR)\apr_ldap-1.dll" /implib:"$(OUTDIR)\apr_ldap-1.lib" +LINK32_OBJS= \ + "$(INTDIR)\apr_ldap_init.obj" \ + "$(INTDIR)\apr_ldap_option.obj" \ + "$(INTDIR)\apr_ldap_rebind.obj" \ + "$(INTDIR)\apr_ldap-1.res" \ + "..\..\apr\Debug\libapr-1.lib" \ + "..\Debug\libaprutil-1.lib" + +"$(OUTDIR)\apr_ldap-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Debug\apr_ldap-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_ldap-1.dll" + if exist .\Debug\apr_ldap-1.dll.manifest mt.exe -manifest .\Debug\apr_ldap-1.dll.manifest -outputresource:.\Debug\apr_ldap-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_ldap - x64 Release" + +OUTDIR=.\x64\Release +INTDIR=.\x64\Release +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\x64\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_ldap-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - x64 Release" "libapr - x64 Release" "$(OUTDIR)\apr_ldap-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - x64 ReleaseCLEAN" "libaprutil - x64 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_ldap-1.res" + -@erase "$(INTDIR)\apr_ldap_init.obj" + -@erase "$(INTDIR)\apr_ldap_option.obj" + -@erase "$(INTDIR)\apr_ldap_rebind.obj" + -@erase "$(INTDIR)\apr_ldap_src.idb" + -@erase "$(INTDIR)\apr_ldap_src.pdb" + -@erase "$(OUTDIR)\apr_ldap-1.dll" + -@erase "$(OUTDIR)\apr_ldap-1.exp" + -@erase "$(OUTDIR)\apr_ldap-1.lib" + -@erase "$(OUTDIR)\apr_ldap-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../include" /I "../../apr/include" /I "../include/private" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_ldap_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)\apr_ldap-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_ldap" /d "NDEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_ldap.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib ole32.lib /nologo /base:"0x6EEB0000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_ldap-1.pdb" /debug /out:"$(OUTDIR)\apr_ldap-1.dll" /implib:"$(OUTDIR)\apr_ldap-1.lib" /MACHINE:X64 /opt:ref +LINK32_OBJS= \ + "$(INTDIR)\apr_ldap_init.obj" \ + "$(INTDIR)\apr_ldap_option.obj" \ + "$(INTDIR)\apr_ldap_rebind.obj" \ + "$(INTDIR)\apr_ldap-1.res" \ + "..\..\apr\x64\Release\libapr-1.lib" \ + "..\x64\Release\libaprutil-1.lib" + +"$(OUTDIR)\apr_ldap-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\x64\Release\apr_ldap-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\x64\Release +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_ldap-1.dll" + if exist .\x64\Release\apr_ldap-1.dll.manifest mt.exe -manifest .\x64\Release\apr_ldap-1.dll.manifest -outputresource:.\x64\Release\apr_ldap-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "apr_ldap - x64 Debug" + +OUTDIR=.\x64\Debug +INTDIR=.\x64\Debug +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\x64\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\apr_ldap-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "libaprutil - x64 Debug" "libapr - x64 Debug" "$(OUTDIR)\apr_ldap-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - x64 DebugCLEAN" "libaprutil - x64 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_ldap-1.res" + -@erase "$(INTDIR)\apr_ldap_init.obj" + -@erase "$(INTDIR)\apr_ldap_option.obj" + -@erase "$(INTDIR)\apr_ldap_rebind.obj" + -@erase "$(INTDIR)\apr_ldap_src.idb" + -@erase "$(INTDIR)\apr_ldap_src.pdb" + -@erase "$(OUTDIR)\apr_ldap-1.dll" + -@erase "$(OUTDIR)\apr_ldap-1.exp" + -@erase "$(OUTDIR)\apr_ldap-1.lib" + -@erase "$(OUTDIR)\apr_ldap-1.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../include" /I "../../apr/include" /I "../include/private" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\apr_ldap_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)\apr_ldap-1.res" /i "../include" /i "../../apr/include" /d DLL_NAME="apr_ldap" /d "_DEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr_ldap.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib ole32.lib /nologo /base:"0x6EEB0000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\apr_ldap-1.pdb" /debug /out:"$(OUTDIR)\apr_ldap-1.dll" /implib:"$(OUTDIR)\apr_ldap-1.lib" /MACHINE:X64 +LINK32_OBJS= \ + "$(INTDIR)\apr_ldap_init.obj" \ + "$(INTDIR)\apr_ldap_option.obj" \ + "$(INTDIR)\apr_ldap_rebind.obj" \ + "$(INTDIR)\apr_ldap-1.res" \ + "..\..\apr\x64\Debug\libapr-1.lib" \ + "..\x64\Debug\libaprutil-1.lib" + +"$(OUTDIR)\apr_ldap-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\x64\Debug\apr_ldap-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\x64\Debug +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\apr_ldap-1.dll" + if exist .\x64\Debug\apr_ldap-1.dll.manifest mt.exe -manifest .\x64\Debug\apr_ldap-1.dll.manifest -outputresource:.\x64\Debug\apr_ldap-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ENDIF + + +!IF "$(NO_EXTERNAL_DEPS)" != "1" +!IF EXISTS("apr_ldap.dep") +!INCLUDE "apr_ldap.dep" +!ELSE +!MESSAGE Warning: cannot find "apr_ldap.dep" +!ENDIF +!ENDIF + + +!IF "$(CFG)" == "apr_ldap - Win32 Release" || "$(CFG)" == "apr_ldap - Win32 Debug" || "$(CFG)" == "apr_ldap - x64 Release" || "$(CFG)" == "apr_ldap - x64 Debug" +SOURCE=.\apr_ldap_init.c + +"$(INTDIR)\apr_ldap_init.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\apr_ldap_option.c + +"$(INTDIR)\apr_ldap_option.obj" : $(SOURCE) "$(INTDIR)" + + +SOURCE=.\apr_ldap_rebind.c + +"$(INTDIR)\apr_ldap_rebind.obj" : $(SOURCE) "$(INTDIR)" + + +!IF "$(CFG)" == "apr_ldap - Win32 Release" + +"libapr - Win32 Release" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" + cd "..\apr-util\ldap" + +"libapr - Win32 ReleaseCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN + cd "..\apr-util\ldap" + +!ELSEIF "$(CFG)" == "apr_ldap - Win32 Debug" + +"libapr - Win32 Debug" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" + cd "..\apr-util\ldap" + +"libapr - Win32 DebugCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN + cd "..\apr-util\ldap" + +!ELSEIF "$(CFG)" == "apr_ldap - x64 Release" + +"libapr - x64 Release" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Release" + cd "..\apr-util\ldap" + +"libapr - x64 ReleaseCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Release" RECURSE=1 CLEAN + cd "..\apr-util\ldap" + +!ELSEIF "$(CFG)" == "apr_ldap - x64 Debug" + +"libapr - x64 Debug" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Debug" + cd "..\apr-util\ldap" + +"libapr - x64 DebugCLEAN" : + cd ".\..\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Debug" RECURSE=1 CLEAN + cd "..\apr-util\ldap" + +!ENDIF + +!IF "$(CFG)" == "apr_ldap - Win32 Release" + +"libaprutil - Win32 Release" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" + cd ".\ldap" + +"libaprutil - Win32 ReleaseCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN + cd ".\ldap" + +!ELSEIF "$(CFG)" == "apr_ldap - Win32 Debug" + +"libaprutil - Win32 Debug" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" + cd ".\ldap" + +"libaprutil - Win32 DebugCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN + cd ".\ldap" + +!ELSEIF "$(CFG)" == "apr_ldap - x64 Release" + +"libaprutil - x64 Release" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Release" + cd ".\ldap" + +"libaprutil - x64 ReleaseCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Release" RECURSE=1 CLEAN + cd ".\ldap" + +!ELSEIF "$(CFG)" == "apr_ldap - x64 Debug" + +"libaprutil - x64 Debug" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Debug" + cd ".\ldap" + +"libaprutil - x64 DebugCLEAN" : + cd ".\.." + $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - x64 Debug" RECURSE=1 CLEAN + cd ".\ldap" + +!ENDIF + +SOURCE=..\libaprutil.rc + +!IF "$(CFG)" == "apr_ldap - Win32 Release" + + +"$(INTDIR)\apr_ldap-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_ldap-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_ldap" /d "NDEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_ldap - Win32 Debug" + + +"$(INTDIR)\apr_ldap-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_ldap-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_ldap" /d "_DEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_ldap - x64 Release" + + +"$(INTDIR)\apr_ldap-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_ldap-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_ldap" /d "NDEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ELSEIF "$(CFG)" == "apr_ldap - x64 Debug" + + +"$(INTDIR)\apr_ldap-1.res" : $(SOURCE) "$(INTDIR)" + $(RSC) /l 0x409 /fo"$(INTDIR)\apr_ldap-1.res" /i "../include" /i "../../apr/include" /i "\httpd-2.4.4\srclib\apr-util" /d DLL_NAME="apr_ldap" /d "_DEBUG" /d "APU_VERSION_ONLY" $(SOURCE) + + +!ENDIF + + +!ENDIF + Index: contrib/apr-util/libaprutil.dep =================================================================== --- /dev/null +++ contrib/apr-util/libaprutil.dep @@ -0,0 +1,339 @@ +# Microsoft Developer Studio Generated Dependency File, included by libaprutil.mak + +.\buckets\apr_brigade.c : \ + ".\include\apr_buckets.h"\ + ".\include\apu.h"\ + + +.\buckets\apr_buckets.c : \ + ".\include\apr_buckets.h"\ + ".\include\apu.h"\ + + +.\buckets\apr_buckets_alloc.c : \ + ".\include\apr_buckets.h"\ + ".\include\apu.h"\ + + +.\buckets\apr_buckets_eos.c : \ + ".\include\apr_buckets.h"\ + ".\include\apu.h"\ + + +.\buckets\apr_buckets_file.c : \ + ".\include\apr_buckets.h"\ + ".\include\apu.h"\ + + +.\buckets\apr_buckets_flush.c : \ + ".\include\apr_buckets.h"\ + ".\include\apu.h"\ + + +.\buckets\apr_buckets_heap.c : \ + ".\include\apr_buckets.h"\ + ".\include\apu.h"\ + + +.\buckets\apr_buckets_mmap.c : \ + ".\include\apr_buckets.h"\ + ".\include\apu.h"\ + + +.\buckets\apr_buckets_pipe.c : \ + ".\include\apr_buckets.h"\ + ".\include\apu.h"\ + + +.\buckets\apr_buckets_pool.c : \ + ".\include\apr_buckets.h"\ + ".\include\apu.h"\ + + +.\buckets\apr_buckets_refcount.c : \ + ".\include\apr_buckets.h"\ + ".\include\apu.h"\ + + +.\buckets\apr_buckets_simple.c : \ + ".\include\apr_buckets.h"\ + ".\include\apu.h"\ + + +.\buckets\apr_buckets_socket.c : \ + ".\include\apr_buckets.h"\ + ".\include\apu.h"\ + + +.\crypto\apr_crypto.c : \ + ".\include\apr_crypto.h"\ + ".\include\apu.h"\ + ".\include\apu_errno.h"\ + ".\include\apu_version.h"\ + ".\include\private\apr_crypto_internal.h"\ + ".\include\private\apu_config.h"\ + ".\include\private\apu_internal.h"\ + + +.\crypto\apr_md4.c : \ + ".\include\apr_md4.h"\ + ".\include\apr_xlate.h"\ + ".\include\apu.h"\ + + +.\crypto\apr_md5.c : \ + ".\include\apr_md5.h"\ + ".\include\apr_xlate.h"\ + ".\include\apu.h"\ + ".\include\private\apu_config.h"\ + + +.\crypto\apr_passwd.c : \ + ".\crypto\crypt_blowfish.h"\ + ".\include\apr_md5.h"\ + ".\include\apr_sha1.h"\ + ".\include\apr_xlate.h"\ + ".\include\apu.h"\ + ".\include\private\apu_config.h"\ + + +.\crypto\apr_sha1.c : \ + ".\include\apr_base64.h"\ + ".\include\apr_sha1.h"\ + ".\include\apr_xlate.h"\ + ".\include\apu.h"\ + + +.\crypto\apr_siphash.c : \ + ".\include\apr_siphash.h"\ + + +.\crypto\crypt_blowfish.c : \ + ".\crypto\crypt_blowfish.h"\ + + +.\crypto\getuuid.c : \ + ".\include\apr_md5.h"\ + ".\include\apr_uuid.h"\ + ".\include\apr_xlate.h"\ + ".\include\apu.h"\ + + +.\crypto\uuid.c : \ + ".\include\apr_uuid.h"\ + ".\include\apu.h"\ + + +.\dbd\apr_dbd.c : \ + ".\include\apr_dbd.h"\ + ".\include\apu.h"\ + ".\include\apu_version.h"\ + ".\include\private\apr_dbd_internal.h"\ + ".\include\private\apu_config.h"\ + ".\include\private\apu_internal.h"\ + + +.\dbm\apr_dbm.c : \ + ".\include\apr_dbm.h"\ + ".\include\apu.h"\ + ".\include\apu_version.h"\ + ".\include\private\apr_dbm_private.h"\ + ".\include\private\apu_config.h"\ + ".\include\private\apu_internal.h"\ + ".\include\private\apu_select_dbm.h"\ + + +.\dbm\apr_dbm_sdbm.c : \ + ".\include\apr_dbm.h"\ + ".\include\apr_sdbm.h"\ + ".\include\apu.h"\ + ".\include\private\apr_dbm_private.h"\ + ".\include\private\apu_config.h"\ + ".\include\private\apu_select_dbm.h"\ + + +.\encoding\apr_base64.c : \ + ".\include\apr_base64.h"\ + ".\include\apr_xlate.h"\ + ".\include\apu.h"\ + + +.\hooks\apr_hooks.c : \ + ".\include\apr_hooks.h"\ + ".\include\apr_optional.h"\ + ".\include\apr_optional_hooks.h"\ + ".\include\apu.h"\ + + +.\ldap\apr_ldap_stub.c : \ + ".\include\apr_ldap.h"\ + ".\include\apr_ldap_init.h"\ + ".\include\apr_ldap_option.h"\ + ".\include\apr_ldap_rebind.h"\ + ".\include\apr_ldap_url.h"\ + ".\include\apu.h"\ + ".\include\apu_version.h"\ + ".\include\private\apu_config.h"\ + ".\include\private\apu_internal.h"\ + + +.\ldap\apr_ldap_url.c : \ + ".\include\apr_ldap.h"\ + ".\include\apr_ldap_init.h"\ + ".\include\apr_ldap_option.h"\ + ".\include\apr_ldap_rebind.h"\ + ".\include\apr_ldap_url.h"\ + ".\include\apu.h"\ + + +.\memcache\apr_memcache.c : \ + ".\include\apr_buckets.h"\ + ".\include\apr_memcache.h"\ + ".\include\apr_reslist.h"\ + ".\include\apu.h"\ + + +.\misc\apr_date.c : \ + ".\include\apr_date.h"\ + ".\include\apu.h"\ + + +.\misc\apr_queue.c : \ + ".\include\apr_queue.h"\ + ".\include\apu.h"\ + + +.\misc\apr_reslist.c : \ + ".\include\apr_reslist.h"\ + ".\include\apu.h"\ + + +.\misc\apr_rmm.c : \ + ".\include\apr_anylock.h"\ + ".\include\apr_rmm.h"\ + ".\include\apu.h"\ + + +.\misc\apr_thread_pool.c : \ + ".\include\apr_thread_pool.h"\ + ".\include\apu.h"\ + + +.\misc\apu_dso.c : \ + ".\include\apu.h"\ + ".\include\apu_version.h"\ + ".\include\private\apu_config.h"\ + ".\include\private\apu_internal.h"\ + + +.\misc\apu_version.c : \ + ".\include\apu.h"\ + ".\include\apu_version.h"\ + + +.\dbm\sdbm\sdbm.c : \ + ".\dbm\sdbm\sdbm_pair.h"\ + ".\dbm\sdbm\sdbm_private.h"\ + ".\dbm\sdbm\sdbm_tune.h"\ + ".\include\apr_sdbm.h"\ + ".\include\apu.h"\ + + +.\dbm\sdbm\sdbm_hash.c : \ + ".\dbm\sdbm\sdbm_private.h"\ + ".\include\apr_sdbm.h"\ + ".\include\apu.h"\ + + +.\dbm\sdbm\sdbm_lock.c : \ + ".\dbm\sdbm\sdbm_private.h"\ + ".\dbm\sdbm\sdbm_tune.h"\ + ".\include\apr_sdbm.h"\ + ".\include\apu.h"\ + + +.\dbm\sdbm\sdbm_pair.c : \ + ".\dbm\sdbm\sdbm_pair.h"\ + ".\dbm\sdbm\sdbm_private.h"\ + ".\dbm\sdbm\sdbm_tune.h"\ + ".\include\apr_sdbm.h"\ + ".\include\apu.h"\ + + +.\strmatch\apr_strmatch.c : \ + ".\include\apr_strmatch.h"\ + ".\include\apu.h"\ + + +.\uri\apr_uri.c : \ + ".\include\apr_uri.h"\ + ".\include\apu.h"\ + + +.\xlate\xlate.c : \ + ".\include\apr_xlate.h"\ + ".\include\apu.h"\ + ".\include\private\apu_config.h"\ + + +.\xml\apr_xml.c : \ + ".\include\apr_xlate.h"\ + ".\include\apr_xml.h"\ + ".\include\apu.h"\ + ".\include\private\apu_config.h"\ + + +!IF "$(CFG)" == "libaprutil - Win32 Release" + +!ELSEIF "$(CFG)" == "libaprutil - Win32 Debug" + +!ELSEIF "$(CFG)" == "libaprutil - x64 Release" + +!ELSEIF "$(CFG)" == "libaprutil - x64 Debug" + +!ENDIF + +!IF "$(CFG)" == "libaprutil - Win32 Release" + +!ELSEIF "$(CFG)" == "libaprutil - Win32 Debug" + +!ELSEIF "$(CFG)" == "libaprutil - x64 Release" + +!ELSEIF "$(CFG)" == "libaprutil - x64 Debug" + +!ENDIF + +!IF "$(CFG)" == "libaprutil - Win32 Release" + +!ELSEIF "$(CFG)" == "libaprutil - Win32 Debug" + +!ELSEIF "$(CFG)" == "libaprutil - x64 Release" + +!ELSEIF "$(CFG)" == "libaprutil - x64 Debug" + +!ENDIF + +!IF "$(CFG)" == "libaprutil - Win32 Release" + +!ELSEIF "$(CFG)" == "libaprutil - Win32 Debug" + +!ELSEIF "$(CFG)" == "libaprutil - x64 Release" + +!ELSEIF "$(CFG)" == "libaprutil - x64 Debug" + +!ENDIF + +!IF "$(CFG)" == "libaprutil - Win32 Release" + +!ELSEIF "$(CFG)" == "libaprutil - Win32 Debug" + +!ELSEIF "$(CFG)" == "libaprutil - x64 Release" + +!ELSEIF "$(CFG)" == "libaprutil - x64 Debug" + +!ENDIF + +.\libaprutil.rc : \ + ".\include\apu.h"\ + ".\include\apu_version.h"\ + Index: contrib/apr-util/libaprutil.dsp =================================================================== --- /dev/null +++ contrib/apr-util/libaprutil.dsp @@ -0,0 +1,868 @@ +# Microsoft Developer Studio Project File - Name="libaprutil" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=libaprutil - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "libaprutil.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "libaprutil.mak" CFG="libaprutil - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "libaprutil - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "libaprutil - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "libaprutil - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "libaprutil - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "libaprutil - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "../apr/include" /I "./include/private" /I "./xml/expat/lib" /I "../apr-iconv/include" /I "./dbm/sdbm" /D "NDEBUG" /D "APR_DECLARE_EXPORT" /D "APU_DECLARE_EXPORT" /D "APU_USE_SDBM" $(XML_OPTIONS) /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\libaprutil_src" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" /d "APU_VERSION_ONLY" /I "./include" /I "../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib /nologo /base:"0x6EE60000" /subsystem:windows /dll /incremental:no /debug /opt:ref +# ADD LINK32 $(XML_PARSER).lib kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib /nologo /base:"0x6EE60000" /subsystem:windows /dll /incremental:no /debug /out:"Release\libaprutil-1.dll" /pdb:"Release\libaprutil-1.pdb" /implib:"Release\libaprutil-1.lib" /MACHINE:X86 /opt:ref +# Begin Special Build Tool +TargetPath=Release\libaprutil-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2 +# End Special Build Tool + +!ELSEIF "$(CFG)" == "libaprutil - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "../apr/include" /I "./include/private" /I "./xml/expat/lib" /I "../apr-iconv/include" /I "./dbm/sdbm" /D "_DEBUG" /D "APR_DECLARE_EXPORT" /D "APU_DECLARE_EXPORT" /D "APU_USE_SDBM" $(XML_OPTIONS) /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\libaprutil_src" /FD /EHsc /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" /d "APU_VERSION_ONLY" /I "./include" /I "../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib /nologo /base:"0x6EE60000" /subsystem:windows /dll /incremental:no /debug +# ADD LINK32 $(XML_PARSER).lib kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib /nologo /base:"0x6EE60000" /subsystem:windows /dll /incremental:no /debug /out:"Debug\libaprutil-1.dll" /pdb:"Debug\libaprutil-1.pdb" /implib:"Debug\libaprutil-1.lib" /MACHINE:X86 +# Begin Special Build Tool +TargetPath=Debug\libaprutil-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2 +# End Special Build Tool + +!ELSEIF "$(CFG)" == "libaprutil - x64 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "x64\Release" +# PROP BASE Intermediate_Dir "x64\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "x64\Release" +# PROP Intermediate_Dir "x64\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "../apr/include" /I "./include/private" /I "./xml/expat/lib" /I "../apr-iconv/include" /I "./dbm/sdbm" /D "NDEBUG" /D "APR_DECLARE_EXPORT" /D "APU_DECLARE_EXPORT" /D "APU_USE_SDBM" $(XML_OPTIONS) /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\libaprutil_src" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" /d "APU_VERSION_ONLY" /I "./include" /I "../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib /nologo /base:"0x6EE60000" /subsystem:windows /dll /incremental:no /debug /opt:ref +# ADD LINK32 $(XML_PARSER).lib kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib /nologo /base:"0x6EE60000" /subsystem:windows /dll /incremental:no /debug /out:"x64\Release\libaprutil-1.dll" /pdb:"x64\Release\libaprutil-1.pdb" /implib:"x64\Release\libaprutil-1.lib" /MACHINE:X64 /opt:ref +# Begin Special Build Tool +TargetPath=x64\Release\libaprutil-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2 +# End Special Build Tool + +!ELSEIF "$(CFG)" == "libaprutil - x64 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "x64\Debug" +# PROP BASE Intermediate_Dir "x64\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "x64\Debug" +# PROP Intermediate_Dir "x64\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "../apr/include" /I "./include/private" /I "./xml/expat/lib" /I "../apr-iconv/include" /I "./dbm/sdbm" /D "_DEBUG" /D "APR_DECLARE_EXPORT" /D "APU_DECLARE_EXPORT" /D "APU_USE_SDBM" $(XML_OPTIONS) /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\libaprutil_src" /FD /EHsc /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" /d "APU_VERSION_ONLY" /I "./include" /I "../apr/include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib /nologo /base:"0x6EE60000" /subsystem:windows /dll /incremental:no /debug +# ADD LINK32 $(XML_PARSER).lib kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib /nologo /base:"0x6EE60000" /subsystem:windows /dll /incremental:no /debug /out:"x64\Debug\libaprutil-1.dll" /pdb:"x64\Debug\libaprutil-1.pdb" /implib:"x64\Debug\libaprutil-1.lib" /MACHINE:X64 +# Begin Special Build Tool +TargetPath=x64\Debug\libaprutil-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2 +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "libaprutil - Win32 Release" +# Name "libaprutil - Win32 Debug" +# Name "libaprutil - x64 Release" +# Name "libaprutil - x64 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "" +# Begin Group "buckets" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\buckets\apr_brigade.c +# End Source File +# Begin Source File + +SOURCE=.\buckets\apr_buckets.c +# End Source File +# Begin Source File + +SOURCE=.\buckets\apr_buckets_alloc.c +# End Source File +# Begin Source File + +SOURCE=.\buckets\apr_buckets_eos.c +# End Source File +# Begin Source File + +SOURCE=.\buckets\apr_buckets_file.c +# End Source File +# Begin Source File + +SOURCE=.\buckets\apr_buckets_flush.c +# End Source File +# Begin Source File + +SOURCE=.\buckets\apr_buckets_heap.c +# End Source File +# Begin Source File + +SOURCE=.\buckets\apr_buckets_mmap.c +# End Source File +# Begin Source File + +SOURCE=.\buckets\apr_buckets_pipe.c +# End Source File +# Begin Source File + +SOURCE=.\buckets\apr_buckets_pool.c +# End Source File +# Begin Source File + +SOURCE=.\buckets\apr_buckets_refcount.c +# End Source File +# Begin Source File + +SOURCE=.\buckets\apr_buckets_simple.c +# End Source File +# Begin Source File + +SOURCE=.\buckets\apr_buckets_socket.c +# End Source File +# End Group +# Begin Group "crypto" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\crypto\apr_crypto.c +# End Source File +# Begin Source File + +SOURCE=.\crypto\apr_md4.c +# End Source File +# Begin Source File + +SOURCE=.\crypto\apr_md5.c +# End Source File +# Begin Source File + +SOURCE=.\crypto\apr_passwd.c +# End Source File +# Begin Source File + +SOURCE=.\crypto\apr_sha1.c +# End Source File +# Begin Source File + +SOURCE=.\crypto\apr_siphash.c +# End Source File +# Begin Source File + +SOURCE=.\crypto\crypt_blowfish.c +# End Source File +# Begin Source File + +SOURCE=.\crypto\crypt_blowfish.h +# End Source File +# Begin Source File + +SOURCE=.\crypto\getuuid.c +# End Source File +# Begin Source File + +SOURCE=.\crypto\uuid.c +# End Source File +# End Group +# Begin Group "dbd" +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\dbd\apr_dbd.c +# End Source File +# Begin Source File + +SOURCE=.\dbd\apr_dbd_mysql.c +# PROP Exclude_From_Build 1 +# End Source File +# Begin Source File + +SOURCE=.\dbd\apr_dbd_odbc.c +# PROP Exclude_From_Build 1 +# End Source File +# Begin Source File + +SOURCE=.\dbd\apr_dbd_oracle.c +# PROP Exclude_From_Build 1 +# End Source File +# Begin Source File + +SOURCE=.\dbd\apr_dbd_pgsql.c +# PROP Exclude_From_Build 1 +# End Source File +# Begin Source File + +SOURCE=.\dbd\apr_dbd_sqlite2.c +# PROP Exclude_From_Build 1 +# End Source File +# Begin Source File + +SOURCE=.\dbd\apr_dbd_sqlite3.c +# PROP Exclude_From_Build 1 +# End Source File +# End Group +# Begin Group "dbm" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\dbm\apr_dbm.c +# End Source File +# Begin Source File + +SOURCE=.\dbm\apr_dbm_berkeleydb.c +# PROP Exclude_From_Build 1 +# End Source File +# Begin Source File + +SOURCE=.\dbm\apr_dbm_gdbm.c +# PROP Exclude_From_Build 1 +# End Source File +# Begin Source File + +SOURCE=.\dbm\apr_dbm_sdbm.c +# End Source File +# End Group +# Begin Group "encoding" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\encoding\apr_base64.c +# End Source File +# End Group +# Begin Group "hooks" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\hooks\apr_hooks.c +# End Source File +# End Group +# Begin Group "ldap" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\ldap\apr_ldap_init.c +# PROP Exclude_From_Build 1 +# End Source File +# Begin Source File + +SOURCE=.\ldap\apr_ldap_option.c +# PROP Exclude_From_Build 1 +# End Source File +# Begin Source File + +SOURCE=.\ldap\apr_ldap_rebind.c +# PROP Exclude_From_Build 1 +# End Source File +# Begin Source File + +SOURCE=.\ldap\apr_ldap_stub.c +# End Source File +# Begin Source File + +SOURCE=.\ldap\apr_ldap_url.c +# End Source File +# End Group +# Begin Group "memcache" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\memcache\apr_memcache.c +# End Source File +# End Group +# Begin Group "misc" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\misc\apr_date.c +# End Source File +# Begin Source File + +SOURCE=.\misc\apu_dso.c +# End Source File +# Begin Source File + +SOURCE=.\misc\apr_queue.c +# End Source File +# Begin Source File + +SOURCE=.\misc\apr_reslist.c +# End Source File +# Begin Source File + +SOURCE=.\misc\apr_rmm.c +# End Source File +# Begin Source File + +SOURCE=.\misc\apr_thread_pool.c +# End Source File +# Begin Source File + +SOURCE=.\misc\apu_version.c +# End Source File +# End Group +# Begin Group "redis" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\redis\apr_redis.c +# End Source File +# End Group +# Begin Group "sdbm" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\dbm\sdbm\sdbm.c +# End Source File +# Begin Source File + +SOURCE=.\dbm\sdbm\sdbm_hash.c +# End Source File +# Begin Source File + +SOURCE=.\dbm\sdbm\sdbm_lock.c +# End Source File +# Begin Source File + +SOURCE=.\dbm\sdbm\sdbm_pair.c +# End Source File +# Begin Source File + +SOURCE=.\dbm\sdbm\sdbm_pair.h +# End Source File +# Begin Source File + +SOURCE=.\dbm\sdbm\sdbm_private.h +# End Source File +# Begin Source File + +SOURCE=.\dbm\sdbm\sdbm_tune.h +# End Source File +# End Group +# Begin Group "strmatch" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\strmatch\apr_strmatch.c +# End Source File +# End Group +# Begin Group "uri" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\uri\apr_uri.c +# End Source File +# End Group +# Begin Group "xlate" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\xlate\xlate.c +# End Source File +# End Group +# Begin Group "xml" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\xml\apr_xml.c +# End Source File +# End Group +# End Group +# Begin Group "Generated Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\include\apr_ldap.h.in +# End Source File +# Begin Source File + +SOURCE=.\include\apr_ldap.hnw +# End Source File +# Begin Source File + +SOURCE=.\include\apr_ldap.hw + +!IF "$(CFG)" == "libaprutil - Win32 Release" + +# Begin Custom Build - Creating apr_ldap.h from apr_ldap.hw +InputPath=.\include\apr_ldap.hw + +".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\apr_ldap.hw > .\include\apr_ldap.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "libaprutil - Win32 Debug" + +# Begin Custom Build - Creating apr_ldap.h from apr_ldap.hw +InputPath=.\include\apr_ldap.hw + +".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\apr_ldap.hw > .\include\apr_ldap.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "libaprutil - x64 Release" + +# Begin Custom Build - Creating apr_ldap.h from apr_ldap.hw +InputPath=.\include\apr_ldap.hw + +".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\apr_ldap.hw > .\include\apr_ldap.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "libaprutil - x64 Debug" + +# Begin Custom Build - Creating apr_ldap.h from apr_ldap.hw +InputPath=.\include\apr_ldap.hw + +".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\apr_ldap.hw > .\include\apr_ldap.h + +# End Custom Build + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\include\apu.h.in +# End Source File +# Begin Source File + +SOURCE=.\include\apu.hnw +# End Source File +# Begin Source File + +SOURCE=.\include\apu.hw + +!IF "$(CFG)" == "libaprutil - Win32 Release" + +# Begin Custom Build - Creating apu.h from apu.hw +InputPath=.\include\apu.hw + +".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\apu.hw > .\include\apu.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "libaprutil - Win32 Debug" + +# Begin Custom Build - Creating apu.h from apu.hw +InputPath=.\include\apu.hw + +".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\apu.hw > .\include\apu.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "libaprutil - x64 Release" + +# Begin Custom Build - Creating apu.h from apu.hw +InputPath=.\include\apu.hw + +".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\apu.hw > .\include\apu.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "libaprutil - x64 Debug" + +# Begin Custom Build - Creating apu.h from apu.hw +InputPath=.\include\apu.hw + +".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\apu.hw > .\include\apu.h + +# End Custom Build + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\include\private\apu_config.h.in +# End Source File +# Begin Source File + +SOURCE=.\include\private\apu_config.hw + +!IF "$(CFG)" == "libaprutil - Win32 Release" + +# Begin Custom Build - Creating apu_config.h from apu_config.hw +InputPath=.\include\private\apu_config.hw + +".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\private\apu_config.hw > .\include\private\apu_config.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "libaprutil - Win32 Debug" + +# Begin Custom Build - Creating apu_config.h from apu_config.hw +InputPath=.\include\private\apu_config.hw + +".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\private\apu_config.hw > .\include\private\apu_config.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "libaprutil - x64 Release" + +# Begin Custom Build - Creating apu_config.h from apu_config.hw +InputPath=.\include\private\apu_config.hw + +".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\private\apu_config.hw > .\include\private\apu_config.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "libaprutil - x64 Debug" + +# Begin Custom Build - Creating apu_config.h from apu_config.hw +InputPath=.\include\private\apu_config.hw + +".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\private\apu_config.hw > .\include\private\apu_config.h + +# End Custom Build + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\include\private\apu_select_dbm.h.in +# End Source File +# Begin Source File + +SOURCE=.\include\private\apu_select_dbm.hw + +!IF "$(CFG)" == "libaprutil - Win32 Release" + +# Begin Custom Build - Creating apu_select_dbm.h from apu_select_dbm.hw +InputPath=.\include\private\apu_select_dbm.hw + +".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\private\apu_select_dbm.hw > .\include\private\apu_select_dbm.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "libaprutil - Win32 Debug" + +# Begin Custom Build - Creating apu_select_dbm.h from apu_select_dbm.hw +InputPath=.\include\private\apu_select_dbm.hw + +".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\private\apu_select_dbm.hw > .\include\private\apu_select_dbm.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "libaprutil - x64 Release" + +# Begin Custom Build - Creating apu_select_dbm.h from apu_select_dbm.hw +InputPath=.\include\private\apu_select_dbm.hw + +".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\private\apu_select_dbm.hw > .\include\private\apu_select_dbm.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "libaprutil - x64 Debug" + +# Begin Custom Build - Creating apu_select_dbm.h from apu_select_dbm.hw +InputPath=.\include\private\apu_select_dbm.hw + +".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\private\apu_select_dbm.hw > .\include\private\apu_select_dbm.h + +# End Custom Build + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\include\apu_want.h.in +# End Source File +# Begin Source File + +SOURCE=.\include\apu_want.hnw +# End Source File +# Begin Source File + +SOURCE=.\include\apu_want.hw + +!IF "$(CFG)" == "libaprutil - Win32 Release" + +# Begin Custom Build - Creating apu_want.h from apu_want.hw +InputPath=.\include\apu_want.hw + +".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\apu_want.hw > .\include\apu_want.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "libaprutil - Win32 Debug" + +# Begin Custom Build - Creating apu_want.h from apu_want.hw +InputPath=.\include\apu_want.hw + +".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\apu_want.hw > .\include\apu_want.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "libaprutil - x64 Release" + +# Begin Custom Build - Creating apu_want.h from apu_want.hw +InputPath=.\include\apu_want.hw + +".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\apu_want.hw > .\include\apu_want.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "libaprutil - x64 Debug" + +# Begin Custom Build - Creating apu_want.h from apu_want.hw +InputPath=.\include\apu_want.hw + +".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + type .\include\apu_want.hw > .\include\apu_want.h + +# End Custom Build + +!ENDIF + +# End Source File +# End Group +# Begin Group "Public Header Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\include\apr_anylock.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_base64.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_buckets.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_date.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_dbm.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_hooks.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_ldap_url.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_md4.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_md5.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_memcache.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_optional.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_optional_hooks.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_queue.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_reslist.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_rmm.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_sdbm.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_sha1.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_siphash.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_strmatch.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_thread_pool.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_uri.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_uuid.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_xlate.h +# End Source File +# Begin Source File + +SOURCE=.\include\apr_xml.h +# End Source File +# Begin Source File + +SOURCE=.\include\apu_version.h +# End Source File +# End Group +# Begin Source File + +SOURCE=.\libaprutil.rc +# End Source File +# End Target +# End Project Index: contrib/apr-util/libaprutil.mak =================================================================== --- /dev/null +++ contrib/apr-util/libaprutil.mak @@ -0,0 +1,1472 @@ +# Microsoft Developer Studio Generated NMAKE File, Based on libaprutil.dsp +!IF "$(CFG)" == "" +CFG=libaprutil - Win32 Release +!MESSAGE No configuration specified. Defaulting to libaprutil - Win32 Release. +!ENDIF + +!IF "$(CFG)" != "libaprutil - Win32 Release" && "$(CFG)" != "libaprutil - Win32 Debug" && "$(CFG)" != "libaprutil - x64 Release" && "$(CFG)" != "libaprutil - 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: +!MESSAGE +!MESSAGE NMAKE /f "libaprutil.mak" CFG="libaprutil - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "libaprutil - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "libaprutil - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "libaprutil - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "libaprutil - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +!IF "$(_HAVE_OSSL110)" == "1" +SSLINC=/I ../openssl/include +!ELSE +SSLINC=/I ../openssl/inc32 +!ENDIF + +!IF "$(CFG)" == "libaprutil - Win32 Release" + +OUTDIR=.\Release +INTDIR=.\Release +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : ".\include\apu_want.h" "$(OUTDIR)\libaprutil-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "xml - Win32 Release" "libapriconv - Win32 Release" "libapr - Win32 Release" ".\include\apu_want.h" "$(OUTDIR)\libaprutil-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - Win32 ReleaseCLEAN" "libapriconv - Win32 ReleaseCLEAN" "xml - Win32 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_base64.obj" + -@erase "$(INTDIR)\apr_brigade.obj" + -@erase "$(INTDIR)\apr_buckets.obj" + -@erase "$(INTDIR)\apr_buckets_alloc.obj" + -@erase "$(INTDIR)\apr_buckets_eos.obj" + -@erase "$(INTDIR)\apr_buckets_file.obj" + -@erase "$(INTDIR)\apr_buckets_flush.obj" + -@erase "$(INTDIR)\apr_buckets_heap.obj" + -@erase "$(INTDIR)\apr_buckets_mmap.obj" + -@erase "$(INTDIR)\apr_buckets_pipe.obj" + -@erase "$(INTDIR)\apr_buckets_pool.obj" + -@erase "$(INTDIR)\apr_buckets_refcount.obj" + -@erase "$(INTDIR)\apr_buckets_simple.obj" + -@erase "$(INTDIR)\apr_buckets_socket.obj" + -@erase "$(INTDIR)\apr_crypto.obj" + -@erase "$(INTDIR)\apr_date.obj" + -@erase "$(INTDIR)\apr_dbd.obj" + -@erase "$(INTDIR)\apr_dbm.obj" + -@erase "$(INTDIR)\apr_dbm_sdbm.obj" + -@erase "$(INTDIR)\apr_hooks.obj" + -@erase "$(INTDIR)\apr_ldap_stub.obj" + -@erase "$(INTDIR)\apr_ldap_url.obj" + -@erase "$(INTDIR)\apr_md4.obj" + -@erase "$(INTDIR)\apr_md5.obj" + -@erase "$(INTDIR)\apr_memcache.obj" + -@erase "$(INTDIR)\apr_passwd.obj" + -@erase "$(INTDIR)\apr_queue.obj" + -@erase "$(INTDIR)\apr_redis.obj" + -@erase "$(INTDIR)\apr_reslist.obj" + -@erase "$(INTDIR)\apr_rmm.obj" + -@erase "$(INTDIR)\apr_sha1.obj" + -@erase "$(INTDIR)\apr_siphash.obj" + -@erase "$(INTDIR)\apr_strmatch.obj" + -@erase "$(INTDIR)\apr_thread_pool.obj" + -@erase "$(INTDIR)\apr_uri.obj" + -@erase "$(INTDIR)\apr_xml.obj" + -@erase "$(INTDIR)\apu_dso.obj" + -@erase "$(INTDIR)\apu_version.obj" + -@erase "$(INTDIR)\crypt_blowfish.obj" + -@erase "$(INTDIR)\getuuid.obj" + -@erase "$(INTDIR)\libaprutil.res" + -@erase "$(INTDIR)\libaprutil_src.idb" + -@erase "$(INTDIR)\libaprutil_src.pdb" + -@erase "$(INTDIR)\sdbm.obj" + -@erase "$(INTDIR)\sdbm_hash.obj" + -@erase "$(INTDIR)\sdbm_lock.obj" + -@erase "$(INTDIR)\sdbm_pair.obj" + -@erase "$(INTDIR)\uuid.obj" + -@erase "$(INTDIR)\xlate.obj" + -@erase "$(OUTDIR)\libaprutil-1.dll" + -@erase "$(OUTDIR)\libaprutil-1.exp" + -@erase "$(OUTDIR)\libaprutil-1.lib" + -@erase "$(OUTDIR)\libaprutil-1.pdb" + -@erase ".\include\apu_want.h" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "../apr/include" /I "./include/private" /I "../apr-iconv/include" /I "./dbm/sdbm" /I "./xml/expat/lib" $(SSLINC) /D "NDEBUG" /D "APR_DECLARE_EXPORT" /D "APU_DECLARE_EXPORT" /D "APU_USE_SDBM" $(XML_OPTIONS) /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libaprutil_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)\libaprutil.res" /i "./include" /i "../apr/include" /d "NDEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\libaprutil.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=$(XML_PARSER).lib kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib /nologo /base:"0x6EE60000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libaprutil-1.pdb" /debug /out:"$(OUTDIR)\libaprutil-1.dll" /implib:"$(OUTDIR)\libaprutil-1.lib" /opt:ref +LINK32_OBJS= \ + "$(INTDIR)\apr_brigade.obj" \ + "$(INTDIR)\apr_buckets.obj" \ + "$(INTDIR)\apr_buckets_alloc.obj" \ + "$(INTDIR)\apr_buckets_eos.obj" \ + "$(INTDIR)\apr_buckets_file.obj" \ + "$(INTDIR)\apr_buckets_flush.obj" \ + "$(INTDIR)\apr_buckets_heap.obj" \ + "$(INTDIR)\apr_buckets_mmap.obj" \ + "$(INTDIR)\apr_buckets_pipe.obj" \ + "$(INTDIR)\apr_buckets_pool.obj" \ + "$(INTDIR)\apr_buckets_refcount.obj" \ + "$(INTDIR)\apr_buckets_simple.obj" \ + "$(INTDIR)\apr_buckets_socket.obj" \ + "$(INTDIR)\apr_crypto.obj" \ + "$(INTDIR)\apr_md4.obj" \ + "$(INTDIR)\apr_md5.obj" \ + "$(INTDIR)\apr_passwd.obj" \ + "$(INTDIR)\apr_sha1.obj" \ + "$(INTDIR)\apr_siphash.obj" \ + "$(INTDIR)\crypt_blowfish.obj" \ + "$(INTDIR)\getuuid.obj" \ + "$(INTDIR)\uuid.obj" \ + "$(INTDIR)\apr_dbd.obj" \ + "$(INTDIR)\apr_dbm.obj" \ + "$(INTDIR)\apr_dbm_sdbm.obj" \ + "$(INTDIR)\apr_base64.obj" \ + "$(INTDIR)\apr_hooks.obj" \ + "$(INTDIR)\apr_ldap_stub.obj" \ + "$(INTDIR)\apr_ldap_url.obj" \ + "$(INTDIR)\apr_memcache.obj" \ + "$(INTDIR)\apr_date.obj" \ + "$(INTDIR)\apu_dso.obj" \ + "$(INTDIR)\apr_queue.obj" \ + "$(INTDIR)\apr_redis.obj" \ + "$(INTDIR)\apr_reslist.obj" \ + "$(INTDIR)\apr_rmm.obj" \ + "$(INTDIR)\apr_thread_pool.obj" \ + "$(INTDIR)\apu_version.obj" \ + "$(INTDIR)\sdbm.obj" \ + "$(INTDIR)\sdbm_hash.obj" \ + "$(INTDIR)\sdbm_lock.obj" \ + "$(INTDIR)\sdbm_pair.obj" \ + "$(INTDIR)\apr_strmatch.obj" \ + "$(INTDIR)\apr_uri.obj" \ + "$(INTDIR)\xlate.obj" \ + "$(INTDIR)\apr_xml.obj" \ + "$(INTDIR)\libaprutil.res" \ + "..\apr\Release\libapr-1.lib" \ + "..\apr-iconv\Release\libapriconv-1.lib" + +"$(OUTDIR)\libaprutil-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Release\libaprutil-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\libaprutil-1.dll" + if exist .\Release\libaprutil-1.dll.manifest mt.exe -manifest .\Release\libaprutil-1.dll.manifest -outputresource:.\Release\libaprutil-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "libaprutil - Win32 Debug" + +OUTDIR=.\Debug +INTDIR=.\Debug +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : ".\include\private\apu_select_dbm.h" ".\include\private\apu_config.h" ".\include\apu_want.h" ".\include\apu.h" ".\include\apr_ldap.h" "$(OUTDIR)\libaprutil-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "xml - Win32 Debug" "libapriconv - Win32 Debug" "libapr - Win32 Debug" ".\include\private\apu_select_dbm.h" ".\include\private\apu_config.h" ".\include\apu_want.h" ".\include\apu.h" ".\include\apr_ldap.h" "$(OUTDIR)\libaprutil-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - Win32 DebugCLEAN" "libapriconv - Win32 DebugCLEAN" "xml - Win32 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_base64.obj" + -@erase "$(INTDIR)\apr_brigade.obj" + -@erase "$(INTDIR)\apr_buckets.obj" + -@erase "$(INTDIR)\apr_buckets_alloc.obj" + -@erase "$(INTDIR)\apr_buckets_eos.obj" + -@erase "$(INTDIR)\apr_buckets_file.obj" + -@erase "$(INTDIR)\apr_buckets_flush.obj" + -@erase "$(INTDIR)\apr_buckets_heap.obj" + -@erase "$(INTDIR)\apr_buckets_mmap.obj" + -@erase "$(INTDIR)\apr_buckets_pipe.obj" + -@erase "$(INTDIR)\apr_buckets_pool.obj" + -@erase "$(INTDIR)\apr_buckets_refcount.obj" + -@erase "$(INTDIR)\apr_buckets_simple.obj" + -@erase "$(INTDIR)\apr_buckets_socket.obj" + -@erase "$(INTDIR)\apr_crypto.obj" + -@erase "$(INTDIR)\apr_date.obj" + -@erase "$(INTDIR)\apr_dbd.obj" + -@erase "$(INTDIR)\apr_dbm.obj" + -@erase "$(INTDIR)\apr_dbm_sdbm.obj" + -@erase "$(INTDIR)\apr_hooks.obj" + -@erase "$(INTDIR)\apr_ldap_stub.obj" + -@erase "$(INTDIR)\apr_ldap_url.obj" + -@erase "$(INTDIR)\apr_md4.obj" + -@erase "$(INTDIR)\apr_md5.obj" + -@erase "$(INTDIR)\apr_memcache.obj" + -@erase "$(INTDIR)\apr_passwd.obj" + -@erase "$(INTDIR)\apr_queue.obj" + -@erase "$(INTDIR)\apr_redis.obj" + -@erase "$(INTDIR)\apr_reslist.obj" + -@erase "$(INTDIR)\apr_rmm.obj" + -@erase "$(INTDIR)\apr_sha1.obj" + -@erase "$(INTDIR)\apr_siphash.obj" + -@erase "$(INTDIR)\apr_strmatch.obj" + -@erase "$(INTDIR)\apr_thread_pool.obj" + -@erase "$(INTDIR)\apr_uri.obj" + -@erase "$(INTDIR)\apr_xml.obj" + -@erase "$(INTDIR)\apu_dso.obj" + -@erase "$(INTDIR)\apu_version.obj" + -@erase "$(INTDIR)\crypt_blowfish.obj" + -@erase "$(INTDIR)\getuuid.obj" + -@erase "$(INTDIR)\libaprutil.res" + -@erase "$(INTDIR)\libaprutil_src.idb" + -@erase "$(INTDIR)\libaprutil_src.pdb" + -@erase "$(INTDIR)\sdbm.obj" + -@erase "$(INTDIR)\sdbm_hash.obj" + -@erase "$(INTDIR)\sdbm_lock.obj" + -@erase "$(INTDIR)\sdbm_pair.obj" + -@erase "$(INTDIR)\uuid.obj" + -@erase "$(INTDIR)\xlate.obj" + -@erase "$(OUTDIR)\libaprutil-1.dll" + -@erase "$(OUTDIR)\libaprutil-1.exp" + -@erase "$(OUTDIR)\libaprutil-1.lib" + -@erase "$(OUTDIR)\libaprutil-1.pdb" + -@erase ".\include\apr_ldap.h" + -@erase ".\include\apu.h" + -@erase ".\include\apu_want.h" + -@erase ".\include\private\apu_config.h" + -@erase ".\include\private\apu_select_dbm.h" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "./include" /I "../apr/include" /I "./include/private" /I "../apr-iconv/include" /I "./dbm/sdbm" /I "./xml/expat/lib" $(SSLINC) /D "_DEBUG" /D "APR_DECLARE_EXPORT" /D "APU_DECLARE_EXPORT" /D "APU_USE_SDBM" $(XML_OPTIONS) /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libaprutil_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)\libaprutil.res" /i "./include" /i "../apr/include" /d "_DEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\libaprutil.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=$(XML_PARSER).lib kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib /nologo /base:"0x6EE60000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libaprutil-1.pdb" /debug /out:"$(OUTDIR)\libaprutil-1.dll" /implib:"$(OUTDIR)\libaprutil-1.lib" +LINK32_OBJS= \ + "$(INTDIR)\apr_brigade.obj" \ + "$(INTDIR)\apr_buckets.obj" \ + "$(INTDIR)\apr_buckets_alloc.obj" \ + "$(INTDIR)\apr_buckets_eos.obj" \ + "$(INTDIR)\apr_buckets_file.obj" \ + "$(INTDIR)\apr_buckets_flush.obj" \ + "$(INTDIR)\apr_buckets_heap.obj" \ + "$(INTDIR)\apr_buckets_mmap.obj" \ + "$(INTDIR)\apr_buckets_pipe.obj" \ + "$(INTDIR)\apr_buckets_pool.obj" \ + "$(INTDIR)\apr_buckets_refcount.obj" \ + "$(INTDIR)\apr_buckets_simple.obj" \ + "$(INTDIR)\apr_buckets_socket.obj" \ + "$(INTDIR)\apr_crypto.obj" \ + "$(INTDIR)\apr_md4.obj" \ + "$(INTDIR)\apr_md5.obj" \ + "$(INTDIR)\apr_passwd.obj" \ + "$(INTDIR)\apr_sha1.obj" \ + "$(INTDIR)\apr_siphash.obj" \ + "$(INTDIR)\crypt_blowfish.obj" \ + "$(INTDIR)\getuuid.obj" \ + "$(INTDIR)\uuid.obj" \ + "$(INTDIR)\apr_dbd.obj" \ + "$(INTDIR)\apr_dbm.obj" \ + "$(INTDIR)\apr_dbm_sdbm.obj" \ + "$(INTDIR)\apr_base64.obj" \ + "$(INTDIR)\apr_hooks.obj" \ + "$(INTDIR)\apr_ldap_stub.obj" \ + "$(INTDIR)\apr_ldap_url.obj" \ + "$(INTDIR)\apr_memcache.obj" \ + "$(INTDIR)\apr_date.obj" \ + "$(INTDIR)\apu_dso.obj" \ + "$(INTDIR)\apr_queue.obj" \ + "$(INTDIR)\apr_redis.obj" \ + "$(INTDIR)\apr_reslist.obj" \ + "$(INTDIR)\apr_rmm.obj" \ + "$(INTDIR)\apr_thread_pool.obj" \ + "$(INTDIR)\apu_version.obj" \ + "$(INTDIR)\sdbm.obj" \ + "$(INTDIR)\sdbm_hash.obj" \ + "$(INTDIR)\sdbm_lock.obj" \ + "$(INTDIR)\sdbm_pair.obj" \ + "$(INTDIR)\apr_strmatch.obj" \ + "$(INTDIR)\apr_uri.obj" \ + "$(INTDIR)\xlate.obj" \ + "$(INTDIR)\apr_xml.obj" \ + "$(INTDIR)\libaprutil.res" \ + "..\apr\Debug\libapr-1.lib" \ + "..\apr-iconv\Debug\libapriconv-1.lib" + +"$(OUTDIR)\libaprutil-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Debug\libaprutil-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\libaprutil-1.dll" + if exist .\Debug\libaprutil-1.dll.manifest mt.exe -manifest .\Debug\libaprutil-1.dll.manifest -outputresource:.\Debug\libaprutil-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "libaprutil - x64 Release" + +OUTDIR=.\x64\Release +INTDIR=.\x64\Release +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\x64\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : ".\include\private\apu_select_dbm.h" ".\include\private\apu_config.h" ".\include\apu_want.h" ".\include\apu.h" ".\include\apr_ldap.h" "$(OUTDIR)\libaprutil-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "xml - x64 Release" "libapriconv - x64 Release" "libapr - x64 Release" ".\include\private\apu_select_dbm.h" ".\include\private\apu_config.h" ".\include\apu_want.h" ".\include\apu.h" ".\include\apr_ldap.h" "$(OUTDIR)\libaprutil-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - x64 ReleaseCLEAN" "libapriconv - x64 ReleaseCLEAN" "xml - x64 ReleaseCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_base64.obj" + -@erase "$(INTDIR)\apr_brigade.obj" + -@erase "$(INTDIR)\apr_buckets.obj" + -@erase "$(INTDIR)\apr_buckets_alloc.obj" + -@erase "$(INTDIR)\apr_buckets_eos.obj" + -@erase "$(INTDIR)\apr_buckets_file.obj" + -@erase "$(INTDIR)\apr_buckets_flush.obj" + -@erase "$(INTDIR)\apr_buckets_heap.obj" + -@erase "$(INTDIR)\apr_buckets_mmap.obj" + -@erase "$(INTDIR)\apr_buckets_pipe.obj" + -@erase "$(INTDIR)\apr_buckets_pool.obj" + -@erase "$(INTDIR)\apr_buckets_refcount.obj" + -@erase "$(INTDIR)\apr_buckets_simple.obj" + -@erase "$(INTDIR)\apr_buckets_socket.obj" + -@erase "$(INTDIR)\apr_crypto.obj" + -@erase "$(INTDIR)\apr_date.obj" + -@erase "$(INTDIR)\apr_dbd.obj" + -@erase "$(INTDIR)\apr_dbm.obj" + -@erase "$(INTDIR)\apr_dbm_sdbm.obj" + -@erase "$(INTDIR)\apr_hooks.obj" + -@erase "$(INTDIR)\apr_ldap_stub.obj" + -@erase "$(INTDIR)\apr_ldap_url.obj" + -@erase "$(INTDIR)\apr_md4.obj" + -@erase "$(INTDIR)\apr_md5.obj" + -@erase "$(INTDIR)\apr_memcache.obj" + -@erase "$(INTDIR)\apr_passwd.obj" + -@erase "$(INTDIR)\apr_queue.obj" + -@erase "$(INTDIR)\apr_redis.obj" + -@erase "$(INTDIR)\apr_reslist.obj" + -@erase "$(INTDIR)\apr_rmm.obj" + -@erase "$(INTDIR)\apr_sha1.obj" + -@erase "$(INTDIR)\apr_siphash.obj" + -@erase "$(INTDIR)\apr_strmatch.obj" + -@erase "$(INTDIR)\apr_thread_pool.obj" + -@erase "$(INTDIR)\apr_uri.obj" + -@erase "$(INTDIR)\apr_xml.obj" + -@erase "$(INTDIR)\apu_dso.obj" + -@erase "$(INTDIR)\apu_version.obj" + -@erase "$(INTDIR)\crypt_blowfish.obj" + -@erase "$(INTDIR)\getuuid.obj" + -@erase "$(INTDIR)\libaprutil.res" + -@erase "$(INTDIR)\libaprutil_src.idb" + -@erase "$(INTDIR)\libaprutil_src.pdb" + -@erase "$(INTDIR)\sdbm.obj" + -@erase "$(INTDIR)\sdbm_hash.obj" + -@erase "$(INTDIR)\sdbm_lock.obj" + -@erase "$(INTDIR)\sdbm_pair.obj" + -@erase "$(INTDIR)\uuid.obj" + -@erase "$(INTDIR)\xlate.obj" + -@erase "$(OUTDIR)\libaprutil-1.dll" + -@erase "$(OUTDIR)\libaprutil-1.exp" + -@erase "$(OUTDIR)\libaprutil-1.lib" + -@erase "$(OUTDIR)\libaprutil-1.pdb" + -@erase ".\include\apr_ldap.h" + -@erase ".\include\apu.h" + -@erase ".\include\apu_want.h" + -@erase ".\include\private\apu_config.h" + -@erase ".\include\private\apu_select_dbm.h" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "../apr/include" /I "./include/private" /I "../apr-iconv/include" /I "./dbm/sdbm" /I "./xml/expat/lib" $(SSLINC) /D "NDEBUG" /D "APR_DECLARE_EXPORT" /D "APU_DECLARE_EXPORT" /D "APU_USE_SDBM" $(XML_OPTIONS) /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libaprutil_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)\libaprutil.res" /i "./include" /i "../apr/include" /d "NDEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\libaprutil.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=$(XML_PARSER).lib kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib /nologo /base:"0x6EE60000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libaprutil-1.pdb" /debug /out:"$(OUTDIR)\libaprutil-1.dll" /implib:"$(OUTDIR)\libaprutil-1.lib" /opt:ref +LINK32_OBJS= \ + "$(INTDIR)\apr_brigade.obj" \ + "$(INTDIR)\apr_buckets.obj" \ + "$(INTDIR)\apr_buckets_alloc.obj" \ + "$(INTDIR)\apr_buckets_eos.obj" \ + "$(INTDIR)\apr_buckets_file.obj" \ + "$(INTDIR)\apr_buckets_flush.obj" \ + "$(INTDIR)\apr_buckets_heap.obj" \ + "$(INTDIR)\apr_buckets_mmap.obj" \ + "$(INTDIR)\apr_buckets_pipe.obj" \ + "$(INTDIR)\apr_buckets_pool.obj" \ + "$(INTDIR)\apr_buckets_refcount.obj" \ + "$(INTDIR)\apr_buckets_simple.obj" \ + "$(INTDIR)\apr_buckets_socket.obj" \ + "$(INTDIR)\apr_crypto.obj" \ + "$(INTDIR)\apr_md4.obj" \ + "$(INTDIR)\apr_md5.obj" \ + "$(INTDIR)\apr_passwd.obj" \ + "$(INTDIR)\apr_sha1.obj" \ + "$(INTDIR)\apr_siphash.obj" \ + "$(INTDIR)\crypt_blowfish.obj" \ + "$(INTDIR)\getuuid.obj" \ + "$(INTDIR)\uuid.obj" \ + "$(INTDIR)\apr_dbd.obj" \ + "$(INTDIR)\apr_dbm.obj" \ + "$(INTDIR)\apr_dbm_sdbm.obj" \ + "$(INTDIR)\apr_base64.obj" \ + "$(INTDIR)\apr_hooks.obj" \ + "$(INTDIR)\apr_ldap_stub.obj" \ + "$(INTDIR)\apr_ldap_url.obj" \ + "$(INTDIR)\apr_memcache.obj" \ + "$(INTDIR)\apr_date.obj" \ + "$(INTDIR)\apu_dso.obj" \ + "$(INTDIR)\apr_queue.obj" \ + "$(INTDIR)\apr_redis.obj" \ + "$(INTDIR)\apr_reslist.obj" \ + "$(INTDIR)\apr_rmm.obj" \ + "$(INTDIR)\apr_thread_pool.obj" \ + "$(INTDIR)\apu_version.obj" \ + "$(INTDIR)\sdbm.obj" \ + "$(INTDIR)\sdbm_hash.obj" \ + "$(INTDIR)\sdbm_lock.obj" \ + "$(INTDIR)\sdbm_pair.obj" \ + "$(INTDIR)\apr_strmatch.obj" \ + "$(INTDIR)\apr_uri.obj" \ + "$(INTDIR)\xlate.obj" \ + "$(INTDIR)\apr_xml.obj" \ + "$(INTDIR)\libaprutil.res" \ + "..\apr\x64\Release\libapr-1.lib" \ + "..\apr-iconv\x64\Release\libapriconv-1.lib" + +"$(OUTDIR)\libaprutil-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\x64\Release\libaprutil-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\x64\Release +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\libaprutil-1.dll" + if exist .\x64\Release\libaprutil-1.dll.manifest mt.exe -manifest .\x64\Release\libaprutil-1.dll.manifest -outputresource:.\x64\Release\libaprutil-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ELSEIF "$(CFG)" == "libaprutil - x64 Debug" + +OUTDIR=.\x64\Debug +INTDIR=.\x64\Debug +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep +# Begin Custom Macros +OutDir=.\x64\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : ".\include\private\apu_select_dbm.h" ".\include\private\apu_config.h" ".\include\apu_want.h" ".\include\apu.h" ".\include\apr_ldap.h" "$(OUTDIR)\libaprutil-1.dll" "$(DS_POSTBUILD_DEP)" + +!ELSE + +ALL : "xml - x64 Debug" "libapriconv - x64 Debug" "libapr - x64 Debug" ".\include\private\apu_select_dbm.h" ".\include\private\apu_config.h" ".\include\apu_want.h" ".\include\apu.h" ".\include\apr_ldap.h" "$(OUTDIR)\libaprutil-1.dll" "$(DS_POSTBUILD_DEP)" + +!ENDIF + +!IF "$(RECURSE)" == "1" +CLEAN :"libapr - x64 DebugCLEAN" "libapriconv - x64 DebugCLEAN" "xml - x64 DebugCLEAN" +!ELSE +CLEAN : +!ENDIF + -@erase "$(INTDIR)\apr_base64.obj" + -@erase "$(INTDIR)\apr_brigade.obj" + -@erase "$(INTDIR)\apr_buckets.obj" + -@erase "$(INTDIR)\apr_buckets_alloc.obj" + -@erase "$(INTDIR)\apr_buckets_eos.obj" + -@erase "$(INTDIR)\apr_buckets_file.obj" + -@erase "$(INTDIR)\apr_buckets_flush.obj" + -@erase "$(INTDIR)\apr_buckets_heap.obj" + -@erase "$(INTDIR)\apr_buckets_mmap.obj" + -@erase "$(INTDIR)\apr_buckets_pipe.obj" + -@erase "$(INTDIR)\apr_buckets_pool.obj" + -@erase "$(INTDIR)\apr_buckets_refcount.obj" + -@erase "$(INTDIR)\apr_buckets_simple.obj" + -@erase "$(INTDIR)\apr_buckets_socket.obj" + -@erase "$(INTDIR)\apr_crypto.obj" + -@erase "$(INTDIR)\apr_date.obj" + -@erase "$(INTDIR)\apr_dbd.obj" + -@erase "$(INTDIR)\apr_dbm.obj" + -@erase "$(INTDIR)\apr_dbm_sdbm.obj" + -@erase "$(INTDIR)\apr_hooks.obj" + -@erase "$(INTDIR)\apr_ldap_stub.obj" + -@erase "$(INTDIR)\apr_ldap_url.obj" + -@erase "$(INTDIR)\apr_md4.obj" + -@erase "$(INTDIR)\apr_md5.obj" + -@erase "$(INTDIR)\apr_memcache.obj" + -@erase "$(INTDIR)\apr_passwd.obj" + -@erase "$(INTDIR)\apr_queue.obj" + -@erase "$(INTDIR)\apr_redis.obj" + -@erase "$(INTDIR)\apr_reslist.obj" + -@erase "$(INTDIR)\apr_rmm.obj" + -@erase "$(INTDIR)\apr_sha1.obj" + -@erase "$(INTDIR)\apr_siphash.obj" + -@erase "$(INTDIR)\apr_strmatch.obj" + -@erase "$(INTDIR)\apr_thread_pool.obj" + -@erase "$(INTDIR)\apr_uri.obj" + -@erase "$(INTDIR)\apr_xml.obj" + -@erase "$(INTDIR)\apu_dso.obj" + -@erase "$(INTDIR)\apu_version.obj" + -@erase "$(INTDIR)\crypt_blowfish.obj" + -@erase "$(INTDIR)\getuuid.obj" + -@erase "$(INTDIR)\libaprutil.res" + -@erase "$(INTDIR)\libaprutil_src.idb" + -@erase "$(INTDIR)\libaprutil_src.pdb" + -@erase "$(INTDIR)\sdbm.obj" + -@erase "$(INTDIR)\sdbm_hash.obj" + -@erase "$(INTDIR)\sdbm_lock.obj" + -@erase "$(INTDIR)\sdbm_pair.obj" + -@erase "$(INTDIR)\uuid.obj" + -@erase "$(INTDIR)\xlate.obj" + -@erase "$(OUTDIR)\libaprutil-1.dll" + -@erase "$(OUTDIR)\libaprutil-1.exp" + -@erase "$(OUTDIR)\libaprutil-1.lib" + -@erase "$(OUTDIR)\libaprutil-1.pdb" + -@erase ".\include\apr_ldap.h" + -@erase ".\include\apu.h" + -@erase ".\include\apu_want.h" + -@erase ".\include\private\apu_config.h" + -@erase ".\include\private\apu_select_dbm.h" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "./include" /I "../apr/include" /I "./include/private" /I "../apr-iconv/include" /I "./dbm/sdbm" /I "./xml/expat/lib" $(SSLINC) /D "_DEBUG" /D "APR_DECLARE_EXPORT" /D "APU_DECLARE_EXPORT" /D "APU_USE_SDBM" $(XML_OPTIONS) /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libaprutil_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)\libaprutil.res" /i "./include" /i "../apr/include" /d "_DEBUG" /d "APU_VERSION_ONLY" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\libaprutil.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=$(XML_PARSER).lib kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib /nologo /base:"0x6EE60000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libaprutil-1.pdb" /debug /out:"$(OUTDIR)\libaprutil-1.dll" /implib:"$(OUTDIR)\libaprutil-1.lib" +LINK32_OBJS= \ + "$(INTDIR)\apr_brigade.obj" \ + "$(INTDIR)\apr_buckets.obj" \ + "$(INTDIR)\apr_buckets_alloc.obj" \ + "$(INTDIR)\apr_buckets_eos.obj" \ + "$(INTDIR)\apr_buckets_file.obj" \ + "$(INTDIR)\apr_buckets_flush.obj" \ + "$(INTDIR)\apr_buckets_heap.obj" \ + "$(INTDIR)\apr_buckets_mmap.obj" \ + "$(INTDIR)\apr_buckets_pipe.obj" \ + "$(INTDIR)\apr_buckets_pool.obj" \ + "$(INTDIR)\apr_buckets_refcount.obj" \ + "$(INTDIR)\apr_buckets_simple.obj" \ + "$(INTDIR)\apr_buckets_socket.obj" \ + "$(INTDIR)\apr_crypto.obj" \ + "$(INTDIR)\apr_md4.obj" \ + "$(INTDIR)\apr_md5.obj" \ + "$(INTDIR)\apr_passwd.obj" \ + "$(INTDIR)\apr_sha1.obj" \ + "$(INTDIR)\apr_siphash.obj" \ + "$(INTDIR)\crypt_blowfish.obj" \ + "$(INTDIR)\getuuid.obj" \ + "$(INTDIR)\uuid.obj" \ + "$(INTDIR)\apr_dbd.obj" \ + "$(INTDIR)\apr_dbm.obj" \ + "$(INTDIR)\apr_dbm_sdbm.obj" \ + "$(INTDIR)\apr_base64.obj" \ + "$(INTDIR)\apr_hooks.obj" \ + "$(INTDIR)\apr_ldap_stub.obj" \ + "$(INTDIR)\apr_ldap_url.obj" \ + "$(INTDIR)\apr_memcache.obj" \ + "$(INTDIR)\apr_date.obj" \ + "$(INTDIR)\apu_dso.obj" \ + "$(INTDIR)\apr_queue.obj" \ + "$(INTDIR)\apr_redis.obj" \ + "$(INTDIR)\apr_reslist.obj" \ + "$(INTDIR)\apr_rmm.obj" \ + "$(INTDIR)\apr_thread_pool.obj" \ + "$(INTDIR)\apu_version.obj" \ + "$(INTDIR)\sdbm.obj" \ + "$(INTDIR)\sdbm_hash.obj" \ + "$(INTDIR)\sdbm_lock.obj" \ + "$(INTDIR)\sdbm_pair.obj" \ + "$(INTDIR)\apr_strmatch.obj" \ + "$(INTDIR)\apr_uri.obj" \ + "$(INTDIR)\xlate.obj" \ + "$(INTDIR)\apr_xml.obj" \ + "$(INTDIR)\libaprutil.res" \ + "..\apr\x64\Debug\libapr-1.lib" \ + "..\apr-iconv\x64\Debug\libapriconv-1.lib" + +"$(OUTDIR)\libaprutil-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\x64\Debug\libaprutil-1.dll +SOURCE="$(InputPath)" +PostBuild_Desc=Embed .manifest +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep + +# Begin Custom Macros +OutDir=.\x64\Debug +# End Custom Macros + +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\libaprutil-1.dll" + if exist .\x64\Debug\libaprutil-1.dll.manifest mt.exe -manifest .\x64\Debug\libaprutil-1.dll.manifest -outputresource:.\x64\Debug\libaprutil-1.dll;2 + echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" + +!ENDIF + + +!IF "$(NO_EXTERNAL_DEPS)" != "1" +!IF EXISTS("libaprutil.dep") +!INCLUDE "libaprutil.dep" +!ELSE +!MESSAGE Warning: cannot find "libaprutil.dep" +!ENDIF +!ENDIF + + +!IF "$(CFG)" == "libaprutil - Win32 Release" || "$(CFG)" == "libaprutil - Win32 Debug" || "$(CFG)" == "libaprutil - x64 Release" || "$(CFG)" == "libaprutil - x64 Debug" +SOURCE=.\buckets\apr_brigade.c + +"$(INTDIR)\apr_brigade.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\buckets\apr_buckets.c + +"$(INTDIR)\apr_buckets.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\buckets\apr_buckets_alloc.c + +"$(INTDIR)\apr_buckets_alloc.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\buckets\apr_buckets_eos.c + +"$(INTDIR)\apr_buckets_eos.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\buckets\apr_buckets_file.c + +"$(INTDIR)\apr_buckets_file.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\buckets\apr_buckets_flush.c + +"$(INTDIR)\apr_buckets_flush.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\buckets\apr_buckets_heap.c + +"$(INTDIR)\apr_buckets_heap.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\buckets\apr_buckets_mmap.c + +"$(INTDIR)\apr_buckets_mmap.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\buckets\apr_buckets_pipe.c + +"$(INTDIR)\apr_buckets_pipe.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\buckets\apr_buckets_pool.c + +"$(INTDIR)\apr_buckets_pool.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\buckets\apr_buckets_refcount.c + +"$(INTDIR)\apr_buckets_refcount.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\buckets\apr_buckets_simple.c + +"$(INTDIR)\apr_buckets_simple.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\buckets\apr_buckets_socket.c + +"$(INTDIR)\apr_buckets_socket.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\crypto\apr_crypto.c + +"$(INTDIR)\apr_crypto.obj" : $(SOURCE) "$(INTDIR)" ".\include\private\apu_config.h" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\crypto\apr_md4.c + +"$(INTDIR)\apr_md4.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\crypto\apr_md5.c + +"$(INTDIR)\apr_md5.obj" : $(SOURCE) "$(INTDIR)" ".\include\private\apu_config.h" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\crypto\apr_passwd.c + +"$(INTDIR)\apr_passwd.obj" : $(SOURCE) "$(INTDIR)" ".\include\private\apu_config.h" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\crypto\apr_sha1.c + +"$(INTDIR)\apr_sha1.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\crypto\apr_siphash.c + +"$(INTDIR)\apr_siphash.obj" : $(SOURCE) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\crypto\crypt_blowfish.c + +"$(INTDIR)\crypt_blowfish.obj" : $(SOURCE) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\crypto\getuuid.c + +"$(INTDIR)\getuuid.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\crypto\uuid.c + +"$(INTDIR)\uuid.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\dbd\apr_dbd.c + +"$(INTDIR)\apr_dbd.obj" : $(SOURCE) "$(INTDIR)" ".\include\private\apu_config.h" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\dbd\apr_dbd_mysql.c +SOURCE=.\dbd\apr_dbd_odbc.c +SOURCE=.\dbd\apr_dbd_oracle.c +SOURCE=.\dbd\apr_dbd_pgsql.c +SOURCE=.\dbd\apr_dbd_sqlite2.c +SOURCE=.\dbd\apr_dbd_sqlite3.c +SOURCE=.\dbm\apr_dbm.c + +"$(INTDIR)\apr_dbm.obj" : $(SOURCE) "$(INTDIR)" ".\include\private\apu_config.h" ".\include\apu.h" ".\include\private\apu_select_dbm.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\dbm\apr_dbm_berkeleydb.c +SOURCE=.\dbm\apr_dbm_gdbm.c +SOURCE=.\dbm\apr_dbm_sdbm.c + +"$(INTDIR)\apr_dbm_sdbm.obj" : $(SOURCE) "$(INTDIR)" ".\include\private\apu_config.h" ".\include\apu.h" ".\include\private\apu_select_dbm.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\encoding\apr_base64.c + +"$(INTDIR)\apr_base64.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\hooks\apr_hooks.c + +"$(INTDIR)\apr_hooks.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\ldap\apr_ldap_init.c +SOURCE=.\ldap\apr_ldap_option.c +SOURCE=.\ldap\apr_ldap_rebind.c +SOURCE=.\ldap\apr_ldap_stub.c + +"$(INTDIR)\apr_ldap_stub.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" ".\include\private\apu_config.h" ".\include\apr_ldap.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\ldap\apr_ldap_url.c + +"$(INTDIR)\apr_ldap_url.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" ".\include\apr_ldap.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\memcache\apr_memcache.c + +"$(INTDIR)\apr_memcache.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\misc\apr_date.c + +"$(INTDIR)\apr_date.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\misc\apr_queue.c + +"$(INTDIR)\apr_queue.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\misc\apr_reslist.c + +"$(INTDIR)\apr_reslist.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\misc\apr_rmm.c + +"$(INTDIR)\apr_rmm.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\misc\apr_thread_pool.c + +"$(INTDIR)\apr_thread_pool.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\misc\apu_dso.c + +"$(INTDIR)\apu_dso.obj" : $(SOURCE) "$(INTDIR)" ".\include\private\apu_config.h" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\misc\apu_version.c + +"$(INTDIR)\apu_version.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\redis\apr_redis.c + +"$(INTDIR)\apr_redis.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr_redis.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\dbm\sdbm\sdbm.c + +"$(INTDIR)\sdbm.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\dbm\sdbm\sdbm_hash.c + +"$(INTDIR)\sdbm_hash.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\dbm\sdbm\sdbm_lock.c + +"$(INTDIR)\sdbm_lock.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\dbm\sdbm\sdbm_pair.c + +"$(INTDIR)\sdbm_pair.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\strmatch\apr_strmatch.c + +"$(INTDIR)\apr_strmatch.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\uri\apr_uri.c + +"$(INTDIR)\apr_uri.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\xlate\xlate.c + +"$(INTDIR)\xlate.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" ".\include\private\apu_config.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\xml\apr_xml.c + +"$(INTDIR)\apr_xml.obj" : $(SOURCE) "$(INTDIR)" ".\include\private\apu_config.h" ".\include\apu.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\include\apr_ldap.hw + +!IF "$(CFG)" == "libaprutil - Win32 Release" + +InputPath=.\include\apr_ldap.hw + +".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\apr_ldap.h +<< + + +!ELSEIF "$(CFG)" == "libaprutil - Win32 Debug" + +InputPath=.\include\apr_ldap.hw + +".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\apr_ldap.h +<< + + +!ELSEIF "$(CFG)" == "libaprutil - x64 Release" + +InputPath=.\include\apr_ldap.hw + +".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\apr_ldap.h +<< + + +!ELSEIF "$(CFG)" == "libaprutil - x64 Debug" + +InputPath=.\include\apr_ldap.hw + +".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\apr_ldap.h +<< + + +!ENDIF + +SOURCE=.\include\apu.hw + +!IF "$(CFG)" == "libaprutil - Win32 Release" + +InputPath=.\include\apu.hw + +".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\apu.h +<< + + +!ELSEIF "$(CFG)" == "libaprutil - Win32 Debug" + +InputPath=.\include\apu.hw + +".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\apu.h +<< + + +!ELSEIF "$(CFG)" == "libaprutil - x64 Release" + +InputPath=.\include\apu.hw + +".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\apu.h +<< + + +!ELSEIF "$(CFG)" == "libaprutil - x64 Debug" + +InputPath=.\include\apu.hw + +".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\apu.h +<< + + +!ENDIF + +SOURCE=.\include\private\apu_config.hw + +!IF "$(CFG)" == "libaprutil - Win32 Release" + +InputPath=.\include\private\apu_config.hw + +".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\private\apu_config.h +<< + + +!ELSEIF "$(CFG)" == "libaprutil - Win32 Debug" + +InputPath=.\include\private\apu_config.hw + +".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\private\apu_config.h +<< + + +!ELSEIF "$(CFG)" == "libaprutil - x64 Release" + +InputPath=.\include\private\apu_config.hw + +".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\private\apu_config.h +<< + + +!ELSEIF "$(CFG)" == "libaprutil - x64 Debug" + +InputPath=.\include\private\apu_config.hw + +".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\private\apu_config.h +<< + + +!ENDIF + +SOURCE=.\include\private\apu_select_dbm.hw + +!IF "$(CFG)" == "libaprutil - Win32 Release" + +InputPath=.\include\private\apu_select_dbm.hw + +".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\private\apu_select_dbm.h +<< + + +!ELSEIF "$(CFG)" == "libaprutil - Win32 Debug" + +InputPath=.\include\private\apu_select_dbm.hw + +".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\private\apu_select_dbm.h +<< + + +!ELSEIF "$(CFG)" == "libaprutil - x64 Release" + +InputPath=.\include\private\apu_select_dbm.hw + +".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\private\apu_select_dbm.h +<< + + +!ELSEIF "$(CFG)" == "libaprutil - x64 Debug" + +InputPath=.\include\private\apu_select_dbm.hw + +".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\private\apu_select_dbm.h +<< + + +!ENDIF + +SOURCE=.\include\apu_want.hw + +!IF "$(CFG)" == "libaprutil - Win32 Release" + +InputPath=.\include\apu_want.hw + +".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\apu_want.h +<< + + +!ELSEIF "$(CFG)" == "libaprutil - Win32 Debug" + +InputPath=.\include\apu_want.hw + +".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\apu_want.h +<< + + +!ELSEIF "$(CFG)" == "libaprutil - x64 Release" + +InputPath=.\include\apu_want.hw + +".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\apu_want.h +<< + + +!ELSEIF "$(CFG)" == "libaprutil - x64 Debug" + +InputPath=.\include\apu_want.hw + +".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < .\include\apu_want.h +<< + + +!ENDIF + +!IF "$(CFG)" == "libaprutil - Win32 Release" + +"libapr - Win32 Release" : + cd ".\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" + cd "..\apr-util" + +"libapr - Win32 ReleaseCLEAN" : + cd ".\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN + cd "..\apr-util" + +!ELSEIF "$(CFG)" == "libaprutil - Win32 Debug" + +"libapr - Win32 Debug" : + cd ".\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" + cd "..\apr-util" + +"libapr - Win32 DebugCLEAN" : + cd ".\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN + cd "..\apr-util" + +!ELSEIF "$(CFG)" == "libaprutil - x64 Release" + +"libapr - x64 Release" : + cd ".\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Release" + cd "..\apr-util" + +"libapr - x64 ReleaseCLEAN" : + cd ".\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Release" RECURSE=1 CLEAN + cd "..\apr-util" + +!ELSEIF "$(CFG)" == "libaprutil - x64 Debug" + +"libapr - x64 Debug" : + cd ".\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Debug" + cd "..\apr-util" + +"libapr - x64 DebugCLEAN" : + cd ".\..\apr" + $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - x64 Debug" RECURSE=1 CLEAN + cd "..\apr-util" + +!ENDIF + +!IF "$(CFG)" == "libaprutil - Win32 Release" + +"libapriconv - Win32 Release" : + cd ".\..\apr-iconv" + $(MAKE) /$(MAKEFLAGS) /F ".\libapriconv.mak" CFG="libapriconv - Win32 Release" + cd "..\apr-util" + +"libapriconv - Win32 ReleaseCLEAN" : + cd ".\..\apr-iconv" + $(MAKE) /$(MAKEFLAGS) /F ".\libapriconv.mak" CFG="libapriconv - Win32 Release" RECURSE=1 CLEAN + cd "..\apr-util" + +!ELSEIF "$(CFG)" == "libaprutil - Win32 Debug" + +"libapriconv - Win32 Debug" : + cd ".\..\apr-iconv" + $(MAKE) /$(MAKEFLAGS) /F ".\libapriconv.mak" CFG="libapriconv - Win32 Debug" + cd "..\apr-util" + +"libapriconv - Win32 DebugCLEAN" : + cd ".\..\apr-iconv" + $(MAKE) /$(MAKEFLAGS) /F ".\libapriconv.mak" CFG="libapriconv - Win32 Debug" RECURSE=1 CLEAN + cd "..\apr-util" + +!ELSEIF "$(CFG)" == "libaprutil - x64 Release" + +"libapriconv - x64 Release" : + cd ".\..\apr-iconv" + $(MAKE) /$(MAKEFLAGS) /F ".\libapriconv.mak" CFG="libapriconv - x64 Release" + cd "..\apr-util" + +"libapriconv - x64 ReleaseCLEAN" : + cd ".\..\apr-iconv" + $(MAKE) /$(MAKEFLAGS) /F ".\libapriconv.mak" CFG="libapriconv - x64 Release" RECURSE=1 CLEAN + cd "..\apr-util" + +!ELSEIF "$(CFG)" == "libaprutil - x64 Debug" + +"libapriconv - x64 Debug" : + cd ".\..\apr-iconv" + $(MAKE) /$(MAKEFLAGS) /F ".\libapriconv.mak" CFG="libapriconv - x64 Debug" + cd "..\apr-util" + +"libapriconv - x64 DebugCLEAN" : + cd ".\..\apr-iconv" + $(MAKE) /$(MAKEFLAGS) /F ".\libapriconv.mak" CFG="libapriconv - x64 Debug" RECURSE=1 CLEAN + cd "..\apr-util" + +!ENDIF + +SOURCE=.\libaprutil.rc + +"$(INTDIR)\libaprutil.res" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" + $(RSC) $(RSC_PROJ) $(SOURCE) + + + +!ENDIF + Index: contrib/apr-util/memcache/apr_memcache.c =================================================================== --- contrib/apr-util/memcache/apr_memcache.c +++ contrib/apr-util/memcache/apr_memcache.c @@ -356,7 +356,7 @@ return rv; } - conn->buffer = apr_palloc(conn->p, BUFFER_SIZE); + conn->buffer = apr_palloc(conn->p, BUFFER_SIZE + 1); conn->blen = 0; conn->ms = ms; @@ -728,6 +728,26 @@ } +/* + * Parses a decimal size from size_str, returning the value in *size. + * Returns 1 if parsing was successful, 0 if parsing failed. + */ +static int parse_size(const char *size_str, apr_size_t *size) +{ + char *endptr; + long size_as_long; + + errno = 0; + size_as_long = strtol(size_str, &endptr, 10); + if ((size_as_long < 0) || (errno != 0) || (endptr == size_str) || + (endptr[0] != ' ' && (endptr[0] != '\r' || endptr[1] != '\n'))) { + return 0; + } + + *size = (unsigned long)size_as_long; + return 1; +} + APU_DECLARE(apr_status_t) apr_memcache_getp(apr_memcache_t *mc, apr_pool_t *p, @@ -796,13 +816,10 @@ } length = apr_strtok(NULL, " ", &last); - if (length) { - len = strtol(length, (char **)NULL, 10); - } - - if (len == 0 ) { - *new_length = 0; - *baton = NULL; + if (!length || !parse_size(length, &len)) { + ms_bad_conn(ms, conn); + apr_memcache_disable_server(mc, ms); + return APR_EGENERAL; } else { apr_bucket_brigade *bbb; @@ -810,7 +827,6 @@ /* eat the trailing \r\n */ rv = apr_brigade_partition(conn->bb, len+2, &e); - if (rv != APR_SUCCESS) { ms_bad_conn(ms, conn); apr_memcache_disable_server(mc, ms); @@ -820,17 +836,14 @@ bbb = apr_brigade_split(conn->bb, e); rv = apr_brigade_pflatten(conn->bb, baton, &len, p); - if (rv != APR_SUCCESS) { ms_bad_conn(ms, conn); - apr_memcache_disable_server(mc, ms); return rv; } rv = apr_brigade_destroy(conn->bb); if (rv != APR_SUCCESS) { ms_bad_conn(ms, conn); - apr_memcache_disable_server(mc, ms); return rv; } @@ -848,14 +861,18 @@ } if (strncmp(MS_END, conn->buffer, MS_END_LEN) != 0) { - rv = APR_EGENERAL; + ms_bad_conn(ms, conn); + apr_memcache_disable_server(mc, ms); + return APR_EGENERAL; } } else if (strncmp(MS_END, conn->buffer, MS_END_LEN) == 0) { rv = APR_NOTFOUND; } else { - rv = APR_EGENERAL; + ms_bad_conn(ms, conn); + apr_memcache_disable_server(mc, ms); + return APR_EGENERAL; } ms_release_conn(ms, conn); @@ -1358,74 +1375,68 @@ char *last; char *data; apr_size_t len = 0; + apr_bucket *e = NULL; key = apr_strtok(conn->buffer, " ", &last); /* just the VALUE, ignore */ key = apr_strtok(NULL, " ", &last); flags = apr_strtok(NULL, " ", &last); - - length = apr_strtok(NULL, " ", &last); - if (length) { - len = strtol(length, (char **) NULL, 10); + + if (!length || !parse_size(length, &len)) { + rv = APR_EGENERAL; + } + else { + /* eat the trailing \r\n */ + rv = apr_brigade_partition(conn->bb, len+2, &e); + } + if (rv != APR_SUCCESS) { + apr_pollset_remove (pollset, &activefds[i]); + mget_conn_result(TRUE, FALSE, rv, mc, ms, conn, + server_query, values, server_queries); + queries_sent--; + continue; } value = apr_hash_get(values, key, strlen(key)); - - if (value) { - if (len != 0) { - apr_bucket_brigade *bbb; - apr_bucket *e; - - /* eat the trailing \r\n */ - rv = apr_brigade_partition(conn->bb, len+2, &e); - - if (rv != APR_SUCCESS) { - apr_pollset_remove (pollset, &activefds[i]); - mget_conn_result(FALSE, FALSE, rv, mc, ms, conn, - server_query, values, server_queries); - queries_sent--; - continue; - } - - bbb = apr_brigade_split(conn->bb, e); - - rv = apr_brigade_pflatten(conn->bb, &data, &len, data_pool); - - if (rv != APR_SUCCESS) { - apr_pollset_remove (pollset, &activefds[i]); - mget_conn_result(FALSE, FALSE, rv, mc, ms, conn, - server_query, values, server_queries); - queries_sent--; - continue; - } - - rv = apr_brigade_destroy(conn->bb); - if (rv != APR_SUCCESS) { - apr_pollset_remove (pollset, &activefds[i]); - mget_conn_result(FALSE, FALSE, rv, mc, ms, conn, - server_query, values, server_queries); - queries_sent--; - continue; - } - - conn->bb = bbb; - - value->len = len - 2; - data[value->len] = '\0'; - value->data = data; + apr_bucket_brigade *bbb; + + bbb = apr_brigade_split(conn->bb, e); + + rv = apr_brigade_pflatten(conn->bb, &data, &len, data_pool); + if (rv != APR_SUCCESS) { + apr_pollset_remove (pollset, &activefds[i]); + mget_conn_result(TRUE, FALSE, rv, mc, ms, conn, + server_query, values, server_queries); + queries_sent--; + continue; + } + + rv = apr_brigade_destroy(conn->bb); + if (rv != APR_SUCCESS) { + apr_pollset_remove (pollset, &activefds[i]); + mget_conn_result(TRUE, FALSE, rv, mc, ms, conn, + server_query, values, server_queries); + queries_sent--; + continue; } - + + conn->bb = bbb; + + value->len = len - 2; + data[value->len] = '\0'; + value->data = data; + value->status = rv; value->flags = atoi(flags); - + /* stay on the server */ i--; - } else { - /* TODO: Server Sent back a key I didn't ask for or my - * hash is corrupt */ + /* Server Sent back a key I didn't ask for or my + * hash is corrupt */ + rv = APR_EGENERAL; } } else if (strncmp(MS_END, conn->buffer, MS_END_LEN) == 0) { @@ -1433,14 +1444,18 @@ apr_pollset_remove (pollset, &activefds[i]); ms_release_conn(ms, conn); apr_hash_set(server_queries, &ms, sizeof(ms), NULL); - queries_sent--; } else { /* unknown reply? */ rv = APR_EGENERAL; } - + if (rv != APR_SUCCESS) { + apr_pollset_remove (pollset, &activefds[i]); + mget_conn_result(TRUE, FALSE, rv, mc, ms, conn, + server_query, values, server_queries); + queries_sent--; + } } /* /for */ } /* /while */ Index: contrib/apr-util/redis/apr_redis.c =================================================================== --- /dev/null +++ contrib/apr-util/redis/apr_redis.c @@ -0,0 +1,1548 @@ +/* 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_redis.h" +#include "apr_poll.h" +#include "apr_version.h" +#include +#include + +#define BUFFER_SIZE 512 +#define LILBUFF_SIZE 64 +struct apr_redis_conn_t +{ + char *buffer; + apr_size_t blen; + apr_pool_t *p; + apr_pool_t *tp; + apr_socket_t *sock; + apr_bucket_brigade *bb; + apr_bucket_brigade *tb; + apr_redis_server_t *rs; +}; + +/* Strings for Client Commands */ + +#define RC_EOL "\r\n" +#define RC_EOL_LEN (sizeof(RC_EOL)-1) + +#define RC_WS " " +#define RC_WS_LEN (sizeof(RC_WS)-1) + +#define RC_RESP_1 "*1\r\n" +#define RC_RESP_1_LEN (sizeof(RC_RESP_1)-1) + +#define RC_RESP_2 "*2\r\n" +#define RC_RESP_2_LEN (sizeof(RC_RESP_2)-1) + +#define RC_RESP_3 "*3\r\n" +#define RC_RESP_3_LEN (sizeof(RC_RESP_3)-1) + +#define RC_RESP_4 "*4\r\n" +#define RC_RESP_4_LEN (sizeof(RC_RESP_4)-1) + +#define RC_GET "GET\r\n" +#define RC_GET_LEN (sizeof(RC_GET)-1) + +#define RC_GET_SIZE "$3\r\n" +#define RC_GET_SIZE_LEN (sizeof(RC_GET_SIZE)-1) + +#define RC_SET "SET\r\n" +#define RC_SET_LEN (sizeof(RC_SET)-1) + +#define RC_SET_SIZE "$3\r\n" +#define RC_SET_SIZE_LEN (sizeof(RC_SET_SIZE)-1) + +#define RC_SETEX "SETEX\r\n" +#define RC_SETEX_LEN (sizeof(RC_SETEX)-1) + +#define RC_SETEX_SIZE "$5\r\n" +#define RC_SETEX_SIZE_LEN (sizeof(RC_SETEX_SIZE)-1) + +#define RC_DEL "DEL\r\n" +#define RC_DEL_LEN (sizeof(RC_DEL)-1) + +#define RC_DEL_SIZE "$3\r\n" +#define RC_DEL_SIZE_LEN (sizeof(RC_DEL_SIZE)-1) + +#define RC_QUIT "QUIT\r\n" +#define RC_QUIT_LEN (sizeof(RC_QUIT)-1) + +#define RC_QUIT_SIZE "$4\r\n" +#define RC_QUIT_SIZE_LEN (sizeof(RC_QUIT_SIZE)-1) + +#define RC_PING "PING\r\n" +#define RC_PING_LEN (sizeof(RC_PING)-1) + +#define RC_PING_SIZE "$4\r\n" +#define RC_PING_SIZE_LEN (sizeof(RC_PING_SIZE)-1) + +#define RC_INFO "INFO\r\n" +#define RC_INFO_LEN (sizeof(RC_INFO)-1) + +#define RC_INFO_SIZE "$4\r\n" +#define RC_INFO_SIZE_LEN (sizeof(RC_INFO_SIZE)-1) + +/* Strings for Server Replies */ + +#define RS_STORED "+OK" +#define RS_STORED_LEN (sizeof(RS_STORED)-1) + +#define RS_NOT_STORED "$-1" +#define RS_NOT_STORED_LEN (sizeof(RS_NOT_STORED)-1) + +#define RS_DELETED ":1" +#define RS_DELETED_LEN (sizeof(RS_DELETED)-1) + +#define RS_NOT_FOUND_GET "$-1" +#define RS_NOT_FOUND_GET_LEN (sizeof(RS_NOT_FOUND_GET)-1) + +#define RS_NOT_FOUND_DEL ":0" +#define RS_NOT_FOUND_DEL_LEN (sizeof(RS_NOT_FOUND_DEL)-1) + +#define RS_TYPE_STRING "$" +#define RS_TYPE_STRING_LEN (sizeof(RS_TYPE_STRING)-1) + +#define RS_END "\r\n" +#define RS_END_LEN (sizeof(RS_END)-1) + +static apr_status_t make_server_dead(apr_redis_t *rc, + apr_redis_server_t *rs) +{ +#if APR_HAS_THREADS + apr_thread_mutex_lock(rs->lock); +#endif + rs->status = APR_RC_SERVER_DEAD; + rs->btime = apr_time_now(); +#if APR_HAS_THREADS + apr_thread_mutex_unlock(rs->lock); +#endif + return APR_SUCCESS; +} + +static apr_status_t make_server_live(apr_redis_t *rc, + apr_redis_server_t *rs) +{ + rs->status = APR_RC_SERVER_LIVE; + return APR_SUCCESS; +} + +APU_DECLARE(apr_status_t) apr_redis_add_server(apr_redis_t *rc, + apr_redis_server_t *rs) +{ + apr_status_t rv = APR_SUCCESS; + + if (rc->ntotal >= rc->nalloc) { + return APR_ENOMEM; + } + rc->live_servers[rc->ntotal] = rs; + rc->ntotal++; + make_server_live(rc, rs); + return rv; +} + +APU_DECLARE(apr_redis_server_t *) +apr_redis_find_server_hash(apr_redis_t *rc, const apr_uint32_t hash) +{ + if (rc->server_func) { + return rc->server_func(rc->server_baton, rc, hash); + } + else { + return apr_redis_find_server_hash_default(NULL, rc, hash); + } +} + +APU_DECLARE(apr_redis_server_t *) +apr_redis_find_server_hash_default(void *baton, apr_redis_t *rc, + const apr_uint32_t hash) +{ + apr_redis_server_t *rs = NULL; + apr_uint32_t h = hash ? hash : 1; + apr_uint32_t i = 0; + apr_time_t curtime = 0; + + if (rc->ntotal == 0) { + return NULL; + } + + do { + rs = rc->live_servers[h % rc->ntotal]; + if (rs->status == APR_RC_SERVER_LIVE) { + break; + } + else { + if (curtime == 0) { + curtime = apr_time_now(); + } +#if APR_HAS_THREADS + apr_thread_mutex_lock(rs->lock); +#endif + /* Try the dead server, every 5 seconds */ + if (curtime - rs->btime > apr_time_from_sec(5)) { + rs->btime = curtime; + if (apr_redis_ping(rs) == APR_SUCCESS) { + make_server_live(rc, rs); +#if APR_HAS_THREADS + apr_thread_mutex_unlock(rs->lock); +#endif + break; + } + } +#if APR_HAS_THREADS + apr_thread_mutex_unlock(rs->lock); +#endif + } + h++; + i++; + } while (i < rc->ntotal); + + if (i == rc->ntotal) { + rs = NULL; + } + + return rs; +} + +APU_DECLARE(apr_redis_server_t *) apr_redis_find_server(apr_redis_t *rc, + const char *host, + apr_port_t port) +{ + int i; + + for (i = 0; i < rc->ntotal; i++) { + if (strcmp(rc->live_servers[i]->host, host) == 0 + && rc->live_servers[i]->port == port) { + + return rc->live_servers[i]; + } + } + + return NULL; +} + +static apr_status_t rs_find_conn(apr_redis_server_t *rs, + apr_redis_conn_t ** conn) +{ + apr_status_t rv; + apr_bucket_alloc_t *balloc; + apr_bucket *e; + +#if APR_HAS_THREADS + rv = apr_reslist_acquire(rs->conns, (void **) conn); +#else + *conn = rs->conn; + rv = APR_SUCCESS; +#endif + + if (rv != APR_SUCCESS) { + return rv; + } + + balloc = apr_bucket_alloc_create((*conn)->tp); + (*conn)->bb = apr_brigade_create((*conn)->tp, balloc); + (*conn)->tb = apr_brigade_create((*conn)->tp, balloc); + + e = apr_bucket_socket_create((*conn)->sock, balloc); + APR_BRIGADE_INSERT_TAIL((*conn)->bb, e); + + return rv; +} + +static apr_status_t rs_bad_conn(apr_redis_server_t *rs, + apr_redis_conn_t *conn) +{ +#if APR_HAS_THREADS + return apr_reslist_invalidate(rs->conns, conn); +#else + return APR_SUCCESS; +#endif +} + +static apr_status_t rs_release_conn(apr_redis_server_t *rs, + apr_redis_conn_t *conn) +{ + apr_pool_clear(conn->tp); +#if APR_HAS_THREADS + return apr_reslist_release(rs->conns, conn); +#else + return APR_SUCCESS; +#endif +} + +APU_DECLARE(apr_status_t) apr_redis_enable_server(apr_redis_t *rc, + apr_redis_server_t *rs) +{ + apr_status_t rv = APR_SUCCESS; + + if (rs->status == APR_RC_SERVER_LIVE) { + return rv; + } + rv = make_server_live(rc, rs); + return rv; +} + +APU_DECLARE(apr_status_t) apr_redis_disable_server(apr_redis_t *rc, + apr_redis_server_t *rs) +{ + return make_server_dead(rc, rs); +} + +static apr_status_t conn_connect(apr_redis_conn_t *conn) +{ + apr_status_t rv = APR_SUCCESS; + apr_sockaddr_t *sa; +#if APR_HAVE_SOCKADDR_UN + apr_int32_t family = conn->rs->host[0] != '/' ? APR_INET : APR_UNIX; +#else + apr_int32_t family = APR_INET; +#endif + + rv = apr_sockaddr_info_get(&sa, conn->rs->host, family, conn->rs->port, 0, + conn->p); + if (rv != APR_SUCCESS) { + return rv; + } + + rv = apr_socket_timeout_set(conn->sock, 1 * APR_USEC_PER_SEC); + if (rv != APR_SUCCESS) { + return rv; + } + + rv = apr_socket_connect(conn->sock, sa); + if (rv != APR_SUCCESS) { + return rv; + } + + rv = apr_socket_timeout_set(conn->sock, + conn->rs->rwto * APR_USEC_PER_SEC); + if (rv != APR_SUCCESS) { + return rv; + } + + return rv; +} + +static apr_status_t +rc_conn_construct(void **conn_, void *params, apr_pool_t *pool) +{ + apr_status_t rv = APR_SUCCESS; + apr_redis_conn_t *conn; + apr_pool_t *np; + apr_pool_t *tp; + apr_redis_server_t *rs = params; +#if APR_HAVE_SOCKADDR_UN + apr_int32_t family = rs->host[0] != '/' ? APR_INET : APR_UNIX; +#else + apr_int32_t family = APR_INET; +#endif + + rv = apr_pool_create(&np, pool); + if (rv != APR_SUCCESS) { + return rv; + } + + rv = apr_pool_create(&tp, np); + if (rv != APR_SUCCESS) { + apr_pool_destroy(np); + return rv; + } + + conn = apr_palloc(np, sizeof(apr_redis_conn_t)); + + conn->p = np; + conn->tp = tp; + + rv = apr_socket_create(&conn->sock, family, SOCK_STREAM, 0, np); + + if (rv != APR_SUCCESS) { + apr_pool_destroy(np); + return rv; + } + + conn->buffer = apr_palloc(conn->p, BUFFER_SIZE + 1); + conn->blen = 0; + conn->rs = rs; + + rv = conn_connect(conn); + if (rv != APR_SUCCESS) { + apr_pool_destroy(np); + } + else { + *conn_ = conn; + } + + return rv; +} + +#if APR_HAS_THREADS +static apr_status_t +rc_conn_destruct(void *conn_, void *params, apr_pool_t *pool) +{ + apr_redis_conn_t *conn = (apr_redis_conn_t *) conn_; + struct iovec vec[3]; + apr_size_t written; + + /* send a quit message to the Redis server to be nice about it. */ + + /* + * RESP Command: + * *1 + * $4 + * QUIT + */ + vec[0].iov_base = RC_RESP_1; + vec[0].iov_len = RC_RESP_1_LEN; + + vec[1].iov_base = RC_QUIT_SIZE; + vec[1].iov_len = RC_QUIT_SIZE_LEN; + + vec[2].iov_base = RC_QUIT; + vec[2].iov_len = RC_QUIT_LEN; + + /* Return values not checked, since we just want to make it go away. */ + apr_socket_sendv(conn->sock, vec, 3, &written); + apr_socket_close(conn->sock); + + apr_pool_destroy(conn->p); + + return APR_SUCCESS; +} +#endif + +APU_DECLARE(apr_status_t) apr_redis_server_create(apr_pool_t *p, + const char *host, + apr_port_t port, + apr_uint32_t min, + apr_uint32_t smax, + apr_uint32_t max, + apr_uint32_t ttl, + apr_uint32_t rwto, + apr_redis_server_t **rs) +{ + apr_status_t rv = APR_SUCCESS; + apr_redis_server_t *server; + apr_pool_t *np; + + rv = apr_pool_create(&np, p); + + server = apr_palloc(np, sizeof(apr_redis_server_t)); + + server->p = np; + server->host = apr_pstrdup(np, host); + server->port = port; + server->status = APR_RC_SERVER_DEAD; + server->rwto = rwto; + server->version.major = 0; + server->version.minor = 0; + server->version.patch = 0; + +#if APR_HAS_THREADS + rv = apr_thread_mutex_create(&server->lock, APR_THREAD_MUTEX_DEFAULT, np); + if (rv != APR_SUCCESS) { + return rv; + } + + rv = apr_reslist_create(&server->conns, + min, /* hard minimum */ + smax, /* soft maximum */ + max, /* hard maximum */ + ttl, /* Time to live */ + rc_conn_construct, /* Make a New Connection */ + rc_conn_destruct, /* Kill Old Connection */ + server, np); + if (rv != APR_SUCCESS) { + return rv; + } + + apr_reslist_cleanup_order_set(server->conns, APR_RESLIST_CLEANUP_FIRST); +#else + rv = rc_conn_construct((void **) &(server->conn), server, np); + if (rv != APR_SUCCESS) { + return rv; + } +#endif + + *rs = server; + + return rv; +} + +APU_DECLARE(apr_status_t) apr_redis_create(apr_pool_t *p, + apr_uint16_t max_servers, + apr_uint32_t flags, + apr_redis_t **redis) +{ + apr_status_t rv = APR_SUCCESS; + apr_redis_t *rc; + + rc = apr_palloc(p, sizeof(apr_redis_t)); + rc->p = p; + rc->nalloc = max_servers; + rc->ntotal = 0; + rc->live_servers = + apr_palloc(p, rc->nalloc * sizeof(struct apr_redis_server_t *)); + rc->hash_func = NULL; + rc->hash_baton = NULL; + rc->server_func = NULL; + rc->server_baton = NULL; + *redis = rc; + return rv; +} + + +/* The crc32 functions and data was originally written by Spencer + * Garrett and was gleaned from the PostgreSQL source + * tree via the files contrib/ltree/crc32.[ch] and from FreeBSD at + * src/usr.bin/cksum/crc32.c. + */ + +static const apr_uint32_t crc32tab[256] = { + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, + 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, + 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, + 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, + 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, + 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, + 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, + 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, + 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, + 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, + 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, + 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, + 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, + 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, + 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, + 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, + 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, + 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, + 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, + 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, + 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, + 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, + 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, + 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, + 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, + 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, + 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, + 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, + 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, + 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, + 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, + 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, + 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, + 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, + 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, + 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, + 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, + 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, + 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, + 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, + 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, + 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, + 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, + 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, + 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, + 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, + 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, + 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, + 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, + 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, + 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, + 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, + 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, + 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, + 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, + 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, + 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, + 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, + 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, + 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, + 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d, +}; + +APU_DECLARE(apr_uint32_t) apr_redis_hash_crc32(void *baton, + const char *data, + const apr_size_t data_len) +{ + apr_uint32_t i; + apr_uint32_t crc; + crc = ~0; + + for (i = 0; i < data_len; i++) + crc = (crc >> 8) ^ crc32tab[(crc ^ (data[i])) & 0xff]; + + return ~crc; +} + +APU_DECLARE(apr_uint32_t) apr_redis_hash_default(void *baton, + const char *data, + const apr_size_t data_len) +{ + /* The default Perl Client doesn't actually use just crc32 -- it shifts it again + * like this.... + */ + return ((apr_redis_hash_crc32(baton, data, data_len) >> 16) & 0x7fff); +} + +APU_DECLARE(apr_uint32_t) apr_redis_hash(apr_redis_t *rc, + const char *data, + const apr_size_t data_len) +{ + if (rc->hash_func) { + return rc->hash_func(rc->hash_baton, data, data_len); + } + else { + return apr_redis_hash_default(NULL, data, data_len); + } +} + +static apr_status_t get_server_line(apr_redis_conn_t *conn) +{ + apr_size_t bsize = BUFFER_SIZE; + apr_status_t rv = APR_SUCCESS; + + rv = apr_brigade_split_line(conn->tb, conn->bb, APR_BLOCK_READ, + BUFFER_SIZE); + + if (rv != APR_SUCCESS) { + return rv; + } + + rv = apr_brigade_flatten(conn->tb, conn->buffer, &bsize); + + if (rv != APR_SUCCESS) { + return rv; + } + + conn->blen = bsize; + conn->buffer[bsize] = '\0'; + + return apr_brigade_cleanup(conn->tb); +} + +APU_DECLARE(apr_status_t) apr_redis_set(apr_redis_t *rc, + const char *key, + char *data, + const apr_size_t data_size, + apr_uint16_t flags) +{ + apr_uint32_t hash; + apr_redis_server_t *rs; + apr_redis_conn_t *conn; + apr_status_t rv; + apr_size_t written; + struct iovec vec[9]; + char keysize_str[LILBUFF_SIZE]; + char datasize_str[LILBUFF_SIZE]; + apr_size_t len, klen; + + klen = strlen(key); + hash = apr_redis_hash(rc, key, klen); + + rs = apr_redis_find_server_hash(rc, hash); + + if (rs == NULL) + return APR_NOTFOUND; + + rv = rs_find_conn(rs, &conn); + + if (rv != APR_SUCCESS) { + apr_redis_disable_server(rc, rs); + return rv; + } + + /* + * RESP Command: + * *3 + * $3 + * SET + * $ + * key + * $ + * data + */ + + vec[0].iov_base = RC_RESP_3; + vec[0].iov_len = RC_RESP_3_LEN; + + vec[1].iov_base = RC_SET_SIZE; + vec[1].iov_len = RC_SET_SIZE_LEN; + + vec[2].iov_base = RC_SET; + vec[2].iov_len = RC_SET_LEN; + + len = apr_snprintf(keysize_str, LILBUFF_SIZE, "$%" APR_SIZE_T_FMT "\r\n", klen); + vec[3].iov_base = keysize_str; + vec[3].iov_len = len; + + vec[4].iov_base = (void *) key; + vec[4].iov_len = klen; + + vec[5].iov_base = RC_EOL; + vec[5].iov_len = RC_EOL_LEN; + + len = apr_snprintf(datasize_str, LILBUFF_SIZE, "$%" APR_SIZE_T_FMT "\r\n", + data_size); + vec[6].iov_base = datasize_str; + vec[6].iov_len = len; + + vec[7].iov_base = data; + vec[7].iov_len = data_size; + + vec[8].iov_base = RC_EOL; + vec[8].iov_len = RC_EOL_LEN; + + rv = apr_socket_sendv(conn->sock, vec, 9, &written); + + if (rv != APR_SUCCESS) { + rs_bad_conn(rs, conn); + apr_redis_disable_server(rc, rs); + return rv; + } + + rv = get_server_line(conn); + if (rv != APR_SUCCESS) { + rs_bad_conn(rs, conn); + apr_redis_disable_server(rc, rs); + return rv; + } + + if (strcmp(conn->buffer, RS_STORED RC_EOL) == 0) { + rv = APR_SUCCESS; + } + else if (strcmp(conn->buffer, RS_NOT_STORED RC_EOL) == 0) { + rv = APR_EEXIST; + } + else { + rv = APR_EGENERAL; + } + + rs_release_conn(rs, conn); + return rv; +} + +APU_DECLARE(apr_status_t) apr_redis_setex(apr_redis_t *rc, + const char *key, + char *data, + const apr_size_t data_size, + apr_uint32_t timeout, + apr_uint16_t flags) +{ + apr_uint32_t hash; + apr_redis_server_t *rs; + apr_redis_conn_t *conn; + apr_status_t rv; + apr_size_t written; + struct iovec vec[11]; + char keysize_str[LILBUFF_SIZE]; + char expire_str[LILBUFF_SIZE]; + char expiresize_str[LILBUFF_SIZE]; + char datasize_str[LILBUFF_SIZE]; + apr_size_t len, klen, expire_len; + + + klen = strlen(key); + hash = apr_redis_hash(rc, key, klen); + + rs = apr_redis_find_server_hash(rc, hash); + + if (rs == NULL) + return APR_NOTFOUND; + + rv = rs_find_conn(rs, &conn); + + if (rv != APR_SUCCESS) { + apr_redis_disable_server(rc, rs); + return rv; + } + + /* + * RESP Command: + * *4 + * $5 + * SETEX + * $ + * key + * $ + * expirey + * $ + * data + */ + + vec[0].iov_base = RC_RESP_4; + vec[0].iov_len = RC_RESP_4_LEN; + + vec[1].iov_base = RC_SETEX_SIZE; + vec[1].iov_len = RC_SETEX_SIZE_LEN; + + vec[2].iov_base = RC_SETEX; + vec[2].iov_len = RC_SETEX_LEN; + + len = apr_snprintf(keysize_str, LILBUFF_SIZE, "$%" APR_SIZE_T_FMT "\r\n", klen); + vec[3].iov_base = keysize_str; + vec[3].iov_len = len; + + vec[4].iov_base = (void *) key; + vec[4].iov_len = klen; + + vec[5].iov_base = RC_EOL; + vec[5].iov_len = RC_EOL_LEN; + + expire_len = apr_snprintf(expire_str, LILBUFF_SIZE, "%u\r\n", timeout); + len = apr_snprintf(expiresize_str, LILBUFF_SIZE, "$%" APR_SIZE_T_FMT "\r\n", + expire_len - 2); + vec[6].iov_base = (void *) expiresize_str; + vec[6].iov_len = len; + + vec[7].iov_base = (void *) expire_str; + vec[7].iov_len = expire_len; + + len = apr_snprintf(datasize_str, LILBUFF_SIZE, "$%" APR_SIZE_T_FMT "\r\n", + data_size); + vec[8].iov_base = datasize_str; + vec[8].iov_len = len; + + vec[9].iov_base = data; + vec[9].iov_len = data_size; + + vec[10].iov_base = RC_EOL; + vec[10].iov_len = RC_EOL_LEN; + + rv = apr_socket_sendv(conn->sock, vec, 11, &written); + + if (rv != APR_SUCCESS) { + rs_bad_conn(rs, conn); + apr_redis_disable_server(rc, rs); + return rv; + } + + rv = get_server_line(conn); + if (rv != APR_SUCCESS) { + rs_bad_conn(rs, conn); + apr_redis_disable_server(rc, rs); + return rv; + } + + if (strcmp(conn->buffer, RS_STORED RC_EOL) == 0) { + rv = APR_SUCCESS; + } + else if (strcmp(conn->buffer, RS_NOT_STORED RC_EOL) == 0) { + rv = APR_EEXIST; + } + else { + rv = APR_EGENERAL; + } + + rs_release_conn(rs, conn); + return rv; +} + +static apr_status_t grab_bulk_resp(apr_redis_server_t *rs, apr_redis_t *rc, + apr_redis_conn_t *conn, apr_pool_t *p, + char **baton, apr_size_t *new_length) +{ + char *length; + char *last; + apr_status_t rv; + apr_size_t len = 0; + *new_length = 0; + + length = apr_strtok(conn->buffer + 1, " ", &last); + if (length) { + len = strtol(length, (char **) NULL, 10); + } + + if (len == 0) { + *new_length = 0; + *baton = NULL; + } + else { + apr_bucket_brigade *bbb; + apr_bucket *e; + + /* eat the trailing \r\n */ + rv = apr_brigade_partition(conn->bb, len + 2, &e); + + if (rv != APR_SUCCESS) { + rs_bad_conn(rs, conn); + if (rc) + apr_redis_disable_server(rc, rs); + return rv; + } + + bbb = apr_brigade_split(conn->bb, e); + + rv = apr_brigade_pflatten(conn->bb, baton, &len, p); + + if (rv != APR_SUCCESS) { + rs_bad_conn(rs, conn); + if (rc) + apr_redis_disable_server(rc, rs); + return rv; + } + + rv = apr_brigade_destroy(conn->bb); + if (rv != APR_SUCCESS) { + rs_bad_conn(rs, conn); + if (rc) + apr_redis_disable_server(rc, rs); + return rv; + } + + conn->bb = bbb; + + *new_length = len - 2; + (*baton)[*new_length] = '\0'; + } + return APR_SUCCESS; + +} + +APU_DECLARE(apr_status_t) apr_redis_getp(apr_redis_t *rc, + apr_pool_t *p, + const char *key, + char **baton, + apr_size_t *new_length, + apr_uint16_t *flags) +{ + apr_status_t rv; + apr_redis_server_t *rs; + apr_redis_conn_t *conn; + apr_uint32_t hash; + apr_size_t written; + apr_size_t len, klen; + struct iovec vec[6]; + char keysize_str[LILBUFF_SIZE]; + + klen = strlen(key); + hash = apr_redis_hash(rc, key, klen); + rs = apr_redis_find_server_hash(rc, hash); + + if (rs == NULL) + return APR_NOTFOUND; + + rv = rs_find_conn(rs, &conn); + + if (rv != APR_SUCCESS) { + apr_redis_disable_server(rc, rs); + return rv; + } + + /* + * RESP Command: + * *2 + * $3 + * GET + * $ + * key + */ + vec[0].iov_base = RC_RESP_2; + vec[0].iov_len = RC_RESP_2_LEN; + + vec[1].iov_base = RC_GET_SIZE; + vec[1].iov_len = RC_GET_SIZE_LEN; + + vec[2].iov_base = RC_GET; + vec[2].iov_len = RC_GET_LEN; + + len = apr_snprintf(keysize_str, LILBUFF_SIZE, "$%" APR_SIZE_T_FMT "\r\n", + klen); + vec[3].iov_base = keysize_str; + vec[3].iov_len = len; + + vec[4].iov_base = (void *) key; + vec[4].iov_len = klen; + + vec[5].iov_base = RC_EOL; + vec[5].iov_len = RC_EOL_LEN; + + rv = apr_socket_sendv(conn->sock, vec, 6, &written); + + + if (rv != APR_SUCCESS) { + rs_bad_conn(rs, conn); + apr_redis_disable_server(rc, rs); + return rv; + } + + rv = get_server_line(conn); + if (rv != APR_SUCCESS) { + rs_bad_conn(rs, conn); + apr_redis_disable_server(rc, rs); + return rv; + } + if (strncmp(RS_NOT_FOUND_GET, conn->buffer, RS_NOT_FOUND_GET_LEN) == 0) { + rv = APR_NOTFOUND; + } + else if (strncmp(RS_TYPE_STRING, conn->buffer, RS_TYPE_STRING_LEN) == 0) { + rv = grab_bulk_resp(rs, rc, conn, p, baton, new_length); + } + else { + rv = APR_EGENERAL; + } + + rs_release_conn(rs, conn); + return rv; +} + +APU_DECLARE(apr_status_t) + apr_redis_delete(apr_redis_t *rc, const char *key, apr_uint32_t timeout) +{ + apr_status_t rv; + apr_redis_server_t *rs; + apr_redis_conn_t *conn; + apr_uint32_t hash; + apr_size_t written; + struct iovec vec[6]; + apr_size_t len, klen; + char keysize_str[LILBUFF_SIZE]; + + klen = strlen(key); + hash = apr_redis_hash(rc, key, klen); + rs = apr_redis_find_server_hash(rc, hash); + if (rs == NULL) + return APR_NOTFOUND; + + rv = rs_find_conn(rs, &conn); + + if (rv != APR_SUCCESS) { + apr_redis_disable_server(rc, rs); + return rv; + } + + /* + * RESP Command: + * *2 + * $3 + * DEL + * $ + * key + */ + vec[0].iov_base = RC_RESP_2; + vec[0].iov_len = RC_RESP_2_LEN; + + vec[1].iov_base = RC_DEL_SIZE; + vec[1].iov_len = RC_DEL_SIZE_LEN; + + vec[2].iov_base = RC_DEL; + vec[2].iov_len = RC_DEL_LEN; + + len = apr_snprintf(keysize_str, LILBUFF_SIZE, "$%" APR_SIZE_T_FMT "\r\n", + klen); + vec[3].iov_base = keysize_str; + vec[3].iov_len = len; + + vec[4].iov_base = (void *) key; + vec[4].iov_len = klen; + + vec[5].iov_base = RC_EOL; + vec[5].iov_len = RC_EOL_LEN; + + rv = apr_socket_sendv(conn->sock, vec, 6, &written); + + if (rv != APR_SUCCESS) { + rs_bad_conn(rs, conn); + apr_redis_disable_server(rc, rs); + return rv; + } + + rv = get_server_line(conn); + if (rv != APR_SUCCESS) { + rs_bad_conn(rs, conn); + apr_redis_disable_server(rc, rs); + return rv; + } + + if (strncmp(RS_DELETED, conn->buffer, RS_DELETED_LEN) == 0) { + rv = APR_SUCCESS; + } + else if (strncmp(RS_NOT_FOUND_DEL, conn->buffer, RS_NOT_FOUND_DEL_LEN) == 0) { + rv = APR_NOTFOUND; + } + else { + rv = APR_EGENERAL; + } + + rs_release_conn(rs, conn); + return rv; +} + +APU_DECLARE(apr_status_t) +apr_redis_ping(apr_redis_server_t *rs) +{ + apr_status_t rv; + apr_size_t written; + struct iovec vec[3]; + apr_redis_conn_t *conn; + + rv = rs_find_conn(rs, &conn); + + if (rv != APR_SUCCESS) { + return rv; + } + + /* + * RESP Command: + * *1 + * $4 + * PING + */ + vec[0].iov_base = RC_RESP_1; + vec[0].iov_len = RC_RESP_1_LEN; + + vec[1].iov_base = RC_PING_SIZE; + vec[1].iov_len = RC_PING_SIZE_LEN; + + vec[2].iov_base = RC_PING; + vec[2].iov_len = RC_PING_LEN; + + rv = apr_socket_sendv(conn->sock, vec, 3, &written); + + if (rv != APR_SUCCESS) { + rs_bad_conn(rs, conn); + return rv; + } + + rv = get_server_line(conn); + if (rv == APR_SUCCESS) { + /* we got *something*. Was it Redis? */ + if (strncmp(conn->buffer, "+PONG", sizeof("+PONG")-1) != 0) { + rv = APR_EGENERAL; + } + } + rs_release_conn(rs, conn); + return rv; +} + +APU_DECLARE(apr_status_t) +apr_redis_info(apr_redis_server_t *rs, apr_pool_t *p, char **baton) +{ + apr_status_t rv; + apr_redis_conn_t *conn; + apr_size_t written; + struct iovec vec[3]; + + rv = rs_find_conn(rs, &conn); + + if (rv != APR_SUCCESS) { + return rv; + } + + /* + * RESP Command: + * *1 + * $4 + * INFO + */ + vec[0].iov_base = RC_RESP_1; + vec[0].iov_len = RC_RESP_1_LEN; + + vec[1].iov_base = RC_INFO_SIZE; + vec[1].iov_len = RC_INFO_SIZE_LEN; + + vec[2].iov_base = RC_INFO; + vec[2].iov_len = RC_INFO_LEN; + + rv = apr_socket_sendv(conn->sock, vec, 3, &written); + + if (rv != APR_SUCCESS) { + rs_bad_conn(rs, conn); + return rv; + } + + rv = get_server_line(conn); + if (rv != APR_SUCCESS) { + rs_bad_conn(rs, conn); + return rv; + } + + if (strncmp(RS_TYPE_STRING, conn->buffer, RS_TYPE_STRING_LEN) == 0) { + apr_size_t nl; + rv = grab_bulk_resp(rs, NULL, conn, p, baton, &nl); + } else { + rs_bad_conn(rs, conn); + rv = APR_EGENERAL; + } + + rs_release_conn(rs, conn); + return rv; +} + +#define RV_FIELD "redis_version:" +APU_DECLARE(apr_status_t) +apr_redis_version(apr_redis_server_t *rs, apr_pool_t *p, char **baton) +{ + apr_status_t rv; + char *ptr, *eptr; + apr_pool_t *subpool; + + /* Have we already obtained the version number? */ + if (rs->version.minor != 0) { + if (baton) + *baton = apr_pstrdup(p, rs->version.number); + return APR_SUCCESS; + } + if (apr_pool_create(&subpool, p) != APR_SUCCESS) { + /* well, we tried */ + subpool = p; + } + rv = apr_redis_info(rs, subpool, baton); + + if (rv != APR_SUCCESS) { + if (subpool != p) { + apr_pool_destroy(subpool); + } + return rv; + } + + ptr = strstr(*baton, RV_FIELD); + if (ptr) { + rs->version.major = strtol(ptr + sizeof(RV_FIELD) - 1, &eptr, 10); + ptr = eptr + 1; + rs->version.minor = strtol(ptr, &eptr, 10); + ptr = eptr + 1; + rs->version.patch = strtol(ptr, &eptr, 10); + rs->version.number = apr_psprintf(rs->p, "%d.%d.%d", + rs->version.major, rs->version.minor, + rs->version.patch); + } + if (baton) + *baton = apr_pstrdup(p, rs->version.number); + if (subpool != p) { + apr_pool_destroy(subpool); + } + return APR_SUCCESS; +} + +static apr_status_t plus_minus(apr_redis_t *rc, + int incr, + const char *key, + apr_int32_t inc, + apr_uint32_t *new_value) +{ + apr_status_t rv; + apr_redis_server_t *rs; + apr_redis_conn_t *conn; + apr_uint32_t hash; + apr_size_t written; + apr_size_t len, klen; + struct iovec vec[12]; + char keysize_str[LILBUFF_SIZE]; + char inc_str[LILBUFF_SIZE]; + char inc_str_len[LILBUFF_SIZE]; + int i = 0; + + klen = strlen(key); + hash = apr_redis_hash(rc, key, klen); + rs = apr_redis_find_server_hash(rc, hash); + if (rs == NULL) + return APR_NOTFOUND; + + rv = rs_find_conn(rs, &conn); + + if (rv != APR_SUCCESS) { + apr_redis_disable_server(rc, rs); + return rv; + } + + /* + * RESP Command: + * *2|*3 + * $4|$6 + * INCR/DECR|INCRBY/DECRBY + * $ + * key + * <:inc> + */ + if (inc == 1) { + vec[i].iov_base = RC_RESP_2; + vec[i].iov_len = RC_RESP_2_LEN; + i++; + + vec[i].iov_base = "$4\r\n"; + vec[i].iov_len = sizeof("$4\r\n")-1; + i++; + + if (incr) + vec[i].iov_base = "INCR\r\n"; + else + vec[i].iov_base = "DECR\r\n"; + vec[i].iov_len = sizeof("INCR\r\n")-1; + i++; + } + else { + vec[i].iov_base = RC_RESP_3; + vec[i].iov_len = RC_RESP_3_LEN; + i++; + + vec[i].iov_base = "$6\r\n"; + vec[i].iov_len = sizeof("$6\r\n")-1; + i++; + + if (incr) + vec[i].iov_base = "INCRBY\r\n"; + else + vec[i].iov_base = "DECRBY\r\n"; + vec[i].iov_len = sizeof("INCRBY\r\n")-1; + i++; + } + + len = apr_snprintf(keysize_str, LILBUFF_SIZE, "$%" APR_SIZE_T_FMT "\r\n", + klen); + vec[i].iov_base = keysize_str; + vec[i].iov_len = len; + i++; + + vec[i].iov_base = (void *) key; + vec[i].iov_len = klen; + i++; + + vec[i].iov_base = RC_EOL; + vec[i].iov_len = RC_EOL_LEN; + i++; + + if (inc != 1) { + len = apr_snprintf(inc_str, LILBUFF_SIZE, "%d\r\n", inc); + klen = apr_snprintf(inc_str_len, LILBUFF_SIZE, "$%d\r\n", (int)(len-2)); + vec[i].iov_base = inc_str_len; + vec[i].iov_len = klen; + i++; + + vec[i].iov_base = inc_str; + vec[i].iov_len = len; + i++; + + vec[i].iov_base = RC_EOL; + vec[i].iov_len = RC_EOL_LEN; + i++; + } + + rv = apr_socket_sendv(conn->sock, vec, i, &written); + + if (rv != APR_SUCCESS) { + rs_bad_conn(rs, conn); + apr_redis_disable_server(rc, rs); + return rv; + } + + rv = get_server_line(conn); + if (rv != APR_SUCCESS) { + rs_bad_conn(rs, conn); + apr_redis_disable_server(rc, rs); + return rv; + } + if (strncmp(RS_NOT_FOUND_GET, conn->buffer, RS_NOT_FOUND_GET_LEN) == 0) { + rv = APR_NOTFOUND; + } + else if (*conn->buffer == ':') { + *new_value = atoi((const char *)(conn->buffer + 1)); + rv = APR_SUCCESS; + } + else { + rv = APR_EGENERAL; + } + rs_release_conn(rs, conn); + return rv; +} + +APU_DECLARE(apr_status_t) +apr_redis_incr(apr_redis_t *rc, const char *key, apr_int32_t inc, apr_uint32_t *new_value) +{ + return plus_minus(rc, 1, key, inc, new_value); +} + +APU_DECLARE(apr_status_t) +apr_redis_decr(apr_redis_t *rc, const char *key, apr_int32_t inc, apr_uint32_t *new_value) +{ + return plus_minus(rc, 0, key, inc, new_value); +} + +APU_DECLARE(apr_status_t) +apr_redis_multgetp(apr_redis_t *rc, + apr_pool_t *temp_pool, + apr_pool_t *data_pool, + apr_hash_t *values) +{ + return APR_ENOTIMPL; +} + +/** + * Define all of the strings for stats + */ + +#define STAT_process_id "process_id:" +#define STAT_process_id_LEN (sizeof(STAT_process_id)-1) + +#define STAT_uptime_in_seconds "uptime_in_seconds:" +#define STAT_uptime_in_seconds_LEN (sizeof(STAT_uptime_in_seconds)-1) + +#define STAT_arch_bits "arch_bits:" +#define STAT_arch_bits_LEN (sizeof(STAT_arch_bits)-1) + +#define STAT_connected_clients "connected_clients:" +#define STAT_connected_clients_LEN (sizeof(STAT_connected_clients)-1) + +#define STAT_blocked_clients "blocked_clients:" +#define STAT_blocked_clients_LEN (sizeof(STAT_blocked_clients)-1) + +#define STAT_maxmemory "maxmemory:" +#define STAT_maxmemory_LEN (sizeof(STAT_maxmemory)-1) + +#define STAT_used_memory "used_memory:" +#define STAT_used_memory_LEN (sizeof(STAT_used_memory)-1) + +#define STAT_total_system_memory "total_system_memory:" +#define STAT_total_system_memory_LEN (sizeof(STAT_total_system_memory)-1) + +#define STAT_total_connections_received "total_connections_received:" +#define STAT_total_connections_received_LEN (sizeof(STAT_total_connections_received)-1) + +#define STAT_total_commands_processed "total_commands_processed:" +#define STAT_total_commands_processed_LEN (sizeof(STAT_total_commands_processed)-1) + +#define STAT_rejected_connections "rejected_connections:" +#define STAT_rejected_connections_LEN (sizeof(STAT_rejected_connections)-1) + +#define STAT_total_net_input_bytes "total_net_input_bytes:" +#define STAT_total_net_input_bytes_LEN (sizeof(STAT_total_net_input_bytes)-1) + +#define STAT_total_net_output_bytes "total_net_output_bytes:" +#define STAT_total_net_output_bytes_LEN (sizeof(STAT_total_net_output_bytes)-1) + +#define STAT_keyspace_hits "keyspace_hits:" +#define STAT_keyspace_hits_LEN (sizeof(STAT_keyspace_hits)-1) + +#define STAT_keyspace_misses "keyspace_misses:" +#define STAT_keyspace_misses_LEN (sizeof(STAT_keyspace_misses)-1) + +#define STAT_connected_slaves "connected_slaves:" +#define STAT_connected_slaves_LEN (sizeof(STAT_connected_slaves)-1) + +#define STAT_used_cpu_sys "used_cpu_sys:" +#define STAT_used_cpu_sys_LEN (sizeof(STAT_used_cpu_sys)-1) + +#define STAT_used_cpu_user "used_cpu_user:" +#define STAT_used_cpu_user_LEN (sizeof(STAT_used_cpu_user)-1) + +#define STAT_cluster_enabled "cluster_enabled:" +#define STAT_cluster_enabled_LEN (sizeof(STAT_cluster_enabled)-1) + +static apr_uint32_t stat_read_uint32( char *buf) +{ + return atoi(buf); +} + +static apr_uint64_t stat_read_uint64(char *buf) +{ + return apr_atoi64(buf); +} + +#define rc_do_stat(name, type) \ + if ((ptr = strstr(info , STAT_ ## name )) != NULL ) { \ + char *str = ptr + (STAT_ ## name ## _LEN ); \ + stats-> name = stat_read_ ## type (str); \ + } + +static void update_stats(char *info, apr_redis_stats_t *stats) +{ + char *ptr; + + rc_do_stat(process_id, uint32); + rc_do_stat(uptime_in_seconds, uint32); + rc_do_stat(arch_bits, uint32); + rc_do_stat(connected_clients, uint32); + rc_do_stat(blocked_clients, uint32); + rc_do_stat(maxmemory, uint64); + rc_do_stat(used_memory, uint64); + rc_do_stat(total_system_memory, uint64); + rc_do_stat(total_connections_received, uint64); + rc_do_stat(total_commands_processed, uint64); + rc_do_stat(rejected_connections, uint64); + rc_do_stat(total_net_input_bytes, uint64); + rc_do_stat(total_net_output_bytes, uint64); + rc_do_stat(keyspace_hits, uint64); + rc_do_stat(keyspace_misses, uint64); + rc_do_stat(connected_slaves, uint32); + rc_do_stat(used_cpu_sys, uint32); + rc_do_stat(used_cpu_user, uint32); + rc_do_stat(cluster_enabled, uint32); +} + +APU_DECLARE(apr_status_t) +apr_redis_stats(apr_redis_server_t *rs, + apr_pool_t *p, + apr_redis_stats_t **stats) +{ + apr_status_t rv; + char *info; + apr_pool_t *subpool; + apr_redis_stats_t *ret; + char *ptr; + + if (apr_pool_create(&subpool, p) != APR_SUCCESS) { + /* well, we tried */ + subpool = p; + } + rv = apr_redis_info(rs, subpool, &info); + + if (rv != APR_SUCCESS) { + if (subpool != p) { + apr_pool_destroy(subpool); + } + return rv; + } + ret = apr_pcalloc(p, sizeof(apr_redis_stats_t)); + /* Get the bulk of the stats */ + update_stats(info, ret); + + /* Now the version number */ + if (rs->version.major != 0) { + ret->major = rs->version.major; + ret->minor = rs->version.minor; + ret->patch = rs->version.patch; + } + else { + char *eptr; + ptr = strstr(info, RV_FIELD); + if (ptr) { + ret->major = rs->version.major = strtol(ptr + sizeof(RV_FIELD) - 1, &eptr, 10); + ptr = eptr + 1; + ret->minor = rs->version.minor = strtol(ptr, &eptr, 10); + ptr = eptr + 1; + ret->patch = rs->version.patch = strtol(ptr, &eptr, 10); + } + } + + /* Finally, the role */ + ptr = strstr(info, "role:"); + if (!ptr) { + ret->role = APR_RS_SERVER_UNKNOWN; + } + else if (!strncmp("master", ptr + sizeof("role:") - 1, sizeof("master")-1)) { + ret->role = APR_RS_SERVER_MASTER; + } + else { + ret->role = APR_RS_SERVER_SLAVE; + } + if (stats) { + *stats = ret; + } + + return APR_SUCCESS; +} Index: contrib/apr-util/test/Makefile.in =================================================================== --- contrib/apr-util/test/Makefile.in +++ contrib/apr-util/test/Makefile.in @@ -17,7 +17,7 @@ TESTS = teststrmatch.lo testuri.lo testuuid.lo testbuckets.lo testpass.lo \ testmd4.lo testmd5.lo testldap.lo testdate.lo testdbm.lo testdbd.lo \ testxml.lo testrmm.lo testreslist.lo testqueue.lo testxlate.lo \ - testmemcache.lo testcrypto.lo + testmemcache.lo testcrypto.lo testsiphash.lo testredis.lo PROGRAMS = $(STDTEST_PORTABLE) Index: contrib/apr-util/test/Makefile.win =================================================================== --- contrib/apr-util/test/Makefile.win +++ contrib/apr-util/test/Makefile.win @@ -62,6 +62,7 @@ $(INTDIR)\testxml.obj $(INTDIR)\testqueue.obj \ $(INTDIR)\testrmm.obj $(INTDIR)\testxlate.obj \ $(INTDIR)\testdate.obj $(INTDIR)\testmemcache.obj \ + $(INTDIR)\testredis.obj $(INTDIR)\testsiphash.obj \ $(INTDIR)\testcrypto.obj CLEAN_DATA = manyfile.bin testfile.txt data\sqlite*.db @@ -89,10 +90,9 @@ PROGRAM_DEPENDENCIES = \ $(APR_PATH)\$(APROUTDIR)\apr-1.lib \ $(API_PATH)\$(OUTDIR)\apriconv-1.lib \ - ..\xml\expat\lib\$(OUTDIR)\xml.lib \ ..\$(OUTDIR)\aprutil-1.lib STATIC_CFLAGS = /D APR_DECLARE_STATIC /D APU_DECLARE_STATIC -STATIC_LIBS = odbc32.lib odbccp32.lib wldap32.lib +STATIC_LIBS = libexpatMT.lib odbc32.lib odbccp32.lib wldap32.lib !ELSE PROGRAM_DEPENDENCIES = \ $(APR_PATH)\$(APROUTDIR)\libapr-1.lib \ Index: contrib/apr-util/test/NWGNUaputest =================================================================== --- contrib/apr-util/test/NWGNUaputest +++ contrib/apr-util/test/NWGNUaputest @@ -185,6 +185,7 @@ $(OBJDIR)/testqueue.o \ $(OBJDIR)/testreslist.o \ $(OBJDIR)/testrmm.o \ + $(OBJDIR)/testsiphash.o \ $(OBJDIR)/teststrmatch.o \ $(OBJDIR)/testuri.o \ $(OBJDIR)/testutil.o \ Index: contrib/apr-util/test/abts_tests.h =================================================================== --- contrib/apr-util/test/abts_tests.h +++ contrib/apr-util/test/abts_tests.h @@ -35,12 +35,14 @@ {testdbd}, {testdate}, {testmemcache}, + {testredis}, {testxml}, {testxlate}, {testrmm}, {testdbm}, {testqueue}, - {testreslist} + {testreslist}, + {testsiphash} }; #endif /* APR_TEST_INCLUDES */ Index: contrib/apr-util/test/testall.dsw =================================================================== --- contrib/apr-util/test/testall.dsw +++ contrib/apr-util/test/testall.dsw @@ -28,23 +28,6 @@ End Project Dependency }}} -############################################################################### - -Project: "apr_dbd_freetds"="..\dbd\apr_dbd_freetds.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name libapr - End Project Dependency - Begin Project Dependency - Project_Dep_Name libaprutil - End Project Dependency -}}} ############################################################################### Index: contrib/apr-util/test/testcrypto.c =================================================================== --- contrib/apr-util/test/testcrypto.c +++ contrib/apr-util/test/testcrypto.c @@ -33,22 +33,32 @@ { const apr_crypto_driver_t *driver = NULL; - const apu_err_t *err = NULL; + const apu_err_t *result = NULL; apr_status_t rv; rv = apr_crypto_init(pool); ABTS_ASSERT(tc, "failed to init apr_crypto", rv == APR_SUCCESS); - rv = apr_crypto_get_driver(&driver, name, params, &err, pool); - if (APR_SUCCESS != rv && err) { - ABTS_NOT_IMPL(tc, err->msg); + rv = apr_crypto_get_driver(&driver, name, params, &result, pool); + if (APR_ENOTIMPL == rv) { + ABTS_NOT_IMPL(tc, + apr_psprintf(pool, "Crypto driver '%s' not implemented", (char *)name)); return NULL; } - if (APR_ENOTIMPL == rv) { - ABTS_NOT_IMPL(tc, (char *)driver); + if (APR_EDSOOPEN == rv) { + ABTS_NOT_IMPL(tc, + apr_psprintf(pool, "Crypto driver '%s' DSO could not be opened", (char *)name)); return NULL; } - ABTS_ASSERT(tc, "failed to apr_crypto_get_driver", rv == APR_SUCCESS); + if (APR_SUCCESS != rv && result) { + char err[1024]; + apr_strerror(rv, err, sizeof(err) - 1); + fprintf(stderr, "get_driver error %d: %s: '%s' native error %d: %s (%s),", + rv, err, name, result->rc, result->reason ? result->reason : "", + result->msg ? result->msg : ""); + } + ABTS_ASSERT(tc, apr_psprintf(pool, "failed to apr_crypto_get_driver for '%s' with %d", + name, rv), rv == APR_SUCCESS); ABTS_ASSERT(tc, "apr_crypto_get_driver returned NULL", driver != NULL); if (!driver || rv) { return NULL; @@ -63,7 +73,7 @@ { /* initialise NSS */ - return get_driver(tc, pool, "nss", "dir=data"); + return get_driver(tc, pool, "nss", ""); } @@ -75,6 +85,14 @@ } +static const apr_crypto_driver_t *get_commoncrypto_driver(abts_case *tc, + apr_pool_t *pool) +{ + + return get_driver(tc, pool, "commoncrypto", NULL); + +} + static apr_crypto_t *make(abts_case *tc, apr_pool_t *pool, const apr_crypto_driver_t *driver) { @@ -93,6 +111,59 @@ } +static const apr_crypto_key_t *keysecret(abts_case *tc, apr_pool_t *pool, + const apr_crypto_driver_t *driver, const apr_crypto_t *f, + apr_crypto_block_key_type_e type, apr_crypto_block_key_mode_e mode, + int doPad, apr_size_t secretLen, const char *description) +{ + apr_crypto_key_t *key = NULL; + const apu_err_t *result = NULL; + apr_crypto_key_rec_t *rec = apr_pcalloc(pool, sizeof(apr_crypto_key_rec_t)); + apr_status_t rv; + + if (!f) { + return NULL; + } + + rec->ktype = APR_CRYPTO_KTYPE_SECRET; + rec->type = type; + rec->mode = mode; + rec->pad = doPad; + rec->k.secret.secret = apr_pcalloc(pool, secretLen); + rec->k.secret.secretLen = secretLen; + + /* init the passphrase */ + rv = apr_crypto_key(&key, rec, f, pool); + if (APR_ENOCIPHER == rv) { + apr_crypto_error(&result, f); + ABTS_NOT_IMPL(tc, + apr_psprintf(pool, "skipped: %s %s key return APR_ENOCIPHER: error %d: %s (%s)\n", description, apr_crypto_driver_name(driver), result->rc, result->reason ? result->reason : "", result->msg ? result->msg : "")); + return NULL; + } + else { + if (APR_SUCCESS != rv) { + apr_crypto_error(&result, f); + fprintf(stderr, "key: %s %s apr error %d / native error %d: %s (%s)\n", + description, apr_crypto_driver_name(driver), rv, result->rc, + result->reason ? result->reason : "", + result->msg ? result->msg : ""); + } + ABTS_ASSERT(tc, "apr_crypto_key returned APR_EKEYLENGTH", rv != APR_EKEYLENGTH); + ABTS_ASSERT(tc, "apr_crypto_key returned APR_ENOKEY", rv != APR_ENOKEY); + ABTS_ASSERT(tc, "apr_crypto_key returned APR_EPADDING", + rv != APR_EPADDING); + ABTS_ASSERT(tc, "apr_crypto_key returned APR_EKEYTYPE", + rv != APR_EKEYTYPE); + ABTS_ASSERT(tc, "failed to apr_crypto_key", rv == APR_SUCCESS); + ABTS_ASSERT(tc, "apr_crypto_key returned NULL context", key != NULL); + } + if (rv) { + return NULL; + } + return key; + +} + static const apr_crypto_key_t *passphrase(abts_case *tc, apr_pool_t *pool, const apr_crypto_driver_t *driver, const apr_crypto_t *f, apr_crypto_block_key_type_e type, apr_crypto_block_key_mode_e mode, @@ -124,8 +195,8 @@ else { if (APR_SUCCESS != rv) { apr_crypto_error(&result, f); - fprintf(stderr, "passphrase: %s %s native error %d: %s (%s)\n", - description, apr_crypto_driver_name(driver), result->rc, + fprintf(stderr, "passphrase: %s %s apr error %d / native error %d: %s (%s)\n", + description, apr_crypto_driver_name(driver), rv, result->rc, result->reason ? result->reason : "", result->msg ? result->msg : ""); } @@ -142,6 +213,64 @@ } +static const apr_crypto_key_t *keypassphrase(abts_case *tc, apr_pool_t *pool, + const apr_crypto_driver_t *driver, const apr_crypto_t *f, + apr_crypto_block_key_type_e type, apr_crypto_block_key_mode_e mode, + int doPad, const char *description) +{ + + apr_crypto_key_t *key = NULL; + const apu_err_t *result = NULL; + const char *pass = "secret"; + const char *salt = "salt"; + apr_crypto_key_rec_t *rec = apr_pcalloc(pool, sizeof(apr_crypto_key_rec_t)); + apr_status_t rv; + + if (!f) { + return NULL; + } + + rec->ktype = APR_CRYPTO_KTYPE_PASSPHRASE; + rec->type = type; + rec->mode = mode; + rec->pad = doPad; + rec->k.passphrase.pass = pass; + rec->k.passphrase.passLen = strlen(pass); + rec->k.passphrase.salt = (unsigned char *)salt; + rec->k.passphrase.saltLen = strlen(salt); + rec->k.passphrase.iterations = 4096; + + /* init the passphrase */ + rv = apr_crypto_key(&key, rec, f, pool); + if (APR_ENOCIPHER == rv) { + apr_crypto_error(&result, f); + ABTS_NOT_IMPL(tc, apr_psprintf(pool, + "skipped: %s %s key passphrase return APR_ENOCIPHER: error %d: %s (%s)\n", + description, apr_crypto_driver_name(driver), result->rc, + result->reason ? result->reason : "", result->msg ? result->msg : "")); + return NULL; + } + else { + if (APR_SUCCESS != rv) { + apr_crypto_error(&result, f); + fprintf(stderr, "key passphrase: %s %s apr error %d / native error %d: %s (%s)\n", + description, apr_crypto_driver_name(driver), rv, result->rc, + result->reason ? result->reason : "", + result->msg ? result->msg : ""); + } + ABTS_ASSERT(tc, "apr_crypto_key returned APR_ENOKEY", rv != APR_ENOKEY); + ABTS_ASSERT(tc, "apr_crypto_key returned APR_EPADDING", rv != APR_EPADDING); + ABTS_ASSERT(tc, "apr_crypto_key returned APR_EKEYTYPE", rv != APR_EKEYTYPE); + ABTS_ASSERT(tc, "failed to apr_crypto_key", rv == APR_SUCCESS); + ABTS_ASSERT(tc, "apr_crypto_key returned NULL context", key != NULL); + } + if (rv) { + return NULL; + } + return key; + +} + static unsigned char *encrypt_block(abts_case *tc, apr_pool_t *pool, const apr_crypto_driver_t *driver, const apr_crypto_t *f, const apr_crypto_key_t *key, const unsigned char *in, @@ -167,17 +296,27 @@ else { if (APR_SUCCESS != rv) { apr_crypto_error(&result, f); - fprintf(stderr, "encrypt_init: %s %s native error %d: %s (%s)\n", - description, apr_crypto_driver_name(driver), result->rc, + fprintf(stderr, + "encrypt_init: %s %s (APR %d) native error %d: %s (%s)\n", + description, apr_crypto_driver_name(driver), rv, result->rc, result->reason ? result->reason : "", result->msg ? result->msg : ""); } - ABTS_ASSERT(tc, "apr_crypto_block_encrypt_init returned APR_ENOKEY", rv != APR_ENOKEY); - ABTS_ASSERT(tc, "apr_crypto_block_encrypt_init returned APR_ENOIV", rv != APR_ENOIV); - ABTS_ASSERT(tc, "apr_crypto_block_encrypt_init returned APR_EKEYTYPE", rv != APR_EKEYTYPE); - ABTS_ASSERT(tc, "apr_crypto_block_encrypt_init returned APR_EKEYLENGTH", rv != APR_EKEYLENGTH); - ABTS_ASSERT(tc, "failed to apr_crypto_block_encrypt_init", rv == APR_SUCCESS); - ABTS_ASSERT(tc, "apr_crypto_block_encrypt_init returned NULL context", block != NULL); + ABTS_ASSERT(tc, "apr_crypto_block_encrypt_init returned APR_ENOKEY", + rv != APR_ENOKEY); + ABTS_ASSERT(tc, "apr_crypto_block_encrypt_init returned APR_ENOIV", + rv != APR_ENOIV); + ABTS_ASSERT(tc, "apr_crypto_block_encrypt_init returned APR_EKEYTYPE", + rv != APR_EKEYTYPE); + ABTS_ASSERT(tc, "apr_crypto_block_encrypt_init returned APR_EKEYLENGTH", + rv != APR_EKEYLENGTH); + ABTS_ASSERT(tc, + "apr_crypto_block_encrypt_init returned APR_ENOTENOUGHENTROPY", + rv != APR_ENOTENOUGHENTROPY); + ABTS_ASSERT(tc, "failed to apr_crypto_block_encrypt_init", + rv == APR_SUCCESS); + ABTS_ASSERT(tc, "apr_crypto_block_encrypt_init returned NULL context", + block != NULL); } if (!block || rv) { return NULL; @@ -187,10 +326,10 @@ rv = apr_crypto_block_encrypt(cipherText, cipherTextLen, in, inlen, block); if (APR_SUCCESS != rv) { apr_crypto_error(&result, f); - fprintf(stderr, "encrypt: %s %s native error %d: %s (%s)\n", - description, apr_crypto_driver_name(driver), result->rc, - result->reason ? result->reason : "", result->msg ? result->msg - : ""); + fprintf(stderr, "encrypt: %s %s (APR %d) native error %d: %s (%s)\n", + description, apr_crypto_driver_name(driver), rv, result->rc, + result->reason ? result->reason : "", + result->msg ? result->msg : ""); } ABTS_ASSERT(tc, "apr_crypto_block_encrypt returned APR_ECRYPT", rv != APR_ECRYPT); ABTS_ASSERT(tc, "failed to apr_crypto_block_encrypt", rv == APR_SUCCESS); @@ -204,13 +343,15 @@ block); if (APR_SUCCESS != rv) { apr_crypto_error(&result, f); - fprintf(stderr, "encrypt_finish: %s %s native error %d: %s (%s)\n", - description, apr_crypto_driver_name(driver), result->rc, - result->reason ? result->reason : "", result->msg ? result->msg - : ""); + fprintf(stderr, + "encrypt_finish: %s %s (APR %d) native error %d: %s (%s)\n", + description, apr_crypto_driver_name(driver), rv, result->rc, + result->reason ? result->reason : "", + result->msg ? result->msg : ""); } ABTS_ASSERT(tc, "apr_crypto_block_encrypt_finish returned APR_ECRYPT", rv != APR_ECRYPT); ABTS_ASSERT(tc, "apr_crypto_block_encrypt_finish returned APR_EPADDING", rv != APR_EPADDING); + ABTS_ASSERT(tc, "apr_crypto_block_encrypt_finish returned APR_ENOSPACE", rv != APR_ENOSPACE); ABTS_ASSERT(tc, "failed to apr_crypto_block_encrypt_finish", rv == APR_SUCCESS); *cipherTextLen += len; apr_crypto_block_cleanup(block); @@ -247,8 +388,9 @@ else { if (APR_SUCCESS != rv) { apr_crypto_error(&result, f); - fprintf(stderr, "decrypt_init: %s %s native error %d: %s (%s)\n", - description, apr_crypto_driver_name(driver), result->rc, + fprintf(stderr, + "decrypt_init: %s %s (APR %d) native error %d: %s (%s)\n", + description, apr_crypto_driver_name(driver), rv, result->rc, result->reason ? result->reason : "", result->msg ? result->msg : ""); } @@ -268,10 +410,10 @@ cipherTextLen, block); if (APR_SUCCESS != rv) { apr_crypto_error(&result, f); - fprintf(stderr, "decrypt: %s %s native error %d: %s (%s)\n", - description, apr_crypto_driver_name(driver), result->rc, - result->reason ? result->reason : "", result->msg ? result->msg - : ""); + fprintf(stderr, "decrypt: %s %s (APR %d) native error %d: %s (%s)\n", + description, apr_crypto_driver_name(driver), rv, result->rc, + result->reason ? result->reason : "", + result->msg ? result->msg : ""); } ABTS_ASSERT(tc, "apr_crypto_block_decrypt returned APR_ECRYPT", rv != APR_ECRYPT); ABTS_ASSERT(tc, "failed to apr_crypto_block_decrypt", rv == APR_SUCCESS); @@ -285,13 +427,15 @@ block); if (APR_SUCCESS != rv) { apr_crypto_error(&result, f); - fprintf(stderr, "decrypt_finish: %s %s native error %d: %s (%s)\n", - description, apr_crypto_driver_name(driver), result->rc, - result->reason ? result->reason : "", result->msg ? result->msg - : ""); + fprintf(stderr, + "decrypt_finish: %s %s (APR %d) native error %d: %s (%s)\n", + description, apr_crypto_driver_name(driver), rv, result->rc, + result->reason ? result->reason : "", + result->msg ? result->msg : ""); } ABTS_ASSERT(tc, "apr_crypto_block_decrypt_finish returned APR_ECRYPT", rv != APR_ECRYPT); ABTS_ASSERT(tc, "apr_crypto_block_decrypt_finish returned APR_EPADDING", rv != APR_EPADDING); + ABTS_ASSERT(tc, "apr_crypto_block_decrypt_finish returned APR_ENOSPACE", rv != APR_ENOSPACE); ABTS_ASSERT(tc, "failed to apr_crypto_block_decrypt_finish", rv == APR_SUCCESS); if (rv) { return NULL; @@ -316,7 +460,8 @@ const apr_crypto_driver_t **drivers, const apr_crypto_block_key_type_e type, const apr_crypto_block_key_mode_e mode, int doPad, - const unsigned char *in, apr_size_t inlen, const char *description) + const unsigned char *in, apr_size_t inlen, apr_size_t secretLen, + const char *description) { const apr_crypto_driver_t *driver1 = drivers[0]; const apr_crypto_driver_t *driver2 = drivers[1]; @@ -324,6 +469,10 @@ apr_crypto_t *f2 = NULL; const apr_crypto_key_t *key1 = NULL; const apr_crypto_key_t *key2 = NULL; + const apr_crypto_key_t *key3 = NULL; + const apr_crypto_key_t *key4 = NULL; + const apr_crypto_key_t *key5 = NULL; + const apr_crypto_key_t *key6 = NULL; unsigned char *cipherText = NULL; apr_size_t cipherTextLen = 0; @@ -345,7 +494,51 @@ if (cipherText && plainText) { if (memcmp(in, plainText, inlen)) { - fprintf(stderr, "cross mismatch: %s %s/%s\n", description, + fprintf(stderr, "passphrase cross mismatch: %s %s/%s\n", description, + apr_crypto_driver_name(driver1), apr_crypto_driver_name( + driver2)); + } + ABTS_STR_EQUAL(tc, (char *)in, (char *)plainText); + } + + key3 = keysecret(tc, pool, driver1, f1, type, mode, doPad, secretLen, description); + key4 = keysecret(tc, pool, driver2, f2, type, mode, doPad, secretLen, description); + + iv = NULL; + blockSize = 0; + cipherText = NULL; + plainText = NULL; + cipherText = encrypt_block(tc, pool, driver1, f1, key3, in, inlen, + &cipherText, &cipherTextLen, &iv, &blockSize, description); + plainText = decrypt_block(tc, pool, driver2, f2, key4, cipherText, + cipherTextLen, &plainText, &plainTextLen, iv, &blockSize, + description); + + if (cipherText && plainText) { + if (memcmp(in, plainText, inlen)) { + fprintf(stderr, "key secret cross mismatch: %s %s/%s\n", description, + apr_crypto_driver_name(driver1), apr_crypto_driver_name( + driver2)); + } + ABTS_STR_EQUAL(tc, (char *)in, (char *)plainText); + } + + key5 = keypassphrase(tc, pool, driver1, f1, type, mode, doPad, description); + key6 = keypassphrase(tc, pool, driver2, f2, type, mode, doPad, description); + + iv = NULL; + blockSize = 0; + cipherText = NULL; + plainText = NULL; + cipherText = encrypt_block(tc, pool, driver1, f1, key5, in, inlen, + &cipherText, &cipherTextLen, &iv, &blockSize, description); + plainText = decrypt_block(tc, pool, driver2, f2, key6, cipherText, + cipherTextLen, &plainText, &plainTextLen, iv, &blockSize, + description); + + if (cipherText && plainText) { + if (memcmp(in, plainText, inlen)) { + fprintf(stderr, "key passphrase cross mismatch: %s %s/%s\n", description, apr_crypto_driver_name(driver1), apr_crypto_driver_name( driver2)); } @@ -371,6 +564,63 @@ } +/** + * Simple test of OpenSSL key. + */ +static void test_crypto_key_openssl(abts_case *tc, void *data) +{ + apr_pool_t *pool = NULL; + const apr_crypto_driver_t *driver; + apr_crypto_t *f = NULL; + + apr_pool_create(&pool, NULL); + driver = get_openssl_driver(tc, pool); + + f = make(tc, pool, driver); + keysecret(tc, pool, driver, f, APR_KEY_AES_256, APR_MODE_CBC, 1, 32, + "KEY_AES_256/MODE_CBC"); + apr_pool_destroy(pool); + +} + +/** + * Simple test of NSS key. + */ +static void test_crypto_key_nss(abts_case *tc, void *data) +{ + apr_pool_t *pool = NULL; + const apr_crypto_driver_t *driver; + apr_crypto_t *f = NULL; + + apr_pool_create(&pool, NULL); + driver = get_nss_driver(tc, pool); + + f = make(tc, pool, driver); + keysecret(tc, pool, driver, f, APR_KEY_AES_256, APR_MODE_CBC, 1, 32, + "KEY_AES_256/MODE_CBC"); + apr_pool_destroy(pool); + +} + +/** + * Simple test of CommonCrypto key. + */ +static void test_crypto_key_commoncrypto(abts_case *tc, void *data) +{ + apr_pool_t *pool = NULL; + const apr_crypto_driver_t *driver; + apr_crypto_t *f = NULL; + + apr_pool_create(&pool, NULL); + driver = get_commoncrypto_driver(tc, pool); + + f = make(tc, pool, driver); + keysecret(tc, pool, driver, f, APR_KEY_AES_256, APR_MODE_CBC, 1, 32, + "KEY_AES_256/MODE_CBC"); + apr_pool_destroy(pool); + +} + /** * Simple test of OpenSSL block crypt. */ @@ -386,21 +636,21 @@ drivers[0] = get_openssl_driver(tc, pool); drivers[1] = get_openssl_driver(tc, pool); crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_CBC, 0, - in, inlen, "KEY_3DES_192/MODE_CBC"); + in, inlen, 24, "KEY_3DES_192/MODE_CBC"); crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_ECB, 0, - in, inlen, "KEY_3DES_192/MODE_ECB"); + in, inlen, 24, "KEY_3DES_192/MODE_ECB"); crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_CBC, 0, in, - inlen, "KEY_AES_256/MODE_CBC"); + inlen, 32, "KEY_AES_256/MODE_CBC"); crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_ECB, 0, in, - inlen, "KEY_AES_256/MODE_ECB"); + inlen, 32, "KEY_AES_256/MODE_ECB"); crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_CBC, 0, in, - inlen, "KEY_AES_192/MODE_CBC"); + inlen, 24, "KEY_AES_192/MODE_CBC"); crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_ECB, 0, in, - inlen, "KEY_AES_192/MODE_ECB"); + inlen, 24, "KEY_AES_192/MODE_ECB"); crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_CBC, 0, in, - inlen, "KEY_AES_128/MODE_CBC"); + inlen, 16, "KEY_AES_128/MODE_CBC"); crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_ECB, 0, in, - inlen, "KEY_AES_128/MODE_ECB"); + inlen, 16, "KEY_AES_128/MODE_ECB"); apr_pool_destroy(pool); } @@ -420,21 +670,55 @@ drivers[0] = get_nss_driver(tc, pool); drivers[1] = get_nss_driver(tc, pool); crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_CBC, 0, - in, inlen, "KEY_3DES_192/MODE_CBC"); + in, inlen, 24, "KEY_3DES_192/MODE_CBC"); /* KEY_3DES_192 / MODE_ECB doesn't work on NSS */ /* crypto_block_cross(tc, pool, drivers, KEY_3DES_192, MODE_ECB, 0, in, inlen, "KEY_3DES_192/MODE_ECB"); */ crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_CBC, 0, in, - inlen, "KEY_AES_256/MODE_CBC"); + inlen, 32, "KEY_AES_256/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_ECB, 0, in, + inlen, 32, "KEY_AES_256/MODE_ECB"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_CBC, 0, in, + inlen, 24, "KEY_AES_192/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_ECB, 0, in, + inlen, 24, "KEY_AES_192/MODE_ECB"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_CBC, 0, in, + inlen, 16, "KEY_AES_128/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_ECB, 0, in, + inlen, 16, "KEY_AES_128/MODE_ECB"); + apr_pool_destroy(pool); + +} + +/** + * Simple test of Common Crypto block crypt. + */ +static void test_crypto_block_commoncrypto(abts_case *tc, void *data) +{ + apr_pool_t *pool = NULL; + const apr_crypto_driver_t *drivers[] = { NULL, NULL }; + + const unsigned char *in = (const unsigned char *) ALIGNED_STRING; + apr_size_t inlen = sizeof(ALIGNED_STRING); + + apr_pool_create(&pool, NULL); + drivers[0] = get_commoncrypto_driver(tc, pool); + drivers[1] = get_commoncrypto_driver(tc, pool); + crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_CBC, 0, + in, inlen, 24, "KEY_3DES_192/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_ECB, 0, + in, inlen, 24, "KEY_3DES_192/MODE_ECB"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_CBC, 0, in, + inlen, 32, "KEY_AES_256/MODE_CBC"); crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_ECB, 0, in, - inlen, "KEY_AES_256/MODE_ECB"); + inlen, 32, "KEY_AES_256/MODE_ECB"); crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_CBC, 0, in, - inlen, "KEY_AES_192/MODE_CBC"); + inlen, 24, "KEY_AES_192/MODE_CBC"); crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_ECB, 0, in, - inlen, "KEY_AES_192/MODE_ECB"); + inlen, 24, "KEY_AES_192/MODE_ECB"); crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_CBC, 0, in, - inlen, "KEY_AES_128/MODE_CBC"); + inlen, 16, "KEY_AES_128/MODE_CBC"); crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_ECB, 0, in, - inlen, "KEY_AES_128/MODE_ECB"); + inlen, 16, "KEY_AES_128/MODE_ECB"); apr_pool_destroy(pool); } @@ -455,25 +739,22 @@ drivers[1] = get_openssl_driver(tc, pool); crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_CBC, 0, - in, inlen, "KEY_3DES_192/MODE_CBC"); + in, inlen, 24, "KEY_3DES_192/MODE_CBC"); /* KEY_3DES_192 / MODE_ECB doesn't work on NSS */ - /* crypto_block_cross(tc, pool, drivers, KEY_3DES_192, MODE_ECB, 0, in, inlen, "KEY_3DES_192/MODE_ECB"); */ + /* crypto_block_cross(tc, pool, drivers, KEY_3DES_192, MODE_ECB, 0, in, inlen, 24, "KEY_3DES_192/MODE_ECB"); */ crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_CBC, 0, in, - inlen, "KEY_AES_256/MODE_CBC"); + inlen, 32, "KEY_AES_256/MODE_CBC"); crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_ECB, 0, in, - inlen, "KEY_AES_256/MODE_ECB"); - - /* all 4 of these tests fail to interoperate - a clue from the xml-security code is that - * NSS cannot distinguish between the 128 and 192 bit versions of AES. Will need to be - * investigated. - */ - /* - crypto_block_cross(tc, pool, drivers, KEY_AES_192, MODE_CBC, 0, in, inlen, "KEY_AES_192/MODE_CBC"); - crypto_block_cross(tc, pool, drivers, KEY_AES_192, MODE_ECB, 0, in, inlen, "KEY_AES_192/MODE_ECB"); - crypto_block_cross(tc, pool, drivers, KEY_AES_128, MODE_CBC, 0, in, inlen, "KEY_AES_128/MODE_CBC"); - crypto_block_cross(tc, pool, drivers, KEY_AES_128, MODE_ECB, 0, in, inlen, "KEY_AES_128/MODE_ECB"); - */ + inlen, 32, "KEY_AES_256/MODE_ECB"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_CBC, 0, in, + inlen, 24, "KEY_AES_192/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_ECB, 0, in, + inlen, 24, "KEY_AES_192/MODE_ECB"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_CBC, 0, in, + inlen, 16, "KEY_AES_128/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_ECB, 0, in, + inlen, 16, "KEY_AES_128/MODE_ECB"); apr_pool_destroy(pool); } @@ -493,26 +774,95 @@ drivers[0] = get_openssl_driver(tc, pool); drivers[1] = get_nss_driver(tc, pool); crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_CBC, 0, - in, inlen, "KEY_3DES_192/MODE_CBC"); + in, inlen, 24, "KEY_3DES_192/MODE_CBC"); /* KEY_3DES_192 / MODE_ECB doesn't work on NSS */ - /* crypto_block_cross(tc, pool, drivers, KEY_3DES_192, MODE_ECB, 0, in, inlen, "KEY_3DES_192/MODE_ECB"); */ + /* crypto_block_cross(tc, pool, drivers, KEY_3DES_192, MODE_ECB, 0, in, inlen, 24, "KEY_3DES_192/MODE_ECB"); */ crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_CBC, 0, in, - inlen, "KEY_AES_256/MODE_CBC"); + inlen, 32, "KEY_AES_256/MODE_CBC"); crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_ECB, 0, in, - inlen, "KEY_AES_256/MODE_ECB"); + inlen, 32, "KEY_AES_256/MODE_ECB"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_CBC, 0, in, + inlen, 24, "KEY_AES_192/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_ECB, 0, in, + inlen, 24, "KEY_AES_192/MODE_ECB"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_CBC, 0, in, + inlen, 16, "KEY_AES_128/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_ECB, 0, in, + inlen, 16, "KEY_AES_128/MODE_ECB"); + apr_pool_destroy(pool); - /* all 4 of these tests fail to interoperate - a clue from the xml-security code is that - * NSS cannot distinguish between the 128 and 192 bit versions of AES. Will need to be - * investigated. - */ - /* - crypto_block_cross(tc, pool, drivers, KEY_AES_192, MODE_CBC, 0, in, inlen, "KEY_AES_192/MODE_CBC"); - crypto_block_cross(tc, pool, drivers, KEY_AES_192, MODE_ECB, 0, in, inlen, "KEY_AES_192/MODE_ECB"); - crypto_block_cross(tc, pool, drivers, KEY_AES_128, MODE_CBC, 0, in, inlen, "KEY_AES_128/MODE_CBC"); - crypto_block_cross(tc, pool, drivers, KEY_AES_128, MODE_ECB, 0, in, inlen, "KEY_AES_128/MODE_ECB"); - */ +} + +/** + * Encrypt OpenSSL, decrypt CommonCrypto. + */ +static void test_crypto_block_openssl_commoncrypto(abts_case *tc, void *data) +{ + apr_pool_t *pool = NULL; + const apr_crypto_driver_t *drivers[] = + { NULL, NULL }; + + const unsigned char *in = (const unsigned char *) ALIGNED_STRING; + apr_size_t inlen = sizeof(ALIGNED_STRING); + + apr_pool_create(&pool, NULL); + drivers[0] = get_openssl_driver(tc, pool); + drivers[1] = get_commoncrypto_driver(tc, pool); + + crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_CBC, 0, in, + inlen, 24, "KEY_3DES_192/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_ECB, 0, in, + inlen, 24, "KEY_3DES_192/MODE_ECB"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_CBC, 0, in, + inlen, 32, "KEY_AES_256/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_ECB, 0, in, + inlen, 32, "KEY_AES_256/MODE_ECB"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_CBC, 0, in, + inlen, 24, "KEY_AES_192/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_ECB, 0, in, + inlen, 24, "KEY_AES_192/MODE_ECB"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_CBC, 0, in, + inlen, 16, "KEY_AES_128/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_ECB, 0, in, + inlen, 16, "KEY_AES_128/MODE_ECB"); + apr_pool_destroy(pool); + +} + +/** + * Encrypt OpenSSL, decrypt CommonCrypto. + */ +static void test_crypto_block_commoncrypto_openssl(abts_case *tc, void *data) +{ + apr_pool_t *pool = NULL; + const apr_crypto_driver_t *drivers[] = + { NULL, NULL }; + + const unsigned char *in = (const unsigned char *) ALIGNED_STRING; + apr_size_t inlen = sizeof(ALIGNED_STRING); + + apr_pool_create(&pool, NULL); + drivers[0] = get_commoncrypto_driver(tc, pool); + drivers[1] = get_openssl_driver(tc, pool); + + crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_CBC, 0, in, + inlen, 24, "KEY_3DES_192/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_ECB, 0, in, + inlen, 24, "KEY_3DES_192/MODE_ECB"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_CBC, 0, in, + inlen, 32, "KEY_AES_256/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_ECB, 0, in, + inlen, 32, "KEY_AES_256/MODE_ECB"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_CBC, 0, in, + inlen, 24, "KEY_AES_192/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_ECB, 0, in, + inlen, 24, "KEY_AES_192/MODE_ECB"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_CBC, 0, in, + inlen, 16, "KEY_AES_128/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_ECB, 0, in, + inlen, 16, "KEY_AES_128/MODE_ECB"); apr_pool_destroy(pool); } @@ -533,21 +883,21 @@ drivers[1] = get_openssl_driver(tc, pool); crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_CBC, 1, - in, inlen, "KEY_3DES_192/MODE_CBC"); + in, inlen, 24, "KEY_3DES_192/MODE_CBC"); crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_ECB, 1, - in, inlen, "KEY_3DES_192/MODE_ECB"); + in, inlen, 24, "KEY_3DES_192/MODE_ECB"); crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_CBC, 1, in, - inlen, "KEY_AES_256/MODE_CBC"); + inlen, 32, "KEY_AES_256/MODE_CBC"); crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_ECB, 1, in, - inlen, "KEY_AES_256/MODE_ECB"); + inlen, 32, "KEY_AES_256/MODE_ECB"); crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_CBC, 1, in, - inlen, "KEY_AES_192/MODE_CBC"); + inlen, 24, "KEY_AES_192/MODE_CBC"); crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_ECB, 1, in, - inlen, "KEY_AES_192/MODE_ECB"); + inlen, 24, "KEY_AES_192/MODE_ECB"); crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_CBC, 1, in, - inlen, "KEY_AES_128/MODE_CBC"); + inlen, 16, "KEY_AES_128/MODE_CBC"); crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_ECB, 1, in, - inlen, "KEY_AES_128/MODE_ECB"); + inlen, 16, "KEY_AES_128/MODE_ECB"); apr_pool_destroy(pool); @@ -570,27 +920,63 @@ drivers[1] = get_nss_driver(tc, pool); crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_CBC, 1, - in, inlen, "KEY_3DES_192/MODE_CBC"); + in, inlen, 24, "KEY_3DES_192/MODE_CBC"); /* KEY_3DES_192 / MODE_ECB doesn't work on NSS */ - /* crypto_block_cross(tc, pool, drivers, KEY_3DES_192, MODE_ECB, 1, in, inlen, "KEY_3DES_192/MODE_ECB"); */ + /* crypto_block_cross(tc, pool, drivers, KEY_3DES_192, MODE_ECB, 1, in, inlen, 24, "KEY_3DES_192/MODE_ECB"); */ crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_CBC, 1, in, - inlen, "KEY_AES_256/MODE_CBC"); + inlen, 32, "KEY_AES_256/MODE_CBC"); /* KEY_AES_256 / MODE_ECB doesn't support padding on NSS */ - /*crypto_block_cross(tc, pool, drivers, KEY_AES_256, MODE_ECB, 1, in, inlen, "KEY_AES_256/MODE_ECB");*/ + /*crypto_block_cross(tc, pool, drivers, KEY_AES_256, MODE_ECB, 1, in, inlen, 32, "KEY_AES_256/MODE_ECB");*/ crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_CBC, 1, in, - inlen, "KEY_AES_192/MODE_CBC"); + inlen, 24, "KEY_AES_192/MODE_CBC"); /* KEY_AES_256 / MODE_ECB doesn't support padding on NSS */ - /*crypto_block_cross(tc, pool, drivers, KEY_AES_192, MODE_ECB, 1, in, inlen, "KEY_AES_192/MODE_ECB");*/ + /*crypto_block_cross(tc, pool, drivers, KEY_AES_192, MODE_ECB, 1, in, inlen, 24, "KEY_AES_192/MODE_ECB");*/ crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_CBC, 1, in, - inlen, "KEY_AES_128/MODE_CBC"); + inlen, 16, "KEY_AES_128/MODE_CBC"); /* KEY_AES_256 / MODE_ECB doesn't support padding on NSS */ - /*crypto_block_cross(tc, pool, drivers, KEY_AES_128, MODE_ECB, 1, in, inlen, "KEY_AES_128/MODE_ECB");*/ + /*crypto_block_cross(tc, pool, drivers, KEY_AES_128, MODE_ECB, 1, in, inlen, 16, "KEY_AES_128/MODE_ECB");*/ + + apr_pool_destroy(pool); + +} + +/** + * Simple test of Common Crypto block crypt. + */ +static void test_crypto_block_commoncrypto_pad(abts_case *tc, void *data) +{ + apr_pool_t *pool = NULL; + const apr_crypto_driver_t *drivers[] = { NULL, NULL }; + + const unsigned char *in = (const unsigned char *) TEST_STRING; + apr_size_t inlen = sizeof(TEST_STRING); + + apr_pool_create(&pool, NULL); + drivers[0] = get_commoncrypto_driver(tc, pool); + drivers[1] = get_commoncrypto_driver(tc, pool); + + crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_CBC, 1, + in, inlen, 24, "KEY_3DES_192/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_ECB, 1, + in, inlen, 24, "KEY_3DES_192/MODE_ECB"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_CBC, 1, in, + inlen, 32, "KEY_AES_256/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_ECB, 1, in, + inlen, 32, "KEY_AES_256/MODE_ECB"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_CBC, 1, in, + inlen, 24, "KEY_AES_192/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_ECB, 1, in, + inlen, 24, "KEY_AES_192/MODE_ECB"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_CBC, 1, in, + inlen, 16, "KEY_AES_128/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_ECB, 1, in, + inlen, 16, "KEY_AES_128/MODE_ECB"); apr_pool_destroy(pool); @@ -612,27 +998,31 @@ drivers[1] = get_openssl_driver(tc, pool); crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_CBC, 1, - in, inlen, "KEY_3DES_192/MODE_CBC"); + in, inlen, 24, "KEY_3DES_192/MODE_CBC"); /* KEY_3DES_192 / MODE_ECB doesn't work on NSS */ - /* crypto_block_cross(tc, pool, drivers, KEY_3DES_192, MODE_ECB, 1, in, inlen, "KEY_3DES_192/MODE_ECB"); */ + /* crypto_block_cross(tc, pool, drivers, KEY_3DES_192, MODE_ECB, 1, in, inlen, 24, "KEY_3DES_192/MODE_ECB"); */ crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_CBC, 1, in, - inlen, "KEY_AES_256/MODE_CBC"); + inlen, 32, "KEY_AES_256/MODE_CBC"); /* KEY_AES_256 / MODE_ECB doesn't support padding on NSS */ - /*crypto_block_cross(tc, pool, drivers, KEY_AES_256, MODE_ECB, 1, in, inlen, "KEY_AES_256/MODE_ECB");*/ + /*crypto_block_cross(tc, pool, drivers, KEY_AES_256, MODE_ECB, 1, in, inlen, 32, "KEY_AES_256/MODE_ECB");*/ + + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_CBC, 1, in, + inlen, 24, "KEY_AES_192/MODE_CBC"); + + /* KEY_AES_192 / MODE_ECB doesn't support padding on NSS */ + /*crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_ECB, 1, in, + inlen, 24, "KEY_AES_192/MODE_ECB");*/ + + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_CBC, 1, in, + inlen, 16, "KEY_AES_128/MODE_CBC"); + + /* KEY_AES_192 / MODE_ECB doesn't support padding on NSS */ + /*crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_ECB, 1, in, + inlen, 16, "KEY_AES_128/MODE_ECB");*/ - /* all 4 of these tests fail to interoperate - a clue from the xml-security code is that - * NSS cannot distinguish between the 128 and 192 bit versions of AES. Will need to be - * investigated. - */ - /* - crypto_block_cross(tc, pool, drivers, KEY_AES_192, MODE_CBC, 1, in, inlen, "KEY_AES_192/MODE_CBC"); - crypto_block_cross(tc, pool, drivers, KEY_AES_192, MODE_ECB, 1, in, inlen, "KEY_AES_192/MODE_ECB"); - crypto_block_cross(tc, pool, drivers, KEY_AES_128, MODE_CBC, 1, in, inlen, "KEY_AES_128/MODE_CBC"); - crypto_block_cross(tc, pool, drivers, KEY_AES_128, MODE_ECB, 1, in, inlen, "KEY_AES_128/MODE_ECB"); - */ apr_pool_destroy(pool); } @@ -652,27 +1042,107 @@ drivers[0] = get_openssl_driver(tc, pool); drivers[1] = get_nss_driver(tc, pool); crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_CBC, 1, - in, inlen, "KEY_3DES_192/MODE_CBC"); + in, inlen, 24, "KEY_3DES_192/MODE_CBC"); /* KEY_3DES_192 / MODE_ECB doesn't work on NSS */ - /* crypto_block_cross(tc, pool, drivers, KEY_3DES_192, MODE_ECB, 1, in, inlen, "KEY_3DES_192/MODE_ECB"); */ + /* crypto_block_cross(tc, pool, drivers, KEY_3DES_192, MODE_ECB, 1, in, inlen, 24, "KEY_3DES_192/MODE_ECB"); */ crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_CBC, 1, in, - inlen, "KEY_AES_256/MODE_CBC"); + inlen, 32, "KEY_AES_256/MODE_CBC"); /* KEY_AES_256 / MODE_ECB doesn't support padding on NSS */ - /*crypto_block_cross(tc, pool, drivers, KEY_AES_256, MODE_ECB, 1, in, inlen, "KEY_AES_256/MODE_ECB");*/ + /*crypto_block_cross(tc, pool, drivers, KEY_AES_256, MODE_ECB, 1, in, inlen, 32, "KEY_AES_256/MODE_ECB");*/ + + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_CBC, 1, in, inlen, + 24, "KEY_AES_192/MODE_CBC"); + + /* KEY_AES_192 / MODE_ECB doesn't support padding on NSS */ + /*crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_ECB, 1, in, inlen, + 24, "KEY_AES_192/MODE_ECB");*/ + + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_CBC, 1, in, inlen, + 16, "KEY_AES_128/MODE_CBC"); + + /* KEY_AES_128 / MODE_ECB doesn't support padding on NSS */ + /*crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_ECB, 1, in, inlen, + 16, "KEY_AES_128/MODE_ECB");*/ + + apr_pool_destroy(pool); + +} + +/** + * Encrypt CommonCrypto, decrypt OpenSSL. + */ +static void test_crypto_block_commoncrypto_openssl_pad(abts_case *tc, + void *data) +{ + apr_pool_t *pool = NULL; + const apr_crypto_driver_t *drivers[] = + { NULL, NULL }; + + const unsigned char *in = (const unsigned char *) TEST_STRING; + apr_size_t inlen = sizeof(TEST_STRING); + + apr_pool_create(&pool, NULL); + drivers[0] = get_commoncrypto_driver(tc, pool); + drivers[1] = get_openssl_driver(tc, pool); + + crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_CBC, 1, in, + inlen, 24, "KEY_3DES_192/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_ECB, 1, in, + inlen, 24, "KEY_3DES_192/MODE_ECB"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_CBC, 1, in, + inlen, 32, "KEY_AES_256/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_ECB, 1, in, + inlen, 32, "KEY_AES_256/MODE_ECB"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_CBC, 1, in, + inlen, 24, "KEY_AES_192/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_ECB, 1, in, + inlen, 24, "KEY_AES_192/MODE_ECB"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_CBC, 1, in, + inlen, 16, "KEY_AES_128/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_ECB, 1, in, + inlen, 16, "KEY_AES_128/MODE_ECB"); + + apr_pool_destroy(pool); + +} + +/** + * Encrypt OpenSSL, decrypt CommonCrypto. + */ +static void test_crypto_block_openssl_commoncrypto_pad(abts_case *tc, + void *data) +{ + apr_pool_t *pool = NULL; + const apr_crypto_driver_t *drivers[] = + { NULL, NULL }; + + const unsigned char *in = (const unsigned char *) TEST_STRING; + apr_size_t inlen = sizeof(TEST_STRING); + + apr_pool_create(&pool, NULL); + drivers[0] = get_openssl_driver(tc, pool); + drivers[1] = get_commoncrypto_driver(tc, pool); + + crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_CBC, 1, in, + inlen, 24, "KEY_3DES_192/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_ECB, 1, in, + inlen, 24, "KEY_3DES_192/MODE_ECB"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_CBC, 1, in, + inlen, 32, "KEY_AES_256/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_ECB, 1, in, + inlen, 32, "KEY_AES_256/MODE_ECB"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_CBC, 1, in, + inlen, 24, "KEY_AES_192/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_ECB, 1, in, + inlen, 24, "KEY_AES_192/MODE_ECB"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_CBC, 1, in, + inlen, 16, "KEY_AES_128/MODE_CBC"); + crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_ECB, 1, in, + inlen, 16, "KEY_AES_128/MODE_ECB"); - /* all 4 of these tests fail to interoperate - a clue from the xml-security code is that - * NSS cannot distinguish between the 128 and 192 bit versions of AES. Will need to be - * investigated. - */ - /* - crypto_block_cross(tc, pool, drivers, KEY_AES_192, MODE_CBC, 1, in, inlen, "KEY_AES_192/MODE_CBC"); - crypto_block_cross(tc, pool, drivers, KEY_AES_192, MODE_ECB, 1, in, inlen, "KEY_AES_192/MODE_ECB"); - crypto_block_cross(tc, pool, drivers, KEY_AES_128, MODE_CBC, 1, in, inlen, "KEY_AES_128/MODE_CBC"); - crypto_block_cross(tc, pool, drivers, KEY_AES_128, MODE_ECB, 1, in, inlen, "KEY_AES_128/MODE_ECB"); - */ apr_pool_destroy(pool); } @@ -763,6 +1233,49 @@ } +/** + * Get Types, Common Crypto. + */ +static void test_crypto_get_block_key_types_commoncrypto(abts_case *tc, void *data) +{ + apr_pool_t *pool = NULL; + const apr_crypto_driver_t *driver; + apr_crypto_t *f; + apr_hash_t *types; + int *key_3des_192; + int *key_aes_128; + int *key_aes_192; + int *key_aes_256; + + apr_pool_create(&pool, NULL); + driver = get_commoncrypto_driver(tc, pool); + if (driver) { + + f = make(tc, pool, driver); + apr_crypto_get_block_key_types(&types, f); + + key_3des_192 = apr_hash_get(types, "3des192", APR_HASH_KEY_STRING); + ABTS_PTR_NOTNULL(tc, key_3des_192); + ABTS_INT_EQUAL(tc, *key_3des_192, APR_KEY_3DES_192); + + key_aes_128 = apr_hash_get(types, "aes128", APR_HASH_KEY_STRING); + ABTS_PTR_NOTNULL(tc, key_aes_128); + ABTS_INT_EQUAL(tc, *key_aes_128, APR_KEY_AES_128); + + key_aes_192 = apr_hash_get(types, "aes192", APR_HASH_KEY_STRING); + ABTS_PTR_NOTNULL(tc, key_aes_192); + ABTS_INT_EQUAL(tc, *key_aes_192, APR_KEY_AES_192); + + key_aes_256 = apr_hash_get(types, "aes256", APR_HASH_KEY_STRING); + ABTS_PTR_NOTNULL(tc, key_aes_256); + ABTS_INT_EQUAL(tc, *key_aes_256, APR_KEY_AES_256); + + } + + apr_pool_destroy(pool); + +} + /** * Get Modes, OpenSSL. */ @@ -829,6 +1342,114 @@ } +/** + * Get Modes, Common Crypto. + */ +static void test_crypto_get_block_key_modes_commoncrypto(abts_case *tc, void *data) +{ + apr_pool_t *pool = NULL; + const apr_crypto_driver_t *driver; + apr_crypto_t *f; + apr_hash_t *modes; + int *mode_ecb; + int *mode_cbc; + + apr_pool_create(&pool, NULL); + driver = get_commoncrypto_driver(tc, pool); + if (driver) { + + f = make(tc, pool, driver); + apr_crypto_get_block_key_modes(&modes, f); + + mode_ecb = apr_hash_get(modes, "ecb", APR_HASH_KEY_STRING); + ABTS_PTR_NOTNULL(tc, mode_ecb); + ABTS_INT_EQUAL(tc, *mode_ecb, APR_MODE_ECB); + + mode_cbc = apr_hash_get(modes, "cbc", APR_HASH_KEY_STRING); + ABTS_PTR_NOTNULL(tc, mode_cbc); + ABTS_INT_EQUAL(tc, *mode_cbc, APR_MODE_CBC); + + } + + apr_pool_destroy(pool); + +} + +static void test_crypto_memzero(abts_case *tc, void *data) +{ + /* Aligned message */ + struct { + char buf[7 * sizeof(int)]; + int untouched; + } msg; + /* A bit of type punning such that 'msg' might look unused + * after the call to apr_crypto_memzero(). + */ + int *ptr = (int *)&msg; + int i; + + /* Fill buf with non-zeros (odds) */ + for (i = 1; i < 2 * sizeof(msg.buf); i += 2) { + msg.buf[i / 2] = (char)i; + ABTS_ASSERT(tc, "test_crypto_memzero() barrier", msg.buf[i / 2] != 0); + } + + /* Zero out the whole, and check it */ + apr_crypto_memzero(&msg, sizeof msg); + for (i = 0; i < sizeof(msg) / sizeof(*ptr); ++i) { + ABTS_ASSERT(tc, "test_crypto_memzero() optimized out", ptr[i] == 0); + } +} + +static void test_crypto_equals(abts_case *tc, void *data) +{ + /* Buffers of each type of scalar */ + union { + char c; + short s; + int i; + long l; + float f; + double d; + void *p; + } buf0[7], buf1[7], buf[7]; + char *ptr = (char *)buf; + int i; + +#define TEST_SCALAR_MATCH(i, x, r) \ + ABTS_ASSERT(tc, "test_crypto_equals(" APR_STRINGIFY(x) ")" \ + " != " APR_STRINGIFY(r), \ + apr_crypto_equals(&buf##r[i].x, &buf[i].x, \ + sizeof(buf[i].x)) == r) + + /* Fill buf with non-zeros (odds) */ + for (i = 1; i < 2 * sizeof(buf); i += 2) { + ptr[i / 2] = (char)i; + } + /* Set buf1 = buf */ + memcpy(buf1, buf, sizeof buf); + /* Set buf0 = {0} */ + memset(buf0, 0, sizeof buf0); + + /* Check that buf1 == buf for each scalar */ + TEST_SCALAR_MATCH(0, c, 1); + TEST_SCALAR_MATCH(1, s, 1); + TEST_SCALAR_MATCH(2, i, 1); + TEST_SCALAR_MATCH(3, l, 1); + TEST_SCALAR_MATCH(4, f, 1); + TEST_SCALAR_MATCH(5, d, 1); + TEST_SCALAR_MATCH(6, p, 1); + + /* Check that buf0 != buf for each scalar */ + TEST_SCALAR_MATCH(0, c, 0); + TEST_SCALAR_MATCH(1, s, 0); + TEST_SCALAR_MATCH(2, i, 0); + TEST_SCALAR_MATCH(3, l, 0); + TEST_SCALAR_MATCH(4, f, 0); + TEST_SCALAR_MATCH(5, d, 0); + TEST_SCALAR_MATCH(6, p, 0); +} + abts_suite *testcrypto(abts_suite *suite) { suite = ADD_SUITE(suite); @@ -836,6 +1457,15 @@ /* test simple init and shutdown */ abts_run_test(suite, test_crypto_init, NULL); + /* test key parsing - openssl */ + abts_run_test(suite, test_crypto_key_openssl, NULL); + + /* test key parsing - nss */ + abts_run_test(suite, test_crypto_key_nss, NULL); + + /* test key parsing - commoncrypto */ + abts_run_test(suite, test_crypto_key_commoncrypto, NULL); + /* test a simple encrypt / decrypt operation - openssl */ abts_run_test(suite, test_crypto_block_openssl, NULL); @@ -848,6 +1478,12 @@ /* test a padded encrypt / decrypt operation - nss */ abts_run_test(suite, test_crypto_block_nss_pad, NULL); + /* test a simple encrypt / decrypt operation - commoncrypto */ + abts_run_test(suite, test_crypto_block_commoncrypto, NULL); + + /* test a padded encrypt / decrypt operation - commoncrypto */ + abts_run_test(suite, test_crypto_block_commoncrypto_pad, NULL); + /* test encrypt nss / decrypt openssl */ abts_run_test(suite, test_crypto_block_nss_openssl, NULL); @@ -860,18 +1496,39 @@ /* test padded encrypt openssl / decrypt nss */ abts_run_test(suite, test_crypto_block_openssl_nss_pad, NULL); + /* test encrypt openssl / decrypt commoncrypto */ + abts_run_test(suite, test_crypto_block_openssl_commoncrypto, NULL); + + /* test padded encrypt openssl / decrypt commoncrypto */ + abts_run_test(suite, test_crypto_block_openssl_commoncrypto_pad, NULL); + + /* test encrypt commoncrypto / decrypt openssl */ + abts_run_test(suite, test_crypto_block_commoncrypto_openssl, NULL); + + /* test padded encrypt commoncrypto / decrypt openssl */ + abts_run_test(suite, test_crypto_block_commoncrypto_openssl_pad, NULL); + /* test block key types openssl */ abts_run_test(suite, test_crypto_get_block_key_types_openssl, NULL); /* test block key types nss */ abts_run_test(suite, test_crypto_get_block_key_types_nss, NULL); + /* test block key types commoncrypto */ + abts_run_test(suite, test_crypto_get_block_key_types_commoncrypto, NULL); + /* test block key modes openssl */ abts_run_test(suite, test_crypto_get_block_key_modes_openssl, NULL); /* test block key modes nss */ abts_run_test(suite, test_crypto_get_block_key_modes_nss, NULL); + /* test block key modes commoncrypto */ + abts_run_test(suite, test_crypto_get_block_key_modes_commoncrypto, NULL); + + abts_run_test(suite, test_crypto_memzero, NULL); + abts_run_test(suite, test_crypto_equals, NULL); + return suite; } Index: contrib/apr-util/test/testredis.c =================================================================== --- /dev/null +++ contrib/apr-util/test/testredis.c @@ -0,0 +1,552 @@ +/* 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 "testutil.h" +#include "apr.h" +#include "apu.h" +#include "apr_general.h" +#include "apr_strings.h" +#include "apr_hash.h" +#include "apr_redis.h" +#include "apr_network_io.h" + +#include +#if APR_HAVE_STDLIB_H +#include /* for exit() */ +#endif + +#define HOST "localhost" +#define PORT 6379 + +/* the total number of items to use for set/get testing */ +#define TDATA_SIZE 3000 + +/* some smaller subset of TDATA_SIZE used for multiget testing */ +#define TDATA_SET 100 + +/* our custom hash function just returns this all the time */ +#define HASH_FUNC_RESULT 510 + +/* all keys will be prefixed with this */ +static const char prefix[] = "testredis"; + +/* text for values we store */ +static const char txt[] = +"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis at" +"lacus in ligula hendrerit consectetuer. Vestibulum tristique odio" +"iaculis leo. In massa arcu, ultricies a, laoreet nec, hendrerit non," +"neque. Nulla sagittis sapien ac risus. Morbi ligula dolor, vestibulum" +"nec, viverra id, placerat dapibus, arcu. Curabitur egestas feugiat" +"tellus. Donec dignissim. Nunc ante. Curabitur id lorem. In mollis" +"tortor sit amet eros auctor dapibus. Proin nulla sem, tristique in," +"convallis id, iaculis feugiat cras amet."; + +/* + * this datatype is for our custom server determination function. this might + * be useful if you don't want to rely on simply hashing keys to determine + * where a key belongs, but instead want to write something fancy, or use some + * other kind of configuration data, i.e. a hash plus some data about a + * namespace, or whatever. see my_server_func, and test_redis_user_funcs + * for the examples. + */ +typedef struct { + const char *someval; + apr_uint32_t which_server; +} my_hash_server_baton; + + +/* this could do something fancy and return some hash result. + * for simplicity, just return the same value, so we can test it later on. + * if you wanted to use some external hashing library or functions for + * consistent hashing, for example, this would be a good place to do it. + */ +static apr_uint32_t my_hash_func(void *baton, const char *data, + apr_size_t data_len) +{ + + return HASH_FUNC_RESULT; +} + +/* + * a fancy function to determine which server to use given some kind of data + * and a hash value. this example actually ignores the hash value itself + * and pulls some number from the *baton, which is a struct that has some + * kind of meaningful stuff in it. + */ +static apr_redis_server_t *my_server_func(void *baton, + apr_redis_t *mc, + const apr_uint32_t hash) +{ + apr_redis_server_t *ms = NULL; + my_hash_server_baton *mhsb = (my_hash_server_baton *)baton; + + if(mc->ntotal == 0) { + return NULL; + } + + if(mc->ntotal < mhsb->which_server) { + return NULL; + } + + ms = mc->live_servers[mhsb->which_server - 1]; + + return ms; +} + +static apr_uint16_t firsttime = 0; +static int randval(apr_uint32_t high) +{ + apr_uint32_t i = 0; + double d = 0; + + if (firsttime == 0) { + srand((unsigned) (getpid())); + firsttime = 1; + } + + d = (double) rand() / ((double) RAND_MAX + 1); + i = (int) (d * (high - 0 + 1)); + + return i > 0 ? i : 1; +} + +/* + * general test to make sure we can create the redis struct and add + * some servers, but not more than we tell it we can add + */ + +static void test_redis_create(abts_case * tc, void *data) +{ + apr_pool_t *pool = p; + apr_status_t rv; + apr_redis_t *redis; + apr_redis_server_t *server, *s; + apr_uint32_t max_servers = 10; + apr_uint32_t i; + apr_uint32_t hash; + + rv = apr_redis_create(pool, max_servers, 0, &redis); + ABTS_ASSERT(tc, "redis create failed", rv == APR_SUCCESS); + + for (i = 1; i <= max_servers; i++) { + apr_port_t port; + + port = PORT + i; + rv = + apr_redis_server_create(pool, HOST, PORT + i, 0, 1, 1, 60, 60, &server); + ABTS_ASSERT(tc, "server create failed", rv == APR_SUCCESS); + + rv = apr_redis_add_server(redis, server); + ABTS_ASSERT(tc, "server add failed", rv == APR_SUCCESS); + + s = apr_redis_find_server(redis, HOST, port); + ABTS_PTR_EQUAL(tc, server, s); + + rv = apr_redis_disable_server(redis, s); + ABTS_ASSERT(tc, "server disable failed", rv == APR_SUCCESS); + + rv = apr_redis_enable_server(redis, s); + ABTS_ASSERT(tc, "server enable failed", rv == APR_SUCCESS); + + hash = apr_redis_hash(redis, prefix, strlen(prefix)); + ABTS_ASSERT(tc, "hash failed", hash > 0); + + s = apr_redis_find_server_hash(redis, hash); + ABTS_PTR_NOTNULL(tc, s); + } + + rv = apr_redis_server_create(pool, HOST, PORT, 0, 1, 1, 60, 60, &server); + ABTS_ASSERT(tc, "server create failed", rv == APR_SUCCESS); + + rv = apr_redis_add_server(redis, server); + ABTS_ASSERT(tc, "server add should have failed", rv != APR_SUCCESS); + +} + +/* install our own custom hashing and server selection routines. */ + +static int create_test_hash(apr_pool_t *p, apr_hash_t *h) +{ + int i; + + for (i = 0; i < TDATA_SIZE; i++) { + char *k, *v; + + k = apr_pstrcat(p, prefix, apr_itoa(p, i), NULL); + v = apr_pstrndup(p, txt, randval((apr_uint32_t)strlen(txt))); + + apr_hash_set(h, k, APR_HASH_KEY_STRING, v); + } + + return i; +} + +static void test_redis_user_funcs(abts_case * tc, void *data) +{ + apr_pool_t *pool = p; + apr_status_t rv; + apr_redis_t *redis; + apr_redis_server_t *found; + apr_uint32_t max_servers = 10; + apr_uint32_t hres; + apr_uint32_t i; + my_hash_server_baton *baton = + apr_pcalloc(pool, sizeof(my_hash_server_baton)); + + rv = apr_redis_create(pool, max_servers, 0, &redis); + ABTS_ASSERT(tc, "redis create failed", rv == APR_SUCCESS); + + /* as noted above, install our custom hash function, and call + * apr_redis_hash. the return value should be our predefined number, + * and our function just ignores the other args, for simplicity. + */ + redis->hash_func = my_hash_func; + + hres = apr_redis_hash(redis, "whatever", sizeof("whatever") - 1); + ABTS_INT_EQUAL(tc, HASH_FUNC_RESULT, hres); + + /* add some servers */ + for(i = 1; i <= 10; i++) { + apr_redis_server_t *ms; + + rv = apr_redis_server_create(pool, HOST, i, 0, 1, 1, 60, 60, &ms); + ABTS_ASSERT(tc, "server create failed", rv == APR_SUCCESS); + + rv = apr_redis_add_server(redis, ms); + ABTS_ASSERT(tc, "server add failed", rv == APR_SUCCESS); + } + + /* + * set 'which_server' in our server_baton to find the third server + * which should have the same port. + */ + baton->which_server = 3; + redis->server_func = my_server_func; + redis->server_baton = baton; + found = apr_redis_find_server_hash(redis, 0); + ABTS_ASSERT(tc, "wrong server found", found->port == baton->which_server); +} + +/* test non data related commands like stats and version */ +static void test_redis_meta(abts_case * tc, void *data) +{ + apr_pool_t *pool = p; + apr_redis_t *redis; + apr_redis_server_t *server; + apr_redis_stats_t *stats; + char *result; + apr_status_t rv; + + rv = apr_redis_create(pool, 1, 0, &redis); + ABTS_ASSERT(tc, "redis create failed", rv == APR_SUCCESS); + + rv = apr_redis_server_create(pool, HOST, PORT, 0, 1, 1, 60, 60, &server); + ABTS_ASSERT(tc, "server create failed", rv == APR_SUCCESS); + + rv = apr_redis_add_server(redis, server); + ABTS_ASSERT(tc, "server add failed", rv == APR_SUCCESS); + + rv = apr_redis_version(server, pool, &result); + ABTS_PTR_NOTNULL(tc, result); + + rv = apr_redis_stats(server, p, &stats); + ABTS_PTR_NOTNULL(tc, stats); + + /* + * no way to know exactly what will be in most of these, so + * just make sure there is something. + */ + ABTS_ASSERT(tc, "major", stats->major >= 1); + ABTS_ASSERT(tc, "minor", stats->minor >= 0); + ABTS_ASSERT(tc, "patch", stats->patch >= 0); + ABTS_ASSERT(tc, "process_id", stats->process_id >= 0); + ABTS_ASSERT(tc, "uptime_in_seconds", stats->uptime_in_seconds >= 0); + ABTS_ASSERT(tc, "arch_bits", stats->arch_bits >= 0); + ABTS_ASSERT(tc, "connected_clients", stats->connected_clients >= 0); + ABTS_ASSERT(tc, "blocked_clients", stats->blocked_clients >= 0); + ABTS_ASSERT(tc, "maxmemory", stats->maxmemory >= 0); + ABTS_ASSERT(tc, "used_memory", stats->used_memory >= 0); + ABTS_ASSERT(tc, "total_system_memory", stats->total_system_memory >= 0); + ABTS_ASSERT(tc, "total_connections_received", stats->total_connections_received >= 0); + ABTS_ASSERT(tc, "total_commands_processed", stats->total_commands_processed >= 0); + ABTS_ASSERT(tc, "total_net_input_bytes", stats->total_net_input_bytes >= 0); + ABTS_ASSERT(tc, "total_net_output_bytes", stats->total_net_output_bytes >= 0); + ABTS_ASSERT(tc, "keyspace_hits", stats->keyspace_hits >= 0); + ABTS_ASSERT(tc, "keyspace_misses", stats->keyspace_misses >= 0); + ABTS_ASSERT(tc, "role", stats->role >= 0); + ABTS_ASSERT(tc, "connected_slaves", stats->connected_slaves >= 0); + ABTS_ASSERT(tc, "used_cpu_sys", stats->used_cpu_sys >= 0); + ABTS_ASSERT(tc, "used_cpu_user", stats->used_cpu_user >= 0); + ABTS_ASSERT(tc, "cluster_enabled", stats->cluster_enabled >= 0); +} + + +/* basic tests of the increment and decrement commands */ +static void test_redis_incrdecr(abts_case * tc, void *data) +{ + apr_pool_t *pool = p; + apr_status_t rv; + apr_redis_t *redis; + apr_redis_server_t *server; + apr_uint32_t new; + char *result; + apr_size_t len; + apr_uint32_t i; + + rv = apr_redis_create(pool, 1, 0, &redis); + ABTS_ASSERT(tc, "redis create failed", rv == APR_SUCCESS); + + rv = apr_redis_server_create(pool, HOST, PORT, 0, 1, 1, 60, 60, &server); + ABTS_ASSERT(tc, "server create failed", rv == APR_SUCCESS); + + rv = apr_redis_add_server(redis, server); + ABTS_ASSERT(tc, "server add failed", rv == APR_SUCCESS); + + rv = apr_redis_set(redis, prefix, "271", sizeof("271") - 1, 27); + ABTS_ASSERT(tc, "set failed", rv == APR_SUCCESS); + + for( i = 1; i <= TDATA_SIZE; i++) { + apr_uint32_t expect; + + rv = apr_redis_getp(redis, pool, prefix, &result, &len, NULL); + ABTS_ASSERT(tc, "get failed", rv == APR_SUCCESS); + + expect = i + atoi(result); + + rv = apr_redis_incr(redis, prefix, i, &new); + ABTS_ASSERT(tc, "incr failed", rv == APR_SUCCESS); + + ABTS_INT_EQUAL(tc, expect, new); + + rv = apr_redis_decr(redis, prefix, i, &new); + ABTS_ASSERT(tc, "decr failed", rv == APR_SUCCESS); + + ABTS_INT_EQUAL(tc, atoi(result), new); + + } + + rv = apr_redis_getp(redis, pool, prefix, &result, &len, NULL); + ABTS_ASSERT(tc, "get failed", rv == APR_SUCCESS); + + ABTS_INT_EQUAL(tc, 271, atoi(result)); + + rv = apr_redis_delete(redis, prefix, 0); + ABTS_ASSERT(tc, "delete failed", rv == APR_SUCCESS); +} + + +/* test setting and getting */ + +static void test_redis_setget(abts_case * tc, void *data) +{ + apr_pool_t *pool = p; + apr_status_t rv; + apr_redis_t *redis; + apr_redis_server_t *server; + apr_hash_t *tdata; + apr_hash_index_t *hi; + char *result; + apr_size_t len; + + rv = apr_redis_create(pool, 1, 0, &redis); + ABTS_ASSERT(tc, "redis create failed", rv == APR_SUCCESS); + + rv = apr_redis_server_create(pool, HOST, PORT, 0, 1, 1, 60, 60, &server); + ABTS_ASSERT(tc, "server create failed", rv == APR_SUCCESS); + + rv = apr_redis_add_server(redis, server); + ABTS_ASSERT(tc, "server add failed", rv == APR_SUCCESS); + + tdata = apr_hash_make(pool); + + create_test_hash(pool, tdata); + + for (hi = apr_hash_first(p, tdata); hi; hi = apr_hash_next(hi)) { + const void *k; + void *v; + const char *key; + + apr_hash_this(hi, &k, NULL, &v); + key = k; + + rv = apr_redis_set(redis, key, v, strlen(v), 27); + ABTS_ASSERT(tc, "set failed", rv == APR_SUCCESS); + rv = apr_redis_getp(redis, pool, key, &result, &len, NULL); + ABTS_ASSERT(tc, "get failed", rv == APR_SUCCESS); + } + + rv = apr_redis_getp(redis, pool, "nothere3423", &result, &len, NULL); + + ABTS_ASSERT(tc, "get should have failed", rv != APR_SUCCESS); + + for (hi = apr_hash_first(p, tdata); hi; hi = apr_hash_next(hi)) { + const void *k; + const char *key; + + apr_hash_this(hi, &k, NULL, NULL); + key = k; + + rv = apr_redis_delete(redis, key, 0); + ABTS_ASSERT(tc, "delete failed", rv == APR_SUCCESS); + } +} + +/* test setting and getting */ + +static void test_redis_setexget(abts_case * tc, void *data) +{ + apr_pool_t *pool = p; + apr_status_t rv; + apr_redis_t *redis; + apr_redis_server_t *server; + apr_hash_t *tdata; + apr_hash_index_t *hi; + char *result; + apr_size_t len; + + rv = apr_redis_create(pool, 1, 0, &redis); + ABTS_ASSERT(tc, "redis create failed", rv == APR_SUCCESS); + + rv = apr_redis_server_create(pool, HOST, PORT, 0, 1, 1, 60, 60, &server); + ABTS_ASSERT(tc, "server create failed", rv == APR_SUCCESS); + + rv = apr_redis_add_server(redis, server); + ABTS_ASSERT(tc, "server add failed", rv == APR_SUCCESS); + + tdata = apr_hash_make(pool); + + create_test_hash(pool, tdata); + + for (hi = apr_hash_first(p, tdata); hi; hi = apr_hash_next(hi)) { + const void *k; + void *v; + const char *key; + + apr_hash_this(hi, &k, NULL, &v); + key = k; + + rv = apr_redis_ping(server); + ABTS_ASSERT(tc, "ping failed", rv == APR_SUCCESS); + rv = apr_redis_setex(redis, key, v, strlen(v), 10, 27); + ABTS_ASSERT(tc, "set failed", rv == APR_SUCCESS); + rv = apr_redis_getp(redis, pool, key, &result, &len, NULL); + ABTS_ASSERT(tc, "get failed", rv == APR_SUCCESS); + } + + rv = apr_redis_getp(redis, pool, "nothere3423", &result, &len, NULL); + + ABTS_ASSERT(tc, "get should have failed", rv != APR_SUCCESS); + + for (hi = apr_hash_first(p, tdata); hi; hi = apr_hash_next(hi)) { + const void *k; + const char *key; + + apr_hash_this(hi, &k, NULL, NULL); + key = k; + + rv = apr_redis_delete(redis, key, 0); + ABTS_ASSERT(tc, "delete failed", rv == APR_SUCCESS); + } +} + +/* use apr_socket stuff to see if there is in fact a Redis server + * running on PORT. + */ +static apr_status_t check_redis(void) +{ + apr_pool_t *pool = p; + apr_status_t rv; + apr_socket_t *sock = NULL; + apr_sockaddr_t *sa; + struct iovec vec[2]; + apr_size_t written; + char buf[128]; + apr_size_t len; + + rv = apr_socket_create(&sock, APR_INET, SOCK_STREAM, 0, pool); + if(rv != APR_SUCCESS) { + return rv; + } + + rv = apr_sockaddr_info_get(&sa, HOST, APR_INET, PORT, 0, pool); + if(rv != APR_SUCCESS) { + return rv; + } + + rv = apr_socket_timeout_set(sock, 1 * APR_USEC_PER_SEC); + if (rv != APR_SUCCESS) { + return rv; + } + + rv = apr_socket_connect(sock, sa); + if (rv != APR_SUCCESS) { + return rv; + } + + rv = apr_socket_timeout_set(sock, -1); + if (rv != APR_SUCCESS) { + return rv; + } + + vec[0].iov_base = "PING"; + vec[0].iov_len = sizeof("PING") - 1; + + vec[1].iov_base = "\r\n"; + vec[1].iov_len = sizeof("\r\n") -1; + + rv = apr_socket_sendv(sock, vec, 2, &written); + if (rv != APR_SUCCESS) { + return rv; + } + + len = sizeof(buf); + rv = apr_socket_recv(sock, buf, &len); + if(rv != APR_SUCCESS) { + return rv; + } + if(strncmp(buf, "+PONG", sizeof("+PONG")-1) != 0) { + rv = APR_EGENERAL; + } + + apr_socket_close(sock); + return rv; +} + +abts_suite *testredis(abts_suite * suite) +{ + apr_status_t rv; + suite = ADD_SUITE(suite); + /* check for a running redis on the typical port before + * trying to run the tests. succeed if we don't find one. + */ + rv = check_redis(); + if (rv == APR_SUCCESS) { + abts_run_test(suite, test_redis_create, NULL); + abts_run_test(suite, test_redis_user_funcs, NULL); + abts_run_test(suite, test_redis_meta, NULL); + abts_run_test(suite, test_redis_setget, NULL); + abts_run_test(suite, test_redis_setexget, NULL); + /* abts_run_test(suite, test_redis_multiget, NULL); */ + abts_run_test(suite, test_redis_incrdecr, NULL); + } + else { + abts_log_message("Error %d occurred attempting to reach Redis " + "on %s:%d. Skipping apr_redis tests...", + rv, HOST, PORT); + } + + return suite; +} Index: contrib/apr-util/test/testsiphash.c =================================================================== --- /dev/null +++ contrib/apr-util/test/testsiphash.c @@ -0,0 +1,148 @@ +/* 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 +#include + +#include "apr_siphash.h" + +#include "abts.h" +#include "testutil.h" + +/* + * Wrapped test vectors from the authors, see + * https://131002.net/siphash/siphash24.c + */ +typedef unsigned char u8; +#define crypto_auth apr_siphash24_auth + +#define MAXLEN 64 + +/* + SipHash-2-4 output with + k = 00 01 02 ... + and + in = (empty string) + in = 00 (1 byte) + in = 00 01 (2 bytes) + in = 00 01 02 (3 bytes) + ... + in = 00 01 02 ... 3e (63 bytes) +*/ +static const u8 vectors[MAXLEN][8] = +{ + { 0x31, 0x0e, 0x0e, 0xdd, 0x47, 0xdb, 0x6f, 0x72, }, + { 0xfd, 0x67, 0xdc, 0x93, 0xc5, 0x39, 0xf8, 0x74, }, + { 0x5a, 0x4f, 0xa9, 0xd9, 0x09, 0x80, 0x6c, 0x0d, }, + { 0x2d, 0x7e, 0xfb, 0xd7, 0x96, 0x66, 0x67, 0x85, }, + { 0xb7, 0x87, 0x71, 0x27, 0xe0, 0x94, 0x27, 0xcf, }, + { 0x8d, 0xa6, 0x99, 0xcd, 0x64, 0x55, 0x76, 0x18, }, + { 0xce, 0xe3, 0xfe, 0x58, 0x6e, 0x46, 0xc9, 0xcb, }, + { 0x37, 0xd1, 0x01, 0x8b, 0xf5, 0x00, 0x02, 0xab, }, + { 0x62, 0x24, 0x93, 0x9a, 0x79, 0xf5, 0xf5, 0x93, }, + { 0xb0, 0xe4, 0xa9, 0x0b, 0xdf, 0x82, 0x00, 0x9e, }, + { 0xf3, 0xb9, 0xdd, 0x94, 0xc5, 0xbb, 0x5d, 0x7a, }, + { 0xa7, 0xad, 0x6b, 0x22, 0x46, 0x2f, 0xb3, 0xf4, }, + { 0xfb, 0xe5, 0x0e, 0x86, 0xbc, 0x8f, 0x1e, 0x75, }, + { 0x90, 0x3d, 0x84, 0xc0, 0x27, 0x56, 0xea, 0x14, }, + { 0xee, 0xf2, 0x7a, 0x8e, 0x90, 0xca, 0x23, 0xf7, }, + { 0xe5, 0x45, 0xbe, 0x49, 0x61, 0xca, 0x29, 0xa1, }, + { 0xdb, 0x9b, 0xc2, 0x57, 0x7f, 0xcc, 0x2a, 0x3f, }, + { 0x94, 0x47, 0xbe, 0x2c, 0xf5, 0xe9, 0x9a, 0x69, }, + { 0x9c, 0xd3, 0x8d, 0x96, 0xf0, 0xb3, 0xc1, 0x4b, }, + { 0xbd, 0x61, 0x79, 0xa7, 0x1d, 0xc9, 0x6d, 0xbb, }, + { 0x98, 0xee, 0xa2, 0x1a, 0xf2, 0x5c, 0xd6, 0xbe, }, + { 0xc7, 0x67, 0x3b, 0x2e, 0xb0, 0xcb, 0xf2, 0xd0, }, + { 0x88, 0x3e, 0xa3, 0xe3, 0x95, 0x67, 0x53, 0x93, }, + { 0xc8, 0xce, 0x5c, 0xcd, 0x8c, 0x03, 0x0c, 0xa8, }, + { 0x94, 0xaf, 0x49, 0xf6, 0xc6, 0x50, 0xad, 0xb8, }, + { 0xea, 0xb8, 0x85, 0x8a, 0xde, 0x92, 0xe1, 0xbc, }, + { 0xf3, 0x15, 0xbb, 0x5b, 0xb8, 0x35, 0xd8, 0x17, }, + { 0xad, 0xcf, 0x6b, 0x07, 0x63, 0x61, 0x2e, 0x2f, }, + { 0xa5, 0xc9, 0x1d, 0xa7, 0xac, 0xaa, 0x4d, 0xde, }, + { 0x71, 0x65, 0x95, 0x87, 0x66, 0x50, 0xa2, 0xa6, }, + { 0x28, 0xef, 0x49, 0x5c, 0x53, 0xa3, 0x87, 0xad, }, + { 0x42, 0xc3, 0x41, 0xd8, 0xfa, 0x92, 0xd8, 0x32, }, + { 0xce, 0x7c, 0xf2, 0x72, 0x2f, 0x51, 0x27, 0x71, }, + { 0xe3, 0x78, 0x59, 0xf9, 0x46, 0x23, 0xf3, 0xa7, }, + { 0x38, 0x12, 0x05, 0xbb, 0x1a, 0xb0, 0xe0, 0x12, }, + { 0xae, 0x97, 0xa1, 0x0f, 0xd4, 0x34, 0xe0, 0x15, }, + { 0xb4, 0xa3, 0x15, 0x08, 0xbe, 0xff, 0x4d, 0x31, }, + { 0x81, 0x39, 0x62, 0x29, 0xf0, 0x90, 0x79, 0x02, }, + { 0x4d, 0x0c, 0xf4, 0x9e, 0xe5, 0xd4, 0xdc, 0xca, }, + { 0x5c, 0x73, 0x33, 0x6a, 0x76, 0xd8, 0xbf, 0x9a, }, + { 0xd0, 0xa7, 0x04, 0x53, 0x6b, 0xa9, 0x3e, 0x0e, }, + { 0x92, 0x59, 0x58, 0xfc, 0xd6, 0x42, 0x0c, 0xad, }, + { 0xa9, 0x15, 0xc2, 0x9b, 0xc8, 0x06, 0x73, 0x18, }, + { 0x95, 0x2b, 0x79, 0xf3, 0xbc, 0x0a, 0xa6, 0xd4, }, + { 0xf2, 0x1d, 0xf2, 0xe4, 0x1d, 0x45, 0x35, 0xf9, }, + { 0x87, 0x57, 0x75, 0x19, 0x04, 0x8f, 0x53, 0xa9, }, + { 0x10, 0xa5, 0x6c, 0xf5, 0xdf, 0xcd, 0x9a, 0xdb, }, + { 0xeb, 0x75, 0x09, 0x5c, 0xcd, 0x98, 0x6c, 0xd0, }, + { 0x51, 0xa9, 0xcb, 0x9e, 0xcb, 0xa3, 0x12, 0xe6, }, + { 0x96, 0xaf, 0xad, 0xfc, 0x2c, 0xe6, 0x66, 0xc7, }, + { 0x72, 0xfe, 0x52, 0x97, 0x5a, 0x43, 0x64, 0xee, }, + { 0x5a, 0x16, 0x45, 0xb2, 0x76, 0xd5, 0x92, 0xa1, }, + { 0xb2, 0x74, 0xcb, 0x8e, 0xbf, 0x87, 0x87, 0x0a, }, + { 0x6f, 0x9b, 0xb4, 0x20, 0x3d, 0xe7, 0xb3, 0x81, }, + { 0xea, 0xec, 0xb2, 0xa3, 0x0b, 0x22, 0xa8, 0x7f, }, + { 0x99, 0x24, 0xa4, 0x3c, 0xc1, 0x31, 0x57, 0x24, }, + { 0xbd, 0x83, 0x8d, 0x3a, 0xaf, 0xbf, 0x8d, 0xb7, }, + { 0x0b, 0x1a, 0x2a, 0x32, 0x65, 0xd5, 0x1a, 0xea, }, + { 0x13, 0x50, 0x79, 0xa3, 0x23, 0x1c, 0xe6, 0x60, }, + { 0x93, 0x2b, 0x28, 0x46, 0xe4, 0xd7, 0x06, 0x66, }, + { 0xe1, 0x91, 0x5f, 0x5c, 0xb1, 0xec, 0xa4, 0x6c, }, + { 0xf3, 0x25, 0x96, 0x5c, 0xa1, 0x6d, 0x62, 0x9f, }, + { 0x57, 0x5f, 0xf2, 0x8e, 0x60, 0x38, 0x1b, 0xe5, }, + { 0x72, 0x45, 0x06, 0xeb, 0x4c, 0x32, 0x8a, 0x95, } +}; + +static int test_vectors(void) +{ + u8 in[MAXLEN], out[8], k[16]; + int i; + int ok = 1; + + for( i = 0; i < 16; ++i ) k[i] = i; + + for( i = 0; i < MAXLEN; ++i ) + { + in[i] = i; + crypto_auth( out, in, i, k ); + + if ( memcmp( out, vectors[i], 8 ) ) + { + printf( "test vector failed for %d bytes\n", i ); + ok = 0; + } + } + + return ok; +} + +static void test_siphash_vectors(abts_case *tc, void *data) +{ + ABTS_ASSERT(tc, "SipHash-2-4 test vectors", test_vectors()); +} + +abts_suite *testsiphash(abts_suite *suite) +{ + suite = ADD_SUITE(suite); + + abts_run_test(suite, test_siphash_vectors, NULL); + + return suite; +} Index: contrib/apr-util/test/testutil.h =================================================================== --- contrib/apr-util/test/testutil.h +++ contrib/apr-util/test/testutil.h @@ -61,11 +61,13 @@ abts_suite *testdbd(abts_suite *suite); abts_suite *testdate(abts_suite *suite); abts_suite *testmemcache(abts_suite *suite); +abts_suite *testredis(abts_suite *suite); abts_suite *testreslist(abts_suite *suite); abts_suite *testqueue(abts_suite *suite); abts_suite *testxml(abts_suite *suite); abts_suite *testxlate(abts_suite *suite); abts_suite *testrmm(abts_suite *suite); abts_suite *testdbm(abts_suite *suite); +abts_suite *testsiphash(abts_suite *suite); #endif /* APR_TEST_INCLUDES */ Index: contrib/apr-util/test/testutildll.dsp =================================================================== --- /dev/null +++ contrib/apr-util/test/testutildll.dsp @@ -0,0 +1,270 @@ +# Microsoft Developer Studio Project File - Name="testutildll" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) External Target" 0x0106 + +CFG=testutildll - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "testutildll.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "testutildll.mak" CFG="testutildll - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "testutildll - Win32 Release" (based on "Win32 (x86) External Target") +!MESSAGE "testutildll - Win32 Debug" (based on "Win32 (x86) External Target") +!MESSAGE "testutildll - Win32 Release9x" (based on "Win32 (x86) External Target") +!MESSAGE "testutildll - Win32 Debug9x" (based on "Win32 (x86) External Target") +!MESSAGE "testutildll - x64 Release" (based on "Win32 (x86) External Target") +!MESSAGE "testutildll - x64 Debug" (based on "Win32 (x86) External Target") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" + +!IF "$(CFG)" == "testutildll - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "" +# PROP BASE Intermediate_Dir "" +# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=Release OUTDIR=Release MODEL=dynamic all check" +# PROP BASE Rebuild_Opt "/a" +# PROP BASE Target_File "Release\testall.exe" +# PROP BASE Bsc_Name "" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "" +# PROP Intermediate_Dir "" +# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=Release OUTDIR=Release MODEL=dynamic all check" +# PROP Rebuild_Opt "/a" +# PROP Target_File "Release\testall.exe" +# PROP Bsc_Name "" +# PROP Target_Dir "" + +!ELSEIF "$(CFG)" == "testutildll - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "" +# PROP BASE Intermediate_Dir "" +# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=Debug OUTDIR=Debug MODEL=dynamic _DEBUG=1 all check" +# PROP BASE Rebuild_Opt "/a" +# PROP BASE Target_File "Debug\testall.exe" +# PROP BASE Bsc_Name "" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "" +# PROP Intermediate_Dir "" +# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=Debug OUTDIR=Debug MODEL=dynamic _DEBUG=1 all check" +# PROP Rebuild_Opt "/a" +# PROP Target_File "Debug\testall.exe" +# PROP Bsc_Name "" +# PROP Target_Dir "" + +!ELSEIF "$(CFG)" == "testutildll - Win32 Release9x" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "" +# PROP BASE Intermediate_Dir "" +# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=9x\Release OUTDIR=9x\Release MODEL=dynamic all check" +# PROP BASE Rebuild_Opt "/a" +# PROP BASE Target_File "9x\Release\testall.exe" +# PROP BASE Bsc_Name "" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "" +# PROP Intermediate_Dir "" +# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=9x\Release OUTDIR=9x\Release MODEL=dynamic all check" +# PROP Rebuild_Opt "/a" +# PROP Target_File "9x\Release\testall.exe" +# PROP Bsc_Name "" +# PROP Target_Dir "" + +!ELSEIF "$(CFG)" == "testutildll - Win32 Debug9x" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "" +# PROP BASE Intermediate_Dir "" +# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=9x\Debug OUTDIR=9x\Debug MODEL=dynamic _DEBUG=1 all check" +# PROP BASE Rebuild_Opt "/a" +# PROP BASE Target_File "9x\Debug\testall.exe" +# PROP BASE Bsc_Name "" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "" +# PROP Intermediate_Dir "" +# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=9x\Debug OUTDIR=9x\Debug MODEL=dynamic _DEBUG=1 all check" +# PROP Rebuild_Opt "/a" +# PROP Target_File "9x\Debug\testall.exe" +# PROP Bsc_Name "" +# PROP Target_Dir "" + +!ELSEIF "$(CFG)" == "testutildll - x64 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "" +# PROP BASE Intermediate_Dir "" +# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=x64\Release OUTDIR=x64\Release MODEL=dynamic all check" +# PROP BASE Rebuild_Opt "/a" +# PROP BASE Target_File "x64\Release\testall.exe" +# PROP BASE Bsc_Name "" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "" +# PROP Intermediate_Dir "" +# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=x64\Release OUTDIR=x64\Release MODEL=dynamic all check" +# PROP Rebuild_Opt "/a" +# PROP Target_File "x64\Release\testall.exe" +# PROP Bsc_Name "" +# PROP Target_Dir "" + +!ELSEIF "$(CFG)" == "testutildll - x64 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "" +# PROP BASE Intermediate_Dir "" +# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=x64\Debug OUTDIR=x64\Debug MODEL=dynamic _DEBUG=1 all check" +# PROP BASE Rebuild_Opt "/a" +# PROP BASE Target_File "x64\Debug\testall.exe" +# PROP BASE Bsc_Name "" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "" +# PROP Intermediate_Dir "" +# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=x64\Debug OUTDIR=x64\Debug MODEL=dynamic _DEBUG=1 all check" +# PROP Rebuild_Opt "/a" +# PROP Target_File "x64\Debug\testall.exe" +# PROP Bsc_Name "" +# PROP Target_Dir "" + +!ENDIF + +# Begin Target + +# Name "testutildll - Win32 Release" +# Name "testutildll - Win32 Debug" +# Name "testutildll - Win32 Release9x" +# Name "testutildll - Win32 Debug9x" +# Name "testutildll - x64 Release" +# Name "testutildll - x64 Debug" +# Begin Group "testall Source Files" + +# PROP Default_Filter ".c" +# Begin Source File + +SOURCE=.\abts.c +# End Source File +# Begin Source File + +SOURCE=.\abts.h +# End Source File +# Begin Source File + +SOURCE=.\abts_tests.h +# End Source File +# Begin Source File + +SOURCE=.\testbuckets.c +# End Source File +# Begin Source File + +SOURCE=.\testdate.c +# End Source File +# Begin Source File + +SOURCE=.\testdbd.c +# End Source File +# Begin Source File + +SOURCE=.\testdbm.c +# End Source File +# Begin Source File + +SOURCE=.\testldap.c +# End Source File +# Begin Source File + +SOURCE=.\testmd4.c +# End Source File +# Begin Source File + +SOURCE=.\testmd5.c +# End Source File +# Begin Source File + +SOURCE=.\testmemcache.c +# End Source File +# Begin Source File + +SOURCE=.\testpass.c +# End Source File +# Begin Source File + +SOURCE=.\testqueue.c +# End Source File +# Begin Source File + +SOURCE=.\testreslist.c +# End Source File +# Begin Source File + +SOURCE=.\testrmm.c +# End Source File +# Begin Source File + +SOURCE=.\teststrmatch.c +# End Source File +# Begin Source File + +SOURCE=.\testuri.c +# End Source File +# Begin Source File + +SOURCE=.\testutil.c +# End Source File +# Begin Source File + +SOURCE=.\testuuid.c +# End Source File +# Begin Source File + +SOURCE=.\testxlate.c +# End Source File +# Begin Source File + +SOURCE=.\testxml.c +# End Source File +# End Group +# Begin Group "Other Source Files" + +# PROP Default_Filter ".c" +# Begin Source File + +SOURCE=.\dbd.c +# End Source File +# End Group +# Begin Source File + +SOURCE=.\Makefile.win +# End Source File +# End Target +# End Project Index: contrib/apr-util/test/testutillib.dsp =================================================================== --- /dev/null +++ contrib/apr-util/test/testutillib.dsp @@ -0,0 +1,270 @@ +# Microsoft Developer Studio Project File - Name="testutillib" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) External Target" 0x0106 + +CFG=testutillib - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "testutillib.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "testutillib.mak" CFG="testutillib - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "testutillib - Win32 Release" (based on "Win32 (x86) External Target") +!MESSAGE "testutillib - Win32 Debug" (based on "Win32 (x86) External Target") +!MESSAGE "testutillib - Win32 Release9x" (based on "Win32 (x86) External Target") +!MESSAGE "testutillib - Win32 Debug9x" (based on "Win32 (x86) External Target") +!MESSAGE "testutillib - x64 Release" (based on "Win32 (x86) External Target") +!MESSAGE "testutillib - x64 Debug" (based on "Win32 (x86) External Target") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" + +!IF "$(CFG)" == "testutillib - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "" +# PROP BASE Intermediate_Dir "" +# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=LibR OUTDIR=LibR MODEL=static all check" +# PROP BASE Rebuild_Opt "/a" +# PROP BASE Target_File "LibR\testall.exe" +# PROP BASE Bsc_Name "" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "" +# PROP Intermediate_Dir "" +# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=LibR OUTDIR=LibR MODEL=static all check" +# PROP Rebuild_Opt "/a" +# PROP Target_File "LibR\testall.exe" +# PROP Bsc_Name "" +# PROP Target_Dir "" + +!ELSEIF "$(CFG)" == "testutillib - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "" +# PROP BASE Intermediate_Dir "" +# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=LibD OUTDIR=LibD MODEL=static _DEBUG=1 all check" +# PROP BASE Rebuild_Opt "/a" +# PROP BASE Target_File "LibD\testall.exe" +# PROP BASE Bsc_Name "" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "" +# PROP Intermediate_Dir "" +# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=LibD OUTDIR=LibD MODEL=static _DEBUG=1 all check" +# PROP Rebuild_Opt "/a" +# PROP Target_File "LibD\testall.exe" +# PROP Bsc_Name "" +# PROP Target_Dir "" + +!ELSEIF "$(CFG)" == "testutillib - Win32 Release9x" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "" +# PROP BASE Intermediate_Dir "" +# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=9x\LibR OUTDIR=9x\LibR MODEL=static all check" +# PROP BASE Rebuild_Opt "/a" +# PROP BASE Target_File "9x\LibR\testall.exe" +# PROP BASE Bsc_Name "" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "" +# PROP Intermediate_Dir "" +# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=9x\LibR OUTDIR=9x\LibR MODEL=static all check" +# PROP Rebuild_Opt "/a" +# PROP Target_File "9x\LibR\testall.exe" +# PROP Bsc_Name "" +# PROP Target_Dir "" + +!ELSEIF "$(CFG)" == "testutillib - Win32 Debug9x" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "" +# PROP BASE Intermediate_Dir "" +# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=9x\LibD OUTDIR=9x\LibD MODEL=static _DEBUG=1 all check" +# PROP BASE Rebuild_Opt "/a" +# PROP BASE Target_File "9x\LibD\testall.exe" +# PROP BASE Bsc_Name "" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "" +# PROP Intermediate_Dir "" +# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=9x\LibD OUTDIR=9x\LibD MODEL=static _DEBUG=1 all check" +# PROP Rebuild_Opt "/a" +# PROP Target_File "9x\LibD\testall.exe" +# PROP Bsc_Name "" +# PROP Target_Dir "" + +!ELSEIF "$(CFG)" == "testutillib - x64 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "" +# PROP BASE Intermediate_Dir "" +# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=x64\LibR OUTDIR=x64\LibR MODEL=static all check" +# PROP BASE Rebuild_Opt "/a" +# PROP BASE Target_File "x64\LibR\testall.exe" +# PROP BASE Bsc_Name "" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "" +# PROP Intermediate_Dir "" +# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=x64\LibR OUTDIR=x64\LibR MODEL=static all check" +# PROP Rebuild_Opt "/a" +# PROP Target_File "x64\LibR\testall.exe" +# PROP Bsc_Name "" +# PROP Target_Dir "" + +!ELSEIF "$(CFG)" == "testutillib - x64 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "" +# PROP BASE Intermediate_Dir "" +# PROP BASE Cmd_Line "NMAKE /f Makefile.win INTDIR=x64\LibD OUTDIR=x64\LibD MODEL=static _DEBUG=1 all check" +# PROP BASE Rebuild_Opt "/a" +# PROP BASE Target_File "x64\LibD\testall.exe" +# PROP BASE Bsc_Name "" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "" +# PROP Intermediate_Dir "" +# PROP Cmd_Line "NMAKE /f Makefile.win INTDIR=x64\LibD OUTDIR=x64\LibD MODEL=static _DEBUG=1 all check" +# PROP Rebuild_Opt "/a" +# PROP Target_File "x64\LibD\testall.exe" +# PROP Bsc_Name "" +# PROP Target_Dir "" + +!ENDIF + +# Begin Target + +# Name "testutillib - Win32 Release" +# Name "testutillib - Win32 Debug" +# Name "testutillib - Win32 Release9x" +# Name "testutillib - Win32 Debug9x" +# Name "testutillib - x64 Release" +# Name "testutillib - x64 Debug" +# Begin Group "testall Source Files" + +# PROP Default_Filter ".c" +# Begin Source File + +SOURCE=.\abts.c +# End Source File +# Begin Source File + +SOURCE=.\abts.h +# End Source File +# Begin Source File + +SOURCE=.\abts_tests.h +# End Source File +# Begin Source File + +SOURCE=.\testbuckets.c +# End Source File +# Begin Source File + +SOURCE=.\testdate.c +# End Source File +# Begin Source File + +SOURCE=.\testdbd.c +# End Source File +# Begin Source File + +SOURCE=.\testdbm.c +# End Source File +# Begin Source File + +SOURCE=.\testldap.c +# End Source File +# Begin Source File + +SOURCE=.\testmd4.c +# End Source File +# Begin Source File + +SOURCE=.\testmd5.c +# End Source File +# Begin Source File + +SOURCE=.\testmemcache.c +# End Source File +# Begin Source File + +SOURCE=.\testpass.c +# End Source File +# Begin Source File + +SOURCE=.\testqueue.c +# End Source File +# Begin Source File + +SOURCE=.\testreslist.c +# End Source File +# Begin Source File + +SOURCE=.\testrmm.c +# End Source File +# Begin Source File + +SOURCE=.\teststrmatch.c +# End Source File +# Begin Source File + +SOURCE=.\testuri.c +# End Source File +# Begin Source File + +SOURCE=.\testutil.c +# End Source File +# Begin Source File + +SOURCE=.\testuuid.c +# End Source File +# Begin Source File + +SOURCE=.\testxlate.c +# End Source File +# Begin Source File + +SOURCE=.\testxml.c +# End Source File +# End Group +# Begin Group "Other Source Files" + +# PROP Default_Filter ".c" +# Begin Source File + +SOURCE=.\dbd.c +# End Source File +# End Group +# Begin Source File + +SOURCE=.\Makefile.win +# End Source File +# End Target +# End Project Index: contrib/apr-util/xml/apr_xml.c =================================================================== --- contrib/apr-util/xml/apr_xml.c +++ contrib/apr-util/xml/apr_xml.c @@ -86,7 +86,7 @@ ** prefix. */ for (; elem; elem = elem->parent) { - apr_xml_ns_scope *ns_scope = elem->ns_scope; + apr_xml_ns_scope *ns_scope; for (ns_scope = elem->ns_scope; ns_scope; ns_scope = ns_scope->next) { if (strcmp(prefix, ns_scope->prefix) == 0) { @@ -120,6 +120,26 @@ return APR_XML_NS_ERROR_UNKNOWN_PREFIX; } +/* return original prefix given ns index */ +static const char * find_prefix_name(const apr_xml_elem *elem, int ns, int parent) +{ + /* + ** Walk up the tree, looking for a namespace scope that defines this + ** prefix. + */ + for (; elem; elem = parent ? elem->parent : NULL) { + apr_xml_ns_scope *ns_scope = elem->ns_scope; + + for (; ns_scope; ns_scope = ns_scope->next) { + if (ns_scope->ns == ns) + return ns_scope->prefix; + } + } + /* not found */ + return ""; +} + + static void start_handler(void *userdata, const char *name, const char **attrs) { apr_xml_parser *parser = userdata; @@ -646,7 +666,8 @@ { apr_size_t size; - if (style == APR_XML_X2T_FULL || style == APR_XML_X2T_FULL_NS_LANG) { + if (style == APR_XML_X2T_FULL || style == APR_XML_X2T_FULL_NS_LANG || + style == APR_XML_X2T_PARSED) { const apr_xml_attr *attr; size = 0; @@ -670,11 +691,29 @@ size += 11 + strlen(elem->lang) + 1; } } + else if (style == APR_XML_X2T_PARSED) { + apr_xml_ns_scope *ns_scope = elem->ns_scope; + + /* compute size of: ' xmlns:%s="%s"' */ + for (; ns_scope; ns_scope = ns_scope->next) { + size += 10 + strlen(find_prefix_name(elem, ns_scope->ns, 0)) + + strlen(APR_XML_GET_URI_ITEM(namespaces, ns_scope->ns)); + } + + if (elem->lang != NULL) { + /* compute size of: ' xml:lang="%s"' */ + size += 11 + strlen(elem->lang) + 1; + } + } if (elem->ns == APR_XML_NS_NONE) { /* compute size of: <%s> */ size += 1 + strlen(elem->name) + 1; } + else if (style == APR_XML_X2T_PARSED) { + /* compute size of: <%s:%s> */ + size += 3 + strlen(find_prefix_name(elem, elem->ns, 1)) + strlen(elem->name); + } else { int ns = ns_map ? ns_map[elem->ns] : elem->ns; @@ -700,6 +739,10 @@ /* compute size of: ' %s="%s"' */ size += 1 + strlen(attr->name) + 2 + strlen(attr->value) + 1; } + else if (style == APR_XML_X2T_PARSED) { + /* compute size of: ' %s:%s="%s"' */ + size += 5 + strlen(find_prefix_name(elem, attr->ns, 1)) + strlen(attr->name) + strlen(attr->value); + } else { /* compute size of: ' ns%d:%s="%s"' */ int ns = ns_map ? ns_map[attr->ns] : attr->ns; @@ -733,7 +776,7 @@ for (elem = elem->first_child; elem; elem = elem->next) { /* the size of the child element plus the CDATA that follows it */ - size += (elem_size(elem, APR_XML_X2T_FULL, NULL, ns_map) + + size += (elem_size(elem, style == APR_XML_X2T_PARSED ? APR_XML_X2T_PARSED : APR_XML_X2T_FULL, NULL, ns_map) + text_size(elem->following_cdata.first)); } @@ -757,13 +800,15 @@ apr_size_t len; int ns; - if (style == APR_XML_X2T_FULL || style == APR_XML_X2T_FULL_NS_LANG) { + if (style == APR_XML_X2T_FULL || style == APR_XML_X2T_FULL_NS_LANG || + style == APR_XML_X2T_PARSED) { int empty = APR_XML_ELEM_IS_EMPTY(elem); const apr_xml_attr *attr; - if (elem->ns == APR_XML_NS_NONE) { + if (elem->ns == APR_XML_NS_NONE) len = sprintf(s, "<%s", elem->name); - } + else if (style == APR_XML_X2T_PARSED) + len = sprintf(s, "<%s:%s", find_prefix_name(elem, elem->ns, 1), elem->name); else { ns = ns_map ? ns_map[elem->ns] : elem->ns; len = sprintf(s, "name); @@ -773,10 +818,13 @@ for (attr = elem->attr; attr; attr = attr->next) { if (attr->ns == APR_XML_NS_NONE) len = sprintf(s, " %s=\"%s\"", attr->name, attr->value); - else { - ns = ns_map ? ns_map[attr->ns] : attr->ns; - len = sprintf(s, " ns%d:%s=\"%s\"", ns, attr->name, attr->value); - } + else if (style == APR_XML_X2T_PARSED) + len = sprintf(s, " %s:%s=\"%s\"", + find_prefix_name(elem, attr->ns, 1), attr->name, attr->value); + else { + ns = ns_map ? ns_map[attr->ns] : attr->ns; + len = sprintf(s, " ns%d:%s=\"%s\"", ns, attr->name, attr->value); + } s += len; } @@ -799,6 +847,18 @@ s += len; } } + else if (style == APR_XML_X2T_PARSED) { + apr_xml_ns_scope *ns_scope = elem->ns_scope; + + for (; ns_scope; ns_scope = ns_scope->next) { + const char *prefix = find_prefix_name(elem, ns_scope->ns, 0); + + len = sprintf(s, " xmlns%s%s=\"%s\"", + *prefix ? ":" : "", *prefix ? prefix : "", + APR_XML_GET_URI_ITEM(namespaces, ns_scope->ns)); + s += len; + } + } /* no more to do. close it up and go. */ if (empty) { @@ -823,14 +883,17 @@ s = write_text(s, elem->first_cdata.first); for (child = elem->first_child; child; child = child->next) { - s = write_elem(s, child, APR_XML_X2T_FULL, NULL, ns_map); + s = write_elem(s, child, + style == APR_XML_X2T_PARSED ? APR_XML_X2T_PARSED : APR_XML_X2T_FULL, + NULL, ns_map); s = write_text(s, child->following_cdata.first); } - if (style == APR_XML_X2T_FULL || style == APR_XML_X2T_FULL_NS_LANG) { - if (elem->ns == APR_XML_NS_NONE) { + if (style == APR_XML_X2T_FULL || style == APR_XML_X2T_FULL_NS_LANG || style == APR_XML_X2T_PARSED) { + if (elem->ns == APR_XML_NS_NONE) len = sprintf(s, "", elem->name); - } + else if (style == APR_XML_X2T_PARSED) + len = sprintf(s, "", find_prefix_name(elem, elem->ns, 1), elem->name); else { ns = ns_map ? ns_map[elem->ns] : elem->ns; len = sprintf(s, "", ns, elem->name); Index: contrib/apr/CHANGES =================================================================== --- contrib/apr/CHANGES +++ contrib/apr/CHANGES @@ -1,179 +1,61 @@ -*- coding: utf-8 -*- -Changes for APR 1.5.2 +Changes for APR 1.7.0 - *) SECURITY: CVE-2015-1829 (cve.mitre.org) - APR applications using APR named pipe support on Windows can be - vulnerable to a pipe squatting attack from a local process; the extent - of the vulnerability, when present, depends on the application. - Initial analysis and report was provided by John Hernandez of Casaba - Security via HP SSRT Security Alert. [Yann Ylavic] + *) apr_dir_read: [Unix] Dropped the preference of the dirread_r() flavor + for dirread(), because the former is both deprecated and unneeded. + [Yann Ylavic, William Rowe] - *) apr_atomic: Fix errors when building on Visual Studio 2013 while - maintaining the ability to build on Visual Studio 6 with Windows - Server 2003 R2 SDK. PR 57191. [Gregg Smith] + *) apr_file_info: [Win32 only] Treat only "name surrogate" reparse points + as symlinks, and not other reparse tag types. PR47630 + [Oleg Liatte ] - *) Switch to generic atomics for early/unpatched Solaris 10 not exporting - some atomic functions. PR 55418. [Yann Ylavic] + *) Test %ld vs. %lld to avoid compiler emits using APR_OFF_T_FMT, in the + case of apparently equivilant long and long long types. [William Rowe] - *) apr_file_mktemp() on HP-UX: Remove limitation of 26 temporary files - per process. PR 57677. [Jeff Trawick] + *) Recognize APPLE predefined macros as equivilant to DARWIN. [Jim Jagielski] - *) apr_escape: Correctly calculate the size of the returned string in - apr_escape_path and set the correct return value in case we actually - escape the string. [] PR 57230. + *) Signals: Allow handling of SIGUSR2 in apr_signal_thread. [Yann Ylavic] - *) pollcb on Windows: Handle calls with no file/socket descriptors. - Follow up to PR 49882. [Jeff Trawick, Yann Ylavic] + *) Atomics: Support for 64bit ints. [Jim Jagielski] - *) apr_poll(cb): fix error paths returned values and leaks. [Yann Ylavic] + *) Add the apr_encode_* API that implements RFC4648 and RFC7515 + compliant BASE64, BASE64URL, BASE32, BASE32HEX and BASE16 + encode/decode functions. [Graham Leggett] - *) apr_thread_cond_*wait() on BeOS: Fix broken logic. PR 45800. - [Jochen Voss (no e-mail)] + *) rand: Use arc4random_buf() on BSD platforms and getrandom() on Linux, + when available. [Christian Weisgerber ] + *) apr_sockaddr_ip_getbuf, apr_sockaddr_ip_get: Append "%zone" for + IPv6 link-local addresses. [Joe Orton] - *) On z/OS, apr_sockaddr_info_get() with family == APR_UNSPEC was not - returning IPv4 addresses if any IPv6 addresses were returned. - [Eric Covener] + *) Locks: add a --disable-timedlocks config option in case users + encounter more platforms where it fails [Nick Kew]. - *) Windows cmake build: Fix an incompatibility with cmake 2.8.12 and - later. [Jeff Trawick] + *) apr_allocator, apr_pools: Add apr_allocator_page_size() and + apr_allocator_min_order_set() to respectively get the (system's) page size + in use and set the minimum allocation size for an allocator (expressed in + 2^order pages). [Yann Ylavic] - *) apr_global_mutex/apr_proc_mutex: Resolve failures with the - POSIX sem implementation in environments which receive signals. - [Jeff Trawick] + *) locks: provide portable implementations of timedlock()s for + posix-sems, sysv-sems and pthreads for those platforms that + lack native versions (eg: OSX/macOS). [Jim Jagielski] - *) apr_skiplist: Fix potential corruption of skiplists leading to - results or crashes. [Takashi Sato , Eric Covener] - PR 56654. + *) locks: Introduce apr_{thread,proc,global}_mutex_timedlock(). + [Yann Ylavic] - *) Improve platform detection by updating config.guess and config.sub. - [Rainer Jung] +Changes for APR 1.6.x and later: -Changes for APR 1.5.1 + *) http://svn.apache.org/viewvc/apr/apr/branches/1.6.x/CHANGES?view=markup - *) apr_os_proc_mutex_get() on Unix: Avoid segfault for cross- - process pthread mutexes. [Yann Ylavic ] +Changes for APR 1.5.x and later: - *) When using shmget-based shared memory, the ID used for ftok is - now an APR hash of the filename instead of the constant '1'. - We do this to help avoid collisions. PR 53996 [Jim Jagielski] - - *) apr_socket_atreadeof(): Fix breakage on OS X. [Jim Jagielski] - - *) Fix POSIX shared memory (shm_open) use for named shared memory. - Includes adding '--enable-posix-shm' to force POSIX shm if - available, and OS X compatibility. PR 55928. - [Jozef Hatala , Jim Jagielski] - - *) Fix race condition when calling apr_dir_make_recursive from - multiple threads on Windows. - [Bert Huijben] - - *) Fix apr_escape.c compilation errors on EBCDIC platforms. - [Eric Covener] - - *) FreeBSD 10: Correct a regression in 1.5.0 which affected non- - blocking sockets in some applications, including httpd. [Jeff - Trawick] - - *) Windows cmake build: Fix incorrect installation of some .pdb - files. Fix incorrect use of some logic intended for Windows 9x, - including legacy filesystem interfaces and dynamic loading of - some Windows APIs. [Jeff Trawick] - - *) apr_skiplist: Add compatibility with C++ applications. - [Jeff Trawick] - - *) Correct a regression in 1.5.0 which affected out-of-tree - builds on Unix. [Rainer Jung] - - *) Improve platform detection by updating config.guess and config.sub. - [Rainer Jung] - -Changes for APR 1.5.0 - - *) Fix Linux kernel version check to recognize more versions, - including versions 3.10 and later. PR 55690. [Joe Orton, - Arfrever Frehtes Taifersar Arahesis ] - - *) Add apr_sockaddr_is_wildcard() to check if a socket address - refers to the wildcard address for the protocol family (e.g., - 0.0.0.0/INADDR_ANY for IPv4). [Jeff Trawick] - - *) apr_file_dup2() on Windows: Fix debug RTL assertion when - attempting to _commit(stdout) or _commit(stderr). [Mike Rumph - ] - - *) apr_socket_connect() on Windows: Handle WSAEISCONN. PR 48736. - [, 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 - ] - - *) 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 - ] - - *) Files and pipes on Windows: Don't create an unused pollset when - files and pipes are opened. [Mladen Turk] - - *) apr_socket_timeout_set() on Windows: If the socket was in a non- - blocking state before, disable that setting so that timeouts work. - [Jeff Trawick] - - *) File info APIs: Fix calculation of atime and mtime on AIX. PR 51146. - [Ruediger Pluem] - - *) Add the apr_escape interface. [Graham Leggett] - - *) Cygwin build fixes. PRs 51016 and 55586. [Carlo Bramini - ] - - *) Add apr_skiplist family. [Jim Jagielski] - - *) Add experimental cmake-based build system for Windows. Refer to - README.cmake for more information. [Jeff Trawick, Tom Donovan] - - *) Add the apr_table_getm() call, which transparently handles the - merging of keys with multiple values. [Graham Leggett] - - *) Add apr_hash_this_key(), apr_hash_this_key_len(), and - apr_hash_this_val() for easier access to those attributes from - a hash iterator. [Hyrum K. Wright ] - - *) MinGW/MSYS: Support shared builds of APR, other general improvements - to support of this toolchain. PR 46175. [Carlo Bramini - ] - - *) Improve platform detection by updating config.guess and config.sub. - [Rainer Jung] - - *) apr_socket_opt_set: Add support for APR_SO_BROADCAST. PR 46389. - [Armin Müller ] - - *) 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: Index: contrib/apr/CMakeLists.txt =================================================================== --- contrib/apr/CMakeLists.txt +++ contrib/apr/CMakeLists.txt @@ -87,6 +87,7 @@ 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 @@ 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 @@ 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 Index: contrib/apr/Makefile.in =================================================================== --- contrib/apr/Makefile.in +++ contrib/apr/Makefile.in @@ -63,6 +63,8 @@ bindir=@bindir@ libdir=@libdir@ includedir=@includedir@ +datarootdir=@datarootdir@ +datadir=@datadir@ installbuilddir=@installbuilddir@ # Create apr-config script suitable for the install tree Index: contrib/apr/Makefile.win =================================================================== --- contrib/apr/Makefile.win +++ contrib/apr/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 @@ 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 Index: contrib/apr/NOTICE =================================================================== --- contrib/apr/NOTICE +++ contrib/apr/NOTICE @@ -1,5 +1,5 @@ Apache Portable Runtime -Copyright (c) 2000-2015 The Apache Software Foundation. +Copyright (c) 2000-2019 The Apache Software Foundation. This product includes software developed at The Apache Software Foundation (http://www.apache.org/). Index: contrib/apr/NWGNUmakefile =================================================================== --- contrib/apr/NWGNUmakefile +++ contrib/apr/NWGNUmakefile @@ -362,6 +362,7 @@ $(OBJDIR)/userinfo.o \ $(OBJDIR)/version.o \ $(OBJDIR)/waitio.o \ + $(OBJDIR)/wakeup.o \ $(EOLIST) Index: contrib/apr/apr.dsp =================================================================== --- contrib/apr/apr.dsp +++ contrib/apr/apr.dsp @@ -19,8 +19,6 @@ !MESSAGE !MESSAGE "apr - Win32 Release" (based on "Win32 (x86) Static Library") !MESSAGE "apr - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "apr - Win32 Release9x" (based on "Win32 (x86) Static Library") -!MESSAGE "apr - Win32 Debug9x" (based on "Win32 (x86) Static Library") !MESSAGE "apr - x64 Release" (based on "Win32 (x86) Static Library") !MESSAGE "apr - x64 Debug" (based on "Win32 (x86) Static Library") !MESSAGE @@ -45,7 +43,7 @@ # PROP Intermediate_Dir "LibR" # PROP Target_Dir "" # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c -# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\apr-1" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /I "./include/private" /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\apr-1" /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe @@ -69,7 +67,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\apr-1" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /I "./include/private" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\apr-1" /FD /EHsc /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe @@ -79,53 +77,6 @@ # ADD BASE LIB32 /nologo # ADD LIB32 /nologo /out:"LibD\apr-1.lib" -!ELSEIF "$(CFG)" == "apr - Win32 Release9x" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "9x\LibR" -# PROP BASE Intermediate_Dir "9x\LibR" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "9x\LibR" -# PROP Intermediate_Dir "9x\LibR" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c -# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\apr-1" /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"9x\LibR\apr-1.lib" - -!ELSEIF "$(CFG)" == "apr - Win32 Debug9x" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "9x\LibD" -# PROP BASE Intermediate_Dir "9x\LibD" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "9x\LibD" -# PROP Intermediate_Dir "9x\LibD" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\apr-1" /FD /EHsc /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"9x\LibD\apr-1.lib" - !ELSEIF "$(CFG)" == "apr - x64 Release" # PROP BASE Use_MFC 0 @@ -139,7 +90,7 @@ # PROP Intermediate_Dir "x64\LibR" # PROP Target_Dir "" # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c -# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\apr-1" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /I "./include/private" /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\apr-1" /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe @@ -163,7 +114,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\apr-1" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /I "./include/private" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\apr-1" /FD /EHsc /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe @@ -179,8 +130,6 @@ # Name "apr - Win32 Release" # Name "apr - Win32 Debug" -# Name "apr - Win32 Release9x" -# Name "apr - Win32 Debug9x" # Name "apr - x64 Release" # Name "apr - x64 Debug" # Begin Group "Source Files" @@ -193,6 +142,10 @@ SOURCE=.\atomic\win32\apr_atomic.c # End Source File +# Begin Source File + +SOURCE=.\atomic\win32\apr_atomic64.c +# End Source File # End Group # Begin Group "dso" @@ -207,6 +160,11 @@ # PROP Default_Filter "" # Begin Source File +SOURCE=.\encoding\apr_encode.c + +# End Source File +# Begin Source File + SOURCE=.\encoding\apr_escape.c # End Source File @@ -439,6 +397,10 @@ SOURCE=.\poll\unix\select.c # End Source File +# Begin Source File + +SOURCE=.\poll\unix\wakeup.c +# End Source File # End Group # Begin Group "random" @@ -473,6 +435,10 @@ # End Source File # Begin Source File +SOURCE=.\strings\apr_cstr.c +# End Source File +# Begin Source File + SOURCE=.\strings\apr_fnmatch.c # End Source File # Begin Source File @@ -642,26 +608,6 @@ # End Custom Build -!ELSEIF "$(CFG)" == "apr - Win32 Release9x" - -# Begin Custom Build - Creating apr.h from apr.hw -InputPath=.\include\apr.hw - -".\include\apr.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - type .\include\apr.hw > .\include\apr.h - -# End Custom Build - -!ELSEIF "$(CFG)" == "apr - Win32 Debug9x" - -# Begin Custom Build - Creating apr.h from apr.hw -InputPath=.\include\apr.hw - -".\include\apr.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - type .\include\apr.hw > .\include\apr.h - -# End Custom Build - !ELSEIF "$(CFG)" == "apr - x64 Release" # Begin Custom Build - Creating apr.h from apr.hw @@ -708,76 +654,48 @@ # 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 Index: contrib/apr/apr.mak =================================================================== --- contrib/apr/apr.mak +++ contrib/apr/apr.mak @@ -4,7 +4,7 @@ !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 @@ !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 @@ -29,6 +27,9 @@ NULL=nul !ENDIF +CPP=cl.exe +RSC=rc.exe + !IF "$(CFG)" == "apr - Win32 Release" OUTDIR=.\LibR @@ -37,14 +38,17 @@ OutDir=.\LibR # End Custom Macros -ALL : ".\LibR\gen_test_char.exe" "$(OUTDIR)\apr-1.lib" +ALL : ".\include\apr.h" ".\include\apr_escape.h" "$(OUTDIR)\apr-1.lib" CLEAN : -@erase "$(INTDIR)\apr-1.idb" -@erase "$(INTDIR)\apr-1.pdb" -@erase "$(INTDIR)\apr_atomic.obj" + -@erase "$(INTDIR)\apr_atomic64.obj" -@erase "$(INTDIR)\apr_cpystrn.obj" + -@erase "$(INTDIR)\apr_cstr.obj" + -@erase "$(INTDIR)\apr_encode.obj" -@erase "$(INTDIR)\apr_escape.obj" -@erase "$(INTDIR)\apr_fnmatch.obj" -@erase "$(INTDIR)\apr_getpass.obj" @@ -115,477 +119,14 @@ -@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 "WINNT" /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 Debug" - -OUTDIR=.\LibD -INTDIR=.\LibD -# Begin Custom Macros -OutDir=.\LibD -# End Custom Macros - -ALL : ".\LibD\gen_test_char.exe" ".\include\apr_escape_test_char.h" ".\include\apr.h" "$(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 "WINNT" /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_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 + -@erase "$(INTDIR)\wakeup.obj" + -@erase "$(OUTDIR)\apr-1.lib" + -@erase ".\include\apr.h" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /I "./include/private" /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(OUTDIR)\apr-1" /FD /c BSC32=bscmake.exe BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr.bsc" BSC32_SBRS= \ @@ -594,7 +135,9 @@ LIB32_FLAGS=/nologo /out:"$(OUTDIR)\apr-1.lib" LIB32_OBJS= \ "$(INTDIR)\apr_atomic.obj" \ + "$(INTDIR)\apr_atomic64.obj" \ "$(INTDIR)\dso.obj" \ + "$(INTDIR)\apr_encode.obj" \ "$(INTDIR)\apr_escape.obj" \ "$(INTDIR)\buffer.obj" \ "$(INTDIR)\copy.obj" \ @@ -636,19 +179,21 @@ "$(INTDIR)\multicast.obj" \ "$(INTDIR)\sendrecv.obj" \ "$(INTDIR)\sockaddr.obj" \ - "$(INTDIR)\sockets.obj" \ "$(INTDIR)\socket_util.obj" \ + "$(INTDIR)\sockets.obj" \ "$(INTDIR)\sockopt.obj" \ "$(INTDIR)\apr_getpass.obj" \ "$(INTDIR)\poll.obj" \ "$(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" \ @@ -671,22 +216,25 @@ $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS) << -!ELSEIF "$(CFG)" == "apr - Win32 Debug9x" +!ELSEIF "$(CFG)" == "apr - Win32 Debug" -OUTDIR=.\9x\LibD -INTDIR=.\9x\LibD +OUTDIR=.\LibD +INTDIR=.\LibD # Begin Custom Macros -OutDir=.\9x\LibD +OutDir=.\LibD # End Custom Macros -ALL : ".\include\apr_escape_test_char.h" ".\include\apr.h" ".\9x\LibD\gen_test_char.exe" "$(OUTDIR)\apr-1.lib" +ALL : ".\include\apr.h" ".\include\apr_escape.h" "$(OUTDIR)\apr-1.lib" CLEAN : -@erase "$(INTDIR)\apr-1.idb" -@erase "$(INTDIR)\apr-1.pdb" -@erase "$(INTDIR)\apr_atomic.obj" + -@erase "$(INTDIR)\apr_atomic64.obj" -@erase "$(INTDIR)\apr_cpystrn.obj" + -@erase "$(INTDIR)\apr_cstr.obj" + -@erase "$(INTDIR)\apr_encode.obj" -@erase "$(INTDIR)\apr_escape.obj" -@erase "$(INTDIR)\apr_fnmatch.obj" -@erase "$(INTDIR)\apr_getpass.obj" @@ -757,49 +305,14 @@ -@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" - -@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 +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /I "./include/private" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(OUTDIR)\apr-1" /FD /EHsc /c BSC32=bscmake.exe BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr.bsc" BSC32_SBRS= \ @@ -808,7 +321,9 @@ LIB32_FLAGS=/nologo /out:"$(OUTDIR)\apr-1.lib" LIB32_OBJS= \ "$(INTDIR)\apr_atomic.obj" \ + "$(INTDIR)\apr_atomic64.obj" \ "$(INTDIR)\dso.obj" \ + "$(INTDIR)\apr_encode.obj" \ "$(INTDIR)\apr_escape.obj" \ "$(INTDIR)\buffer.obj" \ "$(INTDIR)\copy.obj" \ @@ -850,19 +365,21 @@ "$(INTDIR)\multicast.obj" \ "$(INTDIR)\sendrecv.obj" \ "$(INTDIR)\sockaddr.obj" \ - "$(INTDIR)\sockets.obj" \ "$(INTDIR)\socket_util.obj" \ + "$(INTDIR)\sockets.obj" \ "$(INTDIR)\sockopt.obj" \ "$(INTDIR)\apr_getpass.obj" \ "$(INTDIR)\poll.obj" \ "$(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" \ @@ -893,14 +410,17 @@ OutDir=.\x64\LibR # End Custom Macros -ALL : ".\x64\LibR\gen_test_char.exe" ".\include\apr_escape_test_char.h" ".\include\apr.h" "$(OUTDIR)\apr-1.lib" +ALL : ".\include\apr.h" ".\include\apr_escape.h" "$(OUTDIR)\apr-1.lib" CLEAN : -@erase "$(INTDIR)\apr-1.idb" -@erase "$(INTDIR)\apr-1.pdb" -@erase "$(INTDIR)\apr_atomic.obj" + -@erase "$(INTDIR)\apr_atomic64.obj" -@erase "$(INTDIR)\apr_cpystrn.obj" + -@erase "$(INTDIR)\apr_cstr.obj" + -@erase "$(INTDIR)\apr_encode.obj" -@erase "$(INTDIR)\apr_escape.obj" -@erase "$(INTDIR)\apr_fnmatch.obj" -@erase "$(INTDIR)\apr_getpass.obj" @@ -971,49 +491,14 @@ -@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" - -@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 "WINNT" /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 +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /I "./include/private" /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(OUTDIR)\apr-1" /FD /c BSC32=bscmake.exe BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr.bsc" BSC32_SBRS= \ @@ -1022,7 +507,9 @@ LIB32_FLAGS=/nologo /out:"$(OUTDIR)\apr-1.lib" LIB32_OBJS= \ "$(INTDIR)\apr_atomic.obj" \ + "$(INTDIR)\apr_atomic64.obj" \ "$(INTDIR)\dso.obj" \ + "$(INTDIR)\apr_encode.obj" \ "$(INTDIR)\apr_escape.obj" \ "$(INTDIR)\buffer.obj" \ "$(INTDIR)\copy.obj" \ @@ -1064,19 +551,21 @@ "$(INTDIR)\multicast.obj" \ "$(INTDIR)\sendrecv.obj" \ "$(INTDIR)\sockaddr.obj" \ - "$(INTDIR)\sockets.obj" \ "$(INTDIR)\socket_util.obj" \ + "$(INTDIR)\sockets.obj" \ "$(INTDIR)\sockopt.obj" \ "$(INTDIR)\apr_getpass.obj" \ "$(INTDIR)\poll.obj" \ "$(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" \ @@ -1107,14 +596,17 @@ OutDir=.\x64\LibD # End Custom Macros -ALL : ".\x64\LibD\gen_test_char.exe" ".\include\apr_escape_test_char.h" ".\include\apr.h" "$(OUTDIR)\apr-1.lib" +ALL : ".\include\apr.h" ".\include\apr_escape.h" "$(OUTDIR)\apr-1.lib" CLEAN : -@erase "$(INTDIR)\apr-1.idb" -@erase "$(INTDIR)\apr-1.pdb" -@erase "$(INTDIR)\apr_atomic.obj" + -@erase "$(INTDIR)\apr_atomic64.obj" -@erase "$(INTDIR)\apr_cpystrn.obj" + -@erase "$(INTDIR)\apr_cstr.obj" + -@erase "$(INTDIR)\apr_encode.obj" -@erase "$(INTDIR)\apr_escape.obj" -@erase "$(INTDIR)\apr_fnmatch.obj" -@erase "$(INTDIR)\apr_getpass.obj" @@ -1185,49 +677,15 @@ -@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" - -@erase "$(OUTDIR)\gen_test_char.exe" - -@erase "$(OUTDIR)\gen_test_char.obj" + -@erase ".\include\apr_escape_test_char.h" "$(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 "WINNT" /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 +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /I "./include/private" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(OUTDIR)\apr-1" /FD /EHsc /c BSC32=bscmake.exe BSC32_FLAGS=/nologo /o"$(OUTDIR)\apr.bsc" BSC32_SBRS= \ @@ -1236,7 +694,9 @@ LIB32_FLAGS=/nologo /out:"$(OUTDIR)\apr-1.lib" LIB32_OBJS= \ "$(INTDIR)\apr_atomic.obj" \ + "$(INTDIR)\apr_atomic64.obj" \ "$(INTDIR)\dso.obj" \ + "$(INTDIR)\apr_encode.obj" \ "$(INTDIR)\apr_escape.obj" \ "$(INTDIR)\buffer.obj" \ "$(INTDIR)\copy.obj" \ @@ -1278,19 +738,21 @@ "$(INTDIR)\multicast.obj" \ "$(INTDIR)\sendrecv.obj" \ "$(INTDIR)\sockaddr.obj" \ - "$(INTDIR)\sockets.obj" \ "$(INTDIR)\socket_util.obj" \ + "$(INTDIR)\sockets.obj" \ "$(INTDIR)\sockopt.obj" \ "$(INTDIR)\apr_getpass.obj" \ "$(INTDIR)\poll.obj" \ "$(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" \ @@ -1315,6 +777,36 @@ !ENDIF +.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) $< +<< + !IF "$(NO_EXTERNAL_DEPS)" != "1" !IF EXISTS("apr.dep") @@ -1325,437 +817,461 @@ !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" +"$(INTDIR)\apr_atomic.obj" : $(SOURCE) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\atomic\win32\apr_atomic64.c + +"$(INTDIR)\apr_atomic64.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\dso\win32\dso.c -"$(INTDIR)\dso.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\dso.obj" : $(SOURCE) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\encoding\apr_encode.c + +"$(INTDIR)\apr_encode.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\encoding\apr_escape.c -"$(INTDIR)\apr_escape.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr_escape.h" ".\include\apr_escape_test_char.h" ".\include\apr.h" +"$(INTDIR)\apr_escape.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\file_io\win32\buffer.c -"$(INTDIR)\buffer.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\buffer.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\file_io\unix\copy.c -"$(INTDIR)\copy.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\copy.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\file_io\win32\dir.c -"$(INTDIR)\dir.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\dir.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\file_io\unix\fileacc.c -"$(INTDIR)\fileacc.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\fileacc.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\file_io\win32\filedup.c -"$(INTDIR)\filedup.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\filedup.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\file_io\win32\filepath.c -"$(INTDIR)\filepath.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\filepath.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\file_io\unix\filepath_util.c -"$(INTDIR)\filepath_util.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\filepath_util.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\file_io\win32\filestat.c -"$(INTDIR)\filestat.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\filestat.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\file_io\win32\filesys.c -"$(INTDIR)\filesys.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\filesys.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\file_io\win32\flock.c -"$(INTDIR)\flock.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\flock.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\file_io\unix\fullrw.c -"$(INTDIR)\fullrw.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\fullrw.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\file_io\unix\mktemp.c -"$(INTDIR)\mktemp.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\mktemp.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\file_io\win32\open.c -"$(INTDIR)\open.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\open.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\file_io\win32\pipe.c -"$(INTDIR)\pipe.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\pipe.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\file_io\win32\readwrite.c -"$(INTDIR)\readwrite.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\readwrite.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\file_io\win32\seek.c -"$(INTDIR)\seek.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\seek.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\file_io\unix\tempdir.c -"$(INTDIR)\tempdir.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\tempdir.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\locks\win32\proc_mutex.c -"$(INTDIR)\proc_mutex.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\proc_mutex.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\locks\win32\thread_cond.c -"$(INTDIR)\thread_cond.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\thread_cond.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\locks\win32\thread_mutex.c -"$(INTDIR)\thread_mutex.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\thread_mutex.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\locks\win32\thread_rwlock.c -"$(INTDIR)\thread_rwlock.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\thread_rwlock.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\memory\unix\apr_pools.c -"$(INTDIR)\apr_pools.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\apr_pools.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\misc\win32\apr_app.c SOURCE=.\misc\win32\charset.c -"$(INTDIR)\charset.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\charset.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\misc\win32\env.c -"$(INTDIR)\env.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\env.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\misc\unix\errorcodes.c -"$(INTDIR)\errorcodes.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\errorcodes.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\misc\unix\getopt.c -"$(INTDIR)\getopt.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\getopt.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\misc\win32\internal.c -"$(INTDIR)\internal.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\internal.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\misc\win32\misc.c -"$(INTDIR)\misc.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\misc.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\misc\unix\otherchild.c -"$(INTDIR)\otherchild.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\otherchild.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\misc\win32\rand.c -"$(INTDIR)\rand.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\rand.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\misc\win32\start.c -"$(INTDIR)\start.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\start.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\misc\win32\utf8.c -"$(INTDIR)\utf8.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\utf8.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\misc\unix\version.c -"$(INTDIR)\version.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\version.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\mmap\unix\common.c -"$(INTDIR)\common.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\common.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\mmap\win32\mmap.c -"$(INTDIR)\mmap.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\mmap.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\network_io\unix\inet_ntop.c -"$(INTDIR)\inet_ntop.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\inet_ntop.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\network_io\unix\inet_pton.c -"$(INTDIR)\inet_pton.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\inet_pton.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\network_io\unix\multicast.c -"$(INTDIR)\multicast.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\multicast.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\network_io\win32\sendrecv.c -"$(INTDIR)\sendrecv.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\sendrecv.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\network_io\unix\sockaddr.c -"$(INTDIR)\sockaddr.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\sockaddr.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\network_io\unix\socket_util.c -"$(INTDIR)\socket_util.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\socket_util.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\network_io\win32\sockets.c -"$(INTDIR)\sockets.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\sockets.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\network_io\win32\sockopt.c -"$(INTDIR)\sockopt.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\sockopt.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\passwd\apr_getpass.c -"$(INTDIR)\apr_getpass.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\apr_getpass.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\poll\unix\poll.c -"$(INTDIR)\poll.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\poll.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\poll\unix\pollcb.c -"$(INTDIR)\pollcb.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\pollcb.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\poll\unix\pollset.c -"$(INTDIR)\pollset.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\pollset.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\poll\unix\select.c -"$(INTDIR)\select.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\select.obj" : $(SOURCE) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\poll\unix\wakeup.c + +"$(INTDIR)\wakeup.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\random\unix\apr_random.c -"$(INTDIR)\apr_random.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\apr_random.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\random\unix\sha2.c -"$(INTDIR)\sha2.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\sha2.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\random\unix\sha2_glue.c -"$(INTDIR)\sha2_glue.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\sha2_glue.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\shmem\win32\shm.c -"$(INTDIR)\shm.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\shm.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\strings\apr_cpystrn.c -"$(INTDIR)\apr_cpystrn.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\apr_cpystrn.obj" : $(SOURCE) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\strings\apr_cstr.c + +"$(INTDIR)\apr_cstr.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\strings\apr_fnmatch.c -"$(INTDIR)\apr_fnmatch.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\apr_fnmatch.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\strings\apr_snprintf.c -"$(INTDIR)\apr_snprintf.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\apr_snprintf.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\strings\apr_strings.c -"$(INTDIR)\apr_strings.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\apr_strings.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\strings\apr_strnatcmp.c -"$(INTDIR)\apr_strnatcmp.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\apr_strnatcmp.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\strings\apr_strtok.c -"$(INTDIR)\apr_strtok.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\apr_strtok.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\tables\apr_hash.c -"$(INTDIR)\apr_hash.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\apr_hash.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\tables\apr_skiplist.c -"$(INTDIR)\apr_skiplist.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\apr_skiplist.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\tables\apr_tables.c -"$(INTDIR)\apr_tables.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\apr_tables.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\threadproc\win32\proc.c -"$(INTDIR)\proc.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\proc.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\threadproc\win32\signals.c -"$(INTDIR)\signals.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\signals.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\threadproc\win32\thread.c -"$(INTDIR)\thread.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\thread.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\threadproc\win32\threadpriv.c -"$(INTDIR)\threadpriv.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\threadpriv.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\time\win32\time.c -"$(INTDIR)\time.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\time.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\time\win32\timestr.c -"$(INTDIR)\timestr.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\timestr.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\user\win32\groupinfo.c -"$(INTDIR)\groupinfo.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\groupinfo.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) SOURCE=.\user\win32\userinfo.c -"$(INTDIR)\userinfo.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" +"$(INTDIR)\userinfo.obj" : $(SOURCE) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) @@ -1783,28 +1299,6 @@ << -!ELSEIF "$(CFG)" == "apr - Win32 Release9x" - -InputPath=.\include\apr.hw - -".\include\apr.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - < .\include\apr.h -<< - - -!ELSEIF "$(CFG)" == "apr - Win32 Debug9x" - -InputPath=.\include\apr.hw - -".\include\apr.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - < .\include\apr.h -<< - - !ELSEIF "$(CFG)" == "apr - x64 Release" InputPath=.\include\apr.hw @@ -1855,30 +1349,6 @@ << -!ELSEIF "$(CFG)" == "apr - Win32 Release9x" - -InputPath=.\include\apr_escape.h - -".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - < .\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)" - < .\include\apr_escape_test_char.h -<< - - !ELSEIF "$(CFG)" == "apr - x64 Release" InputPath=.\include\apr_escape.h @@ -1903,76 +1373,6 @@ << -!ENDIF - -SOURCE=.\include\apr_want.h - -!IF "$(CFG)" == "apr - Win32 Release" - -InputPath=.\include\apr_want.h - -"$(INTDIR)\gen_test_char.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - < .\include\apr.h -<< - - -!ELSEIF "$(CFG)" == "apr - Win32 Debug" - -InputPath=.\include\apr_want.h - -"$(INTDIR)\gen_test_char.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - < .\include\apr.h -<< - - -!ELSEIF "$(CFG)" == "apr - Win32 Release9x" - -InputPath=.\include\apr_want.h - -"$(INTDIR)\gen_test_char.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - < .\include\apr.h -<< - - -!ELSEIF "$(CFG)" == "apr - Win32 Debug9x" - -InputPath=.\include\apr_want.h - -"$(INTDIR)\gen_test_char.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - < .\include\apr.h -<< - - -!ELSEIF "$(CFG)" == "apr - x64 Release" - -InputPath=.\include\apr_want.h - -"$(INTDIR)\gen_test_char.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - < .\include\apr.h -<< - - -!ELSEIF "$(CFG)" == "apr - x64 Debug" - -InputPath=.\include\apr_want.h - -"$(INTDIR)\gen_test_char.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - < .\include\apr.h -<< - - !ENDIF Index: contrib/apr/apr.spec =================================================================== --- contrib/apr/apr.spec +++ contrib/apr/apr.spec @@ -3,14 +3,14 @@ Summary: Apache Portable Runtime library Name: apr -Version: 1.5.2 +Version: 1.7.0 Release: 1 License: Apache Software License Group: System Environment/Libraries URL: http://apr.apache.org/ Source0: http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot -BuildRequires: autoconf, libtool, doxygen, python +BuildRequires: autoconf, libtool, doxygen, libuuid-devel, python %description The mission of the Apache Portable Runtime (APR) is to provide a Index: contrib/apr/atomic/unix/builtins64.c =================================================================== --- /dev/null +++ contrib/apr/atomic/unix/builtins64.c @@ -0,0 +1,64 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "apr_arch_atomic.h" + +#ifdef USE_ATOMICS_BUILTINS + +APR_DECLARE(apr_uint64_t) apr_atomic_read64(volatile apr_uint64_t *mem) +{ + return *mem; +} + +APR_DECLARE(void) apr_atomic_set64(volatile apr_uint64_t *mem, apr_uint64_t val) +{ + *mem = val; +} + +APR_DECLARE(apr_uint64_t) apr_atomic_add64(volatile apr_uint64_t *mem, apr_uint64_t val) +{ + return __sync_fetch_and_add(mem, val); +} + +APR_DECLARE(void) apr_atomic_sub64(volatile apr_uint64_t *mem, apr_uint64_t val) +{ + __sync_fetch_and_sub(mem, val); +} + +APR_DECLARE(apr_uint64_t) apr_atomic_inc64(volatile apr_uint64_t *mem) +{ + return __sync_fetch_and_add(mem, 1); +} + +APR_DECLARE(int) apr_atomic_dec64(volatile apr_uint64_t *mem) +{ + return __sync_sub_and_fetch(mem, 1); +} + +APR_DECLARE(apr_uint64_t) apr_atomic_cas64(volatile apr_uint64_t *mem, apr_uint64_t with, + apr_uint64_t cmp) +{ + return __sync_val_compare_and_swap(mem, cmp, with); +} + +APR_DECLARE(apr_uint64_t) apr_atomic_xchg64(volatile apr_uint64_t *mem, apr_uint64_t val) +{ + __sync_synchronize(); + + return __sync_lock_test_and_set(mem, val); +} + +#endif /* USE_ATOMICS_BUILTINS */ Index: contrib/apr/atomic/unix/ia32.c =================================================================== --- contrib/apr/atomic/unix/ia32.c +++ contrib/apr/atomic/unix/ia32.c @@ -20,7 +20,11 @@ APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p) { +#if defined (NEED_ATOMICS_GENERIC64) + return apr__atomic_generic64_init(p); +#else return APR_SUCCESS; +#endif } APR_DECLARE(apr_uint32_t) apr_atomic_read32(volatile apr_uint32_t *mem) Index: contrib/apr/atomic/unix/mutex.c =================================================================== --- contrib/apr/atomic/unix/mutex.c +++ contrib/apr/atomic/unix/mutex.c @@ -15,6 +15,7 @@ */ #include "apr_arch_atomic.h" +#include "apr_thread_mutex.h" #ifdef USE_ATOMICS_GENERIC @@ -70,7 +71,7 @@ } } - return APR_SUCCESS; + return apr__atomic_generic64_init(p); } static APR_INLINE apr_thread_mutex_t *mutex_hash(volatile apr_uint32_t *mem) @@ -88,7 +89,7 @@ APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p) { - return APR_SUCCESS; + return apr__atomic_generic64_init(p); } #endif /* APR_HAS_THREADS */ Index: contrib/apr/atomic/unix/mutex64.c =================================================================== --- contrib/apr/atomic/unix/mutex64.c +++ contrib/apr/atomic/unix/mutex64.c @@ -15,8 +15,9 @@ */ #include "apr_arch_atomic.h" +#include "apr_thread_mutex.h" -#ifdef USE_ATOMICS_GENERIC +#if defined(USE_ATOMICS_GENERIC) || defined (NEED_ATOMICS_GENERIC64) #include @@ -50,7 +51,7 @@ return APR_SUCCESS; } -APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p) +apr_status_t apr__atomic_generic64_init(apr_pool_t *p) { int i; apr_status_t rv; @@ -73,7 +74,7 @@ return APR_SUCCESS; } -static APR_INLINE apr_thread_mutex_t *mutex_hash(volatile apr_uint32_t *mem) +static APR_INLINE apr_thread_mutex_t *mutex_hash(volatile apr_uint64_t *mem) { apr_thread_mutex_t *mutex = hash_mutex[ATOMIC_HASH(mem)]; @@ -86,19 +87,19 @@ #else -APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p) +apr_status_t apr__atomic_generic64_init(apr_pool_t *p) { return APR_SUCCESS; } #endif /* APR_HAS_THREADS */ -APR_DECLARE(apr_uint32_t) apr_atomic_read32(volatile apr_uint32_t *mem) +APR_DECLARE(apr_uint64_t) apr_atomic_read64(volatile apr_uint64_t *mem) { return *mem; } -APR_DECLARE(void) apr_atomic_set32(volatile apr_uint32_t *mem, apr_uint32_t val) +APR_DECLARE(void) apr_atomic_set64(volatile apr_uint64_t *mem, apr_uint64_t val) { DECLARE_MUTEX_LOCKED(mutex, mem); @@ -107,9 +108,9 @@ MUTEX_UNLOCK(mutex); } -APR_DECLARE(apr_uint32_t) apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val) +APR_DECLARE(apr_uint64_t) apr_atomic_add64(volatile apr_uint64_t *mem, apr_uint64_t val) { - apr_uint32_t old_value; + apr_uint64_t old_value; DECLARE_MUTEX_LOCKED(mutex, mem); old_value = *mem; @@ -120,21 +121,21 @@ return old_value; } -APR_DECLARE(void) apr_atomic_sub32(volatile apr_uint32_t *mem, apr_uint32_t val) +APR_DECLARE(void) apr_atomic_sub64(volatile apr_uint64_t *mem, apr_uint64_t val) { DECLARE_MUTEX_LOCKED(mutex, mem); *mem -= val; MUTEX_UNLOCK(mutex); } -APR_DECLARE(apr_uint32_t) apr_atomic_inc32(volatile apr_uint32_t *mem) +APR_DECLARE(apr_uint64_t) apr_atomic_inc64(volatile apr_uint64_t *mem) { - return apr_atomic_add32(mem, 1); + return apr_atomic_add64(mem, 1); } -APR_DECLARE(int) apr_atomic_dec32(volatile apr_uint32_t *mem) +APR_DECLARE(int) apr_atomic_dec64(volatile apr_uint64_t *mem) { - apr_uint32_t new; + apr_uint64_t new; DECLARE_MUTEX_LOCKED(mutex, mem); (*mem)--; @@ -145,10 +146,10 @@ return new; } -APR_DECLARE(apr_uint32_t) apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t with, - apr_uint32_t cmp) +APR_DECLARE(apr_uint64_t) apr_atomic_cas64(volatile apr_uint64_t *mem, apr_uint64_t with, + apr_uint64_t cmp) { - apr_uint32_t prev; + apr_uint64_t prev; DECLARE_MUTEX_LOCKED(mutex, mem); prev = *mem; @@ -161,9 +162,9 @@ return prev; } -APR_DECLARE(apr_uint32_t) apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val) +APR_DECLARE(apr_uint64_t) apr_atomic_xchg64(volatile apr_uint64_t *mem, apr_uint64_t val) { - apr_uint32_t prev; + apr_uint64_t prev; DECLARE_MUTEX_LOCKED(mutex, mem); prev = *mem; @@ -174,32 +175,4 @@ return prev; } -APR_DECLARE(void*) apr_atomic_casptr(volatile void **mem, void *with, const void *cmp) -{ - void *prev; - DECLARE_MUTEX_LOCKED(mutex, *mem); - - prev = *(void **)mem; - if (prev == cmp) { - *mem = with; - } - - MUTEX_UNLOCK(mutex); - - return prev; -} - -APR_DECLARE(void*) apr_atomic_xchgptr(volatile void **mem, void *with) -{ - void *prev; - DECLARE_MUTEX_LOCKED(mutex, *mem); - - prev = *(void **)mem; - *mem = with; - - MUTEX_UNLOCK(mutex); - - return prev; -} - -#endif /* USE_ATOMICS_GENERIC */ +#endif /* USE_ATOMICS_GENERIC64 */ Index: contrib/apr/atomic/unix/ppc.c =================================================================== --- contrib/apr/atomic/unix/ppc.c +++ contrib/apr/atomic/unix/ppc.c @@ -26,7 +26,11 @@ APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p) { +#if defined (NEED_ATOMICS_GENERIC64) + return apr__atomic_generic64_init(p); +#else return APR_SUCCESS; +#endif } APR_DECLARE(apr_uint32_t) apr_atomic_read32(volatile apr_uint32_t *mem) Index: contrib/apr/atomic/unix/s390.c =================================================================== --- contrib/apr/atomic/unix/s390.c +++ contrib/apr/atomic/unix/s390.c @@ -20,7 +20,11 @@ APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p) { +#if defined (NEED_ATOMICS_GENERIC64) + return apr__atomic_generic64_init(p); +#else return APR_SUCCESS; +#endif } APR_DECLARE(apr_uint32_t) apr_atomic_read32(volatile apr_uint32_t *mem) Index: contrib/apr/atomic/unix/solaris.c =================================================================== --- contrib/apr/atomic/unix/solaris.c +++ contrib/apr/atomic/unix/solaris.c @@ -22,7 +22,11 @@ APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p) { +#if defined (NEED_ATOMICS_GENERIC64) + return apr__atomic_generic64_init(p); +#else return APR_SUCCESS; +#endif } APR_DECLARE(apr_uint32_t) apr_atomic_read32(volatile apr_uint32_t *mem) Index: contrib/apr/build-outputs.mk =================================================================== --- contrib/apr/build-outputs.mk +++ contrib/apr/build-outputs.mk @@ -1,149 +1,154 @@ # DO NOT EDIT. AUTOMATICALLY GENERATED. -encoding/apr_escape.lo: encoding/apr_escape.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_escape.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h -passwd/apr_getpass.lo: passwd/apr_getpass.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h -strings/apr_cpystrn.lo: strings/apr_cpystrn.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h +encoding/apr_encode.lo: encoding/apr_encode.c .make.dirs include/apr_allocator.h include/apr_encode.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h +encoding/apr_escape.lo: encoding/apr_escape.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_escape.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h +passwd/apr_getpass.lo: passwd/apr_getpass.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h +strings/apr_cpystrn.lo: strings/apr_cpystrn.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h +strings/apr_cstr.lo: strings/apr_cstr.c .make.dirs include/apr_allocator.h include/apr_cstr.h include/apr_errno.h include/apr_fnmatch.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h strings/apr_fnmatch.lo: strings/apr_fnmatch.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_fnmatch.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h -strings/apr_snprintf.lo: strings/apr_snprintf.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -strings/apr_strings.lo: strings/apr_strings.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h -strings/apr_strnatcmp.lo: strings/apr_strnatcmp.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h -strings/apr_strtok.lo: strings/apr_strtok.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h +strings/apr_snprintf.lo: strings/apr_snprintf.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +strings/apr_strings.lo: strings/apr_strings.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h +strings/apr_strnatcmp.lo: strings/apr_strnatcmp.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h +strings/apr_strtok.lo: strings/apr_strtok.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h tables/apr_hash.lo: tables/apr_hash.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_hash.h include/apr_pools.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h -tables/apr_skiplist.lo: tables/apr_skiplist.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_skiplist.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -tables/apr_tables.lo: tables/apr_tables.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_want.h +tables/apr_skiplist.lo: tables/apr_skiplist.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_skiplist.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +tables/apr_tables.lo: tables/apr_tables.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h -OBJECTS_all = encoding/apr_escape.lo passwd/apr_getpass.lo strings/apr_cpystrn.lo strings/apr_fnmatch.lo strings/apr_snprintf.lo strings/apr_strings.lo strings/apr_strnatcmp.lo strings/apr_strtok.lo tables/apr_hash.lo tables/apr_skiplist.lo tables/apr_tables.lo +OBJECTS_all = encoding/apr_encode.lo encoding/apr_escape.lo passwd/apr_getpass.lo strings/apr_cpystrn.lo strings/apr_cstr.lo strings/apr_fnmatch.lo strings/apr_snprintf.lo strings/apr_strings.lo strings/apr_strnatcmp.lo strings/apr_strtok.lo tables/apr_hash.lo tables/apr_skiplist.lo tables/apr_tables.lo -dso/unix/dso.lo: dso/unix/dso.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +dso/unix/dso.lo: dso/unix/dso.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_dso_unix = dso/unix/dso.lo -file_io/unix/buffer.lo: file_io/unix/buffer.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_want.h +file_io/unix/buffer.lo: file_io/unix/buffer.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h file_io/unix/copy.lo: file_io/unix/copy.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h -file_io/unix/dir.lo: file_io/unix/dir.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -file_io/unix/fileacc.lo: file_io/unix/fileacc.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h -file_io/unix/filedup.lo: file_io/unix/filedup.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +file_io/unix/dir.lo: file_io/unix/dir.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +file_io/unix/fileacc.lo: file_io/unix/fileacc.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h +file_io/unix/filedup.lo: file_io/unix/filedup.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h file_io/unix/filepath.lo: file_io/unix/filepath.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h -file_io/unix/filepath_util.lo: file_io/unix/filepath_util.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_want.h +file_io/unix/filepath_util.lo: file_io/unix/filepath_util.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h file_io/unix/filestat.lo: file_io/unix/filestat.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h file_io/unix/flock.lo: file_io/unix/flock.c .make.dirs file_io/unix/fullrw.lo: file_io/unix/fullrw.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h -file_io/unix/mktemp.lo: file_io/unix/mktemp.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -file_io/unix/open.lo: file_io/unix/open.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_hash.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -file_io/unix/pipe.lo: file_io/unix/pipe.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -file_io/unix/readwrite.lo: file_io/unix/readwrite.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_strings.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h +file_io/unix/mktemp.lo: file_io/unix/mktemp.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +file_io/unix/open.lo: file_io/unix/open.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_hash.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +file_io/unix/pipe.lo: file_io/unix/pipe.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +file_io/unix/readwrite.lo: file_io/unix/readwrite.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_strings.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h file_io/unix/seek.lo: file_io/unix/seek.c .make.dirs file_io/unix/tempdir.lo: file_io/unix/tempdir.c .make.dirs include/apr_allocator.h include/apr_env.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_file_io_unix = file_io/unix/buffer.lo file_io/unix/copy.lo file_io/unix/dir.lo file_io/unix/fileacc.lo file_io/unix/filedup.lo file_io/unix/filepath.lo file_io/unix/filepath_util.lo file_io/unix/filestat.lo file_io/unix/flock.lo file_io/unix/fullrw.lo file_io/unix/mktemp.lo file_io/unix/open.lo file_io/unix/pipe.lo file_io/unix/readwrite.lo file_io/unix/seek.lo file_io/unix/tempdir.lo -locks/unix/global_mutex.lo: locks/unix/global_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -locks/unix/proc_mutex.lo: locks/unix/proc_mutex.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_hash.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h +locks/unix/global_mutex.lo: locks/unix/global_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +locks/unix/proc_mutex.lo: locks/unix/proc_mutex.c .make.dirs include/apr_allocator.h include/apr_atomic.h include/apr_errno.h include/apr_general.h include/apr_hash.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h locks/unix/thread_cond.lo: locks/unix/thread_cond.c .make.dirs locks/unix/thread_mutex.lo: locks/unix/thread_mutex.c .make.dirs include/apr_want.h locks/unix/thread_rwlock.lo: locks/unix/thread_rwlock.c .make.dirs OBJECTS_locks_unix = locks/unix/global_mutex.lo locks/unix/proc_mutex.lo locks/unix/thread_cond.lo locks/unix/thread_mutex.lo locks/unix/thread_rwlock.lo -memory/unix/apr_pools.lo: memory/unix/apr_pools.c .make.dirs include/apr_allocator.h include/apr_atomic.h include/apr_dso.h include/apr_env.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_hash.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +memory/unix/apr_pools.lo: memory/unix/apr_pools.c .make.dirs include/apr_allocator.h include/apr_atomic.h include/apr_dso.h include/apr_env.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_hash.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_memory_unix = memory/unix/apr_pools.lo -misc/unix/charset.lo: misc/unix/charset.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -misc/unix/env.lo: misc/unix/env.c .make.dirs include/apr_allocator.h include/apr_env.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h -misc/unix/errorcodes.lo: misc/unix/errorcodes.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h -misc/unix/getopt.lo: misc/unix/getopt.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h +misc/unix/charset.lo: misc/unix/charset.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +misc/unix/env.lo: misc/unix/env.c .make.dirs include/apr_allocator.h include/apr_env.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h +misc/unix/errorcodes.lo: misc/unix/errorcodes.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h +misc/unix/getopt.lo: misc/unix/getopt.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h misc/unix/otherchild.lo: misc/unix/otherchild.c .make.dirs -misc/unix/rand.lo: misc/unix/rand.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_want.h -misc/unix/start.lo: misc/unix/start.c .make.dirs include/apr_allocator.h include/apr_atomic.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_signal.h include/apr_thread_mutex.h include/apr_want.h -misc/unix/version.lo: misc/unix/version.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_version.h include/apr_want.h +misc/unix/rand.lo: misc/unix/rand.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h +misc/unix/start.lo: misc/unix/start.c .make.dirs include/apr_allocator.h include/apr_atomic.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_signal.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h +misc/unix/version.lo: misc/unix/version.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_time.h include/apr_version.h include/apr_want.h OBJECTS_misc_unix = misc/unix/charset.lo misc/unix/env.lo misc/unix/errorcodes.lo misc/unix/getopt.lo misc/unix/otherchild.lo misc/unix/rand.lo misc/unix/start.lo misc/unix/version.lo mmap/unix/common.lo: mmap/unix/common.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_mmap.h include/apr_pools.h include/apr_ring.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h -mmap/unix/mmap.lo: mmap/unix/mmap.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_mmap.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_ring.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +mmap/unix/mmap.lo: mmap/unix/mmap.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_mmap.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_ring.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_mmap_unix = mmap/unix/common.lo mmap/unix/mmap.lo -network_io/unix/inet_ntop.lo: network_io/unix/inet_ntop.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h +network_io/unix/inet_ntop.lo: network_io/unix/inet_ntop.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h network_io/unix/inet_pton.lo: network_io/unix/inet_pton.c .make.dirs -network_io/unix/multicast.lo: network_io/unix/multicast.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -network_io/unix/sendrecv.lo: network_io/unix/sendrecv.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h -network_io/unix/sockaddr.lo: network_io/unix/sockaddr.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h -network_io/unix/socket_util.lo: network_io/unix/socket_util.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_poll.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h -network_io/unix/sockets.lo: network_io/unix/sockets.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -network_io/unix/sockopt.lo: network_io/unix/sockopt.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h +network_io/unix/multicast.lo: network_io/unix/multicast.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +network_io/unix/sendrecv.lo: network_io/unix/sendrecv.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h +network_io/unix/sockaddr.lo: network_io/unix/sockaddr.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h +network_io/unix/socket_util.lo: network_io/unix/socket_util.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_poll.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h +network_io/unix/sockets.lo: network_io/unix/sockets.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +network_io/unix/sockopt.lo: network_io/unix/sockopt.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h OBJECTS_network_io_unix = network_io/unix/inet_ntop.lo network_io/unix/inet_pton.lo network_io/unix/multicast.lo network_io/unix/sendrecv.lo network_io/unix/sockaddr.lo network_io/unix/socket_util.lo network_io/unix/sockets.lo network_io/unix/sockopt.lo -poll/unix/epoll.lo: poll/unix/epoll.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -poll/unix/kqueue.lo: poll/unix/kqueue.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -poll/unix/poll.lo: poll/unix/poll.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -poll/unix/pollcb.lo: poll/unix/pollcb.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -poll/unix/pollset.lo: poll/unix/pollset.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -poll/unix/port.lo: poll/unix/port.c .make.dirs include/apr_allocator.h include/apr_atomic.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -poll/unix/select.lo: poll/unix/select.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -poll/unix/z_asio.lo: poll/unix/z_asio.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_hash.h include/apr_inherit.h include/apr_network_io.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +poll/unix/epoll.lo: poll/unix/epoll.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +poll/unix/kqueue.lo: poll/unix/kqueue.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +poll/unix/poll.lo: poll/unix/poll.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +poll/unix/pollcb.lo: poll/unix/pollcb.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +poll/unix/pollset.lo: poll/unix/pollset.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +poll/unix/port.lo: poll/unix/port.c .make.dirs include/apr_allocator.h include/apr_atomic.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +poll/unix/select.lo: poll/unix/select.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +poll/unix/wakeup.lo: poll/unix/wakeup.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +poll/unix/z_asio.lo: poll/unix/z_asio.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_hash.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_poll.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -OBJECTS_poll_unix = poll/unix/epoll.lo poll/unix/kqueue.lo poll/unix/poll.lo poll/unix/pollcb.lo poll/unix/pollset.lo poll/unix/port.lo poll/unix/select.lo poll/unix/z_asio.lo +OBJECTS_poll_unix = poll/unix/epoll.lo poll/unix/kqueue.lo poll/unix/poll.lo poll/unix/pollcb.lo poll/unix/pollset.lo poll/unix/port.lo poll/unix/select.lo poll/unix/wakeup.lo poll/unix/z_asio.lo -random/unix/apr_random.lo: random/unix/apr_random.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_random.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +random/unix/apr_random.lo: random/unix/apr_random.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_perms_set.h include/apr_pools.h include/apr_random.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h random/unix/sha2.lo: random/unix/sha2.c .make.dirs -random/unix/sha2_glue.lo: random/unix/sha2_glue.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_random.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +random/unix/sha2_glue.lo: random/unix/sha2_glue.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_perms_set.h include/apr_pools.h include/apr_random.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_random_unix = random/unix/apr_random.lo random/unix/sha2.lo random/unix/sha2_glue.lo -shmem/unix/shm.lo: shmem/unix/shm.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_hash.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_user.h include/apr_want.h +shmem/unix/shm.lo: shmem/unix/shm.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_hash.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_shmem_unix = shmem/unix/shm.lo -support/unix/waitio.lo: support/unix/waitio.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_poll.h include/apr_pools.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h +support/unix/waitio.lo: support/unix/waitio.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_poll.h include/apr_pools.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_support_unix = support/unix/waitio.lo -threadproc/unix/proc.lo: threadproc/unix/proc.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_random.h include/apr_shm.h include/apr_signal.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +threadproc/unix/proc.lo: threadproc/unix/proc.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_random.h include/apr_shm.h include/apr_signal.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h threadproc/unix/procsup.lo: threadproc/unix/procsup.c .make.dirs -threadproc/unix/signals.lo: threadproc/unix/signals.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_signal.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h -threadproc/unix/thread.lo: threadproc/unix/thread.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -threadproc/unix/threadpriv.lo: threadproc/unix/threadpriv.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +threadproc/unix/signals.lo: threadproc/unix/signals.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_signal.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h +threadproc/unix/thread.lo: threadproc/unix/thread.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +threadproc/unix/threadpriv.lo: threadproc/unix/threadpriv.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_threadproc_unix = threadproc/unix/proc.lo threadproc/unix/procsup.lo threadproc/unix/signals.lo threadproc/unix/thread.lo threadproc/unix/threadpriv.lo -time/unix/time.lo: time/unix/time.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -time/unix/timestr.lo: time/unix/timestr.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +time/unix/time.lo: time/unix/time.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +time/unix/timestr.lo: time/unix/timestr.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_time_unix = time/unix/time.lo time/unix/timestr.lo -user/unix/groupinfo.lo: user/unix/groupinfo.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -user/unix/userinfo.lo: user/unix/userinfo.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +user/unix/groupinfo.lo: user/unix/groupinfo.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +user/unix/userinfo.lo: user/unix/userinfo.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_user_unix = user/unix/groupinfo.lo user/unix/userinfo.lo atomic/unix/builtins.lo: atomic/unix/builtins.c .make.dirs +atomic/unix/builtins64.lo: atomic/unix/builtins64.c .make.dirs atomic/unix/ia32.lo: atomic/unix/ia32.c .make.dirs -atomic/unix/mutex.lo: atomic/unix/mutex.c .make.dirs +atomic/unix/mutex.lo: atomic/unix/mutex.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h +atomic/unix/mutex64.lo: atomic/unix/mutex64.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h atomic/unix/ppc.lo: atomic/unix/ppc.c .make.dirs atomic/unix/s390.lo: atomic/unix/s390.c .make.dirs atomic/unix/solaris.lo: atomic/unix/solaris.c .make.dirs -OBJECTS_atomic_unix = atomic/unix/builtins.lo atomic/unix/ia32.lo atomic/unix/mutex.lo atomic/unix/ppc.lo atomic/unix/s390.lo atomic/unix/solaris.lo +OBJECTS_atomic_unix = atomic/unix/builtins.lo atomic/unix/builtins64.lo atomic/unix/ia32.lo atomic/unix/mutex.lo atomic/unix/mutex64.lo atomic/unix/ppc.lo atomic/unix/s390.lo atomic/unix/solaris.lo OBJECTS_unix = $(OBJECTS_all) $(OBJECTS_atomic_unix) $(OBJECTS_dso_unix) $(OBJECTS_file_io_unix) $(OBJECTS_locks_unix) $(OBJECTS_memory_unix) $(OBJECTS_misc_unix) $(OBJECTS_mmap_unix) $(OBJECTS_network_io_unix) $(OBJECTS_poll_unix) $(OBJECTS_random_unix) $(OBJECTS_shmem_unix) $(OBJECTS_support_unix) $(OBJECTS_threadproc_unix) $(OBJECTS_time_unix) $(OBJECTS_user_unix) -dso/aix/dso.lo: dso/aix/dso.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +dso/aix/dso.lo: dso/aix/dso.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_dso_aix = dso/aix/dso.lo OBJECTS_aix = $(OBJECTS_all) $(OBJECTS_atomic_unix) $(OBJECTS_dso_aix) $(OBJECTS_file_io_unix) $(OBJECTS_locks_unix) $(OBJECTS_memory_unix) $(OBJECTS_misc_unix) $(OBJECTS_mmap_unix) $(OBJECTS_network_io_unix) $(OBJECTS_poll_unix) $(OBJECTS_random_unix) $(OBJECTS_shmem_unix) $(OBJECTS_support_unix) $(OBJECTS_threadproc_unix) $(OBJECTS_time_unix) $(OBJECTS_user_unix) -dso/beos/dso.lo: dso/beos/dso.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +dso/beos/dso.lo: dso/beos/dso.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_dso_beos = dso/beos/dso.lo -locks/beos/proc_mutex.lo: locks/beos/proc_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -locks/beos/thread_cond.lo: locks/beos/thread_cond.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -locks/beos/thread_mutex.lo: locks/beos/thread_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -locks/beos/thread_rwlock.lo: locks/beos/thread_rwlock.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +locks/beos/proc_mutex.lo: locks/beos/proc_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +locks/beos/thread_cond.lo: locks/beos/thread_cond.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +locks/beos/thread_mutex.lo: locks/beos/thread_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +locks/beos/thread_rwlock.lo: locks/beos/thread_rwlock.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_locks_beos = locks/beos/proc_mutex.lo locks/beos/thread_cond.lo locks/beos/thread_mutex.lo locks/beos/thread_rwlock.lo @@ -152,13 +157,13 @@ OBJECTS_network_io_beos = network_io/beos/sendrecv.lo network_io/beos/socketcommon.lo -shmem/beos/shm.lo: shmem/beos/shm.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +shmem/beos/shm.lo: shmem/beos/shm.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_shmem_beos = shmem/beos/shm.lo threadproc/beos/apr_proc_stub.lo: threadproc/beos/apr_proc_stub.c .make.dirs -threadproc/beos/proc.lo: threadproc/beos/proc.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h -threadproc/beos/thread.lo: threadproc/beos/thread.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +threadproc/beos/proc.lo: threadproc/beos/proc.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h +threadproc/beos/thread.lo: threadproc/beos/thread.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h threadproc/beos/threadpriv.lo: threadproc/beos/threadpriv.c .make.dirs threadproc/beos/threadproc_common.lo: threadproc/beos/threadproc_common.c .make.dirs @@ -166,154 +171,155 @@ OBJECTS_beos = $(OBJECTS_all) $(OBJECTS_atomic_unix) $(OBJECTS_dso_beos) $(OBJECTS_file_io_unix) $(OBJECTS_locks_beos) $(OBJECTS_memory_unix) $(OBJECTS_misc_unix) $(OBJECTS_mmap_unix) $(OBJECTS_network_io_beos) $(OBJECTS_poll_unix) $(OBJECTS_random_unix) $(OBJECTS_shmem_beos) $(OBJECTS_support_unix) $(OBJECTS_threadproc_beos) $(OBJECTS_time_unix) $(OBJECTS_user_unix) -dso/os2/dso.lo: dso/os2/dso.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +dso/os2/dso.lo: dso/os2/dso.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_dso_os2 = dso/os2/dso.lo -file_io/os2/buffer.lo: file_io/os2/buffer.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_want.h +file_io/os2/buffer.lo: file_io/os2/buffer.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h file_io/os2/copy.lo: file_io/os2/copy.c .make.dirs -file_io/os2/dir.lo: file_io/os2/dir.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +file_io/os2/dir.lo: file_io/os2/dir.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h file_io/os2/dir_make_recurse.lo: file_io/os2/dir_make_recurse.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h file_io/os2/fileacc.lo: file_io/os2/fileacc.c .make.dirs file_io/os2/filedup.lo: file_io/os2/filedup.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h file_io/os2/filepath.lo: file_io/os2/filepath.c .make.dirs file_io/os2/filepath_util.lo: file_io/os2/filepath_util.c .make.dirs file_io/os2/filestat.lo: file_io/os2/filestat.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h -file_io/os2/filesys.lo: file_io/os2/filesys.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h +file_io/os2/filesys.lo: file_io/os2/filesys.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h file_io/os2/flock.lo: file_io/os2/flock.c .make.dirs file_io/os2/fullrw.lo: file_io/os2/fullrw.c .make.dirs file_io/os2/maperrorcode.lo: file_io/os2/maperrorcode.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h file_io/os2/mktemp.lo: file_io/os2/mktemp.c .make.dirs -file_io/os2/open.lo: file_io/os2/open.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -file_io/os2/pipe.lo: file_io/os2/pipe.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +file_io/os2/open.lo: file_io/os2/open.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +file_io/os2/pipe.lo: file_io/os2/pipe.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h file_io/os2/readwrite.lo: file_io/os2/readwrite.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h file_io/os2/seek.lo: file_io/os2/seek.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h file_io/os2/tempdir.lo: file_io/os2/tempdir.c .make.dirs OBJECTS_file_io_os2 = file_io/os2/buffer.lo file_io/os2/copy.lo file_io/os2/dir.lo file_io/os2/dir_make_recurse.lo file_io/os2/fileacc.lo file_io/os2/filedup.lo file_io/os2/filepath.lo file_io/os2/filepath_util.lo file_io/os2/filestat.lo file_io/os2/filesys.lo file_io/os2/flock.lo file_io/os2/fullrw.lo file_io/os2/maperrorcode.lo file_io/os2/mktemp.lo file_io/os2/open.lo file_io/os2/pipe.lo file_io/os2/readwrite.lo file_io/os2/seek.lo file_io/os2/tempdir.lo -locks/os2/proc_mutex.lo: locks/os2/proc_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -locks/os2/thread_cond.lo: locks/os2/thread_cond.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -locks/os2/thread_mutex.lo: locks/os2/thread_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -locks/os2/thread_rwlock.lo: locks/os2/thread_rwlock.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +locks/os2/proc_mutex.lo: locks/os2/proc_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +locks/os2/thread_cond.lo: locks/os2/thread_cond.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +locks/os2/thread_mutex.lo: locks/os2/thread_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +locks/os2/thread_rwlock.lo: locks/os2/thread_rwlock.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_locks_os2 = locks/os2/proc_mutex.lo locks/os2/thread_cond.lo locks/os2/thread_mutex.lo locks/os2/thread_rwlock.lo network_io/os2/inet_ntop.lo: network_io/os2/inet_ntop.c .make.dirs network_io/os2/inet_pton.lo: network_io/os2/inet_pton.c .make.dirs -network_io/os2/os2calls.lo: network_io/os2/os2calls.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -network_io/os2/sendrecv.lo: network_io/os2/sendrecv.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h -network_io/os2/sendrecv_udp.lo: network_io/os2/sendrecv_udp.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h +network_io/os2/os2calls.lo: network_io/os2/os2calls.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +network_io/os2/sendrecv.lo: network_io/os2/sendrecv.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h +network_io/os2/sendrecv_udp.lo: network_io/os2/sendrecv_udp.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h network_io/os2/sockaddr.lo: network_io/os2/sockaddr.c .make.dirs network_io/os2/socket_util.lo: network_io/os2/socket_util.c .make.dirs -network_io/os2/sockets.lo: network_io/os2/sockets.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -network_io/os2/sockopt.lo: network_io/os2/sockopt.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h +network_io/os2/sockets.lo: network_io/os2/sockets.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +network_io/os2/sockopt.lo: network_io/os2/sockopt.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_network_io_os2 = network_io/os2/inet_ntop.lo network_io/os2/inet_pton.lo network_io/os2/os2calls.lo network_io/os2/sendrecv.lo network_io/os2/sendrecv_udp.lo network_io/os2/sockaddr.lo network_io/os2/socket_util.lo network_io/os2/sockets.lo network_io/os2/sockopt.lo -poll/os2/poll.lo: poll/os2/poll.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_poll.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h -poll/os2/pollset.lo: poll/os2/pollset.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_poll.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h +poll/os2/poll.lo: poll/os2/poll.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_poll.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h +poll/os2/pollset.lo: poll/os2/pollset.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_poll.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_poll_os2 = poll/os2/poll.lo poll/os2/pollset.lo -shmem/os2/shm.lo: shmem/os2/shm.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +shmem/os2/shm.lo: shmem/os2/shm.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_shmem_os2 = shmem/os2/shm.lo -threadproc/os2/proc.lo: threadproc/os2/proc.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_signal.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +threadproc/os2/proc.lo: threadproc/os2/proc.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_signal.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h threadproc/os2/signals.lo: threadproc/os2/signals.c .make.dirs -threadproc/os2/thread.lo: threadproc/os2/thread.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -threadproc/os2/threadpriv.lo: threadproc/os2/threadpriv.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +threadproc/os2/thread.lo: threadproc/os2/thread.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +threadproc/os2/threadpriv.lo: threadproc/os2/threadpriv.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_threadproc_os2 = threadproc/os2/proc.lo threadproc/os2/signals.lo threadproc/os2/thread.lo threadproc/os2/threadpriv.lo OBJECTS_os2 = $(OBJECTS_all) $(OBJECTS_atomic_unix) $(OBJECTS_dso_os2) $(OBJECTS_file_io_os2) $(OBJECTS_locks_os2) $(OBJECTS_memory_unix) $(OBJECTS_misc_unix) $(OBJECTS_mmap_unix) $(OBJECTS_network_io_os2) $(OBJECTS_poll_os2) $(OBJECTS_random_unix) $(OBJECTS_shmem_os2) $(OBJECTS_support_unix) $(OBJECTS_threadproc_os2) $(OBJECTS_time_unix) $(OBJECTS_user_unix) -dso/os390/dso.lo: dso/os390/dso.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +dso/os390/dso.lo: dso/os390/dso.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_dso_os390 = dso/os390/dso.lo -atomic/os390/atomic.lo: atomic/os390/atomic.c .make.dirs include/apr_allocator.h include/apr_atomic.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_want.h +atomic/os390/atomic.lo: atomic/os390/atomic.c .make.dirs OBJECTS_atomic_os390 = atomic/os390/atomic.lo OBJECTS_os390 = $(OBJECTS_all) $(OBJECTS_atomic_os390) $(OBJECTS_dso_os390) $(OBJECTS_file_io_unix) $(OBJECTS_locks_unix) $(OBJECTS_memory_unix) $(OBJECTS_misc_unix) $(OBJECTS_mmap_unix) $(OBJECTS_network_io_unix) $(OBJECTS_poll_unix) $(OBJECTS_random_unix) $(OBJECTS_shmem_unix) $(OBJECTS_support_unix) $(OBJECTS_threadproc_unix) $(OBJECTS_time_unix) $(OBJECTS_user_unix) -dso/win32/dso.lo: dso/win32/dso.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h +dso/win32/dso.lo: dso/win32/dso.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h OBJECTS_dso_win32 = dso/win32/dso.lo -file_io/win32/buffer.lo: file_io/win32/buffer.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_want.h -file_io/win32/dir.lo: file_io/win32/dir.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +file_io/win32/buffer.lo: file_io/win32/buffer.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h +file_io/win32/dir.lo: file_io/win32/dir.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h file_io/win32/filedup.lo: file_io/win32/filedup.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h -file_io/win32/filepath.lo: file_io/win32/filepath.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h +file_io/win32/filepath.lo: file_io/win32/filepath.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h file_io/win32/filestat.lo: file_io/win32/filestat.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h -file_io/win32/filesys.lo: file_io/win32/filesys.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h +file_io/win32/filesys.lo: file_io/win32/filesys.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h file_io/win32/flock.lo: file_io/win32/flock.c .make.dirs -file_io/win32/open.lo: file_io/win32/open.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +file_io/win32/open.lo: file_io/win32/open.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h file_io/win32/pipe.lo: file_io/win32/pipe.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_escape.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h file_io/win32/readwrite.lo: file_io/win32/readwrite.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h file_io/win32/seek.lo: file_io/win32/seek.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_file_io_win32 = file_io/unix/copy.lo file_io/unix/fileacc.lo file_io/unix/filepath_util.lo file_io/unix/fullrw.lo file_io/unix/mktemp.lo file_io/unix/tempdir.lo file_io/win32/buffer.lo file_io/win32/dir.lo file_io/win32/filedup.lo file_io/win32/filepath.lo file_io/win32/filestat.lo file_io/win32/filesys.lo file_io/win32/flock.lo file_io/win32/open.lo file_io/win32/pipe.lo file_io/win32/readwrite.lo file_io/win32/seek.lo -locks/win32/proc_mutex.lo: locks/win32/proc_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -locks/win32/thread_cond.lo: locks/win32/thread_cond.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -locks/win32/thread_mutex.lo: locks/win32/thread_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -locks/win32/thread_rwlock.lo: locks/win32/thread_rwlock.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +locks/win32/proc_mutex.lo: locks/win32/proc_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +locks/win32/thread_cond.lo: locks/win32/thread_cond.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +locks/win32/thread_mutex.lo: locks/win32/thread_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +locks/win32/thread_rwlock.lo: locks/win32/thread_rwlock.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_locks_win32 = locks/win32/proc_mutex.lo locks/win32/thread_cond.lo locks/win32/thread_mutex.lo locks/win32/thread_rwlock.lo -misc/win32/charset.lo: misc/win32/charset.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -misc/win32/env.lo: misc/win32/env.c .make.dirs include/apr_allocator.h include/apr_env.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h +misc/win32/charset.lo: misc/win32/charset.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +misc/win32/env.lo: misc/win32/env.c .make.dirs include/apr_allocator.h include/apr_env.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h misc/win32/internal.lo: misc/win32/internal.c .make.dirs misc/win32/misc.lo: misc/win32/misc.c .make.dirs include/apr_errno.h include/apr_lib.h -misc/win32/rand.lo: misc/win32/rand.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -misc/win32/start.lo: misc/win32/start.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_signal.h include/apr_thread_mutex.h include/apr_want.h +misc/win32/rand.lo: misc/win32/rand.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +misc/win32/start.lo: misc/win32/start.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_signal.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h misc/win32/utf8.lo: misc/win32/utf8.c .make.dirs include/apr_errno.h OBJECTS_misc_win32 = misc/unix/errorcodes.lo misc/unix/getopt.lo misc/unix/otherchild.lo misc/unix/version.lo misc/win32/charset.lo misc/win32/env.lo misc/win32/internal.lo misc/win32/misc.lo misc/win32/rand.lo misc/win32/start.lo misc/win32/utf8.lo -mmap/win32/mmap.lo: mmap/win32/mmap.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_mmap.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_ring.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +mmap/win32/mmap.lo: mmap/win32/mmap.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_mmap.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_ring.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_mmap_win32 = mmap/unix/common.lo mmap/win32/mmap.lo -network_io/win32/sendrecv.lo: network_io/win32/sendrecv.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h -network_io/win32/sockets.lo: network_io/win32/sockets.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -network_io/win32/sockopt.lo: network_io/win32/sockopt.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h +network_io/win32/sendrecv.lo: network_io/win32/sendrecv.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h +network_io/win32/sockets.lo: network_io/win32/sockets.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +network_io/win32/sockopt.lo: network_io/win32/sockopt.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_network_io_win32 = network_io/unix/inet_ntop.lo network_io/unix/inet_pton.lo network_io/unix/multicast.lo network_io/unix/sockaddr.lo network_io/unix/socket_util.lo network_io/win32/sendrecv.lo network_io/win32/sockets.lo network_io/win32/sockopt.lo -shmem/win32/shm.lo: shmem/win32/shm.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h +shmem/win32/shm.lo: shmem/win32/shm.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_perms_set.h include/apr_pools.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_shmem_win32 = shmem/win32/shm.lo -threadproc/win32/proc.lo: threadproc/win32/proc.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -threadproc/win32/signals.lo: threadproc/win32/signals.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_signal.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -threadproc/win32/thread.lo: threadproc/win32/thread.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -threadproc/win32/threadpriv.lo: threadproc/win32/threadpriv.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +threadproc/win32/proc.lo: threadproc/win32/proc.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +threadproc/win32/signals.lo: threadproc/win32/signals.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_perms_set.h include/apr_pools.h include/apr_signal.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +threadproc/win32/thread.lo: threadproc/win32/thread.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +threadproc/win32/threadpriv.lo: threadproc/win32/threadpriv.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_threadproc_win32 = threadproc/win32/proc.lo threadproc/win32/signals.lo threadproc/win32/thread.lo threadproc/win32/threadpriv.lo -time/win32/time.lo: time/win32/time.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -time/win32/timestr.lo: time/win32/timestr.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +time/win32/time.lo: time/win32/time.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_lib.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +time/win32/timestr.lo: time/win32/timestr.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_time_win32 = time/win32/time.lo time/win32/timestr.lo -user/win32/groupinfo.lo: user/win32/groupinfo.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h -user/win32/userinfo.lo: user/win32/userinfo.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +user/win32/groupinfo.lo: user/win32/groupinfo.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h +user/win32/userinfo.lo: user/win32/userinfo.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_perms_set.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h OBJECTS_user_win32 = user/win32/groupinfo.lo user/win32/userinfo.lo -atomic/win32/apr_atomic.lo: atomic/win32/apr_atomic.c .make.dirs include/apr_allocator.h include/apr_atomic.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_want.h +atomic/win32/apr_atomic.lo: atomic/win32/apr_atomic.c .make.dirs +atomic/win32/apr_atomic64.lo: atomic/win32/apr_atomic64.c .make.dirs include/apr_allocator.h include/apr_atomic.h include/apr_errno.h include/apr_general.h include/apr_pools.h include/apr_thread_mutex.h include/apr_time.h include/apr_want.h -OBJECTS_atomic_win32 = atomic/win32/apr_atomic.lo +OBJECTS_atomic_win32 = atomic/win32/apr_atomic.lo atomic/win32/apr_atomic64.lo OBJECTS_win32 = $(OBJECTS_all) $(OBJECTS_atomic_win32) $(OBJECTS_dso_win32) $(OBJECTS_file_io_win32) $(OBJECTS_locks_win32) $(OBJECTS_memory_unix) $(OBJECTS_misc_win32) $(OBJECTS_mmap_win32) $(OBJECTS_network_io_win32) $(OBJECTS_poll_unix) $(OBJECTS_random_unix) $(OBJECTS_shmem_win32) $(OBJECTS_support_unix) $(OBJECTS_threadproc_win32) $(OBJECTS_time_win32) $(OBJECTS_user_win32) -HEADERS = $(top_srcdir)/include/apr_allocator.h $(top_srcdir)/include/apr_atomic.h $(top_srcdir)/include/apr_dso.h $(top_srcdir)/include/apr_env.h $(top_srcdir)/include/apr_errno.h $(top_srcdir)/include/apr_escape.h $(top_srcdir)/include/apr_file_info.h $(top_srcdir)/include/apr_file_io.h $(top_srcdir)/include/apr_fnmatch.h $(top_srcdir)/include/apr_general.h $(top_srcdir)/include/apr_getopt.h $(top_srcdir)/include/apr_global_mutex.h $(top_srcdir)/include/apr_hash.h $(top_srcdir)/include/apr_inherit.h $(top_srcdir)/include/apr_lib.h $(top_srcdir)/include/apr_mmap.h $(top_srcdir)/include/apr_network_io.h $(top_srcdir)/include/apr_poll.h $(top_srcdir)/include/apr_pools.h $(top_srcdir)/include/apr_portable.h $(top_srcdir)/include/apr_proc_mutex.h $(top_srcdir)/include/apr_random.h $(top_srcdir)/include/apr_ring.h $(top_srcdir)/include/apr_shm.h $(top_srcdir)/include/apr_signal.h $(top_srcdir)/include/apr_skiplist.h $(top_srcdir)/include/apr_strings.h $(top_srcdir)/include/apr_support.h $(top_srcdir)/include/apr_tables.h $(top_srcdir)/include/apr_thread_cond.h $(top_srcdir)/include/apr_thread_mutex.h $(top_srcdir)/include/apr_thread_proc.h $(top_srcdir)/include/apr_thread_rwlock.h $(top_srcdir)/include/apr_time.h $(top_srcdir)/include/apr_user.h $(top_srcdir)/include/apr_version.h $(top_srcdir)/include/apr_want.h +HEADERS = $(top_srcdir)/include/apr_allocator.h $(top_srcdir)/include/apr_atomic.h $(top_srcdir)/include/apr_cstr.h $(top_srcdir)/include/apr_dso.h $(top_srcdir)/include/apr_encode.h $(top_srcdir)/include/apr_env.h $(top_srcdir)/include/apr_errno.h $(top_srcdir)/include/apr_escape.h $(top_srcdir)/include/apr_file_info.h $(top_srcdir)/include/apr_file_io.h $(top_srcdir)/include/apr_fnmatch.h $(top_srcdir)/include/apr_general.h $(top_srcdir)/include/apr_getopt.h $(top_srcdir)/include/apr_global_mutex.h $(top_srcdir)/include/apr_hash.h $(top_srcdir)/include/apr_inherit.h $(top_srcdir)/include/apr_lib.h $(top_srcdir)/include/apr_mmap.h $(top_srcdir)/include/apr_network_io.h $(top_srcdir)/include/apr_perms_set.h $(top_srcdir)/include/apr_poll.h $(top_srcdir)/include/apr_pools.h $(top_srcdir)/include/apr_portable.h $(top_srcdir)/include/apr_proc_mutex.h $(top_srcdir)/include/apr_random.h $(top_srcdir)/include/apr_ring.h $(top_srcdir)/include/apr_shm.h $(top_srcdir)/include/apr_signal.h $(top_srcdir)/include/apr_skiplist.h $(top_srcdir)/include/apr_strings.h $(top_srcdir)/include/apr_support.h $(top_srcdir)/include/apr_tables.h $(top_srcdir)/include/apr_thread_cond.h $(top_srcdir)/include/apr_thread_mutex.h $(top_srcdir)/include/apr_thread_proc.h $(top_srcdir)/include/apr_thread_rwlock.h $(top_srcdir)/include/apr_time.h $(top_srcdir)/include/apr_user.h $(top_srcdir)/include/apr_version.h $(top_srcdir)/include/apr_want.h -SOURCE_DIRS = random/unix misc/win32 encoding dso/os2 time/unix network_io/win32 dso/win32 locks/unix user/unix time/win32 locks/beos tables support/unix file_io/unix mmap/unix atomic/unix threadproc/win32 poll/os2 atomic/win32 dso/os390 atomic/os390 dso/beos poll/unix passwd network_io/beos threadproc/os2 network_io/os2 shmem/win32 threadproc/beos shmem/unix network_io/unix file_io/os2 mmap/win32 dso/aix file_io/win32 threadproc/unix misc/unix locks/win32 shmem/beos dso/unix locks/os2 user/win32 shmem/os2 memory/unix strings $(EXTRA_SOURCE_DIRS) +SOURCE_DIRS = encoding passwd strings tables dso/unix file_io/unix locks/unix memory/unix misc/unix mmap/unix network_io/unix poll/unix random/unix shmem/unix support/unix threadproc/unix time/unix user/unix atomic/unix dso/aix dso/beos locks/beos network_io/beos shmem/beos threadproc/beos dso/os2 file_io/os2 locks/os2 network_io/os2 poll/os2 shmem/os2 threadproc/os2 dso/os390 atomic/os390 dso/win32 file_io/win32 locks/win32 misc/win32 mmap/win32 network_io/win32 shmem/win32 threadproc/win32 time/win32 user/win32 atomic/win32 $(EXTRA_SOURCE_DIRS) BUILD_DIRS = atomic atomic/os390 atomic/unix atomic/win32 dso dso/aix dso/beos dso/os2 dso/os390 dso/unix dso/win32 encoding file_io file_io/os2 file_io/unix file_io/win32 locks locks/beos locks/os2 locks/unix locks/win32 memory memory/unix misc misc/unix misc/win32 mmap mmap/unix mmap/win32 network_io network_io/beos network_io/os2 network_io/unix network_io/win32 passwd poll poll/os2 poll/unix random random/unix shmem shmem/beos shmem/os2 shmem/unix shmem/win32 strings support support/unix tables threadproc threadproc/beos threadproc/os2 threadproc/unix threadproc/win32 time time/unix time/win32 user user/unix user/win32 Index: contrib/apr/buildconf =================================================================== --- contrib/apr/buildconf +++ contrib/apr/buildconf @@ -112,8 +112,10 @@ # Remove autoconf 2.5x's cache directory rm -rf autom4te*.cache +PYTHON=${PYTHON-`build/PrintPath python3 python2 python`} + echo "buildconf: generating 'make' outputs ..." -build/gen-build.py $verbose make +${PYTHON} build/gen-build.py $verbose make # Create RPM Spec file if [ -f `which cut` ]; then Index: contrib/apr/config.layout =================================================================== --- contrib/apr/config.layout +++ contrib/apr/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 Index: contrib/apr/configure =================================================================== --- contrib/apr/configure +++ contrib/apr/configure @@ -655,7 +655,9 @@ apr_procattr_user_set_requires_password apr_has_xthread_files have_unicode_fs +apr_has_timedlocks have_ipv6 +have_sockaddr_un have_sa_storage have_sctp acceptfilter @@ -677,6 +679,8 @@ hasposixser hassysvser hasflockser +have_pthread_condattr_setpshared +have_pthread_mutex_timedlock have_union_semun struct_rlimit have_proc_invoked @@ -707,8 +711,8 @@ ssize_t_value size_t_value off_t_value +uint64_value int64_value -long_value int_value short_value voidp_size @@ -743,6 +747,7 @@ netdbh limitsh ioh +inttypesh fcntlh direnth errnoh @@ -800,6 +805,7 @@ link lt_compile installbuilddir +LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO @@ -906,6 +912,7 @@ enable_static with_pic enable_fast_install +with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock @@ -920,14 +927,18 @@ 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 with_devrandom enable_ipv6 +enable_timedlocks ' ac_precious_vars='build_alias host_alias @@ -937,7 +948,8 @@ LDFLAGS LIBS CPPFLAGS -CPP' +CPP +LT_SYS_LIBRARY_PATH' # Initialize some variables set by options. @@ -1567,21 +1579,30 @@ --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. + --disable-timedlocks Disable timed locks Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --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 +1616,8 @@ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory 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. @@ -2896,6 +2919,10 @@ + + + + @@ -2903,9 +2930,7 @@ # 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 +2939,7 @@ -# serial 57 LT_INIT +# serial 58 LT_INIT # LT_PREREQ(VERSION) @@ -2974,16 +2999,23 @@ +# _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 +3031,9 @@ # _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 +3044,7 @@ # 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 +3132,8 @@ # _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 +3168,7 @@ # _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 +3189,8 @@ # 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 +3203,7 @@ # 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 +3406,8 @@ # ----------------------- # 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 +3578,12 @@ # _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 +3592,7 @@ # _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 +3619,7 @@ # _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 +3681,18 @@ # _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 +3759,13 @@ # _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 +3818,7 @@ # ------------------------ # 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 +3826,7 @@ # -------------------------- # 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 +3843,7 @@ # rather than the libtool script. # _LT_FUNC_STRIPNAME_CNF + # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose @@ -3799,7 +3857,7 @@ # -------------------------- # 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 +3865,7 @@ # ------------------------- # 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 +3873,7 @@ # -------------------------- # 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 +3881,7 @@ # -------------------------- # 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 +3889,7 @@ # ------------------------- # 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 +4005,17 @@ # _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 +4043,7 @@ # ------------ # 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 +4051,7 @@ # 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 +4106,15 @@ # 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 +4224,9 @@ # _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 +4281,9 @@ # _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 +4338,9 @@ # _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 +4389,23 @@ +# _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 +4448,7 @@ # 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 +4457,7 @@ # @configure_input@ -# serial 3337 ltversion.m4 +# serial 4179 ltversion.m4 # This file is part of GNU Libtool @@ -4409,7 +4467,8 @@ # 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 +4479,7 @@ # 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. # @@ -7234,6 +7293,16 @@ done fi + if test $PLATOSVERS -eq 10; then + # pthread_mutex_timedlock is broken on Solaris 10. + # It can block without timeout in case of EDEADLK. + + if test -z "$ac_cv_func_pthread_mutex_timedlock"; then + test "x$silent" != "xyes" && echo " setting ac_cv_func_pthread_mutex_timedlock to \"no\"" + ac_cv_func_pthread_mutex_timedlock="no" + fi + + fi if test $PLATOSVERS -ge 10; then if test -z "$apr_lock_method"; then @@ -10657,8 +10726,8 @@ -macro_version='2.4.2' -macro_revision='1.3337' +macro_version='2.4.6' +macro_revision='2.4.6' @@ -10672,7 +10741,7 @@ -ltmain="$ac_aux_dir/ltmain.sh" +ltmain=$ac_aux_dir/ltmain.sh # Backslashify metacharacters that are still active within # double-quoted strings. @@ -10721,7 +10790,7 @@ $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 +10983,19 @@ # 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 +11009,7 @@ 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 +11020,7 @@ 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 +11031,32 @@ $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 &5 $as_echo "$LD" >&6; } @@ -11030,33 +11099,38 @@ 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 +11141,15 @@ 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 +11255,9 @@ 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 +11265,8 @@ esac fi - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" + if test : != "$DUMPBIN"; then + NM=$DUMPBIN fi fi test -z "$NM" && NM=nm @@ -11232,7 +11306,7 @@ $as_echo_n "(cached) " >&6 else i=0 - teststring="ABCD" + teststring=ABCD case $build_os in msdosdjgpp*) @@ -11272,7 +11346,7 @@ 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 +11396,23 @@ ;; *) 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 +11430,7 @@ 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 +11448,6 @@ : ${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 +11570,13 @@ 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 +11701,13 @@ # 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 +11734,7 @@ # 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 +11770,6 @@ fi ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -11762,7 +11808,7 @@ ;; # 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 +11830,8 @@ 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 +11884,9 @@ tpf*) lt_cv_deplibs_check_method=pass_all ;; +os2*) + lt_cv_deplibs_check_method=pass_all + ;; esac fi @@ -11992,8 +12041,8 @@ 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 +12054,7 @@ ;; *) # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" + lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac @@ -12159,7 +12208,7 @@ 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 +12216,7 @@ 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 +12229,7 @@ { $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 +12446,7 @@ if test -n "$RANLIB"; then case $host_os in - openbsd*) + bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) @@ -12487,7 +12536,7 @@ symcode='[ABCDGISTW]' ;; hpux*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; @@ -12520,14 +12569,44 @@ 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 +12624,24 @@ # 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 +12689,11 @@ 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 +12719,7 @@ { { "@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 +12739,13 @@ 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 +12766,7 @@ 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= @@ -12726,6 +12808,16 @@ + + + + + + + + + + @@ -12749,9 +12841,9 @@ 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 +12853,8 @@ 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 +12866,99 @@ +{ $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 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 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 +12967,25 @@ 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 +13014,50 @@ 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 +13071,19 @@ 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 ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -12877,7 +13102,10 @@ 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 +13123,7 @@ *-*-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 +13163,14 @@ 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 +13182,7 @@ 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 +13191,7 @@ 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 +13207,7 @@ ;; 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 +13318,7 @@ 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 +13821,7 @@ $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 +13839,7 @@ 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 +13878,7 @@ 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 +13907,7 @@ _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 +13920,32 @@ $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 +13953,41 @@ ;; 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 +14022,14 @@ *) 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 +14053,14 @@ *) 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 +14084,14 @@ *) 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 +14099,6 @@ fi -test -z "$pic_mode" && pic_mode=default - @@ -13852,14 +14114,14 @@ *) 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 +14135,63 @@ + 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 +14240,7 @@ -if test -n "${ZSH_VERSION+set}" ; then +if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi @@ -13965,7 +14279,7 @@ # 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 +14290,14 @@ 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 +14306,8 @@ 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 +14322,22 @@ 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 +14360,13 @@ 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 +14388,22 @@ 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 +14426,13 @@ 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 +14453,7 @@ # 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 +14515,7 @@ 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 +14531,7 @@ 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 +14561,7 @@ { $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 +14579,18 @@ 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 +14601,8 @@ ;; 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 +14618,11 @@ # 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 +14693,7 @@ 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 +14701,29 @@ 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 +14739,7 @@ ;; 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 +14748,9 @@ 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 +14775,12 @@ 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 +14878,7 @@ ;; 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 +14907,7 @@ 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 +14939,7 @@ 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 +14969,7 @@ { $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 +15001,7 @@ $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 +15020,13 @@ 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 +15146,8 @@ -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 +15159,9 @@ 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 +15204,9 @@ # 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 +15221,7 @@ # 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 +15229,7 @@ # 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 +15239,7 @@ # 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 +15261,24 @@ 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 +15291,7 @@ 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 +15310,7 @@ 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 +15326,7 @@ allow_undefined_flag=unsupported # Joseph Beckenbach 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 +15336,7 @@ # _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 +15344,89 @@ 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 +15437,47 @@ 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 +15491,8 @@ 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 +15510,8 @@ _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 +15523,7 @@ 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 +15538,9 @@ # 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 +15557,15 @@ *) 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 +15581,7 @@ # 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 +15589,57 @@ ;; 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 +15658,21 @@ 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 +15691,42 @@ ;; 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 +15761,7 @@ 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 +15769,17 @@ 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 +15814,7 @@ 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 +15822,33 @@ 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 +15857,7 @@ 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 +15887,17 @@ # 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 +15906,18 @@ # 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 +15926,7 @@ # 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 +15945,24 @@ 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 +16004,33 @@ ;; 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 +16038,25 @@ ;; 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 +16068,7 @@ $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 +16087,14 @@ 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 +16102,8 @@ ;; 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 +16114,7 @@ *) 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 +16125,8 @@ ;; 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 +16136,8 @@ 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 +16149,34 @@ 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 +16191,7 @@ 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 +16199,19 @@ *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 +16222,53 @@ 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 +16279,24 @@ 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 +16306,11 @@ 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 +16320,10 @@ ;; 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 +16372,43 @@ ;; 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 +16423,10 @@ ;; 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 +16434,7 @@ { $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 +16460,7 @@ # 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 +16675,14 @@ { $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 +16698,35 @@ ;; 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 +16740,7 @@ # 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 +16749,7 @@ library_names_spec= libname_spec='lib$name' soname_spec= -shrext_cmds=".so" +shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -16315,14 +16766,16 @@ # 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 +16783,91 @@ 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.so # instead of lib.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 +16877,18 @@ 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 +16896,8 @@ 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 +16909,7 @@ cygwin* | mingw* | pw32* | cegcc*) version_type=windows - shrext_cmds=".dll" + shrext_cmds=.dll need_version=no need_lib_prefix=no @@ -16415,8 +16918,8 @@ # 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 +16935,17 @@ 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 +16954,8 @@ *,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 +16982,7 @@ 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 +16995,8 @@ 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 +17009,7 @@ *) # 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 +17022,8 @@ 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 +17036,8 @@ 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 +17055,13 @@ 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 +17086,15 @@ 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 +17112,15 @@ 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 +17128,8 @@ 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 +17138,8 @@ 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 +17152,8 @@ 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 +17164,7 @@ 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 +17172,8 @@ 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 +17192,8 @@ 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,14 +17202,34 @@ dynamic_linker=no ;; -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux # correct to gnu/linux during the next big refactor +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}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + 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 | 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' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -16758,10 +17272,18 @@ # 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 +17300,12 @@ 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 +17315,7 @@ 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 +17324,68 @@ 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 +17396,8 @@ 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 +17407,11 @@ 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 +17419,8 @@ 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 +17441,24 @@ ;; 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 +17476,7 @@ 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 +17484,8 @@ 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 +17495,35 @@ 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 +17620,15 @@ 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 +17643,12 @@ { $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 +17658,7 @@ - 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 +17668,23 @@ 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 +17722,10 @@ { $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 +17733,18 @@ ;; + 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 +17783,11 @@ { $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 +17826,7 @@ { $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 +17865,7 @@ { $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 +17904,7 @@ { $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 +17925,21 @@ ;; 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 +17947,7 @@ 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 +17994,9 @@ # 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 +18026,7 @@ (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 +18046,14 @@ { $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 +18100,9 @@ # 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 +18132,7 @@ (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 +18153,9 @@ $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 +18199,7 @@ # 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 +18227,7 @@ - # 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 +18235,13 @@ { $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 +18249,12 @@ ;; 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 +18264,7 @@ { $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 +18278,7 @@ 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 @@ -17744,8 +18303,12 @@ # get libtool's setting of shlibpath_var - eval `grep "^shlibpath_var=[A-Z_]*$" $apr_builddir/libtool` if test "x$shlibpath_var" = "x"; then + eval `grep "^shlibpath_var=[A-Z_]*$" $apr_builddir/libtool` + fi + if test "x$shlibpath_var" = "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: SHLIBPATH variable could not be determined" >&5 +$as_echo "$as_me: SHLIBPATH variable could not be determined" >&6;} shlibpath_var=REPLACE_WITH_YOUR_SHLIBPATH_VAR fi fi @@ -17756,8 +18319,6 @@ # 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 +18516,31 @@ 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 +19237,11 @@ ;; 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 +19269,11 @@ 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" @@ -19971,54 +20567,15 @@ fi fi -ac_cv_define_READDIR_IS_THREAD_SAFE=no +ac_cv_define_READDIR_IS_THREAD_SAFE=yes ac_cv_define_GETHOSTBYNAME_IS_THREAD_SAFE=no ac_cv_define_GETHOSTBYADDR_IS_THREAD_SAFE=no ac_cv_define_GETSERVBYNAME_IS_THREAD_SAFE=no if test "$threads" = "1"; then echo "APR will use threads" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readdir in -lc_r" >&5 -$as_echo_n "checking for readdir in -lc_r... " >&6; } -if ${ac_cv_lib_c_r_readdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lc_r $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char readdir (); -int -main () -{ -return readdir (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_c_r_readdir=yes -else - ac_cv_lib_c_r_readdir=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_readdir" >&5 -$as_echo "$ac_cv_lib_c_r_readdir" >&6; } -if test "x$ac_cv_lib_c_r_readdir" = xyes; then : $as_echo "#define READDIR_IS_THREAD_SAFE 1" >>confdefs.h -fi - if test "x$apr_gethostbyname_is_thread_safe" = "x"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lc_r" >&5 $as_echo_n "checking for gethostbyname in -lc_r... " >&6; } @@ -20292,6 +20849,87 @@ 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 +21559,8 @@ #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 +21573,26 @@ 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 +#endif +#include + +" +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" @@ -22537,6 +23194,7 @@ errno.h \ fcntl.h \ grp.h \ + inttypes.h \ io.h \ limits.h \ mach-o/dyld.h \ @@ -22614,6 +23272,7 @@ errno.h \ fcntl.h \ grp.h \ + inttypes.h \ io.h \ limits.h \ mach-o/dyld.h \ @@ -22750,6 +23409,7 @@ + # Checking for h_errno in @@ -22911,6 +23571,61 @@ 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 : @@ -23275,32 +23990,32 @@ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 -$as_echo_n "checking size of int... " >&6; } -if ${ac_cv_sizeof_int+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 +$as_echo_n "checking size of short... " >&6; } +if ${ac_cv_sizeof_short+:} false; then : $as_echo_n "(cached) " >&6 else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : else - if test "$ac_cv_type_int" = yes; then + if test "$ac_cv_type_short" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (int) +as_fn_error 77 "cannot compute sizeof (short) See \`config.log' for more details" "$LINENO" 5; } else - ac_cv_sizeof_int=0 + ac_cv_sizeof_short=0 fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 -$as_echo "$ac_cv_sizeof_int" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 +$as_echo "$ac_cv_sizeof_short" >&6; } cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT $ac_cv_sizeof_int +#define SIZEOF_SHORT $ac_cv_sizeof_short _ACEOF @@ -23308,32 +24023,32 @@ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 -$as_echo_n "checking size of long... " >&6; } -if ${ac_cv_sizeof_long+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 +$as_echo_n "checking size of int... " >&6; } +if ${ac_cv_sizeof_int+:} false; then : $as_echo_n "(cached) " >&6 else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : else - if test "$ac_cv_type_long" = yes; then + if test "$ac_cv_type_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (long) +as_fn_error 77 "cannot compute sizeof (int) See \`config.log' for more details" "$LINENO" 5; } else - ac_cv_sizeof_long=0 + ac_cv_sizeof_int=0 fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 +$as_echo "$ac_cv_sizeof_int" >&6; } cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long +#define SIZEOF_INT $ac_cv_sizeof_int _ACEOF @@ -23341,32 +24056,32 @@ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 -$as_echo_n "checking size of short... " >&6; } -if ${ac_cv_sizeof_short+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if ${ac_cv_sizeof_long+:} false; then : $as_echo_n "(cached) " >&6 else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : else - if test "$ac_cv_type_short" = yes; then + if test "$ac_cv_type_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (short) +as_fn_error 77 "cannot compute sizeof (long) See \`config.log' for more details" "$LINENO" 5; } else - ac_cv_sizeof_short=0 + ac_cv_sizeof_long=0 fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 -$as_echo "$ac_cv_sizeof_short" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&6; } cat >>confdefs.h <<_ACEOF -#define SIZEOF_SHORT $ac_cv_sizeof_short +#define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF @@ -23410,16 +24125,227 @@ if test "$ac_cv_sizeof_int" = "4"; then int_value=int fi + # Now we need to find what apr_int64_t (sizeof == 8) will be. -# The first match is our preference. -if test "$ac_cv_sizeof_int" = "8"; then +# The first match is our preference (use inttypes if available). +ac_rc=yes +for ac_spec in header:stdint.h header:inttypes.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 + : + hasinttypes="1" +else + : + hasinttypes="0" +fi + +if test "$hasinttypes" = "1"; then + int64_literal='#define APR_INT64_C(val) INT64_C(val)' + uint64_literal='#define APR_UINT64_C(val) UINT64_C(val)' + int64_t_fmt='#define APR_INT64_T_FMT PRId64' + uint64_t_fmt='#define APR_UINT64_T_FMT PRIu64' + uint64_t_hex_fmt='#define APR_UINT64_T_HEX_FMT PRIx64' + int64_value="int64_t" + uint64_value="uint64_t" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether int64_t and int use fmt %d" >&5 +$as_echo_n "checking whether int64_t and int use fmt %d... " >&6; } +if ${apr_cv_typematch_int64_t_int_d+:} false; then : + $as_echo_n "(cached) " >&6 +else + +apr_save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $CFLAGS_WARN" + if test "$ac_cv_c_compiler_gnu" = "yes"; then + CFLAGS="$CFLAGS -Werror" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "confdefs.h" + + #include +#include +#ifdef HAVE_STDINT_H +#include +#endif + + int main(int argc, const char *const *argv) { + + int64_t chk1, *ptr1; + int chk2, *ptr2 = &chk1; + ptr1 = &chk2; + *ptr1 = *ptr2 = 0; + printf("%d %d", chk1, chk2); + + return 0; } + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + CFLAGS=$apr_save_CFLAGS +apr_cv_typematch_int64_t_int_d=yes +else + CFLAGS=$apr_save_CFLAGS +apr_cv_typematch_int64_t_int_d=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_cv_typematch_int64_t_int_d" >&5 +$as_echo "$apr_cv_typematch_int64_t_int_d" >&6; } +if test "$apr_cv_typematch_int64_t_int_d" = "yes"; then + : + + int64_strfn="strtoi" + +else + : + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether int64_t and long use fmt %ld" >&5 +$as_echo_n "checking whether int64_t and long use fmt %ld... " >&6; } +if ${apr_cv_typematch_int64_t_long_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + +apr_save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $CFLAGS_WARN" + if test "$ac_cv_c_compiler_gnu" = "yes"; then + CFLAGS="$CFLAGS -Werror" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "confdefs.h" + + #include +#include +#ifdef HAVE_STDINT_H +#include +#endif + + int main(int argc, const char *const *argv) { + + int64_t chk1, *ptr1; + long chk2, *ptr2 = &chk1; + ptr1 = &chk2; + *ptr1 = *ptr2 = 0; + printf("%ld %ld", chk1, chk2); + + return 0; } + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + CFLAGS=$apr_save_CFLAGS +apr_cv_typematch_int64_t_long_ld=yes +else + CFLAGS=$apr_save_CFLAGS +apr_cv_typematch_int64_t_long_ld=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_cv_typematch_int64_t_long_ld" >&5 +$as_echo "$apr_cv_typematch_int64_t_long_ld" >&6; } +if test "$apr_cv_typematch_int64_t_long_ld" = "yes"; then + : + + int64_strfn="strtol" + +else + : + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether int64_t and long long use fmt %lld" >&5 +$as_echo_n "checking whether int64_t and long long use fmt %lld... " >&6; } +if ${apr_cv_typematch_int64_t_long_long_lld+:} false; then : + $as_echo_n "(cached) " >&6 +else + +apr_save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $CFLAGS_WARN" + if test "$ac_cv_c_compiler_gnu" = "yes"; then + CFLAGS="$CFLAGS -Werror" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "confdefs.h" + + #include +#include +#ifdef HAVE_STDINT_H +#include +#endif + + int main(int argc, const char *const *argv) { + + int64_t chk1, *ptr1; + long long chk2, *ptr2 = &chk1; + ptr1 = &chk2; + *ptr1 = *ptr2 = 0; + printf("%lld %lld", chk1, chk2); + + return 0; } + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + CFLAGS=$apr_save_CFLAGS +apr_cv_typematch_int64_t_long_long_lld=yes +else + CFLAGS=$apr_save_CFLAGS +apr_cv_typematch_int64_t_long_long_lld=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_cv_typematch_int64_t_long_long_lld" >&5 +$as_echo "$apr_cv_typematch_int64_t_long_long_lld" >&6; } +if test "$apr_cv_typematch_int64_t_long_long_lld" = "yes"; then + : + + int64_strfn="strtoll" + +else + : + + as_fn_error $? "could not determine the string function for int64_t" "$LINENO" 5 + +fi + +fi + +fi + +elif test "$ac_cv_sizeof_int" = "8"; then int64_literal='#define APR_INT64_C(val) (val)' uint64_literal='#define APR_UINT64_C(val) (val##U)' int64_t_fmt='#define APR_INT64_T_FMT "d"' uint64_t_fmt='#define APR_UINT64_T_FMT "u"' uint64_t_hex_fmt='#define APR_UINT64_T_HEX_FMT "x"' int64_value="int" - long_value=int + uint64_value="unsigned int" int64_strfn="strtoi" elif test "$ac_cv_sizeof_long" = "8"; then int64_literal='#define APR_INT64_C(val) (val##L)' @@ -23428,7 +24354,7 @@ uint64_t_fmt='#define APR_UINT64_T_FMT "lu"' uint64_t_hex_fmt='#define APR_UINT64_T_HEX_FMT "lx"' int64_value="long" - long_value=long + uint64_value="unsigned long" int64_strfn="strtol" elif test "$ac_cv_sizeof_long_long" = "8"; then int64_literal='#define APR_INT64_C(val) (val##LL)' @@ -23441,7 +24367,7 @@ uint64_t_fmt='#define APR_UINT64_T_FMT "llu"' uint64_t_hex_fmt='#define APR_UINT64_T_HEX_FMT "llx"' int64_value="long long" - long_value="long long" + uint64_value="unsigned long long" int64_strfn="strtoll" elif test "$ac_cv_sizeof_longlong" = "8"; then int64_literal='#define APR_INT64_C(val) (val##LL)' @@ -23450,7 +24376,7 @@ uint64_t_fmt='#define APR_UINT64_T_FMT "qu"' uint64_t_hex_fmt='#define APR_UINT64_T_HEX_FMT "qx"' int64_value="__int64" - long_value="__int64" + uint64_value="unsigned __int64" int64_strfn="strtoll" else # int64_literal may be overriden if your compiler thinks you have @@ -23639,138 +24565,228 @@ uint64_t_fmt='#define APR_UINT64_T_FMT "I64u"' uint64_t_hex_fmt='#define APR_UINT64_T_HEX_FMT "I64x"' int64_value="__int64" - long_value="__int64" + uint64_value="unsigned __int64" int64_strfn="_strtoi64" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ssize_t and int are the same" >&5 -$as_echo_n "checking whether ssize_t and int are the same... " >&6; } -if ${apr_cv_typematch_ssize_t_int+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ssize_t and long use fmt %ld" >&5 +$as_echo_n "checking whether ssize_t and long use fmt %ld... " >&6; } +if ${apr_cv_typematch_ssize_t_long_ld+:} false; then : $as_echo_n "(cached) " >&6 else -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +apr_save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $CFLAGS_WARN" + if test "$ac_cv_c_compiler_gnu" = "yes"; then + CFLAGS="$CFLAGS -Werror" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -int -main () -{ +#include "confdefs.h" - int foo[0 - !__builtin_types_compatible_p(ssize_t, int)]; + #include +#include +#ifdef HAVE_STDINT_H +#include +#endif + + int main(int argc, const char *const *argv) { + + ssize_t chk1, *ptr1; + long chk2, *ptr2 = &chk1; + ptr1 = &chk2; + *ptr1 = *ptr2 = 0; + printf("%ld %ld", chk1, chk2); + + return 0; } - ; - return 0; -} _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - apr_cv_typematch_ssize_t_int=yes -ssize_t_fmt="d" + CFLAGS=$apr_save_CFLAGS +apr_cv_typematch_ssize_t_long_ld=yes else - apr_cv_typematch_ssize_t_int=no + CFLAGS=$apr_save_CFLAGS +apr_cv_typematch_ssize_t_long_ld=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_cv_typematch_ssize_t_int" >&5 -$as_echo "$apr_cv_typematch_ssize_t_int" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_cv_typematch_ssize_t_long_ld" >&5 +$as_echo "$apr_cv_typematch_ssize_t_long_ld" >&6; } +if test "$apr_cv_typematch_ssize_t_long_ld" = "yes"; then + : + ssize_t_fmt="ld" +else + : -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ssize_t and long are the same" >&5 -$as_echo_n "checking whether ssize_t and long are the same... " >&6; } -if ${apr_cv_typematch_ssize_t_long+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ssize_t and int use fmt %d" >&5 +$as_echo_n "checking whether ssize_t and int use fmt %d... " >&6; } +if ${apr_cv_typematch_ssize_t_int_d+:} false; then : $as_echo_n "(cached) " >&6 else -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +apr_save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $CFLAGS_WARN" + if test "$ac_cv_c_compiler_gnu" = "yes"; then + CFLAGS="$CFLAGS -Werror" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -int -main () -{ +#include "confdefs.h" - int foo[0 - !__builtin_types_compatible_p(ssize_t, long)]; + #include +#include +#ifdef HAVE_STDINT_H +#include +#endif + + int main(int argc, const char *const *argv) { + + ssize_t chk1, *ptr1; + int chk2, *ptr2 = &chk1; + ptr1 = &chk2; + *ptr1 = *ptr2 = 0; + printf("%d %d", chk1, chk2); + + return 0; } - ; - return 0; -} _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - apr_cv_typematch_ssize_t_long=yes -ssize_t_fmt="ld" + CFLAGS=$apr_save_CFLAGS +apr_cv_typematch_ssize_t_int_d=yes else - apr_cv_typematch_ssize_t_long=no + CFLAGS=$apr_save_CFLAGS +apr_cv_typematch_ssize_t_int_d=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_cv_typematch_ssize_t_int_d" >&5 +$as_echo "$apr_cv_typematch_ssize_t_int_d" >&6; } +if test "$apr_cv_typematch_ssize_t_int_d" = "yes"; then + : + ssize_t_fmt="d" +else + : + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_cv_typematch_ssize_t_long" >&5 -$as_echo "$apr_cv_typematch_ssize_t_long" >&6; } +fi + -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether size_t and unsigned int are the same" >&5 -$as_echo_n "checking whether size_t and unsigned int are the same... " >&6; } -if ${apr_cv_typematch_size_t_unsigned_int+:} false; then : + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether size_t and unsigned long use fmt %lu" >&5 +$as_echo_n "checking whether size_t and unsigned long use fmt %lu... " >&6; } +if ${apr_cv_typematch_size_t_unsigned_long_lu+:} false; then : $as_echo_n "(cached) " >&6 else -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +apr_save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $CFLAGS_WARN" + if test "$ac_cv_c_compiler_gnu" = "yes"; then + CFLAGS="$CFLAGS -Werror" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -int -main () -{ +#include "confdefs.h" - int foo[0 - !__builtin_types_compatible_p(size_t, unsigned int)]; + #include +#include +#ifdef HAVE_STDINT_H +#include +#endif + + int main(int argc, const char *const *argv) { + + size_t chk1, *ptr1; + unsigned long chk2, *ptr2 = &chk1; + ptr1 = &chk2; + *ptr1 = *ptr2 = 0; + printf("%lu %lu", chk1, chk2); + + return 0; } - ; - return 0; -} _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - apr_cv_typematch_size_t_unsigned_int=yes -size_t_fmt="u" + CFLAGS=$apr_save_CFLAGS +apr_cv_typematch_size_t_unsigned_long_lu=yes else - apr_cv_typematch_size_t_unsigned_int=no + CFLAGS=$apr_save_CFLAGS +apr_cv_typematch_size_t_unsigned_long_lu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_cv_typematch_size_t_unsigned_int" >&5 -$as_echo "$apr_cv_typematch_size_t_unsigned_int" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_cv_typematch_size_t_unsigned_long_lu" >&5 +$as_echo "$apr_cv_typematch_size_t_unsigned_long_lu" >&6; } +if test "$apr_cv_typematch_size_t_unsigned_long_lu" = "yes"; then + : + size_t_fmt="lu" +else + : -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether size_t and unsigned long are the same" >&5 -$as_echo_n "checking whether size_t and unsigned long are the same... " >&6; } -if ${apr_cv_typematch_size_t_unsigned_long+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether size_t and unsigned int use fmt %u" >&5 +$as_echo_n "checking whether size_t and unsigned int use fmt %u... " >&6; } +if ${apr_cv_typematch_size_t_unsigned_int_u+:} false; then : $as_echo_n "(cached) " >&6 else -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +apr_save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $CFLAGS_WARN" + if test "$ac_cv_c_compiler_gnu" = "yes"; then + CFLAGS="$CFLAGS -Werror" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -int -main () -{ +#include "confdefs.h" - int foo[0 - !__builtin_types_compatible_p(size_t, unsigned long)]; + #include +#include +#ifdef HAVE_STDINT_H +#include +#endif + + int main(int argc, const char *const *argv) { + + size_t chk1, *ptr1; + unsigned int chk2, *ptr2 = &chk1; + ptr1 = &chk2; + *ptr1 = *ptr2 = 0; + printf("%u %u", chk1, chk2); + + return 0; } - ; - return 0; -} _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - apr_cv_typematch_size_t_unsigned_long=yes -size_t_fmt="lu" + CFLAGS=$apr_save_CFLAGS +apr_cv_typematch_size_t_unsigned_int_u=yes else - apr_cv_typematch_size_t_unsigned_long=no + CFLAGS=$apr_save_CFLAGS +apr_cv_typematch_size_t_unsigned_int_u=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_cv_typematch_size_t_unsigned_int_u" >&5 +$as_echo "$apr_cv_typematch_size_t_unsigned_int_u" >&6; } +if test "$apr_cv_typematch_size_t_unsigned_int_u" = "yes"; then + : + size_t_fmt="u" +else + : + +fi + + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_cv_typematch_size_t_unsigned_long" >&5 -$as_echo "$apr_cv_typematch_size_t_unsigned_long" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of ssize_t" >&5 @@ -23880,6 +24896,7 @@ +# else cases below should no longer occur; { $as_echo "$as_me:${as_lineno-$LINENO}: checking which format to use for apr_size_t" >&5 $as_echo_n "checking which format to use for apr_size_t... " >&6; } if test -n "$size_t_fmt"; then @@ -23924,96 +24941,304 @@ exit(0); } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_sizeof_off_t=`cat conftestval` +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_sizeof_off_t=`cat conftestval` +else + ac_cv_sizeof_off_t=0 +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 +$as_echo "$ac_cv_sizeof_off_t" >&6; } + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_OFF_T $ac_cv_sizeof_off_t +_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 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" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_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 + aprlfs=1 +else + aprlfs=0 +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which type to use for apr_off_t" >&5 +$as_echo_n "checking which type to use for apr_off_t... " >&6; } +if test "${ac_cv_sizeof_off_t}${apr_cv_use_lfs64}" = "4yes"; then + # LFS is go! + off_t_fmt='#define APR_OFF_T_FMT APR_INT64_T_FMT' + off_t_value='off64_t' + off_t_strfn='apr_strtoi64' +elif test "${ac_cv_sizeof_off_t}x${ac_cv_sizeof_long}" = "4x4"; then + # Special case: off_t may change size with _FILE_OFFSET_BITS + # on 32-bit systems with LFS support. To avoid compatibility + # issues when other packages do define _FILE_OFFSET_BITS, + # hard-code apr_off_t to long. + off_t_value=long + off_t_fmt='#define APR_OFF_T_FMT "ld"' + off_t_strfn='strtol' +elif test "$ac_cv_type_off_t" = "yes"; then + # off_t is more commonly a long than an int; prefer that case + # where int and long are the same size and interchangable. + off_t_value=off_t + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether off_t and long use fmt %ld" >&5 +$as_echo_n "checking whether off_t and long use fmt %ld... " >&6; } +if ${apr_cv_typematch_off_t_long_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + +apr_save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $CFLAGS_WARN" + if test "$ac_cv_c_compiler_gnu" = "yes"; then + CFLAGS="$CFLAGS -Werror" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "confdefs.h" + + #include +#include +#ifdef HAVE_STDINT_H +#include +#endif + + int main(int argc, const char *const *argv) { + + off_t chk1, *ptr1; + long chk2, *ptr2 = &chk1; + ptr1 = &chk2; + *ptr1 = *ptr2 = 0; + printf("%ld %ld", chk1, chk2); + + return 0; } + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + CFLAGS=$apr_save_CFLAGS +apr_cv_typematch_off_t_long_ld=yes +else + CFLAGS=$apr_save_CFLAGS +apr_cv_typematch_off_t_long_ld=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_cv_typematch_off_t_long_ld" >&5 +$as_echo "$apr_cv_typematch_off_t_long_ld" >&6; } +if test "$apr_cv_typematch_off_t_long_ld" = "yes"; then + : + + off_t_fmt="#define APR_OFF_T_FMT \"ld\"" + off_t_strfn='strtol' + +else + : + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether off_t and int use fmt %d" >&5 +$as_echo_n "checking whether off_t and int use fmt %d... " >&6; } +if ${apr_cv_typematch_off_t_int_d+:} false; then : + $as_echo_n "(cached) " >&6 +else + +apr_save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $CFLAGS_WARN" + if test "$ac_cv_c_compiler_gnu" = "yes"; then + CFLAGS="$CFLAGS -Werror" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "confdefs.h" + + #include +#include +#ifdef HAVE_STDINT_H +#include +#endif + + int main(int argc, const char *const *argv) { + + off_t chk1, *ptr1; + int chk2, *ptr2 = &chk1; + ptr1 = &chk2; + *ptr1 = *ptr2 = 0; + printf("%d %d", chk1, chk2); + + return 0; } + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + CFLAGS=$apr_save_CFLAGS +apr_cv_typematch_off_t_int_d=yes +else + CFLAGS=$apr_save_CFLAGS +apr_cv_typematch_off_t_int_d=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_cv_typematch_off_t_int_d" >&5 +$as_echo "$apr_cv_typematch_off_t_int_d" >&6; } +if test "$apr_cv_typematch_off_t_int_d" = "yes"; then + : + + off_t_fmt="#define APR_OFF_T_FMT \"d\"" + off_t_strfn='strtoi' + +else + : + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether off_t and long long use fmt %lld" >&5 +$as_echo_n "checking whether off_t and long long use fmt %lld... " >&6; } +if ${apr_cv_typematch_off_t_long_long_lld+:} false; then : + $as_echo_n "(cached) " >&6 +else + +apr_save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $CFLAGS_WARN" + if test "$ac_cv_c_compiler_gnu" = "yes"; then + CFLAGS="$CFLAGS -Werror" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "confdefs.h" + + #include +#include +#ifdef HAVE_STDINT_H +#include +#endif + + int main(int argc, const char *const *argv) { + + off_t chk1, *ptr1; + long long chk2, *ptr2 = &chk1; + ptr1 = &chk2; + *ptr1 = *ptr2 = 0; + printf("%lld %lld", chk1, chk2); + + return 0; } + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + CFLAGS=$apr_save_CFLAGS +apr_cv_typematch_off_t_long_long_lld=yes else - ac_cv_sizeof_off_t=0 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$apr_save_CFLAGS +apr_cv_typematch_off_t_long_long_lld=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 -$as_echo "$ac_cv_sizeof_off_t" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_cv_typematch_off_t_long_long_lld" >&5 +$as_echo "$apr_cv_typematch_off_t_long_long_lld" >&6; } +if test "$apr_cv_typematch_off_t_long_long_lld" = "yes"; then + : -cat >>confdefs.h <<_ACEOF -#define SIZEOF_OFF_T $ac_cv_sizeof_off_t -_ACEOF + off_t_fmt="#define APR_OFF_T_FMT \"lld\"" + off_t_strfn='strtoll' +else + : -if test "${ac_cv_sizeof_off_t}${apr_cv_use_lfs64}" = "4yes"; then - # Enable LFS - aprlfs=1 - 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" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF -fi -done +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether off_t and $int64_value use fmt %I64d" >&5 +$as_echo_n "checking whether off_t and $int64_value use fmt %I64d... " >&6; } +if eval \${apr_cv_typematch_off_t_$int64_value_I64d+:} false; then : + $as_echo_n "(cached) " >&6 +else - 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 +apr_save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $CFLAGS_WARN" + if test "$ac_cv_c_compiler_gnu" = "yes"; then + CFLAGS="$CFLAGS -Werror" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "confdefs.h" -fi -done + #include +#include +#ifdef HAVE_STDINT_H +#include +#endif - ;; - 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 - aprlfs=1 + int main(int argc, const char *const *argv) { + + off_t chk1, *ptr1; + $int64_value chk2, *ptr2 = &chk1; + ptr1 = &chk2; + *ptr1 = *ptr2 = 0; + printf("%I64d %I64d", chk1, chk2); + + return 0; } + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + CFLAGS=$apr_save_CFLAGS +apr_cv_typematch_off_t_$int64_value_I64d=yes else - aprlfs=0 + CFLAGS=$apr_save_CFLAGS +apr_cv_typematch_off_t_$int64_value_I64d=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which type to use for apr_off_t" >&5 -$as_echo_n "checking which type to use for apr_off_t... " >&6; } -if test "${ac_cv_sizeof_off_t}${apr_cv_use_lfs64}" = "4yes"; then - # LFS is go! - off_t_fmt='#define APR_OFF_T_FMT APR_INT64_T_FMT' - off_t_value='off64_t' - off_t_strfn='apr_strtoi64' -elif test "${ac_cv_sizeof_off_t}x${ac_cv_sizeof_long}" = "4x4"; then - # Special case: off_t may change size with _FILE_OFFSET_BITS - # on 32-bit systems with LFS support. To avoid compatibility - # issues when other packages do define _FILE_OFFSET_BITS, - # hard-code apr_off_t to long. - off_t_value=long - off_t_fmt='#define APR_OFF_T_FMT "ld"' - off_t_strfn='strtol' -elif test "$ac_cv_type_off_t" = "yes"; then - off_t_value=off_t - # off_t is more commonly a long than an int; prefer that case - # where int and long are the same size. - if test "$ac_cv_sizeof_off_t" = "$ac_cv_sizeof_long"; then - off_t_fmt='#define APR_OFF_T_FMT "ld"' - off_t_strfn='strtol' - elif test "$ac_cv_sizeof_off_t" = "$ac_cv_sizeof_int"; then - off_t_fmt='#define APR_OFF_T_FMT "d"' - off_t_strfn='strtoi' - elif test "$ac_cv_sizeof_off_t" = "$ac_cv_sizeof_long_long"; then - off_t_fmt='#define APR_OFF_T_FMT APR_INT64_T_FMT' +fi +eval ac_res=\$apr_cv_typematch_off_t_$int64_value_I64d + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test "$apr_cv_typematch_off_t_$int64_value_I64d" = "yes"; then + : + + off_t_fmt="#define APR_OFF_T_FMT APR_INT64_T_FMT" off_t_strfn='apr_strtoi64' - else - as_fn_error $? "could not determine the size of off_t" "$LINENO" 5 - fi +else + : + # Per OS tuning... case $host in *-mingw*) @@ -24021,7 +25246,19 @@ off_t_fmt='#define APR_OFF_T_FMT "I64d"' off_t_strfn='_strtoi64' ;; + *) + as_fn_error $? "could not determine the size of off_t" "$LINENO" 5 + ;; esac + +fi + +fi + +fi + +fi + else # Fallback on int off_t_value=apr_int32_t @@ -24942,12 +26179,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - vla_msg=yes + CFLAGS=$apr_save_CFLAGS +vla_msg=yes else - vla_msg=no + CFLAGS=$apr_save_CFLAGS +vla_msg=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$apr_save_CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vla_msg" >&5 $as_echo "$vla_msg" >&6; } @@ -25001,7 +26239,7 @@ echo "${nl}Checking for Locking..." -for ac_func in semget semctl flock +for ac_func in semget semctl semop semtimedop flock 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" @@ -25013,13 +26251,45 @@ fi done -for ac_header in semaphore.h OS.h +ac_rc=yes +for ac_spec in func:semtimedop; 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 + : + have_semtimedop="1" +else + : + have_semtimedop="0" +fi + + +for ac_header in semaphore.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 : + ac_fn_c_check_header_mongrel "$LINENO" "semaphore.h" "ac_cv_header_semaphore_h" "$ac_includes_default" +if test "x$ac_cv_header_semaphore_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_SEMAPHORE_H 1 _ACEOF fi @@ -25082,7 +26352,64 @@ fi -for ac_func in sem_close sem_unlink sem_post sem_wait create_sem +for ac_func in sem_close sem_unlink sem_post sem_wait sem_timedwait +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" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +ac_rc=yes +for ac_spec in func:sem_timedwait; 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 + : + have_sem_timedwait="1" +else + : + have_sem_timedwait="0" +fi + + +for ac_header in OS.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default" +if test "x$ac_cv_header_OS_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_OS_H 1 +_ACEOF + +fi + +done + +for ac_func in create_sem acquire_sem acquire_sem_etc 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" @@ -25094,6 +26421,38 @@ fi done +ac_rc=yes +for ac_spec in header:OS.h func:acquire_sem_etc; 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 + : + have_acquire_sem_etc="1" +else + : + have_acquire_sem_etc="0" +fi + # Some systems return ENOSYS from sem_open. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working sem_open" >&5 @@ -25358,17 +26717,51 @@ fi - for ac_func in pthread_mutexattr_setpshared + for ac_func in pthread_mutex_timedlock pthread_mutexattr_setpshared do : - ac_fn_c_check_func "$LINENO" "pthread_mutexattr_setpshared" "ac_cv_func_pthread_mutexattr_setpshared" -if test "x$ac_cv_func_pthread_mutexattr_setpshared" = xyes; then : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define HAVE_PTHREAD_MUTEXATTR_SETPSHARED 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done + ac_rc=yes +for ac_spec in header:pthread.h func:pthread_mutex_timedlock; 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 + : + have_pthread_mutex_timedlock="1" +else + : + have_pthread_mutex_timedlock="0" +fi + + # Some systems have setpshared and define PROCESS_SHARED, but don't # really support PROCESS_SHARED locks. So, we must validate that we # can go through the steps without receiving some sort of system error. @@ -25483,7 +26876,7 @@ exit(1); if (pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED)) exit(2); - if (pthread_mutexattr_setrobust_np(&attr, PTHREAD_MUTEX_ROBUST_NP)) + if (pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST)) exit(3); if (pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT)) exit(4); @@ -25500,12 +26893,58 @@ if ac_fn_c_try_run "$LINENO"; then : apr_cv_mutex_robust_shared=yes else + +if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include + +int main(int argc, char **argv) +{ + pthread_mutex_t mutex; + pthread_mutexattr_t attr; + + if (pthread_mutexattr_init(&attr)) + exit(1); + if (pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED)) + exit(2); + if (pthread_mutexattr_setrobust_np(&attr, PTHREAD_MUTEX_ROBUST_NP)) + exit(3); + if (pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT)) + exit(4); + if (pthread_mutex_init(&mutex, &attr)) + exit(5); + if (pthread_mutexattr_destroy(&attr)) + exit(6); + if (pthread_mutex_destroy(&mutex)) + exit(7); + + exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + apr_cv_mutex_robust_shared=np +else apr_cv_mutex_robust_shared=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_cv_mutex_robust_shared" >&5 $as_echo "$apr_cv_mutex_robust_shared" >&6; } @@ -25514,6 +26953,10 @@ $as_echo "#define HAVE_PTHREAD_MUTEX_ROBUST 1" >>confdefs.h +elif test "$apr_cv_mutex_robust_shared" = "np"; then + +$as_echo "#define HAVE_PTHREAD_MUTEX_ROBUST_NP 1" >>confdefs.h + fi fi @@ -25553,7 +26996,7 @@ fi ac_rc=yes -for ac_spec in func:semget func:semctl define:SEM_UNDO; do +for ac_spec in func:semget func:semctl func:semop define:SEM_UNDO; do ac_type=`echo "$ac_spec" | sed -e 's/:.*$//'` ac_item=`echo "$ac_spec" | sed -e 's/^.*://'` case $ac_type in @@ -25714,6 +27157,51 @@ fi +for ac_func in pthread_condattr_setpshared +do : + ac_fn_c_check_func "$LINENO" "pthread_condattr_setpshared" "ac_cv_func_pthread_condattr_setpshared" +if test "x$ac_cv_func_pthread_condattr_setpshared" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PTHREAD_CONDATTR_SETPSHARED 1 +_ACEOF + +fi +done + +ac_rc=yes +for ac_spec in header:pthread.h func:pthread_condattr_setpshared; 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 + : + have_pthread_condattr_setpshared="1" +else + : + have_pthread_condattr_setpshared="0" +fi + + + # See which lock mechanism we'll select by default on this system. # The last APR_DECIDE to execute sets the default. # At this stage, we match the ordering in Apache 1.3 @@ -25803,7 +27291,7 @@ fi ac_rc=yes -for ac_spec in func:semget func:semctl define:SEM_UNDO; do +for ac_spec in func:semget func:semctl func:semop define:SEM_UNDO; do ac_type=`echo "$ac_spec" | sed -e 's/:.*$//'` ac_item=`echo "$ac_spec" | sed -e 's/^.*://'` case $ac_type in @@ -25840,7 +27328,7 @@ fi ac_rc=yes -for ac_spec in header:OS.h func:create_sem; do +for ac_spec in header:OS.h func:create_sem func:acquire_sem func:acquire_sem_etc; do ac_type=`echo "$ac_spec" | sed -e 's/:.*$//'` ac_item=`echo "$ac_spec" | sed -e 's/^.*://'` case $ac_type in @@ -25876,6 +27364,19 @@ fi +# pthread mutex both pshared and robust[_np] is the best default +case "$apr_cv_mutex_robust_shared" in +"yes"|"np") + +ac_decision='USE_PROC_PTHREAD_SERIALIZE' +ac_decision_msg='pthread pshared mutex' +ac_decision_USE_PROC_PTHREAD_SERIALIZE=yes +ac_decision_USE_PROC_PTHREAD_SERIALIZE_msg='pthread pshared mutex' + + ;; +*) + ;; +esac if test "x$apr_lock_method" != "x"; then ac_decision="$apr_lock_method" eval "ac_decision_msg=\"\$ac_decision_${ac_decision}_msg\"" @@ -26092,6 +27593,79 @@ $as_echo "no" >&6; } fi +for ac_header in sys/random.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/random.h" "ac_cv_header_sys_random_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_random_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_RANDOM_H 1 +_ACEOF + +fi + +done + +for ac_func in getrandom +do : + ac_fn_c_check_func "$LINENO" "getrandom" "ac_cv_func_getrandom" +if test "x$ac_cv_func_getrandom" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETRANDOM 1 +_ACEOF + +fi +done + + +for ac_header in sys/syscall.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/syscall.h" "ac_cv_header_sys_syscall_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_syscall_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_SYSCALL_H 1 +_ACEOF + +fi + +done + +for ac_header in linux/random.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "linux/random.h" "ac_cv_header_linux_random_h" "$ac_includes_default" +if test "x$ac_cv_header_linux_random_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LINUX_RANDOM_H 1 +_ACEOF + +fi + +done + +ac_fn_c_check_decl "$LINENO" "SYS_getrandom" "ac_cv_have_decl_SYS_getrandom" "#include +" +if test "x$ac_cv_have_decl_SYS_getrandom" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SYS_GETRANDOM $ac_have_decl +_ACEOF + + +for ac_func in arc4random_buf +do : + ac_fn_c_check_func "$LINENO" "arc4random_buf" "ac_cv_func_arc4random_buf" +if test "x$ac_cv_func_arc4random_buf" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ARC4RANDOM_BUF 1 +_ACEOF + +fi +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for entropy source" >&5 $as_echo_n "checking for entropy source... " >&6; } @@ -26122,15 +27696,32 @@ fi +if test "$rand" != "1"; then + if test "$ac_cv_func_getrandom" = yes; then + rand="getrandom" + elif test "$ac_cv_have_decl_SYS_getrandom" = yes; then + rand="SYS_getrandom" + elif test "$ac_cv_func_arc4random_buf" = yes; then + rand="arc4random" + fi +fi + if test "$rand" != "1"; then # Check whether --with-devrandom was given. if test "${with_devrandom+set}" = set; then : withval=$with_devrandom; apr_devrandom="$withval" else - apr_devrandom="yes" + apr_devrandom="no" fi + if test "$apr_devrandom" = "no"; then + if test -z "$rand"; then + apr_devrandom="yes" + else + apr_devrandom="no" + fi + fi if test "$apr_devrandom" = "yes"; then # /dev/random on OpenBSD doesn't provide random data, so @@ -26138,7 +27729,7 @@ for f in /dev/arandom /dev/urandom /dev/random; do if test -r $f; then apr_devrandom=$f - rand=1 + rand="1" break fi done @@ -26169,6 +27760,15 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_devrandom" >&5 $as_echo "$apr_devrandom" >&6; } + elif test -n "$rand"; then + +cat >>confdefs.h <<_ACEOF +#define SYS_RANDOM "$rand" +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rand" >&5 +$as_echo "$rand" >&6; } + rand="1" fi fi @@ -26879,12 +28479,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_gethostbyname_r_style=glibc2 + CFLAGS=$apr_save_CFLAGS +ac_cv_gethostbyname_r_style=glibc2 else - ac_cv_gethostbyname_r_style=none + CFLAGS=$apr_save_CFLAGS +ac_cv_gethostbyname_r_style=none fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$apr_save_CFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gethostbyname_r_style" >&5 @@ -26938,12 +28539,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_gethostbyname_r_arg=hostent_data + CFLAGS=$apr_save_CFLAGS +ac_cv_gethostbyname_r_arg=hostent_data else - ac_cv_gethostbyname_r_arg=char + CFLAGS=$apr_save_CFLAGS +ac_cv_gethostbyname_r_arg=char fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$apr_save_CFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gethostbyname_r_arg" >&5 @@ -27005,12 +28607,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_getservbyname_r_style=glibc2 + CFLAGS=$apr_save_CFLAGS +ac_cv_getservbyname_r_style=glibc2 else - ac_cv_getservbyname_r_style=none + CFLAGS=$apr_save_CFLAGS +ac_cv_getservbyname_r_style=none fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$apr_save_CFLAGS if test "$ac_cv_getservbyname_r_style" = "none"; then @@ -27051,12 +28654,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_getservbyname_r_style=solaris + CFLAGS=$apr_save_CFLAGS +ac_cv_getservbyname_r_style=solaris else - ac_cv_getservbyname_r_style=none + CFLAGS=$apr_save_CFLAGS +ac_cv_getservbyname_r_style=none fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$apr_save_CFLAGS fi @@ -27098,12 +28702,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_getservbyname_r_style=osf1 + CFLAGS=$apr_save_CFLAGS +ac_cv_getservbyname_r_style=osf1 else - ac_cv_getservbyname_r_style=none + CFLAGS=$apr_save_CFLAGS +ac_cv_getservbyname_r_style=none fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$apr_save_CFLAGS fi @@ -27954,12 +29559,13 @@ fi -for ac_func in gai_strerror +for ac_func in gai_strerror if_nametoindex if_indextoname do : - ac_fn_c_check_func "$LINENO" "gai_strerror" "ac_cv_func_gai_strerror" -if test "x$ac_cv_func_gai_strerror" = xyes; then : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define HAVE_GAI_STRERROR 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -28253,6 +29859,58 @@ +{ $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 +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_SYS_UN_H +#include +#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" @@ -28339,6 +29997,16 @@ +# Check whether --enable-timedlocks was given. +if test "${enable_timedlocks+set}" = set; then : + enableval=$enable_timedlocks; apr_has_timedlocks="0" +else + apr_has_timedlocks="1" + +fi + + + # hstrerror is only needed if IPv6 is not enabled, # so getaddrinfo/gai_strerror are not used. if test $have_ipv6 = 0; then @@ -29346,6 +31014,7 @@ 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 +31062,13 @@ 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 +31133,8 @@ 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 +31186,12 @@ 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 +31226,7 @@ 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 +31253,11 @@ 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 +31266,16 @@ 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 +31869,53 @@ 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 . # 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 +31944,9 @@ # 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 +32058,27 @@ # 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 +32169,11 @@ # 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 +32266,13 @@ # 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 @@ -30635,6 +32322,65 @@ # ### END LIBTOOL CONFIG +_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 @@ -30643,7 +32389,7 @@ # 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 +32398,7 @@ 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 +32408,6 @@ 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" Index: contrib/apr/configure.in =================================================================== --- contrib/apr/configure.in +++ contrib/apr/configure.in @@ -264,16 +264,19 @@ AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL # get libtool's setting of shlibpath_var - eval `grep "^shlibpath_var=[[A-Z_]]*$" $apr_builddir/libtool` if test "x$shlibpath_var" = "x"; then + eval `grep "^shlibpath_var=[[A-Z_]]*$" $apr_builddir/libtool` + fi + if test "x$shlibpath_var" = "x"; then + AC_MSG_NOTICE([SHLIBPATH variable could not be determined]) shlibpath_var=REPLACE_WITH_YOUR_SHLIBPATH_VAR fi fi ;; esac -AC_ARG_WITH(installbuilddir, [ --with-installbuilddir=DIR location to store APR build files (defaults to '${datadir}/build')], - [ installbuilddir=$withval ], [ installbuilddir="${datadir}/build-${APR_MAJOR_VERSION}" ] ) +AC_ARG_WITH(installbuilddir, [ --with-installbuilddir=DIR location to store APR build files], + [ installbuilddir=$withval ] ) AC_SUBST(installbuilddir) AC_ARG_WITH(libtool, [ --without-libtool avoid using libtool to link the library], @@ -346,6 +349,11 @@ [APR_ADDTO(CFLAGS,-g) if test "$GCC" = "yes"; then APR_ADDTO(CFLAGS,[-Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations]) + case `($CC --version) 2>/dev/null` in + *clang-900* | *"clang version 5.0.0"*) + APR_ADDTO(CFLAGS,[-Wno-error=strict-prototypes]) + ;; + esac elif test "$AIX_XLC" = "yes"; then APR_ADDTO(CFLAGS,-qfullpath -qinitauto=FE -qcheck=all -qinfo=pro) fi @@ -546,6 +554,11 @@ ;; esac ;; + *apple-darwin*) + ac_cv_func_fdatasync="no" # Mac OS X wrongly reports it has fdatasync() + OSDIR="unix" + eolstr="\\n" + ;; *os390) OSDIR="os390" OBJECTS_PLATFORM='$(OBJECTS_os390)' @@ -573,6 +586,11 @@ OSDIR="unix" eolstr="\\n" ;; + *darwin* ) + ac_cv_func_fdatasync="no" # Mac OS X wrongly reports it has fdatasync() + OSDIR="unix" + eolstr="\\n" + ;; *) OSDIR="unix" eolstr="\\n" @@ -792,15 +810,13 @@ fi fi -ac_cv_define_READDIR_IS_THREAD_SAFE=no +ac_cv_define_READDIR_IS_THREAD_SAFE=yes ac_cv_define_GETHOSTBYNAME_IS_THREAD_SAFE=no ac_cv_define_GETHOSTBYADDR_IS_THREAD_SAFE=no ac_cv_define_GETSERVBYNAME_IS_THREAD_SAFE=no if test "$threads" = "1"; then echo "APR will use threads" - AC_CHECK_LIB(c_r, readdir, - AC_DEFINE(READDIR_IS_THREAD_SAFE, 1, - [Define if readdir is thread safe])) + AC_DEFINE(READDIR_IS_THREAD_SAFE, 1, [Modern readdir is thread safe]) if test "x$apr_gethostbyname_is_thread_safe" = "x"; then AC_CHECK_LIB(c_r, gethostbyname, apr_gethostbyname_is_thread_safe=yes) fi @@ -846,6 +862,22 @@ [ AC_MSG_ERROR(Electric Fence requested but not detected) ]) ]) +AC_ARG_WITH(valgrind, + [ --with-valgrind[[=DIR]] Enable code to teach valgrind about apr pools + (optionally: set path to valgrind headers) ], + [ if test "$withval" != no; then + if test "$withval" = yes; then + withval=/usr/include/valgrind + fi + APR_ADDTO(CPPFLAGS, -I$withval) + AC_CHECK_HEADERS(valgrind.h memcheck.h) + APR_IFALLYES(header:valgrind.h header:memcheck.h, + [AC_DEFINE(HAVE_VALGRIND, 1, [Compile in valgrind support]) ], + [AC_MSG_ERROR(valgrind headers not found) ] + ) + fi ] +) + AC_CHECK_FUNCS(sigsuspend, [ have_sigsuspend="1" ], [ have_sigsuspend="0" ]) AC_CHECK_FUNCS(sigwait, [ have_sigwait="1" ], [ have_sigwait="0" ]) dnl AC_CHECK_FUNCS doesn't work for this on Tru64 since the function @@ -1131,9 +1163,17 @@ #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 +#endif +#include +]) AC_CHECK_FUNCS([mmap munmap shm_open shm_unlink shmget shmat shmdt shmctl \ - create_area]) + create_area mprotect]) APR_CHECK_DEFINE(MAP_ANON, sys/mman.h) AC_CHECK_FILE(/dev/zero) @@ -1451,6 +1491,7 @@ errno.h \ fcntl.h \ grp.h \ + inttypes.h \ io.h \ limits.h \ mach-o/dyld.h \ @@ -1530,6 +1571,7 @@ AC_SUBST(errnoh) AC_SUBST(direnth) AC_SUBST(fcntlh) +AC_SUBST(inttypesh) AC_SUBST(ioh) AC_SUBST(limitsh) AC_SUBST(netdbh) @@ -1581,6 +1623,27 @@ fi ] ) +AC_ARG_ENABLE(allocator-guard-pages, + [ --enable-allocator-guard-pages Use guard pages in apr_allocator + (implies --enable-allocator-uses-mmap) ] , + [ if test "$enableval" = "yes"; then + APR_IFALLYES(header:sys/mman.h func:mmap func:munmap func:mprotect define:MAP_ANON, + [AC_DEFINE(APR_ALLOCATOR_GUARD_PAGES, 1, + [Define if apr_allocator should use guard pages]) ], + [AC_MSG_ERROR([mmap()/MAP_ANON/mprotect() not supported]) ] + ) + fi ] +) + + +AC_ARG_ENABLE(pool-concurrency-check, + [ --enable-pool-concurrency-check Check for concurrent usage of memory pools], + [ if test "$enableval" = "yes"; then + AC_DEFINE(APR_POOL_CONCURRENCY_CHECK, 1, + [Define if pool functions should abort if concurrent usage is detected]) + fi ] +) + dnl ----------------------------- Checks for standard typedefs AC_TYPE_OFF_T AC_TYPE_PID_T @@ -1604,9 +1667,9 @@ dnl Checks for integer size AC_CHECK_SIZEOF(char, 1) +AC_CHECK_SIZEOF(short, 2) AC_CHECK_SIZEOF(int, 4) AC_CHECK_SIZEOF(long, 4) -AC_CHECK_SIZEOF(short, 2) AC_CHECK_SIZEOF(long long, 8) if test "$ac_cv_sizeof_short" = "2"; then @@ -1615,16 +1678,37 @@ if test "$ac_cv_sizeof_int" = "4"; then int_value=int fi + # Now we need to find what apr_int64_t (sizeof == 8) will be. -# The first match is our preference. -if test "$ac_cv_sizeof_int" = "8"; then +# The first match is our preference (use inttypes if available). +APR_IFALLYES(header:stdint.h header:inttypes.h, hasinttypes="1", hasinttypes="0") +if test "$hasinttypes" = "1"; then + int64_literal='#define APR_INT64_C(val) INT64_C(val)' + uint64_literal='#define APR_UINT64_C(val) UINT64_C(val)' + int64_t_fmt='#define APR_INT64_T_FMT PRId64' + uint64_t_fmt='#define APR_UINT64_T_FMT PRIu64' + uint64_t_hex_fmt='#define APR_UINT64_T_HEX_FMT PRIx64' + int64_value="int64_t" + uint64_value="uint64_t" + APR_CHECK_TYPES_FMT_COMPATIBLE(int64_t, int, d, [ + int64_strfn="strtoi" + ], [ + APR_CHECK_TYPES_FMT_COMPATIBLE(int64_t, long, ld, [ + int64_strfn="strtol" + ], [ + APR_CHECK_TYPES_FMT_COMPATIBLE(int64_t, long long, lld, [ + int64_strfn="strtoll" + ], [ + AC_ERROR([could not determine the string function for int64_t]) + ])])]) +elif test "$ac_cv_sizeof_int" = "8"; then int64_literal='#define APR_INT64_C(val) (val)' uint64_literal='#define APR_UINT64_C(val) (val##U)' int64_t_fmt='#define APR_INT64_T_FMT "d"' uint64_t_fmt='#define APR_UINT64_T_FMT "u"' uint64_t_hex_fmt='#define APR_UINT64_T_HEX_FMT "x"' int64_value="int" - long_value=int + uint64_value="unsigned int" int64_strfn="strtoi" elif test "$ac_cv_sizeof_long" = "8"; then int64_literal='#define APR_INT64_C(val) (val##L)' @@ -1633,7 +1717,7 @@ uint64_t_fmt='#define APR_UINT64_T_FMT "lu"' uint64_t_hex_fmt='#define APR_UINT64_T_HEX_FMT "lx"' int64_value="long" - long_value=long + uint64_value="unsigned long" int64_strfn="strtol" elif test "$ac_cv_sizeof_long_long" = "8"; then int64_literal='#define APR_INT64_C(val) (val##LL)' @@ -1646,7 +1730,7 @@ uint64_t_fmt='#define APR_UINT64_T_FMT "llu"' uint64_t_hex_fmt='#define APR_UINT64_T_HEX_FMT "llx"' int64_value="long long" - long_value="long long" + uint64_value="unsigned long long" int64_strfn="strtoll" elif test "$ac_cv_sizeof_longlong" = "8"; then int64_literal='#define APR_INT64_C(val) (val##LL)' @@ -1655,7 +1739,7 @@ uint64_t_fmt='#define APR_UINT64_T_FMT "qu"' uint64_t_hex_fmt='#define APR_UINT64_T_HEX_FMT "qx"' int64_value="__int64" - long_value="__int64" + uint64_value="unsigned __int64" int64_strfn="strtoll" else # int64_literal may be overriden if your compiler thinks you have @@ -1773,18 +1857,22 @@ uint64_t_fmt='#define APR_UINT64_T_FMT "I64u"' uint64_t_hex_fmt='#define APR_UINT64_T_HEX_FMT "I64x"' int64_value="__int64" - long_value="__int64" + uint64_value="unsigned __int64" int64_strfn="_strtoi64" ;; esac -APR_CHECK_TYPES_COMPATIBLE(ssize_t, int, [ssize_t_fmt="d"]) -APR_CHECK_TYPES_COMPATIBLE(ssize_t, long, [ssize_t_fmt="ld"]) -APR_CHECK_TYPES_COMPATIBLE(size_t, unsigned int, [size_t_fmt="u"]) -APR_CHECK_TYPES_COMPATIBLE(size_t, unsigned long, [size_t_fmt="lu"]) +dnl I would expect much of the above to go away with new compile test +APR_CHECK_TYPES_FMT_COMPATIBLE(ssize_t, long, ld, [ssize_t_fmt="ld"], [ +APR_CHECK_TYPES_FMT_COMPATIBLE(ssize_t, int, d, [ssize_t_fmt="d"]) +]) +APR_CHECK_TYPES_FMT_COMPATIBLE(size_t, unsigned long, lu, [size_t_fmt="lu"], [ +APR_CHECK_TYPES_FMT_COMPATIBLE(size_t, unsigned int, u, [size_t_fmt="u"]) +]) APR_CHECK_SIZEOF_EXTENDED([#include ], ssize_t, 8) +dnl the else cases below should no longer occur; AC_MSG_CHECKING([which format to use for apr_ssize_t]) if test -n "$ssize_t_fmt"; then AC_MSG_RESULT(%$ssize_t_fmt) @@ -1802,6 +1890,7 @@ APR_CHECK_SIZEOF_EXTENDED([#include ], size_t, 8) +# else cases below should no longer occur; AC_MSG_CHECKING([which format to use for apr_size_t]) if test -n "$size_t_fmt"; then AC_MSG_RESULT(%$size_t_fmt) @@ -1854,21 +1943,24 @@ off_t_fmt='#define APR_OFF_T_FMT "ld"' off_t_strfn='strtol' elif test "$ac_cv_type_off_t" = "yes"; then - off_t_value=off_t # off_t is more commonly a long than an int; prefer that case - # where int and long are the same size. - if test "$ac_cv_sizeof_off_t" = "$ac_cv_sizeof_long"; then - off_t_fmt='#define APR_OFF_T_FMT "ld"' + # where int and long are the same size and interchangable. + off_t_value=off_t + APR_CHECK_TYPES_FMT_COMPATIBLE(off_t, long, ld, [ + off_t_fmt="#define APR_OFF_T_FMT \"ld\"" off_t_strfn='strtol' - elif test "$ac_cv_sizeof_off_t" = "$ac_cv_sizeof_int"; then - off_t_fmt='#define APR_OFF_T_FMT "d"' + ], [ + APR_CHECK_TYPES_FMT_COMPATIBLE(off_t, int, d, [ + off_t_fmt="#define APR_OFF_T_FMT \"d\"" off_t_strfn='strtoi' - elif test "$ac_cv_sizeof_off_t" = "$ac_cv_sizeof_long_long"; then - off_t_fmt='#define APR_OFF_T_FMT APR_INT64_T_FMT' - off_t_strfn='apr_strtoi64' - else - AC_ERROR([could not determine the size of off_t]) - fi + ], [ + APR_CHECK_TYPES_FMT_COMPATIBLE(off_t, long long, lld, [ + off_t_fmt="#define APR_OFF_T_FMT \"lld\"" + off_t_strfn='strtoll' + ], [ + APR_CHECK_TYPES_FMT_COMPATIBLE(off_t, $int64_value, I64d, [ + off_t_fmt="#define APR_OFF_T_FMT APR_INT64_T_FMT" + off_t_strfn='apr_strtoi64'], [ # Per OS tuning... case $host in *-mingw*) @@ -1876,7 +1968,11 @@ off_t_fmt='#define APR_OFF_T_FMT "I64d"' off_t_strfn='_strtoi64' ;; + *) + AC_ERROR([could not determine the size of off_t]) + ;; esac + ])])])]) else # Fallback on int off_t_value=apr_int32_t @@ -1935,8 +2031,8 @@ AC_SUBST(voidp_size) AC_SUBST(short_value) AC_SUBST(int_value) -AC_SUBST(long_value) AC_SUBST(int64_value) +AC_SUBST(uint64_value) AC_SUBST(off_t_value) AC_SUBST(size_t_value) AC_SUBST(ssize_t_value) @@ -2129,10 +2225,17 @@ dnl ----------------------------- Checking for Locking Characteristics echo "${nl}Checking for Locking..." -AC_CHECK_FUNCS(semget semctl flock) -AC_CHECK_HEADERS(semaphore.h OS.h) +AC_CHECK_FUNCS(semget semctl semop semtimedop flock) +APR_IFALLYES(func:semtimedop, have_semtimedop="1", have_semtimedop="0") + +AC_CHECK_HEADERS(semaphore.h) AC_SEARCH_LIBS(sem_open, rt) -AC_CHECK_FUNCS(sem_close sem_unlink sem_post sem_wait create_sem) +AC_CHECK_FUNCS(sem_close sem_unlink sem_post sem_wait sem_timedwait) +APR_IFALLYES(func:sem_timedwait, have_sem_timedwait="1", have_sem_timedwait="0") + +AC_CHECK_HEADERS(OS.h) +AC_CHECK_FUNCS(create_sem acquire_sem acquire_sem_etc) +APR_IFALLYES(header:OS.h func:acquire_sem_etc, have_acquire_sem_etc="1", have_acquire_sem_etc="0") # Some systems return ENOSYS from sem_open. AC_CACHE_CHECK(for working sem_open,ac_cv_func_sem_open,[ @@ -2191,7 +2294,10 @@ if test "$threads" = "1"; then APR_CHECK_DEFINE(PTHREAD_PROCESS_SHARED, pthread.h) - AC_CHECK_FUNCS(pthread_mutexattr_setpshared) + AC_CHECK_FUNCS(pthread_mutex_timedlock pthread_mutexattr_setpshared) + APR_IFALLYES(header:pthread.h func:pthread_mutex_timedlock, + have_pthread_mutex_timedlock="1", have_pthread_mutex_timedlock="0") + AC_SUBST(have_pthread_mutex_timedlock) # Some systems have setpshared and define PROCESS_SHARED, but don't # really support PROCESS_SHARED locks. So, we must validate that we # can go through the steps without receiving some sort of system error. @@ -2229,8 +2335,8 @@ APR_IFALLYES(header:semaphore.h func:sem_open func:sem_close dnl func:sem_unlink func:sem_post func:sem_wait, hasposixser="1", hasposixser="0") -APR_IFALLYES(func:semget func:semctl define:SEM_UNDO, hassysvser="1", - hassysvser="0") +APR_IFALLYES(func:semget func:semctl func:semop define:SEM_UNDO, + hassysvser="1", hassysvser="0") APR_IFALLYES(func:flock define:LOCK_EX, hasflockser="1", hasflockser="0") APR_IFALLYES(header:fcntl.h define:F_SETLK, hasfcntlser="1", hasfcntlser="0") # note: the current APR use of shared mutex requires /dev/zero @@ -2240,6 +2346,11 @@ hasprocpthreadser="1", hasprocpthreadser="0") APR_IFALLYES(header:OS.h func:create_sem, hasbeossem="1", hasbeossem="0") +AC_CHECK_FUNCS(pthread_condattr_setpshared) +APR_IFALLYES(header:pthread.h func:pthread_condattr_setpshared, + have_pthread_condattr_setpshared="1", have_pthread_condattr_setpshared="0") +AC_SUBST(have_pthread_condattr_setpshared) + # See which lock mechanism we'll select by default on this system. # The last APR_DECIDE to execute sets the default. # At this stage, we match the ordering in Apache 1.3 @@ -2255,10 +2366,18 @@ APR_DECIDE(USE_FLOCK_SERIALIZE, [4.2BSD-style flock()])) APR_IFALLYES(header:fcntl.h define:F_SETLK, APR_DECIDE(USE_FCNTL_SERIALIZE, [SVR4-style fcntl()])) -APR_IFALLYES(func:semget func:semctl define:SEM_UNDO, +APR_IFALLYES(func:semget func:semctl func:semop define:SEM_UNDO, APR_DECIDE(USE_SYSVSEM_SERIALIZE, [SysV IPC semget()])) -APR_IFALLYES(header:OS.h func:create_sem, +APR_IFALLYES(header:OS.h func:create_sem func:acquire_sem func:acquire_sem_etc, APR_DECIDE(USE_BEOSSEM, [BeOS Semaphores])) +# pthread mutex both pshared and robust[_np] is the best default +case "$apr_cv_mutex_robust_shared" in +"yes"|"np") + APR_DECIDE(USE_PROC_PTHREAD_SERIALIZE, [pthread pshared mutex]) + ;; +*) + ;; +esac if test "x$apr_lock_method" != "x"; then APR_DECISION_FORCE($apr_lock_method) fi @@ -2418,6 +2537,15 @@ fi dnl ----------------------------- Checking for /dev/random +AC_CHECK_HEADERS(sys/random.h) +AC_CHECK_FUNCS(getrandom) + +AC_CHECK_HEADERS(sys/syscall.h) +AC_CHECK_HEADERS(linux/random.h) +AC_CHECK_DECLS([SYS_getrandom], [], [], [#include ]) + +AC_CHECK_FUNCS(arc4random_buf) + AC_MSG_CHECKING(for entropy source) why_no_rand="" @@ -2435,10 +2563,27 @@ rand="1" ]) +if test "$rand" != "1"; then + if test "$ac_cv_func_getrandom" = yes; then + rand="getrandom" + elif test "$ac_cv_have_decl_SYS_getrandom" = yes; then + rand="SYS_getrandom" + elif test "$ac_cv_func_arc4random_buf" = yes; then + rand="arc4random" + fi +fi + if test "$rand" != "1"; then AC_ARG_WITH(devrandom, [ --with-devrandom[[=DEV]] use /dev/random or compatible [[searches by default]]], - [ apr_devrandom="$withval" ], [ apr_devrandom="yes" ]) + [ apr_devrandom="$withval" ], [ apr_devrandom="no" ]) + if test "$apr_devrandom" = "no"; then + if test -z "$rand"; then + apr_devrandom="yes" + else + apr_devrandom="no" + fi + fi if test "$apr_devrandom" = "yes"; then # /dev/random on OpenBSD doesn't provide random data, so @@ -2446,7 +2591,7 @@ for f in /dev/arandom /dev/urandom /dev/random; do if test -r $f; then apr_devrandom=$f - rand=1 + rand="1" break fi done @@ -2472,6 +2617,10 @@ if test "$rand" = "1"; then AC_DEFINE_UNQUOTED(DEV_RANDOM, ["$apr_devrandom"], [Define to path of random device]) AC_MSG_RESULT([$apr_devrandom]) + elif test -n "$rand"; then + AC_DEFINE_UNQUOTED(SYS_RANDOM, ["$rand"], [Define system call of random]) + AC_MSG_RESULT([$rand]) + rand="1" fi fi @@ -2689,12 +2838,13 @@ AC_SEARCH_LIBS(getaddrinfo, socket inet6) AC_SEARCH_LIBS(gai_strerror, socket inet6) AC_SEARCH_LIBS(getnameinfo, socket inet6) -AC_CHECK_FUNCS(gai_strerror) +AC_CHECK_FUNCS(gai_strerror if_nametoindex if_indextoname) APR_CHECK_WORKING_GETADDRINFO APR_CHECK_NEGATIVE_EAI APR_CHECK_WORKING_GETNAMEINFO APR_CHECK_SOCKADDR_IN6 APR_CHECK_SOCKADDR_STORAGE +APR_CHECK_SOCKADDR_UN have_ipv6="0" if test "$user_disabled_ipv6" = 1; then @@ -2726,6 +2876,12 @@ AC_SUBST(have_ipv6) +AC_ARG_ENABLE(timedlocks, + [ --disable-timedlocks Disable timed locks ], + [apr_has_timedlocks="0"], [apr_has_timedlocks="1"] +) +AC_SUBST(apr_has_timedlocks) + # hstrerror is only needed if IPv6 is not enabled, # so getaddrinfo/gai_strerror are not used. if test $have_ipv6 = 0; then Index: contrib/apr/docs/APRDesign.html =================================================================== --- contrib/apr/docs/APRDesign.html +++ contrib/apr/docs/APRDesign.html @@ -152,7 +152,7 @@

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:

    @@ -227,7 +227,7 @@

    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.

    APR Error reporting

    @@ -246,7 +246,7 @@

    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.

    +There are five types of error values in APR, each with its own offset.

    @@ -277,7 +277,7 @@
     
     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.
    +the error code indicates an error condition or a status condition.
     
     

    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 @@ an error string. If we convert all errors to a common subset, we have four steps to output an error string:

    -

    The seocnd problem with option 1, is that it is a lossy conversion. For +

    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 Index: contrib/apr/docs/canonical_filenames.html =================================================================== --- contrib/apr/docs/canonical_filenames.html +++ contrib/apr/docs/canonical_filenames.html @@ -8,10 +8,10 @@

    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

    . -

    The first discrepancy is in volume roots. Unix and pure deriviates +

    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 @@ 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.

    The second discrepancy is in the meaning of the 'this' directory. @@ -39,35 +39,35 @@ 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.

    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.

    -

    The fifth and worst discrepancy plauges Win32, OS2, Netware, and some +

    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.

    @@ -76,7 +76,7 @@ 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.)

    +characters are illegal (or undesirable due to confusion.)

    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 @@

    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.

    +with no penalties, this may occur when the name is initially processed.


    Index: contrib/apr/docs/incomplete_types =================================================================== --- contrib/apr/docs/incomplete_types +++ contrib/apr/docs/incomplete_types @@ -38,7 +38,7 @@ #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 @@ #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 @@ 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, Index: contrib/apr/docs/pool-design.html =================================================================== --- contrib/apr/docs/pool-design.html +++ contrib/apr/docs/pool-design.html @@ -3,10 +3,6 @@ Using APR Pools -
    - Last modified at [$Date: 2004-11-24 17:51:51 -0500 (Wed, 24 Nov 2004) $] -
    -

    Using APR Pools

    Index: contrib/apr/encoding/apr_encode.c =================================================================== --- /dev/null +++ contrib/apr/encoding/apr_encode.c @@ -0,0 +1,1419 @@ +/* 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. + */ + +/* encode/decode functions. + * + * These functions perform various encoding operations, and are provided in + * pairs, a function to query the length of and encode existing buffers, as + * well as companion functions to perform the same process to memory + * allocated from a pool. + * + * The API is designed to have the smallest possible RAM footprint, and so + * will only allocate the exact amount of RAM needed for each conversion. + */ + +#include "apr_encode.h" +#include "apr_lib.h" +#include "apr_strings.h" +#include "apr_encode_private.h" + +/* lookup table: fast and const should make it shared text page. */ +static const unsigned char pr2six[256] = +{ +#if !APR_CHARSET_EBCDIC + /* ASCII table */ + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 62, 64, 62, 64, 63, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 64, 64, 128, 64, 64, + 64, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 64, 64, 64, 64, 63, + 64, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 +#else /* APR_CHARSET_EBCDIC */ + /* EBCDIC table */ + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 62, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 62, 63, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 63, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 128, 64, + 64, 26, 27, 28, 29, 30, 31, 32, 33, 34, 64, 64, 64, 64, 64, 64, + 64, 35, 36, 37, 38, 39, 40, 41, 42, 43, 64, 64, 64, 64, 64, 64, + 64, 64, 44, 45, 46, 47, 48, 49, 50, 51, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 0, 1, 2, 3, 4, 5, 6, 7, 8, 64, 64, 64, 64, 64, 64, + 64, 9, 10, 11, 12, 13, 14, 15, 16, 17, 64, 64, 64, 64, 64, 64, + 64, 64, 18, 19, 20, 21, 22, 23, 24, 25, 64, 64, 64, 64, 64, 64, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 64, 64, 64, 64, 64 +#endif /* APR_CHARSET_EBCDIC */ +}; + +static const unsigned char pr2five[256] = +{ +#if !APR_CHARSET_EBCDIC + /* ASCII table */ + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 26, 27, 28, 29, 30, 31, 32, 32, 32, 32, 32, 128, 32, 32, + 32, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32 +#else /* APR_CHARSET_EBCDIC */ + /* EBCDIC table */ + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 128, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 0, 1, 2, 3, 4, 5, 6, 7, 8, 32, 32, 32, 32, 32, 32, + 32, 9, 10, 11, 12, 13, 14, 15, 16, 17, 32, 32, 32, 32, 32, 32, + 32, 32, 18, 19, 20, 21, 22, 23, 24, 25, 32, 32, 32, 32, 32, 32, + 32, 32, 26, 27, 28, 29, 30, 31, 32, 32, 32, 32, 32, 32, 32, 32 +#endif /* APR_CHARSET_EBCDIC */ +}; + +static const unsigned char pr2fivehex[256] = +{ +#if !APR_CHARSET_EBCDIC + /* ASCII table */ + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 32, 32, 32, 128, 32, 32, + 32, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32 +#else /* APR_CHARSET_EBCDIC */ + /* EBCDIC table */ + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 128, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 10, 11, 12, 13, 14, 15, 16, 17, 18, 32, 32, 32, 32, 32, 32, + 32, 19, 20, 21, 22, 23, 24, 25, 26, 27, 32, 32, 32, 32, 32, 32, + 32, 32, 28, 29, 30, 31, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 32, 32, 32, 32, 32, 32 +#endif /* APR_CHARSET_EBCDIC */ +}; + +static const unsigned char pr2two[256] = +{ +#if !APR_CHARSET_EBCDIC + /* ASCII table */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 32, 16, 16, 16, 16, 16, + 16, 10, 11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 10, 11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16 +#else /* APR_CHARSET_EBCDIC */ + /* EBCDIC table */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 32, 16, 16, 16, 16, 16, + 16, 10, 11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 10, 11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 16, 16, 16, 16, 16, 16 +#endif /* APR_CHARSET_EBCDIC */ +}; + +static const char base64[] = +"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +static const char base64url[] = +"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; + +static const char base32[] = +"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"; +static const char base32hex[] = +"0123456789ABCDEFGHIJKLMNOPQRSTUV"; + +static const char base16[] = "0123456789ABCDEF"; +static const char base16lower[] = "0123456789abcdef"; + +APR_DECLARE(apr_status_t) apr_encode_base64(char *dest, const char *src, + apr_ssize_t slen, int flags, apr_size_t * len) +{ + const char *base; + + if (!src) { + return APR_NOTFOUND; + } + + if (APR_ENCODE_STRING == slen) { + slen = strlen(src); + } + + if (dest) { + register char *bufout = dest; + int i; + + if (0 == ((flags & APR_ENCODE_BASE64URL))) { + base = base64; + } + else { + base = base64url; + } + + for (i = 0; i < slen - 2; i += 3) { + *bufout++ = base[ENCODE_TO_ASCII(((src[i]) >> 2) & 0x3F)]; + *bufout++ = base[ENCODE_TO_ASCII((((src[i]) & 0x3) << 4) + | ((int)((src[i + 1]) & 0xF0) >> 4))]; + *bufout++ = base[ENCODE_TO_ASCII((((src[i + 1]) & 0xF) << 2) + | ((int)(ENCODE_TO_ASCII(src[i + 2]) & 0xC0) >> 6))]; + *bufout++ = base[ENCODE_TO_ASCII((src[i + 2]) & 0x3F)]; + } + if (i < slen) { + *bufout++ = base[ENCODE_TO_ASCII(((src[i]) >> 2) & 0x3F)]; + if (i == (slen - 1)) { + *bufout++ = base[ENCODE_TO_ASCII((((src[i]) & 0x3) << 4))]; + if (!(flags & APR_ENCODE_NOPADDING)) { + *bufout++ = '='; + } + } + else { + *bufout++ = base[ENCODE_TO_ASCII((((src[i]) & 0x3) << 4) + | ((int)((src[i + 1]) & 0xF0) >> 4))]; + *bufout++ = base[ENCODE_TO_ASCII(((src[i + 1]) & 0xF) << 2)]; + } + if (!(flags & APR_ENCODE_NOPADDING)) { + *bufout++ = '='; + } + } + + if (len) { + *len = bufout - dest; + } + + *bufout++ = '\0'; + + return APR_SUCCESS; + } + + if (len) { + *len = ((slen + 2) / 3 * 4) + 1; + } + + return APR_SUCCESS; +} + +APR_DECLARE(apr_status_t) apr_encode_base64_binary(char *dest, const unsigned char *src, + apr_ssize_t slen, int flags, apr_size_t * len) +{ + const char *base; + + if (!src) { + return APR_NOTFOUND; + } + + if (dest) { + register char *bufout = dest; + int i; + + if (0 == ((flags & APR_ENCODE_BASE64URL))) { + base = base64; + } + else { + base = base64url; + } + + for (i = 0; i < slen - 2; i += 3) { + *bufout++ = base[(src[i] >> 2) & 0x3F]; + *bufout++ = base[((src[i] & 0x3) << 4) + | ((int)(src[i + 1] & 0xF0) >> 4)]; + *bufout++ = base[((src[i + 1] & 0xF) << 2) + | ((int)(src[i + 2] & 0xC0) >> 6)]; + *bufout++ = base[src[i + 2] & 0x3F]; + } + if (i < slen) { + *bufout++ = base[(src[i] >> 2) & 0x3F]; + if (i == (slen - 1)) { + *bufout++ = base[((src[i] & 0x3) << 4)]; + if (!(flags & APR_ENCODE_NOPADDING)) { + *bufout++ = '='; + } + } + else { + *bufout++ = base[((src[i] & 0x3) << 4) + | ((int)(src[i + 1] & 0xF0) >> 4)]; + *bufout++ = base[((src[i + 1] & 0xF) << 2)]; + } + if (!(flags & APR_ENCODE_NOPADDING)) { + *bufout++ = '='; + } + } + + if (len) { + *len = bufout - dest; + } + + *bufout++ = '\0'; + + return APR_SUCCESS; + } + + if (len) { + *len = ((slen + 2) / 3 * 4) + 1; + } + + return APR_SUCCESS; +} + +APR_DECLARE(const char *)apr_pencode_base64(apr_pool_t * p, const char *src, + apr_ssize_t slen, int flags, apr_size_t * len) +{ + apr_size_t size; + + switch (apr_encode_base64(NULL, src, slen, flags, &size)) { + case APR_SUCCESS:{ + char *cmd = apr_palloc(p, size); + apr_encode_base64(cmd, src, slen, flags, len); + return cmd; + } + case APR_NOTFOUND:{ + break; + } + } + + return NULL; +} + +APR_DECLARE(const char *)apr_pencode_base64_binary(apr_pool_t * p, const unsigned char *src, + apr_ssize_t slen, int flags, apr_size_t * len) +{ + apr_size_t size; + + switch (apr_encode_base64_binary(NULL, src, slen, flags, &size)) { + case APR_SUCCESS:{ + char *cmd = apr_palloc(p, size); + apr_encode_base64_binary(cmd, src, slen, flags, len); + return cmd; + } + case APR_NOTFOUND:{ + break; + } + } + + return NULL; +} + +APR_DECLARE(apr_status_t) apr_decode_base64(char *dest, const char *src, + apr_ssize_t slen, int flags, apr_size_t * len) +{ + if (!src) { + return APR_NOTFOUND; + } + + if (APR_ENCODE_STRING == slen) { + slen = strlen(src); + } + + if (dest) { + register const unsigned char *bufin; + register unsigned char *bufout; + register apr_size_t nprbytes; + register apr_size_t count = slen; + + apr_status_t status; + + bufin = (const unsigned char *)src; + while (pr2six[*(bufin++)] < 64 && count) + count--; + nprbytes = (bufin - (const unsigned char *)src) - 1; + while (pr2six[*(bufin++)] > 64 && count) + count--; + + status = flags & APR_ENCODE_RELAXED ? APR_SUCCESS : + count ? APR_BADCH : APR_SUCCESS; + + bufout = (unsigned char *)dest; + bufin = (const unsigned char *)src; + + while (nprbytes > 4) { + *(bufout++) = (unsigned char)ENCODE_TO_NATIVE(pr2six[bufin[0]] << 2 + | pr2six[bufin[1]] >> 4); + *(bufout++) = (unsigned char)ENCODE_TO_NATIVE( + pr2six[bufin[1]] << 4 | pr2six[bufin[2]] >> 2); + *(bufout++) = (unsigned char)ENCODE_TO_NATIVE( + pr2six[bufin[2]] << 6 | pr2six[bufin[3]]); + bufin += 4; + nprbytes -= 4; + } + + if (nprbytes == 1) { + status = APR_BADCH; + } + if (nprbytes > 1) { + *(bufout++) = (unsigned char)ENCODE_TO_NATIVE( + pr2six[*bufin] << 2 | pr2six[bufin[1]] >> 4); + } + if (nprbytes > 2) { + *(bufout++) = (unsigned char)ENCODE_TO_NATIVE( + pr2six[bufin[1]] << 4 | pr2six[bufin[2]] >> 2); + } + if (nprbytes > 3) { + *(bufout++) = (unsigned char)ENCODE_TO_NATIVE( + pr2six[bufin[2]] << 6 | pr2six[bufin[3]]); + } + + if (len) { + *len = bufout - (unsigned char *)dest; + } + + *(bufout++) = 0; + + return status; + } + + if (len) { + *len = (((int)slen + 3) / 4) * 3 + 1; + } + + return APR_SUCCESS; +} + +APR_DECLARE(apr_status_t) apr_decode_base64_binary(unsigned char *dest, + const char *src, apr_ssize_t slen, int flags, apr_size_t * len) +{ + if (!src) { + return APR_NOTFOUND; + } + + if (APR_ENCODE_STRING == slen) { + slen = strlen(src); + } + + if (dest) { + register const unsigned char *bufin; + register unsigned char *bufout; + register apr_size_t nprbytes; + register apr_size_t count = slen; + + apr_status_t status; + + bufin = (const unsigned char *)src; + while (pr2six[*(bufin++)] < 64 && count) + count--; + nprbytes = (bufin - (const unsigned char *)src) - 1; + while (pr2six[*(bufin++)] > 64 && count) + count--; + + status = flags & APR_ENCODE_RELAXED ? APR_SUCCESS : + count ? APR_BADCH : APR_SUCCESS; + + bufout = (unsigned char *)dest; + bufin = (const unsigned char *)src; + + while (nprbytes > 4) { + *(bufout++) = (unsigned char)(pr2six[bufin[0]] << 2 + | pr2six[bufin[1]] >> 4); + *(bufout++) = (unsigned char)(pr2six[bufin[1]] << 4 + | pr2six[bufin[2]] >> 2); + *(bufout++) = (unsigned char)(pr2six[bufin[2]] << 6 + | pr2six[bufin[3]]); + bufin += 4; + nprbytes -= 4; + } + + if (nprbytes == 1) { + status = APR_BADCH; + } + if (nprbytes > 1) { + *(bufout++) = (unsigned char)(pr2six[bufin[0]] << 2 + | pr2six[bufin[1]] >> 4); + } + if (nprbytes > 2) { + *(bufout++) = (unsigned char)(pr2six[bufin[1]] << 4 + | pr2six[bufin[2]] >> 2); + } + if (nprbytes > 3) { + *(bufout++) = (unsigned char)(pr2six[bufin[2]] << 6 + | pr2six[bufin[3]]); + } + + if (len) { + *len = bufout - dest; + } + + return status; + } + + if (len) { + *len = (((int)slen + 3) / 4) * 3; + } + + return APR_SUCCESS; +} + +APR_DECLARE(const char *)apr_pdecode_base64(apr_pool_t * p, const char *str, + apr_ssize_t slen, int flags, apr_size_t * len) +{ + apr_size_t size; + + switch (apr_decode_base64(NULL, str, slen, flags, &size)) { + case APR_SUCCESS:{ + void *cmd = apr_palloc(p, size); + apr_decode_base64(cmd, str, slen, flags, len); + return cmd; + } + case APR_BADCH: + case APR_NOTFOUND:{ + break; + } + } + + return NULL; +} + +APR_DECLARE(const unsigned char *)apr_pdecode_base64_binary(apr_pool_t * p, + const char *str, apr_ssize_t slen, int flags, apr_size_t * len) +{ + apr_size_t size; + + switch (apr_decode_base64_binary(NULL, str, slen, flags, &size)) { + case APR_SUCCESS:{ + unsigned char *cmd = apr_palloc(p, size + 1); + cmd[size] = 0; + apr_decode_base64_binary(cmd, str, slen, flags, len); + return cmd; + } + case APR_BADCH: + case APR_NOTFOUND:{ + break; + } + } + + return NULL; +} + +APR_DECLARE(apr_status_t) apr_encode_base32(char *dest, const char *src, + apr_ssize_t slen, int flags, apr_size_t * len) +{ + const char *base; + + if (!src) { + return APR_NOTFOUND; + } + + if (APR_ENCODE_STRING == slen) { + slen = strlen(src); + } + + if (dest) { + register char *bufout = dest; + int i; + + if (!((flags & APR_ENCODE_BASE32HEX))) { + base = base32; + } + else { + base = base32hex; + } + + for (i = 0; i < slen - 4; i += 5) { + *bufout++ = base[ENCODE_TO_ASCII((src[i] >> 3) & 0x1F)]; + *bufout++ = base[ENCODE_TO_ASCII(((src[i] << 2) & 0x1C) + | ((src[i + 1] >> 6) & 0x3))]; + *bufout++ = base[ENCODE_TO_ASCII((src[i + 1] >> 1) & 0x1F)]; + *bufout++ = base[ENCODE_TO_ASCII(((src[i + 1] << 4) & 0x10) + | ((src[i + 2] >> 4) & 0xF))]; + *bufout++ = base[ENCODE_TO_ASCII(((src[i + 2] << 1) & 0x1E) + | ((src[i + 3] >> 7) & 0x1))]; + *bufout++ = base[ENCODE_TO_ASCII((src[i + 3] >> 2) & 0x1F)]; + *bufout++ = base[ENCODE_TO_ASCII(((src[i + 3] << 3) & 0x18) + | ((src[i + 4] >> 5) & 0x7))]; + *bufout++ = base[ENCODE_TO_ASCII(src[i + 4] & 0x1F)]; + } + if (i < slen) { + *bufout++ = base[ENCODE_TO_ASCII(src[i] >> 3) & 0x1F]; + if (i == (slen - 1)) { + *bufout++ = base[ENCODE_TO_ASCII((src[i] << 2) & 0x1C)]; + if (!(flags & APR_ENCODE_NOPADDING)) { + *bufout++ = '='; + *bufout++ = '='; + *bufout++ = '='; + *bufout++ = '='; + *bufout++ = '='; + *bufout++ = '='; + } + } + else if (i == (slen - 2)) { + *bufout++ = base[ENCODE_TO_ASCII(((src[i] << 2) & 0x1C) + | ((src[i + 1] >> 6) & 0x3))]; + *bufout++ = base[ENCODE_TO_ASCII((src[i + 1] >> 1) & 0x1F)]; + *bufout++ = base[ENCODE_TO_ASCII((src[i + 1] << 4) & 0x10)]; + if (!(flags & APR_ENCODE_NOPADDING)) { + *bufout++ = '='; + *bufout++ = '='; + *bufout++ = '='; + *bufout++ = '='; + } + } + else if (i == (slen - 3)) { + *bufout++ = base[ENCODE_TO_ASCII(((src[i] << 2) & 0x1C) + | ((src[i + 1] >> 6) & 0x3))]; + *bufout++ = base[ENCODE_TO_ASCII((src[i + 1] >> 1) & 0x1F)]; + *bufout++ = base[ENCODE_TO_ASCII(((src[i + 1] << 4) & 0x10) + | ((src[i + 2] >> 4) & 0xF))]; + *bufout++ = base[ENCODE_TO_ASCII((src[i + 2] << 1) & 0x1E)]; + if (!(flags & APR_ENCODE_NOPADDING)) { + *bufout++ = '='; + *bufout++ = '='; + *bufout++ = '='; + } + } + else { + *bufout++ = base[ENCODE_TO_ASCII(((src[i] << 2) & 0x1C) + | ((src[i + 1] >> 6) & 0x3))]; + *bufout++ = base[ENCODE_TO_ASCII((src[i + 1] >> 1) & 0x1F)]; + *bufout++ = base[ENCODE_TO_ASCII(((src[i + 1] << 4) & 0x10) + | ((src[i + 2] >> 4) & 0xF))]; + *bufout++ = base[ENCODE_TO_ASCII(((src[i + 2] << 1) & 0x1E) + | ((src[i + 3] >> 7) & 0x1))]; + *bufout++ = base[ENCODE_TO_ASCII((src[i + 3] >> 2) & 0x1F)]; + *bufout++ = base[ENCODE_TO_ASCII((src[i + 3] << 3) & 0x18)]; + if (!(flags & APR_ENCODE_NOPADDING)) { + *bufout++ = '='; + } + } + } + + if (len) { + *len = bufout - dest; + } + + *bufout++ = '\0'; + + return APR_SUCCESS; + } + + if (len) { + *len = ((slen + 2) / 3 * 4) + 1; + } + + return APR_SUCCESS; +} + +APR_DECLARE(apr_status_t) apr_encode_base32_binary(char *dest, const unsigned char *src, + apr_ssize_t slen, int flags, apr_size_t * len) +{ + const char *base; + + if (!src) { + return APR_NOTFOUND; + } + + if (dest) { + register char *bufout = dest; + int i; + + if (!((flags & APR_ENCODE_BASE32HEX))) { + base = base32; + } + else { + base = base32hex; + } + + for (i = 0; i < slen - 4; i += 5) { + *bufout++ = base[((src[i] >> 3) & 0x1F)]; + *bufout++ = base[(((src[i] << 2) & 0x1C) + | ((src[i + 1] >> 6) & 0x3))]; + *bufout++ = base[((src[i + 1] >> 1) & 0x1F)]; + *bufout++ = base[(((src[i + 1] << 4) & 0x10) + | ((src[i + 2] >> 4) & 0xF))]; + *bufout++ = base[(((src[i + 2] << 1) & 0x1E) + | ((src[i + 3] >> 7) & 0x1))]; + *bufout++ = base[((src[i + 3] >> 2) & 0x1F)]; + *bufout++ = base[(((src[i + 3] << 3) & 0x18) + | ((src[i + 4] >> 5) & 0x7))]; + *bufout++ = base[(src[i + 4] & 0x1F)]; + } + if (i < slen) { + *bufout++ = base[(src[i] >> 3) & 0x1F]; + if (i == (slen - 1)) { + *bufout++ = base[((src[i] << 2) & 0x1C)]; + if (!(flags & APR_ENCODE_NOPADDING)) { + *bufout++ = '='; + *bufout++ = '='; + *bufout++ = '='; + *bufout++ = '='; + *bufout++ = '='; + *bufout++ = '='; + } + } + else if (i == (slen - 2)) { + *bufout++ = base[(((src[i] << 2) & 0x1C) + | ((src[i + 1] >> 6) & 0x3))]; + *bufout++ = base[((src[i + 1] >> 1) & 0x1F)]; + *bufout++ = base[((src[i + 1] << 4) & 0x10)]; + if (!(flags & APR_ENCODE_NOPADDING)) { + *bufout++ = '='; + *bufout++ = '='; + *bufout++ = '='; + *bufout++ = '='; + } + } + else if (i == (slen - 3)) { + *bufout++ = base[(((src[i] << 2) & 0x1C) + | ((src[i + 1] >> 6) & 0x3))]; + *bufout++ = base[((src[i + 1] >> 1) & 0x1F)]; + *bufout++ = base[(((src[i + 1] << 4) & 0x10) + | ((int)(src[i + 2] >> 4) & 0xF))]; + *bufout++ = base[((src[i + 2] << 1) & 0x1E)]; + if (!(flags & APR_ENCODE_NOPADDING)) { + *bufout++ = '='; + *bufout++ = '='; + *bufout++ = '='; + } + } + else { + *bufout++ = base[(((src[i] << 2) & 0x1C) + | ((src[i + 1] >> 6) & 0x3))]; + *bufout++ = base[((src[i + 1] >> 1) & 0x1F)]; + *bufout++ = base[(((src[i + 1] << 4) & 0x10) + | ((src[i + 2] >> 4) & 0xF))]; + *bufout++ = base[(((src[i + 2] << 1) & 0x1E) + | ((src[i + 3] >> 7) & 0x1))]; + *bufout++ = base[((src[i + 3] >> 2) & 0x1F)]; + *bufout++ = base[((src[i + 3] << 3) & 0x18)]; + if (!(flags & APR_ENCODE_NOPADDING)) { + *bufout++ = '='; + } + } + } + + if (len) { + *len = bufout - dest; + } + + *bufout++ = '\0'; + + return APR_SUCCESS; + } + + if (len) { + *len = ((slen + 4) / 5 * 8) + 1; + } + + return APR_SUCCESS; +} + +APR_DECLARE(const char *)apr_pencode_base32(apr_pool_t * p, const char *src, + apr_ssize_t slen, int flags, apr_size_t * len) +{ + apr_size_t size; + + switch (apr_encode_base32(NULL, src, slen, flags, &size)) { + case APR_SUCCESS:{ + char *cmd = apr_palloc(p, size); + apr_encode_base32(cmd, src, slen, flags, len); + return cmd; + } + case APR_NOTFOUND:{ + break; + } + } + + return NULL; +} + +APR_DECLARE(const char *)apr_pencode_base32_binary(apr_pool_t * p, const unsigned char *src, + apr_ssize_t slen, int flags, apr_size_t * len) +{ + apr_size_t size; + + switch (apr_encode_base32_binary(NULL, src, slen, flags, &size)) { + case APR_SUCCESS:{ + char *cmd = apr_palloc(p, size); + apr_encode_base32_binary(cmd, src, slen, flags, len); + return cmd; + } + case APR_NOTFOUND:{ + break; + } + } + + return NULL; +} + +APR_DECLARE(apr_status_t) apr_decode_base32(char *dest, const char *src, + apr_ssize_t slen, int flags, apr_size_t * len) +{ + if (!src) { + return APR_NOTFOUND; + } + + if (APR_ENCODE_STRING == slen) { + slen = strlen(src); + } + + if (dest) { + register const unsigned char *bufin; + register unsigned char *bufout; + register apr_size_t nprbytes; + register apr_size_t count = slen; + + const unsigned char *pr2; + + apr_status_t status; + + if ((flags & APR_ENCODE_BASE32HEX)) { + pr2 = pr2fivehex; + } + else { + pr2 = pr2five; + } + + bufin = (const unsigned char *)src; + while (pr2[*(bufin++)] < 32 && count) + count--; + nprbytes = (bufin - (const unsigned char *)src) - 1; + while (pr2[*(bufin++)] > 32 && count) + count--; + + status = flags & APR_ENCODE_RELAXED ? APR_SUCCESS : + count ? APR_BADCH : APR_SUCCESS; + + bufout = (unsigned char *)dest; + bufin = (const unsigned char *)src; + + while (nprbytes > 8) { + *(bufout++) = (unsigned char)ENCODE_TO_NATIVE(pr2[bufin[0]] << 3 + | pr2[bufin[1]] >> 2); + *(bufout++) = (unsigned char)ENCODE_TO_NATIVE(pr2[bufin[1]] << 6 + | pr2[bufin[2]] << 1 | pr2[bufin[3]] >> 4); + *(bufout++) = (unsigned char)ENCODE_TO_NATIVE(pr2[bufin[3]] << 4 + | pr2[bufin[4]] >> 1); + *(bufout++) = (unsigned char)ENCODE_TO_NATIVE(pr2[bufin[4]] << 7 + | pr2[bufin[5]] << 2 | pr2[bufin[6]] >> 3); + *(bufout++) = (unsigned char)ENCODE_TO_NATIVE(pr2[bufin[6]] << 5 + | pr2[bufin[7]]); + bufin += 8; + nprbytes -= 8; + } + + if (nprbytes == 1) { + status = APR_BADCH; + } + if (nprbytes >= 2) { + *(bufout++) = (unsigned char)ENCODE_TO_NATIVE( + pr2[bufin[0]] << 3 | pr2[bufin[1]] >> 2); + } + if (nprbytes == 3) { + status = APR_BADCH; + } + if (nprbytes >= 4) { + *(bufout++) = (unsigned char)ENCODE_TO_NATIVE( + pr2[bufin[1]] << 6 | pr2[bufin[2]] << 1 + | pr2[bufin[3]] >> 4); + } + if (nprbytes >= 5) { + *(bufout++) = (unsigned char)ENCODE_TO_NATIVE(pr2[bufin[3]] << 4 + | pr2[bufin[4]] >> 1); + } + if (nprbytes == 6) { + status = APR_BADCH; + } + if (nprbytes >= 7) { + *(bufout++) = (unsigned char)ENCODE_TO_NATIVE(pr2[bufin[4]] << 7 + | pr2[bufin[5]] << 2 | pr2[bufin[6]] >> 3); + } + if (nprbytes == 8) { + *(bufout++) = (unsigned char)ENCODE_TO_NATIVE(pr2[bufin[6]] << 5 + | pr2[bufin[7]]); + } + + if (len) { + *len = bufout - (unsigned char *)dest; + } + + *(bufout++) = 0; + + return status; + } + + if (len) { + *len = (((int)slen + 7) / 8) * 5 + 1; + } + + return APR_SUCCESS; +} + +APR_DECLARE(apr_status_t) apr_decode_base32_binary(unsigned char *dest, + const char *src, apr_ssize_t slen, int flags, apr_size_t * len) +{ + if (!src) { + return APR_NOTFOUND; + } + + if (APR_ENCODE_STRING == slen) { + slen = strlen(src); + } + + if (dest) { + register const unsigned char *bufin; + register unsigned char *bufout; + register apr_size_t nprbytes; + register apr_size_t count = slen; + + const unsigned char *pr2; + + apr_status_t status; + + if ((flags & APR_ENCODE_BASE32HEX)) { + pr2 = pr2fivehex; + } + else { + pr2 = pr2five; + } + + bufin = (const unsigned char *)src; + while (pr2[*(bufin++)] < 32 && count) + count--; + nprbytes = (bufin - (const unsigned char *)src) - 1; + while (pr2[*(bufin++)] > 32 && count) + count--; + + status = flags & APR_ENCODE_RELAXED ? APR_SUCCESS : + count ? APR_BADCH : APR_SUCCESS; + + bufout = (unsigned char *)dest; + bufin = (const unsigned char *)src; + + while (nprbytes > 8) { + *(bufout++) = (unsigned char)(pr2[bufin[0]] << 3 + | pr2[bufin[1]] >> 2); + *(bufout++) = (unsigned char)(pr2[bufin[1]] << 6 + | pr2[bufin[2]] << 1 | pr2[bufin[3]] >> 4); + *(bufout++) = (unsigned char)(pr2[bufin[3]] << 4 + | pr2[bufin[4]] >> 1); + *(bufout++) = (unsigned char)(pr2[bufin[4]] << 7 + | pr2[bufin[5]] << 2 | pr2[bufin[6]] >> 3); + *(bufout++) = (unsigned char)(pr2[bufin[6]] << 5 + | pr2[bufin[7]]); + bufin += 8; + nprbytes -= 8; + } + + if (nprbytes == 1) { + status = APR_BADCH; + } + if (nprbytes >= 2) { + *(bufout++) = (unsigned char)( + pr2[bufin[0]] << 3 | pr2[bufin[1]] >> 2); + } + if (nprbytes == 3) { + status = APR_BADCH; + } + if (nprbytes >= 4) { + *(bufout++) = (unsigned char)( + pr2[bufin[1]] << 6 | pr2[bufin[2]] << 1 + | pr2[bufin[3]] >> 4); + } + if (nprbytes >= 5) { + *(bufout++) = (unsigned char)(pr2[bufin[3]] << 4 + | pr2[bufin[4]] >> 1); + } + if (nprbytes == 6) { + status = APR_BADCH; + } + if (nprbytes >= 7) { + *(bufout++) = (unsigned char)(pr2[bufin[4]] << 7 + | pr2[bufin[5]] << 2 | pr2[bufin[6]] >> 3); + } + if (nprbytes == 8) { + *(bufout++) = (unsigned char)(pr2[bufin[6]] << 5 + | pr2[bufin[7]]); + } + + if (len) { + *len = bufout - dest; + } + + return status; + } + + if (len) { + *len = (((int)slen + 7) / 8) * 5; + } + + return APR_SUCCESS; +} + +APR_DECLARE(const char *)apr_pdecode_base32(apr_pool_t * p, const char *str, + apr_ssize_t slen, int flags, apr_size_t * len) +{ + apr_size_t size; + + switch (apr_decode_base32(NULL, str, slen, flags, &size)) { + case APR_SUCCESS:{ + void *cmd = apr_palloc(p, size); + apr_decode_base32(cmd, str, slen, flags, len); + return cmd; + } + case APR_BADCH: + case APR_NOTFOUND:{ + break; + } + } + + return NULL; +} + +APR_DECLARE(const unsigned char *)apr_pdecode_base32_binary(apr_pool_t * p, + const char *str, apr_ssize_t slen, int flags, apr_size_t * len) +{ + apr_size_t size; + + switch (apr_decode_base32_binary(NULL, str, slen, flags, &size)) { + case APR_SUCCESS:{ + unsigned char *cmd = apr_palloc(p, size + 1); + cmd[size] = 0; + apr_decode_base32_binary(cmd, str, slen, flags, len); + return cmd; + } + case APR_BADCH: + case APR_NOTFOUND:{ + break; + } + } + + return NULL; +} + +APR_DECLARE(apr_status_t) apr_encode_base16(char *dest, + const char *src, apr_ssize_t slen, int flags, apr_size_t * len) +{ + const char *in = src; + apr_size_t size; + + if (!src) { + return APR_NOTFOUND; + } + + if (dest) { + register char *bufout = dest; + const char *base; + + if ((flags & APR_ENCODE_LOWER)) { + base = base16lower; + } + else { + base = base16; + } + + for (size = 0; (APR_ENCODE_STRING == slen) ? in[size] : size < slen; size++) { + if ((flags & APR_ENCODE_COLON) && size) { + *(bufout++) = ':'; + } + *(bufout++) = base[(const unsigned char)(ENCODE_TO_ASCII(in[size])) >> 4]; + *(bufout++) = base[(const unsigned char)(ENCODE_TO_ASCII(in[size])) & 0xf]; + } + + if (len) { + *len = bufout - dest; + } + + *bufout = '\0'; + + return APR_SUCCESS; + } + + if (len) { + if (APR_ENCODE_STRING == slen) { + slen = strlen(src); + } + if ((flags & APR_ENCODE_COLON) && slen) { + *len = slen * 3; + } + else { + *len = slen * 2 + 1; + } + } + + return APR_SUCCESS; +} + +APR_DECLARE(apr_status_t) apr_encode_base16_binary(char *dest, + const unsigned char *src, apr_ssize_t slen, int flags, apr_size_t * len) +{ + const unsigned char *in = src; + apr_size_t size; + + if (!src) { + return APR_NOTFOUND; + } + + if (dest) { + register char *bufout = dest; + const char *base; + + if ((flags & APR_ENCODE_LOWER)) { + base = base16lower; + } + else { + base = base16; + } + + for (size = 0; size < slen; size++) { + if ((flags & APR_ENCODE_COLON) && size) { + *(bufout++) = ':'; + } + *(bufout++) = base[in[size] >> 4]; + *(bufout++) = base[in[size] & 0xf]; + } + + if (len) { + *len = bufout - dest; + } + + *bufout = 0; + + return APR_SUCCESS; + } + + if (len) { + if ((flags & APR_ENCODE_COLON) && slen) { + *len = slen * 3; + } + else { + *len = slen * 2 + 1; + } + } + + return APR_SUCCESS; +} + +APR_DECLARE(const char *)apr_pencode_base16(apr_pool_t * p, + const char *src, apr_ssize_t slen, int flags, apr_size_t * len) +{ + apr_size_t size; + + switch (apr_encode_base16(NULL, src, slen, flags, &size)) { + case APR_SUCCESS:{ + char *cmd = apr_palloc(p, size); + apr_encode_base16(cmd, src, slen, flags, len); + return cmd; + } + case APR_NOTFOUND:{ + break; + } + } + + return NULL; +} + +APR_DECLARE(const char *)apr_pencode_base16_binary(apr_pool_t * p, + const unsigned char *src, apr_ssize_t slen, int flags, + apr_size_t * len) +{ + apr_size_t size; + + switch (apr_encode_base16_binary(NULL, src, slen, flags, &size)) { + case APR_SUCCESS:{ + char *cmd = apr_palloc(p, size); + apr_encode_base16_binary(cmd, src, slen, flags, len); + return cmd; + } + case APR_NOTFOUND:{ + break; + } + } + + return NULL; +} + +APR_DECLARE(apr_status_t) apr_decode_base16(char *dest, + const char *src, apr_ssize_t slen, int flags, apr_size_t * len) +{ + register const unsigned char *bufin; + register unsigned char *bufout; + register apr_size_t nprbytes; + register apr_size_t count; + + apr_status_t status; + + if (!src) { + return APR_NOTFOUND; + } + + if (APR_ENCODE_STRING == slen) { + slen = strlen(src); + } + + count = slen; + bufin = (const unsigned char *)src; + while (pr2two[*(bufin++)] != 16 && count) + count--; + nprbytes = (bufin - (const unsigned char *)src) - 1; + while (pr2two[*(bufin++)] > 16 && count) + count--; + + status = flags & APR_ENCODE_RELAXED ? APR_SUCCESS : + count ? APR_BADCH : APR_SUCCESS; + + if (dest) { + + bufout = (unsigned char *)dest; + bufin = (const unsigned char *)src; + + while (nprbytes >= 2) { + if (pr2two[bufin[0]] > 16) { + bufin += 1; + nprbytes -= 1; + } + else { + *(bufout++) = (unsigned char)ENCODE_TO_NATIVE( + pr2two[bufin[0]] << 4 | pr2two[bufin[1]]); + bufin += 2; + nprbytes -= 2; + } + } + + if (nprbytes == 1) { + status = APR_BADCH; + } + + if (len) { + *len = bufout - (unsigned char *)dest; + } + + *(bufout++) = 0; + + return status; + } + + else { + + count = 0; + bufin = (const unsigned char *)src; + + while (nprbytes >= 2) { + if (pr2two[bufin[0]] > 16) { + bufin += 1; + nprbytes -= 1; + } + else { + count++; + bufin += 2; + nprbytes -= 2; + } + } + + if (nprbytes == 1) { + status = APR_BADCH; + } + + if (len) { + *len = count + 1; + } + + return status; + } + +} + +APR_DECLARE(apr_status_t) apr_decode_base16_binary(unsigned char *dest, + const char *src, apr_ssize_t slen, int flags, apr_size_t * len) +{ + register const unsigned char *bufin; + register unsigned char *bufout; + register apr_size_t nprbytes; + register apr_size_t count; + + apr_status_t status; + + if (!src) { + return APR_NOTFOUND; + } + + if (APR_ENCODE_STRING == slen) { + slen = strlen(src); + } + + count = slen; + bufin = (const unsigned char *)src; + while (pr2two[*(bufin++)] != 16 && count) + count--; + nprbytes = (bufin - (const unsigned char *)src) - 1; + while (pr2two[*(bufin++)] > 16 && count) + count--; + + status = flags & APR_ENCODE_RELAXED ? APR_SUCCESS : + count ? APR_BADCH : APR_SUCCESS; + + if (dest) { + + bufout = (unsigned char *)dest; + bufin = (const unsigned char *)src; + + while (nprbytes >= 2) { + if (pr2two[bufin[0]] > 16) { + bufin += 1; + nprbytes -= 1; + } + else { + *(bufout++) = (unsigned char)( + pr2two[bufin[0]] << 4 | pr2two[bufin[1]]); + bufin += 2; + nprbytes -= 2; + } + } + + if (nprbytes == 1) { + status = APR_BADCH; + } + + if (len) { + *len = bufout - (unsigned char *)dest; + } + + return status; + } + + else { + + count = 0; + bufin = (const unsigned char *)src; + + while (nprbytes >= 2) { + if (pr2two[bufin[0]] > 16) { + bufin += 1; + nprbytes -= 1; + } + else { + count++; + bufin += 2; + nprbytes -= 2; + } + } + + if (nprbytes == 1) { + status = APR_BADCH; + } + + if (len) { + *len = count; + } + + return status; + } +} + +APR_DECLARE(const char *)apr_pdecode_base16(apr_pool_t * p, + const char *str, apr_ssize_t slen, int flags, apr_size_t * len) +{ + apr_size_t size; + + switch (apr_decode_base16(NULL, str, slen, flags, &size)) { + case APR_SUCCESS:{ + void *cmd = apr_palloc(p, size); + apr_decode_base16(cmd, str, slen, flags, len); + return cmd; + } + case APR_BADCH: + case APR_NOTFOUND:{ + break; + } + } + + return NULL; +} + +APR_DECLARE(const unsigned char *)apr_pdecode_base16_binary(apr_pool_t * p, + const char *str, apr_ssize_t slen, int flags, apr_size_t * len) +{ + apr_size_t size; + + switch (apr_decode_base16_binary(NULL, str, slen, flags, &size)) { + case APR_SUCCESS:{ + unsigned char *cmd = apr_palloc(p, size + 1); + cmd[size] = 0; + apr_decode_base16_binary(cmd, str, slen, flags, len); + return cmd; + } + case APR_BADCH: + case APR_NOTFOUND:{ + break; + } + } + + return NULL; +} Index: contrib/apr/encoding/apr_escape.c =================================================================== --- contrib/apr/encoding/apr_escape.c +++ contrib/apr/encoding/apr_escape.c @@ -27,50 +27,10 @@ #include "apr_escape.h" #include "apr_escape_test_char.h" +#include "apr_encode_private.h" #include "apr_lib.h" #include "apr_strings.h" -#if APR_CHARSET_EBCDIC -static int convert_a2e[256] = { - 0x00, 0x01, 0x02, 0x03, 0x37, 0x2D, 0x2E, 0x2F, 0x16, 0x05, 0x15, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, - 0x10, 0x11, 0x12, 0x13, 0x3C, 0x3D, 0x32, 0x26, 0x18, 0x19, 0x3F, 0x27, 0x1C, 0x1D, 0x1E, 0x1F, - 0x40, 0x5A, 0x7F, 0x7B, 0x5B, 0x6C, 0x50, 0x7D, 0x4D, 0x5D, 0x5C, 0x4E, 0x6B, 0x60, 0x4B, 0x61, - 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0x7A, 0x5E, 0x4C, 0x7E, 0x6E, 0x6F, - 0x7C, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, - 0xD7, 0xD8, 0xD9, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xAD, 0xE0, 0xBD, 0x5F, 0x6D, - 0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, - 0x97, 0x98, 0x99, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xC0, 0x4F, 0xD0, 0xA1, 0x07, - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x06, 0x17, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x09, 0x0A, 0x1B, - 0x30, 0x31, 0x1A, 0x33, 0x34, 0x35, 0x36, 0x08, 0x38, 0x39, 0x3A, 0x3B, 0x04, 0x14, 0x3E, 0xFF, - 0x41, 0xAA, 0x4A, 0xB1, 0x9F, 0xB2, 0x6A, 0xB5, 0xBB, 0xB4, 0x9A, 0x8A, 0xB0, 0xCA, 0xAF, 0xBC, - 0x90, 0x8F, 0xEA, 0xFA, 0xBE, 0xA0, 0xB6, 0xB3, 0x9D, 0xDA, 0x9B, 0x8B, 0xB7, 0xB8, 0xB9, 0xAB, - 0x64, 0x65, 0x62, 0x66, 0x63, 0x67, 0x9E, 0x68, 0x74, 0x71, 0x72, 0x73, 0x78, 0x75, 0x76, 0x77, - 0xAC, 0x69, 0xED, 0xEE, 0xEB, 0xEF, 0xEC, 0xBF, 0x80, 0xFD, 0xFE, 0xFB, 0xFC, 0xBA, 0xAE, 0x59, - 0x44, 0x45, 0x42, 0x46, 0x43, 0x47, 0x9C, 0x48, 0x54, 0x51, 0x52, 0x53, 0x58, 0x55, 0x56, 0x57, - 0x8C, 0x49, 0xCD, 0xCE, 0xCB, 0xCF, 0xCC, 0xE1, 0x70, 0xDD, 0xDE, 0xDB, 0xDC, 0x8D, 0x8E, 0xDF }; - -static int convert_e2a[256] = { - 0x00, 0x01, 0x02, 0x03, 0x9C, 0x09, 0x86, 0x7F, 0x97, 0x8D, 0x8E, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, - 0x10, 0x11, 0x12, 0x13, 0x9D, 0x0A, 0x08, 0x87, 0x18, 0x19, 0x92, 0x8F, 0x1C, 0x1D, 0x1E, 0x1F, - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x17, 0x1B, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x05, 0x06, 0x07, - 0x90, 0x91, 0x16, 0x93, 0x94, 0x95, 0x96, 0x04, 0x98, 0x99, 0x9A, 0x9B, 0x14, 0x15, 0x9E, 0x1A, - 0x20, 0xA0, 0xE2, 0xE4, 0xE0, 0xE1, 0xE3, 0xE5, 0xE7, 0xF1, 0xA2, 0x2E, 0x3C, 0x28, 0x2B, 0x7C, - 0x26, 0xE9, 0xEA, 0xEB, 0xE8, 0xED, 0xEE, 0xEF, 0xEC, 0xDF, 0x21, 0x24, 0x2A, 0x29, 0x3B, 0x5E, - 0x2D, 0x2F, 0xC2, 0xC4, 0xC0, 0xC1, 0xC3, 0xC5, 0xC7, 0xD1, 0xA6, 0x2C, 0x25, 0x5F, 0x3E, 0x3F, - 0xF8, 0xC9, 0xCA, 0xCB, 0xC8, 0xCD, 0xCE, 0xCF, 0xCC, 0x60, 0x3A, 0x23, 0x40, 0x27, 0x3D, 0x22, - 0xD8, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0xAB, 0xBB, 0xF0, 0xFD, 0xFE, 0xB1, - 0xB0, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0xAA, 0xBA, 0xE6, 0xB8, 0xC6, 0xA4, - 0xB5, 0x7E, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0xA1, 0xBF, 0xD0, 0x5B, 0xDE, 0xAE, - 0xAC, 0xA3, 0xA5, 0xB7, 0xA9, 0xA7, 0xB6, 0xBC, 0xBD, 0xBE, 0xDD, 0xA8, 0xAF, 0x5D, 0xB4, 0xD7, - 0x7B, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0xAD, 0xF4, 0xF6, 0xF2, 0xF3, 0xF5, - 0x7D, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0xB9, 0xFB, 0xFC, 0xF9, 0xFA, 0xFF, - 0x5C, 0xF7, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0xB2, 0xD4, 0xD6, 0xD2, 0xD3, 0xD5, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0xB3, 0xDB, 0xDC, 0xD9, 0xDA, 0x9F }; -#define RAW_ASCII_CHAR(ch) convert_e2a[(unsigned char)ch] -#else /* APR_CHARSET_EBCDIC */ -#define RAW_ASCII_CHAR(ch) (ch) -#endif /* !APR_CHARSET_EBCDIC */ - /* we assume the folks using this ensure 0 <= c < 256... which means * you need a cast to (unsigned char) first, you can't just plug a * char in here and get it to work, because if char is signed then it @@ -171,7 +131,7 @@ xstr[2]=what[0]; xstr[3]=what[1]; xstr[4]='\0'; - digit = convert_a2e[0xFF & strtol(xstr, NULL, 16)]; + digit = ENCODE_TO_NATIVE[0xFF & strtol(xstr, NULL, 16)]; #endif /*APR_CHARSET_EBCDIC*/ return (digit); } @@ -756,7 +716,7 @@ size--; } else { - *d = RAW_ASCII_CHAR(val); + *d = ENCODE_TO_ASCII(val); found = 1; } } @@ -777,7 +737,7 @@ *d = '&'; /* unknown */ } else { - *d = RAW_ASCII_CHAR(((const unsigned char *) ents)[j]); + *d = ENCODE_TO_ASCII(((const unsigned char *) ents)[j]); s += i; slen -= i; found = 1; @@ -1181,3 +1141,74 @@ 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; +} + Index: contrib/apr/file_io/unix/copy.c =================================================================== --- contrib/apr/file_io/unix/copy.c +++ contrib/apr/file_io/unix/copy.c @@ -41,6 +41,7 @@ return status; } perms = finfo.protection; + apr_file_perms_set(to_path, perms); /* ignore any failure */ } else perms = to_perms; Index: contrib/apr/file_io/unix/dir.c =================================================================== --- contrib/apr/file_io/unix/dir.c +++ contrib/apr/file_io/unix/dir.c @@ -24,6 +24,10 @@ #include #endif +#ifndef NAME_MAX +#define NAME_MAX 255 +#endif + static apr_status_t dir_cleanup(void *thedir) { apr_dir_t *dir = thedir; @@ -71,14 +75,6 @@ apr_status_t apr_dir_open(apr_dir_t **new, const char *dirname, apr_pool_t *pool) { - /* On some platforms (e.g., Linux+GNU libc), d_name[] in struct - * dirent is declared with enough storage for the name. On other - * platforms (e.g., Solaris 8 for Intel), d_name is declared as a - * one-byte array. Note: gcc evaluates this at compile time. - */ - apr_size_t dirent_size = - sizeof(*(*new)->entry) + - (sizeof((*new)->entry->d_name) > 1 ? 0 : 255); DIR *dir = opendir(dirname); if (!dir) { @@ -90,7 +86,20 @@ (*new)->pool = pool; (*new)->dirname = apr_pstrdup(pool, dirname); (*new)->dirstruct = dir; - (*new)->entry = apr_pcalloc(pool, dirent_size); + +#if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS) \ + && !defined(READDIR_IS_THREAD_SAFE) + /* On some platforms (e.g., Linux+GNU libc), d_name[] in struct + * dirent is declared with enough storage for the name. On other + * platforms (e.g., Solaris 8 for Intel), d_name is declared as a + * one-byte array. Note: gcc evaluates this at compile time. + */ + (*new)->entry = apr_pcalloc(pool, sizeof(*(*new)->entry) + + (sizeof((*new)->entry->d_name) > 1 + ? 0 : NAME_MAX)); +#else + (*new)->entry = NULL; +#endif apr_pool_cleanup_register((*new)->pool, *new, dir_cleanup, apr_pool_cleanup_null); Index: contrib/apr/file_io/unix/flock.c =================================================================== --- contrib/apr/file_io/unix/flock.c +++ contrib/apr/file_io/unix/flock.c @@ -32,8 +32,8 @@ 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 @@ { 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; Index: contrib/apr/file_io/unix/pipe.c =================================================================== --- contrib/apr/file_io/unix/pipe.c +++ contrib/apr/file_io/unix/pipe.c @@ -176,7 +176,8 @@ 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 @@ 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 @@ #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 @@ 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_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; } Index: contrib/apr/file_io/unix/readwrite.c =================================================================== --- contrib/apr/file_io/unix/readwrite.c +++ contrib/apr/file_io/unix/readwrite.c @@ -387,6 +387,8 @@ #ifdef HAVE_FDATASYNC if (fdatasync(thefile->filedes)) { +#elif defined(F_FULLFSYNC) + if (fcntl(thefile->filedes, F_FULLFSYNC)) { #else if (fsync(thefile->filedes)) { #endif Index: contrib/apr/file_io/unix/seek.c =================================================================== --- contrib/apr/file_io/unix/seek.c +++ contrib/apr/file_io/unix/seek.c @@ -117,6 +117,13 @@ /* 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; Index: contrib/apr/include/apr.h.in =================================================================== --- contrib/apr/include/apr.h.in +++ contrib/apr/include/apr.h.in @@ -93,6 +93,7 @@ #define APR_HAVE_STDLIB_H @stdlibh@ #define APR_HAVE_STRING_H @stringh@ #define APR_HAVE_STRINGS_H @stringsh@ +#define APR_HAVE_INTTYPES_H @inttypesh@ #define APR_HAVE_SYS_IOCTL_H @sys_ioctlh@ #define APR_HAVE_SYS_SENDFILE_H @sys_sendfileh@ #define APR_HAVE_SYS_SIGNAL_H @sys_signalh@ @@ -168,16 +169,25 @@ #include #endif -#if defined(__cplusplus) && !defined(__STDC_CONSTANT_MACROS) +#if APR_HAVE_STDINT_H +#ifdef __cplusplus /* C99 7.18.4 requires that stdint.h only exposes INT64_C * and UINT64_C for C++ implementations if this is defined: */ +#ifndef __STDC_CONSTANT_MACROS #define __STDC_CONSTANT_MACROS #endif - -#if APR_HAVE_STDINT_H +/* C++ needs this too for PRI*NN formats: */ +#ifndef __STDC_FORMAT_MACROS +#define __STDC_FORMAT_MACROS +#endif +#endif /* __cplusplus */ #include #endif +#if APR_HAVE_INTTYPES_H +#include +#endif + #if APR_HAVE_SYS_WAIT_H #include #endif @@ -197,6 +207,13 @@ #endif #endif +/* __APPLE__ is now the official pre-defined macro for macOS */ +#ifdef __APPLE__ +#undef DARWIN +#undef DARWIN_10 +#define DARWIN +#define DARWIN_10 +#endif /* __APPLE__ */ #ifdef __cplusplus extern "C" { @@ -245,6 +262,7 @@ #define APR_HAVE_INET_ADDR @have_inet_addr@ #define APR_HAVE_INET_NETWORK @have_inet_network@ #define APR_HAVE_IPV6 @have_ipv6@ +#define APR_HAVE_SOCKADDR_UN @have_sockaddr_un@ #define APR_HAVE_MEMMOVE @have_memmove@ #define APR_HAVE_SETRLIMIT @have_setrlimit@ #define APR_HAVE_SIGACTION @have_sigaction@ @@ -279,6 +297,7 @@ #define APR_HAS_LARGE_FILES @aprlfs@ #define APR_HAS_XTHREAD_FILES @apr_has_xthread_files@ #define APR_HAS_OS_UUID @osuuid@ +#define APR_HAS_TIMEDLOCKS @apr_has_timedlocks@ #define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD @apr_procattr_user_set_requires_password@ @@ -333,24 +352,28 @@ */ #ifdef DARWIN_10 #undef APR_SIZEOF_VOIDP -#undef INT64_C -#undef UINT64_C +#undef APR_INT64_C +#undef APR_UINT64_C #ifdef __LP64__ typedef long apr_int64_t; typedef unsigned long apr_uint64_t; #define APR_SIZEOF_VOIDP 8 - #define INT64_C(v) (v ## L) - #define UINT64_C(v) (v ## UL) + #define APR_INT64_C(v) (v ## L) + #define APR_UINT64_C(v) (v ## UL) #else typedef long long apr_int64_t; typedef unsigned long long apr_uint64_t; #define APR_SIZEOF_VOIDP 4 - #define INT64_C(v) (v ## LL) - #define UINT64_C(v) (v ## ULL) + #define APR_INT64_C(v) (v ## LL) + #define APR_UINT64_C(v) (v ## ULL) #endif #else - typedef @long_value@ apr_int64_t; - typedef unsigned @long_value@ apr_uint64_t; + typedef @int64_value@ apr_int64_t; + typedef @uint64_value@ apr_uint64_t; + + /* Mechanisms to properly type numeric literals */ + @int64_literal@ + @uint64_literal@ #endif typedef @size_t_value@ apr_size_t; @@ -368,10 +391,6 @@ /* Are we big endian? */ #define APR_IS_BIGENDIAN @bigendian@ -/* Mechanisms to properly type numeric literals */ -@int64_literal@ -@uint64_literal@ - #ifdef INT16_MIN #define APR_INT16_MIN INT16_MIN #else Index: contrib/apr/include/apr.hnw =================================================================== --- contrib/apr/include/apr.hnw +++ contrib/apr/include/apr.hnw @@ -180,6 +180,7 @@ #else #define APR_HAVE_IPV6 0 #endif +#define APR_HAVE_SOCKADDR_UN 0 #define APR_HAVE_MEMCHR 1 #define APR_HAVE_MEMMOVE 1 #define APR_HAVE_SETRLIMIT 0 @@ -213,6 +214,7 @@ #define APR_HAS_LARGE_FILES 1 #define APR_HAS_XTHREAD_FILES 0 #define APR_HAS_OS_UUID 0 +#define APR_HAS_TIMEDLOCKS 1 #define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0 Index: contrib/apr/include/apr.hw =================================================================== --- contrib/apr/include/apr.hw +++ contrib/apr/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 #endif + #if APR_HAVE_STDIO_H #include #endif + #if APR_HAVE_SYS_TYPES_H #include #endif + #if APR_HAVE_STDDEF_H #include #endif + +#if APR_HAVE_SYS_SOCKET_H +#include +#endif + +#if APR_HAVE_STDINT_H +#include +#endif + +#if APR_HAVE_SYS_WAIT_H +#include +#endif + #if APR_HAVE_TIME_H #include #endif + #if APR_HAVE_PROCESS_H #include #endif @@ -261,12 +280,12 @@ #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 @@ #define APR_HAVE_IN_ADDR 1 #define APR_HAVE_INET_ADDR 1 #define APR_HAVE_INET_NETWORK 0 -#define APR_HAVE_IPV6 0 +#define APR_HAVE_IPV6 1 +#define APR_HAVE_SOCKADDR_UN 0 #define APR_HAVE_MEMMOVE 1 #define APR_HAVE_SETRLIMIT 0 #define APR_HAVE_SIGACTION 0 @@ -319,6 +339,7 @@ #define APR_HAS_UNICODE_FS 1 #define APR_HAS_PROC_INVOKED 1 #define APR_HAS_OS_UUID 1 +#define APR_HAS_TIMEDLOCKS 1 #ifndef _WIN32_WCE #define APR_HAS_SENDFILE 1 @@ -354,7 +375,7 @@ /* Is the O_NONBLOCK flag inherited from listening sockets? */ -#define APR_O_NONBLOCK_INHERITED 1 +#define APR_O_NONBLOCK_INHERITED 1 /* Typedefs that APR needs. */ @@ -626,18 +647,20 @@ && (*(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 */ Index: contrib/apr/include/apr.hwc =================================================================== --- contrib/apr/include/apr.hwc +++ contrib/apr/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 #endif + #if APR_HAVE_STDIO_H #include #endif + #if APR_HAVE_SYS_TYPES_H #include #endif + #if APR_HAVE_STDDEF_H #include #endif + +#if APR_HAVE_SYS_SOCKET_H +#include +#endif + +#if APR_HAVE_STDINT_H +#include +#endif + +#if APR_HAVE_SYS_WAIT_H +#include +#endif + #if APR_HAVE_TIME_H #include #endif + #if APR_HAVE_PROCESS_H #include #endif @@ -258,12 +277,12 @@ #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 @@ #define APR_HAVE_INET_ADDR 1 #define APR_HAVE_INET_NETWORK 0 #define APR_HAVE_IPV6 @apr_have_ipv6_10@ +#define APR_HAVE_SOCKADDR_UN 0 #define APR_HAVE_MEMMOVE 1 #define APR_HAVE_SETRLIMIT 0 #define APR_HAVE_SIGACTION 0 @@ -316,6 +336,7 @@ #define APR_HAS_UNICODE_FS 1 #define APR_HAS_PROC_INVOKED 1 #define APR_HAS_OS_UUID 1 +#define APR_HAS_TIMEDLOCKS 1 #ifndef _WIN32_WCE #define APR_HAS_SENDFILE 1 @@ -351,7 +372,7 @@ /* Is the O_NONBLOCK flag inherited from listening sockets? */ -#define APR_O_NONBLOCK_INHERITED 1 +#define APR_O_NONBLOCK_INHERITED 1 /* Typedefs that APR needs. */ @@ -623,18 +644,20 @@ && (*(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 */ Index: contrib/apr/include/apr_allocator.h =================================================================== --- contrib/apr/include/apr_allocator.h +++ contrib/apr/include/apr_allocator.h @@ -103,6 +103,16 @@ 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" Index: contrib/apr/include/apr_atomic.h =================================================================== --- contrib/apr/include/apr_atomic.h +++ contrib/apr/include/apr_atomic.h @@ -41,7 +41,7 @@ * @param p pool * @return APR_SUCCESS on successful completion * @remark Programs do NOT need to call this directly. APR will call this - * automatically from apr_initialize. + * automatically from apr_initialize(). * @internal */ APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p); @@ -113,6 +113,73 @@ */ APR_DECLARE(apr_uint32_t) apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val); +/* + * Atomic operations on 64-bit values + * Note: Each of these functions internally implements a memory barrier + * on platforms that require it + */ + +/** + * atomically read an apr_uint64_t from memory + * @param mem the pointer + */ +APR_DECLARE(apr_uint64_t) apr_atomic_read64(volatile apr_uint64_t *mem); + +/** + * atomically set an apr_uint64_t in memory + * @param mem pointer to the object + * @param val value that the object will assume + */ +APR_DECLARE(void) apr_atomic_set64(volatile apr_uint64_t *mem, apr_uint64_t val); + +/** + * atomically add 'val' to an apr_uint64_t + * @param mem pointer to the object + * @param val amount to add + * @return old value pointed to by mem + */ +APR_DECLARE(apr_uint64_t) apr_atomic_add64(volatile apr_uint64_t *mem, apr_uint64_t val); + +/** + * atomically subtract 'val' from an apr_uint64_t + * @param mem pointer to the object + * @param val amount to subtract + */ +APR_DECLARE(void) apr_atomic_sub64(volatile apr_uint64_t *mem, apr_uint64_t val); + +/** + * atomically increment an apr_uint64_t by 1 + * @param mem pointer to the object + * @return old value pointed to by mem + */ +APR_DECLARE(apr_uint64_t) apr_atomic_inc64(volatile apr_uint64_t *mem); + +/** + * atomically decrement an apr_uint64_t by 1 + * @param mem pointer to the atomic value + * @return zero if the value becomes zero on decrement, otherwise non-zero + */ +APR_DECLARE(int) apr_atomic_dec64(volatile apr_uint64_t *mem); + +/** + * compare an apr_uint64_t's value with 'cmp'. + * If they are the same swap the value with 'with' + * @param mem pointer to the value + * @param with what to swap it with + * @param cmp the value to compare it to + * @return the old value of *mem + */ +APR_DECLARE(apr_uint64_t) apr_atomic_cas64(volatile apr_uint64_t *mem, apr_uint64_t with, + apr_uint64_t cmp); + +/** + * exchange an apr_uint64_t's value with 'val'. + * @param mem pointer to the value + * @param val what to swap it with + * @return the old value of *mem + */ +APR_DECLARE(apr_uint64_t) apr_atomic_xchg64(volatile apr_uint64_t *mem, apr_uint64_t val); + /** * compare the pointer's value with cmp. * If they are the same swap the value with 'with' Index: contrib/apr/include/apr_cstr.h =================================================================== --- /dev/null +++ contrib/apr/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 /* for apr_size_t */ +#include /* for apr_pool_t */ +#include /* 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 */ Index: contrib/apr/include/apr_encode.h =================================================================== --- /dev/null +++ contrib/apr/include/apr_encode.h @@ -0,0 +1,569 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file apr_encode.h + * @brief APR-UTIL Encoding + */ +#ifndef APR_ENCODE_H +#define APR_ENCODE_H + +#include "apr.h" +#include "apr_general.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @defgroup APR_Util_Encode Base64/Base64Url/Base32/Base32Hex/Base16 Encoding + * @ingroup APR_Util + * @{ + */ + +/** + * RFC4648 and RFC7515 compliant BASE64, BASE64URL, BASE32, BASE32HEX + * and BASE16 encode/decode functions. + * + * The following encodings are supported: + * + * - Base 64 Encoding + * + * o Use flag APR_ENCODE_NONE + * o https://tools.ietf.org/html/rfc4648#section-4 + * + * - Base 64 Encoding with URL and Filename Safe Alphabet + * + * o Use flag APR_ENCODE_URL + * o https://tools.ietf.org/html/rfc4648#section-5 + * + * - Base 64 URL Encoding without Padding + * + * o Use flag APR_ENCODE_BASE64URL + * o https://tools.ietf.org/html/rfc7515#appendix-C + * + * - Base 32 Encoding + * + * o Use flag APR_ENCODE_NONE + * o https://tools.ietf.org/html/rfc4648#section-6 + * + * - Base 32 Encoding with Extended Hex Alphabet + * + * o Use flag APR_ENCODE_BASE32HEX + * o https://tools.ietf.org/html/rfc4648#section-7 + * + * - Base 16 Encoding + * + * o Use flags APR_ENCODE_NONE/APR_ENCODE_COLON + * o https://tools.ietf.org/html/rfc4648#section-8 + * + * If a non valid character of any kind including whitespace is passed to any + * of the decoder functions, APR_BADCH will be returned. In this case decoding + * will still take place, but the results can not be trusted. + * + * If APR_ENCODE_RELAXED is passed to the decoder functions, decoding will be + * attempted up until the first non valid character. If this results in an + * invalid state in the decoder, such as but not limited to an odd number of + * base16 characters, APR_BADCH will still be returned. + * + * If APR_ENCODE_RELAXED is not passed to a decoder function, the decoding will + * be done in constant time regardless of whether the result returns APR_SUCCESS + * or APR_BADCH. + * + * If the dest parameter is NULL, the maximum theoretical buffer size is + * returned in the len field, including space for a terminating zero character + * if the destination is a string. This value can be used to allocate buffers + * of a suitable safe size. + * + * If the dest parameter is provided, the encoding or decoding will take place, + * and the actual number of characters written is returned in the len field, + * ignoring any terminating zero. + * + * Plain strings are not assumed '\0' terminated unless APR_ENCODE_STRING is + * provided. + * + */ + +/** + * When passing a string to one of the encode functions, this value can be + * passed to indicate a string-valued key, and have the length computed + * automatically. + */ +#define APR_ENCODE_STRING (-1) + +/** + * Generate RFC4648 base16/base32/base64. + */ +#define APR_ENCODE_NONE 0 + +/** + * If relaxed, decode up until the first non base16/base32/base64 character. + */ +#define APR_ENCODE_RELAXED 1 + +/** + * Omit the padding character (=) while encoding. + */ +#define APR_ENCODE_NOPADDING 2 + +/** + * Generate RFC4648 Base 64 Encoding with URL and Filename Safe Alphabet + */ +#define APR_ENCODE_URL 4 + +/** + * Generate RFC7515 BASE64URL + */ +#define APR_ENCODE_BASE64URL (APR_ENCODE_NOPADDING | APR_ENCODE_URL) + +/** + * Generate base32hex encoding instead of base32 encoding + */ +#define APR_ENCODE_BASE32HEX 8 + +/** + * Generate base16 with colons between each token. + */ +#define APR_ENCODE_COLON 16 + +/** + * Generate base16 with lower case characters. + */ +#define APR_ENCODE_LOWER 32 + +/** + * Convert text data to base64. + * @param dest The destination string, can be NULL. + * @param src The original string. + * @param slen The length of the original string, or APR_ENCODE_STRING if + * NUL terminated. + * @param flags If APR_ENCODE_NONE, emit RFC4648 Base 64 Encoding. If + * APR_ENCODE_NOPADDING, omit the = padding character. If APR_ENCODE_URL, + * use RFC4648 Base 64 Encoding with URL and Filename Safe Alphabet. + * If APR_ENCODE_BASE64URL, use RFC7515 base64url Encoding. + * @param len If present and src is NULL, returns the maximum possible length + * of the destination string, including a zero pad. If present and src is + * not NULL, returns the number of characters actually written. + * @return APR_SUCCESS, or APR_NOTFOUND if the string was NULL. + */ +APR_DECLARE(apr_status_t) apr_encode_base64(char *dest, const char *src, + apr_ssize_t slen, int flags, apr_size_t * len); + +/** + * Convert binary data to base64. + * @param dest The destination string, can be NULL. + * @param src The original buffer. + * @param slen The length of the original buffer. + * @param flags If APR_ENCODE_NONE, emit RFC4648 Base 64 Encoding. If + * APR_ENCODE_NOPADDING, omit the = padding character. If APR_ENCODE_URL, + * use RFC4648 Base 64 Encoding with URL and Filename Safe Alphabet. + * If APR_ENCODE_BASE64URL, use RFC7515 base64url Encoding. + * @param len If present and src is NULL, returns the maximum possible length + * of the destination string, including a zero pad. If present and src is + * not NULL, returns the number of characters actually written. + * @return APR_SUCCESS, or APR_NOTFOUND if the string was NULL. + */ +APR_DECLARE(apr_status_t) apr_encode_base64_binary(char *dest, const unsigned char *src, + apr_ssize_t slen, int flags, apr_size_t * len); + +/** + * Convert text data to base64, and return the results from a pool. + * @param p Pool to allocate from. + * @param src The original string. + * @param slen The length of the original string, or APR_ENCODE_STRING if + * NUL terminated. + * @param flags If APR_ENCODE_NONE, emit RFC4648 Base 64 Encoding. If + * APR_ENCODE_NOPADDING, omit the = padding character. If APR_ENCODE_URL, + * use RFC4648 Base 64 Encoding with URL and Filename Safe Alphabet. + * If APR_ENCODE_BASE64URL, use RFC7515 base64url Encoding. + * @param len If present, returns the number of characters written excluding + * the zero pad. + * @return A zero padded string allocated from the pool on success, or + * NULL if src was NULL. + */ +APR_DECLARE(const char *)apr_pencode_base64(apr_pool_t * p, const char *src, + apr_ssize_t slen, int flags, apr_size_t * len)__attribute__((nonnull(1))); + +/** + * Convert binary data to base64, and return the results from a pool. + * @param p Pool to allocate from. + * @param src The original buffer. + * @param slen The length of the original buffer. + * @param flags If APR_ENCODE_NONE, emit RFC4648 Base 64 Encoding. If + * APR_ENCODE_NOPADDING, omit the = padding character. If APR_ENCODE_URL, + * use RFC4648 Base 64 Encoding with URL and Filename Safe Alphabet. + * If APR_ENCODE_BASE64URL, use RFC7515 base64url Encoding. + * @param len If present, returns the number of characters written excluding + * the zero pad. + * @return A zero padded string allocated from the pool on success, or + * NULL if src was NULL. + */ +APR_DECLARE(const char *)apr_pencode_base64_binary(apr_pool_t * p, const unsigned char *src, + apr_ssize_t slen, int flags, apr_size_t * len)__attribute__((nonnull(1))); + +/** + * Convert base64 or base64url with or without padding to text data. + * @param dest The destination string, can be NULL. + * @param src The original string. + * @param slen The length of the original string, or APR_ENCODE_STRING if + * NUL terminated. + * @param flags If APR_ENCODE_NONE, attempt to decode the full original buffer, + * and return NULL if any bad character is detected. If APR_ENCODE_RELAXED, + * decode until the first non base64/base64url character. + * @param len If present and src is NULL, returns the maximum possible length + * of the destination string, including a zero pad. If present and src is + * not NULL, returns the number of characters actually written. + * @return APR_SUCCESS, or APR_NOTFOUND if the string was NULL, or APR_BADCH + * if a non hex character is present. + */ +APR_DECLARE(apr_status_t) apr_decode_base64(char *dest, const char *src, + apr_ssize_t slen, int flags, apr_size_t * len); + +/** + * Convert base64 or base64url with or without padding to binary data. + * @param dest The destination buffer, can be NULL. + * @param src The original string. + * @param slen The length of the original string, or APR_ENCODE_STRING if + * NUL terminated. + * @param flags If APR_ENCODE_NONE, attempt to decode the full original buffer, + * and return NULL if any bad character is detected. If APR_ENCODE_RELAXED, + * decode until the first non base64/base64url character. + * @param len If present and src is NULL, returns the maximum possible length + * of the destination buffer, including a zero pad. If present and src is + * not NULL, returns the number of characters actually written. + * @return APR_SUCCESS, or APR_NOTFOUND if the src was NULL, or APR_BADCH + * if a non base64 character is present. + */ +APR_DECLARE(apr_status_t) apr_decode_base64_binary(unsigned char *dest, + const char *src, apr_ssize_t slen, int flags, apr_size_t * len); + +/** + * Convert base64 or base64url with or without padding to text data, and + * return the results from a pool. + * @param p Pool to allocate from. + * @param src The base64 string to decode. + * @param slen The length of the base64 string, or APR_ENCODE_STRING if + * NUL terminated. + * @param flags If APR_ENCODE_NONE, attempt to decode the full original buffer, + * and return NULL if any bad character is detected. If APR_ENCODE_RELAXED, + * decode until the first non base64/base64url character. + * @param len If present, returns the number of characters written, excluding + * the zero padding. + * @return A string allocated from the pool containing the result with a zero + * pad. If src was NULL, or an error occurred, NULL is returned. + */ +APR_DECLARE(const char *)apr_pdecode_base64(apr_pool_t * p, const char *src, + apr_ssize_t slen, int flags, apr_size_t * len) + __attribute__((nonnull(1))); + +/** + * Convert base64 or base64url with or without padding to binary data, and + * return the results from a pool. + * @param p Pool to allocate from. + * @param src The original string. + * @param slen The length of the original string, or APR_ENCODE_STRING if + * NUL terminated. + * @param flags If APR_ENCODE_NONE, attempt to decode the full original buffer, + * and return NULL if any bad character is detected. If APR_ENCODE_RELAXED, + * decode until the first non base64/base64url character. + * @param len If present, returns the number of characters written, excluding + * the zero padding. + * @return A buffer allocated from the pool containing the result with a zero + * pad. If src was NULL, or an error occurred, NULL is returned. + */ +APR_DECLARE(const unsigned char *)apr_pdecode_base64_binary(apr_pool_t * p, + const char *src, apr_ssize_t slen, int flags, apr_size_t * len) + __attribute__((nonnull(1))); + +/** + * Convert text data to base32. + * @param dest The destination string, can be NULL. + * @param src The original string. + * @param slen The length of the original string, or APR_ENCODE_STRING if + * NUL terminated. + * @param flags If APR_ENCODE_NONE, emit RFC4648 Base 32 Encoding. If + * APR_ENCODE_NOPADDING, omit the = padding character. If APR_ENCODE_BASE32HEX, + * use RFC4648 base32hex Encoding. + * @param len If present and src is NULL, returns the maximum possible length + * of the destination string, including a zero pad. If present and src is + * not NULL, returns the number of characters actually written. + * @return APR_SUCCESS, or APR_NOTFOUND if the string was NULL. + */ +APR_DECLARE(apr_status_t) apr_encode_base32(char *dest, const char *src, + apr_ssize_t slen, int flags, apr_size_t * len); + +/** + * Convert binary data to base32. + * @param dest The destination string, can be NULL. + * @param src The original buffer. + * @param slen The length of the original buffer. + * @param flags If APR_ENCODE_NONE, emit RFC4648 Base 32 Encoding. If + * APR_ENCODE_NOPADDING, omit the = padding character. If APR_ENCODE_BASE32HEX, + * use RFC4648 base32hex Encoding. + * @param len If present and src is NULL, returns the maximum possible length + * of the destination string, including a zero pad. If present and src is + * not NULL, returns the number of characters actually written. + * @return APR_SUCCESS, or APR_NOTFOUND if the string was NULL. + */ +APR_DECLARE(apr_status_t) apr_encode_base32_binary(char *dest, const unsigned char *src, + apr_ssize_t slen, int flags, apr_size_t * len); + +/** + * Convert text data to base32, and return the results from a pool. + * @param p Pool to allocate from. + * @param src The original string. + * @param slen The length of the original string, or APR_ENCODE_STRING if + * NUL terminated. + * @param flags If APR_ENCODE_NONE, emit RFC4648 Base 32 Encoding. If + * APR_ENCODE_NOPADDING, omit the = padding character. If APR_ENCODE_BASE32HEX, + * use RFC4648 base32hex Encoding. + * @param len If present, returns the number of characters written excluding + * the zero pad. + * @return A zero padded string allocated from the pool on success, or + * NULL if src was NULL. + */ +APR_DECLARE(const char *)apr_pencode_base32(apr_pool_t * p, const char *src, + apr_ssize_t slen, int flags, apr_size_t * len) + __attribute__((nonnull(1))); + +/** + * Convert binary data to base32, and return the results from a pool. + * @param p Pool to allocate from. + * @param src The original buffer. + * @param slen The length of the original buffer. + * @param flags If APR_ENCODE_NONE, emit RFC4648 Base 32 Encoding. If + * APR_ENCODE_NOPADDING, omit the = padding character. If APR_ENCODE_BASE32HEX, + * use RFC7515 base32hex Encoding. + * @param len If present, returns the number of characters written excluding + * the zero pad. + * @return A zero padded string allocated from the pool on success, or + * NULL if src was NULL. + */ +APR_DECLARE(const char *)apr_pencode_base32_binary(apr_pool_t * p, const unsigned char *src, + apr_ssize_t slen, int flags, apr_size_t * len) + __attribute__((nonnull(1))); + +/** + * Convert base32 or base32hex with or without padding to text data. + * @param dest The destination string, can be NULL. + * @param src The original string. + * @param slen The length of the original string, or APR_ENCODE_STRING if + * NUL terminated. + * @param flags If APR_ENCODE_NONE, parse RFC4648 Base 32 Encoding. If + * APR_ENCODE_BASE32HEX, use RFC4648 base32hex Encoding. + * @param len If present and src is NULL, returns the maximum possible length + * of the destination buffer, including a zero pad. If present and src is + * not NULL, returns the number of characters actually written. + * @return APR_SUCCESS, or APR_NOTFOUND if the string was NULL, or APR_BADCH + * if a non base32 character is present. + */ +APR_DECLARE(apr_status_t) apr_decode_base32(char *dest, const char *src, + apr_ssize_t slen, int flags, apr_size_t * len); + +/** + * Convert base32 or base32hex with or without padding to binary data. + * @param dest The destination buffer, can be NULL. + * @param src The original string. + * @param slen The length of the original string, or APR_ENCODE_STRING if + * NUL terminated. + * @param flags If APR_ENCODE_NONE, parse RFC4648 Base 32 Encoding. If + * APR_ENCODE_BASE32HEX, use RFC4648 base32hex Encoding. + * @param len If present and src is NULL, returns the maximum possible length + * of the destination buffer, including a zero pad. If present and src is + * not NULL, returns the number of characters actually written. + * @return APR_SUCCESS, or APR_NOTFOUND if the src was NULL, or APR_BADCH + * if a non base32 character is present. + */ +APR_DECLARE(apr_status_t) apr_decode_base32_binary(unsigned char *dest, + const char *src, apr_ssize_t slen, int flags, apr_size_t * len); + +/** + * Convert base32 or base32hex with or without padding to text data, and + * return the results from a pool. + * @param p Pool to allocate from. + * @param src The base32 string to decode. + * @param slen The length of the base32 string, or APR_ENCODE_STRING if + * NUL terminated. + * @param flags If APR_ENCODE_NONE, parse RFC4648 Base 32 Encoding. If + * APR_ENCODE_BASE32HEX, use RFC4648 base32hex Encoding. + * @param len If present, returns the number of characters written, excluding + * the zero padding. + * @return A string allocated from the pool containing the result with a zero + * pad. If src was NULL, or an error occurred, NULL is returned. + */ +APR_DECLARE(const char *)apr_pdecode_base32(apr_pool_t * p, const char *src, + apr_ssize_t slen, int flags, apr_size_t * len) + __attribute__((nonnull(1))); + +/** + * Convert base32 or base32hex with or without padding to binary data, and + * return the results from a pool. + * @param p Pool to allocate from. + * @param src The original string. + * @param slen The length of the original string, or APR_ENCODE_STRING if + * NUL terminated. + * @param flags If APR_ENCODE_NONE, parse RFC4648 Base 32 Encoding. If + * APR_ENCODE_BASE32HEX, use RFC4648 base32hex Encoding. + * @param len If present, returns the number of characters written, excluding + * the zero padding. + * @return A buffer allocated from the pool containing the result with a zero + * pad. If src was NULL, or an error occurred, NULL is returned. + */ +APR_DECLARE(const unsigned char *)apr_pdecode_base32_binary(apr_pool_t * p, + const char *src, apr_ssize_t slen, int flags, apr_size_t * len) + __attribute__((nonnull(1))); + +/** + * Convert text data to base16 (hex). + * @param dest The destination string, can be NULL. + * @param src The original string. + * @param slen The length of the original string, or APR_ENCODE_STRING if + * NUL terminated. + * @param flags If APR_ENCODE_NONE, emit RFC4648 Base 16 Encoding. If + * APR_ENCODE_COLON, separate each token with a colon. + * @param len If present and src is NULL, returns the maximum possible length + * of the destination buffer, including a zero pad. If present and src is + * not NULL, returns the number of characters actually written. + * @return APR_SUCCESS, or APR_NOTFOUND if the string was NULL. + */ +APR_DECLARE(apr_status_t) apr_encode_base16(char *dest, const char *src, + apr_ssize_t slen, int flags, apr_size_t * len); + +/** + * Convert binary data to base16 (hex). + * @param dest The destination string, can be NULL. + * @param src The original buffer. + * @param slen The length of the original buffer. + * @param flags If APR_ENCODE_NONE, emit RFC4648 Base 16 Encoding. If + * APR_ENCODE_COLON, separate each token with a colon. + * @param len If present and src is NULL, returns the maximum possible length + * of the destination buffer, including a zero pad. If present and src is + * not NULL, returns the number of characters actually written. + * @return APR_SUCCESS, or APR_NOTFOUND if the string was NULL. + */ +APR_DECLARE(apr_status_t) apr_encode_base16_binary(char *dest, + const unsigned char *src, apr_ssize_t slen, int flags, + apr_size_t * len); + +/** + * Convert text data to base16 (hex), and return the results from a + * pool. + * @param p Pool to allocate from. + * @param src The original string. + * @param slen The length of the original string, or APR_ENCODE_STRING if + * NUL terminated. + * @param flags If APR_ENCODE_NONE, emit RFC4648 Base 16 Encoding. If + * APR_ENCODE_COLON, separate each token with a colon. + * @param len If present, returns the number of characters written, excluding + * the zero padding. + * @return A string allocated from the pool containing the result with a zero + * pad. If src was NULL, or an error occurred, NULL is returned. + */ +APR_DECLARE(const char *)apr_pencode_base16(apr_pool_t * p, const char *src, + apr_ssize_t slen, int flags, apr_size_t * len) + __attribute__((nonnull(1))); + +/** + * Convert binary data to base16 (hex), and return the results from a + * pool. + * @param p Pool to allocate from. + * @param src The original buffer. + * @param slen The length of the original buffer. + * @param flags If APR_ENCODE_NONE, emit RFC4648 Base 16 Encoding. If + * APR_ENCODE_COLON, separate each token with a colon. + * @param len If present, returns the number of characters written, excluding + * the zero padding. + * @return A string allocated from the pool containing the result with a zero + * pad. If src was NULL, or an error occurred, NULL is returned. + */ +APR_DECLARE(const char *)apr_pencode_base16_binary(apr_pool_t * p, + const unsigned char *src, apr_ssize_t slen, + int flags, apr_size_t * len)__attribute__((nonnull(1))); + +/** + * Convert base16 (hex) to text data. + * @param dest The destination string, can be NULL. + * @param src The original string. + * @param slen The length of the original string, or APR_ENCODE_STRING if + * NUL terminated. + * @param flags If APR_ENCODE_NONE, parse RFC4648 Base 16 Encoding. If + * APR_ENCODE_COLON, allow tokens to be separated with a colon. + * @param len If present and src is NULL, returns the maximum possible length + * of the destination buffer, including a zero pad. If present and src is + * not NULL, returns the number of characters actually written. + * @return APR_SUCCESS, or APR_NOTFOUND if the string was NULL, or APR_BADCH + * if a non hex character is present. A zero pad is appended to the buffer. + */ +APR_DECLARE(apr_status_t) apr_decode_base16(char *dest, const char *src, + apr_ssize_t slen, int flags, apr_size_t * len); + +/** + * Convert base16 (hex) to binary data. + * @param dest The destination buffer, can be NULL. + * @param src The original string. + * @param slen The length of the original string, or APR_ENCODE_STRING if + * NUL terminated. + * @param flags If APR_ENCODE_NONE, parse RFC4648 Base 16 Encoding. If + * APR_ENCODE_COLON, allow tokens to be separated with a colon. + * @param len If present and src is NULL, returns the maximum possible length + * of the destination buffer, including a zero pad. If present and src is + * not NULL, returns the number of characters actually written. + * @return APR_SUCCESS, or APR_NOTFOUND if the string was NULL, or APR_BADCH + * if a non hex character is present. No zero pad is written to the buffer. + */ +APR_DECLARE(apr_status_t) apr_decode_base16_binary(unsigned char *dest, + const char *src, apr_ssize_t slen, int flags, apr_size_t * len); + +/** + * Convert base16 (hex) and return the results from a pool. + * @param p Pool to allocate from. + * @param src The original string. + * @param slen The length of the original string, or APR_ENCODE_STRING if + * NUL terminated. + * @param flags If APR_ENCODE_NONE, parse RFC4648 Base 16 Encoding. If + * APR_ENCODE_COLON, allow tokens to be separated with a colon. + * @param len If present, returns the number of characters written, excluding + * the zero padding. + * @return A buffer allocated from the pool containing the result with a zero + * pad. If src was NULL, or an error occurred, NULL is returned. + */ +APR_DECLARE(const char *)apr_pdecode_base16(apr_pool_t * p, const char *src, + apr_ssize_t slen, int flags, apr_size_t * len) + __attribute__((nonnull(1))); + +/** + * Convert base16 (hex) to binary data, and return the results from a pool. + * @param p Pool to allocate from. + * @param src The original string. + * @param slen The length of the original string, or APR_ENCODE_STRING if + * NUL terminated. + * @param flags If APR_ENCODE_NONE, parse RFC4648 Base 16 Encoding. If + * APR_ENCODE_COLON, allow tokens to be separated with a colon. + * @param len If present, returns the number of characters written, excluding + * the zero padding. + * @return A buffer allocated from the pool containing the result with a zero + * pad. If src was NULL, or an error occurred, NULL is returned. + */ +APR_DECLARE(const unsigned char *)apr_pdecode_base16_binary(apr_pool_t * p, + const char *src, apr_ssize_t slen, int flags, apr_size_t * len) + __attribute__((nonnull(1))); + +/** @} */ +#ifdef __cplusplus +} +#endif + +#endif /* !APR_ENCODE_H */ Index: contrib/apr/include/apr_errno.h =================================================================== --- contrib/apr/include/apr_errno.h +++ contrib/apr/include/apr_errno.h @@ -833,6 +833,20 @@ #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 @@ || (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 @@ { SOCENOPROTOOPT, ENOPROTOOPT }, { SOCEPROTONOSUPPORT, EPROTONOSUPPORT }, { SOCESOCKTNOSUPPORT, ESOCKTNOSUPPORT }, - { SOCEOPNOTSUPP, EOPNOTSUPP }, { SOCEPFNOSUPPORT, EPFNOSUPPORT }, { SOCEADDRINUSE, EADDRINUSE }, { SOCEADDRNOTAVAIL, EADDRNOTAVAIL }, @@ -1122,6 +1138,9 @@ || (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 @@ #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 @@ #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 @@ (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) */ Index: contrib/apr/include/apr_escape.h =================================================================== --- contrib/apr/include/apr_escape.h +++ contrib/apr/include/apr_escape.h @@ -32,6 +32,19 @@ */ /* Simple escape/unescape functions. + * + * The design goal of these functions are: + * + * - Avoid unnecessary work. + * + * In most cases the strings passed in do not need to be escaped at all. In + * these cases the original string will be returned. + * + * - Lowest possible memory footprint. + * + * The amount of memory allocated for a given encoding is calculated based + * on the exact amount of memory needed, and not the theoretical worst case + * scenario. * */ @@ -40,7 +53,22 @@ * passed to indicate a string-valued key, and have the length computed * automatically. */ -#define APR_ESCAPE_STRING (-1) +#define APR_ESCAPE_STRING (-1) + +/** + * Apply LDAP distinguished name escaping as per RFC4514. + */ +#define APR_ESCAPE_LDAP_DN (0x01) + +/** + * Apply LDAP filter escaping as per RFC4515. + */ +#define APR_ESCAPE_LDAP_FILTER (0x02) + +/** + * Apply both RFC4514 and RFC4515 LDAP escaping. + */ +#define APR_ESCAPE_LDAP_ALL (0x03) /** * Perform shell escaping on the provided string. @@ -208,8 +236,8 @@ /** * Apply entity encoding to a string. Characters are replaced as follows: - * '<' becomes '<', '>' becomes '>', '&' becomes '&', the - * double quote becomes '"" and the single quote becomes '''. + * '<' becomes '\<', '>' becomes '\>', '&' becomes '\&', the + * double quote becomes '\"" and the single quote becomes '\''. * * If toasc is not zero, any non ascii character will be encoded as * '%\#ddd;', where ddd is the decimal code of the character. @@ -227,9 +255,9 @@ /** * Apply entity encoding to a string, returning the result from a pool. - * Characters are replaced as follows: '<' becomes '<', '>' becomes - * '>', '&' becomes '&', the double quote becomes '"" and the - * single quote becomes '''. + * Characters are replaced as follows: '<' becomes '\<', '>' becomes + * '\>', '&' becomes '\&', the double quote becomes '\"" and the + * single quote becomes '\''. * @param p Pool to allocate from * @param str The original string * @param toasc If non zero, encode non ascii characters @@ -366,6 +394,35 @@ APR_DECLARE(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 } Index: contrib/apr/include/apr_file_info.h =================================================================== --- contrib/apr/include/apr_file_info.h +++ contrib/apr/include/apr_file_info.h @@ -50,7 +50,7 @@ /** 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 @@ * 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); Index: contrib/apr/include/apr_file_io.h =================================================================== --- contrib/apr/include/apr_file_io.h +++ contrib/apr/include/apr_file_io.h @@ -315,6 +315,10 @@ * 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 @@ * @bug Some platforms cannot toggle between blocking and nonblocking, * and when passing a pipe as a standard handle to an application which * does not expect it, a non-blocking stream will fluxor the client app. - * @deprecated @see apr_file_pipe_create_ex() + * @deprecated @see apr_file_pipe_create_pools() */ APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in, apr_file_t **out, @@ -719,12 +723,40 @@ * does not expect it, a non-blocking stream will fluxor the client app. * Use this function rather than apr_file_pipe_create() to create pipes * where one or both ends require non-blocking semantics. + * @deprecated @see apr_file_pipe_create_pools() */ APR_DECLARE(apr_status_t) apr_file_pipe_create_ex(apr_file_t **in, apr_file_t **out, apr_int32_t blocking, apr_pool_t *pool); +/** + * Create an anonymous pipe which portably supports async timeout options, + * placing each side of the pipe in a different pool. + * @param in The newly created pipe's file for reading. + * @param out The newly created pipe's file for writing. + * @param blocking one of these values defined in apr_thread_proc.h; + * @li #APR_FULL_BLOCK + * @li #APR_READ_BLOCK + * @li #APR_WRITE_BLOCK + * @li #APR_FULL_NONBLOCK + * @param pool_in The pool for the reading pipe. + * @param pool_out The pool for the writing pipe. + * @remark By default, the returned file descriptors will be inherited + * by child processes created using apr_proc_create(). This can be + * changed using apr_file_inherit_unset(). + * @remark Some platforms cannot toggle between blocking and nonblocking, + * and when passing a pipe as a standard handle to an application which + * does not expect it, a non-blocking stream will fluxor the client app. + * Use this function rather than apr_file_pipe_create() to create pipes + * where one or both ends require non-blocking semantics. + */ +APR_DECLARE(apr_status_t) apr_file_pipe_create_pools(apr_file_t **in, + apr_file_t **out, + apr_int32_t blocking, + apr_pool_t *pool_in, + apr_pool_t *pool_out); + /** * Create a named pipe. * @param filename The filename of the named pipe Index: contrib/apr/include/apr_general.h =================================================================== --- contrib/apr/include/apr_general.h +++ contrib/apr/include/apr_general.h @@ -170,8 +170,8 @@ /** * 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 @@ * @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_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); Index: contrib/apr/include/apr_global_mutex.h =================================================================== --- contrib/apr/include/apr_global_mutex.h +++ contrib/apr/include/apr_global_mutex.h @@ -29,6 +29,7 @@ #if APR_PROC_MUTEX_IS_GLOBAL #include "apr_proc_mutex.h" #endif +#include "apr_time.h" #ifdef __cplusplus extern "C" { @@ -66,6 +67,7 @@ * APR_LOCK_POSIXSEM * APR_LOCK_PROC_PTHREAD * APR_LOCK_DEFAULT pick the default mechanism for the platform + * APR_LOCK_DEFAULT_TIMED pick the default timed mechanism *

    * @param pool the pool from which to allocate the mutex. * @warning Check APR_HAS_foo_SERIALIZE defines to see if the platform supports @@ -108,6 +110,17 @@ */ APR_DECLARE(apr_status_t) apr_global_mutex_trylock(apr_global_mutex_t *mutex); +/** + * Attempt to acquire the lock for the given mutex until timeout expires. + * If the acquisition time outs, the call returns with APR_TIMEUP. + * @param mutex the mutex on which to attempt the lock acquiring. + * @param timeout the relative timeout (microseconds). + * @note A negative or nul timeout means immediate attempt, returning + * APR_TIMEUP without blocking if it the lock is already acquired. + */ +APR_DECLARE(apr_status_t) apr_global_mutex_timedlock(apr_global_mutex_t *mutex, + apr_interval_time_t timeout); + /** * Release the lock for the given mutex. * @param mutex the mutex from which to release the lock. @@ -127,13 +140,24 @@ APR_DECLARE(const char *) apr_global_mutex_lockfile(apr_global_mutex_t *mutex); /** - * Display the name of the mutex, as it relates to the actual method used - * for the underlying apr_proc_mutex_t, if any. NULL is returned if - * there is no underlying apr_proc_mutex_t. - * @param mutex the name of the mutex + * Get the mechanism of the mutex, as it relates to the actual method + * used for the underlying apr_proc_mutex_t. + * @param mutex the mutex to get the mechanism from. + */ +APR_DECLARE(apr_lockmech_e) apr_global_mutex_mech(apr_global_mutex_t *mutex); + +/** + * Get the mechanism's name of the mutex, as it relates to the actual method + * used for the underlying apr_proc_mutex_t. + * @param mutex the mutex to get the mechanism's name from. */ APR_DECLARE(const char *) apr_global_mutex_name(apr_global_mutex_t *mutex); +/** + * Set mutex permissions. + */ +APR_PERMS_SET_IMPLEMENT(global_mutex); + /** * Get the pool used by this global_mutex. * @return apr_pool_t the pool @@ -155,7 +179,9 @@ #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 Index: contrib/apr/include/apr_hash.h =================================================================== --- contrib/apr/include/apr_hash.h +++ contrib/apr/include/apr_hash.h @@ -102,7 +102,8 @@ * @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); Index: contrib/apr/include/apr_network_io.h =================================================================== --- contrib/apr/include/apr_network_io.h +++ contrib/apr/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 #endif +#if APR_HAVE_SYS_UN_H +#include +#endif #ifdef __cplusplus extern "C" { @@ -101,6 +105,9 @@ */ #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 @@ #define APR_INET6 AF_INET6 #endif +#if APR_HAVE_SOCKADDR_UN +#if defined (AF_UNIX) +#define APR_UNIX AF_UNIX +#elif defined(AF_LOCAL) +#define APR_UNIX AF_LOCAL +#else +#error "Neither AF_UNIX nor AF_LOCAL is defined" +#endif +#else /* !APR_HAVE_SOCKADDR_UN */ +#if defined (AF_UNIX) +#define APR_UNIX AF_UNIX +#elif defined(AF_LOCAL) +#define APR_UNIX AF_LOCAL +#else +/* TODO: Use a smarter way to detect unique APR_UNIX value */ +#define APR_UNIX 1234 +#endif +#endif + /** * @defgroup IP_Proto IP Protocol Definitions for use when creating sockets * @{ @@ -246,6 +272,10 @@ /** Placeholder to ensure that the size of this union is not * dependent on whether APR_HAVE_IPV6 is defined. */ struct sockaddr_storage sas; +#endif +#if APR_HAVE_SOCKADDR_UN + /** Unix domain socket sockaddr structure */ + struct sockaddr_un unx; #endif } sa; }; @@ -375,6 +405,7 @@ * @param sa The new apr_sockaddr_t. * @param hostname The hostname or numeric address string to resolve/parse, or * NULL to build an address that corresponds to 0.0.0.0 or :: + * or in case of APR_UNIX family it is absolute socket filename. * @param family The address family to use, or APR_UNSPEC if the system should * decide. * @param port The port number. @@ -400,6 +431,41 @@ apr_int32_t flags, apr_pool_t *p); +/** + * Copy apr_sockaddr_t src to dst on pool p. + * @param dst The destination apr_sockaddr_t. + * @param src The source apr_sockaddr_t. + * @param p The pool for the apr_sockaddr_t and associated storage. + */ +APR_DECLARE(apr_status_t) apr_sockaddr_info_copy(apr_sockaddr_t **dst, + const apr_sockaddr_t *src, + apr_pool_t *p); + +/* Set the zone of an IPv6 link-local address object. + * @param sa Socket address object + * @param zone_id Zone ID (textual "eth0" or numeric "3"). + * @return Returns APR_EBADIP for non-IPv6 socket or an IPv6 address + * which isn't link-local. + */ +APR_DECLARE(apr_status_t) apr_sockaddr_zone_set(apr_sockaddr_t *sa, + const char *zone_id); + + +/* Retrieve the zone of an IPv6 link-local address object. + * @param sa Socket address object + * @param name If non-NULL, set to the textual representation of the zone id + * @param id If non-NULL, set to the integer zone id + * @param p Pool from which *name is allocated if used. + * @return Returns APR_EBADIP for non-IPv6 socket or socket without any zone id + * set, or other error if the interface could not be mapped to a name. + * @remark Both name and id may be NULL, neither are modified if + * non-NULL in error cases. + */ +APR_DECLARE(apr_status_t) apr_sockaddr_zone_get(const apr_sockaddr_t *sa, + const char **name, + apr_uint32_t *id, + apr_pool_t *p); + /** * Look up the host name from an apr_sockaddr_t. * @param hostname The hostname. @@ -620,6 +686,7 @@ * 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. * * @param on Value for the option. */ @@ -806,6 +873,11 @@ */ APR_DECLARE_INHERIT_UNSET(socket); +/** + * Set socket permissions. + */ +APR_PERMS_SET_IMPLEMENT(socket); + /** * @defgroup apr_mcast IP Multicast * @{ Index: contrib/apr/include/apr_perms_set.h =================================================================== --- /dev/null +++ contrib/apr/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 */ Index: contrib/apr/include/apr_poll.h =================================================================== --- contrib/apr/include/apr_poll.h +++ contrib/apr/include/apr_poll.h @@ -66,7 +66,7 @@ * 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 @@ * @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 @@ * 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 @@ * 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_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 @@ * 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); /** @} */ Index: contrib/apr/include/apr_portable.h =================================================================== --- contrib/apr/include/apr_portable.h +++ contrib/apr/include/apr_portable.h @@ -46,6 +46,9 @@ #if APR_HAVE_PTHREAD_H #include #endif +#if APR_HAVE_SEMAPHORE_H +#include +#endif #ifdef __cplusplus extern "C" { @@ -140,6 +143,10 @@ pthread_mutex_t *intraproc; #endif #endif +#if APR_HAS_POSIXSEM_SERIALIZE + /** Value used for POSIX semaphores serialization */ + sem_t *psem_interproc; +#endif }; typedef int apr_os_file_t; /**< native file */ @@ -241,13 +248,26 @@ apr_socket_t *sock); /** - * Convert the proc mutex from os specific type to apr type + * Convert the proc mutex from apr type to os specific type * @param ospmutex The os specific proc mutex we are converting to. * @param pmutex The apr proc mutex to convert. */ APR_DECLARE(apr_status_t) apr_os_proc_mutex_get(apr_os_proc_mutex_t *ospmutex, apr_proc_mutex_t *pmutex); +/** + * Convert the proc mutex from apr type to os specific type, also + * providing the mechanism used by the apr mutex. + * @param ospmutex The os specific proc mutex we are converting to. + * @param pmutex The apr proc mutex to convert. + * @param mech The mechanism used by the apr proc mutex (if not NULL). + * @remark Allows for disambiguation for platforms with multiple mechanisms + * available. + */ +APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex, + apr_proc_mutex_t *pmutex, + apr_lockmech_e *mech); + /** * Get the exploded time in the platforms native format. * @param ostime the native time format @@ -380,7 +400,10 @@ apr_pool_t *cont); /** - * Convert a socket from the os specific type to the apr type + * Convert a socket from the os specific type to the APR type. If + * sock points to NULL, a socket will be created from the pool + * provided. If **sock does not point to NULL, the structure pointed + * to by sock will be reused and updated with the given socket. * @param sock The pool to use. * @param thesock The socket to convert to. * @param cont The socket we are converting to an apr type. @@ -415,6 +438,24 @@ apr_os_proc_mutex_t *ospmutex, apr_pool_t *cont); +/** + * Convert the proc mutex from os specific type to apr type, using the + * specified mechanism. + * @param pmutex The apr proc mutex we are converting to. + * @param ospmutex The os specific proc mutex to convert. + * @param mech The apr mutex locking mechanism + * @param register_cleanup Whether to destroy the os mutex with the apr + * one (either on explicit destroy or pool cleanup). + * @param cont The pool to use if it is needed. + * @remark Allows for disambiguation for platforms with multiple mechanisms + * available. + */ +APR_DECLARE(apr_status_t) apr_os_proc_mutex_put_ex(apr_proc_mutex_t **pmutex, + apr_os_proc_mutex_t *ospmutex, + apr_lockmech_e mech, + int register_cleanup, + apr_pool_t *cont); + /** * Put the imploded time in the APR format. * @param aprtime the APR time format @@ -494,7 +535,7 @@ /** * 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); Index: contrib/apr/include/apr_proc_mutex.h =================================================================== --- contrib/apr/include/apr_proc_mutex.h +++ contrib/apr/include/apr_proc_mutex.h @@ -25,6 +25,8 @@ #include "apr.h" #include "apr_pools.h" #include "apr_errno.h" +#include "apr_perms_set.h" +#include "apr_time.h" #ifdef __cplusplus extern "C" { @@ -47,7 +49,8 @@ APR_LOCK_SYSVSEM, /**< System V Semaphores */ APR_LOCK_PROC_PTHREAD, /**< POSIX pthread process-based locking */ APR_LOCK_POSIXSEM, /**< POSIX semaphore process-based locking */ - APR_LOCK_DEFAULT /**< Use the default process lock */ + APR_LOCK_DEFAULT, /**< Use the default process lock */ + APR_LOCK_DEFAULT_TIMED /**< Use the default process timed lock */ } apr_lockmech_e; /** Opaque structure representing a process mutex. */ @@ -112,6 +115,17 @@ */ APR_DECLARE(apr_status_t) apr_proc_mutex_trylock(apr_proc_mutex_t *mutex); +/** + * Attempt to acquire the lock for the given mutex until timeout expires. + * If the acquisition time outs, the call returns with APR_TIMEUP. + * @param mutex the mutex on which to attempt the lock acquiring. + * @param timeout the relative timeout (microseconds). + * @note A negative or nul timeout means immediate attempt, returning + * APR_TIMEUP without blocking if it the lock is already acquired. + */ +APR_DECLARE(apr_status_t) apr_proc_mutex_timedlock(apr_proc_mutex_t *mutex, + apr_interval_time_t timeout); + /** * Release the lock for the given mutex. * @param mutex the mutex from which to release the lock. @@ -140,9 +154,16 @@ APR_DECLARE(const char *) apr_proc_mutex_lockfile(apr_proc_mutex_t *mutex); /** - * Display the name of the mutex, as it relates to the actual method used. - * This matches the valid options for Apache's AcceptMutex directive - * @param mutex the name of the mutex + * Get the mechanism of the mutex, as it relates to the actual method + * used for the underlying apr_proc_mutex_t. + * @param mutex the mutex to get the mechanism from. + */ +APR_DECLARE(apr_lockmech_e) apr_proc_mutex_mech(apr_proc_mutex_t *mutex); + +/** + * Get the mechanism's name of the mutex, as it relates to the actual method + * used for the underlying apr_proc_mutex_t. + * @param mutex the mutex to get the mechanism's name from. */ APR_DECLARE(const char *) apr_proc_mutex_name(apr_proc_mutex_t *mutex); @@ -151,6 +172,11 @@ */ APR_DECLARE(const char *) apr_proc_mutex_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 Index: contrib/apr/include/apr_shm.h =================================================================== --- contrib/apr/include/apr_shm.h +++ contrib/apr/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" { @@ -135,6 +136,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. @@ -194,6 +210,11 @@ */ 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. */ Index: contrib/apr/include/apr_skiplist.h =================================================================== --- contrib/apr/include/apr_skiplist.h +++ contrib/apr/include/apr_skiplist.h @@ -40,9 +40,7 @@ /** * apr_skiplist_compare is the function type that must be implemented * per object type that is used in a skip list for comparisons to maintain - * order. A value <0 indicates placement after this node; a value of 0 - * indicates collision with this exact node; a value >0 indicates placement - * before this node. + * order * */ typedef int (*apr_skiplist_compare) (void *, void *); @@ -154,6 +152,30 @@ */ APR_DECLARE(void *) apr_skiplist_find(apr_skiplist *sl, void *data, apr_skiplistnode **iter); +/** + * Return the last matching element in the skip list using the specified + * comparison function. + * @param sl The skip list + * @param data The value to search for + * @param iter A pointer to the returned skip list node representing the element + * found + * @param comp The comparison function to use + */ +APR_DECLARE(void *) apr_skiplist_last_compare(apr_skiplist *sl, void *data, + apr_skiplistnode **iter, + apr_skiplist_compare comp); + +/** + * Return the last matching element in the skip list using the current comparison + * function. + * @param sl The skip list + * @param data The value to search for + * @param iter A pointer to the returned skip list node representing the element + * found + */ +APR_DECLARE(void *) apr_skiplist_last(apr_skiplist *sl, void *data, + apr_skiplistnode **iter); + /** * Return the next element in the skip list. * @param sl The skip list @@ -172,6 +194,12 @@ */ APR_DECLARE(void *) apr_skiplist_previous(apr_skiplist *sl, apr_skiplistnode **iter); +/** + * Return the element of the skip list node + * @param iter The skip list node + */ +APR_DECLARE(void *) apr_skiplist_element(apr_skiplistnode *iter); + /** * Insert an element into the skip list using the specified comparison function * if it does not already exist. @@ -184,7 +212,7 @@ /** * Insert an element into the skip list using the existing comparison function - * if it does not already exist (as determined by the comparison function) + * if it does not already exist. * @param sl The skip list * @param data The element to insert * @remark If no comparison function has been set for the skip list, the element @@ -192,6 +220,62 @@ */ APR_DECLARE(apr_skiplistnode *) apr_skiplist_insert(apr_skiplist* sl, void *data); +/** + * Add an element into the skip list using the specified comparison function + * allowing for duplicates. + * @param sl The skip list + * @param data The element to add + * @param comp The comparison function to use for placement into the skip list + */ +APR_DECLARE(apr_skiplistnode *) apr_skiplist_add_compare(apr_skiplist *sl, + void *data, apr_skiplist_compare comp); + +/** + * Add an element into the skip list using the existing comparison function + * allowing for duplicates. + * @param sl The skip list + * @param data The element to insert + * @remark If no comparison function has been set for the skip list, the element + * will not be inserted and NULL will be returned. + */ +APR_DECLARE(apr_skiplistnode *) apr_skiplist_add(apr_skiplist* sl, void *data); + +/** + * Add an element into the skip list using the specified comparison function + * removing the existing duplicates. + * @param sl The skip list + * @param data The element to insert + * @param comp The comparison function to use for placement into the skip list + * @param myfree A function to be called for each removed duplicate + * @remark If no comparison function has been set for the skip list, the element + * will not be inserted, none will be replaced, and NULL will be returned. + */ +APR_DECLARE(apr_skiplistnode *) apr_skiplist_replace_compare(apr_skiplist *sl, + void *data, apr_skiplist_freefunc myfree, + apr_skiplist_compare comp); + +/** + * Add an element into the skip list using the existing comparison function + * removing the existing duplicates. + * @param sl The skip list + * @param data The element to insert + * @param myfree A function to be called for each removed duplicate + * @remark If no comparison function has been set for the skip list, the element + * will not be inserted, none will be replaced, and NULL will be returned. + */ +APR_DECLARE(apr_skiplistnode *) apr_skiplist_replace(apr_skiplist *sl, + void *data, apr_skiplist_freefunc myfree); + +/** + * Remove a node from the skip list. + * @param sl The skip list + * @param iter The skip list node to remove + * @param myfree A function to be called for the removed element + */ +APR_DECLARE(int) apr_skiplist_remove_node(apr_skiplist *sl, + apr_skiplistnode *iter, + apr_skiplist_freefunc myfree); + /** * Remove an element from the skip list using the specified comparison function for * locating the element. In the case of duplicates, the 1st entry will be removed. @@ -247,6 +331,40 @@ */ APR_DECLARE(void *) apr_skiplist_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 Index: contrib/apr/include/apr_strings.h =================================================================== --- contrib/apr/include/apr_strings.h +++ contrib/apr/include/apr_strings.h @@ -101,10 +101,10 @@ * @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)) Index: contrib/apr/include/apr_tables.h =================================================================== --- contrib/apr/include/apr_tables.h +++ contrib/apr/include/apr_tables.h @@ -179,7 +179,7 @@ * @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 @@ * @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 @@ * @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 @@ * @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 @@ * @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 @@ * 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 @@ * @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 @@ /** * 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 @@ * @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 @@ #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 @@ * @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 @@ * 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 @@ * * @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 ", ". */ Index: contrib/apr/include/apr_thread_mutex.h =================================================================== --- contrib/apr/include/apr_thread_mutex.h +++ contrib/apr/include/apr_thread_mutex.h @@ -43,9 +43,11 @@ #define APR_THREAD_MUTEX_DEFAULT 0x0 /**< platform-optimal lock behavior */ #define APR_THREAD_MUTEX_NESTED 0x1 /**< enable nested (recursive) locks */ #define APR_THREAD_MUTEX_UNNESTED 0x2 /**< disable nested locks */ +#define APR_THREAD_MUTEX_TIMED 0x4 /**< enable timed locks */ /* Delayed the include to avoid a circular reference */ #include "apr_pools.h" +#include "apr_time.h" /** * Create and initialize a mutex that can be used to synchronize threads. @@ -81,6 +83,17 @@ */ APR_DECLARE(apr_status_t) apr_thread_mutex_trylock(apr_thread_mutex_t *mutex); +/** + * Attempt to acquire the lock for the given mutex until timeout expires. + * If the acquisition time outs, the call returns with APR_TIMEUP. + * @param mutex the mutex on which to attempt the lock acquiring. + * @param timeout the relative timeout (microseconds). + * @note A timeout negative or nul means immediate attempt, returning + * APR_TIMEUP without blocking if it the lock is already acquired. + */ +APR_DECLARE(apr_status_t) apr_thread_mutex_timedlock(apr_thread_mutex_t *mutex, + apr_interval_time_t timeout); + /** * Release the lock for the given mutex. * @param mutex the mutex from which to release the lock. Index: contrib/apr/include/apr_thread_proc.h =================================================================== --- contrib/apr/include/apr_thread_proc.h +++ contrib/apr/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 @@ -579,6 +580,18 @@ const char *groupname); +/** + * Register permission set function + * @param attr The procattr we care about. + * @param perms_set_fn Permission set callback + * @param data Data to pass to permission callback function + * @param perms Permissions to set + */ +APR_DECLARE(apr_status_t) apr_procattr_perms_set_register(apr_procattr_t *attr, + apr_perms_setfn_t *perms_set_fn, + void *data, + apr_fileperms_t perms); + #if APR_HAS_FORK /** * This is currently the only non-portable call in APR. This executes @@ -803,6 +816,13 @@ * functions should return 1 if the signal has been handled, 0 otherwise. * @param signal_handler The function to call when a signal is received * apr_status_t apr_signal_thread((int)(*signal_handler)(int signum)) + * @note Synchronous signals like SIGABRT/SIGSEGV/SIGBUS/... are ignored by + * apr_signal_thread() and thus can't be waited by this function (they remain + * handled by the operating system or its native signals interface). + * @remark In APR version 1.6 and ealier, SIGUSR2 was part of these ignored + * signals and thus was never passed in to the signal_handler. From APR 1.7 + * this is no more the case so SIGUSR2 can be handled in signal_handler and + * acted upon like the other asynchronous signals. */ APR_DECLARE(apr_status_t) apr_signal_thread(int(*signal_handler)(int signum)); Index: contrib/apr/include/apr_time.h =================================================================== --- contrib/apr/include/apr_time.h +++ contrib/apr/include/apr_time.h @@ -23,7 +23,6 @@ */ #include "apr.h" -#include "apr_pools.h" #include "apr_errno.h" #ifdef __cplusplus @@ -120,6 +119,9 @@ apr_int32_t tm_gmtoff; }; +/* Delayed the include to avoid a circular reference */ +#include "apr_pools.h" + /** * Convert an ansi time_t to an apr_time_t * @param result the resulting apr_time_t Index: contrib/apr/include/apr_version.h =================================================================== --- contrib/apr/include/apr_version.h +++ contrib/apr/include/apr_version.h @@ -38,7 +38,7 @@ */ -#define APR_COPYRIGHT "Copyright (c) 2000-2015 The Apache Software " \ +#define APR_COPYRIGHT "Copyright (c) 2000-2019 The Apache Software " \ "Foundation or its licensors, as applicable." /* The numeric compile-time version constants. These constants are the @@ -56,20 +56,20 @@ * Minor API changes that do not cause binary compatibility problems. * Reset to 0 when upgrading APR_MAJOR_VERSION */ -#define APR_MINOR_VERSION 5 +#define APR_MINOR_VERSION 7 /** patch level * The Patch Level never includes API changes, simply bug fixes. * Reset to 0 when upgrading APR_MINOR_VERSION */ -#define APR_PATCH_VERSION 2 +#define APR_PATCH_VERSION 0 /** * The symbol APR_IS_DEV_VERSION is only defined for internal, * "development" copies of APR. It is undefined for released versions * of APR. */ -/* #define APR_IS_DEV_VERSION */ +/* #undef APR_IS_DEV_VERSION */ /** * Check at compile time if the APR version is at least a certain Index: contrib/apr/include/arch/unix/apr_arch_atomic.h =================================================================== --- contrib/apr/include/arch/unix/apr_arch_atomic.h +++ contrib/apr/include/arch/unix/apr_arch_atomic.h @@ -18,28 +18,36 @@ #define ATOMIC_H #include "apr.h" +#include "apr_pools.h" #include "apr_private.h" #include "apr_atomic.h" -#include "apr_thread_mutex.h" #if defined(USE_ATOMICS_GENERIC) /* noop */ -#elif defined(__GNUC__) && defined(__STRICT_ANSI__) -/* force use of generic atomics if building e.g. with -std=c89, which - * doesn't allow inline asm */ -# define USE_ATOMICS_GENERIC #elif HAVE_ATOMIC_BUILTINS # define USE_ATOMICS_BUILTINS #elif defined(SOLARIS2) && SOLARIS2 >= 10 # define USE_ATOMICS_SOLARIS +# define NEED_ATOMICS_GENERIC64 +#elif defined(__GNUC__) && defined(__STRICT_ANSI__) +/* force use of generic atomics if building e.g. with -std=c89, which + * doesn't allow inline asm */ +# define USE_ATOMICS_GENERIC #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) # define USE_ATOMICS_IA32 +# define NEED_ATOMICS_GENERIC64 #elif defined(__GNUC__) && (defined(__PPC__) || defined(__ppc__)) # define USE_ATOMICS_PPC +# define NEED_ATOMICS_GENERIC64 #elif defined(__GNUC__) && (defined(__s390__) || defined(__s390x__)) # define USE_ATOMICS_S390 +# define NEED_ATOMICS_GENERIC64 #else # define USE_ATOMICS_GENERIC #endif +#if defined(USE_ATOMICS_GENERIC) || defined (NEED_ATOMICS_GENERIC64) +apr_status_t apr__atomic_generic64_init(apr_pool_t *p); +#endif + #endif /* ATOMIC_H */ Index: contrib/apr/include/arch/unix/apr_arch_networkio.h =================================================================== --- contrib/apr/include/arch/unix/apr_arch_networkio.h +++ contrib/apr/include/arch/unix/apr_arch_networkio.h @@ -110,6 +110,9 @@ apr_interval_time_t timeout; #ifndef HAVE_POLL int connected; +#endif +#if APR_HAVE_SOCKADDR_UN + int bound; #endif int local_port_unknown; int local_interface_unknown; Index: contrib/apr/include/arch/unix/apr_arch_poll_private.h =================================================================== --- contrib/apr/include/arch/unix/apr_arch_poll_private.h +++ contrib/apr/include/arch/unix/apr_arch_poll_private.h @@ -126,7 +126,7 @@ 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 @@ 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 @@ 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 */ Index: contrib/apr/include/arch/unix/apr_arch_proc_mutex.h =================================================================== --- contrib/apr/include/arch/unix/apr_arch_proc_mutex.h +++ contrib/apr/include/arch/unix/apr_arch_proc_mutex.h @@ -26,6 +26,7 @@ #include "apr_portable.h" #include "apr_file_io.h" #include "apr_arch_file_io.h" +#include "apr_time.h" /* System headers required by Locks library */ #if APR_HAVE_SYS_TYPES_H @@ -62,9 +63,6 @@ #if APR_HAVE_PTHREAD_H #include #endif -#if APR_HAVE_SEMAPHORE_H -#include -#endif /* End System Headers */ struct apr_proc_mutex_unix_lock_methods_t { @@ -72,9 +70,12 @@ apr_status_t (*create)(apr_proc_mutex_t *, const char *); apr_status_t (*acquire)(apr_proc_mutex_t *); apr_status_t (*tryacquire)(apr_proc_mutex_t *); + apr_status_t (*timedacquire)(apr_proc_mutex_t *, apr_interval_time_t); apr_status_t (*release)(apr_proc_mutex_t *); apr_status_t (*cleanup)(void *); apr_status_t (*child_init)(apr_proc_mutex_t **, apr_pool_t *, const char *); + apr_status_t (*perms_set)(apr_proc_mutex_t *, apr_fileperms_t, apr_uid_t, apr_gid_t); + apr_lockmech_e mech; const char *name; }; typedef struct apr_proc_mutex_unix_lock_methods_t apr_proc_mutex_unix_lock_methods_t; @@ -93,17 +94,24 @@ 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 }; Index: contrib/apr/include/arch/unix/apr_arch_shm.h =================================================================== --- contrib/apr/include/arch/unix/apr_arch_shm.h +++ contrib/apr/include/arch/unix/apr_arch_shm.h @@ -67,6 +67,7 @@ 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 }; Index: contrib/apr/include/arch/unix/apr_arch_thread_mutex.h =================================================================== --- contrib/apr/include/arch/unix/apr_arch_thread_mutex.h +++ contrib/apr/include/arch/unix/apr_arch_thread_mutex.h @@ -21,6 +21,7 @@ #include "apr_private.h" #include "apr_general.h" #include "apr_thread_mutex.h" +#include "apr_thread_cond.h" #include "apr_portable.h" #include "apr_atomic.h" @@ -32,6 +33,8 @@ struct apr_thread_mutex_t { apr_pool_t *pool; pthread_mutex_t mutex; + apr_thread_cond_t *cond; + int locked, num_waiters; }; #endif Index: contrib/apr/include/arch/unix/apr_arch_threadproc.h =================================================================== --- contrib/apr/include/arch/unix/apr_arch_threadproc.h +++ contrib/apr/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 @@ #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 @@ apr_int32_t errchk; apr_uid_t uid; apr_gid_t gid; + apr_procattr_pscb_t *perms_set_callbacks; }; #endif /* ! THREAD_PROC_H */ Index: contrib/apr/include/arch/unix/apr_private.h.in =================================================================== --- contrib/apr/include/arch/unix/apr_private.h.in +++ contrib/apr/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. */ @@ -83,6 +89,12 @@ /* Define if accept4 function is supported */ #undef HAVE_ACCEPT4 +/* Define to 1 if you have the `acquire_sem' function. */ +#undef HAVE_ACQUIRE_SEM + +/* Define to 1 if you have the `acquire_sem_etc' function. */ +#undef HAVE_ACQUIRE_SEM_ETC + /* Define if async i/o supports message q's */ #undef HAVE_AIO_MSGQ @@ -93,6 +105,9 @@ */ #undef HAVE_ALLOCA_H +/* Define to 1 if you have the `arc4random_buf' function. */ +#undef HAVE_ARC4RANDOM_BUF + /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H @@ -123,6 +138,10 @@ /* Define to 1 if you have the header file. */ #undef HAVE_CTYPE_H +/* Define to 1 if you have the declaration of `SYS_getrandom', and to 0 if you + don't. */ +#undef HAVE_DECL_SYS_GETRANDOM + /* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you don't. */ #undef HAVE_DECL_SYS_SIGLIST @@ -211,6 +230,9 @@ /* Define to 1 if you have the `getpwuid_r' function. */ #undef HAVE_GETPWUID_R +/* Define to 1 if you have the `getrandom' function. */ +#undef HAVE_GETRANDOM + /* Define to 1 if you have the `getrlimit' function. */ #undef HAVE_GETRLIMIT @@ -226,6 +248,12 @@ /* Define if hstrerror is present */ #undef HAVE_HSTRERROR +/* Define to 1 if you have the `if_indextoname' function. */ +#undef HAVE_IF_INDEXTONAME + +/* Define to 1 if you have the `if_nametoindex' function. */ +#undef HAVE_IF_NAMETOINDEX + /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H @@ -259,6 +287,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_RANDOM_H + /* Define to 1 if you have the `localtime_r' function. */ #undef HAVE_LOCALTIME_R @@ -274,6 +305,9 @@ /* Define if MAP_ANON is defined in sys/mman.h */ #undef HAVE_MAP_ANON +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMCHECK_H + /* Define to 1 if you have the `memchr' function. */ #undef HAVE_MEMCHR @@ -295,6 +329,9 @@ /* Define to 1 if you have the `mmap64' function. */ #undef HAVE_MMAP64 +/* Define to 1 if you have the `mprotect' function. */ +#undef HAVE_MPROTECT + /* Define to 1 if you have the `munmap' function. */ #undef HAVE_MUNMAP @@ -316,6 +353,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_NET_ERRNO_H +/* Define to 1 if you have the header file. */ +#undef HAVE_NET_IF_H + /* Define to 1 if you have the `nl_langinfo' function. */ #undef HAVE_NL_LANGINFO @@ -346,6 +386,9 @@ /* Define to 1 if you have the `pthread_attr_setguardsize' function. */ #undef HAVE_PTHREAD_ATTR_SETGUARDSIZE +/* Define to 1 if you have the `pthread_condattr_setpshared' function. */ +#undef HAVE_PTHREAD_CONDATTR_SETPSHARED + /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H @@ -361,6 +404,12 @@ /* Define if cross-process robust mutexes are available */ #undef HAVE_PTHREAD_MUTEX_ROBUST +/* Define if non-posix/portable cross-process robust mutexes are available */ +#undef HAVE_PTHREAD_MUTEX_ROBUST_NP + +/* Define to 1 if you have the `pthread_mutex_timedlock' function. */ +#undef HAVE_PTHREAD_MUTEX_TIMEDLOCK + /* Define if PTHREAD_PROCESS_SHARED is defined in pthread.h */ #undef HAVE_PTHREAD_PROCESS_SHARED @@ -397,12 +446,21 @@ /* Define to 1 if you have the `semget' function. */ #undef HAVE_SEMGET +/* Define to 1 if you have the `semop' function. */ +#undef HAVE_SEMOP + +/* Define to 1 if you have the `semtimedop' function. */ +#undef HAVE_SEMTIMEDOP + /* Define to 1 if you have the `sem_close' function. */ #undef HAVE_SEM_CLOSE /* Define to 1 if you have the `sem_post' function. */ #undef HAVE_SEM_POST +/* Define to 1 if you have the `sem_timedwait' function. */ +#undef HAVE_SEM_TIMEDWAIT + /* Define if SEM_UNDO is defined in sys/sem.h */ #undef HAVE_SEM_UNDO @@ -586,6 +644,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_POLL_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_RANDOM_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_RESOURCE_H @@ -613,6 +674,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SYSCALL_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SYSCTL_H @@ -688,6 +752,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UUID_UUID_H +/* Compile in valgrind support */ +#undef HAVE_VALGRIND + +/* Define to 1 if you have the header file. */ +#undef HAVE_VALGRIND_H + /* Define if C compiler supports VLA */ #undef HAVE_VLA @@ -706,8 +776,7 @@ /* Define for z/OS pthread API nuances */ #undef HAVE_ZOS_PTHREADS -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ +/* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define if EAI_ error codes from getaddrinfo are negative */ @@ -743,7 +812,7 @@ /* Define if pthread_getspecific() has two args */ #undef PTHREAD_GETSPECIFIC_TAKES_TWO_ARGS -/* Define if readdir is thread safe */ +/* Modern readdir is thread safe */ #undef READDIR_IS_THREAD_SAFE /* Define to 1 if the `setpgrp' function takes no argument. */ @@ -805,6 +874,9 @@ /* Define if SysV semaphores affect threads within the process */ #undef SYSVSEM_IS_GLOBAL +/* Define system call of random */ +#undef SYS_RANDOM + /* Define if use of generic atomics is requested */ #undef USE_ATOMICS_GENERIC @@ -817,6 +889,9 @@ /* Define if 4.2BSD-style flock() will be used */ #undef USE_FLOCK_SERIALIZE +/* Define if pthread pshared mutex will be used */ +#undef USE_PROC_PTHREAD_SERIALIZE + /* Define if BeOS areas will be used */ #undef USE_SHMEM_BEOS Index: contrib/apr/include/private/apr_encode_private.h =================================================================== --- /dev/null +++ contrib/apr/include/private/apr_encode_private.h @@ -0,0 +1,84 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file apr_encode_private.h + * @brief APR-UTIL Encoding Private + */ +#ifndef APR_ENCODE_PRIVATE_H +#define APR_ENCODE_PRIVATE_H + +#include "apr.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @defgroup APR_Util_Encode_Private + * @ingroup APR_Util + * @{ + */ + +#if APR_CHARSET_EBCDIC + static int convert_a2e[256] = { + 0x00, 0x01, 0x02, 0x03, 0x37, 0x2D, 0x2E, 0x2F, 0x16, 0x05, 0x15, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x10, 0x11, 0x12, 0x13, 0x3C, 0x3D, 0x32, 0x26, 0x18, 0x19, 0x3F, 0x27, 0x1C, 0x1D, 0x1E, 0x1F, + 0x40, 0x5A, 0x7F, 0x7B, 0x5B, 0x6C, 0x50, 0x7D, 0x4D, 0x5D, 0x5C, 0x4E, 0x6B, 0x60, 0x4B, 0x61, + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0x7A, 0x5E, 0x4C, 0x7E, 0x6E, 0x6F, + 0x7C, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, + 0xD7, 0xD8, 0xD9, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xAD, 0xE0, 0xBD, 0x5F, 0x6D, + 0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, + 0x97, 0x98, 0x99, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xC0, 0x4F, 0xD0, 0xA1, 0x07, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x06, 0x17, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x09, 0x0A, 0x1B, + 0x30, 0x31, 0x1A, 0x33, 0x34, 0x35, 0x36, 0x08, 0x38, 0x39, 0x3A, 0x3B, 0x04, 0x14, 0x3E, 0xFF, + 0x41, 0xAA, 0x4A, 0xB1, 0x9F, 0xB2, 0x6A, 0xB5, 0xBB, 0xB4, 0x9A, 0x8A, 0xB0, 0xCA, 0xAF, 0xBC, + 0x90, 0x8F, 0xEA, 0xFA, 0xBE, 0xA0, 0xB6, 0xB3, 0x9D, 0xDA, 0x9B, 0x8B, 0xB7, 0xB8, 0xB9, 0xAB, + 0x64, 0x65, 0x62, 0x66, 0x63, 0x67, 0x9E, 0x68, 0x74, 0x71, 0x72, 0x73, 0x78, 0x75, 0x76, 0x77, + 0xAC, 0x69, 0xED, 0xEE, 0xEB, 0xEF, 0xEC, 0xBF, 0x80, 0xFD, 0xFE, 0xFB, 0xFC, 0xBA, 0xAE, 0x59, + 0x44, 0x45, 0x42, 0x46, 0x43, 0x47, 0x9C, 0x48, 0x54, 0x51, 0x52, 0x53, 0x58, 0x55, 0x56, 0x57, + 0x8C, 0x49, 0xCD, 0xCE, 0xCB, 0xCF, 0xCC, 0xE1, 0x70, 0xDD, 0xDE, 0xDB, 0xDC, 0x8D, 0x8E, 0xDF}; + + static int convert_e2a[256] = { + 0x00, 0x01, 0x02, 0x03, 0x9C, 0x09, 0x86, 0x7F, 0x97, 0x8D, 0x8E, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x10, 0x11, 0x12, 0x13, 0x9D, 0x0A, 0x08, 0x87, 0x18, 0x19, 0x92, 0x8F, 0x1C, 0x1D, 0x1E, 0x1F, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x17, 0x1B, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x05, 0x06, 0x07, + 0x90, 0x91, 0x16, 0x93, 0x94, 0x95, 0x96, 0x04, 0x98, 0x99, 0x9A, 0x9B, 0x14, 0x15, 0x9E, 0x1A, + 0x20, 0xA0, 0xE2, 0xE4, 0xE0, 0xE1, 0xE3, 0xE5, 0xE7, 0xF1, 0xA2, 0x2E, 0x3C, 0x28, 0x2B, 0x7C, + 0x26, 0xE9, 0xEA, 0xEB, 0xE8, 0xED, 0xEE, 0xEF, 0xEC, 0xDF, 0x21, 0x24, 0x2A, 0x29, 0x3B, 0x5E, + 0x2D, 0x2F, 0xC2, 0xC4, 0xC0, 0xC1, 0xC3, 0xC5, 0xC7, 0xD1, 0xA6, 0x2C, 0x25, 0x5F, 0x3E, 0x3F, + 0xF8, 0xC9, 0xCA, 0xCB, 0xC8, 0xCD, 0xCE, 0xCF, 0xCC, 0x60, 0x3A, 0x23, 0x40, 0x27, 0x3D, 0x22, + 0xD8, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0xAB, 0xBB, 0xF0, 0xFD, 0xFE, 0xB1, + 0xB0, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0xAA, 0xBA, 0xE6, 0xB8, 0xC6, 0xA4, + 0xB5, 0x7E, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0xA1, 0xBF, 0xD0, 0x5B, 0xDE, 0xAE, + 0xAC, 0xA3, 0xA5, 0xB7, 0xA9, 0xA7, 0xB6, 0xBC, 0xBD, 0xBE, 0xDD, 0xA8, 0xAF, 0x5D, 0xB4, 0xD7, + 0x7B, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0xAD, 0xF4, 0xF6, 0xF2, 0xF3, 0xF5, + 0x7D, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0xB9, 0xFB, 0xFC, 0xF9, 0xFA, 0xFF, + 0x5C, 0xF7, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0xB2, 0xD4, 0xD6, 0xD2, 0xD3, 0xD5, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0xB3, 0xDB, 0xDC, 0xD9, 0xDA, 0x9F}; +#define decode ENCODE_TO_ASCII(ch) convert_e2a[(unsigned char)ch] +#define decode ENCODE_TO_NATIVE(ch) convert_a2e[(unsigned char)ch] +#else /* APR_CHARSET_EBCDIC */ +#define ENCODE_TO_ASCII(ch) (ch) +#define ENCODE_TO_NATIVE(ch) (ch) +#endif /* !APR_CHARSET_EBCDIC */ + +/** @} */ +#ifdef __cplusplus +} +#endif + +#endif /* !APR_ENCODE_PRIVATE_H */ Index: contrib/apr/libapr.dsp =================================================================== --- contrib/apr/libapr.dsp +++ contrib/apr/libapr.dsp @@ -19,8 +19,6 @@ !MESSAGE !MESSAGE "libapr - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "libapr - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "libapr - Win32 Release9x" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "libapr - Win32 Debug9x" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "libapr - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "libapr - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE @@ -47,7 +45,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c -# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "NDEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\libapr_src" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /I "./include/private" /D "NDEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\libapr_src" /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" # ADD BASE RSC /l 0x409 /d "NDEBUG" @@ -79,7 +77,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "_DEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\libapr_src" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /I "./include/private" /D "_DEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\libapr_src" /FD /EHsc /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" # ADD BASE RSC /l 0x409 /d "_DEBUG" @@ -97,70 +95,6 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2 # End Special Build Tool -!ELSEIF "$(CFG)" == "libapr - Win32 Release9x" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "9x\Release" -# PROP BASE Intermediate_Dir "9x\Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "9x\Release" -# PROP Intermediate_Dir "9x\Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c -# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "NDEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\libapr_src" /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /i "./include" /d "NDEBUG" /d "APR_VERSION_ONLY" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /debug /opt:ref -# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /debug /out:"9x\Release\libapr-1.dll" /pdb:"9x\Release\libapr-1.pdb" /implib:"9x\Release\libapr-1.lib" /MACHINE:X86 /opt:ref -# Begin Special Build Tool -TargetPath=9x\Release\libapr.dll -SOURCE="$(InputPath)" -PostBuild_Desc=Embed .manifest -PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2 -# End Special Build Tool - -!ELSEIF "$(CFG)" == "libapr - Win32 Debug9x" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "9x\Debug" -# PROP BASE Intermediate_Dir "9x\Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "9x\Debug" -# PROP Intermediate_Dir "9x\Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "_DEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\libapr_src" /FD /EHsc /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /i "./include" /d "_DEBUG" /d "APR_VERSION_ONLY" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /debug -# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /debug /out:"9x\Debug\libapr-1.dll" /pdb:"9x\Debug\libapr-1.pdb" /implib:"9x\Debug\libapr-1.lib" /MACHINE:X86 -# Begin Special Build Tool -TargetPath=9x\Debug\libapr-1.dll -SOURCE="$(InputPath)" -PostBuild_Desc=Embed .manifest -PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2 -# End Special Build Tool - !ELSEIF "$(CFG)" == "libapr - x64 Release" # PROP BASE Use_MFC 0 @@ -175,7 +109,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c -# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "NDEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\libapr_src" /FD /c +# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /I "./include/private" /D "NDEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\libapr_src" /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" # ADD BASE RSC /l 0x409 /d "NDEBUG" @@ -207,7 +141,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "_DEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\libapr_src" /FD /EHsc /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /I "./include/private" /D "_DEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(INTDIR)\libapr_src" /FD /EHsc /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" # ADD BASE RSC /l 0x409 /d "_DEBUG" @@ -231,8 +165,6 @@ # Name "libapr - Win32 Release" # Name "libapr - Win32 Debug" -# Name "libapr - Win32 Release9x" -# Name "libapr - Win32 Debug9x" # Name "libapr - x64 Release" # Name "libapr - x64 Debug" # Begin Group "Source Files" @@ -245,6 +177,10 @@ SOURCE=.\atomic\win32\apr_atomic.c # End Source File +# Begin Source File + +SOURCE=.\atomic\win32\apr_atomic64.c +# End Source File # End Group # Begin Group "dso" @@ -259,6 +195,10 @@ # PROP Default_Filter "" # Begin Source File +SOURCE=.\encoding\apr_encode.c +# End Source File +# Begin Source File + SOURCE=.\encoding\apr_escape.c # End Source File # End Group @@ -490,6 +430,10 @@ SOURCE=.\poll\unix\select.c # End Source File +# Begin Source File + +SOURCE=.\poll\unix\wakeup.c +# End Source File # End Group # Begin Group "random" @@ -524,6 +468,10 @@ # End Source File # Begin Source File +SOURCE=.\strings\apr_cstr.c +# End Source File +# Begin Source File + SOURCE=.\strings\apr_fnmatch.c # End Source File # Begin Source File @@ -693,26 +641,6 @@ # End Custom Build -!ELSEIF "$(CFG)" == "libapr - Win32 Release9x" - -# Begin Custom Build - Creating apr.h from apr.hw -InputPath=.\include\apr.hw - -".\include\apr.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - type .\include\apr.hw > .\include\apr.h - -# End Custom Build - -!ELSEIF "$(CFG)" == "libapr - Win32 Debug9x" - -# Begin Custom Build - Creating apr.h from apr.hw -InputPath=.\include\apr.hw - -".\include\apr.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - type .\include\apr.hw > .\include\apr.h - -# End Custom Build - !ELSEIF "$(CFG)" == "libapr - x64 Release" # Begin Custom Build - Creating apr.h from apr.hw @@ -782,28 +710,6 @@ # 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 Index: contrib/apr/libapr.mak =================================================================== --- contrib/apr/libapr.mak +++ contrib/apr/libapr.mak @@ -15,8 +15,6 @@ !MESSAGE !MESSAGE "libapr - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "libapr - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "libapr - Win32 Release9x" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "libapr - Win32 Debug9x" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "libapr - x64 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "libapr - x64 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE @@ -38,12 +36,15 @@ OutDir=.\Release # End Custom Macros -ALL : ".\Release\gen_test_char.exe" "$(OUTDIR)\libapr-1.dll" "$(DS_POSTBUILD_DEP)" +ALL : ".\include\apr.hw" ".\include\apr_escape.h" "$(OUTDIR)\libapr-1.dll" "$(DS_POSTBUILD_DEP)" CLEAN : -@erase "$(INTDIR)\apr_atomic.obj" + -@erase "$(INTDIR)\apr_atomic64.obj" -@erase "$(INTDIR)\apr_cpystrn.obj" + -@erase "$(INTDIR)\apr_cpstr.obj" + -@erase "$(INTDIR)\apr_encode.obj" -@erase "$(INTDIR)\apr_escape.obj" -@erase "$(INTDIR)\apr_fnmatch.obj" -@erase "$(INTDIR)\apr_getpass.obj" @@ -117,6 +118,7 @@ -@erase "$(INTDIR)\userinfo.obj" -@erase "$(INTDIR)\utf8.obj" -@erase "$(INTDIR)\version.obj" + -@erase "$(INTDIR)\wakeup.obj" -@erase "$(OUTDIR)\libapr-1.dll" -@erase "$(OUTDIR)\libapr-1.exp" -@erase "$(OUTDIR)\libapr-1.lib" @@ -130,7 +132,7 @@ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "NDEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libapr_src" /FD /c +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /I "./include/private" /D "NDEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libapr_src" /FD /c .c{$(INTDIR)}.obj:: $(CPP) @<< @@ -171,10 +173,12 @@ BSC32_SBRS= \ LINK32=link.exe -LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libapr-1.pdb" /debug /out:"$(OUTDIR)\libapr-1.dll" /implib:"$(OUTDIR)\libapr-1.lib" /MACHINE:X86 /opt:ref +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libapr-1.pdb" /debug /out:"$(OUTDIR)\libapr-1.dll" /implib:"$(OUTDIR)\libapr-1.lib" /opt:ref LINK32_OBJS= \ "$(INTDIR)\apr_atomic.obj" \ + "$(INTDIR)\apr_atomic64.obj" \ "$(INTDIR)\dso.obj" \ + "$(INTDIR)\apr_encode.obj" \ "$(INTDIR)\apr_escape.obj" \ "$(INTDIR)\buffer.obj" \ "$(INTDIR)\copy.obj" \ @@ -229,6 +233,7 @@ "$(INTDIR)\sha2_glue.obj" \ "$(INTDIR)\shm.obj" \ "$(INTDIR)\apr_cpystrn.obj" \ + "$(INTDIR)\apr_cstr.obj" \ "$(INTDIR)\apr_fnmatch.obj" \ "$(INTDIR)\apr_snprintf.obj" \ "$(INTDIR)\apr_strings.obj" \ @@ -245,6 +250,7 @@ "$(INTDIR)\timestr.obj" \ "$(INTDIR)\groupinfo.obj" \ "$(INTDIR)\userinfo.obj" \ + "$(INTDIR)\wakeup.obj" \ "$(INTDIR)\libapr.res" "$(OUTDIR)\libapr-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) @@ -274,12 +280,15 @@ OutDir=.\Debug # End Custom Macros -ALL : ".\include\apr_escape_test_char.h" ".\Debug\gen_test_char.exe" "$(OUTDIR)\libapr-1.dll" "$(DS_POSTBUILD_DEP)" +ALL : ".\include\apr.hw" ".\include\apr_escape.h" "$(OUTDIR)\libapr-1.dll" "$(DS_POSTBUILD_DEP)" CLEAN : -@erase "$(INTDIR)\apr_atomic.obj" + -@erase "$(INTDIR)\apr_atomic64.obj" -@erase "$(INTDIR)\apr_cpystrn.obj" + -@erase "$(INTDIR)\apr_cpstr.obj" + -@erase "$(INTDIR)\apr_encode.obj" -@erase "$(INTDIR)\apr_escape.obj" -@erase "$(INTDIR)\apr_fnmatch.obj" -@erase "$(INTDIR)\apr_getpass.obj" @@ -353,6 +362,7 @@ -@erase "$(INTDIR)\userinfo.obj" -@erase "$(INTDIR)\utf8.obj" -@erase "$(INTDIR)\version.obj" + -@erase "$(INTDIR)\wakeup.obj" -@erase "$(OUTDIR)\libapr-1.dll" -@erase "$(OUTDIR)\libapr-1.exp" -@erase "$(OUTDIR)\libapr-1.lib" @@ -366,7 +376,7 @@ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" CPP=cl.exe -CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "_DEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libapr_src" /FD /EHsc /c +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /I "./include/private" /D "_DEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libapr_src" /FD /EHsc /c .c{$(INTDIR)}.obj:: $(CPP) @<< @@ -407,10 +417,12 @@ BSC32_SBRS= \ LINK32=link.exe -LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libapr-1.pdb" /debug /out:"$(OUTDIR)\libapr-1.dll" /implib:"$(OUTDIR)\libapr-1.lib" /MACHINE:X86 +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libapr-1.pdb" /debug /out:"$(OUTDIR)\libapr-1.dll" /implib:"$(OUTDIR)\libapr-1.lib" LINK32_OBJS= \ "$(INTDIR)\apr_atomic.obj" \ + "$(INTDIR)\apr_atomic64.obj" \ "$(INTDIR)\dso.obj" \ + "$(INTDIR)\apr_encode.obj" \ "$(INTDIR)\apr_escape.obj" \ "$(INTDIR)\buffer.obj" \ "$(INTDIR)\copy.obj" \ @@ -465,6 +477,7 @@ "$(INTDIR)\sha2_glue.obj" \ "$(INTDIR)\shm.obj" \ "$(INTDIR)\apr_cpystrn.obj" \ + "$(INTDIR)\apr_cstr.obj" \ "$(INTDIR)\apr_fnmatch.obj" \ "$(INTDIR)\apr_snprintf.obj" \ "$(INTDIR)\apr_strings.obj" \ @@ -481,6 +494,7 @@ "$(INTDIR)\timestr.obj" \ "$(INTDIR)\groupinfo.obj" \ "$(INTDIR)\userinfo.obj" \ + "$(INTDIR)\wakeup.obj" \ "$(INTDIR)\libapr.res" "$(OUTDIR)\libapr-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) @@ -501,478 +515,6 @@ if exist .\Debug\libapr-1.dll.manifest mt.exe -manifest .\Debug\libapr-1.dll.manifest -outputresource:.\Debug\libapr-1.dll;2 echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" -!ELSEIF "$(CFG)" == "libapr - Win32 Release9x" - -OUTDIR=.\9x\Release -INTDIR=.\9x\Release -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep -# Begin Custom Macros -OutDir=.\9x\Release -# End Custom Macros - -ALL : ".\include\apr_escape_test_char.h" ".\9x\Release\gen_test_char.exe" "$(OUTDIR)\libapr-1.dll" "$(DS_POSTBUILD_DEP)" - - -CLEAN : - -@erase "$(INTDIR)\apr_atomic.obj" - -@erase "$(INTDIR)\apr_cpystrn.obj" - -@erase "$(INTDIR)\apr_escape.obj" - -@erase "$(INTDIR)\apr_fnmatch.obj" - -@erase "$(INTDIR)\apr_getpass.obj" - -@erase "$(INTDIR)\apr_hash.obj" - -@erase "$(INTDIR)\apr_pools.obj" - -@erase "$(INTDIR)\apr_random.obj" - -@erase "$(INTDIR)\apr_skiplist.obj" - -@erase "$(INTDIR)\apr_snprintf.obj" - -@erase "$(INTDIR)\apr_strings.obj" - -@erase "$(INTDIR)\apr_strnatcmp.obj" - -@erase "$(INTDIR)\apr_strtok.obj" - -@erase "$(INTDIR)\apr_tables.obj" - -@erase "$(INTDIR)\buffer.obj" - -@erase "$(INTDIR)\charset.obj" - -@erase "$(INTDIR)\common.obj" - -@erase "$(INTDIR)\copy.obj" - -@erase "$(INTDIR)\dir.obj" - -@erase "$(INTDIR)\dso.obj" - -@erase "$(INTDIR)\env.obj" - -@erase "$(INTDIR)\errorcodes.obj" - -@erase "$(INTDIR)\fileacc.obj" - -@erase "$(INTDIR)\filedup.obj" - -@erase "$(INTDIR)\filepath.obj" - -@erase "$(INTDIR)\filepath_util.obj" - -@erase "$(INTDIR)\filestat.obj" - -@erase "$(INTDIR)\filesys.obj" - -@erase "$(INTDIR)\flock.obj" - -@erase "$(INTDIR)\fullrw.obj" - -@erase "$(INTDIR)\getopt.obj" - -@erase "$(INTDIR)\groupinfo.obj" - -@erase "$(INTDIR)\inet_ntop.obj" - -@erase "$(INTDIR)\inet_pton.obj" - -@erase "$(INTDIR)\internal.obj" - -@erase "$(INTDIR)\libapr.res" - -@erase "$(INTDIR)\libapr_src.idb" - -@erase "$(INTDIR)\libapr_src.pdb" - -@erase "$(INTDIR)\misc.obj" - -@erase "$(INTDIR)\mktemp.obj" - -@erase "$(INTDIR)\mmap.obj" - -@erase "$(INTDIR)\multicast.obj" - -@erase "$(INTDIR)\open.obj" - -@erase "$(INTDIR)\otherchild.obj" - -@erase "$(INTDIR)\pipe.obj" - -@erase "$(INTDIR)\poll.obj" - -@erase "$(INTDIR)\pollcb.obj" - -@erase "$(INTDIR)\pollset.obj" - -@erase "$(INTDIR)\proc.obj" - -@erase "$(INTDIR)\proc_mutex.obj" - -@erase "$(INTDIR)\rand.obj" - -@erase "$(INTDIR)\readwrite.obj" - -@erase "$(INTDIR)\seek.obj" - -@erase "$(INTDIR)\select.obj" - -@erase "$(INTDIR)\sendrecv.obj" - -@erase "$(INTDIR)\sha2.obj" - -@erase "$(INTDIR)\sha2_glue.obj" - -@erase "$(INTDIR)\shm.obj" - -@erase "$(INTDIR)\signals.obj" - -@erase "$(INTDIR)\sockaddr.obj" - -@erase "$(INTDIR)\socket_util.obj" - -@erase "$(INTDIR)\sockets.obj" - -@erase "$(INTDIR)\sockopt.obj" - -@erase "$(INTDIR)\start.obj" - -@erase "$(INTDIR)\tempdir.obj" - -@erase "$(INTDIR)\thread.obj" - -@erase "$(INTDIR)\thread_cond.obj" - -@erase "$(INTDIR)\thread_mutex.obj" - -@erase "$(INTDIR)\thread_rwlock.obj" - -@erase "$(INTDIR)\threadpriv.obj" - -@erase "$(INTDIR)\time.obj" - -@erase "$(INTDIR)\timestr.obj" - -@erase "$(INTDIR)\userinfo.obj" - -@erase "$(INTDIR)\utf8.obj" - -@erase "$(INTDIR)\version.obj" - -@erase "$(OUTDIR)\libapr-1.dll" - -@erase "$(OUTDIR)\libapr-1.exp" - -@erase "$(OUTDIR)\libapr-1.lib" - -@erase "$(OUTDIR)\libapr-1.pdb" - -@erase ".\include\apr.h" - -@erase ".\include\apr_gen_test_char.h" - -@erase "$(OUTDIR)\gen_test_char.exe" - -@erase "$(OUTDIR)\gen_test_char.obj" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "NDEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libapr_src" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" -RSC=rc.exe -RSC_PROJ=/l 0x409 /fo"$(INTDIR)\libapr.res" /i "./include" /d "NDEBUG" /d "APR_VERSION_ONLY" -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\libapr.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libapr-1.pdb" /debug /out:"$(OUTDIR)\libapr-1.dll" /implib:"$(OUTDIR)\libapr-1.lib" /MACHINE:X86 /opt:ref -LINK32_OBJS= \ - "$(INTDIR)\apr_atomic.obj" \ - "$(INTDIR)\dso.obj" \ - "$(INTDIR)\apr_escape.obj" \ - "$(INTDIR)\buffer.obj" \ - "$(INTDIR)\copy.obj" \ - "$(INTDIR)\dir.obj" \ - "$(INTDIR)\fileacc.obj" \ - "$(INTDIR)\filedup.obj" \ - "$(INTDIR)\filepath.obj" \ - "$(INTDIR)\filepath_util.obj" \ - "$(INTDIR)\filestat.obj" \ - "$(INTDIR)\filesys.obj" \ - "$(INTDIR)\flock.obj" \ - "$(INTDIR)\fullrw.obj" \ - "$(INTDIR)\mktemp.obj" \ - "$(INTDIR)\open.obj" \ - "$(INTDIR)\pipe.obj" \ - "$(INTDIR)\readwrite.obj" \ - "$(INTDIR)\seek.obj" \ - "$(INTDIR)\tempdir.obj" \ - "$(INTDIR)\proc_mutex.obj" \ - "$(INTDIR)\thread_cond.obj" \ - "$(INTDIR)\thread_mutex.obj" \ - "$(INTDIR)\thread_rwlock.obj" \ - "$(INTDIR)\apr_pools.obj" \ - "$(INTDIR)\charset.obj" \ - "$(INTDIR)\env.obj" \ - "$(INTDIR)\errorcodes.obj" \ - "$(INTDIR)\getopt.obj" \ - "$(INTDIR)\internal.obj" \ - "$(INTDIR)\misc.obj" \ - "$(INTDIR)\otherchild.obj" \ - "$(INTDIR)\rand.obj" \ - "$(INTDIR)\start.obj" \ - "$(INTDIR)\utf8.obj" \ - "$(INTDIR)\version.obj" \ - "$(INTDIR)\common.obj" \ - "$(INTDIR)\mmap.obj" \ - "$(INTDIR)\inet_ntop.obj" \ - "$(INTDIR)\inet_pton.obj" \ - "$(INTDIR)\multicast.obj" \ - "$(INTDIR)\sendrecv.obj" \ - "$(INTDIR)\sockaddr.obj" \ - "$(INTDIR)\sockets.obj" \ - "$(INTDIR)\socket_util.obj" \ - "$(INTDIR)\sockopt.obj" \ - "$(INTDIR)\apr_getpass.obj" \ - "$(INTDIR)\poll.obj" \ - "$(INTDIR)\pollcb.obj" \ - "$(INTDIR)\pollset.obj" \ - "$(INTDIR)\select.obj" \ - "$(INTDIR)\apr_random.obj" \ - "$(INTDIR)\sha2.obj" \ - "$(INTDIR)\sha2_glue.obj" \ - "$(INTDIR)\shm.obj" \ - "$(INTDIR)\apr_cpystrn.obj" \ - "$(INTDIR)\apr_fnmatch.obj" \ - "$(INTDIR)\apr_snprintf.obj" \ - "$(INTDIR)\apr_strings.obj" \ - "$(INTDIR)\apr_strnatcmp.obj" \ - "$(INTDIR)\apr_strtok.obj" \ - "$(INTDIR)\apr_hash.obj" \ - "$(INTDIR)\apr_tables.obj" \ - "$(INTDIR)\apr_skiplist.obj" \ - "$(INTDIR)\proc.obj" \ - "$(INTDIR)\signals.obj" \ - "$(INTDIR)\thread.obj" \ - "$(INTDIR)\threadpriv.obj" \ - "$(INTDIR)\time.obj" \ - "$(INTDIR)\timestr.obj" \ - "$(INTDIR)\groupinfo.obj" \ - "$(INTDIR)\userinfo.obj" \ - "$(INTDIR)\libapr.res" - -"$(OUTDIR)\libapr-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -TargetPath=.\9x\Release\libapr-1.dll -SOURCE="$(InputPath)" -PostBuild_Desc=Embed .manifest -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -# Begin Custom Macros -OutDir=.\9x\Release -# End Custom Macros - -"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\libapr-1.dll" - if exist .\9x\Release\libapr-1.dll.manifest mt.exe -manifest .\9x\Release\libapr-1.dll.manifest -outputresource:.\9x\Release\libapr-1.dll;2 - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - -!ELSEIF "$(CFG)" == "libapr - Win32 Debug9x" - -OUTDIR=.\9x\Debug -INTDIR=.\9x\Debug -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep -# Begin Custom Macros -OutDir=.\9x\Debug -# End Custom Macros - -ALL : ".\include\apr_escape_test_char.h" ".\include\apr.h" ".\9x\Debug\gen_test_char.exe" "$(OUTDIR)\libapr-1.dll" "$(DS_POSTBUILD_DEP)" - - -CLEAN : - -@erase "$(INTDIR)\apr_atomic.obj" - -@erase "$(INTDIR)\apr_cpystrn.obj" - -@erase "$(INTDIR)\apr_escape.obj" - -@erase "$(INTDIR)\apr_fnmatch.obj" - -@erase "$(INTDIR)\apr_getpass.obj" - -@erase "$(INTDIR)\apr_hash.obj" - -@erase "$(INTDIR)\apr_pools.obj" - -@erase "$(INTDIR)\apr_random.obj" - -@erase "$(INTDIR)\apr_skiplist.obj" - -@erase "$(INTDIR)\apr_snprintf.obj" - -@erase "$(INTDIR)\apr_strings.obj" - -@erase "$(INTDIR)\apr_strnatcmp.obj" - -@erase "$(INTDIR)\apr_strtok.obj" - -@erase "$(INTDIR)\apr_tables.obj" - -@erase "$(INTDIR)\buffer.obj" - -@erase "$(INTDIR)\charset.obj" - -@erase "$(INTDIR)\common.obj" - -@erase "$(INTDIR)\copy.obj" - -@erase "$(INTDIR)\dir.obj" - -@erase "$(INTDIR)\dso.obj" - -@erase "$(INTDIR)\env.obj" - -@erase "$(INTDIR)\errorcodes.obj" - -@erase "$(INTDIR)\fileacc.obj" - -@erase "$(INTDIR)\filedup.obj" - -@erase "$(INTDIR)\filepath.obj" - -@erase "$(INTDIR)\filepath_util.obj" - -@erase "$(INTDIR)\filestat.obj" - -@erase "$(INTDIR)\filesys.obj" - -@erase "$(INTDIR)\flock.obj" - -@erase "$(INTDIR)\fullrw.obj" - -@erase "$(INTDIR)\getopt.obj" - -@erase "$(INTDIR)\groupinfo.obj" - -@erase "$(INTDIR)\inet_ntop.obj" - -@erase "$(INTDIR)\inet_pton.obj" - -@erase "$(INTDIR)\internal.obj" - -@erase "$(INTDIR)\libapr.res" - -@erase "$(INTDIR)\libapr_src.idb" - -@erase "$(INTDIR)\libapr_src.pdb" - -@erase "$(INTDIR)\misc.obj" - -@erase "$(INTDIR)\mktemp.obj" - -@erase "$(INTDIR)\mmap.obj" - -@erase "$(INTDIR)\multicast.obj" - -@erase "$(INTDIR)\open.obj" - -@erase "$(INTDIR)\otherchild.obj" - -@erase "$(INTDIR)\pipe.obj" - -@erase "$(INTDIR)\poll.obj" - -@erase "$(INTDIR)\pollcb.obj" - -@erase "$(INTDIR)\pollset.obj" - -@erase "$(INTDIR)\proc.obj" - -@erase "$(INTDIR)\proc_mutex.obj" - -@erase "$(INTDIR)\rand.obj" - -@erase "$(INTDIR)\readwrite.obj" - -@erase "$(INTDIR)\seek.obj" - -@erase "$(INTDIR)\select.obj" - -@erase "$(INTDIR)\sendrecv.obj" - -@erase "$(INTDIR)\sha2.obj" - -@erase "$(INTDIR)\sha2_glue.obj" - -@erase "$(INTDIR)\shm.obj" - -@erase "$(INTDIR)\signals.obj" - -@erase "$(INTDIR)\sockaddr.obj" - -@erase "$(INTDIR)\socket_util.obj" - -@erase "$(INTDIR)\sockets.obj" - -@erase "$(INTDIR)\sockopt.obj" - -@erase "$(INTDIR)\start.obj" - -@erase "$(INTDIR)\tempdir.obj" - -@erase "$(INTDIR)\thread.obj" - -@erase "$(INTDIR)\thread_cond.obj" - -@erase "$(INTDIR)\thread_mutex.obj" - -@erase "$(INTDIR)\thread_rwlock.obj" - -@erase "$(INTDIR)\threadpriv.obj" - -@erase "$(INTDIR)\time.obj" - -@erase "$(INTDIR)\timestr.obj" - -@erase "$(INTDIR)\userinfo.obj" - -@erase "$(INTDIR)\utf8.obj" - -@erase "$(INTDIR)\version.obj" - -@erase "$(OUTDIR)\libapr-1.dll" - -@erase "$(OUTDIR)\libapr-1.exp" - -@erase "$(OUTDIR)\libapr-1.lib" - -@erase "$(OUTDIR)\libapr-1.pdb" - -@erase ".\include\apr.h" - -@erase ".\include\apr_gen_test_char.h" - -@erase "$(OUTDIR)\gen_test_char.exe" - -@erase "$(OUTDIR)\gen_test_char.obj" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "_DEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libapr_src" /FD /EHsc /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" -RSC=rc.exe -RSC_PROJ=/l 0x409 /fo"$(INTDIR)\libapr.res" /i "./include" /d "_DEBUG" /d "APR_VERSION_ONLY" -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\libapr.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libapr-1.pdb" /debug /out:"$(OUTDIR)\libapr-1.dll" /implib:"$(OUTDIR)\libapr-1.lib" /MACHINE:X86 -LINK32_OBJS= \ - "$(INTDIR)\apr_atomic.obj" \ - "$(INTDIR)\dso.obj" \ - "$(INTDIR)\apr_escape.obj" \ - "$(INTDIR)\buffer.obj" \ - "$(INTDIR)\copy.obj" \ - "$(INTDIR)\dir.obj" \ - "$(INTDIR)\fileacc.obj" \ - "$(INTDIR)\filedup.obj" \ - "$(INTDIR)\filepath.obj" \ - "$(INTDIR)\filepath_util.obj" \ - "$(INTDIR)\filestat.obj" \ - "$(INTDIR)\filesys.obj" \ - "$(INTDIR)\flock.obj" \ - "$(INTDIR)\fullrw.obj" \ - "$(INTDIR)\mktemp.obj" \ - "$(INTDIR)\open.obj" \ - "$(INTDIR)\pipe.obj" \ - "$(INTDIR)\readwrite.obj" \ - "$(INTDIR)\seek.obj" \ - "$(INTDIR)\tempdir.obj" \ - "$(INTDIR)\proc_mutex.obj" \ - "$(INTDIR)\thread_cond.obj" \ - "$(INTDIR)\thread_mutex.obj" \ - "$(INTDIR)\thread_rwlock.obj" \ - "$(INTDIR)\apr_pools.obj" \ - "$(INTDIR)\charset.obj" \ - "$(INTDIR)\env.obj" \ - "$(INTDIR)\errorcodes.obj" \ - "$(INTDIR)\getopt.obj" \ - "$(INTDIR)\internal.obj" \ - "$(INTDIR)\misc.obj" \ - "$(INTDIR)\otherchild.obj" \ - "$(INTDIR)\rand.obj" \ - "$(INTDIR)\start.obj" \ - "$(INTDIR)\utf8.obj" \ - "$(INTDIR)\version.obj" \ - "$(INTDIR)\common.obj" \ - "$(INTDIR)\mmap.obj" \ - "$(INTDIR)\inet_ntop.obj" \ - "$(INTDIR)\inet_pton.obj" \ - "$(INTDIR)\multicast.obj" \ - "$(INTDIR)\sendrecv.obj" \ - "$(INTDIR)\sockaddr.obj" \ - "$(INTDIR)\sockets.obj" \ - "$(INTDIR)\socket_util.obj" \ - "$(INTDIR)\sockopt.obj" \ - "$(INTDIR)\apr_getpass.obj" \ - "$(INTDIR)\poll.obj" \ - "$(INTDIR)\pollcb.obj" \ - "$(INTDIR)\pollset.obj" \ - "$(INTDIR)\select.obj" \ - "$(INTDIR)\apr_random.obj" \ - "$(INTDIR)\sha2.obj" \ - "$(INTDIR)\sha2_glue.obj" \ - "$(INTDIR)\shm.obj" \ - "$(INTDIR)\apr_cpystrn.obj" \ - "$(INTDIR)\apr_fnmatch.obj" \ - "$(INTDIR)\apr_snprintf.obj" \ - "$(INTDIR)\apr_strings.obj" \ - "$(INTDIR)\apr_strnatcmp.obj" \ - "$(INTDIR)\apr_strtok.obj" \ - "$(INTDIR)\apr_hash.obj" \ - "$(INTDIR)\apr_tables.obj" \ - "$(INTDIR)\apr_skiplist.obj" \ - "$(INTDIR)\proc.obj" \ - "$(INTDIR)\signals.obj" \ - "$(INTDIR)\thread.obj" \ - "$(INTDIR)\threadpriv.obj" \ - "$(INTDIR)\time.obj" \ - "$(INTDIR)\timestr.obj" \ - "$(INTDIR)\groupinfo.obj" \ - "$(INTDIR)\userinfo.obj" \ - "$(INTDIR)\libapr.res" - -"$(OUTDIR)\libapr-1.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -TargetPath=.\9x\Debug\libapr-1.dll -SOURCE="$(InputPath)" -PostBuild_Desc=Embed .manifest -DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep - -# Begin Custom Macros -OutDir=.\9x\Debug -# End Custom Macros - -"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\libapr-1.dll" - if exist .\9x\Debug\libapr-1.dll.manifest mt.exe -manifest .\9x\Debug\libapr-1.dll.manifest -outputresource:.\9x\Debug\libapr-1.dll;2 - echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)" - !ELSEIF "$(CFG)" == "libapr - x64 Release" OUTDIR=.\x64\Release @@ -982,12 +524,15 @@ OutDir=.\x64\Release # End Custom Macros -ALL : ".\x64\Release\gen_test_char.exe" ".\include\apr_escape_test_char.h" "$(OUTDIR)\libapr-1.dll" "$(DS_POSTBUILD_DEP)" +ALL : ".\include\apr.hw" ".\include\apr_escape.h" "$(OUTDIR)\libapr-1.dll" "$(DS_POSTBUILD_DEP)" CLEAN : -@erase "$(INTDIR)\apr_atomic.obj" + -@erase "$(INTDIR)\apr_atomic64.obj" -@erase "$(INTDIR)\apr_cpystrn.obj" + -@erase "$(INTDIR)\apr_cpstr.obj" + -@erase "$(INTDIR)\apr_encode.obj" -@erase "$(INTDIR)\apr_escape.obj" -@erase "$(INTDIR)\apr_fnmatch.obj" -@erase "$(INTDIR)\apr_getpass.obj" @@ -1034,6 +579,7 @@ -@erase "$(INTDIR)\poll.obj" -@erase "$(INTDIR)\pollcb.obj" -@erase "$(INTDIR)\pollset.obj" + -@erase "$(INTDIR)\wakeup.obj" -@erase "$(INTDIR)\proc.obj" -@erase "$(INTDIR)\proc_mutex.obj" -@erase "$(INTDIR)\rand.obj" @@ -1074,7 +620,7 @@ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" CPP=cl.exe -CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "NDEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libapr_src" /FD /c +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /I "./include/private" /D "NDEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libapr_src" /FD /c .c{$(INTDIR)}.obj:: $(CPP) @<< @@ -1115,10 +661,12 @@ BSC32_SBRS= \ LINK32=link.exe -LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libapr-1.pdb" /debug /out:"$(OUTDIR)\libapr-1.dll" /implib:"$(OUTDIR)\libapr-1.lib" /MACHINE:X64 /opt:ref +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libapr-1.pdb" /debug /out:"$(OUTDIR)\libapr-1.dll" /implib:"$(OUTDIR)\libapr-1.lib" /opt:ref LINK32_OBJS= \ "$(INTDIR)\apr_atomic.obj" \ + "$(INTDIR)\apr_atomic64.obj" \ "$(INTDIR)\dso.obj" \ + "$(INTDIR)\apr_encode.obj" \ "$(INTDIR)\apr_escape.obj" \ "$(INTDIR)\buffer.obj" \ "$(INTDIR)\copy.obj" \ @@ -1167,12 +715,14 @@ "$(INTDIR)\poll.obj" \ "$(INTDIR)\pollcb.obj" \ "$(INTDIR)\pollset.obj" \ + "$(INTDIR)\wakeup.obj" \ "$(INTDIR)\select.obj" \ "$(INTDIR)\apr_random.obj" \ "$(INTDIR)\sha2.obj" \ "$(INTDIR)\sha2_glue.obj" \ "$(INTDIR)\shm.obj" \ "$(INTDIR)\apr_cpystrn.obj" \ + "$(INTDIR)\apr_cstr.obj" \ "$(INTDIR)\apr_fnmatch.obj" \ "$(INTDIR)\apr_snprintf.obj" \ "$(INTDIR)\apr_strings.obj" \ @@ -1218,12 +768,15 @@ OutDir=.\x64\Debug # End Custom Macros -ALL : ".\x64\Debug\gen_test_char.exe" ".\include\apr_escape_test_char.h" "$(OUTDIR)\libapr-1.dll" "$(DS_POSTBUILD_DEP)" +ALL : ".\include\apr.hw" ".\include\apr_escape.h" "$(OUTDIR)\libapr-1.dll" "$(DS_POSTBUILD_DEP)" CLEAN : -@erase "$(INTDIR)\apr_atomic.obj" + -@erase "$(INTDIR)\apr_atomic64.obj" -@erase "$(INTDIR)\apr_cpystrn.obj" + -@erase "$(INTDIR)\apr_cpstr.obj" + -@erase "$(INTDIR)\apr_encode.obj" -@erase "$(INTDIR)\apr_escape.obj" -@erase "$(INTDIR)\apr_fnmatch.obj" -@erase "$(INTDIR)\apr_getpass.obj" @@ -1270,6 +823,7 @@ -@erase "$(INTDIR)\poll.obj" -@erase "$(INTDIR)\pollcb.obj" -@erase "$(INTDIR)\pollset.obj" + -@erase "$(INTDIR)\wakeup.obj" -@erase "$(INTDIR)\proc.obj" -@erase "$(INTDIR)\proc_mutex.obj" -@erase "$(INTDIR)\rand.obj" @@ -1310,7 +864,7 @@ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" CPP=cl.exe -CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "_DEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libapr_src" /FD /EHsc /c +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /I "./include/private" /D "_DEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "WINNT" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libapr_src" /FD /EHsc /c .c{$(INTDIR)}.obj:: $(CPP) @<< @@ -1351,10 +905,12 @@ BSC32_SBRS= \ LINK32=link.exe -LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libapr-1.pdb" /debug /out:"$(OUTDIR)\libapr-1.dll" /implib:"$(OUTDIR)\libapr-1.lib" /MACHINE:X64 +LINK32_FLAGS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib /nologo /base:"0x6EEC0000" /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libapr-1.pdb" /debug /out:"$(OUTDIR)\libapr-1.dll" /implib:"$(OUTDIR)\libapr-1.lib" LINK32_OBJS= \ "$(INTDIR)\apr_atomic.obj" \ + "$(INTDIR)\apr_atomic64.obj" \ "$(INTDIR)\dso.obj" \ + "$(INTDIR)\apr_encode.obj" \ "$(INTDIR)\apr_escape.obj" \ "$(INTDIR)\buffer.obj" \ "$(INTDIR)\copy.obj" \ @@ -1403,12 +959,14 @@ "$(INTDIR)\poll.obj" \ "$(INTDIR)\pollcb.obj" \ "$(INTDIR)\pollset.obj" \ + "$(INTDIR)\wakeup.obj" \ "$(INTDIR)\select.obj" \ "$(INTDIR)\apr_random.obj" \ "$(INTDIR)\sha2.obj" \ "$(INTDIR)\sha2_glue.obj" \ "$(INTDIR)\shm.obj" \ "$(INTDIR)\apr_cpystrn.obj" \ + "$(INTDIR)\apr_cstr.obj" \ "$(INTDIR)\apr_fnmatch.obj" \ "$(INTDIR)\apr_snprintf.obj" \ "$(INTDIR)\apr_strings.obj" \ @@ -1457,19 +1015,31 @@ !ENDIF -!IF "$(CFG)" == "libapr - Win32 Release" || "$(CFG)" == "libapr - Win32 Debug" || "$(CFG)" == "libapr - Win32 Release9x" || "$(CFG)" == "libapr - Win32 Debug9x" || "$(CFG)" == "libapr - x64 Release" || "$(CFG)" == "libapr - x64 Debug" +!IF "$(CFG)" == "libapr - Win32 Release" || "$(CFG)" == "libapr - Win32 Debug" || "$(CFG)" == "libapr - x64 Release" || "$(CFG)" == "libapr - x64 Debug" SOURCE=.\atomic\win32\apr_atomic.c "$(INTDIR)\apr_atomic.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" $(CPP) $(CPP_PROJ) $(SOURCE) +SOURCE=.\atomic\win32\apr_atomic64.c + +"$(INTDIR)\apr_atomic64.obj" : $(SOURCE) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + SOURCE=.\dso\win32\dso.c "$(INTDIR)\dso.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" $(CPP) $(CPP_PROJ) $(SOURCE) +SOURCE=.\encoding\apr_encode.c + +"$(INTDIR)\apr_encode.obj" : $(SOURCE) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + SOURCE=.\encoding\apr_escape.c "$(INTDIR)\apr_escape.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr_escape.h" ".\include\apr_escape_test_char.h" ".\include\apr.h" @@ -1765,6 +1335,12 @@ $(CPP) $(CPP_PROJ) $(SOURCE) +SOURCE=.\poll\unix\wakeup.c + +"$(INTDIR)\wakeup.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + SOURCE=.\random\unix\apr_random.c "$(INTDIR)\apr_random.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" @@ -1795,6 +1371,12 @@ $(CPP) $(CPP_PROJ) $(SOURCE) +SOURCE=.\strings\apr_cstr.c + +"$(INTDIR)\apr_cstr.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr_cstr.h" + $(CPP) $(CPP_PROJ) $(SOURCE) + + SOURCE=.\strings\apr_fnmatch.c "$(INTDIR)\apr_fnmatch.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr.h" @@ -1915,28 +1497,6 @@ << -!ELSEIF "$(CFG)" == "libapr - Win32 Release9x" - -InputPath=.\include\apr.hw - -".\include\apr.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - < .\include\apr.h -<< - - -!ELSEIF "$(CFG)" == "libapr - Win32 Debug9x" - -InputPath=.\include\apr.hw - -".\include\apr.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - < .\include\apr.h -<< - - !ELSEIF "$(CFG)" == "libapr - x64 Release" InputPath=.\include\apr.hw @@ -2037,75 +1597,6 @@ !ENDIF -SOURCE=.\include\apr_want.h - -!IF "$(CFG)" == "libapr - Win32 Release" - -InputPath=.\include\apr_want.h - -".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - < .\include\apr.h -<< - - -!ELSEIF "$(CFG)" == "libapr - Win32 Debug" - -InputPath=.\include\apr_want.h - -".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - < .\include\apr.h -<< - - -!ELSEIF "$(CFG)" == "libapr - Win32 Release9x" - -InputPath=.\include\apr_want.h - -".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - < .\include\apr.h -<< - - -!ELSEIF "$(CFG)" == "libapr - Win32 Debug9x" - -InputPath=.\include\apr_want.h - -".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - < .\include\apr.h -<< - - -!ELSEIF "$(CFG)" == "libapr - x64 Release" - -InputPath=.\include\apr_want.h - -".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - < .\include\apr.h -<< - - -!ELSEIF "$(CFG)" == "libapr - x64 Debug" - -InputPath=.\include\apr_want.h - -".\include\apr_escape_test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - < .\include\apr.h -<< - - -!ENDIF SOURCE=.\libapr.rc Index: contrib/apr/locks/unix/global_mutex.c =================================================================== --- contrib/apr/locks/unix/global_mutex.c +++ contrib/apr/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 @@ } #if APR_HAS_THREADS - if (m->proc_mutex->inter_meth->flags & APR_PROCESS_LOCK_MECH_IS_GLOBAL) { + if (m->proc_mutex->meth->flags & APR_PROCESS_LOCK_MECH_IS_GLOBAL) { m->thread_mutex = NULL; /* We don't need a thread lock. */ } else { @@ -141,6 +142,47 @@ return rv; } +APR_DECLARE(apr_status_t) apr_global_mutex_timedlock(apr_global_mutex_t *mutex, + apr_interval_time_t timeout) +{ +#if APR_HAS_TIMEDLOCKS + apr_status_t rv; + +#if APR_HAS_THREADS + if (mutex->thread_mutex) { + apr_time_t expiry = 0; + if (timeout > 0) { + expiry = apr_time_now() + timeout; + } + rv = apr_thread_mutex_timedlock(mutex->thread_mutex, timeout); + if (rv != APR_SUCCESS) { + return rv; + } + if (expiry) { + timeout = expiry - apr_time_now(); + if (timeout < 0) { + timeout = 0; + } + } + } +#endif /* APR_HAS_THREADS */ + + rv = apr_proc_mutex_timedlock(mutex->proc_mutex, timeout); + +#if APR_HAS_THREADS + if (rv != APR_SUCCESS) { + if (mutex->thread_mutex) { + (void)apr_thread_mutex_unlock(mutex->thread_mutex); + } + } +#endif /* APR_HAS_THREADS */ + + return rv; +#else /* APR_HAS_TIMEDLOCKS */ + return APR_ENOTIMPL; +#endif +} + APR_DECLARE(apr_status_t) apr_global_mutex_unlock(apr_global_mutex_t *mutex) { apr_status_t rv; @@ -180,9 +222,24 @@ 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) + Index: contrib/apr/locks/unix/proc_mutex.c =================================================================== --- contrib/apr/locks/unix/proc_mutex.c +++ contrib/apr/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 @@ } #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,55 @@ } #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_FCNTL_SERIALIZE \ + || APR_HAS_FLOCK_SERIALIZE \ + || (APR_HAS_SYSVSEM_SERIALIZE \ + && !defined(HAVE_SEMTIMEDOP)) \ + || (APR_HAS_POSIXSEM_SERIALIZE \ + && !defined(HAVE_SEM_TIMEDWAIT)) \ + || (APR_HAS_PROC_PTHREAD_SERIALIZE \ + && !defined(HAVE_PTHREAD_MUTEX_TIMEDLOCK) \ + && !defined(HAVE_PTHREAD_CONDATTR_SETPSHARED)) +static apr_status_t proc_mutex_spinsleep_timedacquire(apr_proc_mutex_t *mutex, + apr_interval_time_t timeout) +{ +#define SLEEP_TIME apr_time_from_msec(10) + apr_status_t rv; + for (;;) { + rv = apr_proc_mutex_trylock(mutex); + if (!APR_STATUS_IS_EBUSY(rv)) { + if (rv == APR_SUCCESS) { + mutex->curr_locked = 1; + } + break; + } + if (timeout <= 0) { + rv = APR_TIMEUP; + break; + } + if (timeout > SLEEP_TIME) { + apr_sleep(SLEEP_TIME); + timeout -= SLEEP_TIME; + } + else { + apr_sleep(timeout); + timeout = 0; + } + } + return rv; +} +#endif + #if APR_HAS_POSIXSEM_SERIALIZE #ifndef SEM_FAILED @@ -45,7 +95,7 @@ { 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 +124,6 @@ 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 +182,7 @@ } /* 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 +195,7 @@ 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 +209,7 @@ 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) { @@ -173,10 +221,41 @@ return APR_SUCCESS; } +#if defined(HAVE_SEM_TIMEDWAIT) +static apr_status_t proc_mutex_posix_timedacquire(apr_proc_mutex_t *mutex, + apr_interval_time_t timeout) +{ + if (timeout <= 0) { + apr_status_t rv = proc_mutex_posix_tryacquire(mutex); + return (rv == APR_EBUSY) ? APR_TIMEUP : rv; + } + else { + int rc; + struct timespec abstime; + + timeout += apr_time_now(); + abstime.tv_sec = apr_time_sec(timeout); + abstime.tv_nsec = apr_time_usec(timeout) * 1000; /* nanoseconds */ + + do { + rc = sem_timedwait(mutex->os.psem_interproc, &abstime); + } while (rc < 0 && errno == EINTR); + if (rc < 0) { + if (errno == ETIMEDOUT) { + return APR_TIMEUP; + } + return errno; + } + } + mutex->curr_locked = 1; + return APR_SUCCESS; +} +#endif + 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; @@ -194,9 +273,16 @@ proc_mutex_posix_create, proc_mutex_posix_acquire, proc_mutex_posix_tryacquire, +#if defined(HAVE_SEM_TIMEDWAIT) + proc_mutex_posix_timedacquire, +#else + proc_mutex_spinsleep_timedacquire, +#endif proc_mutex_posix_release, proc_mutex_posix_cleanup, proc_mutex_no_child_init, + proc_mutex_no_perms_set, + APR_LOCK_POSIXSEM, "posixsem" }; @@ -226,9 +312,9 @@ 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 +325,17 @@ 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 +350,7 @@ 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 +364,7 @@ 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) { @@ -291,13 +376,44 @@ return APR_SUCCESS; } +#if defined(HAVE_SEMTIMEDOP) +static apr_status_t proc_mutex_sysv_timedacquire(apr_proc_mutex_t *mutex, + apr_interval_time_t timeout) +{ + if (timeout <= 0) { + apr_status_t rv = proc_mutex_sysv_tryacquire(mutex); + return (rv == APR_EBUSY) ? APR_TIMEUP : rv; + } + else { + int rc; + struct timespec reltime; + + reltime.tv_sec = apr_time_sec(timeout); + reltime.tv_nsec = apr_time_usec(timeout) * 1000; /* nanoseconds */ + + do { + rc = semtimedop(mutex->os.crossproc, &proc_mutex_op_on, 1, + &reltime); + } while (rc < 0 && errno == EINTR); + if (rc < 0) { + if (errno == EAGAIN) { + return APR_TIMEUP; + } + return errno; + } + } + mutex->curr_locked = 1; + return APR_SUCCESS; +} +#endif + static apr_status_t proc_mutex_sysv_release(apr_proc_mutex_t *mutex) { int rc; 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 +421,24 @@ 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) @@ -315,9 +449,16 @@ proc_mutex_sysv_create, proc_mutex_sysv_acquire, proc_mutex_sysv_tryacquire, +#if defined(HAVE_SEMTIMEDOP) + proc_mutex_sysv_timedacquire, +#else + proc_mutex_spinsleep_timedacquire, +#endif proc_mutex_sysv_release, proc_mutex_sysv_cleanup, proc_mutex_no_child_init, + proc_mutex_sysv_perms_set, + APR_LOCK_SYSVSEM, "sysvsem" }; @@ -325,36 +466,122 @@ #if APR_HAS_PROC_PTHREAD_SERIALIZE -static apr_status_t proc_mutex_proc_pthread_cleanup(void *mutex_) +#ifndef APR_USE_PROC_PTHREAD_MUTEX_COND +#define APR_USE_PROC_PTHREAD_MUTEX_COND \ + (defined(HAVE_PTHREAD_CONDATTR_SETPSHARED) \ + && !defined(HAVE_PTHREAD_MUTEX_TIMEDLOCK)) +#endif + +/* 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 { +#define proc_pthread_cast(m) \ + ((proc_pthread_mutex_t *)(m)->os.pthread_interproc) + pthread_mutex_t mutex; +#define proc_pthread_mutex(m) \ + (proc_pthread_cast(m)->mutex) +#if APR_USE_PROC_PTHREAD_MUTEX_COND + pthread_cond_t cond; +#define proc_pthread_mutex_cond(m) \ + (proc_pthread_cast(m)->cond) + apr_int32_t cond_locked; +#define proc_pthread_mutex_cond_locked(m) \ + (proc_pthread_cast(m)->cond_locked) + apr_uint32_t cond_num_waiters; +#define proc_pthread_mutex_cond_num_waiters(m) \ + (proc_pthread_cast(m)->cond_num_waiters) +#define proc_pthread_mutex_is_cond(m) \ + ((m)->pthread_refcounting && proc_pthread_mutex_cond_locked(m) != -1) +#endif /* APR_USE_PROC_PTHREAD_MUTEX_COND */ + apr_uint32_t refcount; +#define proc_pthread_mutex_refcount(m) \ + (proc_pthread_cast(m)->refcount) +} proc_pthread_mutex_t; + + +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 APR_USE_PROC_PTHREAD_MUTEX_COND + if (proc_pthread_mutex_is_cond(mutex)) { + mutex->curr_locked = 0; + } + else +#endif /* APR_USE_PROC_PTHREAD_MUTEX_COND */ if (mutex->curr_locked == 1) { - if ((rv = pthread_mutex_unlock(mutex->pthread_interproc))) { + if ((rv = pthread_mutex_unlock(&proc_pthread_mutex(mutex)))) { #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 APR_USE_PROC_PTHREAD_MUTEX_COND + if (proc_pthread_mutex_is_cond(mutex) && + (rv = pthread_cond_destroy(&proc_pthread_mutex_cond(mutex)))) { #ifdef HAVE_ZOS_PTHREADS rv = errno; #endif return rv; } +#endif /* APR_USE_PROC_PTHREAD_MUTEX_COND */ + + if ((rv = pthread_mutex_destroy(&proc_pthread_mutex(mutex)))) { +#ifdef HAVE_ZOS_PTHREADS + rv = errno; +#endif + return rv; + } + } + 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((caddr_t)mutex->pthread_interproc, sizeof(pthread_mutex_t))) { + 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,42 +592,50 @@ 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 APR_USE_PROC_PTHREAD_MUTEX_COND + proc_pthread_mutex_cond_locked(new_mutex) = -1; +#endif 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; } +#if defined(HAVE_PTHREAD_MUTEX_ROBUST) || defined(HAVE_PTHREAD_MUTEX_ROBUST_NP) #ifdef HAVE_PTHREAD_MUTEX_ROBUST - if ((rv = pthread_mutexattr_setrobust_np(&mattr, - PTHREAD_MUTEX_ROBUST_NP))) { + rv = pthread_mutexattr_setrobust(&mattr, PTHREAD_MUTEX_ROBUST); +#else + rv = pthread_mutexattr_setrobust_np(&mattr, PTHREAD_MUTEX_ROBUST_NP); +#endif + if (rv) { #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 +643,29 @@ #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 */ +#endif /* HAVE_PTHREAD_MUTEX_ROBUST[_NP] */ - if ((rv = pthread_mutex_init(new_mutex->pthread_interproc, &mattr))) { + if ((rv = pthread_mutex_init(&proc_pthread_mutex(new_mutex), &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,81 +676,321 @@ 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_ex(apr_proc_mutex_t *mutex, + apr_interval_time_t timeout) { apr_status_t rv; - if ((rv = pthread_mutex_lock(mutex->pthread_interproc))) { -#ifdef HAVE_ZOS_PTHREADS - rv = errno; +#if APR_USE_PROC_PTHREAD_MUTEX_COND + if (proc_pthread_mutex_is_cond(mutex)) { + if ((rv = pthread_mutex_lock(&proc_pthread_mutex(mutex)))) { +#ifdef HAVE_ZOS_PTHREADS + rv = errno; #endif +#if defined(HAVE_PTHREAD_MUTEX_ROBUST) || defined(HAVE_PTHREAD_MUTEX_ROBUST_NP) + /* Okay, our owner died. Let's try to make it consistent again. */ + if (rv == EOWNERDEAD) { + proc_pthread_mutex_dec(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); + pthread_mutex_consistent(&proc_pthread_mutex(mutex)); +#else + pthread_mutex_consistent_np(&proc_pthread_mutex(mutex)); +#endif + } + else +#endif + return rv; } - else + + if (!proc_pthread_mutex_cond_locked(mutex)) { + rv = APR_SUCCESS; + } + else if (!timeout) { + rv = APR_TIMEUP; + } + else { + struct timespec abstime; + + if (timeout > 0) { + timeout += apr_time_now(); + abstime.tv_sec = apr_time_sec(timeout); + abstime.tv_nsec = apr_time_usec(timeout) * 1000; /* nanoseconds */ + } + + proc_pthread_mutex_cond_num_waiters(mutex)++; + do { + if (timeout < 0) { + rv = pthread_cond_wait(&proc_pthread_mutex_cond(mutex), + &proc_pthread_mutex(mutex)); + if (rv) { +#ifdef HAVE_ZOS_PTHREADS + rv = errno; +#endif + break; + } + } + else { + rv = pthread_cond_timedwait(&proc_pthread_mutex_cond(mutex), + &proc_pthread_mutex(mutex), + &abstime); + if (rv) { +#ifdef HAVE_ZOS_PTHREADS + rv = errno; +#endif + if (rv == ETIMEDOUT) { + rv = APR_TIMEUP; + } + break; + } + } + } while (proc_pthread_mutex_cond_locked(mutex)); + proc_pthread_mutex_cond_num_waiters(mutex)--; + } + if (rv != APR_SUCCESS) { + pthread_mutex_unlock(&proc_pthread_mutex(mutex)); + return rv; + } + + proc_pthread_mutex_cond_locked(mutex) = 1; + + rv = pthread_mutex_unlock(&proc_pthread_mutex(mutex)); + if (rv) { +#ifdef HAVE_ZOS_PTHREADS + rv = errno; +#endif return rv; + } + } + else +#endif /* APR_USE_PROC_PTHREAD_MUTEX_COND */ + { + if (timeout < 0) { + rv = pthread_mutex_lock(&proc_pthread_mutex(mutex)); + if (rv) { +#ifdef HAVE_ZOS_PTHREADS + rv = errno; +#endif + } + } + else if (!timeout) { + rv = pthread_mutex_trylock(&proc_pthread_mutex(mutex)); + if (rv) { +#ifdef HAVE_ZOS_PTHREADS + rv = errno; +#endif + if (rv == EBUSY) { + return APR_TIMEUP; + } + } + } + else +#if defined(HAVE_PTHREAD_MUTEX_TIMEDLOCK) + { + struct timespec abstime; + + timeout += apr_time_now(); + abstime.tv_sec = apr_time_sec(timeout); + abstime.tv_nsec = apr_time_usec(timeout) * 1000; /* nanoseconds */ + + rv = pthread_mutex_timedlock(&proc_pthread_mutex(mutex), &abstime); + if (rv) { +#ifdef HAVE_ZOS_PTHREADS + rv = errno; +#endif + if (rv == ETIMEDOUT) { + return APR_TIMEUP; + } + } + } + if (rv) { +#if defined(HAVE_PTHREAD_MUTEX_ROBUST) || defined(HAVE_PTHREAD_MUTEX_ROBUST_NP) + /* Okay, our owner died. Let's try to make it consistent again. */ + if (rv == EOWNERDEAD) { + proc_pthread_mutex_dec(mutex); +#ifdef HAVE_PTHREAD_MUTEX_ROBUST + pthread_mutex_consistent(&proc_pthread_mutex(mutex)); #else - return rv; + pthread_mutex_consistent_np(&proc_pthread_mutex(mutex)); +#endif + } + else +#endif + return rv; + } +#else /* !HAVE_PTHREAD_MUTEX_TIMEDLOCK */ + return proc_mutex_spinsleep_timedacquire(mutex, timeout); #endif } + 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_acquire(apr_proc_mutex_t *mutex) +{ + return proc_mutex_pthread_acquire_ex(mutex, -1); +} + +static apr_status_t proc_mutex_pthread_tryacquire(apr_proc_mutex_t *mutex) +{ + apr_status_t rv = proc_mutex_pthread_acquire_ex(mutex, 0); + return (rv == APR_TIMEUP) ? APR_EBUSY : rv; +} + +static apr_status_t proc_mutex_pthread_timedacquire(apr_proc_mutex_t *mutex, + apr_interval_time_t timeout) +{ + return proc_mutex_pthread_acquire_ex(mutex, (timeout <= 0) ? 0 : timeout); +} + +static apr_status_t proc_mutex_pthread_release(apr_proc_mutex_t *mutex) { apr_status_t rv; - - if ((rv = pthread_mutex_trylock(mutex->pthread_interproc))) { + +#if APR_USE_PROC_PTHREAD_MUTEX_COND + if (proc_pthread_mutex_is_cond(mutex)) { + if ((rv = pthread_mutex_lock(&proc_pthread_mutex(mutex)))) { #ifdef HAVE_ZOS_PTHREADS - rv = errno; + rv = errno; #endif - if (rv == EBUSY) { - return APR_EBUSY; - } +#if defined(HAVE_PTHREAD_MUTEX_ROBUST) || defined(HAVE_PTHREAD_MUTEX_ROBUST_NP) + /* Okay, our owner died. Let's try to make it consistent again. */ + if (rv == EOWNERDEAD) { + proc_pthread_mutex_dec(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); + pthread_mutex_consistent(&proc_pthread_mutex(mutex)); +#else + pthread_mutex_consistent_np(&proc_pthread_mutex(mutex)); +#endif + } + else +#endif + return rv; + } + + if (!proc_pthread_mutex_cond_locked(mutex)) { + rv = APR_EINVAL; + } + else if (!proc_pthread_mutex_cond_num_waiters(mutex)) { rv = APR_SUCCESS; } - else + else { + rv = pthread_cond_signal(&proc_pthread_mutex_cond(mutex)); +#ifdef HAVE_ZOS_PTHREADS + if (rv) { + rv = errno; + } +#endif + } + if (rv != APR_SUCCESS) { + pthread_mutex_unlock(&proc_pthread_mutex(mutex)); return rv; -#else - return rv; + } + + proc_pthread_mutex_cond_locked(mutex) = 0; + } +#endif /* APR_USE_PROC_PTHREAD_MUTEX_COND */ + + mutex->curr_locked = 0; + if ((rv = pthread_mutex_unlock(&proc_pthread_mutex(mutex)))) { +#ifdef HAVE_ZOS_PTHREADS + rv = errno; #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 const apr_proc_mutex_unix_lock_methods_t mutex_proc_pthread_methods = +{ + APR_PROCESS_LOCK_MECH_IS_GLOBAL, + proc_mutex_pthread_create, + proc_mutex_pthread_acquire, + proc_mutex_pthread_tryacquire, + proc_mutex_pthread_timedacquire, + proc_mutex_pthread_release, + proc_mutex_pthread_cleanup, + proc_mutex_pthread_child_init, + proc_mutex_no_perms_set, + APR_LOCK_PROC_PTHREAD, + "pthread" +}; + +#if APR_USE_PROC_PTHREAD_MUTEX_COND +static apr_status_t proc_mutex_pthread_cond_create(apr_proc_mutex_t *new_mutex, + const char *fname) { apr_status_t rv; + pthread_condattr_t cattr; - mutex->curr_locked = 0; - if ((rv = pthread_mutex_unlock(mutex->pthread_interproc))) { + rv = proc_mutex_pthread_create(new_mutex, fname); + if (rv != APR_SUCCESS) { + return rv; + } + + if ((rv = pthread_condattr_init(&cattr))) { +#ifdef HAVE_ZOS_PTHREADS + rv = errno; +#endif + apr_pool_cleanup_run(new_mutex->pool, new_mutex, + apr_proc_mutex_cleanup); + return rv; + } + if ((rv = pthread_condattr_setpshared(&cattr, PTHREAD_PROCESS_SHARED))) { +#ifdef HAVE_ZOS_PTHREADS + rv = errno; +#endif + pthread_condattr_destroy(&cattr); + apr_pool_cleanup_run(new_mutex->pool, new_mutex, + apr_proc_mutex_cleanup); + return rv; + } + if ((rv = pthread_cond_init(&proc_pthread_mutex_cond(new_mutex), + &cattr))) { #ifdef HAVE_ZOS_PTHREADS rv = errno; #endif + pthread_condattr_destroy(&cattr); + apr_pool_cleanup_run(new_mutex->pool, new_mutex, + apr_proc_mutex_cleanup); return rv; } + pthread_condattr_destroy(&cattr); + + proc_pthread_mutex_cond_locked(new_mutex) = 0; + proc_pthread_mutex_cond_num_waiters(new_mutex) = 0; + return APR_SUCCESS; } -static const apr_proc_mutex_unix_lock_methods_t mutex_proc_pthread_methods = +static const apr_proc_mutex_unix_lock_methods_t mutex_proc_pthread_cond_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_cond_create, + proc_mutex_pthread_acquire, + proc_mutex_pthread_tryacquire, + proc_mutex_pthread_timedacquire, + proc_mutex_pthread_release, + proc_mutex_pthread_cleanup, + proc_mutex_pthread_child_init, + proc_mutex_no_perms_set, + APR_LOCK_PROC_PTHREAD, "pthread" }; +#endif #endif @@ -541,7 +1017,7 @@ 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 +1026,16 @@ 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 +1061,8 @@ 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 +1077,7 @@ 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 +1091,7 @@ 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 +1113,7 @@ 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 +1121,22 @@ 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) @@ -644,9 +1147,12 @@ proc_mutex_fcntl_create, proc_mutex_fcntl_acquire, proc_mutex_fcntl_tryacquire, + proc_mutex_spinsleep_timedacquire, proc_mutex_fcntl_release, proc_mutex_fcntl_cleanup, proc_mutex_no_child_init, + proc_mutex_fcntl_perms_set, + APR_LOCK_FCNTL, "fcntl" }; @@ -658,7 +1164,7 @@ 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 +1173,18 @@ 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 +1208,11 @@ 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 +1225,7 @@ 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 +1239,7 @@ 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 +1257,7 @@ 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 +1272,45 @@ 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) @@ -782,9 +1321,12 @@ proc_mutex_flock_create, proc_mutex_flock_acquire, proc_mutex_flock_tryacquire, + proc_mutex_spinsleep_timedacquire, proc_mutex_flock_release, proc_mutex_flock_cleanup, proc_mutex_flock_child_init, + proc_mutex_flock_perms_set, + APR_LOCK_FLOCK, "flock" }; @@ -801,55 +1343,169 @@ #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_TIMED: +#if APR_HAS_PROC_PTHREAD_SERIALIZE \ + && (APR_USE_PROC_PTHREAD_MUTEX_COND \ + || defined(HAVE_PTHREAD_MUTEX_TIMEDLOCK)) \ + && defined(HAVE_PTHREAD_MUTEX_ROBUST) +#if APR_USE_PROC_PTHREAD_MUTEX_COND + new_mutex->meth = &mutex_proc_pthread_cond_methods; +#else + new_mutex->meth = &mutex_proc_pthread_methods; +#endif + if (ospmutex) { + if (ospmutex->pthread_interproc == NULL) { + return APR_EINVAL; + } + new_mutex->os.pthread_interproc = ospmutex->pthread_interproc; + } + break; +#elif APR_HAS_SYSVSEM_SERIALIZE && defined(HAVE_SEMTIMEDOP) + new_mutex->meth = &mutex_sysv_methods; + if (ospmutex) { + if (ospmutex->crossproc == -1) { + return APR_EINVAL; + } + new_mutex->os.crossproc = ospmutex->crossproc; + } + break; +#elif APR_HAS_POSIXSEM_SERIALIZE && defined(HAVE_SEM_TIMEDWAIT) + new_mutex->meth = &mutex_posixsem_methods; + if (ospmutex) { + if (ospmutex->psem_interproc == NULL) { + return APR_EINVAL; + } + new_mutex->os.psem_interproc = ospmutex->psem_interproc; + } + break; +#endif + /* fall trough */ 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 +1521,10 @@ 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 +1533,11 @@ { 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; } @@ -925,6 +1580,16 @@ return mutex->meth->tryacquire(mutex); } +APR_DECLARE(apr_status_t) apr_proc_mutex_timedlock(apr_proc_mutex_t *mutex, + apr_interval_time_t timeout) +{ +#if APR_HAS_TIMEDLOCKS + return mutex->meth->timedacquire(mutex, timeout); +#else + return APR_ENOTIMPL; +#endif +} + APR_DECLARE(apr_status_t) apr_proc_mutex_unlock(apr_proc_mutex_t *mutex) { return mutex->meth->release(mutex); @@ -935,6 +1600,11 @@ 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 +1627,69 @@ 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); } Index: contrib/apr/locks/unix/thread_cond.c =================================================================== --- contrib/apr/locks/unix/thread_cond.c +++ contrib/apr/locks/unix/thread_cond.c @@ -79,21 +79,31 @@ apr_interval_time_t timeout) { apr_status_t rv; - apr_time_t then; - struct timespec abstime; + if (timeout < 0) { + rv = pthread_cond_wait(&cond->cond, &mutex->mutex); +#ifdef HAVE_ZOS_PTHREADS + if (rv) { + rv = errno; + } +#endif + } + else { + apr_time_t then; + struct timespec abstime; - then = apr_time_now() + timeout; - abstime.tv_sec = apr_time_sec(then); - abstime.tv_nsec = apr_time_usec(then) * 1000; /* nanoseconds */ + then = apr_time_now() + timeout; + abstime.tv_sec = apr_time_sec(then); + abstime.tv_nsec = apr_time_usec(then) * 1000; /* nanoseconds */ - rv = pthread_cond_timedwait(&cond->cond, &mutex->mutex, &abstime); + rv = pthread_cond_timedwait(&cond->cond, &mutex->mutex, &abstime); #ifdef HAVE_ZOS_PTHREADS - if (rv) { - rv = errno; - } + if (rv) { + rv = errno; + } #endif - if (ETIMEDOUT == rv) { - return APR_TIMEUP; + if (ETIMEDOUT == rv) { + return APR_TIMEUP; + } } return rv; } Index: contrib/apr/locks/unix/thread_mutex.c =================================================================== --- contrib/apr/locks/unix/thread_mutex.c +++ contrib/apr/locks/unix/thread_mutex.c @@ -77,6 +77,19 @@ return rv; } +#ifndef HAVE_PTHREAD_MUTEX_TIMEDLOCK + if (flags & APR_THREAD_MUTEX_TIMED) { + rv = apr_thread_cond_create(&new_mutex->cond, pool); + if (rv) { +#ifdef HAVE_ZOS_PTHREADS + rv = errno; +#endif + pthread_mutex_destroy(&new_mutex->mutex); + return rv; + } + } +#endif + apr_pool_cleanup_register(new_mutex->pool, new_mutex, thread_mutex_cleanup, apr_pool_cleanup_null); @@ -89,13 +102,45 @@ { apr_status_t rv; + if (mutex->cond) { + apr_status_t rv2; + + rv = pthread_mutex_lock(&mutex->mutex); + if (rv) { +#ifdef HAVE_ZOS_PTHREADS + rv = errno; +#endif + return rv; + } + + if (mutex->locked) { + mutex->num_waiters++; + rv = apr_thread_cond_wait(mutex->cond, mutex); + mutex->num_waiters--; + } + else { + mutex->locked = 1; + } + + rv2 = pthread_mutex_unlock(&mutex->mutex); + if (rv2 && !rv) { +#ifdef HAVE_ZOS_PTHREADS + rv = errno; +#else + rv = rv2; +#endif + } + + return rv; + } + rv = pthread_mutex_lock(&mutex->mutex); #ifdef HAVE_ZOS_PTHREADS if (rv) { rv = errno; } #endif - + return rv; } @@ -103,6 +148,36 @@ { apr_status_t rv; + if (mutex->cond) { + apr_status_t rv2; + + rv = pthread_mutex_lock(&mutex->mutex); + if (rv) { +#ifdef HAVE_ZOS_PTHREADS + rv = errno; +#endif + return rv; + } + + if (mutex->locked) { + rv = APR_EBUSY; + } + else { + mutex->locked = 1; + } + + rv2 = pthread_mutex_unlock(&mutex->mutex); + if (rv2) { +#ifdef HAVE_ZOS_PTHREADS + rv = errno; +#else + rv = rv2; +#endif + } + + return rv; + } + rv = pthread_mutex_trylock(&mutex->mutex); if (rv) { #ifdef HAVE_ZOS_PTHREADS @@ -114,10 +189,121 @@ return APR_SUCCESS; } +APR_DECLARE(apr_status_t) apr_thread_mutex_timedlock(apr_thread_mutex_t *mutex, + apr_interval_time_t timeout) +{ + apr_status_t rv = APR_ENOTIMPL; +#if APR_HAS_TIMEDLOCKS + +#ifdef HAVE_PTHREAD_MUTEX_TIMEDLOCK + if (timeout <= 0) { + rv = pthread_mutex_trylock(&mutex->mutex); + if (rv) { +#ifdef HAVE_ZOS_PTHREADS + rv = errno; +#endif + if (rv == EBUSY) { + rv = APR_TIMEUP; + } + } + } + else { + struct timespec abstime; + + timeout += apr_time_now(); + abstime.tv_sec = apr_time_sec(timeout); + abstime.tv_nsec = apr_time_usec(timeout) * 1000; /* nanoseconds */ + + rv = pthread_mutex_timedlock(&mutex->mutex, &abstime); + if (rv) { +#ifdef HAVE_ZOS_PTHREADS + rv = errno; +#endif + if (rv == ETIMEDOUT) { + rv = APR_TIMEUP; + } + } + } + +#else /* HAVE_PTHREAD_MUTEX_TIMEDLOCK */ + + if (mutex->cond) { + rv = pthread_mutex_lock(&mutex->mutex); + if (rv) { +#ifdef HAVE_ZOS_PTHREADS + rv = errno; +#endif + return rv; + } + + if (mutex->locked) { + if (timeout <= 0) { + rv = APR_TIMEUP; + } + else { + mutex->num_waiters++; + do { + rv = apr_thread_cond_timedwait(mutex->cond, mutex, + timeout); + if (rv) { +#ifdef HAVE_ZOS_PTHREADS + rv = errno; +#endif + break; + } + } while (mutex->locked); + mutex->num_waiters--; + } + if (rv) { + pthread_mutex_unlock(&mutex->mutex); + return rv; + } + } + + mutex->locked = 1; + + rv = pthread_mutex_unlock(&mutex->mutex); + if (rv) { +#ifdef HAVE_ZOS_PTHREADS + rv = errno; +#endif + return rv; + } + } + +#endif /* HAVE_PTHREAD_MUTEX_TIMEDLOCK */ + +#endif /* APR_HAS_TIMEDLOCKS */ + return rv; +} + APR_DECLARE(apr_status_t) apr_thread_mutex_unlock(apr_thread_mutex_t *mutex) { apr_status_t status; + if (mutex->cond) { + status = pthread_mutex_lock(&mutex->mutex); + if (status) { +#ifdef HAVE_ZOS_PTHREADS + status = errno; +#endif + return status; + } + + if (!mutex->locked) { + status = APR_EINVAL; + } + else if (mutex->num_waiters) { + status = apr_thread_cond_signal(mutex->cond); + } + if (status) { + pthread_mutex_unlock(&mutex->mutex); + return status; + } + + mutex->locked = 0; + } + status = pthread_mutex_unlock(&mutex->mutex); #ifdef HAVE_ZOS_PTHREADS if (status) { @@ -130,7 +316,17 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_destroy(apr_thread_mutex_t *mutex) { - return apr_pool_cleanup_run(mutex->pool, mutex, thread_mutex_cleanup); + apr_status_t rv, rv2 = APR_SUCCESS; + + if (mutex->cond) { + rv2 = apr_thread_cond_destroy(mutex->cond); + } + rv = apr_pool_cleanup_run(mutex->pool, mutex, thread_mutex_cleanup); + if (rv == APR_SUCCESS) { + rv = rv2; + } + + return rv; } APR_POOL_IMPLEMENT_ACCESSOR(thread_mutex) Index: contrib/apr/memory/unix/apr_pools.c =================================================================== --- contrib/apr/memory/unix/apr_pools.c +++ contrib/apr/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 /* 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 #endif +#if HAVE_VALGRIND +#include +#include + +#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 @@ #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 @@ 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(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 @@ 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(void) apr_allocator_max_free_set(apr_allocator_t *allocator, apr_size_t in_size) { - apr_uint32_t max_free_index; - apr_uint32_t size = (APR_UINT32_TRUNC_CAST)in_size; + apr_size_t max_free_index; + apr_size_t size = in_size; #if APR_HAS_THREADS apr_thread_mutex_t *mutex; @@ -209,22 +250,46 @@ #endif } +static APR_INLINE +apr_size_t allocator_align(apr_size_t in_size) +{ + apr_size_t size = in_size; + + /* Round up the block size to the next boundary, but always + * allocate at least a certain size (MIN_ALLOC). + */ + size = APR_ALIGN(size + APR_MEMNODE_T_SIZE, BOUNDARY_SIZE); + if (size < in_size) { + return 0; + } + if (size < MIN_ALLOC) { + size = MIN_ALLOC; + } + + return size; +} + +APR_DECLARE(apr_size_t) apr_allocator_align(apr_allocator_t *allocator, + apr_size_t size) +{ + (void)allocator; + return allocator_align(size); +} + static APR_INLINE apr_memnode_t *allocator_alloc(apr_allocator_t *allocator, apr_size_t in_size) { apr_memnode_t *node, **ref; - apr_uint32_t max_index; + apr_size_t max_index; apr_size_t size, i, index; /* Round up the block size to the next boundary, but always * allocate at least a certain size (MIN_ALLOC). */ - size = APR_ALIGN(in_size + APR_MEMNODE_T_SIZE, BOUNDARY_SIZE); - if (size < in_size) { + size = allocator_align(in_size); + if (!size) { return NULL; } - if (size < MIN_ALLOC) - size = MIN_ALLOC; /* Find the index for this node size by * dividing its size by the boundary size @@ -273,7 +338,7 @@ ref--; max_index--; } - while (*ref == NULL && max_index > 0); + while (*ref == NULL && max_index); allocator->max_index = max_index; } @@ -287,10 +352,7 @@ 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_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 @@ /* 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 @@ #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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ if (apr_pools_initialized++) return APR_SUCCESS; +#if HAVE_VALGRIND + apr_running_on_valgrind = RUNNING_ON_VALGRIND; +#endif + #if APR_ALLOCATOR_USES_MMAP && defined(_SC_PAGESIZE) boundary_size = sysconf(_SC_PAGESIZE); boundary_index = 12; @@ -661,6 +750,68 @@ /* Returns the amount of free space in the given node. */ #define node_free_space(node_) ((apr_size_t)(node_->endp - node_->first_avail)) +/* + * Helpers to mark pool as in-use/free. Used for finding thread-unsafe + * concurrent accesses from different threads. + */ +#if APR_POOL_CONCURRENCY_CHECK + +static const char * const in_use_string[] = { "idle", "in use", "destroyed" }; + +static void pool_concurrency_abort(apr_pool_t *pool, apr_uint32_t new, apr_uint32_t old) +{ + fprintf(stderr, "pool concurrency check: pool %p(%s), thread cur %lx " + "in use by %lx, state %s -> %s \n", + pool, pool->tag, (unsigned long)apr_os_thread_current(), + (unsigned long)pool->in_use_by, + in_use_string[old], in_use_string[new]); + abort(); +} + +static APR_INLINE void pool_concurrency_set_used(apr_pool_t *pool) +{ + apr_uint32_t old; + + old = apr_atomic_cas32(&pool->in_use, IN_USE, IDLE); + + if (old != IDLE) + pool_concurrency_abort(pool, IN_USE, old); + + pool->in_use_by = apr_os_thread_current(); +} + +static APR_INLINE void pool_concurrency_set_idle(apr_pool_t *pool) +{ + apr_uint32_t old; + + old = apr_atomic_cas32(&pool->in_use, IDLE, IN_USE); + + if (old != IN_USE) + pool_concurrency_abort(pool, IDLE, old); +} + +static APR_INLINE void pool_concurrency_init(apr_pool_t *pool) +{ + pool->in_use = IDLE; +} + +static APR_INLINE void pool_concurrency_set_destroyed(apr_pool_t *pool) +{ + apr_uint32_t old; + + old = apr_atomic_cas32(&pool->in_use, DESTROYED, IDLE); + + if (old != IDLE) + pool_concurrency_abort(pool, DESTROYED, old); + pool->in_use_by = apr_os_thread_current(); +} +#else +static APR_INLINE void pool_concurrency_init(apr_pool_t *pool) { } +static APR_INLINE void pool_concurrency_set_used(apr_pool_t *pool) { } +static APR_INLINE void pool_concurrency_set_idle(apr_pool_t *pool) { } +static APR_INLINE void pool_concurrency_set_destroyed(apr_pool_t *pool) { } +#endif /* APR_POOL_CONCURRENCY_CHECK */ + /* * Memory allocation */ @@ -671,8 +822,14 @@ 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 @@ 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 @@ } 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 @@ 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 @@ 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 @@ /* 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 @@ /* Run cleanups */ run_cleanups(&pool->cleanups); + + pool_concurrency_set_used(pool); pool->cleanups = NULL; pool->free_cleanups = NULL; @@ -786,13 +963,19 @@ 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 @@ /* 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 @@ /* Run cleanups */ run_cleanups(&pool->cleanups); + pool_concurrency_set_destroyed(pool); /* Free subprocesses */ free_proc_chain(pool->subprocesses); @@ -863,6 +1050,7 @@ 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 @@ 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 @@ pool->ref = NULL; } + pool_concurrency_init(pool); + *newpool = pool; return APR_SUCCESS; @@ -1010,6 +1215,8 @@ #endif /* defined(NETWARE) */ if (!allocator) pool_allocator->owner = pool; + + pool_concurrency_init(pool); *newpool = pool; return APR_SUCCESS; @@ -1079,7 +1286,7 @@ 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 @@ 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 @@ 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_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 @@ */ 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 @@ /* * 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ *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 @@ { void **pmem = (void **)data; debug_node_t *node; - apr_uint32_t index; + apr_size_t index; node = pool->nodes; @@ -1986,7 +2263,7 @@ { apr_size_t *psize = (apr_size_t *)data; debug_node_t *node; - apr_uint32_t index; + apr_size_t index; node = pool->nodes; Index: contrib/apr/misc/unix/errorcodes.c =================================================================== --- contrib/apr/misc/unix/errorcodes.c +++ contrib/apr/misc/unix/errorcodes.c @@ -369,7 +369,7 @@ /* 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) Index: contrib/apr/misc/unix/rand.c =================================================================== --- contrib/apr/misc/unix/rand.c +++ contrib/apr/misc/unix/rand.c @@ -43,6 +43,31 @@ #include #endif +#if defined(SYS_RANDOM) +#if defined(HAVE_SYS_RANDOM_H) && \ + defined(HAVE_GETRANDOM) + +#include +#define USE_GETRANDOM + +#elif defined(HAVE_SYS_SYSCALL_H) && \ + defined(HAVE_LINUX_RANDOM_H) && \ + defined(HAVE_DECL_SYS_GETRANDOM) && \ + HAVE_DECL_SYS_GETRANDOM + +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif +#include +#include +#include +#define getrandom(buf, buflen, flags) \ + syscall(SYS_getrandom, (buf), (buflen), (flags)) +#define USE_GETRANDOM + +#endif /* HAVE_SYS_RANDOM_H */ +#endif /* SYS_RANDOM */ + #ifndef SHUT_RDWR #define SHUT_RDWR 2 #endif @@ -87,48 +112,7 @@ APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char *buf, apr_size_t length) { -#ifdef DEV_RANDOM - - int fd = -1; - - /* On BSD/OS 4.1, /dev/random gives out 8 bytes at a time, then - * gives EOF, so reading 'length' bytes may require opening the - * device several times. */ - do { - apr_ssize_t rc; - - if (fd == -1) - if ((fd = open(DEV_RANDOM, O_RDONLY)) == -1) - return errno; - - do { - rc = read(fd, buf, length); - } while (rc == -1 && errno == EINTR); - - if (rc < 0) { - int errnum = errno; - close(fd); - return errnum; - } - else if (rc == 0) { - close(fd); - fd = -1; /* force open() again */ - } - else { - buf += rc; - length -= rc; - } - } while (length > 0); - - close(fd); -#elif defined(OS2) - static UCHAR randbyte(); - unsigned int idx; - - for (idx=0; idx 0); + +#elif defined(SYS_RANDOM) && defined(HAVE_ARC4RANDOM_BUF) + + arc4random_buf(buf, length); + +#elif defined(DEV_RANDOM) + + int fd = -1; + + /* On BSD/OS 4.1, /dev/random gives out 8 bytes at a time, then + * gives EOF, so reading 'length' bytes may require opening the + * device several times. */ + do { + apr_ssize_t rc; + + if (fd == -1) + if ((fd = open(DEV_RANDOM, O_RDONLY)) == -1) + return errno; + + do { + rc = read(fd, buf, length); + } while (rc == -1 && errno == EINTR); + + if (rc < 0) { + int errnum = errno; + close(fd); + return errnum; + } + else if (rc == 0) { + close(fd); + fd = -1; /* force open() again */ + } + else { + buf += rc; + length -= rc; + } + } while (length > 0); + + close(fd); + +#elif defined(OS2) + + static UCHAR randbyte(); + unsigned int idx; + + for (idx=0; idxifa_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; Index: contrib/apr/network_io/unix/sockaddr.c =================================================================== --- contrib/apr/network_io/unix/sockaddr.c +++ contrib/apr/network_io/unix/sockaddr.c @@ -25,6 +25,14 @@ #include #endif +#ifdef HAVE_NET_IF_H +#include +#endif + +#if defined(HAVE_IF_INDEXTONAME) && defined(_MSC_VER) +#include "arch/win32/apr_arch_misc.h" +#endif + #define APR_WANT_STRFUNC #include "apr_want.h" @@ -125,9 +133,31 @@ memmove(buf, buf + strlen("::ffff:"), strlen(buf + strlen("::ffff:"))+1); } -#endif + /* ensure NUL termination if the buffer is too short */ buf[buflen-1] = '\0'; + +#ifdef HAVE_IF_INDEXTONAME + /* Append scope name for link-local addresses. */ + if (sockaddr->family == AF_INET6 + && IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)sockaddr->ipaddr_ptr)) { + char scbuf[IF_NAMESIZE], *p = buf + strlen(buf); + + if (if_indextoname(sockaddr->sa.sin6.sin6_scope_id, scbuf) == scbuf) { + /* Space check, need room for buf + '%' + scope + '\0'. + * Assert: buflen >= strlen(buf) + strlen(scbuf) + 2 + * Equiv: buflen >= (p-buf) + strlen(buf) + 2 + * Thus, fail in inverse condition: */ + if (buflen < strlen(scbuf) + (p - buf) + 2) { + return APR_ENOSPC; + } + *p++ = '%'; + memcpy(p, scbuf, strlen(scbuf) + 1); + } + } +#endif /* HAVE_IF_INDEXTONAME */ +#endif /* APR_HAVE_IPV6 */ + return APR_SUCCESS; } @@ -167,6 +197,14 @@ addr->ipaddr_len = sizeof(struct in6_addr); } #endif +#if APR_HAVE_SOCKADDR_UN + else if (family == APR_UNIX) { + addr->salen = sizeof(struct sockaddr_un); + addr->addr_str_len = sizeof(addr->sa.unx.sun_path);; + addr->ipaddr_ptr = &(addr->sa.unx.sun_path); + addr->ipaddr_len = addr->addr_str_len; + } +#endif } APR_DECLARE(apr_status_t) apr_socket_addr_get(apr_sockaddr_t **sa, @@ -269,19 +307,13 @@ return APR_EINVAL; } addrlen = scope_delim - str - 1; - *scope_id = apr_palloc(p, end_bracket - scope_delim); - memcpy(*scope_id, scope_delim + 1, end_bracket - scope_delim - 1); - (*scope_id)[end_bracket - scope_delim - 1] = '\0'; + *scope_id = apr_pstrmemdup(p, scope_delim + 1, end_bracket - scope_delim - 1); } else { addrlen = addrlen - 2; /* minus 2 for '[' and ']' */ } - *addr = apr_palloc(p, addrlen + 1); - memcpy(*addr, - str + 1, - addrlen); - (*addr)[addrlen] = '\0'; + *addr = apr_pstrmemdup(p, str + 1, addrlen); if (apr_inet_pton(AF_INET6, *addr, &ipaddr) != 1) { *addr = NULL; *scope_id = NULL; @@ -295,9 +327,7 @@ /* XXX If '%' is not a valid char in a DNS name, we *could* check * for bogus scope ids first. */ - *addr = apr_palloc(p, addrlen + 1); - memcpy(*addr, str, addrlen); - (*addr)[addrlen] = '\0'; + *addr = apr_pstrmemdup(p, str, addrlen); } return APR_SUCCESS; } @@ -622,6 +652,33 @@ } #endif } + if (family == APR_UNSPEC && hostname && *hostname == '/') { + family = APR_UNIX; + } + if (family == APR_UNIX) { +#if APR_HAVE_SOCKADDR_UN + if (hostname && *hostname == '/') { + *sa = apr_pcalloc(p, sizeof(apr_sockaddr_t)); + (*sa)->pool = p; + apr_cpystrn((*sa)->sa.unx.sun_path, hostname, + sizeof((*sa)->sa.unx.sun_path)); + (*sa)->hostname = apr_pstrdup(p, hostname); + (*sa)->family = APR_UNIX; + (*sa)->sa.unx.sun_family = APR_UNIX; + (*sa)->salen = sizeof(struct sockaddr_un); + (*sa)->addr_str_len = sizeof((*sa)->sa.unx.sun_path); + (*sa)->ipaddr_ptr = &((*sa)->sa.unx.sun_path); + (*sa)->ipaddr_len = (*sa)->addr_str_len; + + return APR_SUCCESS; + } + else +#endif + { + *sa = NULL; + return APR_ENOTIMPL; + } + } #if !APR_HAVE_IPV6 /* What may happen is that APR is not IPv6-enabled, but we're still * going to call getaddrinfo(), so we have to tell the OS we only @@ -636,6 +693,42 @@ return find_addresses(sa, hostname, family, port, flags, p); } +APR_DECLARE(apr_status_t) apr_sockaddr_info_copy(apr_sockaddr_t **dst, + const apr_sockaddr_t *src, + apr_pool_t *p) +{ + apr_sockaddr_t *d; + const apr_sockaddr_t *s; + + for (*dst = d = NULL, s = src; s; s = s->next) { + if (!d) { + *dst = d = apr_pmemdup(p, s, sizeof *s); + } + else { + d = d->next = apr_pmemdup(p, s, sizeof *s); + } + if (s->hostname) { + if (s == src || s->hostname != src->hostname) { + d->hostname = apr_pstrdup(p, s->hostname); + } + else { + d->hostname = (*dst)->hostname; + } + } + if (s->servname) { + if (s == src || s->servname != src->servname) { + d->servname = apr_pstrdup(p, s->servname); + } + else { + d->servname = (*dst)->servname; + } + } + d->pool = p; + apr_sockaddr_vars_set(d, s->family, s->port); + } + return APR_SUCCESS; +} + APR_DECLARE(apr_status_t) apr_getnameinfo(char **hostname, apr_sockaddr_t *sockaddr, apr_int32_t flags) @@ -674,6 +767,12 @@ tmphostname, sizeof(tmphostname), NULL, 0, flags != 0 ? flags : NI_NAMEREQD); } +#if APR_HAVE_SOCKADDR_UN + else if (sockaddr->family == APR_UNIX) { + *hostname = sockaddr->hostname; + return APR_SUCCESS; + } +#endif else #endif rc = getnameinfo((const struct sockaddr *)&sockaddr->sa, sockaddr->salen, @@ -831,11 +930,19 @@ &((struct in6_addr *)(b)->ipaddr_ptr)->s6_addr[12], \ (a)->ipaddr_len)) +#if APR_HAVE_IPV6 +#define SCOPE_OR_ZERO(sa_) ((sa_)->family != AF_INET6 ? 0 : \ + ((sa_)->sa.sin6.sin6_scope_id)) +#else +#define SCOPE_OR_ZERO(sa_) (0) +#endif + APR_DECLARE(int) apr_sockaddr_equal(const apr_sockaddr_t *addr1, const apr_sockaddr_t *addr2) { - if (addr1->ipaddr_len == addr2->ipaddr_len && - !memcmp(addr1->ipaddr_ptr, addr2->ipaddr_ptr, addr1->ipaddr_len)) { + if (addr1->ipaddr_len == addr2->ipaddr_len + && !memcmp(addr1->ipaddr_ptr, addr2->ipaddr_ptr, addr1->ipaddr_len) + && SCOPE_OR_ZERO(addr1) == SCOPE_OR_ZERO(addr2)) { return 1; } #if APR_HAVE_IPV6 @@ -985,6 +1092,10 @@ static int looks_like_ip(const char *ipstr) { + if (strlen(ipstr) == 0) { + return 0; + } + if (strchr(ipstr, ':')) { /* definitely not a hostname; assume it is intended to be an IPv6 address */ return 1; @@ -1110,3 +1221,64 @@ #endif /* APR_HAVE_IPV6 */ return 0; /* no match */ } + +APR_DECLARE(apr_status_t) apr_sockaddr_zone_set(apr_sockaddr_t *sa, + const char *zone_id) +{ +#if !APR_HAVE_IPV6 || !defined(HAVE_IF_NAMETOINDEX) + return APR_ENOTIMPL; +#else + unsigned int idx; + + if (sa->family != APR_INET6 + || !IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)sa->ipaddr_ptr)) { + return APR_EBADIP; + } + + idx = if_nametoindex(zone_id); + if (idx) { + sa->sa.sin6.sin6_scope_id = idx; + return APR_SUCCESS; + } + + if (errno != ENODEV) { + return errno; + } + else { + char *endptr; + apr_int64_t i = apr_strtoi64(zone_id, &endptr, 10); + + if (*endptr != '\0' || errno || i < 1 || i > APR_INT16_MAX) { + return APR_EGENERAL; + } + + sa->sa.sin6.sin6_scope_id = (unsigned int) i; + return APR_SUCCESS; + } +#endif +} + +APR_DECLARE(apr_status_t) apr_sockaddr_zone_get(const apr_sockaddr_t *sa, + const char **name, + apr_uint32_t *id, + apr_pool_t *p) +{ +#if !APR_HAVE_IPV6 || !defined(HAVE_IF_INDEXTONAME) + return APR_ENOTIMPL; +#else + if (sa->family != APR_INET6 || !sa->sa.sin6.sin6_scope_id) { + return APR_EBADIP; + } + + if (name) { + char *buf = apr_palloc(p, IF_NAMESIZE); + if (if_indextoname(sa->sa.sin6.sin6_scope_id, buf) == NULL) + return errno; + *name = buf; + } + + if (id) *id = sa->sa.sin6.sin6_scope_id; + + return APR_SUCCESS; +#endif +} Index: contrib/apr/network_io/unix/sockets.c =================================================================== --- contrib/apr/network_io/unix/sockets.c +++ contrib/apr/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_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 @@ 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 @@ 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 @@ 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 @@ (*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 @@ else { sock->local_addr = sa; /* XXX IPv6 - this assumes sin_port and sin6_port at same offset */ +#if APR_HAVE_SOCKADDR_UN + if (sock->local_addr->family == APR_UNIX) { + sock->bound = 1; + sock->local_port_unknown = 1; + } + else +#endif if (sock->local_addr->sa.sin.sin_port == 0) { /* no need for ntohs() when comparing w/ 0 */ sock->local_port_unknown = 1; /* kernel got us an ephemeral port */ } @@ -281,6 +318,14 @@ else if (sock->local_addr->sa.sin.sin_family == AF_INET6) { (*new)->local_addr->ipaddr_ptr = &(*new)->local_addr->sa.sin6.sin6_addr; } +#endif +#if APR_HAVE_SOCKADDR_UN + else if (sock->local_addr->sa.sin.sin_family == AF_UNIX) { + *(*new)->remote_addr = *sock->local_addr; + (*new)->local_addr->ipaddr_ptr = &((*new)->local_addr->sa.unx.sun_path); + (*new)->remote_addr->ipaddr_ptr = &((*new)->remote_addr->sa.unx.sun_path); + } + if (sock->local_addr->sa.sin.sin_family != AF_UNIX) #endif (*new)->remote_addr->port = ntohs((*new)->remote_addr->sa.sin.sin_port); if (sock->local_port_unknown) { @@ -375,7 +420,6 @@ #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 @@ /* 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)) { Index: contrib/apr/network_io/unix/sockopt.c =================================================================== --- contrib/apr/network_io/unix/sockopt.c +++ contrib/apr/network_io/unix/sockopt.c @@ -328,6 +328,20 @@ apr_set_option(sock, APR_IPV6_V6ONLY, on); #else return APR_ENOTIMPL; +#endif + break; + case APR_SO_FREEBIND: +#if defined(IP_FREEBIND) + if (setsockopt(sock->socketdes, SOL_IP, IP_FREEBIND, + (void *)&one, sizeof(int)) == -1) { + return errno; + } + apr_set_option(sock, APR_SO_FREEBIND, on); +#elif 0 /* defined(IP_BINDANY) ... */ + /* TODO: insert FreeBSD support here, note family specific + * options, IP_BINDANY vs IPV6_BINDANY */ +#else + return APR_ENOTIMPL; #endif break; default: @@ -428,3 +442,24 @@ 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 +} Index: contrib/apr/poll/unix/epoll.c =================================================================== --- contrib/apr/poll/unix/epoll.c +++ contrib/apr/poll/unix/epoll.c @@ -157,7 +157,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ "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 @@ 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_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 @@ 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 @@ 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 @@ 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 */ Index: contrib/apr/poll/unix/kqueue.c =================================================================== --- contrib/apr/poll/unix/kqueue.c +++ contrib/apr/poll/unix/kqueue.c @@ -254,10 +254,11 @@ 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 @@ 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 @@ 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 @@ } } - pollset_lock_rings(); /* Shift all PFDs in the Dead Ring to the Free Ring */ @@ -314,7 +316,7 @@ 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 @@ "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 @@ } 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 @@ 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 @@ 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 */ Index: contrib/apr/poll/unix/poll.c =================================================================== --- contrib/apr/poll/unix/poll.c +++ contrib/apr/poll/unix/poll.c @@ -241,10 +241,11 @@ 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 @@ } ret = poll(pollset->p->pollset, pollset->nelts, timeout); #endif - (*num) = ret; if (ret < 0) { return apr_get_netos_error(); } @@ -279,8 +279,8 @@ 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 @@ } } } - 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 @@ "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 @@ 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 @@ 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 */ Index: contrib/apr/poll/unix/pollcb.c =================================================================== --- contrib/apr/poll/unix/pollcb.c +++ contrib/apr/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 @@ 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_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 @@ } } + 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 @@ 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 @@ { 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; +} Index: contrib/apr/poll/unix/pollset.c =================================================================== --- contrib/apr/poll/unix/pollset.c +++ contrib/apr/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 @@ (*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_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 @@ } 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_poll_method_defname() { - apr_pollset_provider_t *provider = NULL; + const apr_pollset_provider_t *provider = NULL; provider = pollset_provider(pollset_default_method); if (provider) Index: contrib/apr/poll/unix/port.c =================================================================== --- contrib/apr/poll/unix/port.c +++ contrib/apr/poll/unix/port.c @@ -354,12 +354,13 @@ const apr_pollfd_t **descriptors) { apr_os_sock_t fd; - int ret, i, j; - unsigned int nget; + int ret; + unsigned int nget, i; + apr_int32_t j; pfd_elem_t *ep; apr_status_t rv = APR_SUCCESS; - apr_pollfd_t fp; + *num = 0; nget = 1; pollset_lock_rings(); @@ -403,49 +404,40 @@ port_associate within apr_pollset_add() */ apr_atomic_dec32(&pollset->p->waiting); - (*num) = nget; - if (nget) { - - pollset_lock_rings(); + pollset_lock_rings(); - for (i = 0, j = 0; i < nget; i++) { - fp = (((pfd_elem_t*)(pollset->p->port_set[i].portev_user))->pfd); - if ((pollset->flags & APR_POLLSET_WAKEABLE) && - fp.desc_type == APR_POLL_FILE && - fp.desc.f == pollset->wakeup_pipe[0]) { - apr_pollset_drain_wakeup_pipe(pollset); - rv = APR_EINTR; - } - else { - pollset->p->result_set[j] = fp; - pollset->p->result_set[j].rtnevents = - get_revent(pollset->p->port_set[i].portev_events); - - /* If the ring element is still on the query ring, move it - * to the add ring for re-association with the event port - * later. (It may have already been moved to the dead ring - * by a call to pollset_remove on another thread.) - */ - ep = (pfd_elem_t *)pollset->p->port_set[i].portev_user; - if (ep->on_query_ring) { - APR_RING_REMOVE(ep, link); - ep->on_query_ring = 0; - APR_RING_INSERT_TAIL(&(pollset->p->add_ring), ep, - pfd_elem_t, link); - } - j++; - } + for (i = 0, j = 0; i < nget; i++) { + ep = (pfd_elem_t *)pollset->p->port_set[i].portev_user; + if ((pollset->flags & APR_POLLSET_WAKEABLE) && + ep->pfd.desc_type == APR_POLL_FILE && + ep->pfd.desc.f == pollset->wakeup_pipe[0]) { + apr_poll_drain_wakeup_pipe(pollset->wakeup_pipe); + rv = APR_EINTR; } - pollset_unlock_rings(); - if ((*num = j)) { /* any event besides wakeup pipe? */ - rv = APR_SUCCESS; - if (descriptors) { - *descriptors = pollset->p->result_set; - } + else { + pollset->p->result_set[j] = ep->pfd; + pollset->p->result_set[j].rtnevents = + get_revent(pollset->p->port_set[i].portev_events); + j++; + } + /* If the ring element is still on the query ring, move it + * to the add ring for re-association with the event port + * later. (It may have already been moved to the dead ring + * by a call to pollset_remove on another thread.) + */ + if (ep->on_query_ring) { + APR_RING_REMOVE(ep, link); + ep->on_query_ring = 0; + APR_RING_INSERT_TAIL(&(pollset->p->add_ring), ep, + pfd_elem_t, link); + } + } + if ((*num = j)) { /* any event besides wakeup pipe? */ + rv = APR_SUCCESS; + if (descriptors) { + *descriptors = pollset->p->result_set; } } - - pollset_lock_rings(); /* Shift all PFDs in the Dead Ring to the Free Ring */ APR_RING_CONCAT(&(pollset->p->free_ring), &(pollset->p->dead_ring), pfd_elem_t, link); @@ -455,7 +447,7 @@ return rv; } -static apr_pollset_provider_t impl = { +static const apr_pollset_provider_t impl = { impl_pollset_create, impl_pollset_add, impl_pollset_remove, @@ -464,11 +456,10 @@ "port" }; -apr_pollset_provider_t *apr_pollset_provider_port = &impl; +const apr_pollset_provider_t *apr_pollset_provider_port = &impl; -static apr_status_t cb_cleanup(void *p_) +static apr_status_t impl_pollcb_cleanup(apr_pollcb_t *pollcb) { - apr_pollcb_t *pollcb = (apr_pollcb_t *) p_; close(pollcb->fd); return APR_SUCCESS; } @@ -505,7 +496,6 @@ } pollcb->pollset.port = apr_palloc(p, size * sizeof(port_event_t)); - apr_pool_cleanup_register(p, pollcb, cb_cleanup, apr_pool_cleanup_null); return APR_SUCCESS; } @@ -558,16 +548,25 @@ apr_pollcb_cb_t func, void *baton) { - apr_pollfd_t *pollfd; apr_status_t rv; - unsigned int i, nget = 1; + unsigned int nget = 1; rv = call_port_getn(pollcb->fd, pollcb->pollset.port, pollcb->nalloc, &nget, timeout); if (nget) { + unsigned int i; + for (i = 0; i < nget; i++) { - pollfd = (apr_pollfd_t *)(pollcb->pollset.port[i].portev_user); + apr_pollfd_t *pollfd = (apr_pollfd_t *)(pollcb->pollset.port[i].portev_user); + + if ((pollcb->flags & APR_POLLSET_WAKEABLE) && + pollfd->desc_type == APR_POLL_FILE && + pollfd->desc.f == pollcb->wakeup_pipe[0]) { + apr_poll_drain_wakeup_pipe(pollcb->wakeup_pipe); + return APR_EINTR; + } + pollfd->rtnevents = get_revent(pollcb->pollset.port[i].portev_events); rv = func(baton, pollfd); @@ -581,14 +580,15 @@ 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 */ Index: contrib/apr/poll/unix/select.c =================================================================== --- contrib/apr/poll/unix/select.c +++ contrib/apr/poll/unix/select.c @@ -347,13 +347,14 @@ 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 @@ rs = select(pollset->p->maxfd + 1, &readset, &writeset, &exceptset, tvptr); - (*num) = rs; if (rs < 0) { return apr_get_netos_error(); } @@ -401,7 +401,7 @@ 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 @@ 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 @@ "select" }; -apr_pollset_provider_t *apr_pollset_provider_select = &impl; +const apr_pollset_provider_t *apr_pollset_provider_select = &impl; Index: contrib/apr/poll/unix/wakeup.c =================================================================== --- /dev/null +++ contrib/apr/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; + } +} Index: contrib/apr/poll/unix/z_asio.c =================================================================== --- contrib/apr/poll/unix/z_asio.c +++ contrib/apr/poll/unix/z_asio.c @@ -247,9 +247,11 @@ 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 @@ 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 @@ 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 @@ 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 @@ "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 */ Index: contrib/apr/shmem/unix/shm.c =================================================================== --- contrib/apr/shmem/unix/shm.c +++ contrib/apr/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 @@ #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 @@ 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 @@ /* 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 @@ #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_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 @@ 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 @@ 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, Index: contrib/apr/strings/apr_cpystrn.c =================================================================== --- contrib/apr/strings/apr_cpystrn.c +++ contrib/apr/strings/apr_cpystrn.c @@ -235,6 +235,8 @@ size_t len = strlen(str) + 1; sdup = (char *) malloc(len); + if (sdup == NULL) + return NULL; memcpy(sdup, str, len); return sdup; Index: contrib/apr/strings/apr_cstr.c =================================================================== --- /dev/null +++ contrib/apr/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; + } +} Index: contrib/apr/strings/apr_fnmatch.c =================================================================== --- contrib/apr/strings/apr_fnmatch.c +++ contrib/apr/strings/apr_fnmatch.c @@ -462,7 +462,7 @@ path = "."; } else { - path = apr_pstrndup(p, pattern, idx - pattern); + path = apr_pstrmemdup(p, pattern, idx - pattern); pattern = idx + 1; } Index: contrib/apr/strings/apr_snprintf.c =================================================================== --- contrib/apr/strings/apr_snprintf.c +++ contrib/apr/strings/apr_snprintf.c @@ -100,7 +100,6 @@ arg = -arg; } arg = modf(arg, &fi); - p1 = &buf[NDIG]; /* * Do integer part */ @@ -1328,7 +1327,7 @@ */ if (print_something == YES) { for (i = s_len; i != 0; i--) { - INS_CHAR(*s, sp, bep, cc); + INS_CHAR(*s, sp, bep, cc); s++; } } Index: contrib/apr/tables/apr_skiplist.c =================================================================== --- contrib/apr/tables/apr_skiplist.c +++ contrib/apr/tables/apr_skiplist.c @@ -200,7 +200,7 @@ 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 @@ } 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 @@ } 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 @@ 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 @@ 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 @@ 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 @@ */ 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 @@ 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 @@ 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 @@ } #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 @@ 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 @@ 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 @@ 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 @@ } 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 @@ } do { u = m->up; - skiplist_free_node(sl, m); + skiplist_put_node(sl, m); m = u; } while (m); m = p; @@ -674,6 +785,26 @@ 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); Index: contrib/apr/tables/apr_tables.c =================================================================== --- contrib/apr/tables/apr_tables.c +++ contrib/apr/tables/apr_tables.c @@ -1103,6 +1103,10 @@ int i; int dups_found; + if (flags == APR_OVERLAP_TABLES_ADD) { + return; + } + if (t->a.nelts <= 1) { return; } Index: contrib/apr/threadproc/unix/proc.c =================================================================== --- contrib/apr/threadproc/unix/proc.c +++ contrib/apr/threadproc/unix/proc.c @@ -461,7 +461,19 @@ _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 @@ } #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; +} Index: contrib/apr/threadproc/unix/signals.c =================================================================== --- contrib/apr/threadproc/unix/signals.c +++ contrib/apr/threadproc/unix/signals.c @@ -307,13 +307,7 @@ /* the rest of the signals removed from the mask in this function * absolutely must be removed; you cannot block synchronous signals * (requirement of pthreads API) - * - * SIGUSR2 is being removed from the mask for the convenience of - * Purify users (Solaris, HP-UX, SGI) since Purify uses SIGUSR2 */ -#ifdef SIGUSR2 - sigdelset(sig_mask, SIGUSR2); -#endif } APR_DECLARE(apr_status_t) apr_signal_thread(int(*signal_handler)(int signum)) Index: contrib/apr/tools/gen_test_char.c =================================================================== --- contrib/apr/tools/gen_test_char.c +++ contrib/apr/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 @@ "#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 @@ 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 @@ 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) ? ',' : ' '); } Index: contrib/subversion/CHANGES =================================================================== --- contrib/subversion/CHANGES +++ contrib/subversion/CHANGES @@ -1,5 +1,131 @@ +Version 1.10.6 +(24 Jul 2019, from /branches/1.10.x) +https://svn.apache.org/repos/asf/subversion/tags/1.10.6 + + User-visible changes: + * Allow the use of empty groups in authz rules. (r1854883) + * Fix conflict resolver case with move vs move conflicts. (r1863297) + * Fix #4760: Missing children in svnadmin dump --include/exclude. (r1863298) + * Fix #4793: authz rights from inverted access selectors. (r1854882) + * Fix conflict resolver bug: local and incoming edits swapped. (r1863300) + * Fix #4806: Remove on-disk trees with read-only dirs. (r1863299) + * Fix memory lifetime problem in a libsvn_wc error code path. (r1863302) + * No tree conflict when 'svn up' deletes unmodified dir with unversioned items. (r1863296) + * Remove a useless common ancestor search from conflict resolver. (r1863294) + + Developer-visible changes: + * Allow generating Visual Studio 2019 projects (r1863304) + * Fix a use-after-free in mod_dav_svn's logging of FS warnings. (r1863292) + * Fix "unused static function" warning in release-mode builds. (r1854884) + * Fix build with APR 1.7.0. (r1863303) + * Fix issue #4804: spurious SQLite-related test failures. (r1863295) + * Allow svnserve's 'get-deleted-rev' API to return 'not deleted'. (r1863305) + * Silence a deprecation warning from amalgamated SQLite on macOS. (r1863291) + + +Version 1.10.5 +(Not released; see changes for 1.10.6.) + + +Version 1.10.4 +(11 Jan 2019, from /branches/1.10.x) +http://svn.apache.org/repos/asf/subversion/tags/1.10.4 + + User-visible changes: + - Minor new features and improvements: + * Conflict resolver support for added vs unversioned file (r1845577) + * Conflict resolver support for unversioned directories (r1846299) + + - Client-side bugfixes: + * Fix: repos-to-WC copy with --parents doesn't create dirs (#4768) + * Fix: foreign repo copy with peg/operative revisions (#4785) + * Fix: foreign repo copy of file adding mergeinfo (#4792) + * Fix: assertion failure using -rPREV on a working copy at r0 (#4532) + * Fix: tree conflict message ends a sentence with a colon (#4717) + + - Server-side bugfixes: + * Fix CVE-2018-11803: malicious SVN clients can crash mod_dav_svn + * Fix: unexpected SVN_ERR_FS_NOT_DIRECTORY errors (#4791) + * Fix: mod_dav_svn's SVNUseUTF8 had no effect in some setups (r1844882) + * Fix crash in mod_http2 (#4782) + + - Other tool improvements and bugfixes: + * svndumpfilter: Clarify error messages by including node path (r1845261) + + - Bindings bugfixes: + * JavaHL: Fix crash in client code when using external diff (r1845408) + + Developer-visible changes: + - General: + * Fix build on systems without python in $PATH (r1845555) + + - API changes: + (none) + + +Version 1.10.3 +(10 Oct 2018, from /branches/1.10.x) +http://svn.apache.org/repos/asf/subversion/tags/1.10.3 + + User-visible changes: + - Minor new features and improvements: + * Store the HTTPS client cert password (r1842578) + + - Client-side bugfixes: + * Fix shelving when custom diff command is configured (issue #4758) + * Fix conflict resolver crashes (issue #4744, r1842581, r1842582, r1842583) + * Fix conflict resolver endless scan in some cases (r1842586) + * Fix "Accept incoming deletion" on locally deleted file (issue #4739) + * Fix "resolver adds unrelated moves to move target list" (issue #4766) + + - Server-side bugfixes: + * Reject bad PUT before CHECKOUT in v1 HTTP protocol (r1841281) + * Let 'svnadmin recover' prune the rep-cache even if disabled (r1842585) + + - Client-side and server-side bugfixes: + * Allow commands like 'svn ci --file X' to work when X is a FIFO (r1841282) + + - Other tool improvements and bugfixes: + * 'svnadmin verify --keep-going --quiet' shows an error summary (r1842584) + * Fix error in german translation for 'svn help merge' (r1837038) + + Developer-visible changes: + - General: + * Python tests use the current python executable (r1842626) + + +Version 1.10.2 +(20 Jul 2018, from /branches/1.10.x) +http://svn.apache.org/repos/asf/subversion/tags/1.10.2 + + User-visible changes: + - Client-side bugfixes: + * Correctly claim to offer Gnome Keyring support with libsecret (r1831142) + * Fix segfault using Gnome Keyring with libsecret (r1835782) + * Fix JavaHL local refs capacity warning when unparsing externals (r1831143) + * Since on Windows Subversion does not handle symlinks, never check for reparse points (r1835701) + * Prune externals after 'update --set-depth=exclude' (r1835702) + * Fix issue #4740, "conflict resolver searches too far back ..." (r1835703) + - Server-side bugfixes: + * Fix regression issue #4741: authz group refers to multiple groups (r1831220) + + Developer-visible changes: + - General: + * Regression test and FSFS checksum test, part of issue #4722 (r1828043) + * Explicit error on configure --without-lz4 or --without-utf8proc (r1831604) + * configure.ac: Fix regression relating to path to 'rdoc' (r1833486) + * Ensure consistent use of $PYTHON during build and test (r1833487) + * Fix libsvn_auth_gnome_keyring.pc when built using libsecret (r1835781) + - Bindings: + * Fix regression in use of pre-generated Swig bindings in release builds (r1833488) + + +Version 1.10.1 +(Not released; see changes for 1.10.2.) + + Version 1.10.0 -(?? ??? 2018, from /branches/1.10.x) +(13 Apr 2018, from /branches/1.10.x) http://svn.apache.org/repos/asf/subversion/tags/1.10.0 See the 1.10 release notes for a more verbose overview of the changes since @@ -8,7 +134,7 @@ User-visible changes: - Major new features: * Better interactive conflict resolution for tree conflicts (r1687489 et al) - * Wilcards and improved performance in path-based authorization (r1776832) + * Wildcards and improved performance in path-based authorization (r1776832) * New experimental 'svn shelve' command (issue #3625) - Minor new features and improvements: * svnbench: Show time taken & bytes transferred (r1703383, r1710586) @@ -29,7 +155,7 @@ * ra_serf: Adjustments for serf versions with HTTP/2 support (r1716400) * ra_serf: Send svndiff1 deltas during commit (r1704317, r1704613, r1791290) * ra_serf: Stream svndiff deltas w/o creating temporary files (r1803143 et al) - * ra_serf: Don't necessarily request full MERGE reponses (r1806017 et al) + * ra_serf: Don't necessarily request full MERGE responses (r1806017 et al) * 'svn patch': Parse binary diffs in git-style patches (r1703925) * 'svnadmin info' now reports latest revision in the repository (r1697953) * ra_svn: Various performance-related tweaks (r1694490) @@ -286,6 +412,102 @@ * Ruby: Detect versions up to 2.4 (r1806570) +Version 1.9.12 +(24 Jul 2019, from /branches/1.9.x) +https://svn.apache.org/repos/asf/subversion/tags/1.9.12 + + User-visible changes: + * No tree conflict when 'svn up' deletes unmodified dir with unversioned items. (r1863309) + + Developer-visible changes: + * Allow generating Visual Studio 2019 projects (r1863311) + * Fix a use-after-free in mod_dav_svn's logging of FS warnings. (r1863307) + * Fix "unused static function" warning in release-mode builds. (r1854881) + * Fix build with APR 1.7.0. (r1863310) + * Fix issue #4804: spurious SQLite-related test failures. (r1863308) + * Allow svnserve's 'get-deleted-rev' API to return 'not deleted'. (r1863312) + * Silence a deprecation warning from amalgamated SQLite on macOS. (r1863306) + + +Version 1.9.11 +(Not released; see changes for 1.9.12.) + + +Version 1.9.10 +(11 Jan 2019, from /branches/1.9.x) +http://svn.apache.org/repos/asf/subversion/tags/1.9.10 + + User-visible changes: + - Client-side bugfixes: + * Fix: repos-to-WC copy with --parents doesn't create dirs (#4768) + * Fix: foreign repo copy with peg/operative revisions (#4785) + * Fix: assertion failure using -rPREV on a working copy at r0 (#4532) + * Fix: german translation for 'svn help merge' (r1837037) + * Fix: prune externals after 'update --set-depth=exclude' (r1830883 et al.) + * Fix: detection of GPG-agent (r1794166 et al.) + * Fix: null updates don't update last-changed-revision (#4700) + * Fix: merge "Unable to parse reversed revision range" (#4686) + + - Server-side bugfixes: + * Fix: unexpected SVN_ERR_FS_NOT_DIRECTORY errors (#4791) + * Fix: mod_dav_svn's SVNUseUTF8 had no effect in some setups (r1844882) + * Fix: crash in mod_http2 (#4782) + * Fix: 'svnadmin upgrade' of BDB: Error out on too-new formats (r1804013) + * Fix: Enforce v1 HTTP protocol: error if PUT before CHECKOUT (r1833465) + * Fix: Let 'svnadmin recover' prune rep-cache even if disabled (r1838813) + * Add test and FSFS checksum verification for issue #4722 (r1826720 et al.) + + - Other tool improvements and bugfixes: + * Install 'fsfs-stats' wrapper for 1.8 compat (r1802032 et al.) + * Note that 'tools/client-side/detach.py' doesn't work on 1.8+ (r1696722) + + - Bindings bugfixes: + * JavaHL: Fix crash in client code when using external diff (r1845408) + * JavaHL: SSL server trust prompt: allow accepting temporarily (r1820718) + + Developer-visible changes: + - General: + (none) + + - API changes: + (none) + + +Version 1.9.9 +(20 Jul 2018, from /branches/1.9.x) +http://svn.apache.org/repos/asf/subversion/tags/1.9.9 + + User-visible changes: + - Client-side bugfixes: + * Fix SEGV for 'svn export -rN WC' with relative externals (r1803755) + * Fix issue #4677: 'svn up' after a directory replaced a file (r1814248) + * Fix segfault when no home directory is available (r1819199) + * Performance: Make 'svn info' fast on old repository revisions (r1827690) + * Fix RA-serf problem with proxy username and password (r1833571) + + - Server-side bugfixes: + * svnadmin: Fix false errors on some valid LOCK_PATH arguments (r1803754) + * Fix crash when exiting 'svnserve --config-file' (r1824405) + * Fix issue #4722: false "filesystem is corrupt" error on commit (r1827688) + * Reword confusing "nested" wording in an httpd.conf warning (r1835700) + + - Bindings bugfixes: + * swig-py: svn.core.Stream supports raw binary file-like objects (r1820620) + * swig-rb: Don't crash if svn_md5_digest_to_cstring returns NULL (r1823805) + + Developer-visible changes: + - General: + * Fix CVE-2017-9800: Malicious server can execute arbitrary command on client (r1804698) + * Fix test failure if compile- and run-time HTTPD versions differ (r1820523) + + - API changes: + (none) + + +Version 1.9.8 +(Not released; see changes for 1.9.9.) + + Version 1.9.7 (10 Aug 2017, from /branches/1.9.x) http://svn.apache.org/repos/asf/subversion/tags/1.9.7 @@ -5720,7 +5942,7 @@ twice as slow and lose all concurrent-client scalability. This is a temporary fix for a larger design problem. See issue - http://subversion.tigris.org/issues/show_bug.cgi?id=1499 + https://issues.apache.org/jira/browse/SVN-1499 Version 0.28.1 Index: contrib/subversion/COMMITTERS =================================================================== --- contrib/subversion/COMMITTERS +++ contrib/subversion/COMMITTERS @@ -27,7 +27,7 @@ dlr Daniel Rall mbk Mark Benedetto King jaa Jani Averbach - julianfoad Julian Foad + julianfoad Julian Foad jszakmeister John Szakmeister ehu Erik Hülsmann breser Ben Reser @@ -87,6 +87,7 @@ rassilon Bill Tutt (Win32, COM, issue-1003-dev br.) pll Paul lussier (releases) rdonch Роман Донченко (Swig-Python b.) + karolszk Karol Szkudlarek (po: pl) Commit access for specific areas: @@ -179,7 +180,6 @@ oyvindmo Øyvind Møll (po: nb) sunny256 Øyvind A. Holm (po: nb) jzgoda Jaroslaw Zgoda (po: pl) - karolszk Karol Szkudlarek (po: pl) plasma Wei-Hon Chen (po: zh_TW) jihuang June-Yen Huang (po: zh_TW) [EMAIL IS BOUNCING] Index: contrib/subversion/NOTICE =================================================================== --- contrib/subversion/NOTICE +++ contrib/subversion/NOTICE @@ -1,5 +1,5 @@ Apache Subversion -Copyright 2018 The Apache Software Foundation +Copyright 2019 The Apache Software Foundation This product includes software developed by many people, and distributed under Contributor License Agreements to The Apache Software Foundation Index: contrib/subversion/subversion/include/svn_version.h =================================================================== --- contrib/subversion/subversion/include/svn_version.h +++ contrib/subversion/subversion/include/svn_version.h @@ -70,7 +70,7 @@ * * @since New in 1.1. */ -#define SVN_VER_PATCH 0 +#define SVN_VER_PATCH 6 /** @deprecated Provided for backward compatibility with the 1.0 API. */ @@ -93,7 +93,7 @@ * * Always change this at the same time as SVN_VER_NUMTAG. */ -#define SVN_VER_TAG " (r1827917)" +#define SVN_VER_TAG " (r1863367)" /** Number tag: a string describing the version. @@ -117,7 +117,7 @@ * file version. Its value remains 0 in the repository except in release * tags where it is the revision from which the tag was created. */ -#define SVN_VER_REVISION 1827917 +#define SVN_VER_REVISION 1863367 /* Version strings composed from the above definitions. */ Index: contrib/subversion/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c =================================================================== --- contrib/subversion/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c +++ contrib/subversion/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c @@ -118,6 +118,8 @@ { GError *gerror = NULL; gchar *gpassword; + + *done = FALSE; if (!available_collection(non_interactive, pool)) return SVN_NO_ERROR; @@ -129,6 +131,7 @@ NULL); if (gerror) { + /* ### TODO: return or log the error? */ g_error_free(gerror); } else if (gpassword) @@ -156,6 +159,8 @@ GError *gerror = NULL; gboolean gstatus; + *done = FALSE; + if (!available_collection(non_interactive, pool)) return SVN_NO_ERROR; @@ -170,6 +175,7 @@ NULL); if (gerror) { + /* ### TODO: return or log the error? */ g_error_free(gerror); } else if (gstatus) Index: contrib/subversion/subversion/libsvn_auth_gnome_keyring/libsvn_auth_gnome_keyring.pc.in =================================================================== --- contrib/subversion/subversion/libsvn_auth_gnome_keyring/libsvn_auth_gnome_keyring.pc.in +++ contrib/subversion/subversion/libsvn_auth_gnome_keyring/libsvn_auth_gnome_keyring.pc.in @@ -6,7 +6,7 @@ Name: libsvn_auth_gnome_keyring Description: Subversion GNOME Keyring Library Version: @PACKAGE_VERSION@ -Requires: apr-@SVN_APR_MAJOR_VERSION@ gnome-keyring-1 -Requires.private: libsvn_subr +Requires: apr-@SVN_APR_MAJOR_VERSION@ +Requires.private: libsvn_subr @SVN_GNOME_KEYRING_PCLIBS@ Libs: -L${libdir} -lsvn_auth_gnome_keyring Cflags: -I${includedir} Index: contrib/subversion/subversion/libsvn_client/conflicts.c =================================================================== --- contrib/subversion/subversion/libsvn_client/conflicts.c +++ contrib/subversion/subversion/libsvn_client/conflicts.c @@ -806,18 +806,20 @@ if (closest_move) { const char *relpath; - const char *moved_along_path; - struct repos_move_info *move; /* See if we can find an even closer move for this moved-along path. */ relpath = svn_relpath_skip_ancestor(closest_move->moved_to_repos_relpath, deleted_relpath); - moved_along_path = - svn_relpath_join(closest_move->moved_from_repos_relpath, relpath, - scratch_pool); - move = map_deleted_path_to_move(moved_along_path, moves, scratch_pool); - if (move) - return move; + if (relpath && relpath[0] != '\0') + { + struct repos_move_info *move; + const char *moved_along_path = + svn_relpath_join(closest_move->moved_from_repos_relpath, relpath, + scratch_pool); + move = map_deleted_path_to_move(moved_along_path, moves, scratch_pool); + if (move) + return move; + } } return closest_move; @@ -1059,6 +1061,9 @@ { apr_array_header_t *moves; + if (b->moves_table == NULL) + return SVN_NO_ERROR; + moves = apr_hash_get(b->moves_table, &log_entry->revision, sizeof(svn_revnum_t)); if (moves) @@ -2097,33 +2102,6 @@ return SVN_NO_ERROR; } -static svn_error_t * -reparent_session_and_fetch_node_kind(svn_node_kind_t *node_kind, - svn_ra_session_t *ra_session, - const char *url, - svn_revnum_t peg_rev, - apr_pool_t *scratch_pool) -{ - svn_error_t *err; - - err = svn_ra_reparent(ra_session, url, scratch_pool); - if (err) - { - if (err->apr_err == SVN_ERR_RA_ILLEGAL_URL) - { - svn_error_clear(err); - *node_kind = svn_node_unknown; - return SVN_NO_ERROR; - } - - return svn_error_trace(err); - } - - SVN_ERR(svn_ra_check_path(ra_session, "", peg_rev, node_kind, scratch_pool)); - - return SVN_NO_ERROR; -} - /* Scan MOVES_TABLE for moves which affect a particular deleted node, and * build a set of new move information for this node. * Return heads of all possible move chains in *MOVES. @@ -2170,22 +2148,29 @@ svn_pool_clear(iterpool); move = APR_ARRAY_IDX(moves_in_deleted_rev, i, struct repos_move_info *); - relpath = svn_relpath_skip_ancestor(move->moved_from_repos_relpath, + if (strcmp(move->moved_from_repos_relpath, deleted_repos_relpath) == 0) + { + APR_ARRAY_PUSH(*moves, struct repos_move_info *) = move; + continue; + } + + /* Test for an operative nested move. */ + relpath = svn_relpath_skip_ancestor(move->moved_to_repos_relpath, deleted_repos_relpath); if (relpath && relpath[0] != '\0') { - svn_node_kind_t node_kind; - - url = svn_path_url_add_component2(repos_root_url, - deleted_repos_relpath, - iterpool); - SVN_ERR(reparent_session_and_fetch_node_kind(&node_kind, - ra_session, url, - rev_below(deleted_rev), - iterpool)); - move = new_path_adjusted_move(move, relpath, node_kind, result_pool); + struct repos_move_info *nested_move; + const char *actual_deleted_repos_relpath; + + actual_deleted_repos_relpath = + svn_relpath_join(move->moved_from_repos_relpath, relpath, + iterpool); + nested_move = map_deleted_path_to_move(actual_deleted_repos_relpath, + moves_in_deleted_rev, + iterpool); + if (nested_move) + APR_ARRAY_PUSH(*moves, struct repos_move_info *) = nested_move; } - APR_ARRAY_PUSH(*moves, struct repos_move_info *) = move; } if (url != NULL) @@ -2223,8 +2208,8 @@ * If the node was replaced rather than deleted, set *REPLACING_NODE_KIND to * the node kind of the replacing node. Else, set it to svn_node_unknown. * Only request the log for revisions up to END_REV from the server. - * If the deleted node was moved, provide heads of move chains in *MOVES. - * If the node was not moved,set *MOVES to NULL. + * If MOVES it not NULL, and the deleted node was moved, provide heads of + * move chains in *MOVES, or, if the node was not moved, set *MOVES to NULL. */ static svn_error_t * find_revision_for_suspected_deletion(svn_revnum_t *deleted_rev, @@ -2261,10 +2246,11 @@ scratch_pool)); victim_abspath = svn_client_conflict_get_local_abspath(conflict); - SVN_ERR(find_moves_in_revision_range(&moves_table, parent_repos_relpath, - repos_root_url, repos_uuid, - victim_abspath, start_rev, end_rev, - ctx, result_pool, scratch_pool)); + if (moves) + SVN_ERR(find_moves_in_revision_range(&moves_table, parent_repos_relpath, + repos_root_url, repos_uuid, + victim_abspath, start_rev, end_rev, + ctx, result_pool, scratch_pool)); url = svn_path_url_add_component2(repos_root_url, parent_repos_relpath, scratch_pool); @@ -2289,7 +2275,8 @@ b.repos_root_url = repos_root_url; b.repos_uuid = repos_uuid; b.ctx = ctx; - b.moves_table = moves_table; + if (moves) + b.moves_table = moves_table; b.result_pool = result_pool; SVN_ERR(svn_ra__dup_session(&b.extra_ra_session, ra_session, NULL, scratch_pool, scratch_pool)); @@ -2319,7 +2306,7 @@ { struct repos_move_info *move = b.move; - if (move) + if (moves && move) { *deleted_rev = move->rev; *deleted_rev_author = move->rev_author; @@ -2337,7 +2324,8 @@ *deleted_rev = SVN_INVALID_REVNUM; *deleted_rev_author = NULL; *replacing_node_kind = svn_node_unknown; - *moves = NULL; + if (moves) + *moves = NULL; } return SVN_NO_ERROR; } @@ -2346,10 +2334,11 @@ *deleted_rev = b.deleted_rev; *deleted_rev_author = b.deleted_rev_author; *replacing_node_kind = b.replacing_node_kind; - SVN_ERR(find_operative_moves(moves, moves_table, - b.deleted_repos_relpath, b.deleted_rev, - ra_session, repos_root_url, - result_pool, scratch_pool)); + if (moves) + SVN_ERR(find_operative_moves(moves, moves_table, + b.deleted_repos_relpath, b.deleted_rev, + ra_session, repos_root_url, + result_pool, scratch_pool)); } return SVN_NO_ERROR; @@ -2624,6 +2613,10 @@ svn_revnum_t related_peg_rev; const char *repos_root_url; const char *repos_uuid; + const char *url, *corrected_url; + svn_ra_session_t *ra_session; + svn_client__pathrev_t *yca_loc; + svn_revnum_t end_rev; SVN_ERR(svn_client_conflict_get_incoming_old_repos_location( &old_repos_relpath, &old_rev, NULL, conflict, @@ -2660,51 +2653,63 @@ (old_rev < new_rev ? old_repos_relpath : new_repos_relpath), (old_rev < new_rev ? old_rev : new_rev), conflict, ctx, scratch_pool, scratch_pool)); - + + /* Set END_REV to our best guess of the nearest YCA revision. */ + url = svn_path_url_add_component2(repos_root_url, related_repos_relpath, + scratch_pool); + SVN_ERR(svn_client__open_ra_session_internal(&ra_session, + &corrected_url, + url, NULL, NULL, + FALSE, + FALSE, + ctx, + scratch_pool, + scratch_pool)); + SVN_ERR(find_nearest_yca(&yca_loc, related_repos_relpath, related_peg_rev, + parent_repos_relpath, parent_peg_rev, + repos_root_url, repos_uuid, ra_session, ctx, + scratch_pool, scratch_pool)); + if (yca_loc) + { + end_rev = yca_loc->rev; + + /* END_REV must be smaller than PARENT_PEG_REV, else the call to + * find_revision_for_suspected_deletion() below will abort. */ + if (end_rev >= parent_peg_rev) + end_rev = parent_peg_rev > 0 ? parent_peg_rev - 1 : 0; + } + else + end_rev = 0; /* ### We might walk through all of history... */ + SVN_ERR(find_revision_for_suspected_deletion( - &deleted_rev, &deleted_rev_author, &replacing_node_kind, &moves, + &deleted_rev, &deleted_rev_author, &replacing_node_kind, + yca_loc ? &moves : NULL, conflict, deleted_basename, parent_repos_relpath, - parent_peg_rev, 0, related_repos_relpath, related_peg_rev, + parent_peg_rev, end_rev, related_repos_relpath, related_peg_rev, ctx, conflict->pool, scratch_pool)); /* If the victim was not deleted then check if the related path was moved. */ if (deleted_rev == SVN_INVALID_REVNUM) { const char *victim_abspath; - svn_ra_session_t *ra_session; - const char *url, *corrected_url; - svn_client__pathrev_t *yca_loc; - svn_revnum_t end_rev; svn_node_kind_t related_node_kind; /* ### The following describes all moves in terms of forward-merges, * should do we something else for reverse-merges? */ victim_abspath = svn_client_conflict_get_local_abspath(conflict); - url = svn_path_url_add_component2(repos_root_url, related_repos_relpath, - scratch_pool); - SVN_ERR(svn_client__open_ra_session_internal(&ra_session, - &corrected_url, - url, NULL, NULL, - FALSE, - FALSE, - ctx, - scratch_pool, - scratch_pool)); - /* Set END_REV to our best guess of the nearest YCA revision. */ - SVN_ERR(find_nearest_yca(&yca_loc, related_repos_relpath, related_peg_rev, - parent_repos_relpath, parent_peg_rev, - repos_root_url, repos_uuid, ra_session, ctx, - scratch_pool, scratch_pool)); - if (yca_loc == NULL) - return SVN_NO_ERROR; - end_rev = yca_loc->rev; + if (yca_loc) + { + end_rev = yca_loc->rev; - /* END_REV must be smaller than RELATED_PEG_REV, else the call - to find_moves_in_natural_history() below will error out. */ - if (end_rev >= related_peg_rev) - end_rev = related_peg_rev > 0 ? related_peg_rev - 1 : 0; + /* END_REV must be smaller than RELATED_PEG_REV, else the call + to find_moves_in_natural_history() below will error out. */ + if (end_rev >= related_peg_rev) + end_rev = related_peg_rev > 0 ? related_peg_rev - 1 : 0; + } + else + end_rev = 0; /* ### We might walk through all of history... */ SVN_ERR(svn_ra_check_path(ra_session, "", related_peg_rev, &related_node_kind, scratch_pool)); @@ -5054,7 +5059,7 @@ const char *repos_root_url; svn_revnum_t old_rev; svn_revnum_t new_rev; - struct conflict_tree_incoming_add_details *details; + struct conflict_tree_incoming_add_details *details = NULL; svn_wc_operation_t operation; SVN_ERR(svn_client_conflict_get_incoming_old_repos_location( @@ -5147,7 +5152,8 @@ } } } - else if (operation == svn_wc_operation_merge) + else if (operation == svn_wc_operation_merge && + strcmp(old_repos_relpath, new_repos_relpath) == 0) { if (old_rev < new_rev) { @@ -5198,7 +5204,7 @@ details->deleted_rev = SVN_INVALID_REVNUM; details->deleted_rev_author = NULL; } - else + else if (old_rev > new_rev) { /* The merge operation was a reverse-merge. * This addition is in fact a deletion, applied in reverse, @@ -5238,10 +5244,6 @@ details->moves = moves; } } - else - { - details = NULL; - } conflict->tree_conflict_incoming_details = details; @@ -5704,7 +5706,10 @@ if (log_item->copyfrom_path) b->repos_relpath = apr_pstrdup(b->scratch_pool, - log_item->copyfrom_path); + /* ### remove leading slash */ + svn_relpath_canonicalize( + log_item->copyfrom_path, + iterpool)); } else if (b->node_kind == svn_node_dir && svn_relpath_skip_ancestor(b->repos_relpath, path) != NULL) @@ -5908,6 +5913,9 @@ const char *s = ""; int i; + if (edits->nelts == 0) + return _(" (no revisions found)"); + if (edits->nelts <= max_revs_to_display) num_revs_to_skip = 0; else @@ -6660,8 +6668,10 @@ apr_hash_t *working_props; apr_array_header_t *propdiffs; svn_error_t *err; + svn_wc_conflict_reason_t local_change; local_abspath = svn_client_conflict_get_local_abspath(conflict); + local_change = svn_client_conflict_get_local_change(conflict); /* Set up tempory storage for the working version of file. */ SVN_ERR(svn_wc__get_tmpdir(&wc_tmpdir, ctx->wc_ctx, local_abspath, @@ -6672,20 +6682,31 @@ svn_io_file_del_none, scratch_pool, scratch_pool)); - /* Copy the detranslated working file to temporary storage. */ - SVN_ERR(svn_wc__translated_stream(&working_file_stream, ctx->wc_ctx, - local_abspath, local_abspath, - SVN_WC_TRANSLATE_TO_NF, - scratch_pool, scratch_pool)); + if (local_change == svn_wc_conflict_reason_unversioned) + { + /* Copy the unversioned file to temporary storage. */ + SVN_ERR(svn_stream_open_readonly(&working_file_stream, local_abspath, + scratch_pool, scratch_pool)); + /* Unversioned files have no properties. */ + working_props = apr_hash_make(scratch_pool); + } + else + { + /* Copy the detranslated working file to temporary storage. */ + SVN_ERR(svn_wc__translated_stream(&working_file_stream, ctx->wc_ctx, + local_abspath, local_abspath, + SVN_WC_TRANSLATE_TO_NF, + scratch_pool, scratch_pool)); + /* Get a copy of the working file's properties. */ + SVN_ERR(svn_wc_prop_list2(&working_props, ctx->wc_ctx, local_abspath, + scratch_pool, scratch_pool)); + filter_props(working_props, scratch_pool); + } + SVN_ERR(svn_stream_copy3(working_file_stream, working_file_tmp_stream, ctx->cancel_func, ctx->cancel_baton, scratch_pool)); - /* Get a copy of the working file's properties. */ - SVN_ERR(svn_wc_prop_list2(&working_props, ctx->wc_ctx, local_abspath, - scratch_pool, scratch_pool)); - filter_props(working_props, scratch_pool); - /* Create an empty file as fake "merge-base" for the two added files. * The files are not ancestrally related so this is the best we can do. */ SVN_ERR(svn_io_open_unique_file3(NULL, &empty_file_abspath, NULL, @@ -7684,20 +7705,46 @@ const char *local_abspath; const char *lock_abspath; svn_error_t *err; + svn_wc_conflict_reason_t local_change; local_abspath = svn_client_conflict_get_local_abspath(conflict); + local_change = svn_client_conflict_get_local_change(conflict); - SVN_ERR(svn_wc__acquire_write_lock_for_resolve( - &lock_abspath, ctx->wc_ctx, local_abspath, - scratch_pool, scratch_pool)); + if (local_change == svn_wc_conflict_reason_unversioned) + { + char *parent_abspath = svn_dirent_dirname(local_abspath, scratch_pool); + SVN_ERR(svn_wc__acquire_write_lock_for_resolve( + &lock_abspath, ctx->wc_ctx, parent_abspath, + scratch_pool, scratch_pool)); - err = svn_wc__conflict_tree_update_local_add(ctx->wc_ctx, - local_abspath, - ctx->cancel_func, - ctx->cancel_baton, - ctx->notify_func2, - ctx->notify_baton2, - scratch_pool); + /* The update/switch operation has added the incoming versioned + * directory as a deleted op-depth layer. We can revert this layer + * to make the incoming tree appear in the working copy. + * This meta-data-only revert operation effecively merges the + * versioned and unversioned trees but leaves all unversioned files as + * they were. This is the best we can do; 3-way merging of unversioned + * files with files from the repository is impossible because there is + * no known merge base. No unversioned data will be lost, and any + * differences to files in the repository will show up in 'svn diff'. */ + err = svn_wc_revert5(ctx->wc_ctx, local_abspath, svn_depth_infinity, + FALSE, NULL, TRUE, TRUE /* metadata_only */, + NULL, NULL, /* no cancellation */ + ctx->notify_func2, ctx->notify_baton2, + scratch_pool); + } + else + { + SVN_ERR(svn_wc__acquire_write_lock_for_resolve( + &lock_abspath, ctx->wc_ctx, local_abspath, + scratch_pool, scratch_pool)); + err = svn_wc__conflict_tree_update_local_add(ctx->wc_ctx, + local_abspath, + ctx->cancel_func, + ctx->cancel_baton, + ctx->notify_func2, + ctx->notify_baton2, + scratch_pool); + } err = svn_error_compose_create(err, svn_wc__release_write_lock(ctx->wc_ctx, lock_abspath, @@ -7989,6 +8036,112 @@ scratch_pool)); } +/* Ensure the conflict victim is a copy of itself from before it was deleted. + * Update and switch are supposed to set this up when flagging the conflict. */ +static svn_error_t * +ensure_local_edit_vs_incoming_deletion_copied_state( + struct conflict_tree_incoming_delete_details *details, + svn_wc_operation_t operation, + const char *wcroot_abspath, + svn_client_conflict_t *conflict, + svn_client_ctx_t *ctx, + apr_pool_t *scratch_pool) +{ + + svn_boolean_t is_copy; + svn_revnum_t copyfrom_rev; + const char *copyfrom_repos_relpath; + + SVN_ERR_ASSERT(operation == svn_wc_operation_update || + operation == svn_wc_operation_switch); + + SVN_ERR(svn_wc__node_get_origin(&is_copy, ©from_rev, + ©from_repos_relpath, + NULL, NULL, NULL, NULL, + ctx->wc_ctx, conflict->local_abspath, + FALSE, scratch_pool, scratch_pool)); + if (!is_copy) + return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, + _("Cannot resolve tree conflict on '%s' " + "(expected a copied item, but the item " + "is not a copy)"), + svn_dirent_local_style( + svn_dirent_skip_ancestor( + wcroot_abspath, + conflict->local_abspath), + scratch_pool)); + else if (details->deleted_rev != SVN_INVALID_REVNUM && + copyfrom_rev >= details->deleted_rev) + return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, + _("Cannot resolve tree conflict on '%s' " + "(expected an item copied from a revision " + "smaller than r%ld, but the item was " + "copied from r%ld)"), + svn_dirent_local_style( + svn_dirent_skip_ancestor( + wcroot_abspath, conflict->local_abspath), + scratch_pool), + details->deleted_rev, copyfrom_rev); + else if (details->added_rev != SVN_INVALID_REVNUM && + copyfrom_rev < details->added_rev) + return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, + _("Cannot resolve tree conflict on '%s' " + "(expected an item copied from a revision " + "larger than r%ld, but the item was " + "copied from r%ld)"), + svn_dirent_local_style( + svn_dirent_skip_ancestor( + wcroot_abspath, conflict->local_abspath), + scratch_pool), + details->added_rev, copyfrom_rev); + else if (operation == svn_wc_operation_update) + { + const char *old_repos_relpath; + + SVN_ERR(svn_client_conflict_get_incoming_old_repos_location( + &old_repos_relpath, NULL, NULL, conflict, + scratch_pool, scratch_pool)); + if (strcmp(copyfrom_repos_relpath, details->repos_relpath) != 0 && + strcmp(copyfrom_repos_relpath, old_repos_relpath) != 0) + return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, + _("Cannot resolve tree conflict on '%s' " + "(expected an item copied from '^/%s' " + "or from '^/%s' but the item was " + "copied from '^/%s@%ld')"), + svn_dirent_local_style( + svn_dirent_skip_ancestor( + wcroot_abspath, conflict->local_abspath), + scratch_pool), + details->repos_relpath, + old_repos_relpath, + copyfrom_repos_relpath, copyfrom_rev); + } + else if (operation == svn_wc_operation_switch) + { + const char *old_repos_relpath; + + SVN_ERR(svn_client_conflict_get_incoming_old_repos_location( + &old_repos_relpath, NULL, NULL, conflict, + scratch_pool, scratch_pool)); + + if (strcmp(copyfrom_repos_relpath, old_repos_relpath) != 0) + return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, + _("Cannot resolve tree conflict on '%s' " + "(expected an item copied from '^/%s', " + "but the item was copied from " + "'^/%s@%ld')"), + svn_dirent_local_style( + svn_dirent_skip_ancestor( + wcroot_abspath, + conflict->local_abspath), + scratch_pool), + old_repos_relpath, + copyfrom_repos_relpath, copyfrom_rev); + } + + return SVN_NO_ERROR; +} + /* Verify the local working copy state matches what we expect when an * incoming deletion tree conflict exists. * We assume update/merge/switch operations leave the working copy in a @@ -7999,26 +8152,25 @@ static svn_error_t * verify_local_state_for_incoming_delete(svn_client_conflict_t *conflict, svn_client_conflict_option_t *option, - svn_client_ctx_t *ctx, + svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { const char *local_abspath; const char *wcroot_abspath; svn_wc_operation_t operation; + svn_wc_conflict_reason_t local_change; local_abspath = svn_client_conflict_get_local_abspath(conflict); SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx, local_abspath, scratch_pool, scratch_pool)); operation = svn_client_conflict_get_operation(conflict); + local_change = svn_client_conflict_get_local_change(conflict); if (operation == svn_wc_operation_update || operation == svn_wc_operation_switch) { struct conflict_tree_incoming_delete_details *details; - svn_boolean_t is_copy; - svn_revnum_t copyfrom_rev; - const char *copyfrom_repos_relpath; details = conflict->tree_conflict_incoming_details; if (details == NULL) @@ -8030,26 +8182,8 @@ svn_dirent_local_style(local_abspath, scratch_pool)); - /* Ensure that the item is a copy of itself from before it was deleted. - * Update and switch are supposed to set this up when flagging the - * conflict. */ - SVN_ERR(svn_wc__node_get_origin(&is_copy, ©from_rev, - ©from_repos_relpath, - NULL, NULL, NULL, NULL, - ctx->wc_ctx, local_abspath, FALSE, - scratch_pool, scratch_pool)); - if (!is_copy) - return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, - _("Cannot resolve tree conflict on '%s' " - "(expected a copied item, but the item " - "is not a copy)"), - svn_dirent_local_style( - svn_dirent_skip_ancestor( - wcroot_abspath, - conflict->local_abspath), - scratch_pool)); - else if (details->deleted_rev == SVN_INVALID_REVNUM && - details->added_rev == SVN_INVALID_REVNUM) + if (details->deleted_rev == SVN_INVALID_REVNUM && + details->added_rev == SVN_INVALID_REVNUM) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Could not find the revision in which '%s' " "was deleted from the repository"), @@ -8058,75 +8192,11 @@ wcroot_abspath, conflict->local_abspath), scratch_pool)); - else if (details->deleted_rev != SVN_INVALID_REVNUM && - copyfrom_rev >= details->deleted_rev) - return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, - _("Cannot resolve tree conflict on '%s' " - "(expected an item copied from a revision " - "smaller than r%ld, but the item was " - "copied from r%ld)"), - svn_dirent_local_style( - svn_dirent_skip_ancestor( - wcroot_abspath, conflict->local_abspath), - scratch_pool), - details->deleted_rev, copyfrom_rev); - else if (details->added_rev != SVN_INVALID_REVNUM && - copyfrom_rev < details->added_rev) - return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, - _("Cannot resolve tree conflict on '%s' " - "(expected an item copied from a revision " - "larger than r%ld, but the item was " - "copied from r%ld)"), - svn_dirent_local_style( - svn_dirent_skip_ancestor( - wcroot_abspath, conflict->local_abspath), - scratch_pool), - details->added_rev, copyfrom_rev); - else if (operation == svn_wc_operation_update) - { - const char *old_repos_relpath; - - SVN_ERR(svn_client_conflict_get_incoming_old_repos_location( - &old_repos_relpath, NULL, NULL, conflict, - scratch_pool, scratch_pool)); - if (strcmp(copyfrom_repos_relpath, details->repos_relpath) != 0 && - strcmp(copyfrom_repos_relpath, old_repos_relpath) != 0) - return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, - _("Cannot resolve tree conflict on '%s' " - "(expected an item copied from '^/%s' " - "or from '^/%s' but the item was " - "copied from '^/%s@%ld')"), - svn_dirent_local_style( - svn_dirent_skip_ancestor( - wcroot_abspath, conflict->local_abspath), - scratch_pool), - details->repos_relpath, - old_repos_relpath, - copyfrom_repos_relpath, copyfrom_rev); - } - else if (operation == svn_wc_operation_switch) - { - const char *old_repos_relpath; - - SVN_ERR(svn_client_conflict_get_incoming_old_repos_location( - &old_repos_relpath, NULL, NULL, conflict, - scratch_pool, scratch_pool)); - - if (strcmp(copyfrom_repos_relpath, old_repos_relpath) != 0) - return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, - _("Cannot resolve tree conflict on '%s' " - "(expected an item copied from '^/%s', " - "but the item was copied from " - "'^/%s@%ld')"), - svn_dirent_local_style( - svn_dirent_skip_ancestor( - wcroot_abspath, - conflict->local_abspath), - scratch_pool), - old_repos_relpath, - copyfrom_repos_relpath, copyfrom_rev); - } + if (local_change == svn_wc_conflict_reason_edited) + SVN_ERR(ensure_local_edit_vs_incoming_deletion_copied_state( + details, operation, wcroot_abspath, conflict, ctx, + scratch_pool)); } else if (operation == svn_wc_operation_merge) { @@ -8403,10 +8473,10 @@ if (operation == svn_wc_operation_update || operation == svn_wc_operation_switch) { - svn_stream_t *working_stream; + svn_stream_t *moved_to_stream; svn_stream_t *incoming_stream; - /* Create a temporary copy of the working file in repository-normal form. + /* Create a temporary copy of the moved file in repository-normal form. * Set up this temporary file to be automatically removed. */ err = svn_stream_open_unique(&incoming_stream, &incoming_abspath, wc_tmpdir, @@ -8415,18 +8485,31 @@ if (err) goto unlock_wc; - err = svn_wc__translated_stream(&working_stream, ctx->wc_ctx, - local_abspath, local_abspath, + err = svn_wc__translated_stream(&moved_to_stream, ctx->wc_ctx, + moved_to_abspath, + moved_to_abspath, SVN_WC_TRANSLATE_TO_NF, scratch_pool, scratch_pool); if (err) goto unlock_wc; - err = svn_stream_copy3(working_stream, incoming_stream, + err = svn_stream_copy3(moved_to_stream, incoming_stream, NULL, NULL, /* no cancellation */ scratch_pool); if (err) goto unlock_wc; + + /* Overwrite the moved file with the conflict victim's content. + * Incoming changes will be merged in from the temporary file created + * above. This is required to correctly make local changes show up as + * 'mine' during the three-way text merge between the ancestor file, + * the conflict victim ('mine'), and the moved file ('theirs') which + * was brought in by the update/switch operation and occupies the path + * of the merge target. */ + err = svn_io_copy_file(local_abspath, moved_to_abspath, FALSE, + scratch_pool); + if (err) + goto unlock_wc; } else if (operation == svn_wc_operation_merge) { @@ -8579,8 +8662,8 @@ struct conflict_tree_incoming_delete_details *details; apr_array_header_t *possible_moved_to_abspaths; const char *moved_to_abspath; - svn_client__pathrev_t *yca_loc; - svn_opt_revision_t yca_opt_rev; + const char *incoming_old_url; + svn_opt_revision_t incoming_old_opt_rev; svn_client__conflict_report_t *conflict_report; svn_boolean_t is_copy; svn_boolean_t is_modified; @@ -8673,30 +8756,6 @@ goto unlock_wc; } - /* Now find the youngest common ancestor of these nodes. */ - err = find_yca(&yca_loc, victim_repos_relpath, victim_peg_rev, - moved_to_repos_relpath, moved_to_peg_rev, - repos_root_url, repos_uuid, - NULL, ctx, scratch_pool, scratch_pool); - if (err) - goto unlock_wc; - - if (yca_loc == NULL) - { - err = svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, - _("Cannot resolve tree conflict on '%s' " - "(could not find common ancestor of '^/%s@%ld' " - " and '^/%s@%ld')"), - svn_dirent_local_style(local_abspath, - scratch_pool), - victim_repos_relpath, victim_peg_rev, - moved_to_repos_relpath, moved_to_peg_rev); - goto unlock_wc; - } - - yca_opt_rev.kind = svn_opt_revision_number; - yca_opt_rev.value.number = yca_loc->rev; - err = verify_local_state_for_incoming_delete(conflict, option, ctx, scratch_pool); if (err) @@ -8725,7 +8784,12 @@ if (err) goto unlock_wc; - /* Merge YCA_URL@YCA_REV->MOVE_TARGET_URL@MERGE_RIGHT into move target. */ + /* Merge INCOMING_OLD_URL@MERGE_LEFT->MOVE_TARGET_URL@MERGE_RIGHT + * into move target. */ + incoming_old_url = apr_pstrcat(scratch_pool, repos_root_url, "/", + incoming_old_repos_relpath, SVN_VA_NULL); + incoming_old_opt_rev.kind = svn_opt_revision_number; + incoming_old_opt_rev.value.number = incoming_old_pegrev; move_target_url = apr_pstrcat(scratch_pool, repos_root_url, "/", get_moved_to_repos_relpath(details, scratch_pool), @@ -8733,7 +8797,7 @@ incoming_new_opt_rev.kind = svn_opt_revision_number; incoming_new_opt_rev.value.number = incoming_new_pegrev; err = svn_client__merge_locked(&conflict_report, - yca_loc->url, &yca_opt_rev, + incoming_old_url, &incoming_old_opt_rev, move_target_url, &incoming_new_opt_rev, moved_to_abspath, svn_depth_infinity, TRUE, TRUE, /* do a no-ancestry merge */ @@ -9369,6 +9433,7 @@ incoming_new_kind == svn_node_file && incoming_change == svn_wc_conflict_action_add && (local_change == svn_wc_conflict_reason_obstructed || + local_change == svn_wc_conflict_reason_unversioned || local_change == svn_wc_conflict_reason_added)) { const char *description; @@ -9494,8 +9559,9 @@ incoming_change == svn_wc_conflict_action_add && (local_change == svn_wc_conflict_reason_added || (operation == svn_wc_operation_merge && - local_change == svn_wc_conflict_reason_obstructed))) - + local_change == svn_wc_conflict_reason_obstructed) || + (operation != svn_wc_operation_merge && + local_change == svn_wc_conflict_reason_unversioned))) { const char *description; const char *wcroot_abspath; @@ -9504,13 +9570,18 @@ conflict->local_abspath, scratch_pool, scratch_pool)); if (operation == svn_wc_operation_merge) - description = - apr_psprintf(scratch_pool, _("merge '^/%s@%ld' into '%s'"), - incoming_new_repos_relpath, incoming_new_pegrev, - svn_dirent_local_style( - svn_dirent_skip_ancestor(wcroot_abspath, - conflict->local_abspath), - scratch_pool)); + { + if (conflict->tree_conflict_incoming_details == NULL) + return SVN_NO_ERROR; + + description = + apr_psprintf(scratch_pool, _("merge '^/%s@%ld' into '%s'"), + incoming_new_repos_relpath, incoming_new_pegrev, + svn_dirent_local_style( + svn_dirent_skip_ancestor(wcroot_abspath, + conflict->local_abspath), + scratch_pool)); + } else description = apr_psprintf(scratch_pool, _("merge local '%s' and '^/%s@%ld'"), @@ -9840,6 +9911,7 @@ { svn_node_kind_t victim_node_kind; svn_wc_conflict_action_t incoming_change; + svn_wc_conflict_reason_t local_change; const char *incoming_old_repos_relpath; svn_revnum_t incoming_old_pegrev; svn_node_kind_t incoming_old_kind; @@ -9847,6 +9919,7 @@ svn_revnum_t incoming_new_pegrev; svn_node_kind_t incoming_new_kind; incoming_change = svn_client_conflict_get_incoming_change(conflict); + local_change = svn_client_conflict_get_local_change(conflict); victim_node_kind = svn_client_conflict_tree_get_victim_node_kind(conflict); SVN_ERR(svn_client_conflict_get_incoming_old_repos_location( &incoming_old_repos_relpath, &incoming_old_pegrev, @@ -9860,7 +9933,8 @@ if (victim_node_kind == svn_node_file && incoming_old_kind == svn_node_file && incoming_new_kind == svn_node_none && - incoming_change == svn_wc_conflict_action_delete) + incoming_change == svn_wc_conflict_action_delete && + local_change == svn_wc_conflict_reason_edited) { struct conflict_tree_incoming_delete_details *details; const char *description; @@ -10152,6 +10226,7 @@ if (strcmp(move_target_repos_relpath, repos_relpath) == 0) { details->move_target_repos_relpath = repos_relpath; + details->wc_move_target_idx = 0; /* Update option description. */ SVN_ERR(describe_incoming_move_merge_conflict_option( &option->description, Index: contrib/subversion/subversion/libsvn_client/copy.c =================================================================== --- contrib/subversion/subversion/libsvn_client/copy.c +++ contrib/subversion/subversion/libsvn_client/copy.c @@ -2453,7 +2453,7 @@ { *timestamp_sleep = TRUE; - SVN_ERR(svn_client__copy_foreign(pair->src_abspath_or_url, + SVN_ERR(svn_client__copy_foreign(pair->src_original, dst_abspath, &pair->src_peg_revision, &pair->src_op_revision, @@ -2550,13 +2550,18 @@ pool)); } - /* Record the implied mergeinfo (before the notification callback - is invoked for the root node). */ - SVN_ERR(svn_client__get_repos_mergeinfo( - &src_mergeinfo, ra_session, - pair->src_abspath_or_url, pair->src_revnum, - svn_mergeinfo_inherited, TRUE /*squelch_incapable*/, pool)); - SVN_ERR(extend_wc_mergeinfo(dst_abspath, src_mergeinfo, ctx, pool)); + if (same_repositories) + { + /* Record the implied mergeinfo (before the notification callback + is invoked for the root node). */ + SVN_ERR(svn_client__get_repos_mergeinfo(&src_mergeinfo, ra_session, + pair->src_abspath_or_url, + pair->src_revnum, + svn_mergeinfo_inherited, + TRUE /*squelch_incapable*/, + pool)); + SVN_ERR(extend_wc_mergeinfo(dst_abspath, src_mergeinfo, ctx, pool)); + } /* Do our own notification for the root node, even if we could possibly have delegated it. See also issue #1552. @@ -2742,6 +2747,16 @@ SVN_ERR(svn_client__make_local_parents(dst_parent, TRUE, ctx, iterpool)); } + else if (make_parents && dst_parent_kind == svn_node_dir) + { + SVN_ERR(svn_wc_read_kind2(&dst_parent_kind, ctx->wc_ctx, dst_parent, + FALSE, TRUE, iterpool)); + if (dst_parent_kind == svn_node_none) + { + SVN_ERR(svn_client__make_local_parents(dst_parent, TRUE, ctx, + iterpool)); + } + } else if (dst_parent_kind != svn_node_dir) { return svn_error_createf(SVN_ERR_WC_NOT_WORKING_COPY, NULL, Index: contrib/subversion/subversion/libsvn_client/revisions.c =================================================================== --- contrib/subversion/subversion/libsvn_client/revisions.c +++ contrib/subversion/subversion/libsvn_client/revisions.c @@ -146,7 +146,14 @@ scratch_pool)); if (revision->kind == svn_opt_revision_previous) - (*revnum)--; + { + if (*revnum == 0) + return svn_error_createf( + SVN_ERR_CLIENT_BAD_REVISION, NULL, + _("Path '%s' has no previous revision"), + svn_dirent_local_style(local_abspath, scratch_pool)); + --(*revnum); + } } break; Index: contrib/subversion/subversion/libsvn_client/shelve.c =================================================================== --- contrib/subversion/subversion/libsvn_client/shelve.c +++ contrib/subversion/subversion/libsvn_client/shelve.c @@ -188,13 +188,18 @@ for (i = 0; i < paths->nelts; i++) { const char *path = APR_ARRAY_IDX(paths, i, const char *); + apr_hash_t *old_config; + svn_error_t *err; if (svn_path_is_url(path)) return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL, _("'%s' is not a local path"), path); SVN_ERR(svn_dirent_get_absolute(&path, path, scratch_pool)); - SVN_ERR(svn_client_diff_peg6( + /* Ensure we use internal diff, not any configured external diff-cmd. */ + old_config = ctx->config; + ctx->config = NULL; + err = svn_client_diff_peg6( NULL /*options*/, path, &peg_revision, @@ -214,8 +219,11 @@ outstream, errstream, changelists, - ctx, iterpool)); + ctx, iterpool); + ctx->config = old_config; + SVN_ERR(err); } + SVN_ERR(svn_stream_close(outstream)); SVN_ERR(svn_stream_close(errstream)); Index: contrib/subversion/subversion/libsvn_client/update.c =================================================================== --- contrib/subversion/subversion/libsvn_client/update.c +++ contrib/subversion/subversion/libsvn_client/update.c @@ -182,6 +182,88 @@ return SVN_NO_ERROR; } +/* Perform post-update processing of externals defined below LOCAL_ABSPATH. */ +static svn_error_t * +handle_externals(svn_boolean_t *timestamp_sleep, + const char *local_abspath, + svn_depth_t depth, + const char *repos_root_url, + svn_ra_session_t *ra_session, + svn_client_ctx_t *ctx, + apr_pool_t *scratch_pool) +{ + apr_hash_t *new_externals; + apr_hash_t *new_depths; + + SVN_ERR(svn_wc__externals_gather_definitions(&new_externals, + &new_depths, + ctx->wc_ctx, local_abspath, + depth, + scratch_pool, scratch_pool)); + + SVN_ERR(svn_client__handle_externals(new_externals, + new_depths, + repos_root_url, local_abspath, + depth, timestamp_sleep, ra_session, + ctx, scratch_pool)); + return SVN_NO_ERROR; +} + +/* Try to reuse the RA session by reparenting it to the anchor_url. + * This code is probably overly cautious since we only use this + * currently when parents are missing and so all the anchor_urls + * have to be in the same repo. + * Note that ra_session_p is an (optional) input parameter as well + * as an output parameter. */ +static svn_error_t * +reuse_ra_session(svn_ra_session_t **ra_session_p, + const char **corrected_url, + const char *anchor_url, + const char *anchor_abspath, + svn_client_ctx_t *ctx, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool) +{ + svn_ra_session_t *ra_session = *ra_session_p; + + if (ra_session) + { + svn_error_t *err = svn_ra_reparent(ra_session, anchor_url, scratch_pool); + if (err) + { + if (err->apr_err == SVN_ERR_RA_ILLEGAL_URL) + { + /* session changed repos, can't reuse it */ + svn_error_clear(err); + ra_session = NULL; + } + else + { + return svn_error_trace(err); + } + } + else + { + *corrected_url = NULL; + } + } + + /* Open an RA session for the URL if one isn't already available */ + if (!ra_session) + { + SVN_ERR(svn_client__open_ra_session_internal(&ra_session, corrected_url, + anchor_url, + anchor_abspath, NULL, + TRUE /* write_dav_props */, + TRUE /* read_dav_props */, + ctx, + result_pool, scratch_pool)); + *ra_session_p = ra_session; + } + + return SVN_NO_ERROR; +} + /* This is a helper for svn_client__update_internal(), which see for an explanation of most of these parameters. Some stuff that's unique is as follows: @@ -320,6 +402,18 @@ ctx->notify_func2, ctx->notify_baton2, scratch_pool)); + if (!ignore_externals) + { + /* We may now be able to remove externals below LOCAL_ABSPATH. */ + SVN_ERR(reuse_ra_session(ra_session_p, &corrected_url, + anchor_url, anchor_abspath, + ctx, result_pool, scratch_pool)); + ra_session = *ra_session_p; + SVN_ERR(handle_externals(timestamp_sleep, local_abspath, depth, + repos_root_url, ra_session, ctx, + scratch_pool)); + } + /* Target excluded, we are done now */ return SVN_NO_ERROR; } @@ -373,44 +467,9 @@ ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool); } - /* Try to reuse the RA session by reparenting it to the anchor_url. - * This code is probably overly cautious since we only use this - * currently when parents are missing and so all the anchor_urls - * have to be in the same repo. */ - if (ra_session) - { - svn_error_t *err = svn_ra_reparent(ra_session, anchor_url, scratch_pool); - if (err) - { - if (err->apr_err == SVN_ERR_RA_ILLEGAL_URL) - { - /* session changed repos, can't reuse it */ - svn_error_clear(err); - ra_session = NULL; - } - else - { - return svn_error_trace(err); - } - } - else - { - corrected_url = NULL; - } - } - - /* Open an RA session for the URL if one isn't already available */ - if (!ra_session) - { - SVN_ERR(svn_client__open_ra_session_internal(&ra_session, &corrected_url, - anchor_url, - anchor_abspath, NULL, - TRUE /* write_dav_props */, - TRUE /* read_dav_props */, - ctx, - result_pool, scratch_pool)); - *ra_session_p = ra_session; - } + SVN_ERR(reuse_ra_session(ra_session_p, &corrected_url, anchor_url, + anchor_abspath, ctx, result_pool, scratch_pool)); + ra_session = *ra_session_p; /* If we got a corrected URL from the RA subsystem, we'll need to relocate our working copy first. */ @@ -513,19 +572,8 @@ if ((SVN_DEPTH_IS_RECURSIVE(depth) || cropping_target) && (! ignore_externals)) { - apr_hash_t *new_externals; - apr_hash_t *new_depths; - SVN_ERR(svn_wc__externals_gather_definitions(&new_externals, - &new_depths, - ctx->wc_ctx, local_abspath, - depth, - scratch_pool, scratch_pool)); - - SVN_ERR(svn_client__handle_externals(new_externals, - new_depths, - repos_root_url, local_abspath, - depth, timestamp_sleep, ra_session, - ctx, scratch_pool)); + SVN_ERR(handle_externals(timestamp_sleep, local_abspath, depth, + repos_root_url, ra_session, ctx, scratch_pool)); } /* Let everyone know we're finished here (unless we're asked not to). */ Index: contrib/subversion/subversion/libsvn_fs_base/notes/schema-bdb-1.6.svg =================================================================== --- /dev/null +++ contrib/subversion/subversion/libsvn_fs_base/notes/schema-bdb-1.6.svg @@ -0,0 +1,1613 @@ + + + + + + + + + + + + + image/svg+xml + + schema-bdb-1.6 + + + + Julian Foad + + + en + + + + + + + + revisions + + + + + uuids + + + + + locks + + + + + strings + + + + + representations + + + + + transactions + + + + + copies + + + + + nodes + + + + + changes + + [num] + "revision" + txn + "transaction|committed|dead" + root_id + base_id | rev + cpy_id + "copy|soft-copy" + src_path + src_txn + dest_node_id + uuid + txn_id + "change" + path + node_rev_id + "add|delete|replace|modify" + text_mod + prop_mod + + + + id + "file|dir" + created_path + pred_id + pred_count + prop_key + data_or_entries_key + edit_data_key + proplist: (prop value ...) + copies: (cpy_id ...) + rep_window ... + + rep_id + "fulltext|delta" + txn + ("md5" md5sum) + ("sha1" sha1sum) + str_id + string_key | + + + + + + + + lock-tokens + + + + + miscellaneous + + + + + checksum-reps + + + + + node-origins + + [num=1] + txn_id + token + path + node_id + sha1sum + "forward-delta-rev" + + has_mergeinfo + mergeinfo_count + data-key-uniqid + + token + node_rev_id + rep_id + path + token + owner + rev + x-date + cr-date + xml-p + comment + "lock" + + + + + offset + ("svndiff" version string_key) + size + rep_key + rep_offset + + + + REVISION: + CHANGE: + NODE-REV-ID: + STRING: + REP: + UUID: + STRING + REPRESENTATION: + NODE-REVISION: + COPY: + TRANSACTION: + TOKEN: + LOCK: + BDB schema for Subversion 1.6 + + + + + + + + Index: contrib/subversion/subversion/libsvn_fs_fs/cached_data.c =================================================================== --- contrib/subversion/subversion/libsvn_fs_fs/cached_data.c +++ contrib/subversion/subversion/libsvn_fs_fs/cached_data.c @@ -2103,13 +2103,14 @@ /* BATON is of type `rep_read_baton'; read the next *LEN bytes of the representation and store them in *BUF. Sum as we read and verify - the MD5 sum at the end. */ + the MD5 sum at the end. This is a READ_FULL_FN for svn_stream_t. */ static svn_error_t * rep_read_contents(void *baton, char *buf, apr_size_t *len) { struct rep_read_baton *rb = baton; + apr_size_t len_requested = *len; /* Get data from the fulltext cache for as long as we can. */ if (rb->fulltext_cache) @@ -2150,6 +2151,28 @@ if (rb->current_fulltext) svn_stringbuf_appendbytes(rb->current_fulltext, buf, *len); + /* This is a FULL_READ_FN so a short read implies EOF and we can + verify the length. */ + rb->off += *len; + if (*len < len_requested && rb->off != rb->len) + { + /* A warning rather than an error to allow the data to be + retrieved when the length is wrong but the data is + present, i.e. if repository corruption has stored the wrong + expanded length. */ + svn_error_t *err = svn_error_createf(SVN_ERR_FS_CORRUPT, NULL, + _("Length mismatch while reading representation:" + " expected %s," + " got %s"), + apr_psprintf(rb->pool, "%" SVN_FILESIZE_T_FMT, + rb->len), + apr_psprintf(rb->pool, "%" SVN_FILESIZE_T_FMT, + rb->off)); + + rb->fs->warning(rb->fs->warning_baton, err); + svn_error_clear(err); + } + /* Perform checksumming. We want to check the checksum as soon as the last byte of data is read, in case the caller never performs a short read, but we don't want to finalize the MD5 context @@ -2157,7 +2180,6 @@ if (!rb->checksum_finalized) { SVN_ERR(svn_checksum_update(rb->md5_checksum_ctx, buf, *len)); - rb->off += *len; if (rb->off == rb->len) { svn_checksum_t *md5_checksum; Index: contrib/subversion/subversion/libsvn_fs_fs/recovery.c =================================================================== --- contrib/subversion/subversion/libsvn_fs_fs/recovery.c +++ contrib/subversion/subversion/libsvn_fs_fs/recovery.c @@ -471,9 +471,15 @@ } /* Prune younger-than-(newfound-youngest) revisions from the rep - cache if sharing is enabled taking care not to create the cache - if it does not exist. */ - if (ffd->rep_sharing_allowed) + cache, taking care not to create the cache if it does not exist. + + We do this whenever rep-cache.db exists, whether it's currently enabled + or not, to prevent a data loss that could result from having revisions + created after this 'recover' operation referring to rep-cache.db rows + that were created before the recover and that point to revisions younger- + than-(newfound-youngest). + */ + if (ffd->format >= SVN_FS_FS__MIN_REP_SHARING_FORMAT) { svn_boolean_t rep_cache_exists; Index: contrib/subversion/subversion/libsvn_fs_fs/tree.c =================================================================== --- contrib/subversion/subversion/libsvn_fs_fs/tree.c +++ contrib/subversion/subversion/libsvn_fs_fs/tree.c @@ -920,6 +920,25 @@ return SVN_NO_ERROR; } +/* Helper for open_path() that constructs and returns an appropriate + SVN_ERR_FS_NOT_DIRECTORY error. */ +static svn_error_t * +err_not_directory(svn_fs_root_t *root, + const char *path, + apr_pool_t *scratch_pool) +{ + const char *msg; + + msg = root->is_txn_root + ? apr_psprintf(scratch_pool, + _("Failure opening '%s' in transaction '%s'"), + path, root->txn) + : apr_psprintf(scratch_pool, + _("Failure opening '%s' in revision %ld"), + path, root->rev); + + return svn_error_quick_wrap(SVN_FS__ERR_NOT_DIRECTORY(root->fs, path), msg); +} /* Open the node identified by PATH in ROOT, allocating in POOL. Set *PARENT_PATH_P to a path from the node up to ROOT. The resulting @@ -1016,12 +1035,26 @@ SVN_ERR(dag_node_cache_get(&here, root, directory, pool)); /* Did the shortcut work? */ - if (here) + if (here && svn_fs_fs__dag_node_kind(here) == svn_node_dir) { apr_size_t dirname_len = strlen(directory); path_so_far->len = dirname_len; rest = path + dirname_len + 1; } + else if (here) + { + /* The parent node is not a directory. We are looking for some + sub-path, so that sub-path will not exist. That will be o.k. + if we are just here to check for the path's existence, but + should result in an error otherwise. */ + if (flags & open_path_allow_null) + { + *parent_path_p = NULL; + return SVN_NO_ERROR; + } + else + return svn_error_trace(err_not_directory(root, directory, pool)); + } } } @@ -1144,8 +1177,6 @@ /* The path isn't finished yet; we'd better be in a directory. */ if (svn_fs_fs__dag_node_kind(child) != svn_node_dir) { - const char *msg; - /* Since this is not a directory and we are looking for some sub-path, that sub-path will not exist. That will be o.k., if we are just here to check for the path's existence. */ @@ -1156,14 +1187,8 @@ } /* It's really a problem ... */ - msg = root->is_txn_root - ? apr_psprintf(iterpool, - _("Failure opening '%s' in transaction '%s'"), - path, root->txn) - : apr_psprintf(iterpool, - _("Failure opening '%s' in revision %ld"), - path, root->rev); - SVN_ERR_W(SVN_FS__ERR_NOT_DIRECTORY(fs, path_so_far->data), msg); + return svn_error_trace( + err_not_directory(root, path_so_far->data, iterpool)); } rest = next; Index: contrib/subversion/subversion/libsvn_ra_serf/util.c =================================================================== --- contrib/subversion/subversion/libsvn_ra_serf/util.c +++ contrib/subversion/subversion/libsvn_ra_serf/util.c @@ -756,6 +756,9 @@ if (creds) { + /* At this stage we are unable to check whether the password + is correct; if it is incorrect serf will fail to establish + an SSL connection and will return a generic SSL error. */ svn_auth_cred_ssl_client_cert_pw_t *pw_creds; pw_creds = creds; *password = pw_creds->password; @@ -1445,6 +1448,23 @@ process_body: + /* A client cert file password was obtained and worked (any HTTP + response means that the SSL connection was established.) */ + if (handler->conn->ssl_client_pw_auth_state) + { + SVN_ERR(svn_auth_save_credentials(handler->conn->ssl_client_pw_auth_state, + handler->session->pool)); + handler->conn->ssl_client_pw_auth_state = NULL; + } + if (handler->conn->ssl_client_auth_state) + { + /* The cert file provider doesn't have any code to save creds so + this is currently a no-op. */ + SVN_ERR(svn_auth_save_credentials(handler->conn->ssl_client_auth_state, + handler->session->pool)); + handler->conn->ssl_client_auth_state = NULL; + } + /* We've been instructed to ignore the body. Drain whatever is present. */ if (handler->discard_body) { Index: contrib/subversion/subversion/libsvn_ra_svn/client.c =================================================================== --- contrib/subversion/subversion/libsvn_ra_svn/client.c +++ contrib/subversion/subversion/libsvn_ra_svn/client.c @@ -3105,6 +3105,7 @@ { svn_ra_svn__session_baton_t *sess_baton = session->priv; svn_ra_svn_conn_t *conn = sess_baton->conn; + svn_error_t *err; path = reparent_path(session, path, pool); @@ -3116,8 +3117,20 @@ SVN_ERR(handle_unsupported_cmd(handle_auth_request(sess_baton, pool), N_("'get-deleted-rev' not implemented"))); - return svn_error_trace(svn_ra_svn__read_cmd_response(conn, pool, "r", - revision_deleted)); + err = svn_error_trace(svn_ra_svn__read_cmd_response(conn, pool, "r", + revision_deleted)); + /* The protocol does not allow for a reply of SVN_INVALID_REVNUM directly. + Instead, a new enough server returns SVN_ERR_ENTRY_MISSING_REVISION to + indicate the answer to the query is SVN_INVALID_REVNUM. (An older server + closes the connection and returns SVN_ERR_RA_SVN_CONNECTION_CLOSED.) */ + if (err && err->apr_err == SVN_ERR_ENTRY_MISSING_REVISION) + { + *revision_deleted = SVN_INVALID_REVNUM; + svn_error_clear(err); + } + else + SVN_ERR(err); + return SVN_NO_ERROR; } static svn_error_t * Index: contrib/subversion/subversion/libsvn_repos/authz.h =================================================================== --- contrib/subversion/subversion/libsvn_repos/authz.h +++ contrib/subversion/subversion/libsvn_repos/authz.h @@ -139,6 +139,10 @@ svn_boolean_t has_authn_rights; authz_global_rights_t authn_rights; + /* Globally accumulated rights from inverted selectors. */ + svn_boolean_t has_neg_rights; + authz_global_rights_t neg_rights; + /* Globally accumulated rights, for all concrete users mentioned in the authz file. The key is the user name, the value is an authz_global_rights_t*. */ @@ -257,14 +261,19 @@ /* The parsed rule. */ authz_rule_t rule; - /* Access rights for anonymous users */ + + /* Access rights for anonymous users. */ svn_boolean_t has_anon_access; authz_access_t anon_access; - /* Access rights for authenticated users */ + /* Access rights for authenticated users. */ svn_boolean_t has_authn_access; authz_access_t authn_access; + /* Access rights from inverted selectors. */ + svn_boolean_t has_neg_access; + authz_access_t neg_access; + /* All other user- or group-specific access rights. Aliases are replaced with their definitions, rules for the same user or group are merged. */ Index: contrib/subversion/subversion/libsvn_repos/authz_info.c =================================================================== --- contrib/subversion/subversion/libsvn_repos/authz_info.c +++ contrib/subversion/subversion/libsvn_repos/authz_info.c @@ -148,37 +148,50 @@ { /* Check if we have explicit rights for anonymous access. */ if (authz->has_anon_rights) - return resolve_global_rights(rights_p, &authz->anon_rights, repos); + { + return resolve_global_rights(rights_p, &authz->anon_rights, repos); + } + else + { + /* Return the implicit rights, i.e., none. */ + rights_p->min_access = authz_access_none; + rights_p->max_access = authz_access_none; + return FALSE; + } } else { + svn_boolean_t combine_user_rights = FALSE; + svn_boolean_t access = FALSE; + /* Check if we have explicit rights for this user. */ const authz_global_rights_t *const user_rights = svn_hash_gets(authz->user_rights, user); if (user_rights) { - svn_boolean_t explicit - = resolve_global_rights(rights_p, user_rights, repos); - - /* Rights given to _any_ authenticated user may apply, too. */ - if (authz->has_authn_rights) - { - authz_rights_t authn; - explicit |= resolve_global_rights(&authn, &authz->authn_rights, - repos); - combine_rights(rights_p, rights_p, &authn); - } - return explicit; + access = resolve_global_rights(rights_p, user_rights, repos); + combine_user_rights = TRUE; + } + else if (authz->has_neg_rights) + { + /* Check if inverted-rule rights apply */ + access = resolve_global_rights(rights_p, &authz->neg_rights, repos); + combine_user_rights = TRUE; } - /* Check if we have explicit rights for authenticated access. */ + /* Rights given to _any_ authenticated user may apply, too. */ if (authz->has_authn_rights) - return resolve_global_rights(rights_p, &authz->authn_rights, repos); - } + { + authz_rights_t authn; + access |= resolve_global_rights(&authn, &authz->authn_rights, repos); - /* Fall-through: return the implicit rights, i.e., none. */ - rights_p->min_access = authz_access_none; - rights_p->max_access = authz_access_none; - return FALSE; + if (combine_user_rights) + combine_rights(rights_p, rights_p, &authn); + else + *rights_p = authn; + } + + return access; + } } Index: contrib/subversion/subversion/libsvn_repos/authz_parse.c =================================================================== --- contrib/subversion/subversion/libsvn_repos/authz_parse.c +++ contrib/subversion/subversion/libsvn_repos/authz_parse.c @@ -154,6 +154,8 @@ /* The authenticated access token. */ static const char authn_access_token[] = "$authenticated"; +/* Fake token for inverted rights. */ +static const char neg_access_token[] = "~~$inverted"; /* Initialize a rights structure. The minimum rights start with all available access and are later @@ -191,6 +193,8 @@ acl->acl.has_anon_access = TRUE; acl->acl.authn_access = authz_access_none; acl->acl.has_authn_access = TRUE; + acl->acl.neg_access = authz_access_none; + acl->acl.has_neg_access = TRUE; acl->acl.user_access = NULL; acl->aces = svn_hash__make(cb->parser_pool); acl->alias_aces = svn_hash__make(cb->parser_pool); @@ -208,6 +212,7 @@ authz_full_t *const authz = apr_pcalloc(result_pool, sizeof(*authz)); init_global_rights(&authz->anon_rights, anon_access_token, result_pool); init_global_rights(&authz->authn_rights, authn_access_token, result_pool); + init_global_rights(&authz->neg_rights, neg_access_token, result_pool); authz->user_rights = svn_hash__make(result_pool); authz->pool = result_pool; @@ -758,6 +763,8 @@ acl.acl.has_anon_access = FALSE; acl.acl.authn_access = authz_access_none; acl.acl.has_authn_access = FALSE; + acl.acl.neg_access = authz_access_none; + acl.acl.has_neg_access = FALSE; acl.acl.user_access = NULL; acl.aces = svn_hash__make(cb->parser_pool); @@ -958,6 +965,14 @@ if (!aliased && *ace->name != '@') prepare_global_rights(cb, ace->name); } + + /* Propagate rights for inverted selectors to the global rights, otherwise + an access check can bail out early. See: SVN-4793 */ + if (inverted) + { + acl->acl.has_neg_access = TRUE; + acl->acl.neg_access |= access; + } } return SVN_NO_ERROR; @@ -996,7 +1011,8 @@ /* Add a user to GROUP. - GROUP is never internalized, but USER always is. */ + GROUP is never internalized, but USER always is. + Adding a NULL user will create an empty group, if it doesn't exist. */ static void add_to_group(ctor_baton_t *cb, const char *group, const char *user) { @@ -1007,7 +1023,8 @@ members = svn_hash__make(cb->authz->pool); svn_hash_sets(cb->expanded_groups, group, members); } - svn_hash_sets(members, user, interned_empty_string); + if (user) + svn_hash_sets(members, user, interned_empty_string); } @@ -1023,8 +1040,15 @@ ctor_baton_t *const cb = baton; const char *const group = key; apr_array_header_t *members = value; - int i; + + if (0 == members->nelts) + { + /* Create the group with no members. */ + add_to_group(cb, group, NULL); + return SVN_NO_ERROR; + } + for (i = 0; i < members->nelts; ++i) { const char *member = APR_ARRAY_IDX(members, i, const char*); @@ -1058,14 +1082,15 @@ else { /* Recursively expand the group membership */ - members = svn_hash_gets(cb->parsed_groups, member); - if (!members) + apr_array_header_t *member_members + = svn_hash_gets(cb->parsed_groups, member); + if (!member_members) return svn_error_createf( SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("Undefined group '%s'"), member); SVN_ERR(expand_group_callback(cb, key, klen, - members, scratch_pool)); + member_members, scratch_pool)); } } return SVN_NO_ERROR; @@ -1153,10 +1178,18 @@ SVN_ERR_ASSERT(ace->members == NULL); ace->members = svn_hash_gets(iab->cb->expanded_groups, ace->name); if (!ace->members) - return svn_error_createf( - SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, - _("Access entry refers to undefined group '%s'"), - ace->name); + { + return svn_error_createf( + SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, + _("Access entry refers to undefined group '%s'"), + ace->name); + } + else if (0 == apr_hash_count(ace->members)) + { + /* TODO: Somehow emit a warning about the use of an empty group. */ + /* An ACE for an empty group has no effect, so ignore it. */ + return SVN_NO_ERROR; + } } APR_ARRAY_PUSH(iab->ace_array, authz_ace_t) = *ace; @@ -1270,6 +1303,12 @@ update_global_rights(&cb->authz->authn_rights, acl->rule.repos, acl->authn_access); } + if (acl->has_neg_access) + { + cb->authz->has_neg_rights = TRUE; + update_global_rights(&cb->authz->neg_rights, + acl->rule.repos, acl->neg_access); + } SVN_ERR(svn_iter_apr_hash(NULL, cb->authz->user_rights, update_user_rights, acl, scratch_pool)); return SVN_NO_ERROR; Index: contrib/subversion/subversion/libsvn_repos/dump.c =================================================================== --- contrib/subversion/subversion/libsvn_repos/dump.c +++ contrib/subversion/subversion/libsvn_repos/dump.c @@ -44,6 +44,7 @@ #include "private/svn_sorts_private.h" #include "private/svn_utf_private.h" #include "private/svn_cache.h" +#include "private/svn_fspath.h" #define ARE_VALID_COPY_ARGS(p,r) ((p) && SVN_IS_VALID_REVNUM(r)) @@ -1986,6 +1987,11 @@ { dump_filter_baton_t *b = baton; + /* For some nodes (e.g. files under copied directory) PATH may be + * non-canonical (missing leading '/'). Canonicalize PATH before + * passing it to FILTER_FUNC. */ + path = svn_fspath__canonicalize(path, pool); + return svn_error_trace(b->filter_func(allowed, root, path, b->filter_baton, pool)); } Index: contrib/subversion/subversion/libsvn_subr/error.c =================================================================== --- contrib/subversion/subversion/libsvn_subr/error.c +++ contrib/subversion/subversion/libsvn_subr/error.c @@ -146,6 +146,7 @@ /* Cleanup function for errors. svn_error_clear () removes this so errors that are properly handled *don't* hit this code. */ +#ifdef SVN_DEBUG static apr_status_t err_abort(void *data) { svn_error_t *err = data; /* For easy viewing in a debugger */ @@ -155,6 +156,7 @@ abort(); return APR_SUCCESS; } +#endif static svn_error_t * Index: contrib/subversion/subversion/libsvn_subr/io.c =================================================================== --- contrib/subversion/subversion/libsvn_subr/io.c +++ contrib/subversion/subversion/libsvn_subr/io.c @@ -342,8 +342,13 @@ /* Not using svn_io_stat() here because we want to check the apr_err return explicitly. */ SVN_ERR(cstring_from_utf8(&path_apr, path, pool)); - +#ifdef WIN32 + /* on Windows, svn does not handle reparse points or hard links. + So ignore the 'resolve_symlinks' flag. */ + flags = APR_FINFO_MIN; +#else flags = resolve_symlinks ? APR_FINFO_MIN : (APR_FINFO_MIN | APR_FINFO_LINK); +#endif apr_err = apr_stat(&finfo, path_apr, flags, pool); if (APR_STATUS_IS_ENOENT(apr_err)) @@ -1617,13 +1622,14 @@ that attempts to honor the users umask when dealing with permission changes. It is a no-op when invoked on a symlink. */ static svn_error_t * -io_set_file_perms(const char *path, - svn_boolean_t change_readwrite, - svn_boolean_t enable_write, - svn_boolean_t change_executable, - svn_boolean_t executable, - svn_boolean_t ignore_enoent, - apr_pool_t *pool) +io_set_perms(const char *path, + svn_boolean_t is_file, + svn_boolean_t change_readwrite, + svn_boolean_t enable_write, + svn_boolean_t change_executable, + svn_boolean_t executable, + svn_boolean_t ignore_enoent, + apr_pool_t *pool) { apr_status_t status; const char *path_apr; @@ -1643,9 +1649,16 @@ || SVN__APR_STATUS_IS_ENOTDIR(status))) return SVN_NO_ERROR; else if (status != APR_ENOTIMPL) - return svn_error_wrap_apr(status, - _("Can't change perms of file '%s'"), - svn_dirent_local_style(path, pool)); + { + if (is_file) + return svn_error_wrap_apr(status, + _("Can't change perms of file '%s'"), + svn_dirent_local_style(path, pool)); + else + return svn_error_wrap_apr(status, + _("Can't change perms of directory '%s'"), + svn_dirent_local_style(path, pool)); + } return SVN_NO_ERROR; } @@ -1745,10 +1758,50 @@ status = apr_file_attrs_set(path_apr, attrs, attrs_values, pool); } - return svn_error_wrap_apr(status, - _("Can't change perms of file '%s'"), - svn_dirent_local_style(path, pool)); + if (is_file) + { + return svn_error_wrap_apr(status, + _("Can't change perms of file '%s'"), + svn_dirent_local_style(path, pool)); + } + else + { + return svn_error_wrap_apr(status, + _("Can't change perms of directory '%s'"), + svn_dirent_local_style(path, pool)); + } } + +static svn_error_t * +io_set_file_perms(const char *path, + svn_boolean_t change_readwrite, + svn_boolean_t enable_write, + svn_boolean_t change_executable, + svn_boolean_t executable, + svn_boolean_t ignore_enoent, + apr_pool_t *pool) +{ + return svn_error_trace(io_set_perms(path, TRUE, + change_readwrite, enable_write, + change_executable, executable, + ignore_enoent, pool)); +} + +static svn_error_t * +io_set_dir_perms(const char *path, + svn_boolean_t change_readwrite, + svn_boolean_t enable_write, + svn_boolean_t change_executable, + svn_boolean_t executable, + svn_boolean_t ignore_enoent, + apr_pool_t *pool) +{ + return svn_error_trace(io_set_perms(path, FALSE, + change_readwrite, enable_write, + change_executable, executable, + ignore_enoent, pool)); +} + #endif /* !WIN32 && !__OS2__ */ #ifdef WIN32 @@ -2110,6 +2163,55 @@ return svn_io_set_file_read_only(path, ignore_enoent, pool); } +#if defined(WIN32) || defined(__OS2__) +/* Helper for svn_io_set_file_read_* */ +static svn_error_t * +io_set_readonly_flag(const char *path_apr, /* file-system path */ + const char *path, /* UTF-8 path */ + svn_boolean_t set_flag, + svn_boolean_t is_file, + svn_boolean_t ignore_enoent, + apr_pool_t *pool) +{ + apr_status_t status; + + status = apr_file_attrs_set(path_apr, + (set_flag ? APR_FILE_ATTR_READONLY : 0), + APR_FILE_ATTR_READONLY, + pool); + + if (status && status != APR_ENOTIMPL) + if (!(ignore_enoent && (APR_STATUS_IS_ENOENT(status) + || SVN__APR_STATUS_IS_ENOTDIR(status)))) + { + if (is_file) + { + if (set_flag) + return svn_error_wrap_apr(status, + _("Can't set file '%s' read-only"), + svn_dirent_local_style(path, pool)); + else + return svn_error_wrap_apr(status, + _("Can't set file '%s' read-write"), + svn_dirent_local_style(path, pool)); + } + else + { + if (set_flag) + return svn_error_wrap_apr(status, + _("Can't set directory '%s' read-only"), + svn_dirent_local_style(path, pool)); + else + return svn_error_wrap_apr(status, + _("Can't set directory '%s' read-write"), + svn_dirent_local_style(path, pool)); + } + } + return SVN_NO_ERROR; +} +#endif + + svn_error_t * svn_io_set_file_read_only(const char *path, svn_boolean_t ignore_enoent, @@ -2121,24 +2223,11 @@ return io_set_file_perms(path, TRUE, FALSE, FALSE, FALSE, ignore_enoent, pool); #else - apr_status_t status; const char *path_apr; SVN_ERR(cstring_from_utf8(&path_apr, path, pool)); - - status = apr_file_attrs_set(path_apr, - APR_FILE_ATTR_READONLY, - APR_FILE_ATTR_READONLY, - pool); - - if (status && status != APR_ENOTIMPL) - if (!(ignore_enoent && (APR_STATUS_IS_ENOENT(status) - || SVN__APR_STATUS_IS_ENOTDIR(status)))) - return svn_error_wrap_apr(status, - _("Can't set file '%s' read-only"), - svn_dirent_local_style(path, pool)); - - return SVN_NO_ERROR; + return io_set_readonly_flag(path_apr, path, + TRUE, TRUE, ignore_enoent, pool); #endif } @@ -2154,23 +2243,11 @@ return io_set_file_perms(path, TRUE, TRUE, FALSE, FALSE, ignore_enoent, pool); #else - apr_status_t status; const char *path_apr; SVN_ERR(cstring_from_utf8(&path_apr, path, pool)); - - status = apr_file_attrs_set(path_apr, - 0, - APR_FILE_ATTR_READONLY, - pool); - - if (status && status != APR_ENOTIMPL) - if (!ignore_enoent || !APR_STATUS_IS_ENOENT(status)) - return svn_error_wrap_apr(status, - _("Can't set file '%s' read-write"), - svn_dirent_local_style(path, pool)); - - return SVN_NO_ERROR; + return io_set_readonly_flag(path_apr, path, + FALSE, TRUE, ignore_enoent, pool); #endif } @@ -2541,9 +2618,10 @@ { apr_finfo_t finfo = { 0 }; - /* In some cases we get size 0 and no error for non files, - so we also check for the name. (= cached in apr_file_t) */ - if (! apr_file_info_get(&finfo, APR_FINFO_SIZE, file) && finfo.fname) + /* In some cases we get size 0 and no error for non files, so we + also check for the name. (= cached in apr_file_t) and for FIFOs */ + if (! apr_file_info_get(&finfo, APR_FINFO_SIZE | APR_FINFO_TYPE, file) + && finfo.fname && finfo.filetype != APR_PIPE) { /* we've got the file length. Now, read it in one go. */ svn_boolean_t eof; @@ -2746,6 +2824,12 @@ return svn_error_trace(err); } + /* On Unix, nothing can be removed from a non-writable directory. */ +#if !defined(WIN32) && !defined(__OS2__) + SVN_ERR(io_set_dir_perms(path, TRUE, TRUE, FALSE, FALSE, + ignore_enoent, pool)); +#endif + for (hi = apr_hash_first(subpool, dirents); hi; hi = apr_hash_next(hi)) { const char *name = apr_hash_this_key(hi); @@ -4484,8 +4568,17 @@ { svn_boolean_t retry = TRUE; + if (APR_STATUS_IS_EACCES(status) || APR_STATUS_IS_EEXIST(status)) + { + /* Make the destination directory writable because Windows + forbids deleting read-only items. */ + SVN_ERR(io_set_readonly_flag(dirname_apr, dirname, + FALSE, FALSE, TRUE, pool)); + status = apr_dir_remove(dirname_apr, pool); + } + if (status == APR_FROM_OS_ERROR(ERROR_DIR_NOT_EMPTY)) - { + { apr_status_t empty_status = dir_is_empty(dirname_apr, pool); if (APR_STATUS_IS_ENOTEMPTY(empty_status)) Index: contrib/subversion/subversion/libsvn_subr/opt.c =================================================================== --- contrib/subversion/subversion/libsvn_subr/opt.c +++ contrib/subversion/subversion/libsvn_subr/opt.c @@ -1119,8 +1119,10 @@ return svn_cmdline_printf(pool, "%s\n", SVN_VER_NUMBER); SVN_ERR(svn_cmdline_printf(pool, _("%s, version %s\n" - " compiled on %s\n\n"), + " compiled %s, %s on %s\n\n"), pgm_name, SVN_VERSION, + svn_version_ext_build_date(info), + svn_version_ext_build_time(info), svn_version_ext_build_host(info))); SVN_ERR(svn_cmdline_printf(pool, "%s\n", svn_version_ext_copyright(info))); Index: contrib/subversion/subversion/libsvn_subr/sqlite3wrapper.c =================================================================== --- contrib/subversion/subversion/libsvn_subr/sqlite3wrapper.c +++ contrib/subversion/subversion/libsvn_subr/sqlite3wrapper.c @@ -41,6 +41,12 @@ # endif # endif # ifdef __APPLE__ + /* SQLite uses OSAtomicCompareAndSwapPtrBarrier from libkern/OSAtomic.h, + which has been deprecated since macOS 10.12. This will silence the + warning. */ +# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) +# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +# endif # include # if __MAC_OS_X_VERSION_MIN_REQUIRED < 1060 /* is included on OS X by sqlite3.c, and Index: contrib/subversion/subversion/libsvn_subr/ssl_client_cert_pw_providers.c =================================================================== --- contrib/subversion/subversion/libsvn_subr/ssl_client_cert_pw_providers.c +++ contrib/subversion/subversion/libsvn_subr/ssl_client_cert_pw_providers.c @@ -36,7 +36,7 @@ #include "svn_private_config.h" /*-----------------------------------------------------------------------*/ -/* File provider */ +/* File password provider */ /*-----------------------------------------------------------------------*/ /* Baton type for the ssl client cert passphrase provider. */ @@ -51,6 +51,13 @@ apr_hash_t *plaintext_answers; } ssl_client_cert_pw_file_provider_baton_t; +/* The client cert password provider only deals with a password and + realm (the client cert filename), there is no username. The gnome + keyring backend based on libsecret requires a non-NULL username so + we have to invent one. An empty string is acceptable and doesn't + change the value stored by the kwallet backend. */ +#define DUMMY_USERNAME "" + /* This implements the svn_auth__password_get_t interface. Set **PASSPHRASE to the plaintext passphrase retrieved from CREDS; ignore other parameters. */ @@ -132,7 +139,8 @@ svn_boolean_t done; SVN_ERR(passphrase_get(&done, &password, creds_hash, realmstring, - NULL, parameters, non_interactive, pool)); + DUMMY_USERNAME, parameters, non_interactive, + pool)); if (!done) password = NULL; } @@ -293,7 +301,7 @@ if (may_save_passphrase) { SVN_ERR(passphrase_set(saved, creds_hash, realmstring, - NULL, creds->password, parameters, + DUMMY_USERNAME, creds->password, parameters, non_interactive, pool)); if (*saved && passtype) Index: contrib/subversion/subversion/libsvn_subr/version.c =================================================================== --- contrib/subversion/subversion/libsvn_subr/version.c +++ contrib/subversion/subversion/libsvn_subr/version.c @@ -139,11 +139,11 @@ { svn_version_extended_t *info = apr_pcalloc(pool, sizeof(*info)); - info->build_date = NULL; - info->build_time = NULL; + info->build_date = __DATE__; + info->build_time = __TIME__; info->build_host = SVN_BUILD_HOST; info->copyright = apr_pstrdup - (pool, _("Copyright (C) 2018 The Apache Software Foundation.\n" + (pool, _("Copyright (C) 2019 The Apache Software Foundation.\n" "This software consists of contributions made by many people;\n" "see the NOTICE file for more information.\n" "Subversion is open source software, see " Index: contrib/subversion/subversion/libsvn_wc/update_editor.c =================================================================== --- contrib/subversion/subversion/libsvn_wc/update_editor.c +++ contrib/subversion/subversion/libsvn_wc/update_editor.c @@ -1454,7 +1454,7 @@ * Therefore, we need to start a separate crawl here. */ SVN_ERR(svn_wc__node_has_local_mods(&modified, NULL, - eb->db, local_abspath, FALSE, + eb->db, local_abspath, TRUE, eb->cancel_func, eb->cancel_baton, scratch_pool)); Index: contrib/subversion/subversion/libsvn_wc/wc-checks.h =================================================================== --- contrib/subversion/subversion/libsvn_wc/wc-checks.h +++ contrib/subversion/subversion/libsvn_wc/wc-checks.h @@ -1,4 +1,4 @@ -/* This file is automatically generated from wc-checks.sql and /opt/svnrm/tempdir/subversion-1.10.0/subversion/libsvn_wc/token-map.h. +/* This file is automatically generated from wc-checks.sql and /opt/svnrm-1.10/tempdir/subversion-1.10.6/subversion/libsvn_wc/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_VERIFICATION_TRIGGERS 0 Index: contrib/subversion/subversion/libsvn_wc/wc-metadata.h =================================================================== --- contrib/subversion/subversion/libsvn_wc/wc-metadata.h +++ contrib/subversion/subversion/libsvn_wc/wc-metadata.h @@ -1,4 +1,4 @@ -/* This file is automatically generated from wc-metadata.sql and /opt/svnrm/tempdir/subversion-1.10.0/subversion/libsvn_wc/token-map.h. +/* This file is automatically generated from wc-metadata.sql and /opt/svnrm-1.10/tempdir/subversion-1.10.6/subversion/libsvn_wc/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_CREATE_SCHEMA 0 Index: contrib/subversion/subversion/libsvn_wc/wc_db_update_move.c =================================================================== --- contrib/subversion/subversion/libsvn_wc/wc_db_update_move.c +++ contrib/subversion/subversion/libsvn_wc/wc_db_update_move.c @@ -2169,11 +2169,12 @@ while (have_row) { svn_revnum_t node_revision = svn_sqlite__column_revnum(stmt, 2); - const char *child_relpath = svn_sqlite__column_text(stmt, 0, NULL); + const char *child_relpath; const char *relpath; svn_pool_clear(iterpool); + child_relpath = svn_sqlite__column_text(stmt, 0, iterpool); relpath = svn_relpath_skip_ancestor(local_relpath, child_relpath); relpath = svn_relpath_join(repos_relpath, relpath, iterpool); Index: contrib/subversion/subversion/svn/help-cmd.c =================================================================== --- contrib/subversion/subversion/svn/help-cmd.c +++ contrib/subversion/subversion/svn/help-cmd.c @@ -166,7 +166,7 @@ pool); #endif } -#ifdef SVN_HAVE_GNOME_KEYRING +#if (defined(SVN_HAVE_GNOME_KEYRING) || defined(SVN_HAVE_LIBSECRET)) svn_stringbuf_appendcstr(version_footer, "* Gnome Keyring\n"); #endif #ifdef SVN_HAVE_GPG_AGENT Index: contrib/subversion/subversion/svn_private_config.h.in =================================================================== --- contrib/subversion/subversion/svn_private_config.h.in +++ contrib/subversion/subversion/svn_private_config.h.in @@ -124,9 +124,6 @@ /* Defined to build against httpd 2.4 with broken auth */ #undef SVN_ALLOW_BROKEN_HTTPD_AUTH -/* Define to the Python/C API format character suitable for apr_int64_t */ -#undef SVN_APR_INT64_T_PYCFMT - /* Defined to be the path to the installed binaries */ #undef SVN_BINDIR Index: contrib/subversion/subversion/svnadmin/svnadmin.c =================================================================== --- contrib/subversion/subversion/svnadmin/svnadmin.c +++ contrib/subversion/subversion/svnadmin/svnadmin.c @@ -2191,15 +2191,16 @@ check_cancel, NULL, pool)); /* Show the --keep-going error summary. */ - if (!opt_state->quiet - && opt_state->keep_going - && verify_baton.error_summary->nelts > 0) + if (opt_state->keep_going && verify_baton.error_summary->nelts > 0) { int rev_maxlength; svn_revnum_t end_revnum; apr_pool_t *iterpool; int i; + if (feedback_stream == NULL) /* happens when we are in --quiet mode */ + feedback_stream = recode_stream_create(stdout, pool); + svn_error_clear( svn_stream_puts(feedback_stream, _("\n-----Summary of corrupt revisions-----\n"))); Index: contrib/subversion/subversion/svndumpfilter/svndumpfilter.c =================================================================== --- contrib/subversion/subversion/svndumpfilter/svndumpfilter.c +++ contrib/subversion/subversion/svndumpfilter/svndumpfilter.c @@ -530,7 +530,8 @@ { return svn_error_createf (SVN_ERR_INCOMPLETE_DATA, 0, - _("Invalid copy source path '%s'"), copyfrom_path); + _("Invalid copy source path '%s' for '%s'"), + copyfrom_path, node_path); } } @@ -611,7 +612,8 @@ if (! (cf_renum_val && SVN_IS_VALID_REVNUM(cf_renum_val->rev))) return svn_error_createf (SVN_ERR_NODE_UNEXPECTED_KIND, NULL, - _("No valid copyfrom revision in filtered stream")); + _("No valid copyfrom revision in filtered stream for '%s'"), + node_path); svn_repos__dumpfile_header_pushf( nb->headers, SVN_REPOS_DUMPFILE_NODE_COPYFROM_REV, "%ld", cf_renum_val->rev); Index: contrib/subversion/subversion/svnserve/serve.c =================================================================== --- contrib/subversion/subversion/svnserve/serve.c +++ contrib/subversion/subversion/svnserve/serve.c @@ -3505,8 +3505,21 @@ svn_relpath_canonicalize(path, pool), pool); SVN_ERR(log_command(b, conn, pool, "get-deleted-rev")); SVN_ERR(trivial_auth_request(conn, pool, b)); - SVN_ERR(svn_repos_deleted_rev(b->repository->fs, full_path, peg_revision, - end_revision, &revision_deleted, pool)); + SVN_CMD_ERR(svn_repos_deleted_rev(b->repository->fs, full_path, peg_revision, + end_revision, &revision_deleted, pool)); + + /* The protocol does not allow for a reply of SVN_INVALID_REVNUM directly. + Instead, return SVN_ERR_ENTRY_MISSING_REVISION. A new enough client + knows that this means the answer to the query is SVN_INVALID_REVNUM. + (An older client reports this as an error.) */ + if (revision_deleted == SVN_INVALID_REVNUM) + SVN_CMD_ERR(svn_error_createf(SVN_ERR_ENTRY_MISSING_REVISION, NULL, + "svn protocol command 'get-deleted-rev': " + "path '%s' was not deleted in r%ld-%ld; " + "NOTE: newer clients handle this case " + "and do not report it as an error", + full_path, peg_revision, end_revision)); + SVN_ERR(svn_ra_svn__write_cmd_response(conn, pool, "r", revision_deleted)); return SVN_NO_ERROR; } @@ -4101,7 +4114,7 @@ serve_params_t *params, apr_pool_t *scratch_pool) { - svn_error_t *err, *io_err; + svn_error_t *err; apr_uint64_t ver; const char *client_url, *ra_client_string, *client_string; svn_ra_svn__list_t *caplist; @@ -4239,11 +4252,12 @@ } if (err) { - log_error(err, b); - io_err = svn_ra_svn__write_cmd_failure(conn, scratch_pool, err); - svn_error_clear(err); - SVN_ERR(io_err); - return svn_ra_svn__flush(conn, scratch_pool); + /* Report these errors to the client before closing the connection. */ + err = svn_error_compose_create(err, + svn_ra_svn__write_cmd_failure(conn, scratch_pool, err)); + err = svn_error_compose_create(err, + svn_ra_svn__flush(conn, scratch_pool)); + return err; } SVN_ERR(svn_fs_get_uuid(b->repository->fs, &b->repository->uuid, Index: usr.bin/svn/lib/libapr/Makefile =================================================================== --- usr.bin/svn/lib/libapr/Makefile +++ usr.bin/svn/lib/libapr/Makefile @@ -18,7 +18,8 @@ shm.c signals.c sockaddr.c socket_util.c sockets.c \ sockopt.c solaris.c start.c tempdir.c thread.c thread_cond.c \ thread_mutex.c thread_rwlock.c threadpriv.c time.c \ - timestr.c userinfo.c version.c waitio.c z_asio.c + timestr.c userinfo.c version.c waitio.c z_asio.c \ + apr_cstr.c apr_encode.c builtins64.c mutex64.c wakeup.c .PATH: ${APR}/atomic/unix ${APR}/dso/unix ${APR}/file_io/unix \ ${APR}/locks/unix ${APR}/memory/unix ${APR}/misc/unix \ @@ -26,9 +27,9 @@ ${APR}/poll/unix ${APR}/random/unix ${APR}/shmem/unix \ ${APR}/strings ${APR}/support/unix ${APR}/tables \ ${APR}/threadproc/unix ${APR}/time/unix ${APR}/user/unix \ - ${APR}/include + ${APR}/include ${APR}/encoding CFLAGS+= -DHAVE_CONFIG_H -I${.CURDIR} \ - -I${APR}/include/arch/unix -I${APR}/include + -I${APR}/include/arch/unix -I${APR}/include -I${APR}/include/private .include