diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2024-01-28 16:10:52 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2024-01-28 16:10:52 +0000 |
commit | b92da200e4ef9d1915a5f38c53ee32dbd9e9ee11 (patch) | |
tree | d344e42ec5bd7eb03d08ca5149ed76f4402e6283 /lib/libz | |
parent | 5a81e04afba6a60f2e9d4dfaa31aea257bd41153 (diff) |
Pull in some post 1.3.1 upstream commits
This is only cosmetic as far as OpenBSD is concerned.
Diffstat (limited to 'lib/libz')
-rw-r--r-- | lib/libz/README | 2 | ||||
-rw-r--r-- | lib/libz/deflate.c | 8 | ||||
-rw-r--r-- | lib/libz/trees.c | 2 | ||||
-rw-r--r-- | lib/libz/zutil.h | 2 |
4 files changed, 6 insertions, 8 deletions
diff --git a/lib/libz/README b/lib/libz/README index 43913686d6f..75da52058f7 100644 --- a/lib/libz/README +++ b/lib/libz/README @@ -69,8 +69,6 @@ Notes for some targets: - zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with other compilers. Use "make test" to check your compiler. -- gzdopen is not supported on RISCOS or BEOS. - - For PalmOs, see http://palmzlib.sourceforge.net/ diff --git a/lib/libz/deflate.c b/lib/libz/deflate.c index 00e24eebf57..1f0004a700e 100644 --- a/lib/libz/deflate.c +++ b/lib/libz/deflate.c @@ -1667,10 +1667,10 @@ local block_state deflate_stored(deflate_state *s, int flush) { _tr_stored_block(s, (char *)0, 0L, last); /* Replace the lengths in the dummy stored block with len. */ - s->pending_buf[s->pending - 4] = len; - s->pending_buf[s->pending - 3] = len >> 8; - s->pending_buf[s->pending - 2] = ~len; - s->pending_buf[s->pending - 1] = ~len >> 8; + s->pending_buf[s->pending - 4] = (Bytef)len; + s->pending_buf[s->pending - 3] = (Bytef)(len >> 8); + s->pending_buf[s->pending - 2] = (Bytef)~len; + s->pending_buf[s->pending - 1] = (Bytef)(~len >> 8); /* Write the stored block header bytes. */ flush_pending(s->strm); diff --git a/lib/libz/trees.c b/lib/libz/trees.c index b486030ccf9..cba0708b602 100644 --- a/lib/libz/trees.c +++ b/lib/libz/trees.c @@ -722,7 +722,7 @@ local void scan_tree(deflate_state *s, ct_data *tree, int max_code) { if (++count < max_count && curlen == nextlen) { continue; } else if (count < min_count) { - s->bl_tree[curlen].Freq += count; + s->bl_tree[curlen].Freq += (ush)count; } else if (curlen != 0) { if (curlen != prevlen) s->bl_tree[curlen].Freq++; s->bl_tree[REP_3_6].Freq++; diff --git a/lib/libz/zutil.h b/lib/libz/zutil.h index 37351c67415..11b93ebdd79 100644 --- a/lib/libz/zutil.h +++ b/lib/libz/zutil.h @@ -143,7 +143,7 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ # define OS_CODE 7 #endif -#ifdef __acorn +#if defined(__acorn) || defined(__riscos) # define OS_CODE 13 #endif |