diff options
author | cvs2git <rtems-devel@rtems.org> | 2011-03-18 10:11:42 +0000 |
---|---|---|
committer | cvs2git <rtems-devel@rtems.org> | 2011-03-18 10:11:42 +0000 |
commit | e371ea9949ecc8897f4cb34437cc6590a0fc51f0 (patch) | |
tree | e5d17499fe12fc87c9697d681b63b062e9cbb65a /cpukit/zlib/gzclose.c | |
parent | Ensure all version instances say 4.10. (diff) | |
download | rtems-4.10.0.tar.bz2 |
This commit was manufactured by cvs2svn to create tag 'rtems-4-10-0'.4.10.0
Sprout from rtems-4-10-branch 2011-02-08 15:56:24 UTC Joel Sherrill <joel.sherrill@OARcorp.com> 'Ensure all version instances say 4.10.'
Cherrypick from rtems-4-10-branch 2011-03-18 10:11:41 UTC cvs2git <rtems-devel@rtems.org> 'This commit was manufactured by cvs2svn to create branch':
cpukit/zlib/ChangeLog
cpukit/zlib/ChangeLog.zlib
cpukit/zlib/FAQ
cpukit/zlib/Makefile.am
cpukit/zlib/README
cpukit/zlib/adler32.c
cpukit/zlib/compress.c
cpukit/zlib/crc32.c
cpukit/zlib/deflate.c
cpukit/zlib/deflate.h
cpukit/zlib/doc/algorithm.txt
cpukit/zlib/gzclose.c
cpukit/zlib/gzguts.h
cpukit/zlib/gzlib.c
cpukit/zlib/gzread.c
cpukit/zlib/gzwrite.c
cpukit/zlib/infback.c
cpukit/zlib/inffast.c
cpukit/zlib/inflate.c
cpukit/zlib/inflate.h
cpukit/zlib/inftrees.c
cpukit/zlib/inftrees.h
cpukit/zlib/trees.c
cpukit/zlib/uncompr.c
cpukit/zlib/zconf.h
cpukit/zlib/zlib.3
cpukit/zlib/zlib.h
cpukit/zlib/zutil.c
cpukit/zlib/zutil.h
testsuites/libtests/mathf/.cvsignore
testsuites/libtests/mathf/Makefile.am
testsuites/libtests/mathf/domathf.c
testsuites/libtests/mathf/init.c
testsuites/libtests/mathf/mathf.scn
Diffstat (limited to 'cpukit/zlib/gzclose.c')
-rw-r--r-- | cpukit/zlib/gzclose.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/cpukit/zlib/gzclose.c b/cpukit/zlib/gzclose.c new file mode 100644 index 0000000000..caeb99a317 --- /dev/null +++ b/cpukit/zlib/gzclose.c @@ -0,0 +1,25 @@ +/* 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 +} |