diff options
author | Sam Thursfield <sam@afuera.me.uk> | 2017-12-18 11:42:27 +0000 |
---|---|---|
committer | Sam Thursfield <sam@afuera.me.uk> | 2017-12-18 11:44:18 +0000 |
commit | 97cd8c2730cef401aa30b3c9f69475e6c09a318f (patch) | |
tree | 0301e70c2e482519c1301fb82aa5091dc43f252b | |
parent | 186d8b4cae176a6a540e9aaf1966c94751525531 (diff) | |
download | tracker-97cd8c2730cef401aa30b3c9f69475e6c09a318f.tar.gz |
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.
-rw-r--r-- | src/libtracker-data/tracker-collation.c | 4 | ||||
-rw-r--r-- | 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 2a48ab231..2470ed287 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 b4ab1d9c6..079be7a1c 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, |