aboutsummaryrefslogtreecommitdiff
path: root/os400
diff options
context:
space:
mode:
authorMark Adler <git@madler.net>2026-01-04 10:34:44 -0600
committerMark Adler <git@madler.net>2026-01-05 15:03:04 -0600
commit916dc1ac351795c9bf86a3d19c3667b014b9d28e (patch)
tree08efd9aa0c5387fe80c1ce15a9fdb0ca8e29c01c /os400
parentfd366384cf324d750596feb03be44ddf4d1e6acd (diff)
downloadzlib-916dc1ac351795c9bf86a3d19c3667b014b9d28e.tar.gz
zlib-916dc1ac351795c9bf86a3d19c3667b014b9d28e.tar.bz2
zlib-916dc1ac351795c9bf86a3d19c3667b014b9d28e.zip
Add compressBound_z and deflateBound_z functions for large values.
These take and return size_t integers, instead of unsigned longs, for those platforms with 32-bit longs. This commit also assures that overflows of either integer type results in the maximum value for that type, instead of wrapping to small values.
Diffstat (limited to 'os400')
-rw-r--r--os400/bndsrc9
-rw-r--r--os400/zlib.inc7
2 files changed, 15 insertions, 1 deletions
diff --git a/os400/bndsrc b/os400/bndsrc
index 2c1c79c4..ce48ff4d 100644
--- a/os400/bndsrc
+++ b/os400/bndsrc
@@ -125,9 +125,16 @@ STRPGMEXP PGMLVL(*CURRENT) SIGNATURE('ZLIB')
125 EXPORT SYMBOL("crc32_combine_op") 125 EXPORT SYMBOL("crc32_combine_op")
126 126
127/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ 127/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
128/* Version 1.3.1.2 additional entry points. */ 128/* Version 1.3.1.2 additional entry points. */
129/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ 129/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
130 130
131 EXPORT SYMBOL("deflateUsed") 131 EXPORT SYMBOL("deflateUsed")
132 132
133/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
134/* Version 1.3.2 additional entry points. */
135/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
136
137 EXPORT SYMBOL("compressBound_z")
138 EXPORT SYMBOL("deflateBound_z")
139
133ENDPGMEXP 140ENDPGMEXP
diff --git a/os400/zlib.inc b/os400/zlib.inc
index 6805f4b9..031ff3ec 100644
--- a/os400/zlib.inc
+++ b/os400/zlib.inc
@@ -127,6 +127,9 @@
127 D compressBound PR 10U 0 extproc('compressBound') 127 D compressBound PR 10U 0 extproc('compressBound')
128 D sourceLen 10U 0 value 128 D sourceLen 10U 0 value
129 * 129 *
130 D compressBound_z PR 20U 0 extproc('compressBound')
131 D sourceLen 20U 0 value
132 *
130 D uncompress PR 10I 0 extproc('uncompress') 133 D uncompress PR 10I 0 extproc('uncompress')
131 D dest 65535 options(*varsize) Destination buffer 134 D dest 65535 options(*varsize) Destination buffer
132 D destLen 10U 0 Destination length 135 D destLen 10U 0 Destination length
@@ -366,6 +369,10 @@
366 D strm like(z_stream) Compression stream 369 D strm like(z_stream) Compression stream
367 D sourcelen 10U 0 value Compression level 370 D sourcelen 10U 0 value Compression level
368 * 371 *
372 D deflateBound_z PR 20U 0 extproc('deflateBound') Change level & strat
373 D strm like(z_stream) Compression stream
374 D sourcelen 20U 0 value Compression level
375 *
369 D deflatePending PR 10I 0 extproc('deflatePending') Change level & strat 376 D deflatePending PR 10I 0 extproc('deflatePending') Change level & strat
370 D strm like(z_stream) Compression stream 377 D strm like(z_stream) Compression stream
371 D pending 10U 0 Pending bytes 378 D pending 10U 0 Pending bytes