Vendor import apr-util-1.5.4 - a minor bug fix release.

This commit is contained in:
Peter Wemm 2014-09-24 18:12:23 +00:00
parent 5bf7090be4
commit f5bbf7923e
11 changed files with 109 additions and 45 deletions

26
CHANGES
View File

@ -1,4 +1,30 @@
-*- coding: utf-8 -*-
Changes with APR-util 1.5.4
*) MySQL driver: Fix incorrect handling of bad parameter in the
driver support for apr_dbd_transaction_end(). PR 56330.
[Weiqiang Li <weiqiang_li hotmail.com>]
*) apr_crypto_get_driver(): Fix invalid storage reference on error path.
[Philip Martin <philip.martin wandisco.com>]
*) Fix compile failure for Android. PR 56627. [Fredrik Fornwall
<fredrik fornwall.net>, Jeff Trawick]
*) Fix to let ODBC driver build with MSVC6, which does not have intptr_t
[Tom Donovan]
*) 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]
*) Fix detection of Berkeley DB 6.0. PR 55277.
[Lars Wendler <polynomial-c gentoo.org>]
*) Improve platform detection for bundled expat by updating
config.guess and config.sub. [Rainer Jung]
Changes with APR-util 1.5.3
*) Cygwin: Use correct file extension when loading APR DSOs. PR 55587.

4
NOTICE
View File

@ -1,7 +1,7 @@
Apache Portable Runtime Utility Library
Copyright (c) 2011 The Apache Software Foundation.
Copyright (c) 2000-2014 The Apache Software Foundation.
This product includes software developed by
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
Portions of this software were developed at the National Center

View File

@ -3,7 +3,7 @@
Summary: Apache Portable Runtime Utility library
Name: apr-util
Version: 1.5.3
Version: 1.5.4
Release: 1
License: Apache Software License
Group: System Environment/Libraries

63
configure vendored
View File

