about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-03-27 18:06:35 +0000
committerUlrich Drepper <drepper@redhat.com>2000-03-27 18:06:35 +0000
commit670066c3bdd9cc4222c326a76e30eb266660fae5 (patch)
tree8d33b632af15d3235f1953588e881b78f6f647aa
parenta211d17424ed4a9aa7c07dbb801955f8e50ddb0a (diff)
downloadglibc-670066c3bdd9cc4222c326a76e30eb266660fae5.tar.gz
glibc-670066c3bdd9cc4222c326a76e30eb266660fae5.tar.xz
glibc-670066c3bdd9cc4222c326a76e30eb266660fae5.zip
Update.
2000-03-27  Ulrich Drepper  <drepper@redhat.com>

	* locale/programs/localedef.c: Use __malloc_initialize_hook to
	install mcheck handler.

	* libio/obprintf.c (_IO_obstack_vprintf): Fix one more memory
	handling problem.
-rw-r--r--ChangeLog7
-rw-r--r--locale/programs/localedef.c14
2 files changed, 18 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index e4c590f032..961ca0fd42 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2000-03-27  Ulrich Drepper  <drepper@redhat.com>
+
+	* locale/programs/localedef.c: Use __malloc_initialize_hook to
+	install mcheck handler.
+
+	* libio/obprintf.c (_IO_obstack_vprintf): Fix one more memory
+	handling problem.
 2000-03-27  Roland McGrath  <roland@baalperazim.frob.com>
 
 	* stdio-common/tmpfile.c: Use <shlib-compat.h> macros.
diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c
index e129c0c241..fbd80ccc0f 100644
--- a/locale/programs/localedef.c
+++ b/locale/programs/localedef.c
@@ -135,9 +135,6 @@ main (int argc, char *argv[])
   struct localedef_t global;
   int remaining;
 
-  /* Enable `malloc' debugging.  */
-  mcheck_pedantic (NULL);
-
   /* Set initial values for global variables.  */
   copy_list = NULL;
   posix_conformance = getenv ("POSIXLY_CORRECT") != NULL;
@@ -510,3 +507,14 @@ load_locale (int locale, const char *name, const char *repertoire_name,
 
   return result;
 }
+
+static void
+turn_on_mcheck (void)
+{
+  /* Enable `malloc' debugging.  */
+  mcheck (NULL);
+  /* Use the following line for a more thorough but much slower testing.  */
+  /* mcheck_pedantic (NULL); */
+}
+
+void (*__malloc_initialize_hook) (void) = turn_on_mcheck;