summaryrefslogtreecommitdiff
path: root/boehm-gc/cord
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>1999-06-30 13:05:33 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>1999-06-30 13:05:33 +0000
commit3c7df94675c954c6ff0d12afee771037d3f4e20d (patch)
tree5807fec186c5db0ee8bcc27015b2079d04b2c27e /boehm-gc/cord
parentc8a4701144f785ce22ad122f0dffcbad235e95b5 (diff)
downloadgcc-3c7df94675c954c6ff0d12afee771037d3f4e20d.tar.gz
This commit was generated by cvs2svn to compensate for changes in r27853,
which included commits to RCS files with non-trunk default branches. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@27854 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc/cord')
-rw-r--r--boehm-gc/cord/cordbscs.c1
-rw-r--r--boehm-gc/cord/cordprnt.c3
-rw-r--r--boehm-gc/cord/de.c1
-rw-r--r--boehm-gc/cord/de_win.c1
-rw-r--r--boehm-gc/cord/gc.h51
5 files changed, 46 insertions, 11 deletions
diff --git a/boehm-gc/cord/cordbscs.c b/boehm-gc/cord/cordbscs.c
index b75f5812f17..9fc894d4946 100644
--- a/boehm-gc/cord/cordbscs.c
+++ b/boehm-gc/cord/cordbscs.c
@@ -361,7 +361,6 @@ CORD CORD_substr_checked(CORD x, size_t i, size_t n)
return(CORD_substr_closure(x, i, n, CORD_index_access_fn));
} else {
register char * result = GC_MALLOC_ATOMIC(n+1);
- register char * p = result;
if (result == 0) OUT_OF_MEMORY;
strncpy(result, x+i, n);
diff --git a/boehm-gc/cord/cordprnt.c b/boehm-gc/cord/cordprnt.c
index 667560f2592..9c8cc8736a9 100644
--- a/boehm-gc/cord/cordprnt.c
+++ b/boehm-gc/cord/cordprnt.c
@@ -231,8 +231,9 @@ int CORD_vsprintf(CORD * out, CORD format, va_list args)
goto done;
case 'c':
if (width == NONE && prec == NONE) {
- register char c = va_arg(args, char);
+ register char c;
+ c = va_arg(args, char);
CORD_ec_append(result, c);
goto done;
}
diff --git a/boehm-gc/cord/de.c b/boehm-gc/cord/de.c
index 18625d2bb37..fda71424176 100644
--- a/boehm-gc/cord/de.c
+++ b/boehm-gc/cord/de.c
@@ -565,7 +565,6 @@ int argc;
char ** argv;
{
int c;
- CORD initial;
#if defined(MACINTOSH)
console_options.title = "\pDumb Editor";
diff --git a/boehm-gc/cord/de_win.c b/boehm-gc/cord/de_win.c
index 119d0fa044c..fedbfbe67c2 100644
--- a/boehm-gc/cord/de_win.c
+++ b/boehm-gc/cord/de_win.c
@@ -268,6 +268,7 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT message,
case WM_DESTROY:
PostQuitMessage (0);
+ GC_win32_free_heap();
return 0;
case WM_PAINT:
diff --git a/boehm-gc/cord/gc.h b/boehm-gc/cord/gc.h
index 09c8ca8196c..ceabb02f6eb 100644
--- a/boehm-gc/cord/gc.h
+++ b/boehm-gc/cord/gc.h
@@ -36,11 +36,19 @@
#endif
#if defined(_MSC_VER) && defined(_DLL)
-#ifdef GC_BUILD
-#define GC_API __declspec(dllexport)
-#else
-#define GC_API __declspec(dllimport)
+# ifdef GC_BUILD
+# define GC_API __declspec(dllexport)
+# else
+# define GC_API __declspec(dllimport)
+# endif
#endif
+
+#if defined(__WATCOMC__) && defined(GC_DLL)
+# ifdef GC_BUILD
+# define GC_API extern __declspec(dllexport)
+# else
+# define GC_API extern __declspec(dllimport)
+# endif
#endif
#ifndef GC_API
@@ -126,7 +134,19 @@ GC_API GC_word GC_max_retries;
/* reporting out of memory after heap */
/* expansion fails. Initially 0. */
-
+
+GC_API char *GC_stackbottom; /* Cool end of user stack. */
+ /* May be set in the client prior to */
+ /* calling any GC_ routines. This */
+ /* avoids some overhead, and */
+ /* potentially some signals that can */
+ /* confuse debuggers. Otherwise the */
+ /* collector attempts to set it */
+ /* automatically. */
+ /* For multithreaded code, this is the */
+ /* cold end of the stack for the */
+ /* primordial thread. */
+
/* Public procedures */
/*
* general purpose allocation routines, with roughly malloc calling conv.
@@ -193,8 +213,8 @@ GC_API size_t GC_size GC_PROTO((GC_PTR object_addr));
/* If the argument is stubborn, the result will have changes enabled. */
/* It is an error to have changes enabled for the original object. */
/* Follows ANSI comventions for NULL old_object. */
-GC_API GC_PTR GC_realloc GC_PROTO((GC_PTR old_object,
- size_t new_size_in_bytes));
+GC_API GC_PTR GC_realloc
+ GC_PROTO((GC_PTR old_object, size_t new_size_in_bytes));
/* Explicitly increase the heap size. */
/* Returns 0 on failure, 1 on success. */
@@ -248,6 +268,7 @@ GC_API void GC_gcollect GC_PROTO((void));
/* than normal pause times for incremental collection. However, */
/* aborted collections do no useful work; the next collection needs */
/* to start from the beginning. */
+/* Return 0 if the collection was aborted, 1 if it succeeded. */
typedef int (* GC_stop_func) GC_PROTO((void));
GC_API int GC_try_to_collect GC_PROTO((GC_stop_func stop_func));
@@ -604,6 +625,10 @@ GC_API void (*GC_is_valid_displacement_print_proc)
GC_API void (*GC_is_visible_print_proc)
GC_PROTO((GC_PTR p));
+#if defined(_SOLARIS_PTHREADS) && !defined(SOLARIS_THREADS)
+# define SOLARIS_THREADS
+#endif
+
#ifdef SOLARIS_THREADS
/* We need to intercept calls to many of the threads primitives, so */
/* that we can locate thread stacks and stop the world. */
@@ -660,7 +685,10 @@ GC_API void (*GC_is_visible_print_proc)
#endif /* IRIX_THREADS || LINUX_THREADS */
-#if defined(THREADS) && !defined(SRC_M3)
+# if defined(PCR) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || \
+ defined(IRIX_THREADS) || defined(LINUX_THREADS) || \
+ defined(IRIX_JDK_THREADS)
+ /* Any flavor of threads except SRC_M3. */
/* This returns a list of objects, linked through their first */
/* word. Its use can greatly reduce lock contention problems, since */
/* the allocation lock can be acquired and released many fewer times. */
@@ -691,6 +719,13 @@ extern void GC_thr_init(); /* Needed for Solaris/X86 */
# endif
#endif
+#if (defined(_MSDOS) || defined(_MSC_VER)) && (_M_IX86 >= 300) \
+ || defined(_WIN32)
+ /* win32S may not free all resources on process exit. */
+ /* This explicitly deallocates the heap. */
+ GC_API void GC_win32_free_heap ();
+#endif
+
#ifdef __cplusplus
} /* end of extern "C" */
#endif