@ -11608,19 +11608,34 @@ fi
apu_db_version=0
# Maximum supported version announced in help string.
# Although we search for all versions up to 5.9,
# Although we search for all versions up to 6.9,
# we should only include existing versions in our
# help string.
db_max_version=53
db_min_version=41
dbm_list="sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4"
db_max_version=48
db_min_version=41
db_version="$db_min_version"
while [ $db_version -le $db_max_version ]
do
dbm_list="$dbm_list, db$db_version"
db_version=`expr $db_version + 1`
done
db_max_version=53
db_min_version=50
db_version="$db_min_version"
while [ $db_version -le $db_max_version ]
do
dbm_list="$dbm_list, db$db_version"
db_version=`expr $db_version + 1`
done
db_max_version=60
db_min_version=60
db_version="$db_min_version"
while [ $db_version -le $db_max_version ]
do
dbm_list="$dbm_list, db$db_version"
db_version=`expr $db_version + 1`
done
dbm_list="$dbm_list, db60"
# Check whether --with-dbm was given.
@ -12093,8 +12108,8 @@ if test "${with_berkeley_db+set}" = set; then :
all_places="$check_places"
# Start version search at version 5.9
db_version=59
# Start version search at version 6.9
db_version=69
while [ $db_version -ge 40 ]
do
db_major=`echo $db_version | sed -e 's/.$//'`
@ -12178,7 +12193,7 @@ $as_echo "" >&6; }
ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5"; then
if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5" -o ""${db_major}"" = "6"; then
# We generate a separate cache variable for each prefix and libname
# we search under. That way, we avoid caching information that
# changes if the user runs `configure' with a different set of
@ -12580,7 +12595,7 @@ $as_echo "" >&6; }
ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
if test "3" = "3" -o "3" = "4" -o "3" = "5"; then
if test "3" = "3" -o "3" = "4" -o "3" = "5" -o "3" = "6"; then
# We generate a separate cache variable for each prefix and libname
# we search under. That way, we avoid caching information that
# changes if the user runs `configure' with a different set of
@ -12978,7 +12993,7 @@ $as_echo "" >&6; }
ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
if test "2" = "3" -o "2" = "4" -o "2" = "5"; then
if test "2" = "3" -o "2" = "4" -o "2" = "5" -o "2" = "6"; then
# We generate a separate cache variable for each prefix and libname
# we search under. That way, we avoid caching information that
# changes if the user runs `configure' with a different set of
@ -13376,7 +13391,7 @@ $as_echo "" >&6; }
ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
if test "1" = "3" -o "1" = "4" -o "1" = "5"; then
if test "1" = "3" -o "1" = "4" -o "1" = "5" -o "1" = "6"; then
# We generate a separate cache variable for each prefix and libname
# we search under. That way, we avoid caching information that
# changes if the user runs `configure' with a different set of
@ -13774,7 +13789,7 @@ $as_echo "" >&6; }
ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
if test "1" = "3" -o "1" = "4" -o "1" = "5"; then
if test "1" = "3" -o "1" = "4" -o "1" = "5" -o "1" = "6"; then
# We generate a separate cache variable for each prefix and libname
# we search under. That way, we avoid caching information that
# changes if the user runs `configure' with a different set of
@ -14186,7 +14201,7 @@ $as_echo "" >&6; }
ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
if test "1" = "3" -o "1" = "4" -o "1" = "5"; then
if test "1" = "3" -o "1" = "4" -o "1" = "5" -o "1" = "6"; then
# We generate a separate cache variable for each prefix and libname
# we search under. That way, we avoid caching information that
# changes if the user runs `configure' with a different set of
@ -14587,7 +14602,7 @@ $as_echo "" >&6; }
ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
if test "1" = "3" -o "1" = "4" -o "1" = "5"; then
if test "1" = "3" -o "1" = "4" -o "1" = "5" -o "1" = "6"; then
# We generate a separate cache variable for each prefix and libname
# we search under. That way, we avoid caching information that
# changes if the user runs `configure' with a different set of
@ -14988,7 +15003,7 @@ $as_echo "" >&6; }
ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
if test "2" = "3" -o "2" = "4" -o "2" = "5"; then
if test "2" = "3" -o "2" = "4" -o "2" = "5" -o "2" = "6"; then
# We generate a separate cache variable for each prefix and libname
# we search under. That way, we avoid caching information that
# changes if the user runs `configure' with a different set of
@ -15389,7 +15404,7 @@ $as_echo "" >&6; }
ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
if test "3" = "3" -o "3" = "4" -o "3" = "5"; then
if test "3" = "3" -o "3" = "4" -o "3" = "5" -o "3" = "6"; then
# We generate a separate cache variable for each prefix and libname
# we search under. That way, we avoid caching information that
# changes if the user runs `configure' with a different set of
@ -15794,7 +15809,7 @@ $as_echo "" >&6; }
ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5"; then
if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5" -o ""${db_major}"" = "6"; then
# We generate a separate cache variable for each prefix and libname
# we search under. That way, we avoid caching information that
# changes if the user runs `configure' with a different set of
@ -16202,7 +16217,7 @@ $as_echo "" >&6; }
ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5"; then
if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5" -o ""${db_major}"" = "6"; then
# We generate a separate cache variable for each prefix and libname
# we search under. That way, we avoid caching information that
# changes if the user runs `configure' with a different set of
@ -16534,8 +16549,8 @@ fi
all_places="$check_places"
# Start version search at version 5.9
db_version=59
# Start version search at version 6.9
db_version=69
while [ $db_version -ge 40 ]
do
db_major=`echo $db_version | sed -e 's/.$//'`
@ -16619,7 +16634,7 @@ $as_echo "" >&6; }
ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5"; then
if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5" -o ""${db_major}"" = "6"; then
# We generate a separate cache variable for each prefix and libname
# we search under. That way, we avoid caching information that
# changes if the user runs `configure' with a different set of
@ -17021,7 +17036,7 @@ $as_echo "" >&6; }
ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
if test "3" = "3" -o "3" = "4" -o "3" = "5"; then
if test "3" = "3" -o "3" = "4" -o "3" = "5" -o "3" = "6"; then
# We generate a separate cache variable for each prefix and libname
# we search under. That way, we avoid caching information that
# changes if the user runs `configure' with a different set of
@ -17419,7 +17434,7 @@ $as_echo "" >&6; }
ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
if test "2" = "3" -o "2" = "4" -o "2" = "5"; then
if test "2" = "3" -o "2" = "4" -o "2" = "5" -o "2" = "6"; then
# We generate a separate cache variable for each prefix and libname
# we search under. That way, we avoid caching information that
# changes if the user runs `configure' with a different set of
@ -17817,7 +17832,7 @@ $as_echo "" >&6; }
ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
if test "1" = "3" -o "1" = "4" -o "1" = "5"; then
if test "1" = "3" -o "1" = "4" -o "1" = "5" -o "1" = "6"; then
# We generate a separate cache variable for each prefix and libname
# we search under. That way, we avoid caching information that
# changes if the user runs `configure' with a different set of
@ -18215,7 +18230,7 @@ $as_echo "" >&6; }
ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
if test "1" = "3" -o "1" = "4" -o "1" = "5"; then
if test "1" = "3" -o "1" = "4" -o "1" = "5" -o "1" = "6"; then
# We generate a separate cache variable for each prefix and libname
# we search under. That way, we avoid caching information that
# changes if the user runs `configure' with a different set of

