On Sun, Nov 04 2012, Jani Nikula wrote: > On Sun, 04 Nov 2012, Blake Jones <blakej@foo.net> wrote: >> Linux, FreeBSD, and Solaris all expect to find the prototype for >> "index()" in <strings.h>. On some operating systems, including >> <string.h> is sufficient to get the prototype, but that's not the case >> on Solaris. This patch just modifies notmuch-config.c to include >> <strings.h> 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