diff options
author | Christopher Faylor <me@cgf.cx> | 2000-10-02 02:26:04 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-10-02 02:26:04 +0000 |
commit | 9fc09d00f7579eab987fabffbe14fdb210a45637 (patch) | |
tree | 476981be354ffea18888b8df0fd7af0c848f90ee /winsup/cygwin/cygheap.h | |
parent | 0ce83ef6b8e1e7b113c1081d5ca203f5cac0e7b2 (diff) | |
download | newlib-9fc09d00f7579eab987fabffbe14fdb210a45637.zip newlib-9fc09d00f7579eab987fabffbe14fdb210a45637.tar.gz newlib-9fc09d00f7579eab987fabffbe14fdb210a45637.tar.bz2 |
* cygheap.cc (cygheap_init): Born again function.
(_cmalloc): Reorganize to accomodate muto locking.
(_cfree): Use muto lock to avoid multi-thread problems.
* cygheap.h (incygheap): Just use cygheap_max to find upper cygwin heap bounds.
* dcrt0.cc (dll_crt0_1): Reinstitute cygheap_init call.
* path.cc (getcwd): Just return cwdstuff::get result, allowing correct handling
of negative length.
(cwdstuff::get): Malloc a buffer if one is not available.
Diffstat (limited to 'winsup/cygwin/cygheap.h')
-rw-r--r-- | winsup/cygwin/cygheap.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/cygheap.h b/winsup/cygwin/cygheap.h index 18a4a6b..fc335c2 100644 --- a/winsup/cygwin/cygheap.h +++ b/winsup/cygwin/cygheap.h @@ -29,7 +29,7 @@ enum cygheap_types extern HANDLE cygheap; extern HANDLE cygheap_max; -#define incygheap(s) (cygheap && ((char *) (s) >= (char *) cygheap) && ((char *) (s) <= ((char *) cygheap) + CYGHEAPSIZE)) +#define incygheap(s) (cygheap && ((char *) (s) >= (char *) cygheap) && ((char *) (s) <= ((char *) cygheap_max))) extern "C" { void __stdcall cfree (void *); @@ -39,4 +39,5 @@ void *__stdcall crealloc (void *, DWORD); void *__stdcall ccalloc (cygheap_types, DWORD, DWORD); char *__stdcall cstrdup (const char *); char *__stdcall cstrdup1 (const char *); +void __stdcall cygheap_init (); } |