summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <joerg@mysql.com>2005-04-08 13:56:48 +0200
committerunknown <joerg@mysql.com>2005-04-08 13:56:48 +0200
commitb9f486cd022dc67e5118dfdca38052c7b13c10fa (patch)
treedf8ad7b8e3c1738beeeff583617e6785687bfc00
parent0344bf166534fd56095220f06960172937746327 (diff)
downloadmariadb-git-b9f486cd022dc67e5118dfdca38052c7b13c10fa.tar.gz
Add missing parts for the "Cybozu" custom build, to avoid future manual patches.
configure.in: Normally, 'configure' does only support "case-insensitive" collations for UTF-8 character sets. However, a certain customer requires builds with a "case-sensitive" collation: 'utf8_general_cs'. In order to do custom builds without manual patches, this value gets special handling in 'configure'. Also, when it is given, the CPP symbol enabling the additional code is set. mysys/charset-def.c: Rename the CPP symbol needed for "UTF8-case-sensitive" collation from customer name to function. strings/ctype-utf8.c: Rename the CPP symbol needed for "UTF8-case-sensitive" collation from customer name to function.
-rwxr-xr-xBUILD/compile-pentium-cybozu9
-rw-r--r--configure.in27
-rw-r--r--mysys/charset-def.c4
-rw-r--r--strings/ctype-utf8.c2
4 files changed, 29 insertions, 13 deletions
diff --git a/BUILD/compile-pentium-cybozu b/BUILD/compile-pentium-cybozu
new file mode 100755
index 00000000000..841635985a1
--- /dev/null
+++ b/BUILD/compile-pentium-cybozu
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+path=`dirname $0`
+. "$path/SETUP.sh"
+
+extra_flags="$pentium_cflags $fast_cflags -g"
+extra_configs="$pentium_configs --with-charset=utf8 --with-collation=utf8_general_cs"
+
+. "$path/FINISH.sh"
diff --git a/configure.in b/configure.in
index 03b0ed9be29..c4bd95b9a24 100644
--- a/configure.in
+++ b/configure.in
@@ -2770,16 +2770,23 @@ case $default_charset in
;;
utf8)
default_charset_default_collation="utf8_general_ci"
- define(UTFC1, utf8_general_ci utf8_bin)
- define(UTFC2, utf8_czech_ci utf8_danish_ci)
- define(UTFC3, utf8_estonian_ci utf8_icelandic_ci)
- define(UTFC4, utf8_latvian_ci utf8_lithuanian_ci)
- define(UTFC5, utf8_persian_ci utf8_polish_ci utf8_romanian_ci)
- define(UTFC6, utf8_slovak_ci utf8_slovenian_ci)
- define(UTFC7, utf8_spanish2_ci utf8_spanish_ci)
- define(UTFC8, utf8_swedish_ci utf8_turkish_ci)
- define(UTFC9, utf8_unicode_ci)
- UTFC="UTFC1 UTFC2 UTFC3 UTFC4 UTFC5 UTFC6 UTFC7 UTFC8 UTFC9"
+ if test "$default_collation" = "utf8_general_cs"; then
+ # For those who explicitly desire "utf8_general_cs", support it,
+ # and then also set the CPP switch enabling that code.
+ UTFC="utf8_general_cs"
+ AC_DEFINE([HAVE_UTF8_GENERAL_CS], [1], [certain Japanese customer])
+ else
+ define(UTFC1, utf8_general_ci utf8_bin)
+ define(UTFC2, utf8_czech_ci utf8_danish_ci)
+ define(UTFC3, utf8_estonian_ci utf8_icelandic_ci)
+ define(UTFC4, utf8_latvian_ci utf8_lithuanian_ci)
+ define(UTFC5, utf8_persian_ci utf8_polish_ci utf8_romanian_ci)
+ define(UTFC6, utf8_slovak_ci utf8_slovenian_ci)
+ define(UTFC7, utf8_spanish2_ci utf8_spanish_ci)
+ define(UTFC8, utf8_swedish_ci utf8_turkish_ci)
+ define(UTFC9, utf8_unicode_ci)
+ UTFC="UTFC1 UTFC2 UTFC3 UTFC4 UTFC5 UTFC6 UTFC7 UTFC8 UTFC9"
+ fi
default_charset_collations="$UTFC"
;;
*)
diff --git a/mysys/charset-def.c b/mysys/charset-def.c
index c7fa0ffd8e0..d4f69a49a2c 100644
--- a/mysys/charset-def.c
+++ b/mysys/charset-def.c
@@ -62,7 +62,7 @@ extern CHARSET_INFO my_charset_utf8_slovak_uca_ci;
extern CHARSET_INFO my_charset_utf8_spanish2_uca_ci;
extern CHARSET_INFO my_charset_utf8_roman_uca_ci;
extern CHARSET_INFO my_charset_utf8_persian_uca_ci;
-#ifdef HAVE_CYBOZU_COLLATION
+#ifdef HAVE_UTF8_GENERAL_CS
extern CHARSET_INFO my_charset_utf8_general_cs;
#endif
#endif
@@ -149,7 +149,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_CYBOZU_COLLATION
+#ifdef HAVE_UTF8_GENERAL_CS
add_compiled_collation(&my_charset_utf8_general_cs);
#endif
#ifdef HAVE_UCA_COLLATIONS
diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c
index 83725878a50..230b44796e8 100644
--- a/strings/ctype-utf8.c
+++ b/strings/ctype-utf8.c
@@ -2375,7 +2375,7 @@ CHARSET_INFO my_charset_utf8_bin=
&my_collation_mb_bin_handler
};
-#ifdef HAVE_CYBOZU_COLLATION
+#ifdef HAVE_UTF8_GENERAL_CS
/*
* These functions bacically do the same as their original, except