Re: [PATCH v3 04/15] crypto: move into libutil

Subject: Re: [PATCH v3 04/15] crypto: move into libutil

Date: Thu, 12 Oct 2017 10:07:10 -0400

To: David Bremner, Notmuch Mail


From: Daniel Kahn Gillmor

Hi Bremner--

Thanks for the review!

On Thu 2017-10-12 07:54:33 -0300, David Bremner wrote:
> Daniel Kahn Gillmor <> writes:
>> This prepares us for using the crypto object in both the library and
>> the client.
> I think we could be more precise about names here, to help outsiders get
> up to speed on the code. libutil was renamed to libnotmuch_util, and
> "the library" should probably be "libnotmuch".

Are you asking for improved comment text in the git commit, or for
something else?  I'm happy to provide improved comment text, if that's
what you're asking for.

>> diff --git a/crypto.c b/util/crypto.c
>> similarity index 97%
>> rename from crypto.c
>> rename to util/crypto.c
>> index 4c1b7eec..39954ca0 100644
>> --- a/crypto.c
>> +++ b/util/crypto.c
>> @@ -18,7 +18,11 @@
>>   * Authors: Jameson Rollins <>
>>   */
>> -#include "notmuch-client.h"
>> +#include "crypto.h"
>> +#include "lib/notmuch-private.h"
>> +
> This seems like a kind of layering violation. What's in
> notmuch-private.h that needs to be exported to things outside of lib/ ?

when building against gmime-3.0, this #include supplies:

    #define unused(x) x __attribute__ ((unused))

When building against gmime-2.6, it provides:

    #include <strings.h>

I could replace it with these two things explicitly (and i could put
them inside the GMIME_MAJOR_VERSION tests) if that would be preferable
to #including lib/notmuch-private.h.  Any preference?

signature.asc (application/pgp-signature)
notmuch mailing list