[tracker] Make --disable-tracker-fts compile again
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] Make --disable-tracker-fts compile again
- Date: Sun, 30 Nov 2014 22:17:20 +0000 (UTC)
commit 8d64b9783d3aebff2d9259068c402a9e1c1a81e4
Author: Philip Van Hoof <philip codeminded be>
Date: Sun Nov 30 23:16:59 2014 +0100
Make --disable-tracker-fts compile again
src/libtracker-data/tracker-data-manager.c | 4 ++--
src/libtracker-data/tracker-db-interface-sqlite.c | 12 ++++++++----
2 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index 7230f48..74c8fc6 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -3711,7 +3711,7 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
tracker_data_update_init ();
-#ifdef HAVE_TRACKER_FTS
+#if HAVE_TRACKER_FTS
if (!tracker_fts_init ()) {
g_warning ("FTS module initialization failed");
}
@@ -4682,7 +4682,7 @@ tracker_data_manager_shutdown (void)
tracker_locale_shutdown ();
}
-#ifdef HAVE_TRACKER_FTS
+#if HAVE_TRACKER_FTS
if (!tracker_fts_shutdown ()) {
g_warning ("FTS module shutdown failed");
}
diff --git a/src/libtracker-data/tracker-db-interface-sqlite.c
b/src/libtracker-data/tracker-db-interface-sqlite.c
index 2cbac29..56d4695 100644
--- a/src/libtracker-data/tracker-db-interface-sqlite.c
+++ b/src/libtracker-data/tracker-db-interface-sqlite.c
@@ -31,7 +31,7 @@
#include <libtracker-sparql/tracker-sparql.h>
-#ifdef HAVE_TRACKER_FTS
+#if HAVE_TRACKER_FTS
#include <libtracker-fts/tracker-fts.h>
#include <libtracker-fts/tracker-parser.h>
#endif
@@ -682,8 +682,10 @@ function_sparql_unaccent (sqlite3_context *context,
zOutput = u8_normalize (UNINORM_NFKD, zInput, nInput, NULL, &written);
+#if HAVE_TRACKER_FTS
/* Unaccenting is done in place */
tracker_parser_unaccent_nfkd_string (zOutput, &written);
+#endif
sqlite3_result_text (context, zOutput, written, free);
}
@@ -873,8 +875,10 @@ function_sparql_unaccent (sqlite3_context *context,
return;
}
+#if HAVE_TRACKER_FTS
/* Unaccenting is done in place */
tracker_parser_unaccent_nfkd_string (zOutput, &nOutput);
+#endif
sqlite3_result_text16 (context, zOutput, -1, sqlite3_free);
}
@@ -1134,7 +1138,7 @@ tracker_db_interface_sqlite_fts_init (TrackerDBInterface *db_interface,
GHashTable *multivalued,
gboolean create)
{
-#ifdef HAVE_TRACKER_FTS
+#if HAVE_TRACKER_FTS
GStrv fts_columns;
tracker_fts_init_db (db_interface->db, properties);
@@ -1174,7 +1178,7 @@ tracker_db_interface_sqlite_fts_init (TrackerDBInterface *db_interface,
#endif
}
-#ifdef HAVE_TRACKER_FTS
+#if HAVE_TRACKER_FTS
void
tracker_db_interface_sqlite_fts_alter_table (TrackerDBInterface *db_interface,
@@ -1332,7 +1336,7 @@ tracker_db_interface_sqlite_finalize (GObject *object)
db_interface = TRACKER_DB_INTERFACE (object);
-#ifdef HAVE_TRACKER_FTS
+#if HAVE_TRACKER_FTS
tracker_fts_shutdown_db (db_interface->db);
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]