Diff of /src/manpath.c [8fd7cb] .. [06ece8]  Maximize  Restore

Switch to side-by-side view

--- a/src/manpath.c
+++ b/src/manpath.c
@@ -41,10 +41,20 @@
 #include <sys/stat.h>
-/* not always in <string.h> */
-extern char *index(const char *, int);
-extern char *rindex(const char *, int);
+/* if we don't have the strchr() and strrchr() functions,
+ * then we must fall back to index() and rindex() respectively,
+ * but (apparently) these aren't always prototyped in string.h
+ */
+#ifndef index
+/* i.e. NOT using strchr()
+ */
+extern char *index (const char *, int);
+#ifndef rindex
+/* i.e. NOT using strrchr()
+ */
+extern char *rindex (const char *, int);
 #include "defs.h"
 #include "gripes.h"

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks