aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/cygmalloc.h
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-01-20 19:36:35 +0000
committerChristopher Faylor <me@cgf.cx>2004-01-20 19:36:35 +0000
commit67fcf127c1f23d4fd5f630e72ad8304dc53b7095 (patch)
tree57077489fe3a07b7b585b268c37e31252023643e /winsup/cygwin/cygmalloc.h
parent69c7680cf75d6fe6059373220d8dcfd6e043a577 (diff)
downloadnewlib-67fcf127c1f23d4fd5f630e72ad8304dc53b7095.zip
newlib-67fcf127c1f23d4fd5f630e72ad8304dc53b7095.tar.gz
newlib-67fcf127c1f23d4fd5f630e72ad8304dc53b7095.tar.bz2
* include/cygwin/version.h: Bump DLL minor number to 8.
* cygmalloc.h: Make more concessions to attempts to get debugging malloc working. * debug.h: Ditto. * dlmalloc.cc: Ditto. * dlmalloc.h: Ditto. * malloc_wrapper.cc: Ditto. * perthread.h (perthread::create): Use calloc to ensure zeroed memory.
Diffstat (limited to 'winsup/cygwin/cygmalloc.h')
-rw-r--r--winsup/cygwin/cygmalloc.h26
1 files changed, 16 insertions, 10 deletions
diff --git a/winsup/cygwin/cygmalloc.h b/winsup/cygwin/cygmalloc.h
index 3d3a0ac..30b9ee3 100644
--- a/winsup/cygwin/cygmalloc.h
+++ b/winsup/cygwin/cygmalloc.h
@@ -8,16 +8,19 @@ This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
-extern "C" void dlfree (void *p) __attribute__ ((regparm (1)));
-extern "C" void *dlmalloc (unsigned size) __attribute__ ((regparm (1)));
-extern "C" void *dlrealloc (void *p, unsigned size) __attribute__ ((regparm (2)));
-extern "C" void *dlcalloc (size_t nmemb, size_t size) __attribute__ ((regparm (2)));
-extern "C" void *dlmemalign (size_t alignment, size_t bytes) __attribute__ ((regparm (2)));
-extern "C" void *dlvalloc (size_t bytes) __attribute__ ((regparm (1)));
-extern "C" size_t dlmalloc_usable_size (void *p) __attribute__ ((regparm (1)));
-extern "C" int dlmalloc_trim (size_t) __attribute__ ((regparm (1)));
-extern "C" int dlmallopt (int p, int v) __attribute__ ((regparm (2)));
-extern "C" void dlmalloc_stats ();
+#ifdef __cplusplus
+extern "C" {
+#endif
+void dlfree (void *p) __attribute__ ((regparm (1)));
+void *dlmalloc (unsigned size) __attribute__ ((regparm (1)));
+void *dlrealloc (void *p, unsigned size) __attribute__ ((regparm (2)));
+void *dlcalloc (size_t nmemb, size_t size) __attribute__ ((regparm (2)));
+void *dlmemalign (size_t alignment, size_t bytes) __attribute__ ((regparm (2)));
+void *dlvalloc (size_t bytes) __attribute__ ((regparm (1)));
+size_t dlmalloc_usable_size (void *p) __attribute__ ((regparm (1)));
+int dlmalloc_trim (size_t) __attribute__ ((regparm (1)));
+int dlmallopt (int p, int v) __attribute__ ((regparm (2)));
+void dlmalloc_stats ();
#ifndef __INSIDE_CYGWIN__
# define USE_DL_PREFIX 1
@@ -26,3 +29,6 @@ extern "C" void dlmalloc_stats ();
# define __malloc_unlock() mallock->release ()
extern muto *mallock;
#endif
+#ifdef __cplusplus
+}
+#endif