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

  Switch to side-by-side view

--- a/src/man.c
+++ b/src/man.c
@@ -58,8 +58,20 @@
 #define R_OK 4
 #endif
 
-extern char *index (const char *, int);		/* not always in <string.h> */
-extern char *rindex (const char *, int);	/* not always in <string.h> */
+/* 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);
+#endif
+#ifndef rindex
+/* i.e. NOT using strrchr()
+ */
+extern char *rindex (const char *, int);
+#endif
 
 #include "defs.h"
 #include "gripes.h"