Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2009-08-01 23:52:46 +0400
committerChristopher Faylor <me@cgf.cx>2009-08-01 23:52:46 +0400
commitfafbf75509c175bc5c80e4b761333fa85aaccca0 (patch)
tree93e93c1d893e73e108d5c0648d59fc321f5f57d6 /winsup/cygwin/cygheap_malloc.h
parent8cc84a8ce35aa56528f24532e8a1095199f80c11 (diff)
* cygheap_malloc.h: New file.
* cygheap.h: Remove stuff now included in cygheap_malloc.h and include that file. Make cygheap_init a standard c++ function. Remove unneeded child_info declaration. * path.h: Include cygheap_malloc.h. Remove extra cstrdup declaration. (path_conv): Reorganize to group variables together. (path_conv::path): Make const char *. (path_conv::known_suffix): Ditto. (path_conv::normalized_path): Ditto. (path_conv::path_conv): Reorganize initializers to reflect new element ordering. (path_conv::get_win32): Change return value to const char *. (path_conv::set_path): Move back here from spawn.cc. (parh_conv::modifiable_path): New function. * path.cc (path_conv::add_ext_from_sym): Accommodate const'ness of known_suffixes. (path_conv::set_normalized_path): Ditto for normalized_path. (path_conv::check): Use modifiable_path whereever we need to modify the path element. Use set_path to set the path. (path_conv::~path_conv): Accommodate new const'ness. * spawn.cc (perhaps_suffix): Declare ext as const since that's what is being returned. (path_conv::set_path): Move back to path.h. * winf.f (linebuf): Perform minor cleanup. (linebuf::fromargv): Change second parameter to const. * winf.cc (linebuf::fromargv): Ditto.
Diffstat (limited to 'winsup/cygwin/cygheap_malloc.h')
-rw-r--r--winsup/cygwin/cygheap_malloc.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/winsup/cygwin/cygheap_malloc.h b/winsup/cygwin/cygheap_malloc.h
new file mode 100644
index 000000000..12ed4bd76
--- /dev/null
+++ b/winsup/cygwin/cygheap_malloc.h
@@ -0,0 +1,54 @@
+/* cygheap_malloc.h: Cygwin heap manager allocation functions.
+
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Red Hat, Inc.
+
+This file is part of Cygwin.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+details. */
+
+#ifndef _CYGHEAP_MALLOC_H
+#define _CYGHEAP_MALLOC_H
+
+#undef cfree
+
+enum cygheap_types
+{
+ HEAP_FHANDLER,
+ HEAP_STR,
+ HEAP_ARGV,
+ HEAP_BUF,
+ HEAP_MOUNT,
+ HEAP_SIGS,
+ HEAP_ARCHETYPES,
+ HEAP_TLS,
+ HEAP_COMMUNE,
+ HEAP_1_START,
+ HEAP_1_HOOK,
+ HEAP_1_STR,
+ HEAP_1_ARGV,
+ HEAP_1_BUF,
+ HEAP_1_EXEC,
+ HEAP_1_MAX = 100,
+ HEAP_2_STR,
+ HEAP_2_DLL,
+ HEAP_MMAP = 200
+};
+
+extern "C" {
+void __stdcall cfree (void *) __attribute__ ((regparm(1)));
+void *__stdcall cmalloc (cygheap_types, DWORD) __attribute__ ((regparm(2)));
+void *__stdcall crealloc (void *, DWORD) __attribute__ ((regparm(2)));
+void *__stdcall ccalloc (cygheap_types, DWORD, DWORD) __attribute__ ((regparm(3)));
+void *__stdcall cmalloc_abort (cygheap_types, DWORD) __attribute__ ((regparm(2)));
+void *__stdcall crealloc_abort (void *, DWORD) __attribute__ ((regparm(2)));
+void *__stdcall ccalloc_abort (cygheap_types, DWORD, DWORD) __attribute__ ((regparm(3)));
+PWCHAR __stdcall cwcsdup (const PWCHAR) __attribute__ ((regparm(1)));
+PWCHAR __stdcall cwcsdup1 (const PWCHAR) __attribute__ ((regparm(1)));
+char *__stdcall cstrdup (const char *) __attribute__ ((regparm(1)));
+char *__stdcall cstrdup1 (const char *) __attribute__ ((regparm(1)));
+void __stdcall cfree_and_set (char *&, char * = NULL) __attribute__ ((regparm(2)));
+}
+
+#endif /*_CYGHEAP_MALLOC_H*/