Re: [PATCH v4 1/7] cli: use typedef to deal with gmime 2.4/2.6 incompatibility
authorJameson Graef Rollins <jrollins@finestructure.net>
Fri, 25 May 2012 15:47:59 +0000 (08:47 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:47:24 +0000 (09:47 -0800)
6a/62f92125d3b475f31b849fbf94458a45ba2aae [new file with mode: 0644]

diff --git a/6a/62f92125d3b475f31b849fbf94458a45ba2aae b/6a/62f92125d3b475f31b849fbf94458a45ba2aae
new file mode 100644 (file)
index 0000000..a07b19a
--- /dev/null
@@ -0,0 +1,124 @@
+Return-Path: <jrollins@finestructure.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id CA2FB431FBC\r
+       for <notmuch@notmuchmail.org>; Fri, 25 May 2012 08:48:08 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.29\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.29 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_MED=-2.3, T_MIME_NO_TEXT=0.01] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id EvQ28VVDhvzs for <notmuch@notmuchmail.org>;\r
+       Fri, 25 May 2012 08:48:08 -0700 (PDT)\r
+Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu\r
+       [131.215.239.19])\r
+       by olra.theworths.org (Postfix) with ESMTP id 56002431FB6\r
+       for <notmuch@notmuchmail.org>; Fri, 25 May 2012 08:48:08 -0700 (PDT)\r
+Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
+       by earth-doxen-postvirus (Postfix) with ESMTP id 0C1C166E017C;\r
+       Fri, 25 May 2012 08:48:06 -0700 (PDT)\r
+X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new\r
+Received: from finestructure.net (unknown [76.89.192.57])\r
+       (Authenticated sender: jrollins)\r
+       by earth-doxen-submit (Postfix) with ESMTP id 1BB5766E0024;\r
+       Fri, 25 May 2012 08:48:03 -0700 (PDT)\r
+Received: by finestructure.net (Postfix, from userid 1000)\r
+       id 2495C1EA; Fri, 25 May 2012 08:48:02 -0700 (PDT)\r
+From: Jameson Graef Rollins <jrollins@finestructure.net>\r
+To: Austin Clements <amdragon@MIT.EDU>\r
+Subject: Re: [PATCH v4 1/7] cli: use typedef to deal with gmime 2.4/2.6\r
+       incompatibility\r
+In-Reply-To: <20120525144136.GB11804@mit.edu>\r
+References: <1337812843-14986-1-git-send-email-jrollins@finestructure.net>\r
+       <1337812843-14986-2-git-send-email-jrollins@finestructure.net>\r
+       <20120525144136.GB11804@mit.edu>\r
+User-Agent: Notmuch/0.13+24~g16915cd (http://notmuchmail.org) Emacs/23.4.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Fri, 25 May 2012 08:47:59 -0700\r
+Message-ID: <87wr40s1n4.fsf@servo.finestructure.net>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+       micalg=pgp-sha256; protocol="application/pgp-signature"\r
+Cc: Notmuch Mail <notmuch@notmuchmail.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 25 May 2012 15:48:08 -0000\r
+\r
+--=-=-=\r
+\r
+On Fri, May 25 2012, Austin Clements <amdragon@MIT.EDU> wrote:\r
+>> diff --git a/notmuch-client.h b/notmuch-client.h\r
+>> index 19b7f01..337409f 100644\r
+>> --- a/notmuch-client.h\r
+>> +++ b/notmuch-client.h\r
+>> @@ -36,6 +36,8 @@\r
+>>   * these to check the version number. */\r
+>>  #ifdef GMIME_MAJOR_VERSION\r
+>>  #define GMIME_ATLEAST_26\r
+>> +#else\r
+>> +typedef GMimeCipherContext GMimeCryptoContext;\r
+>\r
+> I like the typedef idea, but I don't think we should overload\r
+> GMimeCryptoContext like this.  If someone is reading through the GMime\r
+> 2.4 code and sees this, they're going to assume that it's a GMime\r
+> structure, go looking for it, find that it's only in 2.6 and be\r
+> baffled.  Instead, how about providing a typedef to abstract *both*\r
+> cases?  Something like\r
+>\r
+> #ifdef GMIME_MAJOR_VERSION\r
+> #define GMIME_ATLEAST_26\r
+> typedef notmuch_crypto_context_t GMimeCipherContext;\r
+> #else\r
+> typedef notmuch_crypto_context_t GMimeCryptoContext;\r
+> #endif\r
+\r
+Hey, Austin.  I briefly thought about this, but it seemed kind of heavy\r
+handed given that I hope these ifdefs will go away in the\r
+not-too-distant future.  Do we really have a lot of gmime 2.4 readers\r
+that would not have access to gmime 2.6 documentation?  I'm pretty sure\r
+that I would personally end up looking at documentation for both\r
+versions.\r
+\r
+But anyway, if this really is a concern, I guess it's not *that* much\r
+effort to support a new typedef indefinitely to alleviate any potential\r
+confusion.\r
+\r
+Any other opinions?\r
+\r
+jamie.\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.12 (GNU/Linux)\r
+\r
+iQIcBAEBCAAGBQJPv6mvAAoJEO00zqvie6q81PkQAJ8N81j8voiwBwuTbnqx1pV5\r
+QunogNVwa6qtcvh+Np0heG6GRw5ABbjPRlouZZeAIsZQLgVY9RIUndAfHmvXXMsy\r
+ZhHtZaSYK7PyASFx1X76lYGXcApiobj6GDJr/aErfNHi2+jMmQQMF1iNoo77m7qk\r
+KC1MkkbTXTK+XdGyBynv2TtBQIIJGjifXdeYTtoYZfiPjBTZdwAgga8sSO0TADFd\r
+ti5cQrOggzgsH7bT1ucF4kLRIampr5TrP6NhV01k8ZgIS/O0QvoiOt5AbIoszerF\r
+xAWH3uD3o+Xy+GZeOJ3OkHJq3C0rfQX8M5NaYduMyXWpPJRS4+buiSeiTtphilBX\r
+lnNQLNq75PhjTvQnPyUnJ0eAySvV0ZKTW/M8DJn7CT30bbSwRaskY30ku+BnWCsn\r
+Rcsof/28o++n64CNkPGv9Wjuod0OrBM3nlUXPS1eQjHSS/wAQtwZOp4Maa5pHu5+\r
+gNUsBxAasljIqHQRsQPI0js8rfv7E5NZphJBmrXPN2/RpXx5b493MODN1mXdgjWY\r
+hdXw0bx3FrBHnE/XQHtedVKvpksYXvwg7uuJAmEVJGh0guk3fL0VvXyv2dP9eyQa\r
+n9Qx+GRhofHuvd5Mq2bIjGKrVV7pRITMO/We4et4/DmjVb7JvmaiVZbVSzaj60zV\r
+JgF+kN8T3wHorfObJRbX\r
+=4frL\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r