This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=5102fc3790a781af8fc124cc6f1e6a1fd990ceb9 The branch, stable-2.0 has been updated via 5102fc3790a781af8fc124cc6f1e6a1fd990ceb9 (commit) from 317f6a237089a421d8cb57f398eedf6afc600832 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 5102fc3790a781af8fc124cc6f1e6a1fd990ceb9 Author: Eli Zaretskii <[email protected]> Date: Thu Jul 3 19:26:21 2014 +0300 Provide a more reasonable default value for stack limit on MS-Windows. * libguile/debug.c (init_stack_limit) [__MINGW32__]: Use VirtualQuery to compute the stack limit on MS-Windows. ----------------------------------------------------------------------- Summary of changes: libguile/debug.c | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/libguile/debug.c b/libguile/debug.c index 107b5d4..b7b3896 100644 --- a/libguile/debug.c +++ b/libguile/debug.c @@ -27,6 +27,11 @@ #include <sys/resource.h> #endif +#ifdef __MINGW32__ +# define WIN32_LEAN_AND_MEAN +# include <windows.h> +#endif + #include "libguile/_scm.h" #include "libguile/async.h" #include "libguile/eval.h" @@ -228,7 +233,7 @@ scm_local_eval (SCM exp, SCM env) static void init_stack_limit (void) { -#ifdef HAVE_GETRLIMIT +#if defined HAVE_GETRLIMIT struct rlimit lim; if (getrlimit (RLIMIT_STACK, &lim) == 0) { @@ -242,6 +247,16 @@ init_stack_limit (void) SCM_STACK_LIMIT = bytes * 8 / 10 / sizeof (scm_t_bits); } errno = 0; +#elif defined __MINGW32__ + MEMORY_BASIC_INFORMATION m; + uintptr_t bytes; + + if (VirtualQuery ((LPCVOID) &m, &m, sizeof m)) + { + bytes = (DWORD_PTR) m.BaseAddress + m.RegionSize + - (DWORD_PTR) m.AllocationBase; + SCM_STACK_LIMIT = bytes * 8 / 10 / sizeof (scm_t_bits); + } #endif } hooks/post-receive -- GNU Guile
