summaryrefslogtreecommitdiff
path: root/pjlib/include/pj/compat
diff options
context:
space:
mode:
Diffstat (limited to 'pjlib/include/pj/compat')
-rw-r--r--pjlib/include/pj/compat/os_auto.h.in3
-rw-r--r--pjlib/include/pj/compat/socket.h39
2 files changed, 42 insertions, 0 deletions
diff --git a/pjlib/include/pj/compat/os_auto.h.in b/pjlib/include/pj/compat/os_auto.h.in
index 58bf8690..336be7d5 100644
--- a/pjlib/include/pj/compat/os_auto.h.in
+++ b/pjlib/include/pj/compat/os_auto.h.in
@@ -72,6 +72,9 @@
#undef PJ_HAS_WINSOCK2_H
#undef PJ_SOCK_HAS_INET_ATON
+#undef PJ_SOCK_HAS_INET_PTON
+#undef PJ_SOCK_HAS_INET_NTOP
+#undef PJ_SOCK_HAS_GETADDRINFO
/* Set 1 if native sockaddr_in has sin_len member.
* Default: 0
diff --git a/pjlib/include/pj/compat/socket.h b/pjlib/include/pj/compat/socket.h
index 7cc0d654..f44a623c 100644
--- a/pjlib/include/pj/compat/socket.h
+++ b/pjlib/include/pj/compat/socket.h
@@ -32,6 +32,45 @@
# include <winsock.h>
#endif
+/*
+ * IPv6 for Visual Studio's
+ *
+ * = Visual Studio 6 =
+ *
+ * Visual Studio 6 does not ship with IPv6 support, so you MUST
+ * download and install IPv6 Tehnology Preview (IPv6Kit) from:
+ * http://msdn.microsoft.com/downloads/sdks/platform/tpipv6/ReadMe.asp
+ * Then put IPv6Kit\inc in your Visual Studio include path.
+ *
+ * In addition, by default IPv6Kit does not want to install on
+ * Windows 2000 SP4. Please see:
+ * http://msdn.microsoft.com/downloads/sdks/platform/tpipv6/faq.asp
+ * on how to install IPv6Kit on Win2K SP4.
+ *
+ *
+ * = Visual Studio 2003, 2005 (including Express) =
+ *
+ * These VS uses Microsoft Platform SDK for Windows Server 2003 SP1, and
+ * it has built-in IPv6 support.
+ */
+#if defined(_MSC_VER) && defined(PJ_HAS_IPV6) && PJ_HAS_IPV6!=0
+# ifndef s_addr
+# define s_addr S_un.S_addr
+# endif
+
+# include <ws2tcpip.h>
+
+# ifndef IPPROTO_IPV6
+ /* Need to download and install IPv6Kit for this platform.
+ * Please see the comments above about Visual Studio 6.
+ */
+# include <tpipv6.h>
+# endif
+
+# undef s_addr
+#endif /* _MSC_VER */
+
+
#if defined(PJ_HAS_SYS_TYPES_H) && PJ_HAS_SYS_TYPES_H != 0
# include <sys/types.h>
#endif