aboutsummaryrefslogtreecommitdiff
path: root/malloc/mcheck.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-03-28 17:33:37 +0000
committerUlrich Drepper <drepper@redhat.com>2000-03-28 17:33:37 +0000
commit77e1d15a1afea1189e6aab66cc6e0ce30e3275ce (patch)
tree78849a20d1b650791f0a8d9d53404ef21057dd24 /malloc/mcheck.c
parentb35e58e479cd23ff64ad83a30c6670e355a7d642 (diff)
downloadglibc-77e1d15a1afea1189e6aab66cc6e0ce30e3275ce.tar
glibc-77e1d15a1afea1189e6aab66cc6e0ce30e3275ce.tar.gz
glibc-77e1d15a1afea1189e6aab66cc6e0ce30e3275ce.tar.bz2
glibc-77e1d15a1afea1189e6aab66cc6e0ce30e3275ce.zip
Update.
2000-03-28 Ulrich Drepper <drepper@redhat.com> * iconvdata/TESTS: Use UCS-2BE instead of UCS2. * iconv/loop.c: Define get16, get32, put16, and put32 macros to allow as well reading from/writing to unaligned addresses on machines which don't support this in hardware. Use FCTNAME macro to define function name. Include the file a second time for platforms which need special unaligned handling. * iconv/skeleton.c: Define get16u, get32u, put16u, and put32u macros to access potentially unaligned addresses. These macros are intended to be used only outside the loops. (unaligned): New definition. In case the machine can handle unaligned access define as zero. Otherwise as a variable which is initialized as nonzero in case the buffer passed in at runtime is unaligned with respect to the character set encoding involved. Call aligned or unaligned looop functions according to unaligned variable. * iconvdata/8bit-gap.c: Use get16, get32, put16, and put32 instead of direct casting pointer to potentially handle unaligned memory accesses. * iconvdata/8bit-generic.c: Likewise. * iconvdata/ansi_x3.110.c: Likewise. * iconvdata/big5.c: Likewise. * iconvdata/euc-cn.c: Likewise. * iconvdata/euc-jp.c: Likewise. * iconvdata/euc-kr.c: Likewise. * iconvdata/euc-tw.c: Likewise. * iconvdata/gbk.c: Likewise. * iconvdata/iso-2022-cn.c: Likewise. * iconvdata/iso-2022-jp.c: Likewise. * iconvdata/iso-2022-kr.c: Likewise. * iconvdata/iso646.c: Likewise. * iconvdata/iso_6937-2.c: Likewise. * iconvdata/iso_6937.c: Likewise. * iconvdata/johab.c: Likewise. * iconvdata/sjis.c: Likewise. * iconvdata/t.61.c: Likewise. * iconvdata/uhc.c: Likewise. * iconvdata/unicode.c: Likewise. * iconvdata/utf-16.c: Likewise. * locale/programs/simple-hash.c: Little optimizations. Remove K&R prototypes. * malloc/Versions [libc] (GLIBC_2.2): Add mcheck_check_all. * malloc/mcheck.c (mcheck_check_all): Renamed from check_all and made public. * malloc/mcheck.h (mcheck_check_all): Declare. * stdio-common/Makefile (tests): Add tst-obprintf.
Diffstat (limited to 'malloc/mcheck.c')
-rw-r--r--malloc/mcheck.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/malloc/mcheck.c b/malloc/mcheck.c
index 0d32fc17f7..9aa07a2e1f 100644
--- a/malloc/mcheck.c
+++ b/malloc/mcheck.c
@@ -103,9 +103,8 @@ checkhdr (hdr)
return status;
}
-static void check_all __P ((void));
-static void
-check_all ()
+void
+mcheck_check_all ()
{
/* Walk through all the active blocks and test whether they were tempered
with. */
@@ -172,7 +171,7 @@ freehook (ptr, caller)
const __ptr_t caller;
{
if (pedantic)
- check_all ();
+ mcheck_check_all ();
if (ptr)
{
struct hdr *hdr = ((struct hdr *) ptr) - 1;
@@ -200,7 +199,7 @@ mallochook (size, caller)
struct hdr *hdr;
if (pedantic)
- check_all ();
+ mcheck_check_all ();
__malloc_hook = old_malloc_hook;
if (old_malloc_hook != NULL)
@@ -230,7 +229,7 @@ reallochook (ptr, size, caller)
__malloc_size_t osize;
if (pedantic)
- check_all ();
+ mcheck_check_all ();
if (ptr)
{
@@ -331,8 +330,10 @@ int
mcheck_pedantic (func)
void (*func) __P ((enum mcheck_status));
{
- pedantic = 1;
- return mcheck (func);
+ int res = mcheck (func);
+ if (res == 0)
+ pedantic = 1;
+ return res;
}
enum mcheck_status