From 3997b7c41343589195893e88607798db44278d09 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 21 Aug 2006 19:44:56 +0000 Subject: [BZ #3040] 2006-08-21 Ulrich Drepper [BZ #3040] * sysdeps/unix/sysv/linux/openat.c: Fix compilation if __ASSUME_ATFCTS is defined. --- ChangeLog | 6 ++++++ malloc/malloc.c | 12 ++++++------ sysdeps/unix/sysv/linux/openat.c | 4 +++- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4647b9e483..afbc14374c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-08-21 Ulrich Drepper + + [BZ #3040] + * sysdeps/unix/sysv/linux/openat.c: Fix compilation if + __ASSUME_ATFCTS is defined. + 2006-08-19 Ulrich Drepper * malloc/malloc.c (_int_malloc): Limit number of unsorted blocks diff --git a/malloc/malloc.c b/malloc/malloc.c index 3f4ddcd7f7..b1f813efbe 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -4147,17 +4147,17 @@ _int_malloc(mstate av, size_t bytes) } } - if (size >= nb) - any_larger = true; -#define MAX_ITERS 10000 - if (++iters == MAX_ITERS) - break; - mark_bin(av, victim_index); victim->bk = bck; victim->fd = fwd; fwd->bk = victim; bck->fd = victim; + + if (size >= nb) + any_larger = true; +#define MAX_ITERS 10000 + if (++iters >= MAX_ITERS) + break; } /* diff --git a/sysdeps/unix/sysv/linux/openat.c b/sysdeps/unix/sysv/linux/openat.c index 7dfe367425..df53b6cf2c 100644 --- a/sysdeps/unix/sysv/linux/openat.c +++ b/sysdeps/unix/sysv/linux/openat.c @@ -28,9 +28,10 @@ #include -#if !defined OPENAT && !defined __ASSUME_ATFCTS +#ifndef OPENAT # define OPENAT openat +# ifndef __ASSUME_ATFCTS /* Set errno after a failed call. If BUF is not null, it is a /proc/self/fd/ path name we just tried to use. */ void @@ -61,6 +62,7 @@ __atfct_seterrno (int errval, int fd, const char *buf) } int __have_atfcts; +# endif #endif -- cgit v1.2.1