linamh/sys-libs/glibc/files/2.3.1/glibc-2.3.1-ctype-compat-v3.patch
2009-09-12 08:46:08 +00:00

67 lines
2.8 KiB
Diff

--- glibc-2.3.1/ctype/ctype-info.c.orig 2002-11-07 15:58:39.000000000 +0200
+++ glibc-2.3.1/ctype/ctype-info.c 2002-11-07 16:01:24.000000000 +0200
@@ -48,6 +48,7 @@
#define b(t,x,o) (((const t *) _nl_C_LC_CTYPE_##x) + o)
+#if 0
const unsigned short int *__ctype_b = b (unsigned short int, class, 128);
const __uint32_t *__ctype32_b = b (__uint32_t, class32, 0);
const __int32_t *__ctype_tolower = b (__int32_t, tolower, 128);
@@ -61,5 +62,23 @@
compat_symbol (libc, __ctype32_b, __ctype32_b, GLIBC_2_0);
compat_symbol (libc, __ctype32_tolower, __ctype32_tolower, GLIBC_2_2);
compat_symbol (libc, __ctype32_toupper, __ctype32_toupper, GLIBC_2_2);
+#endif
#endif
+
+/* Temporarily exported until all .a libraries are recompiled. */
+#undef b
+#define b(t,x,o) (((const t *) _nl_C_LC_CTYPE_##x) + o)
+
+extern const char _nl_C_LC_CTYPE_class[] attribute_hidden;
+extern const char _nl_C_LC_CTYPE_class32[] attribute_hidden;
+extern const char _nl_C_LC_CTYPE_toupper[] attribute_hidden;
+extern const char _nl_C_LC_CTYPE_tolower[] attribute_hidden;
+
+const unsigned short int *__ctype_b = b (unsigned short int, class, 128);
+const __uint32_t *__ctype32_b = b (__uint32_t, class32, 0);
+const __int32_t *__ctype_tolower = b (__int32_t, tolower, 128);
+const __int32_t *__ctype_toupper = b (__int32_t, toupper, 128);
+const __uint32_t *__ctype32_tolower = b (__uint32_t, tolower, 128);
+const __uint32_t *__ctype32_toupper = b (__uint32_t, toupper, 128);
+
--- glibc-2.3.1/locale/lc-ctype.c.orig 2002-12-30 11:43:39.000000000 +0200
+++ glibc-2.3.1/locale/lc-ctype.c 2002-12-30 11:48:22.000000000 +0200
@@ -75,6 +75,7 @@
We need those relocations so that a versioned definition with a COPY
reloc in an executable will override the libc.so definition. */
+#if 0
compat_symbol (libc, __ctype_b, __ctype_b, GLIBC_2_0);
compat_symbol (libc, __ctype_tolower, __ctype_tolower, GLIBC_2_0);
compat_symbol (libc, __ctype_toupper, __ctype_toupper, GLIBC_2_0);
@@ -89,4 +90,21 @@
__ctype32_toupper = current (uint32_t, TOUPPER32, 0);
__ctype32_tolower = current (uint32_t, TOLOWER32, 0);
#endif
+
+#endif
+
+ /* Temporary. */
+ extern __const unsigned short int *__ctype_b; /* Characteristics. */
+ extern __const __int32_t *__ctype_tolower; /* Case conversions. */
+ extern __const __int32_t *__ctype_toupper; /* Case conversions. */
+ extern const uint32_t *__ctype32_b;
+ extern const uint32_t *__ctype32_toupper;
+ extern const uint32_t *__ctype32_tolower;
+
+ __ctype_b = current (uint16_t, CLASS, 128);
+ __ctype_toupper = current (uint32_t, TOUPPER, 128);
+ __ctype_tolower = current (uint32_t, TOLOWER, 128);
+ __ctype32_b = current (uint32_t, CLASS32, 0);
+ __ctype32_toupper = current (uint32_t, TOUPPER32, 0);
+ __ctype32_tolower = current (uint32_t, TOLOWER32, 0);
}