[asterisk-scf-commits] asterisk-scf/integration/pjproject.git branch "disintegrated-build" created.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Thu Jun 16 17:23:33 CDT 2011
branch "disintegrated-build" has been created
at 6360b96e03e5cf651d5b310f0303db101cd1832d (commit)
- Log -----------------------------------------------------------------
commit 6360b96e03e5cf651d5b310f0303db101cd1832d
Author: Ken Hunt <ken.hunt at digium.com>
Date: Fri Jun 3 15:46:06 2011 -0500
Moved alteration of a thread's default stack size into config_site.h
diff --git a/pjlib/include/pj/config_site.h b/pjlib/include/pj/config_site.h
index c0a3391..8d63684 100644
--- a/pjlib/include/pj/config_site.h
+++ b/pjlib/include/pj/config_site.h
@@ -16,6 +16,18 @@
#undef _WIN32_WINNT
#define _WIN32_WINNT PJ_WIN32_WINNT
+#ifdef PJ_THREAD_DEFAULT_STACK_SIZE
+#undef PJ_THREAD_DEFAULT_STACK_SIZE
#endif
+// We're going to assume that we need twice the default stack
+// size for Windows since we're targetting 64-bit platforms.
+// This is a temporary fix until we refactor the thread code
+// to use beginthreadex(...) instead of CreateThread(...) for
+// Windows threads.
+#define PJ_THREAD_DEFAULT_STACK_SIZE 16384
+
+#endif // PJ_WIN32
+
+
diff --git a/pjlib/src/pj/os_core_win32.c b/pjlib/src/pj/os_core_win32.c
index 387d79c..0c43fd2 100644
--- a/pjlib/src/pj/os_core_win32.c
+++ b/pjlib/src/pj/os_core_win32.c
@@ -605,11 +605,18 @@ PJ_DEF(pj_status_t) pj_thread_sleep(unsigned msec)
PJ_DEF(void) pj_thread_check_stack(const char *file, int line)
{
char stk_ptr;
+ unsigned long stk_start;
+ unsigned long std_ptr_addr;
+ unsigned long stk_size;
pj_uint32_t usage;
pj_thread_t *thread = pj_thread_this();
pj_assert(thread);
+ std_ptr_addr = (unsigned long)&stk_ptr;
+ stk_start = (unsigned long)thread->stk_start;
+ stk_size = (unsigned long)thread->stk_size;
+
/* Calculate current usage. */
usage = (&stk_ptr > thread->stk_start) ? &stk_ptr - thread->stk_start :
thread->stk_start - &stk_ptr;
commit 101d37e6e300cf893c937fc9351bbdc67b129f4d
Author: Brent Eagles <beagles at digium.com>
Date: Wed Jun 1 22:33:20 2011 -0230
Upping default stack size to deal with x64 platform.
diff --git a/pjlib/include/pj/config.h b/pjlib/include/pj/config.h
index aeeb47f..929acab 100644
--- a/pjlib/include/pj/config.h
+++ b/pjlib/include/pj/config.h
@@ -450,7 +450,7 @@
* Default: 8192
*/
#ifndef PJ_THREAD_DEFAULT_STACK_SIZE
-# define PJ_THREAD_DEFAULT_STACK_SIZE 8192
+# define PJ_THREAD_DEFAULT_STACK_SIZE 8192 * (sizeof(long*)/sizeof(long))
#endif
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
+
+
commit 651de29bbf38bb852937a256dc12ce606e5a68b6
Author: Joshua Colp <jcolp at digium.com>
Date: Thu May 26 12:45:42 2011 -0300
Enable IPv6 support by default. This can't be done in config_site.h because it is overwritten as part of the build process, so here is fine.
diff --git a/pjlib/include/pj/config.h b/pjlib/include/pj/config.h
index 4ed9d3f..aeeb47f 100644
--- a/pjlib/include/pj/config.h
+++ b/pjlib/include/pj/config.h
@@ -489,10 +489,10 @@
* Support IPv6 in the library. If this support is disabled, some IPv6
* related functions will return PJ_EIPV6NOTSUP.
*
- * Default: 0 (disabled, for now)
+ * Default: 1 (enabled)
*/
#ifndef PJ_HAS_IPV6
-# define PJ_HAS_IPV6 0
+# define PJ_HAS_IPV6 1
#endif
/**
commit 7def17f750b248e8674ad3c4cc8def1fbf309413
Author: Ken Hunt <ken.hunt at digium.com>
Date: Wed May 18 11:49:06 2011 -0500
Added empty config_site.h
diff --git a/pjlib/include/pj/config_site.h b/pjlib/include/pj/config_site.h
new file mode 100644
index 0000000..e69de29
commit 78a1f576fd6c42753dc0aa72b55f66763ab4d3f2
Author: David M. Lee <dlee at digium.com>
Date: Tue May 10 14:47:46 2011 -0500
.gitignore *.vcxproj.user
diff --git a/.gitignore b/.gitignore
index 5ac6e37..37e36d3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
*-auto.mak
*.depend
+*.vcxproj.user
*_auto.h
build.mak
config.log
commit 31cf1966b3c276381ca465fb14b052c9b71227ee
Author: David M. Lee <dlee at digium.com>
Date: Tue May 10 14:46:38 2011 -0500
sort .gitignore
diff --git a/.gitignore b/.gitignore
index 9651443..5ac6e37 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,8 @@
+*-auto.mak
*.depend
+*_auto.h
+build.mak
config.log
config.status
-*-auto.mak
-*_auto.h
pjlib/include/pj/config_site.h
pjsip/include/pjsip/sip_autoconf.h
-build.mak
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
-----------------------------------------------------------------------
--
asterisk-scf/integration/pjproject.git
More information about the asterisk-scf-commits
mailing list