PATCH for: 4.1 libmysql/ctype-extra.c compile failure

PATCH for: 4.1 libmysql/ctype-extra.c compile failure

am 18.02.2003 20:38:49 von Paul DuBois

I've got a patch for the following problem.

On Tue, Feb 18, 2003 at 01:30:44PM -0600, Paul DuBois wrote:
> I see zillions of errors trying to compile libmysql/ctype-extra.c in
> the 4.1 tree. This happens on RedHat 7.0, RedHat 7.3, and Mac OS X 10.2.x.
> I've been seeing this problem for more than a week, I'm surprised
> it's still present. Am I the only one this happens to?
>
> How-to-repeat:
>
> configure and make
>
> gcc -DDEFAULT_CHARSET_HOME=\"/var/mysql/40100\"
> -DDATADIR=\"/var/mysql/40100/data\"
> -DSHAREDIR=\"/var/mysql/40100/share/mysql\" -DUNDEF_THREADS_HACK
> -DDONT_USE_RAID -DMYSQL_CLIENT -I. -I. -I.. -I../include
> -I/usr/local/ssl/include -O3 -DDBUG_OFF -MT ctype-extra.lo -MD -MP
> -MF .deps/ctype-extra.Tpo -c ctype-extra.c -o ctype-extra.o
> ctype-extra.c:2982: warning: initialization from incompatible pointer type
> ctype-extra.c:2983: warning: initialization from incompatible pointer type
> ctype-extra.c:2984: warning: initialization from incompatible pointer type
> ctype-extra.c:2985: warning: initialization from incompatible pointer type
> ctype-extra.c:2986: warning: initialization from incompatible pointer type
> ctype-extra.c:2987: warning: initialization from incompatible pointer type
> ctype-extra.c:2989: warning: initialization from incompatible pointer type
> ctype-extra.c:2990: warning: initialization from incompatible pointer type
> ctype-extra.c:2991: warning: initialization from incompatible pointer type
> ctype-extra.c:2992: warning: initialization from incompatible pointer type
> ctype-extra.c:2994: warning: initialization from incompatible pointer type
> ctype-extra.c:2995: warning: initialization makes integer from
> pointer without a cast
> ctype-extra.c:2995: initializer element is not computable at load time
> ctype-extra.c:2995: (near initialization for
> `compiled_charsets[3].max_sort_char')

etc.

These compile problems turn out to be triggered by configuring with
--with-extra-charsets=all. Several of the little-used charset structs
seem to have missing members (and one has two transposed members).

Here's a patch that makes the compiler errors go away, but someone that
knows that they're doing should look it over. :-)

--- strings/ctype-extra.c.orig Wed Feb 12 17:20:32 2003
+++ strings/ctype-extra.c Tue Feb 18 13:18:13 2003
@@ -2979,6 +2979,8 @@
NULL, /* ismbchar */
NULL, /* ismbhead */
NULL, /* mbcharlen */
+ my_numchars_8bit,
+ my_charpos_8bit,
my_mb_wc_8bit, /* mb_wc */
my_wc_mb_8bit, /* wc_mb */
my_caseup_str_8bit,
@@ -3028,6 +3030,8 @@
NULL, /* ismbchar */
NULL, /* ismbhead */
NULL, /* mbcharlen */
+ my_numchars_8bit,
+ my_charpos_8bit,
my_mb_wc_8bit, /* mb_wc */
my_wc_mb_8bit, /* wc_mb */
my_caseup_str_8bit,
@@ -3076,6 +3080,8 @@
NULL, /* ismbchar */
NULL, /* ismbhead */
NULL, /* mbcharlen */
+ my_numchars_8bit,
+ my_charpos_8bit,
my_mb_wc_8bit, /* mb_wc */
my_wc_mb_8bit, /* wc_mb */
my_caseup_str_8bit,
@@ -3124,6 +3130,8 @@
NULL, /* ismbchar */
NULL, /* ismbhead */
NULL, /* mbcharlen */
+ my_numchars_8bit,
+ my_charpos_8bit,
my_mb_wc_8bit, /* mb_wc */
my_wc_mb_8bit, /* wc_mb */
my_caseup_str_8bit,
@@ -3172,6 +3180,8 @@
NULL, /* ismbchar */
NULL, /* ismbhead */
NULL, /* mbcharlen */
+ my_numchars_8bit,
+ my_charpos_8bit,
my_mb_wc_8bit, /* mb_wc */
my_wc_mb_8bit, /* wc_mb */
my_caseup_str_8bit,
@@ -3221,6 +3231,8 @@
NULL, /* ismbchar */
NULL, /* ismbhead */
NULL, /* mbcharlen */
+ my_numchars_8bit,
+ my_charpos_8bit,
my_mb_wc_8bit, /* mb_wc */
my_wc_mb_8bit, /* wc_mb */
my_caseup_str_8bit,
@@ -3269,6 +3281,8 @@
NULL, /* ismbchar */
NULL, /* ismbhead */
NULL, /* mbcharlen */
+ my_numchars_8bit,
+ my_charpos_8bit,
my_mb_wc_8bit, /* mb_wc */
my_wc_mb_8bit, /* wc_mb */
my_caseup_str_8bit,
@@ -3317,6 +3331,8 @@
NULL, /* ismbchar */
NULL, /* ismbhead */
NULL, /* mbcharlen */
+ my_numchars_8bit,
+ my_charpos_8bit,
my_mb_wc_8bit, /* mb_wc */
my_wc_mb_8bit, /* wc_mb */
my_caseup_str_8bit,
@@ -3365,6 +3381,8 @@
NULL, /* ismbchar */
NULL, /* ismbhead */
NULL, /* mbcharlen */
+ my_numchars_8bit,
+ my_charpos_8bit,
my_mb_wc_8bit, /* mb_wc */
my_wc_mb_8bit, /* wc_mb */
my_caseup_str_8bit,
@@ -3413,6 +3431,8 @@
NULL, /* ismbchar */
NULL, /* ismbhead */
NULL, /* mbcharlen */
+ my_numchars_8bit,
+ my_charpos_8bit,
my_mb_wc_8bit, /* mb_wc */
my_wc_mb_8bit, /* wc_mb */
my_caseup_str_8bit,
@@ -3461,6 +3481,8 @@
NULL, /* ismbchar */
NULL, /* ismbhead */
NULL, /* mbcharlen */
+ my_numchars_8bit,
+ my_charpos_8bit,
my_mb_wc_8bit, /* mb_wc */
my_wc_mb_8bit, /* wc_mb */
my_caseup_str_8bit,
@@ -3509,6 +3531,8 @@
NULL, /* ismbchar */
NULL, /* ismbhead */
NULL, /* mbcharlen */
+ my_numchars_8bit,
+ my_charpos_8bit,
my_mb_wc_8bit, /* mb_wc */
my_wc_mb_8bit, /* wc_mb */
my_caseup_str_8bit,
@@ -3558,6 +3582,8 @@
NULL, /* ismbchar */
NULL, /* ismbhead */
NULL, /* mbcharlen */
+ my_numchars_8bit,
+ my_charpos_8bit,
my_mb_wc_8bit, /* mb_wc */
my_wc_mb_8bit, /* wc_mb */
my_caseup_str_8bit,
@@ -3606,6 +3632,8 @@
NULL, /* ismbchar */
NULL, /* ismbhead */
NULL, /* mbcharlen */
+ my_numchars_8bit,
+ my_charpos_8bit,
my_mb_wc_8bit, /* mb_wc */
my_wc_mb_8bit, /* wc_mb */
my_caseup_str_8bit,
@@ -3655,6 +3683,8 @@
NULL, /* ismbchar */
NULL, /* ismbhead */
NULL, /* mbcharlen */
+ my_numchars_8bit,
+ my_charpos_8bit,
my_mb_wc_8bit, /* mb_wc */
my_wc_mb_8bit, /* wc_mb */
my_caseup_str_8bit,
@@ -3704,6 +3734,8 @@
NULL, /* ismbchar */
NULL, /* ismbhead */
NULL, /* mbcharlen */
+ my_numchars_8bit,
+ my_charpos_8bit,
my_mb_wc_8bit, /* mb_wc */
my_wc_mb_8bit, /* wc_mb */
my_caseup_str_8bit,
@@ -3752,6 +3784,8 @@
NULL, /* ismbchar */
NULL, /* ismbhead */
NULL, /* mbcharlen */
+ my_numchars_8bit,
+ my_charpos_8bit,
my_mb_wc_8bit, /* mb_wc */
my_wc_mb_8bit, /* wc_mb */
my_caseup_str_8bit,
@@ -3800,14 +3834,16 @@
NULL, /* ismbchar */
NULL, /* ismbhead */
NULL, /* mbcharlen */
+ my_numchars_8bit,
+ my_charpos_8bit,
my_mb_wc_8bit, /* mb_wc */
my_wc_mb_8bit, /* wc_mb */
my_caseup_str_8bit,
my_casedn_str_8bit,
my_caseup_8bit,
my_casedn_8bit,
- my_strcasecmp_8bit,
my_tosort_8bit,
+ my_strcasecmp_8bit,
my_strncasecmp_8bit,
my_hash_caseup_simple,
my_hash_sort_simple,
@@ -3848,6 +3884,8 @@
NULL, /* ismbchar */
NULL, /* ismbhead */
NULL, /* mbcharlen */
+ my_numchars_8bit,
+ my_charpos_8bit,
my_mb_wc_8bit, /* mb_wc */
my_wc_mb_8bit, /* wc_mb */
my_caseup_str_8bit,
@@ -3896,6 +3934,8 @@
NULL, /* ismbchar */
NULL, /* ismbhead */
NULL, /* mbcharlen */
+ my_numchars_8bit,
+ my_charpos_8bit,
my_mb_wc_8bit, /* mb_wc */
my_wc_mb_8bit, /* wc_mb */
my_caseup_str_8bit,

------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13801@lists.mysql.com
To unsubscribe, e-mail