aboutsummaryrefslogtreecommitdiff
path: root/ares/nameser.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-02-04 08:00:25 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-02-04 08:00:25 +0000
commit82b27d1b97b3b8bcc05f6cf54f5480bb4bdcd545 (patch)
tree535cc7e2153c0025d8999c2b27bc23c73f512bc1 /ares/nameser.h
parentf7dee3b84631ab4c7fb384dd3f6bfd0e34e0ce49 (diff)
prevent the windows version to use global symbol names
added prototypes for the strcasecmp() functions
Diffstat (limited to 'ares/nameser.h')
-rw-r--r--ares/nameser.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/ares/nameser.h b/ares/nameser.h
index f77d73e6e..95a547976 100644
--- a/ares/nameser.h
+++ b/ares/nameser.h
@@ -1,3 +1,6 @@
+#ifndef ARES_NAMESER_H
+#define ARES_NAMESER_H
+
/* Windows-only header file provided by liren@vivisimo.com to make his Windows
port build */
@@ -204,3 +207,15 @@ typedef enum __ns_rcode {
#define T_MAILB ns_t_mailb
#define T_MAILA ns_t_maila
#define T_ANY ns_t_any
+
+/* protos for the functions we provide in windows_port.c */
+int ares_strncasecmp(const char *s1, const char *s2, size_t n);
+int ares_strcasecmp(const char *s1, const char *s2);
+
+/* use this define magic to prevent us from adding symbol names to the library
+ that is a high-risk to collide with another libraries' attempts to do the
+ same */
+#define strncasecmp(a,b,c) ares_strncasecmp(a,b,c)
+#define strcasecmp(a,b) ares_strcasecmp(a,b)
+
+#endif /* ARES_NAMESER_H */