* include/gc.h (GC_set_log_fd): New API function declaration.
* misc.c (GC_set_log_fd): New function definition (except for OS/2,
MacOS, Win32/CE and Android).
/* to suppress all warnings (unless statistics printing is turned on). */
GC_API void GC_CALLBACK GC_ignore_warn_proc(char *, GC_word);
+/* Change file descriptor of GC log. Unavailable on some targets. */
+GC_API void GC_CALL GC_set_log_fd(int);
+
/* abort_func is invoked on GC fatal aborts (just before OS-dependent */
/* abort or exit(1) is called). Must be non-NULL. The default one */
/* outputs msg to stderr provided msg is non-NULL. msg is NULL if */
STATIC int GC_stdout = GC_DEFAULT_STDOUT_FD;
STATIC int GC_stderr = GC_DEFAULT_STDERR_FD;
STATIC int GC_log = GC_DEFAULT_STDERR_FD;
+
+ GC_API void GC_CALL GC_set_log_fd(int fd)
+ {
+ GC_log = fd;
+ }
#endif
STATIC word GC_parse_mem_size_arg(const char *str)