unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] gzclose_r() and gzclose_w() are not available in older versions of zlib such as the version on Ubuntu LTS 12.04. Changing to gzclose() allows notmuch to work on older versions as well
@ 2016-11-20 11:15 Ico Doornekamp
  2016-11-21 18:28 ` David Bremner
  0 siblings, 1 reply; 4+ messages in thread
From: Ico Doornekamp @ 2016-11-20 11:15 UTC (permalink / raw)
  To: notmuch; +Cc: Ico Doornekamp

---
 configure         |    4 ++--
 notmuch-dump.c    |    4 ++--
 notmuch-restore.c |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index f0fc466..dc3256b 100755
--- a/configure
+++ b/configure
@@ -491,9 +491,9 @@ if ! pkg-config --exists zlib; then
   rm -f compat/gen_zlib_pc
 fi
 
-printf "Checking for zlib (>= 1.2.5.2)... "
+printf "Checking for zlib (>= 1.2.3.4)... "
 have_zlib=0
-if pkg-config --atleast-version=1.2.5.2 zlib; then
+if pkg-config --atleast-version=1.2.3.4 zlib; then
     printf "Yes.\n"
     have_zlib=1
     zlib_cflags=$(pkg-config --cflags zlib)
diff --git a/notmuch-dump.c b/notmuch-dump.c
index e7965ce..637d93f 100644
--- a/notmuch-dump.c
+++ b/notmuch-dump.c
@@ -328,7 +328,7 @@ notmuch_database_dump (notmuch_database_t *notmuch,
 	}
     }
 
-    if (gzclose_w (output) != Z_OK) {
+    if (gzclose (output) != Z_OK) {
 	fprintf (stderr, "Error closing %s: %s\n", name_for_error,
 		 gzerror (output, NULL));
 	ret = EXIT_FAILURE;
@@ -347,7 +347,7 @@ notmuch_database_dump (notmuch_database_t *notmuch,
     }
  DONE:
     if (ret != EXIT_SUCCESS && output)
-	(void) gzclose_w (output);
+	(void) gzclose (output);
 
     if (ret != EXIT_SUCCESS && output_file_name)
 	(void) unlink (tempname);
diff --git a/notmuch-restore.c b/notmuch-restore.c
index d6429ef..b37cfe2 100644
--- a/notmuch-restore.c
+++ b/notmuch-restore.c
@@ -449,7 +449,7 @@ notmuch_restore_command (notmuch_config_t *config, int argc, char *argv[])
     if (notmuch)
 	notmuch_database_destroy (notmuch);
 
-    if (input && gzclose_r (input)) {
+    if (input && gzclose (input)) {
 	fprintf (stderr, "Error closing %s: %s\n",
 		 name_for_error, gzerror (input, NULL));
 	ret = EXIT_FAILURE;
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-11-21 20:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-20 11:15 [PATCH] gzclose_r() and gzclose_w() are not available in older versions of zlib such as the version on Ubuntu LTS 12.04. Changing to gzclose() allows notmuch to work on older versions as well Ico Doornekamp
2016-11-21 18:28 ` David Bremner
2016-11-21 19:34   ` [PATCH] gzclose_r() and gzclose_w() are not available in older Tomi Ollila
2016-11-21 20:24     ` Jani Nikula

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).