[PATCH 08/10] notmuch-config: header for index() prototype (Solaris support)
Jani Nikula
jani at nikula.org
Sun Nov 4 13:16:50 PST 2012
On Sun, 04 Nov 2012, Blake Jones <blakej at 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.
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"
More information about the notmuch
mailing list