Fix offset in uClibc patch.
/trunk/patches/uClibc/0.9.30.1/140-gnu89-inline.patch | 2 1 1 0 +-
1 file changed, 1 insertion(+), 1 deletion(-)
1 Original patch from: gentoo/src/patchsets/glibc/2.9/1040_all_2.3.3-localedef-fix-trampoline.patch
3 -= BEGIN original header =-
6 # DP: Description: Fix localedef segfault when run under exec-shield,
7 # PaX or similar. (#231438, #198099)
8 # DP: Dpatch Author: James Troup <james@nocrew.org>
9 # DP: Patch Author: (probably) Jakub Jelinek <jakub@redhat.com>
10 # DP: Upstream status: Unknown
11 # DP: Status Details: Unknown
12 # DP: Date: 2004-03-16
15 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
19 -patch) patch -d "$2" -f --no-backup-if-mismatch -p1 < $0;;
20 -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $0;;
22 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
27 -= END original header =-
29 diff -durN glibc-2_9.orig/locale/programs/3level.h glibc-2_9/locale/programs/3level.h
30 --- glibc-2_9.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200
31 +++ glibc-2_9/locale/programs/3level.h 2009-02-02 22:00:54.000000000 +0100
37 +/* GCC ATM seems to do a poor job with pointers to nested functions passed
38 + to inlined functions. Help it a little bit with this hack. */
39 +#define wchead_table_iterate(tp, fn) \
42 + struct wchead_table *t = (tp); \
44 + for (index1 = 0; index1 < t->level1_size; index1++) \
46 + uint32_t lookup1 = t->level1[index1]; \
47 + if (lookup1 != ((uint32_t) ~0)) \
49 + uint32_t lookup1_shifted = lookup1 << t->q; \
51 + for (index2 = 0; index2 < (1 << t->q); index2++) \
53 + uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \
54 + if (lookup2 != ((uint32_t) ~0)) \
56 + uint32_t lookup2_shifted = lookup2 << t->p; \
58 + for (index3 = 0; index3 < (1 << t->p); index3++) \
60 + struct element_t *lookup3 \
61 + = t->level3[index3 + lookup2_shifted]; \
62 + if (lookup3 != NULL) \
63 + fn ((((index1 << t->q) + index2) << t->p) + index3, \