On Tue, May 04, 2004 at 03:22:04PM -0400, Greg Hudson wrote:
> On Tue, 2004-05-04 at 14:42, Justin Erenkrantz wrote:
> > FWIW, I get the same error with Sun's C compiler. And, I have the same
> > patch applied locally as well. However, I think we brought this up before
> > and GregH didn't seem overly enthusiastic for anyone to commit it.
>
> I thought this was taken care of in r8343. I guess not.
>
> At any rate, I'd appreciate if people would put a little more effort
> into getting the variable declarations right rather than just bashing
> stuff with casts. Let me know if this patch works:
Your patch works. I also had to apply the following patch to work
around the same issue. This patch simply works around the issue
though. read_handler_gz() should be of type svn_read_fn_t which is:
typedef svn_error_t *(*svn_read_fn_t) (void *baton,
char *buffer,
apr_size_t *len);
Should *all* functions that are of type svn_error_t accept 'unsigned
char' as the second argument? Ditto for write_handler_gz() and:
typedef svn_error_t *(*svn_write_fn_t) (void *baton,
const char *data,
apr_size_t *len);
--- subversion/libsvn_subr/stream.c.orig Fri May 14 12:48:05 2004
+++ subversion/libsvn_subr/stream.c Fri May 14 12:48:28 2004
@@ -385,7 +385,7 @@
/* Handle reading from a compressed stream */
static svn_error_t *
-read_handler_gz (void *baton, char *buffer, apr_size_t *len)
+read_handler_gz (void *baton, unsigned char *buffer, apr_size_t *len)
{
struct zbaton *btn = baton;
int zerr;
@@ -433,7 +433,7 @@
/* Compress data and write it to the substream */
static svn_error_t *
-write_handler_gz (void *baton, const char *buffer, apr_size_t *len)
+write_handler_gz (void *baton, const unsigned char *buffer, apr_size_t *len)
{
struct zbaton *btn = baton;
apr_pool_t *subpool;
@@ -458,7 +458,7 @@
subpool = svn_pool_create (btn->pool);
write_buf = apr_palloc (subpool, buf_size);
- btn->out->next_in = (char *) buffer;
+ btn->out->next_in = (unsigned char *) buffer;
btn->out->avail_in = *len;
while (btn->out->avail_in > 0)
--
albert chin (china@thewrittenword.com)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 14 20:33:07 2004