This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
cygheap.cc: CVS head is broken #ifndef DEBUGGING
- From: Gerd dot Spalink at t-online dot de (Gerd Spalink)
- To: "cygwin-developers at cygwin dot com" <cygwin-developers at cygwin dot com>
- Date: Sun, 21 Mar 2004 22:22:44 +0100
- Subject: cygheap.cc: CVS head is broken #ifndef DEBUGGING
- Organization: privat
- Reply-to: "Gerd dot Spalink at t-online dot de" <Gerd dot Spalink at t-online dot de>
I just updated my CVS sources, and I got a compiler error.
The code below from src/winsup/cygwin/cygheap.cc
does not compile if DEBUGGING is not defined
static void
init_cheap ()
{
#ifndef DEBUGGING
alloc_sz = CYGHEAPSIZE;
#else
char buf[80];
DWORD initial_sz = 0;
if (!GetEnvironmentVariable ("CYGWIN_HEAPSIZE", buf, sizeof buf - 1))
alloc_sz = CYGHEAPSIZE;
else
{
initial_sz = alloc_sz = atoi (buf);
small_printf ("using cygheap size %d\n", alloc_sz);
}
#endif
do
if ((cygheap = (init_cygheap *) VirtualAlloc ((void *) &_cygheap_start,
alloc_sz, MEM_RESERVE,
PAGE_NOACCESS)))
break;
while ((alloc_sz -= 2 * (1024 * 1024)) >= CYGHEAPSIZE_MIN);
if (alloc_sz != initial_sz)
==================^^^^^^^^^^^ the problem is here (line 73)
Gerd