diff options
Diffstat (limited to 'g10/compress.c')
-rw-r--r-- | g10/compress.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/g10/compress.c b/g10/compress.c index a093b9efa..766fad9a5 100644 --- a/g10/compress.c +++ b/g10/compress.c @@ -73,7 +73,11 @@ do_compress( compress_filter_context_t *zfx, z_stream *zs, int flush, IOBUF a ) unsigned n; do { +#ifndef __riscos__ zs->next_out = zfx->outbuf; +#else /* __riscos__ */ + zs->next_out = (Bytef *) zfx->outbuf; +#endif /* __riscos__ */ zs->avail_out = zfx->outbufsize; if( DBG_FILTER ) log_debug("enter deflate: avail_in=%u, avail_out=%u, flush=%d\n", @@ -143,7 +147,11 @@ do_uncompress( compress_filter_context_t *zfx, z_stream *zs, if( zs->avail_in < zfx->inbufsize && refill ) { n = zs->avail_in; if( !n ) +#ifndef __riscos__ zs->next_in = zfx->inbuf; +#else /* __riscos__ */ + zs->next_in = (Bytef *) zfx->inbuf; +#endif /* __riscos__ */ count = zfx->inbufsize - n; nread = iobuf_read( a, zfx->inbuf + n, count ); if( nread == -1 ) nread = 0; @@ -201,7 +209,11 @@ compress_filter( void *opaque, int control, zfx->status = 1; } +#ifndef __riscos__ zs->next_out = buf; +#else /* __riscos__ */ + zs->next_out = (Bytef *) buf; +#endif /* __riscos__ */ zs->avail_out = size; zfx->outbufsize = size; /* needed only for calculation */ rc = do_uncompress( zfx, zs, a, ret_len ); @@ -226,7 +238,11 @@ compress_filter( void *opaque, int control, zfx->status = 2; } +#ifndef __riscos__ zs->next_in = buf; +#else /* __riscos__ */ + zs->next_in = (Bytef *) buf; +#endif /* __riscos__ */ zs->avail_in = size; rc = do_compress( zfx, zs, Z_NO_FLUSH, a ); } @@ -238,7 +254,11 @@ compress_filter( void *opaque, int control, m_free(zfx->outbuf); zfx->outbuf = NULL; } else if( zfx->status == 2 ) { +#ifndef __riscos__ zs->next_in = buf; +#else /* __riscos__ */ + zs->next_in = (Bytef *) buf; +#endif /* __riscos__ */ zs->avail_in = 0; do_compress( zfx, zs, Z_FINISH, a ); deflateEnd(zs); |