Also add this combination to travis testing.
Remove --native testing from travis, since they somehow make this fail very often,
probably due to caching or running the executables on a different platform than
the compiler thinks it is running on.
env: BUILDDIR=. TOOL="./configure --warn"
- os: linux
compiler: gcc
- env: BUILDDIR=. TOOL="./configure --warn --zlib-compat --native"
+ env: BUILDDIR=. TOOL="cmake . -DZLIB_COMPAT=OFF -DWITH_GZFILEOP=ON -DWITH_NEW_STRATEGIES=YES -DWITH_OPTIM=ON"
- os: linux
compiler: gcc
env: BUILDDIR=../build TOOL="../zlib-ng/configure --warn --zlib-compat"
int err; /* error code */
char *msg; /* error message */
/* zlib inflate or deflate stream */
- z_stream strm; /* stream structure in-place (not a pointer) */
+ PREFIX3(stream) strm; /* stream structure in-place (not a pointer) */
} gz_state;
typedef gz_state *gz_statep;
available data from the input file. */
static int gz_avail(gz_state *state) {
unsigned got;
- z_stream *strm = &(state->strm);
+ PREFIX3(stream) *strm = &(state->strm);
if (state->err != Z_OK && state->err != Z_BUF_ERROR)
return -1;
a user buffer. If decompressing, the inflate state will be initialized.
gz_look() will return 0 on success or -1 on failure. */
static int gz_look(gz_state *state) {
- z_stream *strm = &(state->strm);
+ PREFIX3(stream) *strm = &(state->strm);
/* allocate read buffers and inflate memory */
if (state->size == 0) {
static int gz_decomp(gz_state *state) {
int ret = Z_OK;
unsigned had;
- z_stream *strm = &(state->strm);
+ PREFIX3(stream) *strm = &(state->strm);
/* fill output buffer up to end of deflate stream */
had = strm->avail_out;
otherwise 0. gz_fetch() will leave state->how as COPY or GZIP unless the
end of the input file has been reached and all data has been processed. */
static int gz_fetch(gz_state *state) {
- z_stream *strm = &(state->strm);
+ PREFIX3(stream) *strm = &(state->strm);
do {
switch (state->how) {
/* -- see zlib.h -- */
#undef gzgetc
+#undef zng_gzgetc
int ZEXPORT PREFIX(gzgetc)(gzFile file) {
int ret;
unsigned char buf[1];
success. */
static int gz_init(gz_state *state) {
int ret;
- z_stream *strm = &(state->strm);
+ PREFIX3(stream) *strm = &(state->strm);
/* allocate input buffer (double size for gzprintf) */
state->in = (unsigned char *)malloc(state->want << 1);
int ret;
ssize_t got;
unsigned have;
- z_stream *strm = &(state->strm);
+ PREFIX3(stream) *strm = &(state->strm);
/* allocate memory if this is the first time through */
if (state->size == 0 && gz_init(state) == -1)
static int gz_zero(gz_state *state, z_off64_t len) {
int first;
unsigned n;
- z_stream *strm = &(state->strm);
+ PREFIX3(stream) *strm = &(state->strm);
/* consume whatever's left in the input buffer */
if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1)
unsigned have;
unsigned char buf[1];
gz_state *state;
- z_stream *strm;
+ PREFIX3(stream) *strm;
/* get internal structure */
if (file == NULL)
unsigned left;
char *next;
gz_state *state;
- z_stream *strm;
+ PREFIX3(stream) *strm;
/* get internal structure */
if (file == NULL)
/* -- see zlib.h -- */
int ZEXPORT PREFIX(gzsetparams)(gzFile file, int level, int strategy) {
gz_state *state;
- z_stream *strm;
+ PREFIX3(stream) *strm;
/* get internal structure */
if (file == NULL)
#endif
#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64)
-# define gzopen gzopen64
-# define gzseek gzseek64
-# define gztell gztell64
-# define gzoffset gzoffset64
+# define zng_gzopen zng_gzopen64
+# define zng_gzseek zng_gzseek64
+# define zng_gztell zng_gztell64
+# define zng_gzoffset zng_gzoffset64
# ifndef Z_LARGE64
ZEXTERN gzFile ZEXPORT zng_gzopen64(const char *, const char *);
ZEXTERN z_off_t ZEXPORT zng_gzseek64(gzFile, z_off_t, int);