From faf4210542383f33b707ce726c203c4169237886 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 21 Sep 2005 19:29:50 +0000 Subject: [PATCH] * cygthread.cc (cygthread::operator new): Just use getenv() to look for CYGWIN_FREERANGE_NOCHECK since the Windows environment may be truncated by being previously execed. --- winsup/cygwin/ChangeLog | 6 ++++++ winsup/cygwin/cygthread.cc | 7 +++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 9fe1b0a70..4ef024980 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2005-09-21 Christopher Faylor + + * cygthread.cc (cygthread::operator new): Just use getenv() to look for + CYGWIN_FREERANGE_NOCHECK since the Windows environment may be truncated + by being previously execed. + 2005-09-20 Christopher Faylor * spawn.cc (av::fixup): Just blindly run any file if it has a .bat or diff --git a/winsup/cygwin/cygthread.cc b/winsup/cygwin/cygthread.cc index 62d64705d..385995382 100644 --- a/winsup/cygwin/cygthread.cc +++ b/winsup/cygwin/cygthread.cc @@ -153,11 +153,10 @@ new (size_t) } #ifdef DEBUGGING - char buf[1024]; - if (!GetEnvironmentVariable ("CYGWIN_FREERANGE_NOCHECK", buf, sizeof (buf))) - api_fatal ("Overflowed cygwin thread pool"); + if (!getenv ("CYGWIN_FREERANGE_NOCHECK")) + api_fatal ("overflowed cygwin thread pool"); else - thread_printf ("Overflowed cygwin thread pool"); + thread_printf ("overflowed cygwin thread pool"); #endif info = freerange (); /* exhausted thread pool */