diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-04-20 14:06:21 +0200 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-04-20 14:06:21 +0200 |
commit | 168393089024b5f926836cb813fddf14e6b6e4d4 (patch) | |
tree | 5d018198dc26be847544f162b87ad3dcecbab479 /test/monniaux/glpk-4.65/src/zlib/gzclose.c | |
parent | 633b72565b022f159526338b5bbb9fcac86dfd2b (diff) | |
parent | b3431b1d9ee5121883d307cff0b62b7e53369891 (diff) | |
download | compcert-kvx-168393089024b5f926836cb813fddf14e6b6e4d4.tar.gz compcert-kvx-168393089024b5f926836cb813fddf14e6b6e4d4.zip |
Merge remote-tracking branch 'origin/mppa-work' into mppa-fast-div
(unfinished)
Diffstat (limited to 'test/monniaux/glpk-4.65/src/zlib/gzclose.c')
-rw-r--r-- | test/monniaux/glpk-4.65/src/zlib/gzclose.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/monniaux/glpk-4.65/src/zlib/gzclose.c b/test/monniaux/glpk-4.65/src/zlib/gzclose.c new file mode 100644 index 00000000..caeb99a3 --- /dev/null +++ b/test/monniaux/glpk-4.65/src/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 +} |