]> git.pld-linux.org Git - packages/glibc.git/blob - glibc-ctype-compat.patch
- added dirs for dz,km,mg messages
[packages/glibc.git] / glibc-ctype-compat.patch
1 glibc 2.3.x changes some symbols (__ctype_b, __ctype_toupper, 
2 __ctype_tolower) as hidden attribute. These symbols that are
3 crashing the old 2.2.x dynamic linking code in static binaries
4 are now exported. This patch is originally pulled from RedHat.
5
6 --- glibc/ctype/ctype-info.c    28 Sep 2002 20:36:35 -0000      1.1.1.9
7 +++ glibc/ctype/ctype-info.c    29 Sep 2002 11:38:50 -0000      1.4
8 @@ -48,18 +48,32 @@ extern const char _nl_C_LC_CTYPE_class_a
9  
10  #define b(t,x,o) (((const t *) _nl_C_LC_CTYPE_##x) + o)
11  
12 +// const unsigned short int *__ctype_b = b (unsigned short int, class, 128);
13 +// const __uint32_t *__ctype32_b = b (__uint32_t, class32, 0);
14 +// const __int32_t *__ctype_tolower = b (__int32_t, tolower, 128);
15 +// const __int32_t *__ctype_toupper = b (__int32_t, toupper, 128);
16 +// const __uint32_t *__ctype32_tolower = b (__uint32_t, tolower, 128);
17 +// const __uint32_t *__ctype32_toupper = b (__uint32_t, toupper, 128);
18 +
19 +// compat_symbol (libc, __ctype_b, __ctype_b, GLIBC_2_0);
20 +// compat_symbol (libc, __ctype_tolower, __ctype_tolower, GLIBC_2_0);
21 +// compat_symbol (libc, __ctype_toupper, __ctype_toupper, GLIBC_2_0);
22 +// compat_symbol (libc, __ctype32_b, __ctype32_b, GLIBC_2_0);
23 +// compat_symbol (libc, __ctype32_tolower, __ctype32_tolower, GLIBC_2_2);
24 +// compat_symbol (libc, __ctype32_toupper, __ctype32_toupper, GLIBC_2_2);
25 +
26 +#endif
27 +
28 +/* Temporarily exported until all .a libraries are recompiled.  */
29 +#undef b
30 +#define b(t,x,o) (((const t *) _nl_C_LC_CTYPE_##x) + o)
31 +extern const char _nl_C_LC_CTYPE_class[] attribute_hidden;
32 +extern const char _nl_C_LC_CTYPE_class32[] attribute_hidden;
33 +extern const char _nl_C_LC_CTYPE_toupper[] attribute_hidden;
34 +extern const char _nl_C_LC_CTYPE_tolower[] attribute_hidden;
35  const unsigned short int *__ctype_b = b (unsigned short int, class, 128);
36  const __uint32_t *__ctype32_b = b (__uint32_t, class32, 0);
37  const __int32_t *__ctype_tolower = b (__int32_t, tolower, 128);
38  const __int32_t *__ctype_toupper = b (__int32_t, toupper, 128);
39  const __uint32_t *__ctype32_tolower = b (__uint32_t, tolower, 128);
40  const __uint32_t *__ctype32_toupper = b (__uint32_t, toupper, 128);
41 -
42 -compat_symbol (libc, __ctype_b, __ctype_b, GLIBC_2_0);
43 -compat_symbol (libc, __ctype_tolower, __ctype_tolower, GLIBC_2_0);
44 -compat_symbol (libc, __ctype_toupper, __ctype_toupper, GLIBC_2_0);
45 -compat_symbol (libc, __ctype32_b, __ctype32_b, GLIBC_2_0);
46 -compat_symbol (libc, __ctype32_tolower, __ctype32_tolower, GLIBC_2_2);
47 -compat_symbol (libc, __ctype32_toupper, __ctype32_toupper, GLIBC_2_2);
48 -
49 -#endif
50 --- glibc-2.3.1-cygnus/locale/lc-ctype.c        28 Sep 2002 20:37:14 -0000      1.1.1.8
51 +++ glibc-2.3.1-redhat/locale/lc-ctype.c        29 Sep 2002 11:38:51 -0000      1.5
52 @@ -75,18 +75,32 @@ _nl_postload_ctype (void)
53       We need those relocations so that a versioned definition with a COPY
54       reloc in an executable will override the libc.so definition.  */
55  
56 -compat_symbol (libc, __ctype_b, __ctype_b, GLIBC_2_0);
57 -compat_symbol (libc, __ctype_tolower, __ctype_tolower, GLIBC_2_0);
58 -compat_symbol (libc, __ctype_toupper, __ctype_toupper, GLIBC_2_0);
59 -compat_symbol (libc, __ctype32_b, __ctype32_b, GLIBC_2_0);
60 -compat_symbol (libc, __ctype32_tolower, __ctype32_tolower, GLIBC_2_2);
61 -compat_symbol (libc, __ctype32_toupper, __ctype32_toupper, GLIBC_2_2);
62 +// compat_symbol (libc, __ctype_b, __ctype_b, GLIBC_2_0);
63 +// compat_symbol (libc, __ctype_tolower, __ctype_tolower, GLIBC_2_0);
64 +// compat_symbol (libc, __ctype_toupper, __ctype_toupper, GLIBC_2_0);
65 +// compat_symbol (libc, __ctype32_b, __ctype32_b, GLIBC_2_0);
66 +// compat_symbol (libc, __ctype32_tolower, __ctype32_tolower, GLIBC_2_2);
67 +// compat_symbol (libc, __ctype32_toupper, __ctype32_toupper, GLIBC_2_2);
68  
69 +//  __ctype_b = current (uint16_t, CLASS, 128);
70 +//  __ctype_toupper = current (uint32_t, TOUPPER, 128);
71 +//  __ctype_tolower = current (uint32_t, TOLOWER, 128);
72 +//  __ctype32_b = current (uint32_t, CLASS32, 0);
73 +//  __ctype32_toupper = current (uint32_t, TOUPPER32, 0);
74 +//  __ctype32_tolower = current (uint32_t, TOLOWER32, 0);
75 +#endif
76 +
77 +  /* Temporary.  */
78 +  extern __const unsigned short int *__ctype_b; /* Characteristics.  */
79 +  extern __const __int32_t *__ctype_tolower; /* Case conversions.  */
80 +  extern __const __int32_t *__ctype_toupper; /* Case conversions.  */
81 +  extern const uint32_t *__ctype32_b;
82 +  extern const uint32_t *__ctype32_toupper;
83 +  extern const uint32_t *__ctype32_tolower;
84    __ctype_b = current (uint16_t, CLASS, 128);
85    __ctype_toupper = current (uint32_t, TOUPPER, 128);
86    __ctype_tolower = current (uint32_t, TOLOWER, 128);
87    __ctype32_b = current (uint32_t, CLASS32, 0);
88    __ctype32_toupper = current (uint32_t, TOUPPER32, 0);
89    __ctype32_tolower = current (uint32_t, TOLOWER32, 0);
90 -#endif
91  }
This page took 0.039109 seconds and 3 git commands to generate.