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 D060D431FAF for ; Sun, 4 Nov 2012 13:47:16 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] 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 f0hTJjNmfOxH for ; Sun, 4 Nov 2012 13:47:16 -0800 (PST) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by olra.theworths.org (Postfix) with ESMTP id DA548431FAE for ; Sun, 4 Nov 2012 13:47:15 -0800 (PST) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id 50290100094; Sun, 4 Nov 2012 23:47:15 +0200 (EET) From: Tomi Ollila To: Jani Nikula , Blake Jones , notmuch@notmuchmail.org Subject: Re: [PATCH 08/10] notmuch-config: header for index() prototype (Solaris support) In-Reply-To: <87fw4pf4ql.fsf@nikula.org> References: <1351998962-25135-1-git-send-email-blakej@foo.net> <1351998962-25135-9-git-send-email-blakej@foo.net> <87fw4pf4ql.fsf@nikula.org> User-Agent: Notmuch/0.14+81~gb8371cd (http://notmuchmail.org) Emacs/24.2.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain 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:47:16 -0000 On Sun, Nov 04 2012, Jani Nikula wrote: > 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. indeed! > > Jani. > Tomi > > 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" > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch