aboutsummaryrefslogtreecommitdiff
path: root/src/datastore
diff options
context:
space:
mode:
authorLRN <lrn1986@gmail.com>2012-10-30 22:12:03 +0000
committerLRN <lrn1986@gmail.com>2012-10-30 22:12:03 +0000
commit9df886ed8497002e564ba018d7ceab36bfd04ddd (patch)
tree4ce33c4fad5486af3d45ececb47aff7110ed8c74 /src/datastore
parent3b9cf09a1fbae43883b61c9fd0d33083fa7a6b6c (diff)
downloadgnunet-9df886ed8497002e564ba018d7ceab36bfd04ddd.tar.gz
gnunet-9df886ed8497002e564ba018d7ceab36bfd04ddd.zip
Fix ENABLE_NLS usage
ENABLE_NLS is for gettext only, it's not an indicator of nl_langinfo availability. Use unistring instead of nl_langinfo, since unistring is always there. GNUnet supports UTF-8 now (or should support), so most conversions are unnecessary anyway.
Diffstat (limited to 'src/datastore')
-rw-r--r--src/datastore/plugin_datastore_sqlite.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/datastore/plugin_datastore_sqlite.c b/src/datastore/plugin_datastore_sqlite.c
index 54414a8b0..01f6b9188 100644
--- a/src/datastore/plugin_datastore_sqlite.c
+++ b/src/datastore/plugin_datastore_sqlite.c
@@ -243,13 +243,8 @@ database_setup (const struct GNUNET_CONFIGURATION_Handle *cfg,
243 /* database is new or got deleted, reset payload to zero! */ 243 /* database is new or got deleted, reset payload to zero! */
244 plugin->env->duc (plugin->env->cls, 0); 244 plugin->env->duc (plugin->env->cls, 0);
245 } 245 }
246#ifdef ENABLE_NLS 246 /* afsdir should be UTF-8-encoded. If it isn't, it's a bug */
247 plugin->fn = 247 plugin->fn = afsdir;
248 GNUNET_STRINGS_to_utf8 (afsdir, strlen (afsdir), nl_langinfo (CODESET));
249#else
250 plugin->fn = GNUNET_STRINGS_to_utf8 (afsdir, strlen (afsdir), "UTF-8"); /* good luck */
251#endif
252 GNUNET_free (afsdir);
253 248
254 /* Open database and precompile statements */ 249 /* Open database and precompile statements */
255 if (sqlite3_open (plugin->fn, &plugin->dbh) != SQLITE_OK) 250 if (sqlite3_open (plugin->fn, &plugin->dbh) != SQLITE_OK)