Index: configure.in
===================================================================
RCS file: /home/cvspublic/apr/configure.in,v
retrieving revision 1.310
diff -u -r1.310 configure.in
--- configure.in	2001/05/31 03:29:51	1.310
+++ configure.in	2001/05/31 15:56:46
@@ -143,6 +143,7 @@
 AC_ARG_ENABLE(maintainer-mode,[  --enable-maintainer-mode  Turn on debugging and compile time warnings],
   [APR_ADDTO(NOTEST_CPPFLAGS,-DAPR_ASSERT_MEMORY)
    APR_ADDTO(CFLAGS,-g)
+   APR_ADDTO(CPPFLAGS, -DAPR_DEBUG)
    if test "$GCC" = "yes"; then
      APR_ADDTO(CFLAGS,[-Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations])
    fi
Index: include/apr_strings.h
===================================================================
RCS file: /home/cvspublic/apr/include/apr_strings.h,v
retrieving revision 1.17
diff -u -r1.17 apr_strings.h
--- include/apr_strings.h	2001/05/23 14:15:39	1.17
+++ include/apr_strings.h	2001/05/31 15:57:17
@@ -276,6 +276,57 @@
 APR_DECLARE(int) apr_vsnprintf(char *buf, apr_size_t len, const char *format,
                                va_list ap);
 
+/**
+ * convert a string to all lowercase
+ * @param s The string to convert to lowercase 
+ */
+APR_DECLARE(void) apr_str_tolower(char *s);
+
+/**
+ * Search a string from left to right for the first occurrence of a 
+ * specific character
+ * @param str The string to search
+ * @param c The character to search for
+ * @return The index of the first occurrence of c in str
+ */
+APR_DECLARE(int) apr_ind(const char *str, char c);	/* Sigh... */
+
+/**
+ * Search a string from right to left for the first occurrence of a 
+ * specific character
+ * @param str The string to search
+ * @param c The character to search for
+ * @return The index of the first occurrence of c in str
+ */
+APR_DECLARE(int) apr_rind(const char *str, char c);
+
+#ifdef APR_DEBUG
+
+#undef strchr
+# define strchr(s, c)	apr_strchr(s,c)
+#undef strrchr
+# define strrchr(s, c)  apr_strrchr(s,c)
+#undef strstr
+# define strstr(s, c)  apr_strstr(s,c)
+
+char *apr_strchr(char *s, int c);
+const char *apr_strchr_c(const char *s, int c);
+char *apr_strrchr(char *s, int c);
+const char *apr_strrchr_c(const char *s, int c);
+char *apr_strstr(char *s, char *c);
+const char *apr_strstr_c(const char *s, const char *c);
+
+#else
+
+# define apr_strchr(s, c)	strchr(s, c)
+# define apr_strchr_c(s, c)	strchr(s, c)
+# define apr_strrchr(s, c)	strrchr(s, c)
+# define apr_strrchr_c(s, c)	strrchr(s, c)
+# define apr_strstr(s, c)	strstr(s, c)
+# define apr_strstr_c(s, c)	strstr(s, c)
+
+#endif
+
 #ifdef __cplusplus
 }
 #endif
Index: strings/apr_strings.c
===================================================================
RCS file: /home/cvspublic/apr/strings/apr_strings.c,v
retrieving revision 1.13
diff -u -r1.13 apr_strings.c
--- strings/apr_strings.c	2001/05/10 18:05:18	1.13
+++ strings/apr_strings.c	2001/05/31 15:58:07
@@ -147,7 +147,32 @@
 
     return res;
 }
+APR_DECLARE(int) apr_ind(const char *s, char c)
+{
+    const char *p = apr_strchr_c(s, c);
+
+    if (p == NULL)
+        return -1;
+    return p - s;
+}
+
+APR_DECLARE(int) apr_rind(const char *s, char c)
+{
+    const char *p = apr_strrchr_c(s, c);
+
+    if (p == NULL)
+        return -1;
+    return p - s;
+}
 
+APR_DECLARE(void) apr_str_tolower(char *str)
+{
+    while (*str) {
+	*str = apr_tolower(*str);
+	++str;
+    }
+}
+
 #if (!APR_HAVE_MEMCHR)
 void *memchr(const void *s, int c, size_t n)
 {
@@ -159,5 +184,38 @@
     }
 
     return NULL;
+}
+#endif
+
+#ifdef APR_DEBUG
+
+/* get rid of the macros we defined in httpd.h */
+#undef strchr
+#undef strrchr
+#undef strstr
+
+char *apr_strchr(char *s, int c)
+{
+    return strchr(s,c);
+}
+const char *apr_strchr_c(const char *s, int c)
+{
+    return strchr(s,c);
+}
+char *apr_strrchr(char *s, int c)
+{
+    return strrchr(s,c);
+}
+const char *apr_strrchr_c(const char *s, int c)
+{
+    return strrchr(s,c);
+}
+char *apr_strstr(char *s, char *c)
+{
+    return strstr(s,c);
+}
+const char *apr_strstr_c(const char *s, const char *c)
+{
+    return strstr(s,c);
 }
 #endif
