[tracker] Make HAVE_LIBICU checks consistently with #ifdef



commit 97cd8c2730cef401aa30b3c9f69475e6c09a318f
Author: Sam Thursfield <sam afuera me uk>
Date:   Mon Dec 18 11:42:27 2017 +0000

    Make HAVE_LIBICU checks consistently with #ifdef
    
    We were in some places checking the value of HAVE_LIBICU as a boolean
    and in others checking whether it was defined. This is broken because
    when it is defined to 0 we mix up the code paths completely.
    
    Fixes the Meson build since d5e9ce54196d5c9086423e688c8014c1225b858b.

 src/libtracker-data/tracker-collation.c           |    4 ++--
 src/libtracker-data/tracker-db-interface-sqlite.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/libtracker-data/tracker-collation.c b/src/libtracker-data/tracker-collation.c
index 2a48ab2..2470ed2 100644
--- a/src/libtracker-data/tracker-collation.c
+++ b/src/libtracker-data/tracker-collation.c
@@ -38,7 +38,7 @@
 /* libunistring versions prior to 9.1.2 need this hack */
 #define _UNUSED_PARAMETER_
 #include <unistr.h>
-#elif HAVE_LIBICU
+#elif defined(HAVE_LIBICU)
 #include <unicode/ucol.h>
 #include <unicode/utypes.h>
 #endif
@@ -97,7 +97,7 @@ tracker_collation_utf8 (gpointer      collator,
        return result;
 }
 
-#elif HAVE_LIBICU /* ---- ICU based collation (UTF-16) ----*/
+#elif defined(HAVE_LIBICU) /* ---- ICU based collation (UTF-16) ----*/
 
 gpointer
 tracker_collation_init (void)
diff --git a/src/libtracker-data/tracker-db-interface-sqlite.c 
b/src/libtracker-data/tracker-db-interface-sqlite.c
index b4ab1d9..079be7a 100644
--- a/src/libtracker-data/tracker-db-interface-sqlite.c
+++ b/src/libtracker-data/tracker-db-interface-sqlite.c
@@ -42,7 +42,7 @@
 #define _UNUSED_PARAMETER_
 #include <unistr.h>
 #include <unicase.h>
-#elif HAVE_LIBICU
+#elif defined(HAVE_LIBICU)
 #include <unicode/utypes.h>
 #include <unicode/uregex.h>
 #include <unicode/ustring.h>
@@ -893,7 +893,7 @@ function_sparql_unaccent (sqlite3_context *context,
        sqlite3_result_text (context, zOutput, written, free);
 }
 
-#elif HAVE_LIBICU
+#elif defined(HAVE_LIBICU)
 
 static void
 function_sparql_lower_case (sqlite3_context *context,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]