← Back to team overview

maria-developers team mailing list archive

[Branch ~maria-captains/maria/5.1] Rev 2774: Fixed link problem when compiling without uca

 

------------------------------------------------------------
revno: 2774
committer: Michael Widenius <monty@xxxxxxxxxxxx>
branch nick: mariadb-5.1
timestamp: Tue 2009-12-01 18:09:02 +0200
message:
  Fixed link problem when compiling without uca
modified:
  cmd-line-utils/readline/config_readline.h
  strings/ctype-uca.c


--
lp:maria
https://code.launchpad.net/~maria-captains/maria/5.1

Your team Maria developers is subscribed to branch lp:maria.
To unsubscribe from this branch go to https://code.launchpad.net/~maria-captains/maria/5.1/+edit-subscription.
=== modified file 'cmd-line-utils/readline/config_readline.h'
--- cmd-line-utils/readline/config_readline.h	2009-11-30 21:37:27 +0000
+++ cmd-line-utils/readline/config_readline.h	2009-12-01 16:09:02 +0000
@@ -7,6 +7,13 @@
 #  include <config.h>
 #endif
 
+#ifdef NOT_YET /* causes problem on MacOSX */
+/* to get wcwidth() defined */
+#define _XOPEN_SOURCE 600
+#define _XOPEN_SOURCE_EXTENDED
+#define _XOPEN_
+#endif
+
 /*
  Ultrix botches type-ahead when switching from canonical to
    non-canonical mode, at least through version 4.3

=== modified file 'strings/ctype-uca.c'
--- strings/ctype-uca.c	2009-11-30 12:42:24 +0000
+++ strings/ctype-uca.c	2009-12-01 16:09:02 +0000
@@ -36,6 +36,12 @@
 #include "m_string.h"
 #include "m_ctype.h"
 
+
+#define MY_UCA_CNT_FLAG_SIZE 4096
+#define MY_UCA_CNT_FLAG_MASK 4095
+#define MY_UCA_CNT_HEAD 1
+#define MY_UCA_CNT_TAIL 2
+
 #ifdef HAVE_UCA_COLLATIONS
 
 #define MY_UCA_NPAGES 256
@@ -6756,16 +6762,6 @@
 
 static uint16 nochar[]= {0,0};
 
-
-#define MY_UCA_CNT_FLAG_SIZE 4096
-#define MY_UCA_CNT_FLAG_MASK 4095
-
-#define MY_UCA_CNT_HEAD 1
-#define MY_UCA_CNT_TAIL 2
-
-
-
-
 /********** Helper functions to handle contraction ************/
 
 
@@ -6836,85 +6832,6 @@
   return 0;
 }
 
-
-/**
-  Check if UCA data has contractions (public version)
-
-  @cs       Pointer to CHARSET_INFO data
-  @retval   0 - no contraction, 1 - have contractions.
-*/
-
-my_bool
-my_uca_have_contractions(CHARSET_INFO *cs)
-{
-  return cs->contractions != NULL;
-}
-
-
-/**
-  Check if a character can be contraction head
-  
-  @cs       Pointer to CHARSET_INFO data
-  @wc       Code point
-  
-  @retval   0 - cannot be contraction head
-  @retval   1 - can be contraction head
-*/
-
-my_bool
-my_uca_can_be_contraction_head(CHARSET_INFO *cs, my_wc_t wc)
-{
-  return cs->contractions->flags[wc & MY_UCA_CNT_FLAG_MASK] & MY_UCA_CNT_HEAD;
-}
-
-
-/**
-  Check if a character can be contraction tail
-  
-  @cs       Pointer to CHARSET_INFO data
-  @wc       Code point
-  
-  @retval   0 - cannot be contraction tail
-  @retval   1 - can be contraction tail
-*/
-
-my_bool
-my_uca_can_be_contraction_tail(CHARSET_INFO *cs, my_wc_t wc)
-{
-  return cs->contractions->flags[wc & MY_UCA_CNT_FLAG_MASK] & MY_UCA_CNT_TAIL;
-}
-
-
-/**
-  Find a contraction and return its weight array
-  
-  @cs       Pointer to CHARSET data
-  @wc1      First character
-  @wc2      Second character
-  
-  @return   Weight array
-  @retval   NULL - no contraction found
-  @retval   ptr  - contraction weight array
-*/
-
-uint16 *
-my_uca_contraction2_weight(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2)
-{
-  MY_CONTRACTIONS *list= cs->contractions;
-  MY_CONTRACTION *c, *last;
-  for (c= list->item, last= &list->item[list->nitems]; c < last; c++)
-  {
-    if (c->ch[0] == wc1 && c->ch[1] == wc2)
-    {
-      return c->weight;
-    }
-  }
-  return NULL;
-}
-
-
-
-
 #ifdef HAVE_CHARSET_ucs2
 /*
   Initialize collation weight scanner
@@ -9607,3 +9524,78 @@
 #endif /* HAVE_CHARSET_utf8 */
 
 #endif /* HAVE_UCA_COLLATIONS */
+
+/**
+  Check if UCA data has contractions (public version)
+
+  @cs       Pointer to CHARSET_INFO data
+  @retval   0 - no contraction, 1 - have contractions.
+*/
+
+my_bool
+my_uca_have_contractions(CHARSET_INFO *cs)
+{
+  return cs->contractions != NULL;
+}
+
+/**
+  Check if a character can be contraction head
+  
+  @cs       Pointer to CHARSET_INFO data
+  @wc       Code point
+  
+  @retval   0 - cannot be contraction head
+  @retval   1 - can be contraction head
+*/
+
+my_bool
+my_uca_can_be_contraction_head(CHARSET_INFO *cs, my_wc_t wc)
+{
+  return cs->contractions->flags[wc & MY_UCA_CNT_FLAG_MASK] & MY_UCA_CNT_HEAD;
+}
+
+
+/**
+  Check if a character can be contraction tail
+  
+  @cs       Pointer to CHARSET_INFO data
+  @wc       Code point
+  
+  @retval   0 - cannot be contraction tail
+  @retval   1 - can be contraction tail
+*/
+
+my_bool
+my_uca_can_be_contraction_tail(CHARSET_INFO *cs, my_wc_t wc)
+{
+  return cs->contractions->flags[wc & MY_UCA_CNT_FLAG_MASK] & MY_UCA_CNT_TAIL;
+}
+
+
+/**
+  Find a contraction and return its weight array
+  
+  @cs       Pointer to CHARSET data
+  @wc1      First character
+  @wc2      Second character
+  
+  @return   Weight array
+  @retval   NULL - no contraction found
+  @retval   ptr  - contraction weight array
+*/
+
+uint16 *
+my_uca_contraction2_weight(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2)
+{
+  MY_CONTRACTIONS *list= cs->contractions;
+  MY_CONTRACTION *c, *last;
+  for (c= list->item, last= &list->item[list->nitems]; c < last; c++)
+  {
+    if (c->ch[0] == wc1 && c->ch[1] == wc2)
+    {
+      return c->weight;
+    }
+  }
+  return NULL;
+}
+