]> git.notmuchmail.org Git - notmuch/commitdiff
gmime-cleanup: drop unused gmime #defines and simplify g_mime_init ()
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Thu, 2 May 2019 13:19:42 +0000 (09:19 -0400)
committerDavid Bremner <david@tethera.net>
Fri, 3 May 2019 09:56:58 +0000 (06:56 -0300)
Several of these #defines were not actually used in the notmuch
codebase any longer.  And as of GMime 3.0, g_mime_init takes no
arguments, so we can also drop the bogus RFC2047 argument that we were
passing and then #defining away.

signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>

lib/database.cc
lib/message-file.c
notmuch.c
util/gmime-extra.h

index d2732f5e507343f384ceaadff3af1d748f202d1c..1753117f99361b8f1fe25cacd1152dc25694e446 100644 (file)
@@ -880,7 +880,7 @@ notmuch_database_open_verbose (const char *path,
 
     /* Initialize gmime */
     if (! initialized) {
-       g_mime_init (GMIME_ENABLE_RFC2047_WORKAROUNDS);
+       g_mime_init ();
        initialized = 1;
     }
 
index ac5545b3f1dd761d49ec67122122c75e39f9ae71..214f3c1d26b12a4f57b27058f68c142e86b157e3 100644 (file)
@@ -135,7 +135,7 @@ _notmuch_message_file_parse (notmuch_message_file_t *message)
     is_mbox = _is_mbox (message->file);
 
     if (! initialized) {
-       g_mime_init (GMIME_ENABLE_RFC2047_WORKAROUNDS);
+       g_mime_init ();
        initialized = 1;
     }
 
index de85041b4add2bb4bdcc18c4080f22414799163c..eeb794e85216115adaf8583744f51f382f8e5817 100644 (file)
--- a/notmuch.c
+++ b/notmuch.c
@@ -463,7 +463,7 @@ main (int argc, char *argv[])
 
     local = talloc_new (NULL);
 
-    g_mime_init (GMIME_ENABLE_RFC2047_WORKAROUNDS);
+    g_mime_init ();
 #if !GLIB_CHECK_VERSION(2, 35, 1)
     g_type_init ();
 #endif
index 60ae876562decf6e0dbbd70979573b99d07221ac..e646efeef405d1ee64eded82ab91ff4db6b37460 100644 (file)
@@ -9,13 +9,8 @@ extern "C" {
 
 GMimeStream *g_mime_stream_stdout_new(void);
 
-#define GMIME_ENABLE_RFC_2047_WORKAROUNDS 0xdeadbeef
 #define g_mime_content_type_to_string(c) g_mime_content_type_get_mime_type (c)
 #define g_mime_filter_crlf_new(encode,dots) g_mime_filter_dos2unix_new (FALSE)
-#define g_mime_gpg_context_new(func,path) g_mime_gpg_context_new ()
-#define g_mime_gpg_context_set_use_agent(ctx,val) /*ignore*/
-#define g_mime_gpg_context_set_always_trust(ctx,val) /*ignore*/
-#define g_mime_init(flags) g_mime_init()
 #define g_mime_message_add_recipient(m,t,n,a) g_mime_message_add_mailbox (m,t,n,a)
 #define g_mime_message_set_subject(m,s) g_mime_message_set_subject(m,s,NULL)
 #define g_mime_multipart_signed_verify(mps,ctx,err) g_mime_multipart_signed_verify(mps, GMIME_ENCRYPT_NONE, err)
@@ -23,8 +18,6 @@ GMimeStream *g_mime_stream_stdout_new(void);
 #define g_mime_object_set_header(o,h,v) g_mime_object_set_header (o,h,v,NULL)
 #define g_mime_parser_construct_message(p) g_mime_parser_construct_message (p, g_mime_parser_options_get_default ())
 #define g_mime_part_get_content_object(p) g_mime_part_get_content (p)
-#define g_mime_pkcs7_context_new(arg) g_mime_pkcs7_context_new()
-#define g_mime_pkcs7_context_set_always_trust(ctx,val) /*ignore*/
 #define g_mime_signature_get_errors(sig) g_mime_signature_get_status (sig)
 #define g_mime_utils_header_decode_text(txt) g_mime_utils_header_decode_text (NULL, txt)
 #define internet_address_to_string(ia,encode) internet_address_to_string (ia,NULL,encode)