SOURCES: apr-branch.patch (NEW) + *) Bugfix for apr_pollset_poll(...

arekm arekm at pld-linux.org
Wed Dec 21 14:10:04 CET 2005


Author: arekm                        Date: Wed Dec 21 13:10:04 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
+  *) Bugfix for apr_pollset_poll() on systems that implement pollsets
+     using select(2): properly compute the number of signalled desciptors
+     when one or more of them are both readable and writable.
+     [Dror Shilo <Dror.Shilo ericom.com>, Gerry <gerry everythingsucks.co.uk>]
+
+  *) Fix apr_file_seek() to catch write failures when flushing
+     pending writes for a buffered file.  [Joe Orton]

---- Files affected:
SOURCES:
   apr-branch.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/apr-branch.patch
diff -u /dev/null SOURCES/apr-branch.patch:1.1
--- /dev/null	Wed Dec 21 14:10:04 2005
+++ SOURCES/apr-branch.patch	Wed Dec 21 14:09:59 2005
@@ -0,0 +1,849 @@
+Index: strings/apr_cpystrn.c
+===================================================================
+--- strings/apr_cpystrn.c	(.../tags/1.2.2)	(wersja 358281)
++++ strings/apr_cpystrn.c	(.../branches/1.2.x)	(wersja 358281)
+@@ -169,6 +169,7 @@
+ 
+     /*  determine first argument */
+     for (argnum = 0; argnum < (numargs-1); argnum++) {
++        SKIP_WHITESPACE(cp);
+         CHECK_QUOTATION(cp, isquoted);
+         ct = cp;
+         DETERMINE_NEXTSTRING(cp, isquoted);
+@@ -177,7 +178,6 @@
+         apr_cpystrn((*argv_out)[argnum], ct, cp - ct);
+         cleaned = dirty = (*argv_out)[argnum];
+         REMOVE_ESCAPE_CHARS(cleaned, dirty, escaped);
+-        SKIP_WHITESPACE(cp);
+     }
+     (*argv_out)[argnum] = NULL;
+ 
+Index: CHANGES
+===================================================================
+--- CHANGES	(.../tags/1.2.2)	(wersja 358281)
++++ CHANGES	(.../branches/1.2.x)	(wersja 358281)
+@@ -1,3 +1,13 @@
++Changes for APR 1.2.3-dev
++
++  *) Bugfix for apr_pollset_poll() on systems that implement pollsets
++     using select(2): properly compute the number of signalled desciptors
++     when one or more of them are both readable and writable.
++     [Dror Shilo <Dror.Shilo ericom.com>, Gerry <gerry everythingsucks.co.uk>]
++
++  *) Fix apr_file_seek() to catch write failures when flushing
++     pending writes for a buffered file.  [Joe Orton]
++
+ Changes for APR 1.2.2
+ 
+   *) Fix crash in apr_dir_make_recursive() for relative path
+Index: test/testsock.c
+===================================================================
+--- test/testsock.c	(.../tags/1.2.2)	(wersja 358281)
++++ test/testsock.c	(.../branches/1.2.x)	(wersja 358281)
+@@ -84,6 +84,9 @@
+ 
+     rv = apr_socket_create(&sock, sa->family, SOCK_STREAM, APR_PROTO_TCP, p);
+     APR_ASSERT_SUCCESS(tc, "Problem creating socket", rv);
++
++    rv = apr_socket_opt_set(sock, APR_SO_REUSEADDR, 1);
++    APR_ASSERT_SUCCESS(tc, "Could not set REUSEADDR on socket", rv);
+     
+     rv = apr_socket_bind(sock, sa);
+     APR_ASSERT_SUCCESS(tc, "Problem binding to port", rv);
+Index: test/testdir.c
+===================================================================
+--- test/testdir.c	(.../tags/1.2.2)	(wersja 358281)
++++ test/testdir.c	(.../branches/1.2.x)	(wersja 358281)
+@@ -222,6 +222,7 @@
+ static void test_rmkdir_nocwd(abts_case *tc, void *data)
+ {
+     char *cwd, *path;
++    apr_status_t rv;
+ 
+     APR_ASSERT_SUCCESS(tc, "make temp dir",
+                        apr_dir_make("dir3", APR_OS_DEFAULT, p));
+@@ -233,13 +234,20 @@
+ 
+     APR_ASSERT_SUCCESS(tc, "change to temp dir", apr_filepath_set(path, p));
+ 
+-    APR_ASSERT_SUCCESS(tc, "remove temp dir", apr_dir_remove(path, p));
++    rv = apr_dir_remove(path, p);
++    /* Some platforms cannot remove a directory which is in use. */
++    if (rv == APR_SUCCESS) {
++        ABTS_ASSERT(tc, "fail to create dir",
++                    apr_dir_make_recursive("foobar", APR_OS_DEFAULT, 
++                                           p) != APR_SUCCESS);
++    }
+ 
+-    ABTS_ASSERT(tc, "fail to create dir",
+-                apr_dir_make_recursive("foobar", APR_OS_DEFAULT, 
+-                                       p) != APR_SUCCESS);
++    APR_ASSERT_SUCCESS(tc, "restore cwd", apr_filepath_set(cwd, p));
+ 
+-    APR_ASSERT_SUCCESS(tc, "restore cwd", apr_filepath_set(cwd, p));
++    if (rv) {
++        apr_dir_remove(path, p);
++        ABTS_NOT_IMPL(tc, "cannot remove in-use directory");
++    }
+ }
+ 
+ 
+Index: test/testfile.c
+===================================================================
+--- test/testfile.c	(.../tags/1.2.2)	(wersja 358281)
++++ test/testfile.c	(.../branches/1.2.x)	(wersja 358281)
+@@ -766,6 +766,16 @@
+     ABTS_ASSERT(tc, "gets should flush buffered write and fail",
+                 rv != APR_SUCCESS && rv != APR_EOF);
+ 
++    /* Likewise for seek. */
++    {
++        apr_off_t offset = 0;
++
++        rv = apr_file_seek(f, APR_SET, &offset);
++    }
++
++    ABTS_ASSERT(tc, "seek should flush buffered write and fail",
++                rv != APR_SUCCESS && rv != APR_EOF);
++
+     apr_file_close(f);
+ }
+ 
+Index: test/testpoll.c
+===================================================================
+--- test/testpoll.c	(.../tags/1.2.2)	(wersja 358281)
++++ test/testpoll.c	(.../branches/1.2.x)	(wersja 358281)
+@@ -290,6 +290,43 @@
+     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
+ }
+ 
++static void multi_event_pollset(abts_case *tc, void *data)
++{
++    apr_status_t rv;
++    apr_pollfd_t socket_pollfd;
++    int lrv;
++    const apr_pollfd_t *descs = NULL;
++
++    ABTS_PTR_NOTNULL(tc, s[0]);
++    socket_pollfd.desc_type = APR_POLL_SOCKET;
++    socket_pollfd.reqevents = APR_POLLIN | APR_POLLOUT;
++    socket_pollfd.desc.s = s[0];
++    socket_pollfd.client_data = s[0];
++    rv = apr_pollset_add(pollset, &socket_pollfd);
++    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
++
++    send_msg(s, sa, 0, tc);
++
++    rv = apr_pollset_poll(pollset, 0, &lrv, &descs);
++    ABTS_INT_EQUAL(tc, 0, APR_STATUS_IS_TIMEUP(rv));
++    ABTS_INT_EQUAL(tc, 1, lrv);
++    ABTS_PTR_EQUAL(tc, s[0], descs[0].desc.s);
++    ABTS_INT_EQUAL(tc, APR_POLLIN | APR_POLLOUT, descs[0].rtnevents);
++    ABTS_PTR_EQUAL(tc, s[0],  descs[0].client_data);
++
++    recv_msg(s, 0, p, tc);
++
++    rv = apr_pollset_poll(pollset, 0, &lrv, &descs);
++    ABTS_INT_EQUAL(tc, 0, APR_STATUS_IS_TIMEUP(rv));
++    ABTS_INT_EQUAL(tc, 1, lrv);
++    ABTS_PTR_EQUAL(tc, s[0], descs[0].desc.s);
++    ABTS_INT_EQUAL(tc, APR_POLLOUT, descs[0].rtnevents);
++    ABTS_PTR_EQUAL(tc, s[0],  descs[0].client_data);
++
++    rv = apr_pollset_remove(pollset, &socket_pollfd);
++    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
++}
++                         
+ static void add_sockets_pollset(abts_case *tc, void *data)
+ {
+     apr_status_t rv;
+@@ -520,6 +557,7 @@
+ #endif
+ 
+     abts_run_test(suite, setup_pollset, NULL);
++    abts_run_test(suite, multi_event_pollset, NULL);
+     abts_run_test(suite, add_sockets_pollset, NULL);
+     abts_run_test(suite, nomessage_pollset, NULL);
+     abts_run_test(suite, send0_pollset, NULL);
+Index: network_io/unix/sockaddr.c
+===================================================================
+--- network_io/unix/sockaddr.c	(.../tags/1.2.2)	(wersja 358281)
++++ network_io/unix/sockaddr.c	(.../branches/1.2.x)	(wersja 358281)
+@@ -596,6 +596,7 @@
+         IN6_IS_ADDR_V4MAPPED(&sockaddr->sa.sin6.sin6_addr)) {
+         struct sockaddr_in tmpsa;
+         tmpsa.sin_family = AF_INET;
++        tmpsa.sin_port = 0;
+         tmpsa.sin_addr.s_addr = ((apr_uint32_t *)sockaddr->ipaddr_ptr)[3];
+ #ifdef SIN6_LEN
+         tmpsa.sin_len = sizeof(tmpsa);
+Index: network_io/unix/sockets.c
+===================================================================
+--- network_io/unix/sockets.c	(.../tags/1.2.2)	(wersja 358281)
++++ network_io/unix/sockets.c	(.../branches/1.2.x)	(wersja 358281)
+@@ -422,7 +422,7 @@
+     return APR_SUCCESS;
+ }
+ 
+-APR_POOL_IMPLEMENT_ACCESSOR(socket);
++APR_POOL_IMPLEMENT_ACCESSOR(socket)
+ 
+ APR_IMPLEMENT_INHERIT_SET(socket, inherit, pool, socket_cleanup)
+ 
+Index: random/unix/sha2.h
+===================================================================
+--- random/unix/sha2.h	(.../tags/1.2.2)	(wersja 358281)
++++ random/unix/sha2.h	(.../branches/1.2.x)	(wersja 358281)
+@@ -57,23 +57,23 @@
+ 
+ 
+ /*** SHA-256/384/512 Function Prototypes ******************************/
+-void SHA256_Init(SHA256_CTX *);
+-void SHA256_Update(SHA256_CTX *, const apr_byte_t *, size_t);
+-void SHA256_Final(apr_byte_t [SHA256_DIGEST_LENGTH], SHA256_CTX *);
++void apr__SHA256_Init(SHA256_CTX *);
++void apr__SHA256_Update(SHA256_CTX *, const apr_byte_t *, size_t);
++void apr__SHA256_Final(apr_byte_t [SHA256_DIGEST_LENGTH], SHA256_CTX *);
+ char* SHA256_End(SHA256_CTX *, char [SHA256_DIGEST_STRING_LENGTH]);
+ char* SHA256_Data(const apr_byte_t *, size_t,
+                   char [SHA256_DIGEST_STRING_LENGTH]);
+ 
+-void SHA384_Init(SHA384_CTX *);
+-void SHA384_Update(SHA384_CTX *, const apr_byte_t *, size_t);
+-void SHA384_Final(apr_byte_t [SHA384_DIGEST_LENGTH], SHA384_CTX *);
++void apr__SHA384_Init(SHA384_CTX *);
++void apr__SHA384_Update(SHA384_CTX *, const apr_byte_t *, size_t);
++void apr__SHA384_Final(apr_byte_t [SHA384_DIGEST_LENGTH], SHA384_CTX *);
+ char* SHA384_End(SHA384_CTX *, char [SHA384_DIGEST_STRING_LENGTH]);
+ char* SHA384_Data(const apr_byte_t *, size_t,
+                   char [SHA384_DIGEST_STRING_LENGTH]);
+ 
+-void SHA512_Init(SHA512_CTX *);
+-void SHA512_Update(SHA512_CTX *, const apr_byte_t *, size_t);
+-void SHA512_Final(apr_byte_t [SHA512_DIGEST_LENGTH], SHA512_CTX *);
++void apr__SHA512_Init(SHA512_CTX *);
++void apr__SHA512_Update(SHA512_CTX *, const apr_byte_t *, size_t);
++void apr__SHA512_Final(apr_byte_t [SHA512_DIGEST_LENGTH], SHA512_CTX *);
+ char* SHA512_End(SHA512_CTX *, char [SHA512_DIGEST_STRING_LENGTH]);
+ char* SHA512_Data(const apr_byte_t *, size_t,
+                   char [SHA512_DIGEST_STRING_LENGTH]);
+Index: random/unix/sha2_glue.c
+===================================================================
+--- random/unix/sha2_glue.c	(.../tags/1.2.2)	(wersja 358281)
++++ random/unix/sha2_glue.c	(.../branches/1.2.x)	(wersja 358281)
+@@ -5,18 +5,18 @@
+ 
+ static void sha256_init(apr_crypto_hash_t *h)
+     {
+-    SHA256_Init(h->data);
++    apr__SHA256_Init(h->data);
+     }
+ 
+ static void sha256_add(apr_crypto_hash_t *h,const void *data,
+ 			  apr_size_t bytes)
+     {
+-    SHA256_Update(h->data,data,bytes);
++    apr__SHA256_Update(h->data,data,bytes);
+     }
+ 
+ static void sha256_finish(apr_crypto_hash_t *h,unsigned char *result)
+     {
+-    SHA256_Final(result,h->data);
++    apr__SHA256_Final(result,h->data);
+     }
+ 
+ APR_DECLARE(apr_crypto_hash_t *) apr_crypto_sha256_new(apr_pool_t *p)
+Index: random/unix/sha2.c
+===================================================================
+--- random/unix/sha2.c	(.../tags/1.2.2)	(wersja 358281)
++++ random/unix/sha2.c	(.../branches/1.2.x)	(wersja 358281)
+@@ -151,8 +151,8 @@
+  * only.
+  */
+ void SHA512_Last(SHA512_CTX*);
+-void SHA256_Transform(SHA256_CTX*, const sha2_word32*);
+-void SHA512_Transform(SHA512_CTX*, const sha2_word64*);
++void apr__SHA256_Transform(SHA256_CTX*, const sha2_word32*);
++void apr__SHA512_Transform(SHA512_CTX*, const sha2_word64*);
+ 
+ 
+ /*** SHA-XYZ INITIAL HASH VALUES AND CONSTANTS ************************/
+@@ -264,7 +264,7 @@
+ 
+ 
+ /*** SHA-256: *********************************************************/
+-void SHA256_Init(SHA256_CTX* context) {
++void apr__SHA256_Init(SHA256_CTX* context) {
+         if (context == (SHA256_CTX*)0) {
+                 return;
+         }
+@@ -310,7 +310,7 @@
+         (h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
+         j++
+ 
+-void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
++void apr__SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
+         sha2_word32     a, b, c, d, e, f, g, h, s0, s1;
+         sha2_word32     T1, *W256;
+         int             j;
+@@ -368,7 +368,7 @@
+ 
+ #else /* SHA2_UNROLL_TRANSFORM */
+ 
+-void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
++void apr__SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
+         sha2_word32     a, b, c, d, e, f, g, h, s0, s1;
+         sha2_word32     T1, T2, *W256;
+         int             j;
+@@ -448,7 +448,7 @@
+ 
+ #endif /* SHA2_UNROLL_TRANSFORM */
+ 
+-void SHA256_Update(SHA256_CTX* context, const sha2_byte *data, size_t len) {
++void apr__SHA256_Update(SHA256_CTX* context, const sha2_byte *data, size_t len) {
+         unsigned int    freespace, usedspace;
+ 
+         if (len == 0) {
+@@ -471,7 +471,7 @@
+                         context->bitcount += freespace << 3;
+                         len -= freespace;
+                         data += freespace;
+-                        SHA256_Transform(context, (sha2_word32*)context->buffer);
++                        apr__SHA256_Transform(context, (sha2_word32*)context->buffer);
+                 } else {
+                         /* The buffer is not yet full */
+                         MEMCPY_BCOPY(&context->buffer[usedspace], data, len);
+@@ -483,7 +483,7 @@
+         }
+         while (len >= SHA256_BLOCK_LENGTH) {
+                 /* Process as many complete blocks as we can */
+-                SHA256_Transform(context, (sha2_word32*)data);
++                apr__SHA256_Transform(context, (sha2_word32*)data);
+                 context->bitcount += SHA256_BLOCK_LENGTH << 3;
+                 len -= SHA256_BLOCK_LENGTH;
+                 data += SHA256_BLOCK_LENGTH;
+@@ -497,7 +497,7 @@
+         usedspace = freespace = 0;
+ }
+ 
+-void SHA256_Final(sha2_byte digest[], SHA256_CTX* context) {
++void apr__SHA256_Final(sha2_byte digest[], SHA256_CTX* context) {
+         sha2_word32     *d = (sha2_word32*)digest;
+         unsigned int    usedspace;
+ 
+@@ -524,7 +524,7 @@
+                                         MEMSET_BZERO(&context->buffer[usedspace], SHA256_BLOCK_LENGTH - usedspace);
+                                 }
+                                 /* Do second-to-last transform: */
+-                                SHA256_Transform(context, (sha2_word32*)context->buffer);
++                                apr__SHA256_Transform(context, (sha2_word32*)context->buffer);
+ 
+                                 /* And set-up for the last transform: */
+                                 MEMSET_BZERO(context->buffer, SHA256_SHORT_BLOCK_LENGTH);
+@@ -540,7 +540,7 @@
+                 *(sha2_word64*)&context->buffer[SHA256_SHORT_BLOCK_LENGTH] = context->bitcount;
+ 
+                 /* Final transform: */
+-                SHA256_Transform(context, (sha2_word32*)context->buffer);
++                apr__SHA256_Transform(context, (sha2_word32*)context->buffer);
+ 
+ #if !APR_IS_BIGENDIAN
+                 {
+@@ -569,7 +569,7 @@
+         assert(context != (SHA256_CTX*)0);
+ 
+         if (buffer != (char*)0) {
+-                SHA256_Final(digest, context);
++                apr__SHA256_Final(digest, context);
+ 
+                 for (i = 0; i < SHA256_DIGEST_LENGTH; i++) {
+                         *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
+@@ -587,14 +587,14 @@
+ char* SHA256_Data(const sha2_byte* data, size_t len, char digest[SHA256_DIGEST_STRING_LENGTH]) {
+         SHA256_CTX      context;
+ 
+-        SHA256_Init(&context);
+-        SHA256_Update(&context, data, len);
++        apr__SHA256_Init(&context);
++        apr__SHA256_Update(&context, data, len);
+         return SHA256_End(&context, digest);
+ }
+ 
+ 
+ /*** SHA-512: *********************************************************/
+-void SHA512_Init(SHA512_CTX* context) {
++void apr__SHA512_Init(SHA512_CTX* context) {
+         if (context == (SHA512_CTX*)0) {
+                 return;
+         }
+@@ -639,7 +639,7 @@
+         (h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)); \
+         j++
+ 
+-void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
++void apr__SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
+         sha2_word64     a, b, c, d, e, f, g, h, s0, s1;
+         sha2_word64     T1, *W512 = (sha2_word64*)context->buffer;
+         int             j;
+@@ -694,7 +694,7 @@
+ 
+ #else /* SHA2_UNROLL_TRANSFORM */
+ 
+-void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
++void apr__SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
+         sha2_word64     a, b, c, d, e, f, g, h, s0, s1;
+         sha2_word64     T1, T2, *W512 = (sha2_word64*)context->buffer;
+         int             j;
+@@ -772,7 +772,7 @@
+ 
+ #endif /* SHA2_UNROLL_TRANSFORM */
+ 
+-void SHA512_Update(SHA512_CTX* context, const sha2_byte *data, size_t len) {
++void apr__SHA512_Update(SHA512_CTX* context, const sha2_byte *data, size_t len) {
+         unsigned int    freespace, usedspace;
+ 
+         if (len == 0) {
+@@ -795,7 +795,7 @@
+                         ADDINC128(context->bitcount, freespace << 3);
+                         len -= freespace;
+                         data += freespace;
+-                        SHA512_Transform(context, (sha2_word64*)context->buffer);
++                        apr__SHA512_Transform(context, (sha2_word64*)context->buffer);
+                 } else {
+                         /* The buffer is not yet full */
+                         MEMCPY_BCOPY(&context->buffer[usedspace], data, len);
+@@ -807,7 +807,7 @@
+         }
+         while (len >= SHA512_BLOCK_LENGTH) {
+                 /* Process as many complete blocks as we can */
+-                SHA512_Transform(context, (sha2_word64*)data);
++                apr__SHA512_Transform(context, (sha2_word64*)data);
+                 ADDINC128(context->bitcount, SHA512_BLOCK_LENGTH << 3);
+                 len -= SHA512_BLOCK_LENGTH;
+                 data += SHA512_BLOCK_LENGTH;
+@@ -843,7 +843,7 @@
+                                 MEMSET_BZERO(&context->buffer[usedspace], SHA512_BLOCK_LENGTH - usedspace);
+                         }
+                         /* Do second-to-last transform: */
+-                        SHA512_Transform(context, (sha2_word64*)context->buffer);
++                        apr__SHA512_Transform(context, (sha2_word64*)context->buffer);
+ 
+                         /* And set-up for the last transform: */
+                         MEMSET_BZERO(context->buffer, SHA512_BLOCK_LENGTH - 2);
+@@ -860,10 +860,10 @@
+         *(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH+8] = context->bitcount[0];
+ 
+         /* Final transform: */
+-        SHA512_Transform(context, (sha2_word64*)context->buffer);
++        apr__SHA512_Transform(context, (sha2_word64*)context->buffer);
+ }
+ 
+-void SHA512_Final(sha2_byte digest[], SHA512_CTX* context) {
++void apr__SHA512_Final(sha2_byte digest[], SHA512_CTX* context) {
+         sha2_word64     *d = (sha2_word64*)digest;
+ 
+         /* Sanity check: */
+@@ -900,7 +900,7 @@
+         assert(context != (SHA512_CTX*)0);
+ 
+         if (buffer != (char*)0) {
+-                SHA512_Final(digest, context);
++                apr__SHA512_Final(digest, context);
+ 
+                 for (i = 0; i < SHA512_DIGEST_LENGTH; i++) {
+                         *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
+@@ -918,14 +918,14 @@
+ char* SHA512_Data(const sha2_byte* data, size_t len, char digest[SHA512_DIGEST_STRING_LENGTH]) {
+         SHA512_CTX      context;
+ 
+-        SHA512_Init(&context);
+-        SHA512_Update(&context, data, len);
++        apr__SHA512_Init(&context);
++        apr__SHA512_Update(&context, data, len);
+         return SHA512_End(&context, digest);
+ }
+ 
+ 
+ /*** SHA-384: *********************************************************/
+-void SHA384_Init(SHA384_CTX* context) {
++void apr__SHA384_Init(SHA384_CTX* context) {
+         if (context == (SHA384_CTX*)0) {
+                 return;
+         }
+@@ -934,11 +934,11 @@
+         context->bitcount[0] = context->bitcount[1] = 0;
+ }
+ 
+-void SHA384_Update(SHA384_CTX* context, const sha2_byte* data, size_t len) {
+-        SHA512_Update((SHA512_CTX*)context, data, len);
++void apr__SHA384_Update(SHA384_CTX* context, const sha2_byte* data, size_t len) {
++        apr__SHA512_Update((SHA512_CTX*)context, data, len);
+ }
+ 
+-void SHA384_Final(sha2_byte digest[], SHA384_CTX* context) {
++void apr__SHA384_Final(sha2_byte digest[], SHA384_CTX* context) {
+         sha2_word64     *d = (sha2_word64*)digest;
+ 
+         /* Sanity check: */
+@@ -975,7 +975,7 @@
+         assert(context != (SHA384_CTX*)0);
+ 
+         if (buffer != (char*)0) {
+-                SHA384_Final(digest, context);
++                apr__SHA384_Final(digest, context);
+ 
+                 for (i = 0; i < SHA384_DIGEST_LENGTH; i++) {
+                         *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
+@@ -993,8 +993,8 @@
+ char* SHA384_Data(const sha2_byte* data, size_t len, char digest[SHA384_DIGEST_STRING_LENGTH]) {
+         SHA384_CTX      context;
+ 
+-        SHA384_Init(&context);
+-        SHA384_Update(&context, data, len);
++        apr__SHA384_Init(&context);
++        apr__SHA384_Update(&context, data, len);
+         return SHA384_End(&context, digest);
+ }
+ 
+Index: include/apr_poll.h
+===================================================================
+--- include/apr_poll.h	(.../tags/1.2.2)	(wersja 358281)
++++ include/apr_poll.h	(.../branches/1.2.x)	(wersja 358281)
+@@ -167,17 +167,19 @@
+ 
+ 
+ /**
+- * Poll the sockets in the poll structure
++ * Poll the descriptors in the poll structure
+  * @param aprset The poll structure we will be using. 
+- * @param numsock The number of sockets we are polling
+- * @param nsds The number of sockets signalled.
++ * @param numsock The number of descriptors we are polling
++ * @param nsds The number of descriptors signalled.
+  * @param timeout The amount of time in microseconds to wait.  This is 
+- *                a maximum, not a minimum.  If a socket is signalled, we 
++ *                a maximum, not a minimum.  If a descriptor is signalled, we 
+  *                will wake up before this time.  A negative number means 
+- *                wait until a socket is signalled.
+- * @remark The number of sockets signalled is returned in the third argument. 
++ *                wait until a descriptor is signalled.
++ * @remark The number of descriptors signalled is returned in the third argument. 
+  *         This is a blocking call, and it will not return until either a 
+- *         socket has been signalled, or the timeout has expired. 
++ *         descriptor has been signalled, or the timeout has expired. 
++ * @remark The rtnevents field in the apr_pollfd_t array will only be filled-
++ *         in if the return value is APR_SUCCESS.
+  */
+ APR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprset, apr_int32_t numsock,
+                                    apr_int32_t *nsds, 
+Index: include/apr.hw
+===================================================================
+--- include/apr.hw	(.../tags/1.2.2)	(wersja 358281)
++++ include/apr.hw	(.../branches/1.2.x)	(wersja 358281)
+@@ -56,6 +56,14 @@
+  */
+ #pragma warning(disable: 4100 4127 4163 4201 4514; once: 4057 4075 4244)
+ 
++/* Ignore Microsoft's interpretation of secure development
++ * and the POSIX string handling API
++ */
++#if defined(_MSC_VER) && _MSC_VER >= 1400
++#define _CRT_SECURE_NO_DEPRECATE
++#pragma warning(disable: 4996)
++#endif
++
+ /* Has windows.h already been included?  If so, our preferences don't matter,
+  * but we will still need the winsock things no matter what was included.
+  * If not, include a restricted set of windows headers to our tastes.
+@@ -506,6 +514,14 @@
+ #pragma warning(pop)
+ #endif
+ 
++/* Ignore Microsoft's interpretation of secure development 
++ * and their opinion of the POSIX standard string handling API
++ */
++#if defined(_MSC_VER) && _MSC_VER >= 1400
++#define _CRT_SECURE_NO_DEPRECATE
++#pragma warning(disable: 4996)
++#endif
++
+ #endif /* WIN32 */
+ 
+ #endif /* APR_H */
+Index: configure.in
+===================================================================
+--- configure.in	(.../tags/1.2.2)	(wersja 358281)
++++ configure.in	(.../branches/1.2.x)	(wersja 358281)
+@@ -319,23 +319,6 @@
+     fi
+   ])
+ 
+-dnl Electric Fence malloc checker.
+-dnl --with-efence specifies the path to Electric Fence
+-AC_ARG_WITH(efence, 
+-  [  --with-efence[[=DIR]]     path to Electric Fence installation], 
+-  [ apr_efence_dir="$withval"
+-    if test "$apr_efence_dir" != "yes"; then
+-      APR_ADDTO(LDFLAGS,[-L$apr_efence_dir/lib])
+-      if test "x$apr_platform_runtime_link_flag" != "x"; then
+-          APR_ADDTO(LDFLAGS, 
+-                    [$apr_platform_runtime_link_flag$apr_efence_dir/lib])
+-      fi
<<Diff was trimmed, longer than 597 lines>>


More information about the pld-cvs-commit mailing list