Compare commits
No commits in common. 'i8c' and 'c9' have entirely different histories.
@ -1 +1 @@
|
||||
4f3aa8d8204a2674868b9d485c11349e1848987d SOURCES/apr-1.6.3.tar.bz2
|
||||
58ebc7b35efaebb211c0b9df594ab16c4d874234 SOURCES/apr-1.7.0.tar.bz2
|
||||
|
@ -1 +1 @@
|
||||
SOURCES/apr-1.6.3.tar.bz2
|
||||
SOURCES/apr-1.7.0.tar.bz2
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- apr-1.2.2/test/testlock.c.locktimeout
|
||||
+++ apr-1.2.2/test/testlock.c
|
||||
@@ -295,7 +295,7 @@
|
||||
continue;
|
||||
}
|
||||
ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_TIMEUP(s));
|
||||
- ABTS_ASSERT(tc, "Timer returned too late", end - begin - timeout < 100000);
|
||||
+ ABTS_ASSERT(tc, "Timer returned too late", end - begin - timeout < 500000);
|
||||
break;
|
||||
}
|
||||
ABTS_ASSERT(tc, "Too many retries", i < MAX_RETRY);
|
@ -1,171 +0,0 @@
|
||||
# ./pullrev.sh 1834495
|
||||
http://svn.apache.org/viewvc?view=revision&revision=1834495
|
||||
|
||||
--- apr-1.6.3/buildconf
|
||||
+++ apr-1.6.3/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
|
||||
--- apr-1.6.3/build/gen-build.py
|
||||
+++ apr-1.6.3/build/gen-build.py
|
||||
@@ -10,7 +10,10 @@
|
||||
|
||||
|
||||
import os
|
||||
-import ConfigParser
|
||||
+try:
|
||||
+ import configparser
|
||||
+except ImportError:
|
||||
+ import ConfigParser as configparser
|
||||
import getopt
|
||||
import string
|
||||
import glob
|
||||
@@ -36,7 +39,7 @@
|
||||
|
||||
|
||||
def main():
|
||||
- parser = ConfigParser.ConfigParser()
|
||||
+ parser = configparser.ConfigParser()
|
||||
parser.read('build.conf')
|
||||
|
||||
if parser.has_option('options', 'dsp'):
|
||||
@@ -62,7 +65,7 @@
|
||||
# write out the platform-independent files
|
||||
files = get_files(parser.get('options', 'paths'))
|
||||
objects, dirs = write_objects(f, legal_deps, h_deps, files)
|
||||
- f.write('\nOBJECTS_all = %s\n\n' % string.join(objects))
|
||||
+ f.write('\nOBJECTS_all = %s\n\n' % " ".join(objects))
|
||||
|
||||
# for each platform and each subdirectory holding platform-specific files,
|
||||
# write out their compilation rules, and an OBJECT_<subdir>_<plat> symbol.
|
||||
@@ -86,11 +89,11 @@
|
||||
inherit_files[-1] = inherit_files[-1][:-2] + '.lo'
|
||||
# replace the \\'s with /'s
|
||||
inherit_line = '/'.join(inherit_files)
|
||||
- if not inherit_parent.has_key(inherit_files[0]):
|
||||
+ if inherit_files[0] not in inherit_parent:
|
||||
inherit_parent[inherit_files[0]] = []
|
||||
inherit_parent[inherit_files[0]].append(inherit_line)
|
||||
|
||||
- for subdir in string.split(parser.get('options', 'platform_dirs')):
|
||||
+ for subdir in parser.get('options', 'platform_dirs').split():
|
||||
path = '%s/%s' % (subdir, platform)
|
||||
if not os.path.exists(path):
|
||||
# this subdir doesn't have a subdir for this platform, so we'll
|
||||
@@ -106,7 +109,7 @@
|
||||
files = get_files(path + '/*.c')
|
||||
objects, _unused = write_objects(f, legal_deps, h_deps, files)
|
||||
|
||||
- if inherit_parent.has_key(subdir):
|
||||
+ if subdir in inherit_parent:
|
||||
objects = objects + inherit_parent[subdir]
|
||||
|
||||
symname = 'OBJECTS_%s_%s' % (subdir, platform)
|
||||
@@ -114,7 +117,7 @@
|
||||
objects.sort()
|
||||
|
||||
# and write the symbol for the whole group
|
||||
- f.write('\n%s = %s\n\n' % (symname, string.join(objects)))
|
||||
+ f.write('\n%s = %s\n\n' % (symname, " ".join(objects)))
|
||||
|
||||
# and include that symbol in the group
|
||||
group.append('$(%s)' % symname)
|
||||
@@ -122,18 +125,18 @@
|
||||
group.sort()
|
||||
|
||||
# write out a symbol which contains the necessary files
|
||||
- f.write('OBJECTS_%s = %s\n\n' % (platform, string.join(group)))
|
||||
+ f.write('OBJECTS_%s = %s\n\n' % (platform, " ".join(group)))
|
||||
|
||||
- f.write('HEADERS = $(top_srcdir)/%s\n\n' % string.join(headers, ' $(top_srcdir)/'))
|
||||
- f.write('SOURCE_DIRS = %s $(EXTRA_SOURCE_DIRS)\n\n' % string.join(dirs.keys()))
|
||||
+ f.write('HEADERS = $(top_srcdir)/%s\n\n' % ' $(top_srcdir)/'.join(headers))
|
||||
+ f.write('SOURCE_DIRS = %s $(EXTRA_SOURCE_DIRS)\n\n' % " ".join(dirs.keys()))
|
||||
|
||||
if parser.has_option('options', 'modules'):
|
||||
modules = parser.get('options', 'modules')
|
||||
|
||||
- for mod in string.split(modules):
|
||||
+ for mod in modules.split():
|
||||
files = get_files(parser.get(mod, 'paths'))
|
||||
objects, _unused = write_objects(f, legal_deps, h_deps, files)
|
||||
- flat_objects = string.join(objects)
|
||||
+ flat_objects = " ".join(objects)
|
||||
f.write('OBJECTS_%s = %s\n' % (mod, flat_objects))
|
||||
|
||||
if parser.has_option(mod, 'target'):
|
||||
@@ -153,9 +156,9 @@
|
||||
d = os.path.dirname(d)
|
||||
|
||||
# Sort so 'foo' is before 'foo/bar'
|
||||
- keys = alldirs.keys()
|
||||
+ keys = list(alldirs.keys())
|
||||
keys.sort()
|
||||
- f.write('BUILD_DIRS = %s\n\n' % string.join(keys))
|
||||
+ f.write('BUILD_DIRS = %s\n\n' % " ".join(keys))
|
||||
|
||||
f.write('.make.dirs: $(srcdir)/build-outputs.mk\n' \
|
||||
'\t@for d in $(BUILD_DIRS); do test -d $$d || mkdir $$d; done\n' \
|
||||
@@ -177,12 +180,12 @@
|
||||
|
||||
# what headers does this file include, along with the implied headers
|
||||
deps = extract_deps(file, legal_deps)
|
||||
- for hdr in deps.keys():
|
||||
+ for hdr in list(deps.keys()):
|
||||
deps.update(h_deps.get(hdr, {}))
|
||||
|
||||
- vals = deps.values()
|
||||
+ vals = list(deps.values())
|
||||
vals.sort()
|
||||
- f.write('%s: %s .make.dirs %s\n' % (obj, file, string.join(vals)))
|
||||
+ f.write('%s: %s .make.dirs %s\n' % (obj, file, " ".join(vals)))
|
||||
|
||||
objects.sort()
|
||||
|
||||
@@ -210,7 +213,7 @@
|
||||
for hdr, deps in header_deps.items():
|
||||
# print hdr, deps
|
||||
start = len(deps)
|
||||
- for dep in deps.keys():
|
||||
+ for dep in list(deps.keys()):
|
||||
deps.update(header_deps.get(dep, {}))
|
||||
if len(deps) != start:
|
||||
altered = 1
|
||||
@@ -220,7 +223,7 @@
|
||||
|
||||
def get_files(patterns):
|
||||
files = [ ]
|
||||
- for pat in string.split(patterns):
|
||||
+ for pat in patterns.split():
|
||||
files.extend(map(clean_path, glob.glob(pat)))
|
||||
files.sort()
|
||||
return files
|
||||
--- apr-1.6.3/build/buildcheck.sh
|
||||
+++ apr-1.6.3/build/buildcheck.sh
|
||||
@@ -4,7 +4,7 @@
|
||||
res=0
|
||||
|
||||
# any python
|
||||
-python=`build/PrintPath python`
|
||||
+python=${PYTHON-`build/PrintPath python3 python2 python`}
|
||||
if test -z "$python"; then
|
||||
echo "buildconf: python not found."
|
||||
echo " You need python installed"
|
||||
@@ -11,7 +11,7 @@
|
||||
echo " to build APR from SVN."
|
||||
res=1
|
||||
else
|
||||
- py_version=`python -c 'import sys; print sys.version' 2>&1|sed 's/ .*//;q'`
|
||||
+ py_version=`$python -c 'import sys; print(sys.version)' 2>&1|sed 's/ .*//;q'`
|
||||
echo "buildconf: python version $py_version (ok)"
|
||||
fi
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,239 @@
|
||||
# ./pullrev.sh 1891269 1891198 1891196
|
||||
http://svn.apache.org/viewvc?view=revision&revision=1891269
|
||||
http://svn.apache.org/viewvc?view=revision&revision=1891198
|
||||
http://svn.apache.org/viewvc?view=revision&revision=1891196
|
||||
|
||||
--- apr-1.7.0/include/arch/unix/apr_arch_thread_mutex.h
|
||||
+++ apr-1.7.0/include/arch/unix/apr_arch_thread_mutex.h
|
||||
@@ -33,8 +33,10 @@
|
||||
struct apr_thread_mutex_t {
|
||||
apr_pool_t *pool;
|
||||
pthread_mutex_t mutex;
|
||||
+#ifndef HAVE_PTHREAD_MUTEX_TIMEDLOCK
|
||||
apr_thread_cond_t *cond;
|
||||
int locked, num_waiters;
|
||||
+#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
--- apr-1.7.0/locks/unix/thread_mutex.c
|
||||
+++ apr-1.7.0/locks/unix/thread_mutex.c
|
||||
@@ -102,6 +102,7 @@
|
||||
{
|
||||
apr_status_t rv;
|
||||
|
||||
+#ifndef HAVE_PTHREAD_MUTEX_TIMEDLOCK
|
||||
if (mutex->cond) {
|
||||
apr_status_t rv2;
|
||||
|
||||
@@ -133,6 +134,7 @@
|
||||
|
||||
return rv;
|
||||
}
|
||||
+#endif
|
||||
|
||||
rv = pthread_mutex_lock(&mutex->mutex);
|
||||
#ifdef HAVE_ZOS_PTHREADS
|
||||
@@ -148,6 +150,7 @@
|
||||
{
|
||||
apr_status_t rv;
|
||||
|
||||
+#ifndef HAVE_PTHREAD_MUTEX_TIMEDLOCK
|
||||
if (mutex->cond) {
|
||||
apr_status_t rv2;
|
||||
|
||||
@@ -177,6 +180,7 @@
|
||||
|
||||
return rv;
|
||||
}
|
||||
+#endif
|
||||
|
||||
rv = pthread_mutex_trylock(&mutex->mutex);
|
||||
if (rv) {
|
||||
@@ -281,6 +285,7 @@
|
||||
{
|
||||
apr_status_t status;
|
||||
|
||||
+#ifndef HAVE_PTHREAD_MUTEX_TIMEDLOCK
|
||||
if (mutex->cond) {
|
||||
status = pthread_mutex_lock(&mutex->mutex);
|
||||
if (status) {
|
||||
@@ -303,6 +308,7 @@
|
||||
|
||||
mutex->locked = 0;
|
||||
}
|
||||
+#endif
|
||||
|
||||
status = pthread_mutex_unlock(&mutex->mutex);
|
||||
#ifdef HAVE_ZOS_PTHREADS
|
||||
@@ -318,9 +324,12 @@
|
||||
{
|
||||
apr_status_t rv, rv2 = APR_SUCCESS;
|
||||
|
||||
+#ifndef HAVE_PTHREAD_MUTEX_TIMEDLOCK
|
||||
if (mutex->cond) {
|
||||
rv2 = apr_thread_cond_destroy(mutex->cond);
|
||||
}
|
||||
+#endif
|
||||
+
|
||||
rv = apr_pool_cleanup_run(mutex->pool, mutex, thread_mutex_cleanup);
|
||||
if (rv == APR_SUCCESS) {
|
||||
rv = rv2;
|
||||
--- apr-1.7.0/random/unix/sha2.c
|
||||
+++ apr-1.7.0/random/unix/sha2.c
|
||||
@@ -425,7 +425,7 @@
|
||||
usedspace = freespace = 0;
|
||||
}
|
||||
|
||||
-void apr__SHA256_Final(sha2_byte digest[], SHA256_CTX* context) {
|
||||
+void apr__SHA256_Final(sha2_byte digest[SHA256_DIGEST_LENGTH], SHA256_CTX* context) {
|
||||
sha2_word32 *d = (sha2_word32*)digest;
|
||||
unsigned int usedspace;
|
||||
|
||||
@@ -496,7 +496,7 @@
|
||||
usedspace = 0;
|
||||
}
|
||||
|
||||
-char *apr__SHA256_End(SHA256_CTX* context, char buffer[]) {
|
||||
+char *apr__SHA256_End(SHA256_CTX* context, char buffer[SHA256_DIGEST_STRING_LENGTH]) {
|
||||
sha2_byte digest[SHA256_DIGEST_LENGTH], *d = digest;
|
||||
int i;
|
||||
|
||||
--- apr-1.7.0/time/unix/time.c
|
||||
+++ apr-1.7.0/time/unix/time.c
|
||||
@@ -142,6 +142,9 @@
|
||||
static const int dayoffset[12] =
|
||||
{306, 337, 0, 31, 61, 92, 122, 153, 184, 214, 245, 275};
|
||||
|
||||
+ if (xt->tm_mon < 0 || xt->tm_mon >= 12)
|
||||
+ return APR_EBADDATE;
|
||||
+
|
||||
/* shift new year to 1st March in order to make leap year calc easy */
|
||||
|
||||
if (xt->tm_mon < 2)
|
||||
--- apr-1.7.0/time/win32/time.c
|
||||
+++ apr-1.7.0/time/win32/time.c
|
||||
@@ -54,6 +54,9 @@
|
||||
static const int dayoffset[12] =
|
||||
{0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};
|
||||
|
||||
+ if (tm->wMonth < 1 || tm->wMonth > 12)
|
||||
+ return APR_EBADDATE;
|
||||
+
|
||||
/* Note; the caller is responsible for filling in detailed tm_usec,
|
||||
* tm_gmtoff and tm_isdst data when applicable.
|
||||
*/
|
||||
@@ -228,6 +231,9 @@
|
||||
static const int dayoffset[12] =
|
||||
{306, 337, 0, 31, 61, 92, 122, 153, 184, 214, 245, 275};
|
||||
|
||||
+ if (xt->tm_mon < 0 || xt->tm_mon >= 12)
|
||||
+ return APR_EBADDATE;
|
||||
+
|
||||
/* shift new year to 1st March in order to make leap year calc easy */
|
||||
|
||||
if (xt->tm_mon < 2)
|
||||
--- apr-1.7.0/file_io/unix/readwrite.c
|
||||
+++ apr-1.7.0/file_io/unix/readwrite.c
|
||||
@@ -146,7 +146,7 @@
|
||||
|
||||
APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, apr_size_t *nbytes)
|
||||
{
|
||||
- apr_size_t rv;
|
||||
+ apr_size_t rv = APR_SUCCESS;
|
||||
|
||||
if (thefile->buffered) {
|
||||
char *pos = (char *)buf;
|
||||
@@ -160,13 +160,14 @@
|
||||
* logically reading from
|
||||
*/
|
||||
apr_int64_t offset = thefile->filePtr - thefile->dataRead + thefile->bufpos;
|
||||
- if (offset != thefile->filePtr)
|
||||
- lseek(thefile->filedes, offset, SEEK_SET);
|
||||
+ if (offset != thefile->filePtr) {
|
||||
+ thefile->filePtr = lseek(thefile->filedes, offset, SEEK_SET);
|
||||
+ if (thefile->filePtr == -1) rv = errno;
|
||||
+ }
|
||||
thefile->bufpos = thefile->dataRead = 0;
|
||||
thefile->direction = 1;
|
||||
}
|
||||
|
||||
- rv = 0;
|
||||
while (rv == 0 && size > 0) {
|
||||
if (thefile->bufpos == thefile->bufsize) /* write buffer is full*/
|
||||
rv = apr_file_flush_locked(thefile);
|
||||
@@ -244,12 +245,15 @@
|
||||
*/
|
||||
apr_int64_t offset = thefile->filePtr - thefile->dataRead +
|
||||
thefile->bufpos;
|
||||
- if (offset != thefile->filePtr)
|
||||
- lseek(thefile->filedes, offset, SEEK_SET);
|
||||
+ if (offset != thefile->filePtr) {
|
||||
+ thefile->filePtr = lseek(thefile->filedes, offset, SEEK_SET);
|
||||
+ if (thefile->filePtr == -1) rv = errno;
|
||||
+ }
|
||||
thefile->bufpos = thefile->dataRead = 0;
|
||||
}
|
||||
|
||||
file_unlock(thefile);
|
||||
+ if (rv) return rv;
|
||||
}
|
||||
|
||||
if ((bytes = writev(thefile->filedes, vec, nvec)) < 0) {
|
||||
--- apr-1.7.0/locks/unix/proc_mutex.c
|
||||
+++ apr-1.7.0/locks/unix/proc_mutex.c
|
||||
@@ -1518,11 +1518,10 @@
|
||||
|
||||
APR_DECLARE(const char *) apr_proc_mutex_defname(void)
|
||||
{
|
||||
- apr_status_t rv;
|
||||
apr_proc_mutex_t mutex;
|
||||
|
||||
- if ((rv = proc_mutex_choose_method(&mutex, APR_LOCK_DEFAULT,
|
||||
- NULL)) != APR_SUCCESS) {
|
||||
+ if (proc_mutex_choose_method(&mutex, APR_LOCK_DEFAULT,
|
||||
+ NULL) != APR_SUCCESS) {
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
--- apr-1.7.0/memory/unix/apr_pools.c
|
||||
+++ apr-1.7.0/memory/unix/apr_pools.c
|
||||
@@ -1338,7 +1338,7 @@
|
||||
apr_size_t free_index;
|
||||
|
||||
pool_concurrency_set_used(pool);
|
||||
- ps.node = active = pool->active;
|
||||
+ ps.node = pool->active;
|
||||
ps.pool = pool;
|
||||
ps.vbuff.curpos = ps.node->first_avail;
|
||||
|
||||
--- apr-1.7.0/test/teststr.c
|
||||
+++ apr-1.7.0/test/teststr.c
|
||||
@@ -394,6 +394,19 @@
|
||||
ABTS_STR_EQUAL(tc, apr_cstr_skip_prefix("", "12"), NULL);
|
||||
}
|
||||
|
||||
+static void pstrcat(abts_case *tc, void *data)
|
||||
+{
|
||||
+ ABTS_STR_EQUAL(tc, apr_pstrcat(p, "a", "bc", "def", NULL),
|
||||
+ "abcdef");
|
||||
+ ABTS_STR_EQUAL(tc, apr_pstrcat(p, NULL), "");
|
||||
+ ABTS_STR_EQUAL(tc, apr_pstrcat(p,
|
||||
+ "a", "b", "c", "d", "e",
|
||||
+ "f", "g", "h", "i", "j",
|
||||
+ "1", "2", "3", "4", "5",
|
||||
+ NULL),
|
||||
+ "abcdefghij12345");
|
||||
+}
|
||||
+
|
||||
abts_suite *teststr(abts_suite *suite)
|
||||
{
|
||||
suite = ADD_SUITE(suite)
|
||||
@@ -412,6 +425,7 @@
|
||||
abts_run_test(suite, string_cpystrn, NULL);
|
||||
abts_run_test(suite, snprintf_overflow, NULL);
|
||||
abts_run_test(suite, skip_prefix, NULL);
|
||||
+ abts_run_test(suite, pstrcat, NULL);
|
||||
|
||||
return suite;
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
# ./pullrev.sh 1894167
|
||||
http://svn.apache.org/viewvc?view=revision&revision=1894167
|
||||
|
||||
--- apr-1.7.0/build/apr_network.m4
|
||||
+++ apr-1.7.0/build/apr_network.m4
|
||||
@@ -906,8 +906,16 @@
|
||||
dnl
|
||||
AC_DEFUN([APR_CHECK_SCTP],
|
||||
[
|
||||
- AC_CACHE_CHECK([whether SCTP is supported], [apr_cv_sctp], [
|
||||
- AC_TRY_RUN([
|
||||
+AC_ARG_ENABLE([sctp],
|
||||
+ APR_HELP_STRING([--disable-sctp], [disable SCTP protocol support]),
|
||||
+ [apr_wants_sctp=$enableval],
|
||||
+ [apr_wants_sctp=any])
|
||||
+
|
||||
+if test "$apr_wants_sctp" = no; then
|
||||
+ apr_cv_sctp=no
|
||||
+else
|
||||
+ AC_CACHE_CHECK([whether SCTP is supported], [apr_cv_sctp], [
|
||||
+ AC_TRY_RUN([
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
@@ -932,7 +940,12 @@
|
||||
exit(2);
|
||||
exit(0);
|
||||
}], [apr_cv_sctp=yes], [apr_cv_sctp=no], [apr_cv_sctp=no])])
|
||||
+fi
|
||||
|
||||
+if test "${apr_wants_sctp}X${apr_cv_sctp}" = yesXno; then
|
||||
+ AC_MSG_ERROR([SCTP support requested but not available])
|
||||
+fi
|
||||
+
|
||||
if test "$apr_cv_sctp" = "yes"; then
|
||||
have_sctp=1
|
||||
else
|
@ -1,20 +0,0 @@
|
||||
diff -ur apr-1.6.3.orig/test/teststr.c apr-1.6.3/test/teststr.c
|
||||
--- apr-1.6.3.orig/test/teststr.c 2016-03-03 17:11:16.000000000 +0100
|
||||
+++ apr-1.6.3/test/teststr.c 2018-01-29 18:54:44.748931098 +0100
|
||||
@@ -307,10 +307,15 @@
|
||||
for (; off < 999999999; off += 999) {
|
||||
apr_strfsize(off, buf);
|
||||
}
|
||||
- for (off = 1; off < LONG_MAX && off > 0; off *= 2) {
|
||||
+
|
||||
+ off = 1;
|
||||
+ while (1) {
|
||||
apr_strfsize(off, buf);
|
||||
apr_strfsize(off + 1, buf);
|
||||
apr_strfsize(off - 1, buf);
|
||||
+ if (off > LONG_MAX / 2)
|
||||
+ break;
|
||||
+ off *= 2;
|
||||
}
|
||||
|
||||
ABTS_ASSERT(tc, "strfsize overflowed", buf[5] == '$');
|
Loading…
Reference in new issue