1 Return-Path: <jani@nikula.org>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 428CA431FB6
\r
6 for <notmuch@notmuchmail.org>; Thu, 31 May 2012 01:14:56 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id va1IDkpEH2+3 for <notmuch@notmuchmail.org>;
\r
16 Thu, 31 May 2012 01:14:54 -0700 (PDT)
\r
17 Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com
\r
18 [209.85.212.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id B728A431FAF
\r
21 for <notmuch@notmuchmail.org>; Thu, 31 May 2012 01:14:54 -0700 (PDT)
\r
22 Received: by vbbfc26 with SMTP id fc26so635155vbb.26
\r
23 for <notmuch@notmuchmail.org>; Thu, 31 May 2012 01:14:51 -0700 (PDT)
\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
25 d=google.com; s=20120113;
\r
26 h=from:to:subject:in-reply-to:references:user-agent:date:message-id
\r
27 :mime-version:content-type:x-gm-message-state;
\r
28 bh=fkjNi03ZQ4TOOlgaoFjZGn/mqKvExcCdJUNMfLwDpZs=;
\r
29 b=A8qDuOfRWQT/DNbv2CqJQSKh8ZR1XGd8G80voddwng2bpwMiWCsHO0blhy44Vefs9D
\r
30 d8t1ydpZAOVkPsjy+QAGaEkT4ThO6e2VQHSLTjzB4qgvVHX1d06dIQcn/1oxsQBd1iJu
\r
31 J/H0BB+hWCUXqBcTP9TQiHsfaKhFQtOYe9h80KDiKffctaSvHVbkoc0Fa3YHTA+YYSAK
\r
32 Q5e5pEAIs8dLUkg9BNWLrdR3gFBXQqd7GiGjyGV1LEvUMl1Tnt4YygW0vvNrM2MBdDaZ
\r
33 UzMC7vI3zsK49mz0msVJ2w5wnqz7R4O7+24cpAuRb5J3CyV1Bn3ivQU7xhr9wDY38/TU
\r
35 Received: by 10.52.69.200 with SMTP id g8mr5320136vdu.113.1338452091511;
\r
36 Thu, 31 May 2012 01:14:51 -0700 (PDT)
\r
37 Received: from localhost (nikula.org. [92.243.24.172])
\r
38 by mx.google.com with ESMTPS id bj6sm3719688vdc.12.2012.05.31.01.14.49
\r
39 (version=SSLv3 cipher=OTHER); Thu, 31 May 2012 01:14:50 -0700 (PDT)
\r
40 From: Jani Nikula <jani@nikula.org>
\r
41 To: Mike Kelly <pioto@pioto.org>, notmuch@notmuchmail.org
\r
42 Subject: Re: [PATCH v2 3/9] Makefile.local: define _GNU_SOURCE
\r
43 In-Reply-To: <1338361324-57289-4-git-send-email-pioto@pioto.org>
\r
44 References: <1338361324-57289-1-git-send-email-pioto@pioto.org>
\r
45 <1338361324-57289-4-git-send-email-pioto@pioto.org>
\r
46 User-Agent: Notmuch/0.13+9~ga1668d0 (http://notmuchmail.org) Emacs/23.1.1
\r
48 Date: Thu, 31 May 2012 08:14:47 +0000
\r
49 Message-ID: <877gvs4vig.fsf@nikula.org>
\r
51 Content-Type: text/plain; charset=us-ascii
\r
53 ALoCoQmqEM+y4NpHBiJA44vK238CUcjLEEW0EVp33nnMB9ydK7S12yU/QQtKyy4wQdRKm4EFuZOc
\r
54 X-BeenThere: notmuch@notmuchmail.org
\r
55 X-Mailman-Version: 2.1.13
\r
57 List-Id: "Use and development of the notmuch mail system."
\r
58 <notmuch.notmuchmail.org>
\r
59 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
60 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
61 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
62 List-Post: <mailto:notmuch@notmuchmail.org>
\r
63 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
64 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
65 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
66 X-List-Received-Date: Thu, 31 May 2012 08:14:56 -0000
\r
68 On Wed, 30 May 2012, Mike Kelly <pioto@pioto.org> wrote:
\r
69 > Several places currently define _GNU_SOURCE above the #includes to make
\r
70 > sure that things like 'getline(3)' are available, but defining these in
\r
71 > one place also helps to improve portability to other platforms where
\r
72 > these may not be available otherwise.
\r
74 > Makefile.local | 4 ++--
\r
75 > compat/have_getline.c | 1 -
\r
76 > compat/have_strcasestr.c | 1 -
\r
77 > lib/notmuch-private.h | 3 ---
\r
78 > notmuch-client.h | 3 ---
\r
79 > 5 files changed, 2 insertions(+), 10 deletions(-)
\r
81 > diff --git a/Makefile.local b/Makefile.local
\r
82 > index 53b4a0d..48826b6 100644
\r
83 > --- a/Makefile.local
\r
84 > +++ b/Makefile.local
\r
85 > @@ -39,8 +39,8 @@ GPG_FILE=$(SHA1_FILE).asc
\r
86 > PV_FILE=bindings/python/notmuch/version.py
\r
88 > # Smash together user's values with our extra values
\r
89 > -FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CFLAGS) $(WARN_CFLAGS) $(CONFIGURE_CFLAGS) $(extra_cflags)
\r
90 > -FINAL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(CONFIGURE_CXXFLAGS) $(extra_cflags) $(extra_cxxflags)
\r
91 > +FINAL_CFLAGS = -D_GNU_SOURCE -DNOTMUCH_VERSION=$(VERSION) $(CFLAGS) $(WARN_CFLAGS) $(CONFIGURE_CFLAGS) $(extra_cflags)
\r
92 > +FINAL_CXXFLAGS = -D_GNU_SOURCE $(CXXFLAGS) $(WARN_CXXFLAGS) $(CONFIGURE_CXXFLAGS) $(extra_cflags) $(extra_cxxflags)
\r
93 > FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Lutil -lutil -Llib -lnotmuch $(AS_NEEDED_LDFLAGS) $(GMIME_LDFLAGS) $(TALLOC_LDFLAGS)
\r
95 Sorry for neither being very clear the last time, nor having the time to
\r
96 look into this. Shouldn't -D_GNU_SOURCE be in the configure script? We
\r
97 could add it to CFLAGS there.
\r
102 > FINAL_NOTMUCH_LINKER = CC
\r
103 > ifneq ($(LINKER_RESOLVES_LIBRARY_DEPENDENCIES),1)
\r
104 > diff --git a/compat/have_getline.c b/compat/have_getline.c
\r
105 > index a8bcd17..30f0e8f 100644
\r
106 > --- a/compat/have_getline.c
\r
107 > +++ b/compat/have_getline.c
\r
109 > -#define _GNU_SOURCE
\r
110 > #include <stdio.h>
\r
111 > #include <sys/types.h>
\r
113 > diff --git a/compat/have_strcasestr.c b/compat/have_strcasestr.c
\r
114 > index c0fb762..e637b46 100644
\r
115 > --- a/compat/have_strcasestr.c
\r
116 > +++ b/compat/have_strcasestr.c
\r
118 > -#define _GNU_SOURCE
\r
119 > #include <strings.h>
\r
122 > diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h
\r
123 > index bfb4111..95afc3f 100644
\r
124 > --- a/lib/notmuch-private.h
\r
125 > +++ b/lib/notmuch-private.h
\r
126 > @@ -21,9 +21,6 @@
\r
127 > #ifndef NOTMUCH_PRIVATE_H
\r
128 > #define NOTMUCH_PRIVATE_H
\r
130 > -#ifndef _GNU_SOURCE
\r
131 > -#define _GNU_SOURCE /* For getline and asprintf */
\r
133 > #include <stdio.h>
\r
135 > #include "compat.h"
\r
136 > diff --git a/notmuch-client.h b/notmuch-client.h
\r
137 > index 19b7f01..3964229 100644
\r
138 > --- a/notmuch-client.h
\r
139 > +++ b/notmuch-client.h
\r
140 > @@ -21,9 +21,6 @@
\r
141 > #ifndef NOTMUCH_CLIENT_H
\r
142 > #define NOTMUCH_CLIENT_H
\r
144 > -#ifndef _GNU_SOURCE
\r
145 > -#define _GNU_SOURCE /* for getline */
\r
147 > #include <stdio.h>
\r
149 > #include "compat.h"
\r
153 > _______________________________________________
\r
154 > notmuch mailing list
\r
155 > notmuch@notmuchmail.org
\r
156 > http://notmuchmail.org/mailman/listinfo/notmuch
\r