mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-27 11:55:06 +00:00
e16f0839c6
party software, this provides more standarized import workflow and makes future upgrades easier. The following files are new with this commit: zconf.h.in zlib.map zlib.pc.in They are not connected to build, but were kept in tree for reference for future maintenance. All our local trivial changes were applied to contrib/zlib, and the contrib/zlib vendor source code is intended to 100% match lib/libz before this commit. MFC after: 2 weeks
26 lines
678 B
C
26 lines
678 B
C
/* gzclose.c -- zlib gzclose() function
|
|
* Copyright (C) 2004, 2010 Mark Adler
|
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
|
*/
|
|
|
|
#include "gzguts.h"
|
|
|
|
/* gzclose() is in a separate file so that it is linked in only if it is used.
|
|
That way the other gzclose functions can be used instead to avoid linking in
|
|
unneeded compression or decompression routines. */
|
|
int ZEXPORT gzclose(file)
|
|
gzFile file;
|
|
{
|
|
#ifndef NO_GZCOMPRESS
|
|
gz_statep state;
|
|
|
|
if (file == NULL)
|
|
return Z_STREAM_ERROR;
|
|
state = (gz_statep)file;
|
|
|
|
return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file);
|
|
#else
|
|
return gzclose_r(file);
|
|
#endif
|
|
}
|