View File

@ -204,7 +204,7 @@ APU_DECLARE(apr_status_t) apr_crypto_get_driver(
if (err && buffer) {
apr_dso_error(dso, buffer, ERROR_SIZE - 1);
err->msg = buffer;
err->reason = modname;
err->reason = apr_pstrdup(pool, modname);
*result = err;
}
}

View File

@ -66,6 +66,12 @@ static void crypt_mutex_unlock(void)
#endif
#endif
#if defined(WIN32) || defined(BEOS) || defined(NETWARE) || defined(__ANDROID__)
#define CRYPT_MISSING 1
#else
#define CRYPT_MISSING 0
#endif
/*
* Validate a plaintext password against a smashed one. Uses either
* crypt() (if available) or apr_md5_encode() or apr_sha1_base64(), depending
@ -77,7 +83,7 @@ APU_DECLARE(apr_status_t) apr_password_validate(const char *passwd,
const char *hash)
{
char sample[200];
#if !defined(WIN32) && !defined(BEOS) && !defined(NETWARE)
#if !CRYPT_MISSING
char *crypt_pw;
#endif
if (hash[0] == '$'
@ -100,7 +106,7 @@ APU_DECLARE(apr_status_t) apr_password_validate(const char *passwd,
/*
* It's not our algorithm, so feed it to crypt() if possible.
*/
#if defined(WIN32) || defined(BEOS) || defined(NETWARE)
#if CRYPT_MISSING
return (strcmp(passwd, hash) == 0) ? APR_SUCCESS : APR_EMISMATCH;
#elif defined(CRYPT_R_CRYPTD)
apr_status_t rv;

View File

