From a85d0966e3b57f5df919fa4814b2503fb2c180c3 Mon Sep 17 00:00:00 2001
From: Timothy Gu <timothygu99@gmail.com>
Date: Wed, 24 Dec 2014 22:37:15 +0000
Subject: Support shared libraries on Haiku


diff --git a/configure.in b/configure.in
index 54a782d..65df51b 100644
--- a/configure.in
+++ b/configure.in
@@ -266,6 +266,10 @@ fi
 
 if test "$shared" = true; then
    case "$target_os" in
+	haiku*)
+		SHFLAGS="-fPIC"
+		OTHERLIBS="-lnetwork"
+	;;
 	linux*|k*bsd*-gnu|gnu*)
 		SHFLAGS="-fPIC"
         ;;
-- 
2.19.0


From 93527d24ecb02fe5a5c9e4ef30d76ea45a484007 Mon Sep 17 00:00:00 2001
From: Timothy Gu <timothygu99@gmail.com>
Date: Wed, 24 Dec 2014 23:44:02 +0000
Subject: Bump shlib version to libflite.so.2


diff --git a/config/project.mak b/config/project.mak
index 1d655d9..a1d0729 100644
--- a/config/project.mak
+++ b/config/project.mak
@@ -40,4 +40,4 @@ PROJECT_VERSION = 2.1
 PROJECT_DATE = Dec 2017
 PROJECT_STATE = release
 
-PROJECT_SHLIB_VERSION = 1
+PROJECT_SHLIB_VERSION = 2
-- 
2.19.0


From b496372f06a8292255a1e64ffa4211344252e8df Mon Sep 17 00:00:00 2001
From: Timothy Gu <timothygu99@gmail.com>
Date: Wed, 24 Dec 2014 22:39:36 +0000
Subject: Separate code and declaration


diff --git a/lang/cmu_indic_lex/cmu_indic_lex.c b/lang/cmu_indic_lex/cmu_indic_lex.c
index e0ae73f..7444472 100644
--- a/lang/cmu_indic_lex/cmu_indic_lex.c
+++ b/lang/cmu_indic_lex/cmu_indic_lex.c
@@ -420,6 +420,9 @@ cst_val *cmu_indic_lex_ord_to_phones(const cst_val *ords,
                                      int cmu_indic_variant_deletes_word_final_schwa,
                                      const cst_features *feats)
 {
+    const cst_val *v, *vx;
+    cst_val *ph;
+
     cst_val *in_ords = 0;
     cst_val *t_ords = 0;
     cst_val *out_phone_strings = 0;
@@ -587,8 +590,6 @@ cst_val *cmu_indic_lex_ord_to_phones(const cst_val *ords,
     /* There may be multiple phones in the expansion, but they are just */
     /* space separated tokens in the val, so we need to make them into  */
     /* an actual val list of phones */
-    const cst_val *v, *vx;
-    cst_val *ph;
     for(v=out_phone_strings; v; v=val_cdr(v)) {
         ph = val_readlist_string(val_string(val_car(v)));
         for(vx=ph; vx; vx=val_cdr(vx)) {
-- 
2.19.0


From e265c30eb34893a59d17c87f88870ea08ae4e295 Mon Sep 17 00:00:00 2001
From: Panagiotis Vasilopoulos <hello@alwayslivid.com>
Date: Sat, 4 Jan 2020 19:00:00 +0000
Subject: Made cmu_indic_lang.c C89 compatible


diff --git a/lang/cmu_indic_lang/cmu_indic_lang.c b/lang/cmu_indic_lang/cmu_indic_lang.c
index 27371ea..fdd8676 100644
--- a/lang/cmu_indic_lang/cmu_indic_lang.c
+++ b/lang/cmu_indic_lang/cmu_indic_lang.c
@@ -411,6 +411,10 @@ static int indic_nump_old(const char *number)
 
 static int indic_nump(const char *number)
 {
+    cst_val *p;
+    const cst_val *q;
+    int flag, fflag, ffflag;
+
     /* Check if non-empty string */
     if (!number[0])
         return FALSE;
@@ -418,15 +422,12 @@ static int indic_nump(const char *number)
     /* Catch lone commas */    
     if (number[0] == ',')
         return indic_nump(&number[1]);
-    
-    
+
     /* Returns 2 if all characters are numbers or commas */
-    /* Returns 1 if it starts with a number */
-    cst_val *p;
-    const cst_val *q;
-    int flag = TRUE;
-    int fflag;
-    int ffflag = FALSE; /* Switches to TRUE at first digit found */
+    /* Returns 1 if it starts with a number */    
+    
+    flag = TRUE;
+    ffflag = FALSE; /* Switches to TRUE at first digit found */
 
     p = cst_utf8_explode(number);
     for (q=p; q && (flag==TRUE); q=val_cdr(q))
-- 
2.19.0

