[asterisk-scf-commits] asterisk-scf/release/pjproject.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue May 31 08:38:47 CDT 2011


branch "master" has been updated
       via  5b7e532adec4a705015a19584591b538d1bd2108 (commit)
      from  651de29bbf38bb852937a256dc12ce606e5a68b6 (commit)

Summary of changes:
 pjlib/include/pj/compat/socket.h |    7 +++++--
 pjlib/include/pj/config_site.h   |   21 +++++++++++++++++++++
 2 files changed, 26 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit 5b7e532adec4a705015a19584591b538d1bd2108
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Tue May 31 08:35:48 2011 -0500

    Changes for IPv6 handling for Windows. The socket.h file assumed
    IPPROTO_IPV6 is a macro definition. It became an enumerator as of
    Vista/Window Server 2008.

diff --git a/pjlib/include/pj/compat/socket.h b/pjlib/include/pj/compat/socket.h
index bcad5b4..d7165ec 100644
--- a/pjlib/include/pj/compat/socket.h
+++ b/pjlib/include/pj/compat/socket.h
@@ -57,14 +57,17 @@
  * = Visual Studio 2003, 2005 (including Express) =
  *
  * These VS uses Microsoft Platform SDK for Windows Server 2003 SP1, and
- * it has built-in IPv6 support.
+ * 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
 
-#   if !defined(IPPROTO_IPV6)
+    /* Note: Added test _WIN32_WINNT version. IPPROTO_IPV6
+     * is an enum, not a macro, in more recent versions. 
+     */
+#   if (_WIN32_WINNT < 0x0600) && !defined(IPPROTO_IPV6)
 	/* Need to download and install IPv6Kit for this platform.
 	 * Please see the comments above about Visual Studio 6.
 	 */
diff --git a/pjlib/include/pj/config_site.h b/pjlib/include/pj/config_site.h
index e69de29..c0a3391 100644
--- a/pjlib/include/pj/config_site.h
+++ b/pjlib/include/pj/config_site.h
@@ -0,0 +1,21 @@
+
+#pragma once
+
+#ifdef PJ_WIN32
+
+// _WIN32_WINNT mapping to versions
+// 0x0500 : Windows 2000
+// 0x0501 : Windows Server 2003, Windows XP 
+// 0x0502 : Windows Server 2003 w/ SP1, Windows XP w/ SP2 
+// 0x0600 : Windows Vista, Windows Server 2008
+// 0x0601 : Windows 7
+
+#undef  PJ_WIN32_WINNT
+#define PJ_WIN32_WINNT 0x0600
+
+#undef  _WIN32_WINNT
+#define _WIN32_WINNT   PJ_WIN32_WINNT
+
+#endif
+
+

-----------------------------------------------------------------------


-- 
asterisk-scf/release/pjproject.git



More information about the asterisk-scf-commits mailing list