From 487253ea1f81b8223334200ada86a3d3b7de6d9c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 22 Jun 1995 09:00:11 +0000 Subject: Tue Jun 20 02:18:19 1995 Roland McGrath * Makerules (lib%.so: lib%_pic.a): Pass -soname switch giving the library's name including $(libprefix) and major version number. * locale/locale-ctype.c (allocate_arrays): Use xmalloc and bzero in place of xcalloc. * Makeconfig (prefix, exec_prefix, libprefix): Instead of `ifndef', use the $(origin) function to only set these if they are undefined, and not if they are defined to empty. * gnu-versions.h: New file. * features.h (__GNU_LIBRARY__): Increase value to 5. --- locale/locale-ctype.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'locale') diff --git a/locale/locale-ctype.c b/locale/locale-ctype.c index 1ce09bab2b..e7a1e97960 100644 --- a/locale/locale-ctype.c +++ b/locale/locale-ctype.c @@ -534,16 +534,20 @@ allocate_arrays (void) char *ptr; int size = charmap_data.hash_size * charmap_data.hash_layers; - ctype_b = (u16 *) xcalloc (size - (-128), sizeof (u16)); + ctype_b = xmalloc ((size - (-128)) * sizeof (u16)); + bzero (ctype_b, (size - (-128)) * sizeof (u16)); ctype_b += 128; - names_b = (i32 *) xcalloc (size, sizeof (i32)); + names_b = xmalloc (size * sizeof (i32)); + bzero (names_b, size * sizeof (i32)); - toupper_b = (i32 *) xcalloc ((size - (-128)), sizeof (i32)); + toupper_b = xmalloc ((size - (-128)) * sizeof (i32)); + bzero (toupper_b, (size - (-128)) * sizeof (i32)); toupper_b += 128; - tolower_b = (i32 *) xcalloc ((size - (-128)), sizeof (i32)); + tolower_b = xmalloc ((size - (-128)) * sizeof (i32)); + bzero (tolower_b, (size - (-128)) * sizeof (i32)); tolower_b += 128; ptr = NULL; -- cgit 1.4.1