Matthias Miller wrote:
I have attached two possible patches for this problem, although I think the second one makes more sense. Let me know what you think.
My apologies--the second patch had a typo. I've attached an updated patch.

-Matthias Miller
Index: src/ne_uri.c
===================================================================
--- src/ne_uri.c        (revision 1069)
+++ src/ne_uri.c        (working copy)
@@ -523,11 +523,6 @@
 #undef CASECMP
 #undef CMPWITH
 
-#ifndef WIN32
-#undef min
-#define min(a,b) ((a)<(b)?(a):(b))
-#endif
-
 /* TODO: implement properly */
 int ne_path_compare(const char *a, const char *b) 
 {
@@ -543,7 +538,7 @@
            ((traila && lena > lenb) || (trailb && lenb > lena))) {
            /* Compare them, ignoring the trailing slash on the longer
             * URI */
-           if (strncasecmp(a, b, min(lena, lenb)) == 0)
+           if (strncasecmp(a, b, lena < lenb ? lena : lenb) == 0)
                ret = 0;
        }
     }
_______________________________________________
neon mailing list
[email protected]
http://mailman.webdav.org/mailman/listinfo/neon

Reply via email to