Re: [PATCH v2 1/1] cli: Guard deprecated g_type_init calls
authorJani Nikula <jani@nikula.org>
Sat, 8 Jun 2013 08:38:45 +0000 (11:38 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:55:27 +0000 (09:55 -0800)
70/050747f75f1a9e6b3f53e66d2e73e4bae53184 [new file with mode: 0644]

diff --git a/70/050747f75f1a9e6b3f53e66d2e73e4bae53184 b/70/050747f75f1a9e6b3f53e66d2e73e4bae53184
new file mode 100644 (file)
index 0000000..2e466b4
--- /dev/null
@@ -0,0 +1,131 @@
+Return-Path: <jani@nikula.org>\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 1E972431FAF\r
+       for <notmuch@notmuchmail.org>; Sat,  8 Jun 2013 01:39:00 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 ATRUZqM9ODHI for <notmuch@notmuchmail.org>;\r
+       Sat,  8 Jun 2013 01:38:52 -0700 (PDT)\r
+Received: from mail-la0-f50.google.com (mail-la0-f50.google.com\r
+       [209.85.215.50]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 2A02F431FAE\r
+       for <notmuch@notmuchmail.org>; Sat,  8 Jun 2013 01:38:52 -0700 (PDT)\r
+Received: by mail-la0-f50.google.com with SMTP id dy20so2167767lab.37\r
+       for <notmuch@notmuchmail.org>; Sat, 08 Jun 2013 01:38:49 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=from:to:cc:subject:in-reply-to:references:user-agent:date\r
+       :message-id:mime-version:content-type:content-transfer-encoding\r
+       :x-gm-message-state;\r
+       bh=RV06Ozouq+uIlGc8sSydBwGQpBAo0z9G5anpOUtneZ4=;\r
+       b=meiU9k83+5B8E4S+64jyeCXLhTmXWym9lEMnjSAYDYOUL14giXUzvrM/EeOC9WvAs4\r
+       V1O9jEKTtJBk3jeJ08tihCu8fEotxU3TDsjQ0adGGv1QA9pJqlYZf3WPQy+opJU57HLR\r
+       uZR/ubuQ30a3vu+1OIdpuLZQM+TTFv9ZOQ0DLp2JdvbxNxzR2caFXvM3OoUxrRmwADas\r
+       6aBmsLuPnAYXyEAMf2C4NuKIZlGnVLmW2kTN4ax6CToDPBquwUFefdVkJdKzMLZZdfgp\r
+       N037A9i5Ib2mpbLGDiqctKbnqKnDT7RWLwWYEwbsypBytQSKWSgWHh440DcmHngfIpXT\r
+       VRDA==\r
+X-Received: by 10.112.142.228 with SMTP id rz4mr2723193lbb.62.1370680729195;\r
+       Sat, 08 Jun 2013 01:38:49 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw2-58c376-211.dhcp.inet.fi.\r
+       [88.195.118.211])\r
+       by mx.google.com with ESMTPSA id i2sm819731lah.5.2013.06.08.01.38.47\r
+       for <multiple recipients>\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Sat, 08 Jun 2013 01:38:48 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v2 1/1] cli: Guard deprecated g_type_init calls\r
+In-Reply-To: <1370630473-2033-1-git-send-email-tomi.ollila@iki.fi>\r
+References: <1370630473-2033-1-git-send-email-tomi.ollila@iki.fi>\r
+User-Agent: Notmuch/0.15.2+175~g44e86f1 (http://notmuchmail.org) Emacs/24.3.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Sat, 08 Jun 2013 11:38:45 +0300\r
+Message-ID: <878v2lro8a.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Transfer-Encoding: quoted-printable\r
+X-Gm-Message-State:\r
+ ALoCoQmlpsJh+REXGxG6wdwZV3i5p9WV5IcIb1dLDSjV0YOLiOuhEtiAdeVUhHobDVKJ9UAiPMDW\r
+Cc: tomi.ollila@iki.fi\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: Sat, 08 Jun 2013 08:39:00 -0000\r
+\r
+On Fri, 07 Jun 2013, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
+> g_type_init was deprecated in GLib 2.35.1.  In order to compile\r
+> cleanly, guard these with a suitable #if.\r
+\r
+Looks good, tests pass.\r
+\r
+Jani.\r
+\r
+\r
+>\r
+> (commit msg from https://bugs.freedesktop.org/attachment.cgi?id=3D73774 )\r
+> ---\r
+>\r
+> v2 of id:1370614090-1715-1-git-send-email-tomi.ollila@iki.fi\r
+>\r
+> database.cc was not caught by my na=C3=AFve grep g_type_init **/*.c\r
+> (have to learn git grep !)\r
+>\r
+> also added back one newline removed in v1\r
+>\r
+>  lib/database.cc | 2 ++\r
+>  notmuch.c       | 2 ++\r
+>  2 files changed, 4 insertions(+)\r
+>\r
+> diff --git a/lib/database.cc b/lib/database.cc\r
+> index 52ed618..5cc0765 100644\r
+> --- a/lib/database.cc\r
+> +++ b/lib/database.cc\r
+> @@ -649,7 +649,9 @@ notmuch_database_open (const char *path,\r
+>      }\r
+>=20=20\r
+>      /* Initialize the GLib type system and threads */\r
+> +#if !GLIB_CHECK_VERSION(2, 35, 1)\r
+>      g_type_init ();\r
+> +#endif\r
+>=20=20\r
+>      /* Initialize gmime */\r
+>      if (! initialized) {\r
+> diff --git a/notmuch.c b/notmuch.c\r
+> index 99ddd6d..45a73ce 100644\r
+> --- a/notmuch.c\r
+> +++ b/notmuch.c\r
+> @@ -291,7 +291,9 @@ main (int argc, char *argv[])\r
+>      local =3D talloc_new (NULL);\r
+>=20=20\r
+>      g_mime_init (0);\r
+> +#if !GLIB_CHECK_VERSION(2, 35, 1)\r
+>      g_type_init ();\r
+> +#endif\r
+>=20=20\r
+>      /* Globally default to the current output format version. */\r
+>      notmuch_format_version =3D NOTMUCH_FORMAT_CUR;\r
+> --=20\r
+> 1.8.0\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r