unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Ico Doornekamp <ico@pruts.nl>
To: notmuch@notmuchmail.org
Cc: Ico Doornekamp <ico@pruts.nl>
Subject: [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
Date: Sun, 20 Nov 2016 12:15:16 +0100	[thread overview]
Message-ID: <1479640516-33847-1-git-send-email-ico@pruts.nl> (raw)

---
 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

             reply	other threads:[~2016-11-20 11:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-20 11:15 Ico Doornekamp [this message]
2016-11-21 18:28 ` [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 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1479640516-33847-1-git-send-email-ico@pruts.nl \
    --to=ico@pruts.nl \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).