diff options
-rw-r--r-- | mysys/charset-def.c | 8 | ||||
-rw-r--r-- | mysys/charset.c | 2 | ||||
-rw-r--r-- | strings/ctype-uca.c | 5 |
3 files changed, 13 insertions, 2 deletions
diff --git a/mysys/charset-def.c b/mysys/charset-def.c index b8676a5d3d4..f168556e3f7 100644 --- a/mysys/charset-def.c +++ b/mysys/charset-def.c @@ -22,6 +22,8 @@ init_compiled_charsets() that only adds those that he wants */ +#ifdef HAVE_UCA_COLLATIONS + #ifdef HAVE_CHARSET_ucs2 extern CHARSET_INFO my_charset_ucs2_general_uca; extern CHARSET_INFO my_charset_ucs2_icelandic_uca_ci; @@ -62,6 +64,8 @@ extern CHARSET_INFO my_charset_utf8_roman_uca_ci; extern CHARSET_INFO my_charset_utf8_persian_uca_ci; #endif +#endif /* HAVE_UCA_COLLATIONS */ + my_bool init_compiled_charsets(myf flags __attribute__((unused))) { CHARSET_INFO *cs; @@ -123,6 +127,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused))) #ifdef HAVE_CHARSET_ucs2 add_compiled_collation(&my_charset_ucs2_general_ci); add_compiled_collation(&my_charset_ucs2_bin); +#ifdef HAVE_UCA_COLLATIONS add_compiled_collation(&my_charset_ucs2_general_uca); add_compiled_collation(&my_charset_ucs2_icelandic_uca_ci); add_compiled_collation(&my_charset_ucs2_latvian_uca_ci); @@ -141,6 +146,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused))) add_compiled_collation(&my_charset_ucs2_roman_uca_ci); add_compiled_collation(&my_charset_ucs2_persian_uca_ci); #endif +#endif #ifdef HAVE_CHARSET_ujis add_compiled_collation(&my_charset_ujis_japanese_ci); @@ -150,6 +156,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused))) #ifdef HAVE_CHARSET_utf8 add_compiled_collation(&my_charset_utf8_general_ci); add_compiled_collation(&my_charset_utf8_bin); +#ifdef HAVE_UCA_COLLATIONS add_compiled_collation(&my_charset_utf8_general_uca_ci); add_compiled_collation(&my_charset_utf8_icelandic_uca_ci); add_compiled_collation(&my_charset_utf8_latvian_uca_ci); @@ -168,6 +175,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused))) add_compiled_collation(&my_charset_utf8_roman_uca_ci); add_compiled_collation(&my_charset_utf8_persian_uca_ci); #endif +#endif /* Copy compiled charsets */ for (cs=compiled_charsets; cs->name; cs++) diff --git a/mysys/charset.c b/mysys/charset.c index 5587a6d685f..bb8f2d178b9 100644 --- a/mysys/charset.c +++ b/mysys/charset.c @@ -215,7 +215,7 @@ static int add_collation(CHARSET_INFO *cs) if (!strcmp(cs->csname,"ucs2") ) { -#ifdef HAVE_CHARSET_ucs2 +#if defined(HAVE_CHARSET_ucs2) && defined(HAVE_UCA_COLLATIONS) new->cset= my_charset_ucs2_general_uca.cset; new->coll= my_charset_ucs2_general_uca.coll; new->strxfrm_multiply= my_charset_ucs2_general_uca.strxfrm_multiply; diff --git a/strings/ctype-uca.c b/strings/ctype-uca.c index 8345d0474f2..80fe0167cdd 100644 --- a/strings/ctype-uca.c +++ b/strings/ctype-uca.c @@ -36,6 +36,7 @@ #include "m_string.h" #include "m_ctype.h" +#ifdef HAVE_UCA_COLLATIONS #define MY_UCA_NPAGES 256 #define MY_UCA_NCHARS 256 @@ -9002,4 +9003,6 @@ CHARSET_INFO my_charset_utf8_persian_uca_ci= &my_collation_any_uca_handler }; -#endif +#endif /* HAVE_CHARSET_utf8 */ + +#endif /* HAVE_UCA_COLLATIONS */ |