Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(607)

Unified Diff: third_party/zlib/gzclose.c

Issue 13564004: Complete update of zlib from 1.2.3 to 1.2.5. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: actually fix patch Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/zlib/google.patch ('k') | third_party/zlib/gzguts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/zlib/gzclose.c
diff --git a/third_party/zlib/gzclose.c b/third_party/zlib/gzclose.c
new file mode 100644
index 0000000000000000000000000000000000000000..caeb99a3177f477d622870255a00ac2b72f10cad
--- /dev/null
+++ b/third_party/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
+}
« no previous file with comments | « third_party/zlib/google.patch ('k') | third_party/zlib/gzguts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698