diff --git a/src/mu-runtime.c b/src/mu-runtime.c index b19a44ff..23607383 100644 --- a/src/mu-runtime.c +++ b/src/mu-runtime.c @@ -87,8 +87,8 @@ mu_runtime_init (const char* muhome_arg, const char *name) g_return_val_if_fail (!_initialized, FALSE); g_return_val_if_fail (name, FALSE); - if (!mu_util_init_system()) - return FALSE; + setlocale (LC_ALL, ""); + g_type_init (); if (muhome_arg) muhome = g_strdup (muhome_arg); @@ -124,8 +124,8 @@ mu_runtime_init_from_cmdline (int *pargc, char ***pargv, const char *name) g_return_val_if_fail (!_initialized, FALSE); g_return_val_if_fail (name, FALSE); - if (!mu_util_init_system()) - return FALSE; + setlocale (LC_ALL, ""); + g_type_init (); _data = g_new0 (MuRuntimeData, 1); _data->_config = mu_config_init (pargc, pargv); diff --git a/src/mu-util.c b/src/mu-util.c index dcdd26f3..ad8755d2 100644 --- a/src/mu-util.c +++ b/src/mu-util.c @@ -150,33 +150,6 @@ mu_util_cache_dir (void) } -gboolean -mu_util_init_system (void) -{ - /* without setlocale, non-ascii cmdline params (like search - * terms) won't work */ - setlocale (LC_ALL, ""); - - /* on FreeBSD, it seems g_slice_new and friends lead to - * segfaults. Same for MacOS. We cannot easily debug what is - * going on there (no access to such a system), so all we can - * do is add a lame fallback -> we let g_slice_* use normal - * malloc - */ -#ifndef __linux__ - if (!g_setenv ("G_SLICE", "always-malloc", TRUE)) { - g_critical ("cannot set G_SLICE"); - return FALSE; - } - /* g_debug ("setting G_SLICE to always-malloc"); */ -#endif /*!__linux__*/ - - g_type_init (); - - return TRUE; -} - - gboolean mu_util_check_dir (const gchar* path, gboolean readable, gboolean writeable) { diff --git a/src/mu-util.h b/src/mu-util.h index 0a049163..9721818b 100644 --- a/src/mu-util.h +++ b/src/mu-util.h @@ -29,15 +29,6 @@ G_BEGIN_DECLS -/** - * do system-specific initialization. should be called before anything - * else. Initializes the locale and Gtype. Note: this function is - * called by mu_runtime_init. - * - * @return TRUE if is succeeds, FALSE otherwise - */ -gboolean mu_util_init_system (void); - /** * get the expanded path; ie. perform shell expansion on the path. the * path does not have to exist