diff options
Diffstat (limited to 'neozip/test/test_shared_ng.h')
| -rw-r--r-- | neozip/test/test_shared_ng.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/neozip/test/test_shared_ng.h b/neozip/test/test_shared_ng.h new file mode 100644 index 0000000000..f87ef027e2 --- /dev/null +++ b/neozip/test/test_shared_ng.h @@ -0,0 +1,23 @@ +#ifndef TEST_SHARED_NG_H +#define TEST_SHARED_NG_H + +#include "test_shared.h" + +/* Test definitions that can only be used in the zlib-ng build environment. */ + +static inline int deflate_prime_32(PREFIX3(stream) *stream, uint32_t value) { + int err; + +#ifndef TEST_STOCK_ZLIB + err = PREFIX(deflatePrime)(stream, 32, value); +#else + /* zlib's deflatePrime() takes at most 16 bits */ + err = PREFIX(deflatePrime)(stream, 16, value & 0xffff); + if (err != Z_OK) return err; + err = PREFIX(deflatePrime)(stream, 16, value >> 16); +#endif + + return err; +} + +#endif |
