Re: [PATCH v2 3/9] Makefile.local: define _GNU_SOURCE
authorJani Nikula <jani@nikula.org>
Thu, 31 May 2012 08:14:47 +0000 (08:14 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:47:31 +0000 (09:47 -0800)
81/ca1bb3b39a88ef940d448351ab8a63cf12a4ec [new file with mode: 0644]

diff --git a/81/ca1bb3b39a88ef940d448351ab8a63cf12a4ec b/81/ca1bb3b39a88ef940d448351ab8a63cf12a4ec
new file mode 100644 (file)
index 0000000..f8f417e
--- /dev/null
@@ -0,0 +1,156 @@
+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 428CA431FB6\r
+       for <notmuch@notmuchmail.org>; Thu, 31 May 2012 01:14:56 -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 va1IDkpEH2+3 for <notmuch@notmuchmail.org>;\r
+       Thu, 31 May 2012 01:14:54 -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 B728A431FAF\r
+       for <notmuch@notmuchmail.org>; Thu, 31 May 2012 01:14:54 -0700 (PDT)\r
+Received: by vbbfc26 with SMTP id fc26so635155vbb.26\r
+       for <notmuch@notmuchmail.org>; Thu, 31 May 2012 01:14:51 -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:subject:in-reply-to:references:user-agent:date:message-id\r
+       :mime-version:content-type:x-gm-message-state;\r
+       bh=fkjNi03ZQ4TOOlgaoFjZGn/mqKvExcCdJUNMfLwDpZs=;\r
+       b=A8qDuOfRWQT/DNbv2CqJQSKh8ZR1XGd8G80voddwng2bpwMiWCsHO0blhy44Vefs9D\r
+       d8t1ydpZAOVkPsjy+QAGaEkT4ThO6e2VQHSLTjzB4qgvVHX1d06dIQcn/1oxsQBd1iJu\r
+       J/H0BB+hWCUXqBcTP9TQiHsfaKhFQtOYe9h80KDiKffctaSvHVbkoc0Fa3YHTA+YYSAK\r
+       Q5e5pEAIs8dLUkg9BNWLrdR3gFBXQqd7GiGjyGV1LEvUMl1Tnt4YygW0vvNrM2MBdDaZ\r
+       UzMC7vI3zsK49mz0msVJ2w5wnqz7R4O7+24cpAuRb5J3CyV1Bn3ivQU7xhr9wDY38/TU\r
+       qqlw==\r
+Received: by 10.52.69.200 with SMTP id g8mr5320136vdu.113.1338452091511;\r
+       Thu, 31 May 2012 01:14:51 -0700 (PDT)\r
+Received: from localhost (nikula.org. [92.243.24.172])\r
+       by mx.google.com with ESMTPS id bj6sm3719688vdc.12.2012.05.31.01.14.49\r
+       (version=SSLv3 cipher=OTHER); Thu, 31 May 2012 01:14:50 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Mike Kelly <pioto@pioto.org>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v2 3/9] Makefile.local: define _GNU_SOURCE\r
+In-Reply-To: <1338361324-57289-4-git-send-email-pioto@pioto.org>\r
+References: <1338361324-57289-1-git-send-email-pioto@pioto.org>\r
+       <1338361324-57289-4-git-send-email-pioto@pioto.org>\r
+User-Agent: Notmuch/0.13+9~ga1668d0 (http://notmuchmail.org) Emacs/23.1.1\r
+       (i686-pc-linux-gnu)\r
+Date: Thu, 31 May 2012 08:14:47 +0000\r
+Message-ID: <877gvs4vig.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Gm-Message-State:\r
+ ALoCoQmqEM+y4NpHBiJA44vK238CUcjLEEW0EVp33nnMB9ydK7S12yU/QQtKyy4wQdRKm4EFuZOc\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: Thu, 31 May 2012 08:14:56 -0000\r
+\r
+On Wed, 30 May 2012, Mike Kelly <pioto@pioto.org> wrote:\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
+\r
+Sorry for neither being very clear the last time, nor having the time to\r
+look into this. Shouldn't -D_GNU_SOURCE be in the configure script? We\r
+could add it to CFLAGS there.\r
+\r
+BR,\r
+Jani.\r
+\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
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r