@ -1050,9 +1050,9 @@ static int dbd_mysql_end_transaction(apr_dbd_transaction_t *trans)
else {
ret = mysql_commit(trans->handle->conn);
}
ret |= mysql_autocommit(trans->handle->conn, 1);
trans->handle->trans = NULL;
}
ret |= mysql_autocommit(trans->handle->conn, 1);
trans->handle->trans = NULL;
return ret;
}
/* Whether or not transactions work depends on whether the

View File

@ -47,6 +47,21 @@
#include <odbc/sqlext.h>
#endif
/*
* MSVC6 does not support intptr_t (C99)
* APR does not have a signed inptr type until 2.0 (r1557720)
*/
#if defined(_MSC_VER) && _MSC_VER < 1400
#if APR_SIZEOF_VOIDP == 8
#define ODBC_INTPTR_T apr_int64_t
#else
#define ODBC_INTPTR_T apr_int32_t
#endif
#else
#define ODBC_INTPTR_T intptr_t
#endif
/* Driver name is "odbc" and the entry point is 'apr_dbd_odbc_driver'
* unless ODBC_DRIVER_NAME is defined and it is linked with another db library which
* is ODBC source-compatible. e.g. DB2, Informix, TimesTen, mysql.
@ -114,9 +129,9 @@ struct apr_dbd_t
char lastError[MAX_ERROR_STRING];
int defaultBufferSize; /* used for CLOBs in text mode,
* and when fld size is indeterminate */
intptr_t transaction_mode;
intptr_t dboptions; /* driver options re SQLGetData */
intptr_t default_transaction_mode;
ODBC_INTPTR_T transaction_mode;
ODBC_INTPTR_T dboptions; /* driver options re SQLGetData */
ODBC_INTPTR_T default_transaction_mode;
int can_commit; /* controls end_trans behavior */
};
@ -359,7 +374,7 @@ static SQLRETURN odbc_set_result_column(int icol, apr_dbd_results_t *res,
SQLHANDLE stmt)
{
SQLRETURN rc;
intptr_t maxsize, textsize, realsize, type, isunsigned = 1;
ODBC_INTPTR_T maxsize, textsize, realsize, type, isunsigned = 1;
/* discover the sql type */
rc = SQLColAttribute(stmt, icol + 1, SQL_DESC_UNSIGNED, NULL, 0, NULL,
@ -747,7 +762,7 @@ static void *odbc_get(const apr_dbd_row_t *row, const int col,
SQLRETURN rc;
SQLLEN indicator;
int state = row->res->colstate[col];
intptr_t options = row->res->apr_dbd->dboptions;
ODBC_INTPTR_T options = row->res->apr_dbd->dboptions;
switch (state) {
case (COL_UNAVAIL):
@ -817,13 +832,13 @@ static apr_status_t odbc_parse_params(apr_pool_t *pool, const char *params,
int *connect, SQLCHAR **datasource,
SQLCHAR **user, SQLCHAR **password,
int *defaultBufferSize, int *nattrs,
int **attrs, intptr_t **attrvals)
int **attrs, ODBC_INTPTR_T **attrvals)
{
char *seps, *last, *next, *name[MAX_PARAMS], *val[MAX_PARAMS];
int nparams = 0, i, j;
*attrs = apr_pcalloc(pool, MAX_PARAMS * sizeof(char *));
*attrvals = apr_pcalloc(pool, MAX_PARAMS * sizeof(intptr_t));
*attrvals = apr_pcalloc(pool, MAX_PARAMS * sizeof(ODBC_INTPTR_T));
*nattrs = 0;
seps = DEFAULTSEPS;
name[nparams] = apr_strtok(apr_pstrdup(pool, params), seps, &last);
@ -1063,7 +1078,7 @@ static apr_dbd_t *odbc_open(apr_pool_t *pool, const char *params, const char **e
SQLCHAR *datasource = (SQLCHAR *)"", *user = (SQLCHAR *)"",
*password = (SQLCHAR *)"";
int nattrs = 0, *attrs = NULL, connect = 0;
intptr_t *attrvals = NULL;
ODBC_INTPTR_T *attrvals = NULL;
err_step = "SQLAllocHandle (SQL_HANDLE_DBC)";
err_htype = SQL_HANDLE_ENV;
@ -1117,10 +1132,10 @@ static apr_dbd_t *odbc_open(apr_pool_t *pool, const char *params, const char **e
handle->default_transaction_mode = 0;
handle->can_commit = APR_DBD_TRANSACTION_IGNORE_ERRORS;
SQLGetInfo(hdbc, SQL_DEFAULT_TXN_ISOLATION,
&(handle->default_transaction_mode), sizeof(intptr_t), NULL);
&(handle->default_transaction_mode), sizeof(ODBC_INTPTR_T), NULL);
handle->transaction_mode = handle->default_transaction_mode;
SQLGetInfo(hdbc, SQL_GETDATA_EXTENSIONS ,&(handle->dboptions),
sizeof(intptr_t), NULL);
sizeof(ODBC_INTPTR_T), NULL);
apr_pool_cleanup_register(pool, handle, odbc_close_cleanup, apr_pool_cleanup_null);
return handle;
}

View File

@ -235,7 +235,7 @@ nlms :: libs $(TARGET_nlm)
# correct place. (See $(AP_WORK)\build\NWGNUhead.inc for examples)
#
install :: nlms $(INSTDIRS) FORCE
copy $(OBJDIR)\*.nlm $(INSTALLBASE)
$(call COPY,$(OBJDIR)/*.nlm,$(INSTALLBASE))
#
# Any specialized rules here

View File

@ -38,7 +38,7 @@
*/
#define APU_COPYRIGHT "Copyright (c) 2013 The Apache Software " \
#define APU_COPYRIGHT "Copyright (c) 2000-2014 The Apache Software " \
"Foundation or its licensors, as applicable."
/* The numeric compile-time version constants. These constants are the
@ -62,7 +62,7 @@
* The Patch Level never includes API changes, simply bug fixes.
* Reset to 0 when upgrading APR_MINOR_VERSION
*/
#define APU_PATCH_VERSION 3
#define APU_PATCH_VERSION 4
/**
* The symbol APU_IS_DEV_VERSION is only defined for internal,

View File

@ -88,6 +88,8 @@ APROUTDIR=$(OUTDIR)
!IF "$(MODEL)" == "static"
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