From a60c29c6d4746c31a7cef53755a90a67a8e4d2db Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Sun, 4 Nov 2012 23:16:50 +0200 Subject: [PATCH] Re: [PATCH 08/10] notmuch-config: header for index() prototype (Solaris support) --- ae/49376ba6c5296edcdf73281bb592120070f521 | 94 +++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 ae/49376ba6c5296edcdf73281bb592120070f521 diff --git a/ae/49376ba6c5296edcdf73281bb592120070f521 b/ae/49376ba6c5296edcdf73281bb592120070f521 new file mode 100644 index 000000000..2834929ff --- /dev/null +++ b/ae/49376ba6c5296edcdf73281bb592120070f521 @@ -0,0 +1,94 @@ +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 BA340431FAF + for ; Sun, 4 Nov 2012 13:16:55 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[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 AbDbX6Z+GbcL for ; + Sun, 4 Nov 2012 13:16:55 -0800 (PST) +Received: from mail-la0-f53.google.com (mail-la0-f53.google.com + [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id CA109431FAE + for ; Sun, 4 Nov 2012 13:16:54 -0800 (PST) +Received: by mail-la0-f53.google.com with SMTP id l5so4027501lah.26 + for ; Sun, 04 Nov 2012 13:16:53 -0800 (PST) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=google.com; s=20120113; + h=from:to:cc:subject:in-reply-to:references:user-agent:date + :message-id:mime-version:content-type:x-gm-message-state; + bh=v2DTGHFm5csZYzmWCO/VeAASRx9LKq2vxTAVKwYo68c=; + b=aDUJuEVDj+mbUZLOu3eCdugQwBLcIOxEZk+0p4ZMjKHaFghfz66+IPS0sxtH83Gkrb + Sovm3Dk7ncSfGjiV/FusZ6Nh1MKMJaBb/bpMuFepIDgepbfZTpQHgElFsI0jVoWTDKUi + DGezsiu52Boysw8pv2NYOFiyQP3m/1Z1oerPfy+THO+KNLlC/N86rS7VemHhjUq/2C48 + OaYfEiLDsOscsKY9hKCXtOmlGeEaYKut8X6lL52q15j1C30Xpfu+nwVkUSKHpQWo80iZ + 3M4dTiNPXqOyDRo2K+QU+143UrMR8qIRlc144Gwp4qMo0QWrv/7+R6qxjzaVGAZxIxKV + +R5g== +Received: by 10.152.47.148 with SMTP id d20mr7302454lan.42.1352063813386; + Sun, 04 Nov 2012 13:16:53 -0800 (PST) +Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi. + [80.223.81.27]) + by mx.google.com with ESMTPS id j9sm5081522lbk.17.2012.11.04.13.16.51 + (version=SSLv3 cipher=OTHER); Sun, 04 Nov 2012 13:16:52 -0800 (PST) +From: Jani Nikula +To: Blake Jones , notmuch@notmuchmail.org +Subject: Re: [PATCH 08/10] notmuch-config: header for index() prototype + (Solaris support) +In-Reply-To: <1351998962-25135-9-git-send-email-blakej@foo.net> +References: <1351998962-25135-1-git-send-email-blakej@foo.net> + <1351998962-25135-9-git-send-email-blakej@foo.net> +User-Agent: Notmuch/0.14+81~g1924356 (http://notmuchmail.org) Emacs/23.4.1 + (i686-pc-linux-gnu) +Date: Sun, 04 Nov 2012 23:16:50 +0200 +Message-ID: <87fw4pf4ql.fsf@nikula.org> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Gm-Message-State: + ALoCoQl+RobYqqpblwfnudZVLtpElb5oI7Vf09D4qh8sxTyFKa8U3fvulE1Psik0kFfvphLiJOih +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: Sun, 04 Nov 2012 21:16:56 -0000 + +On Sun, 04 Nov 2012, Blake Jones wrote: +> Linux, FreeBSD, and Solaris all expect to find the prototype for +> "index()" in . On some operating systems, including +> is sufficient to get the prototype, but that's not the case +> on Solaris. This patch just modifies notmuch-config.c to include +> to get the prototype. + +We should probably just nuke index() and use strchr() instead. + +Jani. + + +diff --git a/notmuch-config.c b/notmuch-config.c +index 3e37a2d..47eb743 100644 +--- a/notmuch-config.c ++++ b/notmuch-config.c +@@ -688,7 +688,7 @@ _item_split (char *item, char **group, char **key) + + *group = item; + +- period = index (item, '.'); ++ period = strchr (item, '.'); + if (period == NULL || *(period+1) == '\0') { + fprintf (stderr, + "Invalid configuration name: %s\n" -- 2.26.2