[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r2589 - in /trunk/libc: ChangeLog.eglibc iconv/Makefile iconv/gconv_trans.c locale/C-ctype.c locale/Makefile
- To: commits@xxxxxxxxxx
- Subject: [commits] r2589 - in /trunk/libc: ChangeLog.eglibc iconv/Makefile iconv/gconv_trans.c locale/C-ctype.c locale/Makefile
- From: jimb@xxxxxxxxxx
- Date: Fri, 22 Jun 2007 00:14:02 -0000
Author: jimb
Date: Thu Jun 21 17:14:01 2007
New Revision: 2589
Log:
2007-06-21 Jim Blandy <jimb@xxxxxxxxxxxxxxxx>
* locale/C-ctype.c: If OPTION_EGLIBC_LOCALE_CODE is not enabled,
provide only minimal transliteration.
* locale/Makefile (CFLAGS-C-ctype.c): Define
OPTION_EGLIBC_LOCALE_CODE as appropriate.
* iconv/gconv_trans.c (__gconv_transliterate): Don't bother trying
to look up transliteration table information.
* iconv/Makefile (CFLAGS-gconv_trans.c.c): Define
OPTION_EGLIBC_LOCALE_CODE as appropriate.
Modified:
trunk/libc/ChangeLog.eglibc
trunk/libc/iconv/Makefile
trunk/libc/iconv/gconv_trans.c
trunk/libc/locale/C-ctype.c
trunk/libc/locale/Makefile
Modified: trunk/libc/ChangeLog.eglibc
==============================================================================
--- trunk/libc/ChangeLog.eglibc (original)
+++ trunk/libc/ChangeLog.eglibc Thu Jun 21 17:14:01 2007
@@ -1,3 +1,14 @@
+2007-06-21 Jim Blandy <jimb@xxxxxxxxxxxxxxxx>
+
+ * locale/C-ctype.c: If OPTION_EGLIBC_LOCALE_CODE is not enabled,
+ provide only minimal transliteration.
+ * locale/Makefile (CFLAGS-C-ctype.c): Define
+ OPTION_EGLIBC_LOCALE_CODE as appropriate.
+ * iconv/gconv_trans.c (__gconv_transliterate): Don't bother trying
+ to look up transliteration table information.
+ * iconv/Makefile (CFLAGS-gconv_trans.c.c): Define
+ OPTION_EGLIBC_LOCALE_CODE as appropriate.
+
2007-06-13 Jim Blandy <jimb@xxxxxxxxxxxxxxxx>
Add the OPTION_POSIX_REGEXP option group.
Modified: trunk/libc/iconv/Makefile
==============================================================================
--- trunk/libc/iconv/Makefile (original)
+++ trunk/libc/iconv/Makefile Thu Jun 21 17:14:01 2007
@@ -41,6 +41,7 @@
= -DOPTION_EGLIBC_LOCALE_CODE
CFLAGS-gconv_db.c += $(OPTION_EGLIBC_LOCALE_CODE-CFLAGS-y)
+CFLAGS-gconv_trans.c += $(OPTION_EGLIBC_LOCALE_CODE-CFLAGS-y)
vpath %.c ../locale/programs ../intl
Modified: trunk/libc/iconv/gconv_trans.c
==============================================================================
--- trunk/libc/iconv/gconv_trans.c (original)
+++ trunk/libc/iconv/gconv_trans.c Thu Jun 21 17:14:01 2007
@@ -60,6 +60,7 @@
PTR_DEMANGLE (fct);
#endif
+#ifdef OPTION_EGLIBC_LOCALE_CODE
/* If there is no transliteration information in the locale don't do
anything and return the error. */
size = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_TRANSLIT_TAB_SIZE);
@@ -192,6 +193,7 @@
sorted. */
break;
}
+#endif
/* One last chance: use the default replacement. */
if (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN) != 0)
Modified: trunk/libc/locale/C-ctype.c
==============================================================================
--- trunk/libc/locale/C-ctype.c (original)
+++ trunk/libc/locale/C-ctype.c Thu Jun 21 17:14:01 2007
@@ -20,7 +20,9 @@
#include "localeinfo.h"
#include <endian.h>
+#ifdef OPTION_EGLIBC_LOCALE_CODE
#include "C-translit.h"
+#endif
/* This table's entries are taken from POSIX.2 Table 2-6
``LC_CTYPE Category Definition in the POSIX Locale''.
@@ -647,6 +649,7 @@
{ .word = L'7' },
{ .word = L'8' },
{ .word = L'9' },
+#ifdef OPTION_EGLIBC_LOCALE_CODE
/* _NL_CTYPE_TRANSLIT_TAB_SIZE */
{ .word = NTRANSLIT },
/* _NL_CTYPE_TRANSLIT_FROM_IDX */
@@ -657,6 +660,22 @@
{ .wstr = translit_to_idx },
/* _NL_CTYPE_TRANSLIT_TO_TBL */
{ .wstr = (uint32_t *) translit_to_tbl },
+#else
+ /* If the locale code isn't enabled, we don't have the
+ transliteration code in iconv/gconv_trans.c anyway, so there's
+ no need for the transliteration tables here. We'll fall back
+ on the default missing replacement, '?'. */
+ /* _NL_CTYPE_TRANSLIT_TAB_SIZE */
+ { .word = 0 },
+ /* _NL_CTYPE_TRANSLIT_FROM_IDX */
+ { .wstr = NULL },
+ /* _NL_CTYPE_TRANSLIT_FROM_TBL */
+ { .wstr = NULL },
+ /* _NL_CTYPE_TRANSLIT_TO_IDX */
+ { .wstr = NULL },
+ /* _NL_CTYPE_TRANSLIT_TO_TBL */
+ { .wstr = NULL },
+#endif
/* _NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN */
{ .word = 1 },
/* _NL_CTYPE_TRANSLIT_DEFAULT_MISSING */
Modified: trunk/libc/locale/Makefile
==============================================================================
--- trunk/libc/locale/Makefile (original)
+++ trunk/libc/locale/Makefile Thu Jun 21 17:14:01 2007
@@ -119,6 +119,7 @@
OPTION_POSIX_REGEXP-CFLAGS-$(OPTION_POSIX_REGEXP) \
= -DOPTION_POSIX_REGEXP
+CFLAGS-C-ctype.c = $(OPTION_EGLIBC_LOCALE_CODE-CFLAGS-y)
CFLAGS-xlocale.c = $(OPTION_EGLIBC_LOCALE_CODE-CFLAGS-y)
CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts
CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts