[PATCH v2 3/9] Makefile.local: define _GNU_SOURCE
authorMike Kelly <pioto@pioto.org>
Wed, 30 May 2012 07:01:58 +0000 (03:01 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:47:30 +0000 (09:47 -0800)
82/e339929acbccd5b7525233577baff49f75ec34 [new file with mode: 0644]

diff --git a/82/e339929acbccd5b7525233577baff49f75ec34 b/82/e339929acbccd5b7525233577baff49f75ec34
new file mode 100644 (file)
index 0000000..6d89cf1
--- /dev/null
@@ -0,0 +1,143 @@
+Return-Path: <pioto@pioto.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 D2DFB431FD6\r
+       for <notmuch@notmuchmail.org>; Wed, 30 May 2012 00:02:57 -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 dldTmQyDVjvS for <notmuch@notmuchmail.org>;\r
+       Wed, 30 May 2012 00:02:55 -0700 (PDT)\r
+Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com\r
+       [209.85.212.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 12A93431FC2\r
+       for <notmuch@notmuchmail.org>; Wed, 30 May 2012 00:02:55 -0700 (PDT)\r
+Received: by vbbfc26 with SMTP id fc26so4786696vbb.26\r
+       for <notmuch@notmuchmail.org>; Wed, 30 May 2012 00:02:54 -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:date:message-id:x-mailer:in-reply-to:references\r
+       :x-gm-message-state;\r
+       bh=3cHfl+b8d6nAtW/oyAsU4a5+QCU76Ar6Gr3zcb8lgz0=;\r
+       b=DXcQj1ERBqTHIwsmtOa6+Cf1QnrLWL4lk/Wxm42kNlM0xF6WEsEji2rQO9bHUzwkSg\r
+       2HpIY6Lpil6CGlcQGH/kNLcIICzGJskW8vzjKUD/H9n+xa2LUuysIJuan2Gl5oVlpPSZ\r
+       HHERsiodzGi9TjxHaQ1pPFxIJOr1w4b0/XGgjBPDyTg/ZyKqtQhN561k9roQtq9HXUuA\r
+       JBzudDhw1j6JdpNwU8RCKwlvwh9IFnLXrpsEXN0yFUIAQ8wUwF0PZsupDbVnFuF0sQMj\r
+       hdx1dKAiZIhkHeHqTyamm2CUV4gy+HYAIwIO1cqU53H2bEwGjcX7so7Ih3e9mgZWRnOR\r
+       FQSQ==\r
+Received: by 10.52.20.5 with SMTP id j5mr8921434vde.81.1338361374332;\r
+       Wed, 30 May 2012 00:02:54 -0700 (PDT)\r
+Received: from nas.home.pioto.org (pool-71-182-155-97.pitbpa.fios.verizon.net.\r
+       [71.182.155.97])\r
+       by mx.google.com with ESMTPS id c17sm28321629vdj.11.2012.05.30.00.02.53\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Wed, 30 May 2012 00:02:53 -0700 (PDT)\r
+Received: by nas.home.pioto.org (Postfix, from userid 1001)\r
+       id ED4F6287E2; Wed, 30 May 2012 03:02:51 -0400 (EDT)\r
+From: Mike Kelly <pioto@pioto.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 3/9] Makefile.local: define _GNU_SOURCE\r
+Date: Wed, 30 May 2012 03:01:58 -0400\r
+Message-Id: <1338361324-57289-4-git-send-email-pioto@pioto.org>\r
+X-Mailer: git-send-email 1.7.10.2\r
+In-Reply-To: <1338361324-57289-1-git-send-email-pioto@pioto.org>\r
+References: <1338361324-57289-1-git-send-email-pioto@pioto.org>\r
+X-Gm-Message-State:\r
+ ALoCoQlDGUlPRmkIDNT1oo3esvR0F+l2Tmhu63fhcy6NbXPqbZRzLO57zz9O1CxQqVD71soIS760\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: Wed, 30 May 2012 07:02:58 -0000\r
+\r
+Several places currently define _GNU_SOURCE above the #includes to make\r
+sure that things like 'getline(3)' are available, but defining these in\r
+one place also helps to improve portability to other platforms where\r
+these may not be available otherwise.\r
+---\r
+ Makefile.local           |    4 ++--\r
+ compat/have_getline.c    |    1 -\r
+ compat/have_strcasestr.c |    1 -\r
+ lib/notmuch-private.h    |    3 ---\r
+ notmuch-client.h         |    3 ---\r
+ 5 files changed, 2 insertions(+), 10 deletions(-)\r
+\r
+diff --git a/Makefile.local b/Makefile.local\r
+index 53b4a0d..48826b6 100644\r
+--- a/Makefile.local\r
++++ b/Makefile.local\r
+@@ -39,8 +39,8 @@ GPG_FILE=$(SHA1_FILE).asc\r
+ PV_FILE=bindings/python/notmuch/version.py\r
\r
+ # Smash together user's values with our extra values\r
+-FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CFLAGS) $(WARN_CFLAGS) $(CONFIGURE_CFLAGS) $(extra_cflags)\r
+-FINAL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(CONFIGURE_CXXFLAGS) $(extra_cflags) $(extra_cxxflags)\r
++FINAL_CFLAGS = -D_GNU_SOURCE -DNOTMUCH_VERSION=$(VERSION) $(CFLAGS) $(WARN_CFLAGS) $(CONFIGURE_CFLAGS) $(extra_cflags)\r
++FINAL_CXXFLAGS = -D_GNU_SOURCE $(CXXFLAGS) $(WARN_CXXFLAGS) $(CONFIGURE_CXXFLAGS) $(extra_cflags) $(extra_cxxflags)\r
+ FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Lutil -lutil -Llib -lnotmuch $(AS_NEEDED_LDFLAGS) $(GMIME_LDFLAGS) $(TALLOC_LDFLAGS)\r
+ FINAL_NOTMUCH_LINKER = CC\r
+ ifneq ($(LINKER_RESOLVES_LIBRARY_DEPENDENCIES),1)\r
+diff --git a/compat/have_getline.c b/compat/have_getline.c\r
+index a8bcd17..30f0e8f 100644\r
+--- a/compat/have_getline.c\r
++++ b/compat/have_getline.c\r
+@@ -1,4 +1,3 @@\r
+-#define _GNU_SOURCE\r
+ #include <stdio.h>\r
+ #include <sys/types.h>\r
\r
+diff --git a/compat/have_strcasestr.c b/compat/have_strcasestr.c\r
+index c0fb762..e637b46 100644\r
+--- a/compat/have_strcasestr.c\r
++++ b/compat/have_strcasestr.c\r
+@@ -1,4 +1,3 @@\r
+-#define _GNU_SOURCE\r
+ #include <strings.h>\r
\r
+ int main()\r
+diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h\r
+index bfb4111..95afc3f 100644\r
+--- a/lib/notmuch-private.h\r
++++ b/lib/notmuch-private.h\r
+@@ -21,9 +21,6 @@\r
+ #ifndef NOTMUCH_PRIVATE_H\r
+ #define NOTMUCH_PRIVATE_H\r
\r
+-#ifndef _GNU_SOURCE\r
+-#define _GNU_SOURCE /* For getline and asprintf */\r
+-#endif\r
+ #include <stdio.h>\r
\r
+ #include "compat.h"\r
+diff --git a/notmuch-client.h b/notmuch-client.h\r
+index 19b7f01..3964229 100644\r
+--- a/notmuch-client.h\r
++++ b/notmuch-client.h\r
+@@ -21,9 +21,6 @@\r
+ #ifndef NOTMUCH_CLIENT_H\r
+ #define NOTMUCH_CLIENT_H\r
\r
+-#ifndef _GNU_SOURCE\r
+-#define _GNU_SOURCE /* for getline */\r
+-#endif\r
+ #include <stdio.h>\r
\r
+ #include "compat.h"\r
+-- \r
+1.7.10.2\r
+\r