From f173a0a4e466e81b636c1f4218f17308b8911d99 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Sat, 26 May 2012 12:52:02 +0300 Subject: [PATCH] Re: [PATCH 03/10] Fix compilation of smtp-dummy on FreeBSD --- 76/4c520853310b237bff460cb0f4b9f710fc0631 | 172 ++++++++++++++++++++++ 1 file changed, 172 insertions(+) create mode 100644 76/4c520853310b237bff460cb0f4b9f710fc0631 diff --git a/76/4c520853310b237bff460cb0f4b9f710fc0631 b/76/4c520853310b237bff460cb0f4b9f710fc0631 new file mode 100644 index 000000000..a3f9187e6 --- /dev/null +++ b/76/4c520853310b237bff460cb0f4b9f710fc0631 @@ -0,0 +1,172 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id C51B2431FBC + for ; Sat, 26 May 2012 02:52:04 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.699 +X-Spam-Level: +X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5 + tests=[HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id lVC-y45bKfYL for ; + Sat, 26 May 2012 02:52:04 -0700 (PDT) +Received: from mail-ob0-f181.google.com (mail-ob0-f181.google.com + [209.85.214.181]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 0B96A431FB6 + for ; Sat, 26 May 2012 02:52:04 -0700 (PDT) +Received: by obbuo19 with SMTP id uo19so2852496obb.26 + for ; Sat, 26 May 2012 02:52:02 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=google.com; s=20120113; + h=mime-version:in-reply-to:references:date:message-id:subject:from:to + :cc:content-type:x-gm-message-state; + bh=f9LmIhh23ZScy+KQx3j3k1A86dvLQoYkyOxSsXM0eMI=; + b=N2THzcMsZ3V0MHVFGJ9/5aKdQ4712mVjqbuyBRBx2oc0Uk39NwPWiQEfoE7KZAdXsg + r9VTqqfrWG17YgkSn+luazUyG8KNrL4RJdzDpAhNhkCo1avShh4cQMwwv540IZdnQn/d + qFVKpfJ4NRQ0F2iA9Hh+qSxjsfUMX2Un4OAEcxeJJSmz5asG6iniTUhj+XUfLNzy4FCO + QNZOWzeFvFhII1eX8ThMx2/AXXhqhY3OOuTR2EqBKfcPU1OWJ8a60TssEZeXpLL0OZka + 9OYwMJb2oUle/lg8W5XNo1Lxg1wjxO/+7KjO0dz8/Z8kaBVARROnv9CB6WPhsTXUeZVe + oN8Q== +MIME-Version: 1.0 +Received: by 10.182.154.67 with SMTP id vm3mr1788127obb.57.1338025922379; Sat, + 26 May 2012 02:52:02 -0700 (PDT) +Received: by 10.76.173.136 with HTTP; Sat, 26 May 2012 02:52:02 -0700 (PDT) +Received: by 10.76.173.136 with HTTP; Sat, 26 May 2012 02:52:02 -0700 (PDT) +In-Reply-To: <1337953411-21000-4-git-send-email-pioto@pioto.org> +References: <1337953411-21000-1-git-send-email-pioto@pioto.org> + <1337953411-21000-4-git-send-email-pioto@pioto.org> +Date: Sat, 26 May 2012 12:52:02 +0300 +Message-ID: + +Subject: Re: [PATCH 03/10] Fix compilation of smtp-dummy on FreeBSD +From: Jani Nikula +To: Mike Kelly +Content-Type: multipart/alternative; boundary=f46d0447a06bcdc00304c0ed6f6c +X-Gm-Message-State: + ALoCoQkVsVTqpZ/IK4EWhLe3ojFuxEGEQwJssNrGYAuSN2u2eLQ5lDG2k2aUkK13lkElDgxoTCnP +Cc: notmuch@notmuchmail.org +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 26 May 2012 09:52:05 -0000 + +--f46d0447a06bcdc00304c0ed6f6c +Content-Type: text/plain; charset=UTF-8 + +On May 25, 2012 4:44 PM, "Mike Kelly" wrote: +> +> --- +> test/smtp-dummy.c | 5 ++++- +> 1 file changed, 4 insertions(+), 1 deletion(-) +> +> diff --git a/test/smtp-dummy.c b/test/smtp-dummy.c +> index 3801a5e..aa82fa1 100644 +> --- a/test/smtp-dummy.c +> +++ b/test/smtp-dummy.c +> @@ -33,11 +33,14 @@ +> * have been warned. +> */ +> +> +#define _GNU_SOURCE /* for getline */ + +First of all, thanks for sharing your work. + +Independent of this patch, I've been thinking about defining _GNU_SOURCE in +the makefile. I don't think it's very elegant to #define it everywhere. It +would also pave the way towards building with -pedantic (and possibly +-std=c99) in a portable way. For example, the compat test code #defines +_GNU_SOURCE while the actual code does not, which I think is an error. + +I'll look into this after the weekend (unless you beat me to it). + +BR, +Jani. + +> #include +> #include +> #include +> #include +> -#include +> +#include +> +#include +> +#include +> #include +> #include +> +> -- +> 1.7.10.2 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch + +--f46d0447a06bcdc00304c0ed6f6c +Content-Type: text/html; charset=UTF-8 +Content-Transfer-Encoding: quoted-printable + +


+On May 25, 2012 4:44 PM, "Mike Kelly" <pioto@pioto.org> wrote:
+>
+> ---
+> =C2=A0test/smtp-dummy.c | =C2=A0 =C2=A05 ++++-
+> =C2=A01 file changed, 4 insertions(+), 1 deletion(-)
+>
+> diff --git a/test/smtp-dummy.c b/test/smtp-dummy.c
+> index 3801a5e..aa82fa1 100644
+> --- a/test/smtp-dummy.c
+> +++ b/test/smtp-dummy.c
+> @@ -33,11 +33,14 @@
+> =C2=A0* have been warned.
+> =C2=A0*/
+>
+> +#define _GNU_SOURCE /* for getline */

+

First of all, thanks for sharing your work.

+

Independent of this patch, I've been thinking about defining _GNU_SO= +URCE in the makefile. I don't think it's very elegant to #define it= + everywhere. It would also pave the way towards building with -pedantic (an= +d possibly -std=3Dc99) in a portable way. For example, the compat test code= + #defines _GNU_SOURCE while the actual code does not, which I think is an e= +rror.

+ +

I'll look into this after the weekend (unless you beat me to it). +

BR,
+Jani.

+

> =C2=A0#include <stdio.h>
+> =C2=A0#include <stdlib.h>
+> =C2=A0#include <string.h>
+> =C2=A0#include <errno.h>
+> -#include <netinet/ip.h>
+> +#include <sys/types.h>
+> +#include <sys/socket.h>
+> +#include <netinet/in.h>
+> =C2=A0#include <netdb.h>
+> =C2=A0#include <unistd.h>
+>
+> --
+> 1.7.10.2
+>
+> _______________________________________________
+> notmuch mailing list
+> notmuch@notmuchmail.org= +
+> http://not= +muchmail.org/mailman/listinfo/notmuch

+ +--f46d0447a06bcdc00304c0ed6f6c-- -- 2.26.2