You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

80 lines
3.0 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../paxctl/patches/glibc-2.5.1-localedef_trampoline-1.patch
# Copyright (C) 2008 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
Submitted By: Robert Connolly <robert at linuxfromscratch dot org> (ashes)
Date: 2007-05-05
Initial Package Version: 2.5
Upstream Status: Rejected - http://sources.redhat.com/bugzilla/show_bug.cgi?id=3333
Origin: Fedora's glibc-fedora.patch (via glibc-2.5.90-21)
Description: Avoid segmentation faults, or kills, on PaX and Exe-Shield kernels,
and some non-x86 architectures.
* Sun Jun 01 2003 Jakub Jelinek <[email protected]> 2.3.2-46
- avoid using trampolines in localedef
This patch is also known as:
local-localedef-fix-trampoline.diff (Debian)
1040_all_2.3.3-localedef-fix-trampoline.patch (Gentoo)
Also see:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=231438
diff -Naur glibc-2.5.orig/locale/programs/3level.h glibc-2.5/locale/programs/3level.h
--- glibc-2.5.orig/locale/programs/3level.h 2005-12-07 05:47:27.000000000 +0000
+++ glibc-2.5/locale/programs/3level.h 2006-10-11 08:05:00.000000000 +0000
@@ -202,6 +202,42 @@
}
}
}
+
+/* GCC ATM seems to do a poor job with pointers to nested functions passed
+ to inlined functions. Help it a little bit with this hack. */
+#define wchead_table_iterate(tp, fn) \
+do \
+ { \
+ struct wchead_table *t = (tp); \
+ uint32_t index1; \
+ for (index1 = 0; index1 < t->level1_size; index1++) \
+ { \
+ uint32_t lookup1 = t->level1[index1]; \
+ if (lookup1 != ((uint32_t) ~0)) \
+ { \
+ uint32_t lookup1_shifted = lookup1 << t->q; \
+ uint32_t index2; \
+ for (index2 = 0; index2 < (1 << t->q); index2++) \
+ { \
+ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \
+ if (lookup2 != ((uint32_t) ~0)) \
+ { \
+ uint32_t lookup2_shifted = lookup2 << t->p; \
+ uint32_t index3; \
+ for (index3 = 0; index3 < (1 << t->p); index3++) \
+ { \
+ struct element_t *lookup3 \
+ = t->level3[index3 + lookup2_shifted]; \
+ if (lookup3 != NULL) \
+ fn ((((index1 << t->q) + index2) << t->p) + index3, \
+ lookup3); \
+ } \
+ } \
+ } \
+ } \
+ } \
+ } while (0)
+
#endif
#ifndef NO_FINALIZE