From: Ulrich Drepper Date: Thu, 20 Jan 2000 05:22:38 +0000 (+0000) Subject: Adjust for last change in ld-collate.c of adding alignment padding. X-Git-Tag: cvs/glibc_2-1-91~1110 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ee00109cd058fe28fec37f558dc673c9b3adc9db;p=platform%2Fupstream%2Fglibc.git Adjust for last change in ld-collate.c of adding alignment padding. * locale/weight.h: Adjust for last change in ld-collate.c of adding alignment padding. --- diff --git a/ChangeLog b/ChangeLog index b5e96ef..96643d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,8 @@ characters. (collate_output): Correct various problems with alignment in the output file. + * locale/weight.h: Adjust for last change in ld-collate.c of adding + alignment padding. * stdlib/strfmon.c: Don't report an error if final NUL is at the end of the buffer. Set errno correctly if floating-point number diff --git a/locale/weight.h b/locale/weight.h index cc634c2..6151faa 100644 --- a/locale/weight.h +++ b/locale/weight.h @@ -68,6 +68,8 @@ findidx (const unsigned char **cpp) /* Up to the next entry. */ cp += nhere; + if ((1 + nhere) % __alignof__ (int32_t) != 0) + cp += __alignof__ (int32_t) - (1 + nhere) % __alignof__ (int32_t); } else { @@ -86,6 +88,9 @@ findidx (const unsigned char **cpp) { /* Cannot be in this range. */ cp += 2 * nhere; + if ((1 + 2 * nhere) % __alignof__ (int32_t) != 0) + cp += (__alignof__ (int32_t) + - (1 + 2 * nhere) % __alignof__ (int32_t)); continue; } @@ -98,6 +103,9 @@ findidx (const unsigned char **cpp) { /* Cannot be in this range. */ cp += 2 * nhere; + if ((1 + 2 * nhere) % __alignof__ (int32_t) != 0) + cp += (__alignof__ (int32_t) + - (1 + 2 * nhere) % __alignof__ (int32_t)); continue; }