[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
Wed May 4 15:01:30 CDT 2011


branch "master" has been updated
       via  b9330117c0e7bceaff0a3500a5e589f37c8282b7 (commit)
       via  ffc2cd55c8c978d40b0d3848a82df7466d717122 (commit)
      from  145326a69b1137a7387ecabf1036e7347da91b47 (commit)

Summary of changes:
 pjlib/include/pj/compat/socket.h       |    2 +-
 pjlib/include/pj/pool.h                |    2 +-
 pjlib/include/pj/types.h               |    9 +++++++++
 pjlib/src/pj/sock_bsd.c                |    2 +-
 third_party/build/srtp/libsrtp.vcxproj |    2 +-
 5 files changed, 13 insertions(+), 4 deletions(-)


- Log -----------------------------------------------------------------
commit b9330117c0e7bceaff0a3500a5e589f37c8282b7
Author: Brent Eagles <beagles at digium.com>
Date:   Wed May 4 17:29:31 2011 -0230

    Undo some of the changes that were introduced in a previous commit.  Having
    pj_sock_t be defined in terms of SOCKET required winsock2.h be included
    indirectly in several locations. This caused lots of header file ordering
    headaches in code that also include Ice related header files.

diff --git a/pjlib/include/pj/compat/socket.h b/pjlib/include/pj/compat/socket.h
index d50a9aa..bcad5b4 100644
--- a/pjlib/include/pj/compat/socket.h
+++ b/pjlib/include/pj/compat/socket.h
@@ -25,7 +25,7 @@
  * @brief Provides all socket related functions,data types, error codes, etc.
  */
 
-#if defined(PJ_HAS_WINSOCK2_H) && PJ_HAS_WINSOCK2_H != 0
+#if defined(PJ_HAS_WINSOCK2_H) && PJ_HAS_WINSOCK2_H != 0 
 #  include <winsock2.h>
 #endif
 
diff --git a/pjlib/include/pj/sock.h b/pjlib/include/pj/sock.h
index be8230d..a12cd42 100644
--- a/pjlib/include/pj/sock.h
+++ b/pjlib/include/pj/sock.h
@@ -460,11 +460,7 @@ typedef enum pj_socket_sd_type
  * Constant for invalid socket returned by #pj_sock_socket() and
  * #pj_sock_accept().
  */
-#ifdef PJ_WIN32
-#define PJ_INVALID_SOCKET INVALID_SOCKET
-#else
 #define PJ_INVALID_SOCKET   (-1)
-#endif
 
 /* Must undefine s_addr because of pj_in_addr below */
 #undef s_addr
diff --git a/pjlib/include/pj/types.h b/pjlib/include/pj/types.h
index 0b8e21d..7cc723b 100644
--- a/pjlib/include/pj/types.h
+++ b/pjlib/include/pj/types.h
@@ -31,7 +31,6 @@
  * @{
  */
 #include <pj/config.h>
-#include <pj/compat/socket.h>
 
 PJ_BEGIN_DECL
 
@@ -253,8 +252,13 @@ typedef struct pj_pipe_t pj_pipe_t;
 typedef void *pj_oshandle_t;
 
 /** Socket handle. */
-#ifdef PJ_WIN32
-typedef SOCKET pj_sock_t;
+
+/**
+ * This is a portability thing. We don't want to pull in all of Winsock here because
+ * it calls all sorts of issues.
+ */
+#if defined(PJ_WIN32) && defined(_M_X64)
+typedef __int64 pj_sock_t;
 #else
 typedef long pj_sock_t;
 #endif

commit ffc2cd55c8c978d40b0d3848a82df7466d717122
Author: Brent Eagles <beagles at digium.com>
Date:   Mon Apr 25 13:20:37 2011 -0230

    Some modifications so the pjproject functions properly on x64 targets.

diff --git a/pjlib/include/pj/pool.h b/pjlib/include/pj/pool.h
index d8225cb..a8bdb05 100644
--- a/pjlib/include/pj/pool.h
+++ b/pjlib/include/pj/pool.h
@@ -856,7 +856,7 @@ struct pj_caching_pool
     /**
      * Internal pool.
      */
-    char	    pool_buf[256 * (sizeof(long) / 4)];
+    char	    pool_buf[256 * (sizeof(int*) / 4)];
 
     /**
      * Mutex.
diff --git a/pjlib/include/pj/sock.h b/pjlib/include/pj/sock.h
index a12cd42..be8230d 100644
--- a/pjlib/include/pj/sock.h
+++ b/pjlib/include/pj/sock.h
@@ -460,7 +460,11 @@ typedef enum pj_socket_sd_type
  * Constant for invalid socket returned by #pj_sock_socket() and
  * #pj_sock_accept().
  */
+#ifdef PJ_WIN32
+#define PJ_INVALID_SOCKET INVALID_SOCKET
+#else
 #define PJ_INVALID_SOCKET   (-1)
+#endif
 
 /* Must undefine s_addr because of pj_in_addr below */
 #undef s_addr
diff --git a/pjlib/include/pj/types.h b/pjlib/include/pj/types.h
index 9c43f93..0b8e21d 100644
--- a/pjlib/include/pj/types.h
+++ b/pjlib/include/pj/types.h
@@ -31,6 +31,7 @@
  * @{
  */
 #include <pj/config.h>
+#include <pj/compat/socket.h>
 
 PJ_BEGIN_DECL
 
@@ -252,7 +253,11 @@ typedef struct pj_pipe_t pj_pipe_t;
 typedef void *pj_oshandle_t;
 
 /** Socket handle. */
+#ifdef PJ_WIN32
+typedef SOCKET pj_sock_t;
+#else
 typedef long pj_sock_t;
+#endif
 
 /** Generic socket address. */
 typedef void pj_sockaddr_t;
diff --git a/pjlib/src/pj/sock_bsd.c b/pjlib/src/pj/sock_bsd.c
index 1554af8..7e9e108 100644
--- a/pjlib/src/pj/sock_bsd.c
+++ b/pjlib/src/pj/sock_bsd.c
@@ -486,7 +486,7 @@ PJ_DEF(pj_status_t) pj_sock_socket(int af,
 
     /* Sanity checks. */
     PJ_ASSERT_RETURN(sock!=NULL, PJ_EINVAL);
-    PJ_ASSERT_RETURN((unsigned)PJ_INVALID_SOCKET==INVALID_SOCKET, 
+    PJ_ASSERT_RETURN(PJ_INVALID_SOCKET==INVALID_SOCKET, 
                      (*sock=PJ_INVALID_SOCKET, PJ_EINVAL));
 
     *sock = WSASocket(af, type, proto, NULL, 0, WSA_FLAG_OVERLAPPED);
diff --git a/third_party/build/srtp/libsrtp.vcxproj b/third_party/build/srtp/libsrtp.vcxproj
index c709720..083cf0b 100644
--- a/third_party/build/srtp/libsrtp.vcxproj
+++ b/third_party/build/srtp/libsrtp.vcxproj
@@ -112,7 +112,7 @@
       <AdditionalIncludeDirectories>.;../../srtp/include;../../srtp/crypto/include;../../../pjlib/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;PJ_M_X86_64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
       <PrecompiledHeaderOutputFile>.\output\libsrtp-$(PlatformShortName)-$(Platform)-vs2010-$(Configuration)/libsrtp.pch</PrecompiledHeaderOutputFile>
       <AssemblerListingLocation>.\output\libsrtp-$(PlatformShortName)-$(Platform)-$(PlatformToolset)-$(Configuration)/</AssemblerListingLocation>
       <ObjectFileName>.\output\libsrtp-$(PlatformShortName)-$(Platform)-$(PlatformToolset)-$(Configuration)/</ObjectFileName>

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


-- 
asterisk-scf/release/pjproject.git



More information about the asterisk-scf-commits mailing list