summaryrefslogtreecommitdiff
path: root/libmailutils/url/accessor.h
diff options
context:
space:
mode:
Diffstat (limited to 'libmailutils/url/accessor.h')
-rw-r--r--libmailutils/url/accessor.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/libmailutils/url/accessor.h b/libmailutils/url/accessor.h
index 309a7aa63..fa3ed7e6e 100644
--- a/libmailutils/url/accessor.h
+++ b/libmailutils/url/accessor.h
@@ -36,4 +36,4 @@
#define AC2(a,b) a ## b
-#define METHOD(pfx,part) AC2(pfx,part)
#define AC4(a,b,c,d) a ## b ## c ## d
+#define METHOD(pfx,part) AC2(pfx,part)
#define ACCESSOR(action,field) AC4(mu_url_,action,_,field)
@@ -125,2 +125,13 @@ ACCESSOR(aget, URL_PART) (mu_url_t url, char **buf)
+#ifndef URL_PART_CMP
+# ifndef URL_PART_CMP_ICASE
+# define URL_PART_CMP_ICASE 0
+# endif
+# if URL_PART_CMP_ICASE
+# define URL_PART_CMP mu_c_strcasecmp
+# else
+# define URL_PART_CMP strcmp
+# endif
+#endif
+
/* Define a comparator */
@@ -141,3 +152,3 @@ ACCESSOR(is_same,URL_PART) (mu_url_t url1, mu_url_t url2)
return status1 == status2; /* Both fields are missing */
- return mu_c_strcasecmp (s1, s2) == 0;
+ return URL_PART_CMP (s1, s2) == 0;
}

Return to:

Send suggestions and report system problems to the System administrator.